Forum
Welcome, Guest
Username: Password: Remember me

TOPIC:

HA (Lizard) and shutdown via USV/APCUPSD 9 years 2 days ago #402

Hi,

i have a question regarding HA-Lizard and USV/APCUPSD initiated shutdown of a server.

The question basicly is: How does it work? :blink:

In case i have HA/Autorestart enabled all VMs should be auto-restarted in case a shutdown is initiated when the USV batteries runs empty. Now i could disable HA/Autostart in the USV shutdown script but then the VMs wont restart after rebooting, right?

Is the best way to solve this to:
- disable HA/VM Autostart in the servers shutdown script
- Enable HA/VM Autostart again for all VMs via a (xenserver) startup script?

cheers,

Arnd

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

HA (Lizard) and shutdown via USV/APCUPSD 9 years 1 day ago #403

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
This is a tricky scenario. You'll need to decide what is most important to you.. Here are some considerations and suggestions (assuming only a single server is being shutdown AND your setup uses iscsi-ha to manage local storage)

- Disabling HA for the pool is not advisable if you are using iscsi-ha to manage the local storage. If the master is shutdown the slave will effectivly lose its storage for ALL VMs since it is unable to promote itself to master and takeover responsibility for storage while HA is off.

- Disabling auto start of VMs - this would effective shutdown your VMs

I would try simply instructing your UPS script to perform a graceful shutdown of the host (ex.. "shutdown -h -t 1 now"). In this case, there are 2 scenarios:

- slave gets shutdown - xenserver migrates any VMs to the surviving master and then slave proceeds to shutdown - NO VM downtime

- master gets shutdown - senserver migrates any VMs to the surviving slave - after all VMs have been moved - master shuts down - HA-Lizard promotes slave to master and takes over control of the storage - in this case there is NO VM downtime and a short disruption to disk access (typically less than 60 seconds)
The following user(s) said Thank You: Robin

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

HA (Lizard) and shutdown via USV/APCUPSD 9 years 1 day ago #404

Hello "SC",

thanks for your comments and suggestions. Greatly appreciated.

I would try simply instructing your UPS script to perform a graceful shutdown of the host (ex.. "shutdown -h -t 1 now"). In this case, there are 2 scenarios:


So the idea would be to shutdown fast so the VMs dont have time to be restared?!

- slave gets shutdown - xenserver migrates any VMs to the surviving master and then slave proceeds to shutdown - NO VM downtime

- master gets shutdown - senserver migrates any VMs to the surviving slave - after all VMs have been moved - master shuts down - HA-Lizard promotes slave to master and takes over control of the storage - in this case there is NO VM downtime and a short disruption to disk access (typically less than 60 seconds)


In case the last surviving server will be shutdown due to powerfailure and a "shutdown -h -t 1 now" will be issued, will the hypersphere first try to gracefully shutdown all VMs so there wont be any data corruption?

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

Last edit: by Robin.

HA (Lizard) and shutdown via USV/APCUPSD 9 years 20 hours ago #405

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
A shutdown on the last surviving host should gracefully shutdown all VMs before powering off the host.

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

HA (Lizard) and shutdown via USV/APCUPSD 8 years 3 months ago #645

Reviving an old thread, I'm trying to sort out what the best way would be to shutdown 2 physical servers running HA Lizard with noSAN.

Have the apc script turn off HA and then shutdown slave and then master?

What is the best way to accomplish this and how are people integrating UPS shutdowns?

Xenserver recommend another windows box to manage but I'd rather not have more boxes.

Josh

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

HA (Lizard) and shutdown via USV/APCUPSD 8 years 3 months ago #646

Hi,

unluckily i cant access the production machines atm. I am pretty sure i did use this script ive found somewhere in net (check below). Maybe slightly modified. Will post my version as soon as i can obtain a copy of the scripts.

cheers,

Robin

#!/bin/bash

###enumerate uuid's of all _running_ VMs in the pool
for VM in `xe vm-list is-control-domain=false power-state=running params=uuid | egrep -o "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"`
do
    ###(uncomment following line to perform actual shutdown)
    #xe vm-shutdown vm=$VM
    echo $VM > /dev/null
done

###get uuid of pool master - it must be the very last to shut down
MASTER_UUID=`xe pool-list params=master | egrep -o "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-0-9]{4}-[a-f0-9]{12}"`

###enumerate of all xen hosts in the pool except master
for HOST in `xe host-list params=uuid | egrep -o "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"`
do
    if [ $HOST != $MASTER_UUID ]
    then
        ###(uncomment following line to perform actual shutdown)
        #xe host-shutdown host=$HOST
        echo $HOST > /dev/null
    fi
done

###finally shutdown pool master
###(uncomment following line to perform actual shutdown)
#xe host-shutdown host=$HOST

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