Skip to content

feat: add storage deletion workflow with conditional execution#1492

Draft
achatur wants to merge 14 commits intomainfrom
add_deletes_for_storage
Draft

feat: add storage deletion workflow with conditional execution#1492
achatur wants to merge 14 commits intomainfrom
add_deletes_for_storage

Conversation

@achatur
Copy link
Contributor

@achatur achatur commented Dec 9, 2025

Add storage cleanup steps to keystone oslo event sensor with proper conditional execution based on event type. Centralize deletion logic in openstack-oslo-event workflow template output parameters.

  • Add ansible-delete-server step triggered by server_storage_delete
  • Pass node_uuid as device_id to server deletion playbook
  • Added oslo sensor for nova for delete
  • Added handler and registered it

@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
Copy link
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
Copy link
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 from 234ce95 to c600b0f Compare February 13, 2026 13:57
Add storage cleanup steps to keystone oslo event sensor with proper
conditional execution based on event type. Centralize deletion logic
in openstack-oslo-event workflow template output parameters.

- Add ansible-delete-server step triggered by server_storage_delete
- Pass node_uuid as device_id to server deletion playbook
- Added oslo sensor for nova for delete
- Added handler and registered it
Replace Python handler with direct sensor filtering for Nova instance
delete events. This simplifies the workflow by using Argo Events data
filters to check if storage cleanup is needed.

Changes:
- Add data filter to check metadata.storage == 'wanted' in sensor
- Extract device_id and project_id directly from event payload
- Remove Python handler step and UUID conversion
- Trigger storage_on_server_delete.yml ansible playbook directly
- Deprecate handle_instance_delete() Python function
- Set check_mode to false for actual execution

Benefits:
- Simpler workflow with fewer steps
- Faster execution without Python handler overhead
- Easier to understand and maintain
- Follows event-driven architecture patterns
Adding the update switch playbook to the workflow.  Only running if the delete step had changed the config.
@achatur achatur force-pushed the add_deletes_for_storage branch from 1e3f692 to 0899da8 Compare February 18, 2026 14:47
…c way.

Also updated the runner to use the new dir structure changes in the container.
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

Comments