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 multi-user.target in wrong namespace #432

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

Comments

@thothonegan
Copy link

thothonegan commented Aug 18, 2024

Once the pod is started up, it monitors the pod till systemd starts up. However, it doesn't set a namespace - causing it to not detect the pod is started if we install into the namespace 'uyuni'.

Debug output: previous commands use the namespace 'uyuni' properly

1:27PM DBG shared/utils/exec.go:67 > Running: kubectl get -o jsonpath={.items[?(@.metadata.name=="uyuni")].status.readyReplicas} deploy -n uyuni
⠋ kubectl get -o jsonpath={.items[?(@.metadata.name=="uyuni")].status.readyReplicas} deploy -n uyuni
⠋ kubectl get -o jsonpath={.items[?(@.metadata.name=="uyuni")].status.readyReplicas} deploy -n uyuni
1:27PM DBG shared/utils/exec.go:67 > Running: kubectl get -o jsonpath={.items[?(@.metadata.name=="uyuni")].status.readyReplicas} deploy -n uyuni
1:27PM DBG shared/utils/exec.go:67 > Running: kubectl get pod -lapp=uyuni -A -o=jsonpath={.items[0].metadata.name}
1:27PM DBG shared/utils/exec.go:41 > Running: kubectl exec uyuni-55976f4bcb-5bdm9 -- systemctl is-active -q multi-user.target
⠋ kubectl exec uyuni-55976f4bcb-5bdm9 -- systemctl is-active -q multi-user.target
⠋ kubectl exec uyuni-55976f4bcb-5bdm9 -- systemctl is-active -q multi-user.target

[repeats]

If running the command manually (first the one its sending, second if i fix the namespace manually)

❯ kubectl exec uyuni-55976f4bcb-5bdm9 -- systemctl is-active -q multi-user.target
Error from server (NotFound): pods "uyuni-55976f4bcb-5bdm9" not found

❯ kubectl -n uyuni exec uyuni-55976f4bcb-5bdm9 -- systemctl is-active -q multi-user.target
Defaulted container "uyuni" out of: uyuni, init-var-cobbler (init), init-var-salt (init), init-var-pgsql (init), init-var-cache (init), init-var-log (init), init-srv-salt (init), init-srv-www (init), init-srv-tftpboot (init), init-srv-formulametadata (init), init-srv-pillar (init), init-srv-susemanager (init), init-srv-spacewalk (init), init-root (init), init-etc-apache2 (init), init-etc-rhn (init), init-etc-systemd-multi (init), init-etc-systemd-sockets (init), init-etc-salt (init), init-etc-tomcat (init), init-etc-cobbler (init), init-etc-sysconfig (init), init-etc-postfix (init), init-etc-sssd (init)

Workaround: kubectl config set-context --current --namespace=uyuni
prior to running the migration.


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

Hello. Thanks for trying it out and reporting issues. I know there are issues with migration to kubernetes and I am currently heavily refactoring it. This issue though may be addressed by PR #420

@cbosdo
Copy link
Contributor

cbosdo commented Sep 4, 2024

@rjpmestre Could you take a look?

@cbosdo cbosdo added bug Something isn't working Kubernetes Affects Kubernetes backend labels Sep 4, 2024
@rjpmestre
Copy link
Contributor

rjpmestre commented Sep 4, 2024

@cbosdo , @thothonegan yes, i can confirm this migration scenario is covered on #420

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

3 participants