Skip to content

fix(pre-evacuation): restart nova-compute on nic-up - #236

Open
ahmad-can wants to merge 3 commits into
canonical:mainfrom
ahmad-can:fix/pre-evacuation-nova-compute-recovery
Open

ahmad-can wants to merge 3 commits into
canonical:mainfrom
ahmad-can:fix/pre-evacuation-nova-compute-recovery

Conversation

@ahmad-can

@ahmad-can ahmad-can commented Oct 22, 2026 •

Copy link
Copy Markdown

When the consul-client detector cannot reach the Consul servers, it sends
nic-down to pre-evacuation-setup-service. The service stops nova-compute
and shuts down all libvirt domains. It had no way back, so the node stayed
out of service after connectivity returned until someone restarted
nova-compute by hand.

This PR adds recovery only. The detector (consul-client-operator, separate
PR) sends nic-up, and the service restarts nova-compute unless Masakari
has marked the host on_maintenance.

##Testing
Sunbeam on Juju with MAAS VM computes, running the patched
script on compute-1 together with the patched detector.

  • nic-down → nova-compute stopped. After the network was restored and
    nic-up was sent, the service restarted nova-compute and the compute
    service came back up in Nova.
  • Flapping link → no premature nic-up while the check was failing
    intermittently. Recovery ran only after the required run of
    consecutive successes.
  • Forced start failure (systemd drop-in with ExecStartPre=/bin/false)
    → the service retried and the state file was kept. After the drop-in was
    removed, the next attempt succeeded.

Related PR

OPEN-4890

@hemanthnakkina

Copy link
Copy Markdown
Collaborator

@ahmad-can
Have you considered scenarios like

  • if node is in sunbeam maintenance mode
  • if NIC_UP event is received by openstack-hypervisor in the middle of evacuation by Masakari

Can we have a list of scenarios and how the complete solution behaves

@ahmad-can

ahmad-can commented Nov 6, 2026 •

Copy link
Copy Markdown
Author

@ahmad-can Have you considered scenarios like

  • if node is in sunbeam maintenance mode
  • if NIC_UP event is received by openstack-hypervisor in the middle of evacuation by Masakari

Can we have a list of scenarios and how the complete solution behaves

I will retest these 3 scenarios

scenario 1

  • successful evacuation when nic_down

scenario 2

  • nic_up but node was not in maintenance, so nova-compute should be brought up

scenario 3

  • nic_up but not was in maintenance, so nova-compute should stay down

…Masakari

- track fencing steps per outage generation; redelivery re-fences
- persist recovery request before acking nic-up; resume after restart
- retry failed recovery cycles via sweeper (cap 3, then operator)
- fail closed when Masakari status is unknown; use workload region
- stability window on already-active nova-compute; socket 0600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants