-
Notifications
You must be signed in to change notification settings - Fork 745
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
/etc/localtime mount error #1607
Comments
ks-installer/deploy/kubesphere-installer.yaml Line 280 in 2f48af0
In order to ensure the timezone in container as same as node, /etc/localtime of the node is mounted in ks-installer‘s yaml.
If this file doesn‘’t exist, you can link your timezone to example: I notice that the localtime symlink is hardcoded in the Dockerfile,I will delete it. Thanks ! |
I know how to manage localtime, thanks. |
OK, I got it, I will delete the localtime symlink from the Dockerfile, thanks. |
how do we deal with this if we are deploying it on EKS ? this still would fail i guess. │ Events: │
│ Type Reason Age From Message │
│ ---- ------ ---- ---- ------- │
│ Normal Scheduled 15m default-scheduler Successfully assigned kubesphere-logging-system/logsidecar-injector-deploy-fff7577fd-j9c25 to ip-10-0-14-25.eu-west-1.compute.internal │
│ Normal Pulling 15m kubelet Pulling image "kubesphere/log-sidecar-injector:v1.2.0" │
│ Normal Pulled 15m kubelet Successfully pulled image "kubesphere/log-sidecar-injector:v1.2.0" in 1.89s (1.89s including waiting). Image size: 10656572 bytes. │
│ Normal Created 15m kubelet Created container logsidecar-injector │
│ Normal Started 15m kubelet Started container logsidecar-injector │
│ Normal Pulling 15m kubelet Pulling image "jimmidyson/configmap-reload:v0.7.1" │
│ Normal Pulled 15m kubelet Successfully pulled image "jimmidyson/configmap-reload:v0.7.1" in 1.181s (1.181s including waiting). Image size: 3935101 bytes. │
│ Normal Created 14m (x4 over 15m) kubelet Created container config-reloader │
│ Normal Pulled 14m (x3 over 15m) kubelet Container image "jimmidyson/configmap-reload:v0.7.1" already present on machine │
│ Warning Failed 14m (x4 over 15m) kubelet Error: failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container proce │
│ ss: error during container init: error mounting "/etc/localtime" to rootfs at "/etc/localtime": mount /etc/localtime:/etc/localtime (via /proc/self/fd/6), flags: 0x5001, data: context="system_u:object_r:data_ │
│ t:s0:c362,c594": not a directory: unknown │
│ Warning BackOff 16s (x70 over 15m) kubelet Back-off restarting failed container config-reloader in pod logsidecar-injector-deploy-fff7577fd-j9c25_kubesphere-logging-system(5386d5b4-161e-4f2f │
│ -9d44-96e4cc47c953) |
It seems to be related to the timezone configuration on your EKS node (possibly due to the absence of the /etc/localtime file). I found a method to change the timezone on the EKS official website. |
but why only this while the same is handled as part of installer pod. it does not throw error in this case and this also runs on the same eks cluster on same nodes. The problem is only with log side car container spec:
serviceAccountName: ks-installer
containers:
- name: installer
image: kubesphere/ks-installer:v3.4.1
imagePullPolicy: "IfNotPresent"
resources:
limits:
cpu: "2"
memory: 2Gi
requests:
cpu: 20m
memory: 100Mi
volumeMounts:
- mountPath: /etc/localtime
name: host-time
readOnly: true
volumes:
- hostPath:
path: /etc/localtime
type: ""
name: host-time |
@Santhosh-Radhakrishna Could you provide the complete pod information for both the problematic pod (log sidecar) and the non-problematic pod (ks-installer)? |
@Santhosh-Radhakrishna If you can connect to the node where log sidecar is located, you can check if /etc/localtime exists. |
Hi team!
When installing ks-installer as recommended -
I get an error:
It turns out that /etc/localtime is not mounted:
If I comment out the volume mount of /etc/localtime, then ks-installer works and the localtime symlink appears hardcoded:
hope it helps
Andrey
The text was updated successfully, but these errors were encountered: