Skip to content

Conversation

@notandy
Copy link
Contributor

@notandy notandy commented Dec 17, 2025

Should only be merged if all nodes are provisioned with the correct maintenance-profile.

this switches the decomissioning-controller to use the terminating state
of maintenance spec field to decomission the node. Also, the
maintenance-operator will take care of removing the finalizer - thus
removing the need to access nodes at all.

@notandy notandy requested a review from fwiesel December 17, 2025 22:06
this switches the decomissioning-controller to use the terminating state
of maintenance spec field to decomission the node. Also, the
maintenance-operator will take care of removing the finalizer - thus
removing the need to access nodes at all.
@notandy notandy force-pushed the decomission-maintenance-operator branch from 2f5551c to c732bd9 Compare December 17, 2025 22:09
@github-actions
Copy link

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1 0.00% (ø)
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller 49.81% (-0.41%) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/openstack 32.22% (+8.47%) 👍
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/utils 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/cobaltcore-dev/openstack-hypervisor-operator/api/v1/hypervisor_types.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/aggregates_controller.go 61.45% (-2.00%) 83 (-10) 51 (-8) 32 (-2) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/decomission_controller.go 27.59% (-3.58%) 58 (-19) 16 (-8) 42 (-11) 👎
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/hypervisor_controller.go 64.41% (ø) 59 38 21
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/onboarding_controller.go 55.04% (ø) 258 142 116
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/openstack/aggregates.go 80.00% (+80.00%) 10 (+10) 8 (+8) 2 (+2) 🌟
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/utils/consts.go 0.00% (ø) 0 0 0
github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/utils/lifecycle_enabled.go 0.00% (ø) 6 (+3) 0 6 (+3)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/decomission_controller_test.go
  • github.com/cobaltcore-dev/openstack-hypervisor-operator/internal/controller/suite_test.go

@fwiesel
Copy link
Contributor

fwiesel commented Dec 18, 2025

Also, the maintenance-operator will take care of removing the finalizer - thus removing the need to access nodes at all.

But you removed the finalizer completely. Maybe I am missing that part, but how do we ensure now that the service has been removed, and the resources cleared out of placement?
In my mind, we still need a finalizer for that (just on the hypervisor). I've created #209, which doesn't go as far as your change and should still work without maintenance controller,, but incorporates basing it on the hypervisor crd, and moving out the aggregate functions to the openstack module.

I pulled out the refactoring of the aggregate functions into #211.

@notandy
Copy link
Contributor Author

notandy commented Dec 18, 2025

Also, the maintenance-operator will take care of removing the finalizer - thus removing the need to access nodes at all.

But you removed the finalizer completely. Maybe I am missing that part, but how do we ensure now that the service has been removed, and the resources cleared out of placement? In my mind, we still need a finalizer for that (just on the hypervisor). I've created #209, which doesn't go as far as your change and should still work without maintenance controller,, but incorporates basing it on the hypervisor crd, and moving out the aggregate functions to the openstack module.

I pulled out the refactoring of the aggregate functions into #211.

the finalizer is removed by the maintenance-operator, see here:
https://github.wdf.sap.corp/cc/kube-secrets/commit/5b611fc386d216b2315a55b9bca12699ebb814e1#diff-868d82690c895c7a54eb355b7f76a05f071e08d5ffa43409559971f3e62288f7R223-R225

@fwiesel
Copy link
Contributor

fwiesel commented Dec 18, 2025

Yes, so the finalizer is removed when the host is empty, not after the decomissioning controller has done its job yet.

@notandy
Copy link
Contributor Author

notandy commented Dec 18, 2025

Yes, so the finalizer is removed when the host is empty, not after the decomissioning controller has done its job yet.

no, the host is empty if the decomission is done in case of maintenance = termination

@notandy notandy marked this pull request as draft December 18, 2025 15:45
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.

3 participants