-
Choerodon平台版本:0.12
-
运行环境:自主搭建
[root@node1 ~]# kubectl get po -n c7n-system
NAME READY STATUS RESTARTS AGE
agile-service-56f89c897d-9bqdk 0/1 Running 0 34d
api-gateway-f4559b988-c8ftq 1/1 Running 0 34d
asgard-service-684b44fbf7-8xffm 0/1 Running 0 34d
c7n-mysql-64746b49cf-sfws8 0/1 CrashLoopBackOff 1690 38d
c7n-redis-85887b987c-dghqx 1/1 Running 0 38d
chartmuseum-chartmuseum-864cb9cc5d-65kn9 1/1 Running 0 38d
choerodon-front-6d9677bb54-fz6pp 1/1 Running 0 32d
config-server-5666bbcd7c-44hj5 1/1 Running 0 37d
devops-service-6c6fb8d6c7-jdrtm 0/1 Running 0 34d
file-service-78544fd6f5-qlj8r 1/1 Running 0 34d
gateway-helper-6479586b55-lwtdd 1/1 Running 0 34d
gitlab-56f95dc68f-qcjdm 1/1 Running 0 10m
gitlab-mysql-7f9df57f66-pw6s9 1/1 Running 34 37d
gitlab-redis-68d6788d7c-8htmf 1/1 Running 0 37d
gitlab-service-7d85c869cc-rjr89 1/1 Running 0 34d
harbor-harbor-adminserver-58db79cd46-xndqv 1/1 Running 1 38d
harbor-harbor-database-0 1/1 Running 0 38d
harbor-harbor-jobservice-8458b65b4d-gfb7m 1/1 Running 23 38d
harbor-harbor-registry-5c8774b645-8gpcs 1/1 Running 0 38d
harbor-harbor-ui-59df9446f8-4jcfb 1/1 Running 3 38d
harbor-redis-master-0 1/1 Running 0 38d
iam-service-64c4474558-ftmqx 0/1 Running 0 26d
issue-service-78d6dc5b6d-bhdnx 0/1 Running 0 34d
manager-service-675d8dbf48-l9h4j 0/1 Running 0 34d
minio-c4c85b847-rtkt2 1/1 Running 0 38d
notify-service-6b5676dc7f-jm8pr 0/1 Running 0 34d
oauth-server-8565b6cb5d-fjhtl 0/1 Running 0 34d
register-server-56f9f76b85-8fq72 1/1 Running 0 37d
state-machine-service-84c46dfb54-tlkk6 0/1 Running 0 34d
test-manager-service-5f666d56d-tkdw5 1/1 Running 0 33d
wiki-service-b7b57c46b-45v78 0/1 Running 0 33d
xwiki-78994554dc-zpf9n 1/1 Running 3 33d
删除
[root@node1 ~]# kubectl delete pod c7n-mysql-64746b49cf-sfws8 -n c7n-system
pod “c7n-mysql-64746b49cf-sfws8” deleted
[root@node1 ~]# kubectl get po -n c7n-system
NAME READY STATUS RESTARTS AGE
agile-service-56f89c897d-9bqdk 1/1 Running 0 34d
api-gateway-f4559b988-c8ftq 1/1 Running 0 34d
asgard-service-684b44fbf7-8xffm 0/1 Running 0 34d
c7n-mysql-64746b49cf-kwlwj 1/1 Running 2 3m
c7n-redis-85887b987c-dghqx 1/1 Running 0 38d
chartmuseum-chartmuseum-864cb9cc5d-65kn9 1/1 Running 0 38d
choerodon-front-6d9677bb54-fz6pp 1/1 Running 0 32d
config-server-5666bbcd7c-44hj5 1/1 Running 0 37d
devops-service-6c6fb8d6c7-jdrtm 1/1 Running 0 34d
file-service-78544fd6f5-qlj8r 1/1 Running 0 34d
gateway-helper-6479586b55-lwtdd 1/1 Running 0 34d
gitlab-56f95dc68f-qcjdm 1/1 Running 0 16m
gitlab-mysql-7f9df57f66-pw6s9 1/1 Running 34 37d
gitlab-redis-68d6788d7c-8htmf 1/1 Running 0 37d
gitlab-service-7d85c869cc-rjr89 1/1 Running 0 34d
harbor-harbor-adminserver-58db79cd46-xndqv 1/1 Running 1 38d
harbor-harbor-database-0 1/1 Running 0 38d
harbor-harbor-jobservice-8458b65b4d-gfb7m 1/1 Running 23 38d
harbor-harbor-registry-5c8774b645-8gpcs 1/1 Running 0 38d
harbor-harbor-ui-59df9446f8-4jcfb 1/1 Running 3 38d
harbor-redis-master-0 1/1 Running 0 38d
iam-service-64c4474558-ftmqx 1/1 Running 0 26d
issue-service-78d6dc5b6d-bhdnx 1/1 Running 0 34d
manager-service-675d8dbf48-l9h4j 1/1 Running 0 34d
minio-c4c85b847-rtkt2 1/1 Running 0 38d
notify-service-6b5676dc7f-jm8pr 1/1 Running 0 34d
oauth-server-8565b6cb5d-fjhtl 1/1 Running 0 34d
register-server-56f9f76b85-8fq72 1/1 Running 0 37d
state-machine-service-84c46dfb54-tlkk6 1/1 Running 0 34d
test-manager-service-5f666d56d-tkdw5 1/1 Running 0 33d
wiki-service-b7b57c46b-45v78 1/1 Running 0 33d
xwiki-78994554dc-zpf9n 1/1 Running 3 33d
5分钟后
[root@node1 ~]# kubectl get po -n c7n-system
NAME READY STATUS RESTARTS AGE
agile-service-56f89c897d-9bqdk 0/1 Running 0 34d
api-gateway-f4559b988-c8ftq 1/1 Running 0 34d
asgard-service-684b44fbf7-8xffm 0/1 Running 0 34d
c7n-mysql-64746b49cf-kwlwj 0/1 CrashLoopBackOff 10 41m
c7n-redis-85887b987c-dghqx 1/1 Running 0 38d
chartmuseum-chartmuseum-864cb9cc5d-65kn9 1/1 Running 0 38d
choerodon-front-6d9677bb54-fz6pp 1/1 Running 0 32d
config-server-5666bbcd7c-44hj5 1/1 Running 0 37d
devops-service-6c6fb8d6c7-jdrtm 0/1 Running 0 34d
file-service-78544fd6f5-qlj8r 1/1 Running 0 34d
gateway-helper-6479586b55-lwtdd 1/1 Running 0 34d
gitlab-56f95dc68f-qcjdm 1/1 Running 0 54m
gitlab-mysql-7f9df57f66-pw6s9 1/1 Running 34 37d
gitlab-redis-68d6788d7c-8htmf 1/1 Running 0 37d
gitlab-service-7d85c869cc-rjr89 1/1 Running 0 34d
harbor-harbor-adminserver-58db79cd46-xndqv 1/1 Running 1 38d
harbor-harbor-database-0 1/1 Running 0 38d
harbor-harbor-jobservice-8458b65b4d-gfb7m 1/1 Running 23 38d
harbor-harbor-registry-5c8774b645-8gpcs 1/1 Running 0 38d
harbor-harbor-ui-59df9446f8-4jcfb 1/1 Running 3 38d
harbor-redis-master-0 1/1 Running 0 38d
iam-service-64c4474558-ftmqx 0/1 Running 0 27d
issue-service-78d6dc5b6d-bhdnx 0/1 Running 0 34d
manager-service-675d8dbf48-l9h4j 0/1 Running 0 34d
minio-c4c85b847-rtkt2 1/1 Running 0 38d
notify-service-6b5676dc7f-jm8pr 0/1 Running 0 34d
oauth-server-8565b6cb5d-fjhtl 0/1 Running 0 34d
register-server-56f9f76b85-8fq72 1/1 Running 0 37d
state-machine-service-84c46dfb54-tlkk6 0/1 Running 0 34d
test-manager-service-5f666d56d-tkdw5 1/1 Running 0 33d
wiki-service-b7b57c46b-45v78 0/1 Running 0 33d
xwiki-78994554dc-zpf9n 1/1 Running 3 33d
日志和描述信息
[root@node1 ~]# kubectl logs c7n-mysql-64746b49cf-kwlwj -n c7n-system
2019-02-11T02:56:40.080984Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-02-11T02:56:40.085163Z 0 [Note] mysqld (mysqld 5.7.23) starting as process 1 …
2019-02-11T02:56:40.092132Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-02-11T02:56:40.092157Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-02-11T02:56:40.092161Z 0 [Note] InnoDB: Uses event mutexes
2019-02-11T02:56:40.092164Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-02-11T02:56:40.092166Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2019-02-11T02:56:40.092169Z 0 [Note] InnoDB: Using Linux native AIO
2019-02-11T02:56:40.092650Z 0 [Note] InnoDB: Number of pools: 1
2019-02-11T02:56:40.092794Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-02-11T02:56:40.094658Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-02-11T02:56:40.103821Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-02-11T02:56:40.106325Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-02-11T02:56:40.136906Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-02-11T02:56:40.140296Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 1985460331
2019-02-11T02:56:40.140320Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 1985460340
2019-02-11T02:56:40.140326Z 0 [Note] InnoDB: Database was not shutdown normally!
2019-02-11T02:56:40.140331Z 0 [Note] InnoDB: Starting crash recovery.
2019-02-11T02:56:40.748433Z 0 [Note] InnoDB: Removed temporary tablespace data file: “ibtmp1”
2019-02-11T02:56:40.748481Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-02-11T02:56:40.749421Z 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
2019-02-11T02:56:40.920311Z 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
2019-02-11T02:56:40.923346Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-02-11T02:56:40.923374Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-02-11T02:56:40.924758Z 0 [Note] InnoDB: 5.7.23 started; log sequence number 1985460340
2019-02-11T02:56:40.925645Z 0 [Note] Plugin ‘FEDERATED’ is disabled.
2019-02-11T02:56:40.926345Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-02-11T02:56:40.953309Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190211 10:56:40
2019-02-11T02:56:40.958437Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2019-02-11T02:56:40.961664Z 0 [Warning] CA certificate ca.pem is self signed.
2019-02-11T02:56:40.965433Z 0 [Note] Server hostname (bind-address): ‘*’; port: 3306
2019-02-11T02:56:40.965563Z 0 [Note] IPv6 is available.
2019-02-11T02:56:40.965580Z 0 [Note] - ‘::’ resolves to ‘::’;
2019-02-11T02:56:40.965606Z 0 [Note] Server socket created on IP: ‘::’.
2019-02-11T02:56:40.972351Z 0 [Warning] Insecure configuration for --pid-file: Location ‘/var/run/mysqld’ in the path is accessible to all OS users. Consider choosing a different directory.
2019-02-11T02:56:40.987944Z 0 [Warning] ‘user’ entry ‘root@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:40.988004Z 0 [Warning] ‘user’ entry ‘mysql.session@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:40.988017Z 0 [Warning] ‘user’ entry ‘mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:40.988230Z 0 [Warning] ‘db’ entry ‘performance_schema mysql.session@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:40.988251Z 0 [Warning] ‘db’ entry ‘sys mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:40.988498Z 0 [Warning] ‘proxies_priv’ entry ‘@ root@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:41.013421Z 0 [Warning] ‘tables_priv’ entry ‘user mysql.session@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:41.013444Z 0 [Warning] ‘tables_priv’ entry ‘sys_config mysql.sys@localhost’ ignored in --skip-name-resolve mode.
2019-02-11T02:56:41.136718Z 0 [Note] Event Scheduler: Loaded 0 events
2019-02-11T02:56:41.137018Z 0 [Note] mysqld: ready for connections.
Version: ‘5.7.23’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL)
[root@node1 ~]# kubectl describe pod c7n-mysql-64746b49cf-kwlwj -n c7n-system
Name: c7n-mysql-64746b49cf-kwlwj
Namespace: c7n-system
Node: node1/192.168.177.157
Start Time: Mon, 11 Feb 2019 10:38:48 +0800
Labels: choerodon.io/infra=mysql
choerodon.io/release=c7n-mysql
pod-template-hash=2030260579
Annotations: choerodon.io/metrics-group=mysql
choerodon.io/metrics-path=/metrics
kubernetes.io/created-by={“kind”:“SerializedReference”,“apiVersion”:“v1”,“reference”:{“kind”:“ReplicaSet”,“namespace”:“c7n-system”,“name”:“c7n-mysql-64746b49cf”,“uid”:"d7c14113-0f38-11e9-8f76-02ec013b…
Status: Running
IP: 10.233.64.48
Created By: ReplicaSet/c7n-mysql-64746b49cf
Controlled By: ReplicaSet/c7n-mysql-64746b49cf
Containers:
c7n-mysql:
Container ID: docker://62935bdfafe806362bbfe58d0f98fd7bdeee3e16d32579671a7e74f57a181623
Image: mysql:5.7.23
Image ID: docker-pullable://mysql@sha256:953b53af26805d82eca95f28df6ae82e8e15cd1e587b4c5cd06a78be80e84050
Port: 3306/TCP
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: Error
Exit Code: 2
Started: Mon, 11 Feb 2019 10:50:27 +0800
Finished: Mon, 11 Feb 2019 10:51:29 +0800
Ready: False
Restart Count: 6
Liveness: tcp-socket :3306 delay=60s timeout=5s period=10s #success=1 #failure=3
Environment:
MYSQL_ROOT_PASSWORD: password
TZ: Asia/Shanghai
Mounts:
/etc/mysql/conf.d/my.cnf from config-volume (rw)
/var/lib/mysql from mysql (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-ptkjf (ro)
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
mysql:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: c7n-mysql-pvc
ReadOnly: false
config-volume:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: c7n-mysql-cm
Optional: false
default-token-ptkjf:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-ptkjf
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations:
Events:
Type Reason Age From Message
Normal Scheduled 17m default-scheduler Successfully assigned c7n-mysql-64746b49cf-kwlwj to node1
Normal SuccessfulMountVolume 17m kubelet, node1 MountVolume.SetUp succeeded for volume “config-volume”
Normal SuccessfulMountVolume 17m kubelet, node1 MountVolume.SetUp succeeded for volume “default-token-ptkjf”
Normal SuccessfulMountVolume 17m kubelet, node1 MountVolume.SetUp succeeded for volume “pvc-d36f5b89-0f38-11e9-b4d2-0285346f8fdd”
Normal Pulled 13m (x4 over 16m) kubelet, node1 Container image “mysql:5.7.23” already present on machine
Normal Created 13m (x4 over 16m) kubelet, node1 Created container
Normal Started 13m (x4 over 16m) kubelet, node1 Started container
Warning BackOff 12m (x5 over 14m) kubelet, node1 Back-off restarting failed container
Warning FailedSync 1m (x42 over 14m) kubelet, node1 Error syncing pod