Forum
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Pool slave is running the vm 8 years 10 months ago #447

  • Daryl Dusheiko
  • Daryl Dusheiko's Avatar Topic Author
  • Offline
  • Posts: 7
Hi

We have a ups connected to both servers. We set up the ups to send a shutdown signal to both servers when it detects that power has failed. I noticed that the shutdown command was putting the hosts into maintenance mode. The icon in Xen Center showed the host in maintenance mode but when I right click the host I don't get the option to exit maintenance mode, the option is Enter Maintenance mode.

Question:
The UPS provides the means to run a script to shutdown the servers. Is there a best practice for this? What should be in the script? How to I prevent the host going into maintenance mode or get it out of maintenance mode?

I rebooted the host which was in maintenance mode again.
I landed up with my vm running on the pool slave.

Question:
Once in the state where the vm is running on the slave how do I get the vm onto the master or promote the slave to master? From the documentation I gather it is something alone the lines of:

On master: ha-cfg set GLOBAL_VM_HA 0
On both: iscsi-cfg manual_mode_enable
One both: iscsi-cfg become_secondary
On the one to be promoted: iscsi-cfg become_primary
On master: ha-cfg set GLOBAL_VM_HA 1
On both: iscsi-cfg manual-mode-disable
After this command I get the following message, "This host's storage is in Primary mode but this is not the pool master
demote this host's storage to Secondary before disabling manual mode"

This seemed to be corrected after running: xe pool-designate-new-master host-uuid=<uuid of the master being promoted>

Once the above command was run I was able to successfully run iscsi-cfg manual-mode-disable. Is there a best practice to doing this?

Regards

Daryl

Please Log in or Create an account to join the conversation.

Pool slave is running the vm 8 years 10 months ago #448

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
If your slave has become master and you want to promote the former master to master again:

- first shutdown ha-lizard: "service ha-lizard stop -w"

- from the iscsi-cfg CLI - enter manual mode on both hosts
- make the master (former slave) secondary
- make the slave (the one you will make master again) primary

At this point your storage is being exposed on the slave that will become master. Use the xe CLI to promote the slave to master.
Once the roles have been switched - exit manual mode on both hosts. This should NOT give you the same warning you encountered since the storage roles are lined up with the host roles.. Basically, you cannot exit iscsi-ha manual mode unless the pool slave is in secondary mode and the pool master is in primary mode.

- start ha-lizard "service ha-lizard start -w"


Regarding your UPS script.. You may need to test some scenarios to come up with something that works for you.. At a minimum, consider staggering the shutdowns so that ALL the VMs from the first host to shutdown get moved to the other host and then when shutting down the remaining host all VMs should be gracefully shutdown before the host shuts down.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1