11 Replies Latest reply on Sep 28, 2017 11:03 AM by bealdrid

    DRS anti-affinity rules will not stay enabled/ticked

    bealdrid Novice

      First post, go easy on me:) 

       

      Environment is VCSA 6U3 w/ latest patches, ESXi6.0U3 latest patches as well.  For some reason I have one particular DRS/HA enabled cluster with six hosts that will not accept /enable any of my anti-affinity rules.  Simple things like "Separate these two virtual machines".  As soon as I 'tick' the box for enabled and click OK to get out of the settings I can see the task complete in the task pane ("Update cluster") or whatever, but the problem is the rule does not actually get enabled.  If I go back into the settings it just shows the box for the rule is unchecked again.

       

      Tried completely blowing away all the DRS rules for this cluster; disabling and re-enabling DRS for the cluster, recreating rules but no luck.  Ideas?  Btw, do have support case open but been 4 days now still on first tier support which hasn't been helpful.

       

      Thanks.

        • 1. Re: DRS anti-affinity rules will not stay enabled/ticked
          Mattallford Hot Shot
          vExpert

          Hi there,

           

          Interesting one. Which client are you using? Have you tried doing it in the older c# client and the vSphere web client? How about via powershell with Set-DRSRule -Name rulename -Enabled $true

           

          Cheers, Matt.

          • 2. Re: DRS anti-affinity rules will not stay enabled/ticked
            Sateesh_vCloud Hot Shot

            Hope you tried with web client already?

            • 3. Re: DRS anti-affinity rules will not stay enabled/ticked
              bealdrid Novice

              Thanks for the replies guys; I have tried with 3 different clients (C# thick client, Web flash-based client, HTML5 Fling).  All do the same behavior.  I haven't tried the powercli thing yet.  Will try that in the morning.

              • 4. Re: DRS anti-affinity rules will not stay enabled/ticked
                bealdrid Novice

                Alright, updating via powercli didn't work either.  Any other ideas.?

                • 5. Re: DRS anti-affinity rules will not stay enabled/ticked
                  bealdrid Novice

                  I checked on my vCSA, and in the /var/log/vmware/vpxd/vpxd*log I can see the following messages being logged at the time I try to apply the rule:

                   

                  2017-09-20T14:43:25.269Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] [DrsInvtCluster::ClusterReconfigureDrs] DRS automation level of cluster M630 is fullyAutomated

                  2017-09-20T14:43:25.271Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] RuleUuid of rule <rule name> is set to 5253d52f-8dee-901c-df1a-50af0d6b9d63

                  2017-09-20T14:43:25.271Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] [DrsInvtCluster::ConflictsWithAntiAffineRule] new anti affinity rule is conflicting with other anti affinity rules

                  2017-09-20T14:43:25.271Z info vpxd[7FBF04A95700] [Originator@6876 sub=drmLogger opID=59E4E4DB-00000D15-7f] [DrsInvtCluster::PopulateNewRules] Disabling anti affinity rule <rule name> because of conflicts

                   

                  So it seems there is some orphaned rules left over somewhere, because I have no DRS rules anywhere else that reference those VMs.

                  • 6. Re: DRS anti-affinity rules will not stay enabled/ticked
                    Sateesh_vCloud Hot Shot

                    This may be duplicate information for you but just want to double check the DRS settings:

                     

                    When two VM-VM affinity rules conflict, the older one takes precedence and the newer rule is disabled. DRS only tries to satisfy enabled rules and disabled rules are ignored. DRS gives higher precedence to preventing violations of anti-affinity rules than violations of affinity rules.

                     

                    Did you move this VMware cluster from another vCenter server like Windows to VCSA?

                     

                    Do you want to try to disable DRS and enable it? give a try after that

                     

                    In worst case - you need to clean the affinity rule entries from vCenter DB via API calls or DB commands

                     

                    • 7. Re: DRS anti-affinity rules will not stay enabled/ticked
                      bealdrid Novice

                      Tried disabling DRS across all my clusters, and creating new rules from scratch.  Same deal though.  Thanks for the ideas though. 

                      • 8. Re: DRS anti-affinity rules will not stay enabled/ticked
                        Finikiez Master
                        vExpert

                        So it might be an issue with entris in VC DB.

                        If nothig has changed, DRS rules should be stored in VPX_COMPUTE_RESOURCE table.

                        You need to select everything related to your cluster from DB and have look on this enries.

                         

                        Or you can try a simple workaround - create a new cluster and move all hosts to this new cluster

                        • 9. Re: DRS anti-affinity rules will not stay enabled/ticked
                          Sateesh_vCloud Hot Shot

                          I agree with the idea of new cluster as you do not find any issues with other configuration.

                           

                          If you do not want to messup with vCenter DB - you need to think of adding them to new cluster

                           

                          Also did you perform any upgrade or change of vCenter server before this incident?

                          • 10. Re: DRS anti-affinity rules will not stay enabled/ticked
                            bealdrid Novice

                            A new cluster would be an option I could try.  No updates or changes were made prior to me noticing this issue.  I can say however, that the VMs that are referenced by the rules were previously in another cluster.  And in that other cluster they did have DRS rules configured to separate them (which I believe were working).  So I don't know if something is left over there.  I tried moving the VMs back to the original cluster they were in, then checking to see if there were DRS rules for them in that cluster, but didn't see any.  I then vMotion'd them back to the current cluster and tried re-creating the rules, but still no luck.  I'm not too keen on manually screwing with the vPostgres vcenter database on the vCSA; however I did take a backup of it using the python scripts VMWare has provided, and, after searching through it, I have found references to one "orphaned" rule that references two VMs.  I cannot find this rule in any of my DRS clusters in the web client, but VMware still knows about it in the database.  Interestingly I tried to create "separate VM" DRS rules for other VMs that were never referenced by this orphaned rule; and those rules will not "enable" either.  Thanks again for the tips.

                            • 11. Re: DRS anti-affinity rules will not stay enabled/ticked
                              bealdrid Novice

                              I finally got this solved by moving all the hosts in the original cluster to a newly created cluster.  After moving all the VMs to this cluster I could then create all the DRS rules again from scratch, and they are now staying 'ticked'.  Thanks.