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: Waiting for blank pod name to pull image #431

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

Comments

@thothonegan
Copy link

When running helm, the pod name was not available instantly after helm ran. This caused the migration to monitor the pod named ''.

Workaround was to suspend the process in the middle of Helm after it outputs the digest, giving it time to resolve before continuing - the pod name then gets picked up properly.

Debug output:

1:20PM DBG shared/utils/exec.go:50 > Running: helm upgrade -n uyuni --create-namespace uyuni oci://registry.opensuse.org/uyuni/server-helm --install --set ingress=nginx -f values.yaml --set images.server=registry.opensuse.org/uyuni/server:latest --set pullPolicy=Always --set fqdn=uyuni.i.hackerguild.com --set migration.ssh.agentSocket=/tmp/ssh-XXXXXXKrz1ro/agent.255003 --set migration.ssh.configPath= --set migration.ssh.knownHostsPath=/root/.ssh/known_hosts --set migration.dataPath=/tmp/mgradm-2307853567
Release "uyuni" does not exist. Installing it now.
Pulled: registry.opensuse.org/uyuni/server-helm:2024.7.0
Digest: sha256:901e88e997a109142de6f5b88966772570dd9ca0feb9ab1cc7d7b4781f98c174
W0818 13:20:59.982709  307290 warnings.go:70] unknown field "labels"
NAME: uyuni
LAST DEPLOYED: Sun Aug 18 13:20:57 2024
NAMESPACE: uyuni
STATUS: deployed
REVISION: 1
TEST SUITE: None
⠋ kubectl get pod -o jsonpath={.items[?(@.metadata.labels.app=="uyuni")].metadata.name} -n uyuni
1:21PM INF shared/kubernetes/utils.go:74 > Waiting for image of  pod in uyuni namespace to be pulled
1:21PM DBG shared/utils/exec.go:67 > Running: kubectl get event -o jsonpath={range .items[?(@.reason=="Failed")]}{.message}{"\n"}{end} --field-selector involvedObject.name= -n uyuni
⠋ kubectl get event -o jsonpath={range .items[?(@.reason=="Failed")]}{.message}{"\n"}{end} --field-selector involvedObject.name= -n uyuni

[repeats as the pod '' never exists]

Expected: If it gets a pod name of '', retry to get the pod name until you get a valid pod name - then continue.


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

This looks like something I fixed before my vacation but is not merged in main yet.

@cbosdo cbosdo added bug Something isn't working Kubernetes Affects Kubernetes backend labels Sep 4, 2024
@cbosdo cbosdo mentioned this issue Nov 13, 2024
3 tasks
@cbosdo cbosdo self-assigned this Nov 13, 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