jx3-gitops-repositories / jx3-minikube

Jenkins X 3.x GitOps repository using Minikube to create a kubernetes cluster and vault for secret management
Apache License 2.0
13 stars 18 forks source link

"jx admin operator" stuck and then failed #1

Open pourgholi opened 4 years ago

pourgholi commented 4 years ago

Hi, I followed the steps here: https://jenkins-x.io/docs/v3/guides/operator/ I did also the required steps before.

Minikube Version is:

srsh77@hamid:~$ minikube version 
minikube version: v1.13.1
commit: 1fd1f67f338cbab4b3e5a6e4c71c551f522ca138-dirty
srsh77@hamid:~$

OS version is:

Ubuntu version is:
srsh77@hamid:~$ uname -a
Linux hamid 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
srsh77@hamid:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal
srsh77@hamid:~$

As mentioned i follow the steps (and did also the required steps before): minikube start --cpus 4 --memory 8048 --disk-size=100g --addons=ingress --vm=true

srsh77@hamid:~/jx-test/kubemachine-jx-test$ minikube start --cpus 4 --memory 8048 --disk-size=100g --addons=ingress --vm=true
😄  minikube v1.13.1 on Ubuntu 20.04
✨  Automatically selected the virtualbox driver
💿  Downloading VM boot image ...
    > minikube-v1.13.1.iso.sha256: 65 B / 65 B [-------------] 100.00% ? p/s 0s
    > minikube-v1.13.1.iso: 173.91 MiB / 173.91 MiB [] 100.00% 4.40 MiB p/s 40s
👍  Starting control plane node minikube in cluster minikube
💾  Downloading Kubernetes v1.19.2 preload ...
    > preloaded-images-k8s-v6-v1.19.2-docker-overlay2-amd64.tar.lz4: 486.36 MiB
🔥  Creating virtualbox VM (CPUs=4, Memory=8048MB, Disk=102400MB) ...
🐳  Preparing Kubernetes v1.19.2 on Docker 19.03.12 ...
🔎  Verifying Kubernetes components...
🔎  Verifying ingress addon...
🌟  Enabled addons: default-storageclass, ingress, storage-provisioner

❗  /usr/local/bin/kubectl is version 1.17.2, which may have incompatibilites with Kubernetes 1.19.2.
💡  Want kubectl v1.19.2? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" by default

And then jx admin operator

srsh77@hamid:~/jx-test/kubemachine-jx-test$ jx admin operator
git clone URL is https://github.com/pourgholi/kubemachine-jx-test
now verifying we have a valid git username and token so that we can clone the git repository inside kubernetes...
? Enter Bot Git username the Kubernetes operator will use to clone the environment git repository hamid.pourgholi@gmail.com
To be able to create a repository on https://github.com we need an API Token
Please click this URL and generate a token 
https://github.com/settings/tokens/new?scopes=repo,read:user,read:org,user:email,write:repo_hook,delete_repo,write:packages,read:packages,write:discussion,workflow

Then COPY the token and enter it below:

? Enter Bot Git token the Kubernetes operator will use to clone the environment git repository [? for help] ****************************************
git username is hamid.pourgholi@gmail.com for URL https://github.com/pourgholi/kubemachine-jx-test and we have a valid password
running command:

/home/srsh77/.jx3/plugins/bin/helm-3.2.4 upgrade --install \
    --set url=https://github.com/pourgholi/kubemachine-jx-test \
    --set username=hamid.pourgholi@gmail.com \
    --set password=**** --namespace jx --create-namespace jxgo jx3/jx-git-operator

switched to namespace jx so that you can start to create or import projects into Jenkins X: https://jenkins-x.io/docs/v3/create-project/
waiting for the Git Operator to be ready in namespace jx...
pod jx-git-operator-6457c9fdb-wmgbj has status Pending
pod jx-git-operator-6457c9fdb-wmgbj has status Ready
the Git Operator is running in pod jx-git-operator-6457c9fdb-wmgbj

waiting for boot Job pod with selector app=jx-boot in namespace jx...
waiting for Job jx-boot-eeff3bfcd617ced3b85b1ba to complete...
boot Job jx-boot-eeff3bfcd617ced3b85b1ba has Failed

In paralell I kubectl logs -f ed the corresponding pod jx-boot-eeff3bfcd617ced3b85b1ba-9qg99 and the out put was:

Already up to date.
about to run: git rev-parse HEAD in dir /tmp/jx-git-operator-764824364/jx-boot
eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
repository jx-boot has latest commit sha eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
found Job jx-boot-eeff3bfcd617ced3b85b1ba
polling repository jx-boot in namespace jx with git URL https://hamid.pourgholi%40gmail.com:<<my_access_token>>@github.com/pourgholi/kubemachine-jx-test
about to run: git pull origin master in dir /tmp/jx-git-operator-764824364/jx-boot
From https://github.com/pourgholi/kubemachine-jx-test
 * branch            master     -> FETCH_HEAD
