Skip to content

"status.bastionSecurityGroup.rules: Required value" updating cluster #1999

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdbooth opened this issue Apr 4, 2024 · 2 comments · Fixed by #2000
Closed

"status.bastionSecurityGroup.rules: Required value" updating cluster #1999

mdbooth opened this issue Apr 4, 2024 · 2 comments · Fixed by #2000
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mdbooth
Copy link
Contributor

mdbooth commented Apr 4, 2024

/kind bug

From @lentzi90

❯ kubectl diff -k CAPO/test-cluster
The OpenStackCluster "lennart-test" is invalid: 
* status.bastionSecurityGroup.rules: Required value
* status.workerSecurityGroup.rules: Required value
* status.controlPlaneSecurityGroup.rules: Required value

when doing the following:

* Init with CAPO v0.9
* Create a v1alpha7 cluster
* Upgrade CAPO to v0.10.0-alpha.0
* Try to update the OpenStackCluster (e.g. add an IP to the allowedCidrs)
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 4, 2024
@mdbooth
Copy link
Contributor Author

mdbooth commented Apr 4, 2024

It looks like you're editing the cluster as v1alpha7, which is fine and is intended to work, but is important context.

I think this is complaining that the rules are required in v1alpha7, not v1beta1. We removed rules in v1beta1. I think what's happening here is that:

  • it's correctly up-converted
  • the controller modifies the status and persists the object as v1beta1
  • the client requests v1alpha7 to show the result
  • status was modified during up-conversion, so is not restored, only converted
  • without restoration the rules are lost in v1alpha7

This would explain why:

  • You get the warning about a field which has been removed
  • The change is persisted anyway

@mdbooth
Copy link
Contributor Author

mdbooth commented Apr 4, 2024

I think the fix here is to make the field option in versions prior to v1beta1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Archived in project
2 participants