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

Migrating from RPM to Kubernetes: Waits for pod named 'uyuni' when pod has generated name #433

Open
thothonegan opened this issue Aug 18, 2024 · 1 comment
Labels
bug Something isn't working Kubernetes Affects Kubernetes backend

Comments

@thothonegan
Copy link

Once the pod has started up, and systemd is considered started, it looks like it tries to locate the node the pod is running on.
However, the search it does is via the pod name 'uyuni', while the true pod was named uyuni-684b544d99-dnqhk by the deployment.

This causes it to fail out, due to unable to locate the pod.

Debug output:

2:05PM DBG shared/utils/exec.go:67 > Running: kubectl get -o jsonpath={.items[?(@.metadata.name=="uyuni")].status.readyReplicas} deploy -n uyuni
⠋ kubectl get pod -lapp=uyuni -A -o=jsonpath={.items[0].metadata.name}
⠋ kubectl exec uyuni-684b544d99-dnqhk -- systemctl is-active -q multi-user.target
⠋ kubectl get pod uyuni -o jsonpath={.items[*].spec.nodeName}
2:05PM DBG shared/utils/exec.go:67 > Running: kubectl get pod uyuni -o jsonpath={.items[*].spec.nodeName}
⠋ kubectl get pod uyuni -o jsonpath={.items[*].spec.nodeName}
⠋ kubectl get pod uyuni -o jsonpath={.items[*].spec.nodeName}
⠋ kubectl get pod uyuni -o jsonpath={.items[*].spec.nodeName}

[repeats]

Error: cannot find node running uyuni: cannot find node name matching filter uyuni

Manually ran:

> kubectl get pod uyuni -o jsonpath={.items[*].spec.nodeName}
Error from server (NotFound): pods "uyuni" not found

If i switch to a label selector manually, it works properly

> kubectl get pod -l app=uyuni -o jsonpath={.items[*].spec.nodeName}
sesian-worker-2726fd44-rjwlf

Environment:

  • Harvester cluster with 3 nodes using longhorn
  • RKE2 cluster on top of openSUSE MicroOS
  • Manually created volumes to have some use different storage classes

Migration command:
mgradm migrate kubernetes uyuni.i.hackerguild.com --helm-uyuni-namespace uyuni --helm-uyuni-values values.yaml --logLevel debug

values.yaml

storageClass: "-"
matchPvByLabel: true
ingress: nginx
ingressSslAnnotations:
    cert-manager.io/cluster-issuer: letsencrypt-digitalocean
@cbosdo
Copy link
Contributor

cbosdo commented Sep 4, 2024

I can't remember facing this during my recent migration tests.

@cbosdo cbosdo added Kubernetes Affects Kubernetes backend bug Something isn't working labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Kubernetes Affects Kubernetes backend
Projects
None yet
Development

No branches or pull requests

2 participants