Skip to content
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

Cannot create clusters from an existing network #466

Open
nguyenhuukhoi opened this issue Dec 10, 2024 · 4 comments
Open

Cannot create clusters from an existing network #466

nguyenhuukhoi opened this issue Dec 10, 2024 · 4 comments

Comments

@nguyenhuukhoi
Copy link
Contributor

Hello. I am using magnum_cluster_api 0.24.0 and openstack 2024.1.

I cannot create cluster and this is error from capi:

"Failed to apply patch with uid "cc66bd0c-4baf-4786-9976-b0813685c861": error applying json patch (RFC6902): [{"op":"add","path":"/spec/template/spec/network/name","value":"privatenetwork"}]: add operation does not apply: doc is missing path: "/spec/template/spec/network/name": missing value" controller="topology/cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="magnum-system/kube-4nicv" namespace="magnum-system" name="kube-4nicv" reconcileID="522df2a3-04ad-451e-8dd8-8f269f33de97" patch="auditLog" patch="openidConnect" patch="bootVolume" patch="ubuntu" patch="flatcar" patch="clusterConfig" patch="controlPlaneAvailabilityZones" patch="newNetworkConfig" patch="existingFixedNetworkNameConfig" uid="cc66bd0c-4baf-4786-9976-b0813685c861"

Could give me some advices for this bug? Thank you.

@nguyenhuukhoi
Copy link
Contributor Author

If we choose existed network then we cannot create cluster but we can do it by let system create the fixed network.

@nguyenhuukhoi nguyenhuukhoi changed the title missing path: "/spec/template/spec/network/name" Cannot patch existingFixedNetworkNameConfig Dec 10, 2024
@nguyenhuukhoi
Copy link
Contributor Author

After correct patch existingFixedNetworkNameConfig. I encounter this error:

reconcile_state.go:1342] "Failed to create object" err="OpenStackCluster.infrastructure.cluster.x-k8s.io "kube-ahqap-cm5qf" is invalid: [spec.managedSubnets[0].cidr: Required value, : Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]" controller="topology/cluster" controllerGroup="cluster.x-k8s.io" controllerKind="Cluster" Cluster="magnum-system/kube-ahqap" namespace="magnum-system" name="kube-ahqap" reconcileID="224fea6a-6cf2-4885-bca1-e62e3e2f7f72" OpenStackCluster="magnum-system/kube-ahqap-cm5qf" OpenStackCluster="magnum-system/kube-ahqap-cm5qf (edited)

NEW

@nguyenhuukhoi nguyenhuukhoi changed the title Cannot patch existingFixedNetworkNameConfig Cannot create clusters from an existing network Dec 11, 2024
@gabriel-samfira
Copy link

I ran into the same issue. Proposed a PR (work in progress) here:

@nguyenhuukhoi
Copy link
Contributor Author

https://github.com/vexxhost/magnum-cluster-api/pull/462/files

Here is my patch to fix this problem. But not approved

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 a pull request may close this issue.

2 participants