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

Error on recreating/restore #731

Open
flyersa opened this issue Apr 15, 2024 · 3 comments
Open

Error on recreating/restore #731

flyersa opened this issue Apr 15, 2024 · 3 comments
Labels

Comments

@flyersa
Copy link

flyersa commented Apr 15, 2024

Hi,

i lost 2 nodes on a cluster due hardware failure and wanted to renewe them by running cluster_create, before i pulled to newest version with git pull.

well this happens and i have no clue:

ubuntu@capi-mgmtcluster:~ [0]$ create_cluster.sh sxpone
Switched to context "kind-kind".
> Cluster default already exists in namespace default
Context "kind-kind" modified.
No HTTP_PROXY set, nothing to do, exiting.
No HTTP_PROXY set, nothing to do, exiting.
#Reuse AppCred capi-sxpone-appcred 508eb984bbe34d0b99e3f2fc5235070c
Waiting for image ubuntu-capi-image-v1.26.4 to become active: fb401900-d88d-43d0-a541-c10b582ef709 active
# show used variables for clustertemplate /home/ubuntu/sxpone/cluster-template.yaml
Adding server groups bab4cd40-d1be-4535-8dea-7f29e073b311 and 40a60763-09c5-4a26-b05b-107936fa0760 to /home/ubuntu/sxpone/clusterctl.yaml
Error: no resource matches strategic merge patch "OpenStackMachineTemplate.v1alpha7.infrastructure.cluster.x-k8s.io/${PREFIX}-${CLUSTER_NAME}-control-plane-${CONTROL_PLANE_MACHINE_GEN}.[noNs]": no matches for Id OpenStackMachineTemplate.v1alpha7.infrastructure.cluster.x-k8s.io/${PREFIX}-${CLUSTER_NAME}-control-plane-${CONTROL_PLANE_MACHINE_GEN}.[noNs]; failed to find unique target for patch OpenStackMachineTemplate.v1alpha7.infrastructure.cluster.x-k8s.io/${PREFIX}-${CLUSTER_NAME}-control-plane-${CONTROL_PLANE_MACHINE_GEN}.[noNs]
ERROR: Pass input YAML via stdin (or specify in patch header)
Usage: kustpatch.sh kust1.yaml [kust2.yaml [...]] < base.yaml > result.yaml
@chess-knight
Copy link
Member

Hi @flyersa,
At first glance it looks like, you are using the old CAPO controller version; therefore, your resources are not v1alpha7 yet.
Can you share some more details?
E.g.:

  1. git version(tag, branch, commit) before and after pull
  2. CAPI/CAPO version (e.g. clusterctl upgrade plan)
  3. was something modified, or default values were used

Also, IMO CAPI and CAPO should ensure consistency between states in k8s and OpenStack and should create deleted machines automatically. So, please check also logs of CAPI/CAPO controllers and the status of k8s resources(e.g. kubectl describe cluster sxpone or clusterctl describe cluster sxpone)

@flyersa
Copy link
Author

flyersa commented Apr 29, 2024

sorry were along time on business trips recently. I will check, maybe i forgot some steps ;)

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment, or this will be closed in 60 days.

@github-actions github-actions bot added the stale label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants