Skip to content

Add iop feature teardown for --remove-feature - #783

Draft
jeremylenz wants to merge 3 commits into
theforeman:masterfrom
jeremylenz:iop-remove-feature-teardown
Draft

Add iop feature teardown for --remove-feature#783
jeremylenz wants to merge 3 commits into
theforeman:masterfrom
jeremylenz:iop-remove-feature-teardown

Conversation

@jeremylenz

@jeremylenz jeremylenz commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Why are you introducing these changes? (Problem description, related links)

--remove-feature iop previously did nothing to deployed iop services. This implements the actual teardown logic. Depends on / relates to #746 (which provides the remove_features variable); without that PR merging, remove_features defaults to [] and this role is a no-op.

update: Now includes the commit from #746, temporarily.

What are the changes introduced in this pull request?

  • New iop_remove role that stops all iop container services, removes quadlet files, secrets, volumes, the podman network, frontend assets, Apache configs, downloader scripts/data, and cleans up FDW database objects in advisor_db and vulnerability_db
  • Wires iop_remove into the deploy playbook, running when 'iop' in remove_features
  • Marks the iop feature as removable: true in src/features.yaml

How to test this pull request

Steps to reproduce:

  • make sure selinux is not enforcing (setenforce 0)
  • check out foremanctl latest master
  • Run ./foremanctl deploy --add-feature iop or ./forge deploy-dev --add-feature iop and make sure that succeeds
  • Run ./foremanctl deploy --remove-feature iop or ./forge deploy-dev --remove-feature iop (requires Add feature removal validation and removability metadata #746)
  • Verify iop container services are stopped and all associated resources are removed

ehelms and others added 3 commits August 31, 2026 09:55
Co-Authored-By: Claude <noreply@anthropic.com>
Implements actual teardown logic when iop is removed: stops container
services, removes quadlet files, secrets, volumes, the podman network,
frontend assets, Apache configs, downloader scripts, and FDW database
objects in advisor_db and vulnerability_db.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 972dbcc)
The dev tree has its own copies of the _flavor_features metadata and its
own deploy-dev play, so the production-side feature-removal support did not
reach forge. Add the remove_features parameter to the dev _flavor_features
metadata and include the iop_remove role in the deploy-dev play so
`forge deploy-dev --remove-feature iop` parses and tears down IOP.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jeremylenz
jeremylenz force-pushed the iop-remove-feature-teardown branch from c101d50 to 4f9c57c Compare August 31, 2026 13:58
@jeremylenz

Copy link
Copy Markdown
Contributor Author

draft until #746 is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants