XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Hosts in a pool have gone offline after reboot

    Scheduled Pinned Locked Moved Management
    20 Posts 3 Posters 1.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      Aeoran @Danp
      last edited by

      @Danp So the saga continues:

      I designated the sole running host as the new master. It did this happily and in fact also discovered one of the other hosts - the one that was not the old master. So far so good.

      I was able to then take a look at the list of VMs, then force any VMs "running" on the dead host (the old master) to be halted. Now the dead host only has the XCP control plane running.

      All that is left is to get the dead host forgotten from the pool and then rejoin the pool, right?

      DanpD 1 Reply Last reply Reply Quote 0
      • DanpD Offline
        Danp Pro Support Team @Aeoran
        last edited by

        @Aeoran Yes, that sounds like a good plan.

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          Aeoran @Danp
          last edited by

          @Danp Is there some documentation you would recommend on how to safely forget a host? I'm confronted with dire warnings on how this will permanently destroy the SRs used by the VMs that used to run on the dead host. So, I want to make really sure I won't be doing something wrong here.

          Thanks!

          1 Reply Last reply Reply Quote 0
          • nikadeN Offline
            nikade Top contributor
            last edited by

            Shared storage should belong to the pool, only local SR should be affected when you forget the old master.
            Just make sure all the slaves know about the new master before doing anything to the old one.

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              Aeoran @nikade
              last edited by

              @nikade It looks like I cannot get the dead host to rejoin the pool using xe pool-join:

              You attempted an operation that was not allowed.
              reason: Host is already part of a pool
              

              Will I have problems if I try to force it to join with xe pool-join force? A forum post seems to suggest that this may propagate data corruption errors from the dead host to the pool, which is obviously undesireable. So how would I avoid that?

              1 Reply Last reply Reply Quote 0
              • nikadeN Offline
                nikade Top contributor
                last edited by

                Not really sure, I'd ask @olivierlambert to be sure.

                1 Reply Last reply Reply Quote 0
                • DanpD Offline
                  Danp Pro Support Team
                  last edited by

                  What actions did you initially perform to remove the host from the pool?

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    Aeoran @Danp
                    last edited by

                    @Danp I didn't do anything. The master host failed on its own and stopped responding to XO.

                    I've rebooted the host and the hardware all seems fine. The logs suggest that XAPI is not running because the database is missing a column (see above, first comment).

                    1 Reply Last reply Reply Quote 0
                    • DanpD Offline
                      Danp Pro Support Team
                      last edited by

                      You probably need to forget the host using xe host-forget uuid=UUID where UUID belongs to the old pool master.

                      See prior discussion on this topic -- https://xcp-ng.org/forum/topic/6164/remove-a-host-from-a-pool/14

                      A 1 Reply Last reply Reply Quote 0
                      • A Offline
                        Aeoran @Danp
                        last edited by

                        @Danp How can I preserve or recover the local SRs of the dead host?

                        DanpD 1 Reply Last reply Reply Quote 0
                        • DanpD Offline
                          Danp Pro Support Team @Aeoran
                          last edited by

                          @Aeoran AFAIK, the XAPI database gets wiped whenever you add or remove the host from a pool. You may be able to restore metadata to the old master once it is no longer belongs to the pool, but I can't guarantee that this will work or not produce other issues.

                          If you don't have backups of the VMs, then you should be able to copy the VHD files to another location by accessing the directory /run/sr-mount/<SR UUID>/ on the old master.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post