[root@k8s-master-01 ~]# kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
2020-04-27T02:29:04Z INFO : shell-operator v1.0.0-beta.5
2020-04-27T02:29:04Z INFO : Use temporary dir: /tmp/shell-operator
2020-04-27T02:29:04Z INFO : HTTP SERVER Listening on 0.0.0.0:9115
2020-04-27T02:29:04Z INFO : Initialize hooks manager ...
2020-04-27T02:29:04Z INFO : Search and load hooks ...
2020-04-27T02:29:04Z INFO : Load hook config from '/hooks/kubesphere/installRunner.py'
2020-04-27T02:29:05Z INFO : Initializing schedule manager ...
2020-04-27T02:29:05Z INFO : KUBE Init Kubernetes client
2020-04-27T02:29:05Z INFO : KUBE-INIT Kubernetes client is configured successfully
2020-04-27T02:29:05Z INFO : MAIN: run main loop
2020-04-27T02:29:05Z INFO : MAIN: add onStartup tasks
2020-04-27T02:29:05Z INFO : QUEUE add all HookRun@OnStartup
2020-04-27T02:29:05Z INFO : Running schedule manager ...
2020-04-27T02:29:05Z INFO : MSTOR Create new metric shell_operator_live_ticks
2020-04-27T02:29:05Z INFO : MSTOR Create new metric shell_operator_tasks_queue_length
2020-04-27T02:29:05Z INFO : GVR for kind 'ConfigMap' is /v1, Resource=configmaps
2020-04-27T02:29:05Z INFO : EVENT Kube event '8a9c9d8f-a130-4480-9e60-7888abbd5f7a'
2020-04-27T02:29:05Z INFO : QUEUE add TASK_HOOK_RUN@KUBE_EVENTS kubesphere/installRunner.py
2020-04-27T02:29:08Z INFO : TASK_RUN HookRun@KUBE_EVENTS kubesphere/installRunner.py
2020-04-27T02:29:08Z INFO : Running hook 'kubesphere/installRunner.py' binding 'KUBE_EVENTS' ...
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : include_tasks] ************************************************
skipping: [localhost]
TASK [download : Download items] ***********************************************
skipping: [localhost]
TASK [download : Sync container] ***********************************************
skipping: [localhost]
TASK [kubesphere-defaults : Configure defaults] ********************************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [preinstall : check k8s version] ******************************************
changed: [localhost]
TASK [preinstall : init k8s version] *******************************************
ok: [localhost]
TASK [preinstall : Stop if kuernetes version is nonsupport] ********************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [preinstall : check helm status] ******************************************
changed: [localhost]
TASK [preinstall : Stop if Helm is not available] ******************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [preinstall : check storage class] ****************************************
changed: [localhost]
TASK [preinstall : Stop if StorageClass was not found] *************************
skipping: [localhost]
TASK [preinstall : check default storage class] ********************************
changed: [localhost]
TASK [preinstall : Stop if defaultStorageClass was not found] ******************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
PLAY RECAP *********************************************************************
localhost : ok=9 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : include_tasks] ************************************************
skipping: [localhost]
TASK [download : Download items] ***********************************************
skipping: [localhost]
TASK [download : Sync container] ***********************************************
skipping: [localhost]
TASK [kubesphere-defaults : Configure defaults] ********************************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [metrics-server : Metrics-Server | Checking old installation files] *******
skipping: [localhost]
TASK [metrics-server : Metrics-Server | deleting old prometheus-operator] ******
skipping: [localhost]
TASK [metrics-server : Metrics-Server | deleting old metrics-server files] *****
skipping: [localhost] => (item=metrics-server)
TASK [metrics-server : Metrics-Server | Getting metrics-server installation files] ***
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Creating manifests] ********************
skipping: [localhost] => (item={u'type': u'config', u'name': u'values', u'file': u'values.yaml'})
TASK [metrics-server : Metrics-Server | Check Metrics-Server] ******************
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Installing metrics-server] *************
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Installing metrics-server retry] *******
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Waitting for v1beta1.metrics.k8s.io ready] ***
skipping: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : include_tasks] ************************************************
skipping: [localhost]
TASK [download : Download items] ***********************************************
skipping: [localhost]
TASK [download : Sync container] ***********************************************
skipping: [localhost]
TASK [kubesphere-defaults : Configure defaults] ********************************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [common : Kubesphere | Check kube-node-lease namespace] *******************
^C
[root@k8s-master-01 ~]# kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
storageclass.storage.k8s.io/openebs-hostpath patched (no change)
[root@k8s-master-01 ~]# kubectl get sc
NAME PROVISIONER AGE
openebs-device openebs.io/local 16h
openebs-hostpath (default) openebs.io/local 16h
openebs-jiva-default openebs.io/provisioner-iscsi 16h
openebs-snapshot-promoter volumesnapshot.external-storage.k8s.io/snapshot-promoter 16h
[root@k8s-master-01 ~]# kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
storageclass.storage.k8s.io/openebs-hostpath patched (no change)
[root@k8s-master-01 ~]# kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
2020-04-27T02:29:04Z INFO : shell-operator v1.0.0-beta.5
2020-04-27T02:29:04Z INFO : Use temporary dir: /tmp/shell-operator
2020-04-27T02:29:04Z INFO : HTTP SERVER Listening on 0.0.0.0:9115
2020-04-27T02:29:04Z INFO : Initialize hooks manager ...
2020-04-27T02:29:04Z INFO : Search and load hooks ...
2020-04-27T02:29:04Z INFO : Load hook config from '/hooks/kubesphere/installRunner.py'
2020-04-27T02:29:05Z INFO : Initializing schedule manager ...
2020-04-27T02:29:05Z INFO : KUBE Init Kubernetes client
2020-04-27T02:29:05Z INFO : KUBE-INIT Kubernetes client is configured successfully
2020-04-27T02:29:05Z INFO : MAIN: run main loop
2020-04-27T02:29:05Z INFO : MAIN: add onStartup tasks
2020-04-27T02:29:05Z INFO : QUEUE add all HookRun@OnStartup
2020-04-27T02:29:05Z INFO : Running schedule manager ...
2020-04-27T02:29:05Z INFO : MSTOR Create new metric shell_operator_live_ticks
2020-04-27T02:29:05Z INFO : MSTOR Create new metric shell_operator_tasks_queue_length
2020-04-27T02:29:05Z INFO : GVR for kind 'ConfigMap' is /v1, Resource=configmaps
2020-04-27T02:29:05Z INFO : EVENT Kube event '8a9c9d8f-a130-4480-9e60-7888abbd5f7a'
2020-04-27T02:29:05Z INFO : QUEUE add TASK_HOOK_RUN@KUBE_EVENTS kubesphere/installRunner.py
2020-04-27T02:29:08Z INFO : TASK_RUN HookRun@KUBE_EVENTS kubesphere/installRunner.py
2020-04-27T02:29:08Z INFO : Running hook 'kubesphere/installRunner.py' binding 'KUBE_EVENTS' ...
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : include_tasks] ************************************************
skipping: [localhost]
TASK [download : Download items] ***********************************************
skipping: [localhost]
TASK [download : Sync container] ***********************************************
skipping: [localhost]
TASK [kubesphere-defaults : Configure defaults] ********************************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [preinstall : check k8s version] ******************************************
changed: [localhost]
TASK [preinstall : init k8s version] *******************************************
ok: [localhost]
TASK [preinstall : Stop if kuernetes version is nonsupport] ********************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [preinstall : check helm status] ******************************************
changed: [localhost]
TASK [preinstall : Stop if Helm is not available] ******************************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [preinstall : check storage class] ****************************************
changed: [localhost]
TASK [preinstall : Stop if StorageClass was not found] *************************
skipping: [localhost]
TASK [preinstall : check default storage class] ********************************
changed: [localhost]
TASK [preinstall : Stop if defaultStorageClass was not found] ******************
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
PLAY RECAP *********************************************************************
localhost : ok=9 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : include_tasks] ************************************************
skipping: [localhost]
TASK [download : Download items] ***********************************************
skipping: [localhost]
TASK [download : Sync container] ***********************************************
skipping: [localhost]
TASK [kubesphere-defaults : Configure defaults] ********************************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [metrics-server : Metrics-Server | Checking old installation files] *******
skipping: [localhost]
TASK [metrics-server : Metrics-Server | deleting old prometheus-operator] ******
skipping: [localhost]
TASK [metrics-server : Metrics-Server | deleting old metrics-server files] *****
skipping: [localhost] => (item=metrics-server)
TASK [metrics-server : Metrics-Server | Getting metrics-server installation files] ***
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Creating manifests] ********************
skipping: [localhost] => (item={u'type': u'config', u'name': u'values', u'file': u'values.yaml'})
TASK [metrics-server : Metrics-Server | Check Metrics-Server] ******************
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Installing metrics-server] *************
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Installing metrics-server retry] *******
skipping: [localhost]
TASK [metrics-server : Metrics-Server | Waitting for v1beta1.metrics.k8s.io ready] ***
skipping: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
PLAY [localhost] ***************************************************************
TASK [download : include_tasks] ************************************************
skipping: [localhost]
TASK [download : Download items] ***********************************************
skipping: [localhost]
TASK [download : Sync container] ***********************************************
skipping: [localhost]
TASK [kubesphere-defaults : Configure defaults] ********************************
ok: [localhost] => {
"msg": "Check roles/kubesphere-defaults/defaults/main.yml"
}
TASK [common : Kubesphere | Check kube-node-lease namespace] *******************
changed: [localhost]
TASK [common : KubeSphere | Get system namespaces] *****************************
ok: [localhost]
TASK [common : set_fact] *******************************************************
ok: [localhost]
TASK [common : debug] **********************************************************
ok: [localhost] => {
"msg": [
"kubesphere-system",
"kubesphere-controls-system",
"kubesphere-monitoring-system",
"kube-node-lease"
]
}
TASK [common : KubeSphere | Create kubesphere namespace] ***********************
changed: [localhost] => (item=kubesphere-system)
changed: [localhost] => (item=kubesphere-controls-system)
changed: [localhost] => (item=kubesphere-monitoring-system)
changed: [localhost] => (item=kube-node-lease)
TASK [common : KubeSphere | Labeling system-workspace] *************************
changed: [localhost] => (item=default)
changed: [localhost] => (item=kube-public)
changed: [localhost] => (item=kube-system)
changed: [localhost] => (item=kubesphere-system)
changed: [localhost] => (item=kubesphere-controls-system)
changed: [localhost] => (item=kubesphere-monitoring-system)
changed: [localhost] => (item=kube-node-lease)
TASK [common : KubeSphere | Create ImagePullSecrets] ***************************
changed: [localhost] => (item=default)
changed: [localhost] => (item=kube-public)
changed: [localhost] => (item=kube-system)
changed: [localhost] => (item=kubesphere-system)
changed: [localhost] => (item=kubesphere-controls-system)
changed: [localhost] => (item=kubesphere-monitoring-system)
changed: [localhost] => (item=kube-node-lease)
TASK [common : KubeSphere | Getting kubernetes master num] *********************
changed: [localhost]
TASK [common : KubeSphere | Setting master num] ********************************
ok: [localhost]
TASK [common : Kubesphere | Getting common component installation files] *******
changed: [localhost] => (item=common)
changed: [localhost] => (item=ks-crds)
TASK [common : KubeSphere | Create KubeSphere crds] ****************************
changed: [localhost]
TASK [common : Kubesphere | Checking openpitrix common component] **************
changed: [localhost]
TASK [common : include_tasks] **************************************************
skipping: [localhost] => (item={u'ks': u'mysql-pvc', u'op': u'openpitrix-db'})
skipping: [localhost] => (item={u'ks': u'etcd-pvc', u'op': u'openpitrix-etcd'})
TASK [common : Getting PersistentVolumeName (mysql)] ***************************
skipping: [localhost]
TASK [common : Getting PersistentVolumeSize (mysql)] ***************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeName (mysql)] ***************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeSize (mysql)] ***************************
skipping: [localhost]
TASK [common : Getting PersistentVolumeName (etcd)] ****************************
skipping: [localhost]
TASK [common : Getting PersistentVolumeSize (etcd)] ****************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeName (etcd)] ****************************
skipping: [localhost]
TASK [common : Setting PersistentVolumeSize (etcd)] ****************************
skipping: [localhost]
TASK [common : Kubesphere | Check mysql PersistentVolumeClaim] *****************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get pvc -n kubesphere-system mysql-pvc -o jsonpath='{.status.capacity.storage}'\n", "delta": "0:00:07.991942", "end": "2020-04-27 02:34:44.102792", "msg": "non-zero return code", "rc": 1, "start": "2020-04-27 02:34:36.110850", "stderr": "Error from server (NotFound): persistentvolumeclaims \"mysql-pvc\" not found", "stderr_lines": ["Error from server (NotFound): persistentvolumeclaims \"mysql-pvc\" not found"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [common : Kubesphere | Setting mysql db pv size] **************************
skipping: [localhost]
TASK [common : Kubesphere | Check redis PersistentVolumeClaim] *****************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get pvc -n kubesphere-system redis-pvc -o jsonpath='{.status.capacity.storage}'\n", "delta": "0:00:08.041639", "end": "2020-04-27 02:34:53.635788", "msg": "non-zero return code", "rc": 1, "start": "2020-04-27 02:34:45.594149", "stderr": "Error from server (NotFound): persistentvolumeclaims \"redis-pvc\" not found", "stderr_lines": ["Error from server (NotFound): persistentvolumeclaims \"redis-pvc\" not found"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [common : Kubesphere | Setting redis db pv size] **************************
skipping: [localhost]
TASK [common : Kubesphere | Check minio PersistentVolumeClaim] *****************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get pvc -n kubesphere-system minio -o jsonpath='{.status.capacity.storage}'\n", "delta": "0:00:07.990692", "end": "2020-04-27 02:35:03.135171", "msg": "non-zero return code", "rc": 1, "start": "2020-04-27 02:34:55.144479", "stderr": "Error from server (NotFound): persistentvolumeclaims \"minio\" not found", "stderr_lines": ["Error from server (NotFound): persistentvolumeclaims \"minio\" not found"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [common : Kubesphere | Setting minio pv size] *****************************
skipping: [localhost]
TASK [common : Kubesphere | Check openldap PersistentVolumeClaim] **************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get pvc -n kubesphere-system openldap-pvc-openldap-0 -o jsonpath='{.status.capacity.storage}'\n", "delta": "0:00:08.014642", "end": "2020-04-27 02:35:12.664404", "msg": "non-zero return code", "rc": 1, "start": "2020-04-27 02:35:04.649762", "stderr": "Error from server (NotFound): persistentvolumeclaims \"openldap-pvc-openldap-0\" not found", "stderr_lines": ["Error from server (NotFound): persistentvolumeclaims \"openldap-pvc-openldap-0\" not found"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [common : Kubesphere | Setting openldap pv size] **************************
skipping: [localhost]
TASK [common : Kubesphere | Check etcd db PersistentVolumeClaim] ***************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get pvc -n kubesphere-system etcd-pvc -o jsonpath='{.status.capacity.storage}'\n", "delta": "0:00:08.020249", "end": "2020-04-27 02:35:22.289802", "msg": "non-zero return code", "rc": 1, "start": "2020-04-27 02:35:14.269553", "stderr": "Error from server (NotFound): persistentvolumeclaims \"etcd-pvc\" not found", "stderr_lines": ["Error from server (NotFound): persistentvolumeclaims \"etcd-pvc\" not found"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [common : Kubesphere | Setting etcd pv size] ******************************
skipping: [localhost]
TASK [common : Kubesphere | Check redis ha PersistentVolumeClaim] **************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/kubectl get pvc -n kubesphere-system data-redis-ha-server-0 -o jsonpath='{.status.capacity.storage}'\n", "delta": "0:00:07.972005", "end": "2020-04-27 02:35:31.849200", "msg": "non-zero return code", "rc": 1, "start": "2020-04-27 02:35:23.877195", "stderr": "Error from server (NotFound): persistentvolumeclaims \"data-redis-ha-server-0\" not found", "stderr_lines": ["Error from server (NotFound): persistentvolumeclaims \"data-redis-ha-server-0\" not found"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [common : Kubesphere | Setting redis ha pv size] **************************
skipping: [localhost]
TASK [common : Kubesphere | Creating common component manifests] ***************
changed: [localhost] => (item={u'path': u'etcd', u'file': u'etcd.yaml'})
changed: [localhost] => (item={u'name': u'mysql', u'file': u'mysql.yaml'})
changed: [localhost] => (item={u'path': u'redis', u'file': u'redis.yaml'})
TASK [common : Kubesphere | Creating mysql sercet] *****************************
changed: [localhost]
TASK [common : Kubesphere | Deploying etcd and mysql] **************************
skipping: [localhost] => (item=etcd.yaml)
skipping: [localhost] => (item=mysql.yaml)
TASK [common : Kubesphere | Getting minio installation files] ******************
skipping: [localhost] => (item=minio-ha)
TASK [common : Kubesphere | Creating manifests] ********************************
skipping: [localhost] => (item={u'name': u'custom-values-minio', u'file': u'custom-values-minio.yaml'})
TASK [common : Kubesphere | Check minio] ***************************************
skipping: [localhost]
TASK [common : Kubesphere | Deploy minio] **************************************
skipping: [localhost]
TASK [common : debug] **********************************************************
skipping: [localhost]
TASK [common : fail] ***********************************************************
skipping: [localhost]
TASK [common : Kubesphere | create minio config directory] *********************
skipping: [localhost]
TASK [common : Kubesphere | Creating common component manifests] ***************
skipping: [localhost] => (item={u'path': u'/root/.config/rclone', u'file': u'rclone.conf'})
TASK [common : include_tasks] **************************************************
skipping: [localhost] => (item=helm)
skipping: [localhost] => (item=vmbased)
TASK [common : Kubesphere | Check ha-redis] ************************************
skipping: [localhost]
TASK [common : Kubesphere | Getting redis installation files] ******************
skipping: [localhost] => (item=redis-ha)
TASK [common : Kubesphere | Creating manifests] ********************************
skipping: [localhost] => (item={u'name': u'custom-values-redis', u'file': u'custom-values-redis.yaml'})