Skip to content

Commit 87a6add

Browse files
committed
fix issues of cadvisor when used in conjuction with rootless engines
Signed-off-by: Fotis Nikolaidis <[email protected]>
1 parent e6239a0 commit 87a6add

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Changes Since Last Release
44

55
### Changed defaults / behaviours
6-
- ...
6+
- Prevent cadvisor from failing when cgroup is not mounted.
77

88
### New Features & Functionality
99
- ...

charts/system/templates/telemetry/cadvisor/cadvisor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ spec:
5252
# to find out the reason. Just exit with success and let experiment to continue.
5353
[ -d "/proc/${mainPID}" ] || { echo "/proc/${mainPID} does not exists."; exit 0; }
5454
55-
# Unmount the local cgroup
56-
umount /sys/fs/cgroup
55+
# Unmount the local cgroup (return successfully if cgroup is not mounted)
56+
umount /sys/fs/cgroup || return 0
5757
5858
# Tap into the cgroup of the main container, and mount it locally
5959
nsenter -t ${mainPID} -C -- mount -t cgroup2 none /sys/fs/cgroup

0 commit comments

Comments
 (0)