Comment 1 for bug 1637401

Revision history for this message
Trent Lloyd (lathiat) wrote : Re: Re-adding virsh chassis to discover new nodes powers down existing nodes

Looks like this is done intentionally in the code. I would suggest that it only powers it off if create_node succeeds.

src/provisioningserver/drivers/hardware/virsh.py#probe_virsh_and_enlist

for machine in conn.list():
(truncated)
    # Force the machine off, as MAAS will control the machine
    # and it needs to be in a known state of off.
    if state == VirshVMState.ON:
        conn.poweroff(machine)
(truncated)
    system_id = create_node(
        macs, arch, 'virsh', params, domain, machine).wait(30)