Skip to content

feat: add storage deletion workflow with conditional execution#1492

Merged
cardoe merged 1 commit into
mainfrom
add_deletes_for_storage
Feb 26, 2026
Merged

feat: add storage deletion workflow with conditional execution#1492
cardoe merged 1 commit into
mainfrom
add_deletes_for_storage

Conversation

@achatur
Copy link
Copy Markdown
Contributor

@achatur achatur commented Dec 9, 2025

This change implements automated storage network cleanup triggered by OpenStack server delete events. When an instance is deleted via 'openstack server delete', the system now automatically removes the corresponding storage network configuration through an event-driven workflow.

The automation flow works as follows:

  1. Nova emits Oslo notification events for instance delete operations
  2. Argo Events captures these notifications via RabbitMQ event source
  3. Sensor filters trigger the storage cleanup workflow for delete events
  4. Ansible playbooks update Nautobot to reflect the removed instance
  5. Nautobot Golden Config generates updated switch configurations
  6. Switch update playbook applies the network changes to remove storage network access

This completes the storage network automation lifecycle (create was previously merged), enabling zero-touch storage network deprovisioning that keeps network state synchronized with compute instance lifecycle without manual intervention.

Changes include:

  • Added Nova Oslo event source and RabbitMQ user configuration
  • Created sensor for Nova instance delete events with event filtering
  • Enabled IronicUnderstackDriver in Nova configuration for storage network integration
  • Updated site-workflows kustomization to include new event sources and sensors

@achatur achatur force-pushed the add_deletes_for_storage branch 2 times, most recently from 114b1eb to 99b71d8 Compare January 15, 2026 20:52
@achatur achatur force-pushed the add_deletes_for_storage branch from 7630230 to 26c6206 Compare January 23, 2026 16:57
@cardoe cardoe force-pushed the add_deletes_for_storage branch from 5a37de0 to 9625024 Compare January 23, 2026 22:56
@achatur achatur force-pushed the add_deletes_for_storage branch from 9625024 to 80d9de6 Compare January 29, 2026 13:59
triggers the ansible playbook without requiring a Python handler.

The sensor extracts the following parameters from the event:
- device_id: from payload.node (the Ironic node UUID)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the nova instance UUID and not the Ironic node which might matter here?

@achatur achatur force-pushed the add_deletes_for_storage branch from 80d9de6 to 5ed8396 Compare February 4, 2026 20:44
exchangeName: nova
exchangeType: topic
exchangeDeclare:
durable: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
durable: false
durable: true

@achatur achatur force-pushed the add_deletes_for_storage branch 6 times, most recently from 990b1f2 to ed3ffc3 Compare February 11, 2026 21:09
@achatur achatur force-pushed the add_deletes_for_storage branch 5 times, most recently from c71f11c to bd1474d Compare February 19, 2026 18:15
@achatur achatur force-pushed the add_deletes_for_storage branch 3 times, most recently from d9066f4 to 4feba97 Compare February 25, 2026 17:36
Comment on lines +82 to +83
# "compute.instance.delete.end" is now handled directly by the sensor with filters
# See: components/site-workflows/sensors/sensor-nova-oslo-event.yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can leave these lines out.

@achatur achatur force-pushed the add_deletes_for_storage branch from 741a02f to 6730e0d Compare February 26, 2026 17:16
@achatur achatur marked this pull request as ready for review February 26, 2026 17:36
This change implements automated storage network cleanup triggered by OpenStack server delete events. When an instance is deleted via 'openstack server delete', the system now automatically removes the corresponding storage network configuration through an event-driven workflow.

The automation flow works as follows:
1. Nova emits Oslo notification events for instance delete operations
2. Argo Events captures these notifications via RabbitMQ event source
3. Sensor filters trigger the storage cleanup workflow for delete events
4. Ansible playbooks update Nautobot to reflect the removed instance
5. Nautobot Golden Config generates updated switch configurations
6. Switch update playbook applies the network changes to remove storage network access

This completes the storage network automation lifecycle (create was previously merged), enabling zero-touch storage network deprovisioning that keeps network state synchronized with compute instance lifecycle without manual intervention.

Changes include:
- Added Nova Oslo event source and RabbitMQ user configuration
- Created sensor for Nova instance delete events with event filtering
- Enabled IronicUnderstackDriver in Nova configuration for storage network integration
- Updated site-workflows kustomization to include new event sources and sensors
@achatur achatur force-pushed the add_deletes_for_storage branch from 6730e0d to 9a3225d Compare February 26, 2026 19:38
@cardoe cardoe added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit b3714b3 Feb 26, 2026
17 of 18 checks passed
@cardoe cardoe deleted the add_deletes_for_storage branch February 26, 2026 19:58
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