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

launchpad fails to get mirantis repos set up on target nodes #87

Open
mkarg75 opened this issue Nov 28, 2022 · 2 comments
Open

launchpad fails to get mirantis repos set up on target nodes #87

mkarg75 opened this issue Nov 28, 2022 · 2 comments

Comments

@mkarg75
Copy link

mkarg75 commented Nov 28, 2022

I have set up a couple of hosts on a vsphere environment in order to get MKE installed. The hosts fulfil all the basic requirements but once I start launchpad with this configuration file:

apiVersion: launchpad.mirantis.com/mke/v1.3
kind: mke
metadata:
  name: my-mke-cluster
spec:
  hosts:
  - ssh:
      address: 172.31.60.113
      user: mkarg
      port: 22
      keyPath: ~/.ssh/id_rsa
    role: manager
  - ssh:
      address: 172.31.60.123
      user: mkarg
      port: 22
      keyPath: ~/.ssh/id_rsa
    role: worker
  mke:
    version: 3.6
    adminUsername: admin
    adminPassword: password
  mcr:
    version: 20.10.0
  cluster:
    prune: false

it gets to running installer and gets stuck there. On the target hosts we can see this:

  13576 pts/1    Ss+    0:00          \_ bash /home/mkarg/installerLinux529712060
  13876 pts/1    S+     0:00              \_ bash /home/mkarg/installerLinux529712060
  14007 pts/1    S+     0:00                  \_ sudo -E sh -c add-apt-repository 'deb [arch=amd64] https://repos.mirantis.com/ubuntu jammy stable' >/dev/null
  14008 pts/2    Ss     0:00                      \_ sudo -E sh -c add-apt-repository 'deb [arch=amd64] https://repos.mirantis.com/ubuntu jammy stable' >/dev/null
  14009 pts/2    S+     0:00                          \_ sh -c add-apt-repository 'deb [arch=amd64] https://repos.mirantis.com/ubuntu jammy stable' >/dev/null
  14010 pts/2    S+     0:00                              \_ /usr/bin/python3 /usr/bin/add-apt-repository deb [arch=amd64] https://repos.mirantis.com/ubuntu jammy stable

Logs on the launchpad node reveal this:

INFO [ssh] 172.31.60.123:22: running installer
DEBU [ssh] 172.31.60.123:22: executing `DOCKER_URL=https://repos.mirantis.com CHANNEL=stable VERSION=20.10.0 bash /home/mkarg/installerLinux1128266021`
DEBU [ssh] 172.31.60.113:22: + sudo -E sh -c 'apt-get update -qq'
DEBU [ssh] 172.31.60.123:22: + sudo -E sh -c 'apt-get update -qq'
DEBU [ssh] 172.31.60.113:22: + sudo -E sh -c 'apt-get install -y -qq apt-transport-https ca-certificates curl software-properties-common >/dev/null'
DEBU [ssh] 172.31.60.113:22: curl: (22) The requested URL returned error: 404
DEBU [ssh] 172.31.60.113:22: + sudo -E sh -c 'curl -fsSL https://repos.mirantis.com/ubuntu/gpg | apt-key add -qq - >/dev/null'
DEBU [ssh] 172.31.60.123:22: + sudo -E sh -c 'apt-get install -y -qq apt-transport-https ca-certificates curl software-properties-common >/dev/null'
DEBU [ssh] 172.31.60.113:22: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
DEBU [ssh] 172.31.60.113:22: + sudo -E sh -c 'add-apt-repository '\''deb [arch=amd64] https://repos.mirantis.com/ubuntu jammy stable'\'' >/dev/null'
DEBU [ssh] 172.31.60.123:22: curl: (22) The requested URL returned error: 404
DEBU [ssh] 172.31.60.123:22: + sudo -E sh -c 'curl -fsSL https://repos.mirantis.com/ubuntu/gpg | apt-key add -qq - >/dev/null'
DEBU [ssh] 172.31.60.123:22: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
DEBU [ssh] 172.31.60.123:22: + sudo -E sh -c 'add-apt-repository '\''deb [arch=amd64] https://repos.mirantis.com/ubuntu jammy stable'\'' >/dev/null'

I tried to download the repos manually and that works fine on the hosts, so it's very likely not a connectivity issue.
Any help is greatly appreciated!
Thanks.

@kke
Copy link
Contributor

kke commented Nov 29, 2022

Ubuntu 22? Seems it has a version of add-apt-repository that warns that it is deprecated and requires that you press enter. Launchpad gets stuck in that. (The command comes from MCR install script, adding -y to the apt-add-repository command line in the script would fix it)

As a workaround, you could do something like:

curl https://get.mirantis.com/ | sed 's/add-apt-repository /add-apt-repository -y /' > installer.bash

And then setting that as the install script in launchpad config:

spec:
  mcr:
    installURLLinux: file://./installer.bash

@mkarg75
Copy link
Author

mkarg75 commented Nov 29, 2022

Thanks a ton, I'll give that a try right away!

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

No branches or pull requests

2 participants