Skip to content

Commit 5d13c48

Browse files
chore: Change /var/lib/lxcfs/ to /var/lib/lxc/lxcfs/ (#47)
* update Signed-off-by: dongjiang <[email protected]> * fix lxcfs Signed-off-by: dongjiang <[email protected]> --------- Signed-off-by: dongjiang <[email protected]>
1 parent 1ac3c7a commit 5d13c48

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

hack/deployment/lxcfs/lxcfs-daemonset.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ spec:
4040
postStart:
4141
exec:
4242
command: ["bash", "-c", "echo ${CONTAINER_REMOUNT_LXCFS} | base64 -d > /opt/container_remount_lxcfs.sh ; chmod u+x /opt/container_remount_lxcfs.sh; ./opt/container_remount_lxcfs.sh > /opt/log/lxcfs.log"]
43+
preStop:
44+
exec:
45+
command: ["bash", "-c", "nsenter -m/proc/1/ns/mnt fusermount -u /var/lib/lxc/lxcfs 2> /dev/null || true"]
4346
securityContext:
4447
privileged: true
4548
volumeMounts:
4649
- name: cgroup
4750
mountPath: /sys/fs/cgroup
4851
- name: lxcfs
49-
mountPath: /var/lib/lxcfs
52+
mountPath: /var/lib/lxc
5053
mountPropagation: Bidirectional
5154
- name: usr-local
5255
mountPath: /usr/local
@@ -67,7 +70,7 @@ spec:
6770
path: /usr/lib64
6871
- name: lxcfs
6972
hostPath:
70-
path: /var/lib/lxc/lxcfs
73+
path: /var/lib/lxc/
7174
type: DirectoryOrCreate
7275
- hostPath:
7376
path: /data/log

hack/script/lxcfs.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Before=lxc.service
55
Documentation=man:lxcfs(1)
66

77
[Service]
8-
ExecStart=/usr/bin/lxcfs -l /var/lib/lxcfs/
8+
ExecStart=/usr/bin/lxcfs -l /var/lib/lxc/lxcfs/
99
KillMode=process
1010
Restart= always
1111
Delegate=yes
12-
ExecStopPost=-/bin/fusermount -u /var/lib/lxcfs
12+
ExecStopPost=-/bin/fusermount -u /var/lib/lxc/lxcfs
1313
ExecReload=/bin/kill -USR1 $MAINPID
1414

1515
# 添加 remount script 脚本

0 commit comments

Comments
 (0)