@@ -114,6 +114,9 @@ Tunnelling through xapi will be done by POSTing to the localhost URI
114114Xapi will the either proxy the request transparently to the SRmaster, or issue an
115115http level redirect that the xenvm CLI would need to follow.
116116
117+ If the xenvmd process is not running on the host on which it should
118+ be, xapi will start it.
119+
117120
118121Components: roles and responsibilities
119122======================================
@@ -149,9 +152,11 @@ Components: roles and responsibilities
149152` xapi ` :
150153
151154- provides authenticated communication tunnels
155+ - ensures the xenvmd daemons are only running on the correct hosts.
152156
153157` SM ` :
154158
159+ - writes the configuration file for xenvmd (though doesn't start it)
155160- has an on/off switch for thin-provisioning
156161- can use either normal LVM or the ` xenvm ` CLI
157162
@@ -590,11 +595,10 @@ Modifications to LVHD SR
590595
591596- ` sr_attach ` should:
592597 - if an SRmaster, update the ` MGT ` major version number to prevent
593- - if an SRmaster, spawn ` xenvmd `
598+ - Write the xenvmd configuration file (on _ all _ hosts, not just SRmaster)
594599 - spawn ` local_allocator `
595600- ` sr_detach ` should:
596601 - call ` xenvm ` to request the shutdown of ` local_allocator `
597- - if an SRmaster, terminate ` xenvmd `
598602- ` vdi_deactivate ` should:
599603 - call ` xenvm ` to request the flushing of all the ` to_LVM ` queues to the
600604 redo log
@@ -605,6 +609,18 @@ Note that it is possible to attach and detach the individual hosts in any order
605609but when the SRmaster is unplugged then there will be no "refilling" of the host
606610local free LVs; it will behave as if the master host has failed.
607611
612+ Modifications to xapi
613+ =====================
614+
615+ - Xapi needs to learn how to forward xenvm connections to the SR master.
616+ - Xapi needs to start and stop xenvmd at the appropriate times
617+ - We must disable unplugging the PBDs for shared SRs on the pool master
618+ if any other slave has its PBD plugging. This is actually fixing an
619+ issue that exists today - LVHD SRs require the master PBD to be
620+ plugged to do many operations.
621+ - Xapi should provide a mechanism by which the xenvmd process can be killed
622+ once the last PBD for an SR has been unplugged.
623+
608624Enabling thin provisioning
609625==========================
610626
@@ -652,19 +668,32 @@ Walk-through: after a host failure
652668If HA is enabled:
653669
654670- ``` xhad ``` elects a new master if necessary
671+ - ``` Xapi ``` on the master will start xenvmd processes for shared thin-lvhd SRs
655672- the ``` xhad ``` tells ``` Xapi ``` which hosts are alive and which have failed.
656673- ``` Xapi ``` runs the ``` host-pre-declare-dead ``` scripts for every failed host
657674- the ``` host-pre-declare-dead ``` tells ` xenvmd ` to flush the ` to_LVM ` updates
658675- ``` Xapi ``` unlocks the VMs and restarts them on new hosts.
659676
660677If HA is not enabled:
661678
679+ - The admin should verify the host is definitely dead
680+ - If the dead host was the master, a new master must be designated. This will
681+ start the xenvmd processes for the shared thin-lvhd SRs.
662682- the admin must tell ``` Xapi ``` which hosts have failed with ``` xe host-declare-dead ```
663683- ``` Xapi ``` runs the ``` host-pre-declare-dead ``` scripts for every failed host
664684- the ``` host-pre-declare-dead ``` tells ` xenvmd ` to flush the ` to_LVM ` updates
665685- ``` Xapi ``` unlocks the VMs
666686- the admin may now restart the VMs on new hosts.
667687
688+ Walk-through: co-operative master transition
689+ ============================================
690+
691+ The admin calls Pool.designate_new_master. This initiates a two-phase
692+ commit of the new master. As part of this, the slaves will restart,
693+ and on restart each host's xapi will kill any xenvmd that should only
694+ run on the pool master. The new designated master will then restart itself
695+ and start up the xenvmd process on itself.
696+
668697Future use of dm-thin?
669698======================
670699
0 commit comments