Already up to date.
about to run: git rev-parse HEAD in dir /tmp/jx-git-operator-764824364/jx-boot
eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
repository jx-boot has latest commit sha eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
found Job jx-boot-eeff3bfcd617ced3b85b1ba
polling repository jx-boot in namespace jx with git URL https://hamid.pourgholi%40gmail.com:<<my_access_token>>@github.com/pourgholi/kubemachine-jx-test
about to run: git pull origin master in dir /tmp/jx-git-operator-764824364/jx-boot
From https://github.com/pourgholi/kubemachine-jx-test
 * branch            master     -> FETCH_HEAD
Already up to date.
about to run: git rev-parse HEAD in dir /tmp/jx-git-operator-764824364/jx-boot
eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
repository jx-boot has latest commit sha eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
found Job jx-boot-eeff3bfcd617ced3b85b1ba
polling repository jx-boot in namespace jx with git URL https://hamid.pourgholi%40gmail.com:<<my_access_token>>@github.com/pourgholi/kubemachine-jx-test
about to run: git pull origin master in dir /tmp/jx-git-operator-764824364/jx-boot
From https://github.com/pourgholi/kubemachine-jx-test
 * branch            master     -> FETCH_HEAD
Already up to date.
about to run: git rev-parse HEAD in dir /tmp/jx-git-operator-764824364/jx-boot
eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
repository jx-boot has latest commit sha eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
found Job jx-boot-eeff3bfcd617ced3b85b1ba
polling repository jx-boot in namespace jx with git URL https://hamid.pourgholi%40gmail.com:<<my_access_token>>@github.com/pourgholi/kubemachine-jx-test
about to run: git pull origin master in dir /tmp/jx-git-operator-764824364/jx-boot
From https://github.com/pourgholi/kubemachine-jx-test
 * branch            master     -> FETCH_HEAD
Already up to date.
about to run: git rev-parse HEAD in dir /tmp/jx-git-operator-764824364/jx-boot
eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
repository jx-boot has latest commit sha eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
found Job jx-boot-eeff3bfcd617ced3b85b1ba
^C
srsh77@hamid:~$ k get pods
NAME                                    READY   STATUS    RESTARTS   AGE
jx-boot-eeff3bfcd617ced3b85b1ba-cxnpf   0/1     Error     0          77s
jx-boot-eeff3bfcd617ced3b85b1ba-mthhn   0/1     Error     0          117s
jx-boot-eeff3bfcd617ced3b85b1ba-s7ffm   0/1     Error     0          2m17s
jx-boot-eeff3bfcd617ced3b85b1ba-tfg95   0/1     Error     0          9m46s
jx-boot-eeff3bfcd617ced3b85b1ba-v8zk4   0/1     Error     0          2m27s
jx-git-operator-6457c9fdb-wmgbj         1/1     Running   0          14m
srsh77@hamid:~$

as we see the following message repeats

 polling repository jx-boot in namespace jx with git URL https://hamid.pourgholi%40gmail.com:<<my_access_token>>@github.com/pourgholi/kubemachine-jx-test
about to run: git pull origin master in dir /tmp/jx-git-operator-764824364/jx-boot
From https://github.com/pourgholi/kubemachine-jx-test
 * branch            master     -> FETCH_HEAD
Already up to date.
about to run: git rev-parse HEAD in dir /tmp/jx-git-operator-764824364/jx-boot
eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
repository jx-boot has latest commit sha eeff3bfcd617ced3b85b1ba6a5b36f5e7b41d693
found Job jx-boot-eeff3bfcd617ced3b85b1ba

Is this issue known ?

PaulRepo commented 2 years ago

can you check the log of one of the jx boot pod ? Do you also get the same error as below ?

kubectl get po -n jx-git-operator

NAME                                                 READY   STATUS       RESTARTS   AGE
jx-boot-fd510dbd-a84e-4b48-b597-8c67184ca3aa-k6dj8   0/1     Init:Error   0          15s
jx-boot-fd510dbd-a84e-4b48-b597-8c67184ca3aa-vqp42   0/1     Init:Error   0          25s
jx-boot-fd510dbd-a84e-4b48-b597-8c67184ca3aa-wndpz   0/1     Init:Error   0          2m17s
jx-git-operator-78f4454fbf-9vqpb                     1/1     Running      0          3m11s

kubectl logs -f jx-boot-fd510dbd-a84e-4b48-b597-8c67184ca3aa-k6dj8 -c git-clone

WARNING: could not default pipeline user/email from requirements as file does not exist: jx-requirements.yml
setup git user  email jenkins-x@googlegroups.com
generated Git credentials file: /workspace/xdg_config/git/credentials with username: robo-user email: 
no custom git initialisation scripts
ran git init commands: echo 'no custom git initialisation scripts'
error: failed to git clone URL https://github.com/my-org/jx3-minikube.git to dir source: failed to clone repository https://github.com/my-org/jx3-minikube.git to directory: source: failed to run 'git clone https://github.com/my-org/jx3-minikube.git source' command in directory '.', output: 'Cloning into 'source'...
fatal: unable to access 'https://github.com/my-org/jx3-minikube.git/': Could not resolve host: github.com'