tianon / cgroupfs-mount Goto Github PK
View Code? Open in Web Editor NEWSimple (outdated) scripts to mount the cgroupfs (v1) hierarchy, especially structured for Debian packaging
License: GNU General Public License v3.0
Simple (outdated) scripts to mount the cgroupfs (v1) hierarchy, especially structured for Debian packaging
License: GNU General Public License v3.0
I am working on Android and tried to run this script to start docker daemon. but running script returns segmentation fault. it is not bounded to only one part of the code. i tried to comment one part and test next commands. on mounting commands it gives me segmentation fault.
Please help me through this issue,
thanks
This source code doesn't have a license, as far as I can tell. According to https://choosealicense.com/no-permission/, a project without a license is "all rights reserved" and prohibits users from compiling/distributing binaries of this software. Please add a license. There is a relatively exhaustive list at https://choosealicense.com/appendix. Also, by adding a license this (depending on the license) allows third parties such as unix-like distributions to package this software and distribute binaries. Thank you for your consideration!
DISCLAIMER: I'm not a laywer, this isn't legal advice.
I'm setting up a Docker image for AWS Greengrass, which requires cgroups directories to be mounted:
http://docs.aws.amazon.com/greengrass/latest/developerguide/gg-dg.pdf
Specifically (which actually appears to be out of date):
curl https://raw.githubusercontent.com/tianon/cgroupfsmount/951c38ee8d802330454bdede20d85ec1c0f8d312/cgroupfs-mount
> cgroupfs-mount.sh
chmod +x cgroupfs-mount.sh
sudo bash ./cgroupfs-mount.sh
In my Dockerfile, I'm using the apt-get install cgroupsfs-mount approach:
Step 9/15 : RUN sudo cgroupfs-mount
---> Running in cc187c3fb61f
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
I added some debug echos, since it wasn't clear where the permission denied messages where coming from:
Step 10/16 : RUN sudo bash /app/cgroupfs-mount.sh
---> Running in ced257974766
making directory cpuset
cpuset not mounted
mount: permission denied
tried to mount cpuset, but failed, removing it
making directory cpu
cpu not mounted
mount: permission denied
tried to mount cpu, but failed, removing it
making directory cpuacct
cpuacct not mounted
mount: permission denied
tried to mount cpuacct, but failed, removing it
making directory blkio
blkio not mounted
mount: permission denied
tried to mount blkio, but failed, removing it
making directory memory
memory not mounted
mount: permission denied
tried to mount memory, but failed, removing it
making directory devices
devices not mounted
mount: permission denied
tried to mount devices, but failed, removing it
making directory freezer
freezer not mounted
mount: permission denied
tried to mount freezer, but failed, removing it
making directory net_cls
net_cls not mounted
mount: permission denied
tried to mount net_cls, but failed, removing it
making directory perf_event
perf_event not mounted
mount: permission denied
tried to mount perf_event, but failed, removing it
making directory net_prio
net_prio not mounted
mount: permission denied
tried to mount net_prio, but failed, removing it
making directory hugetlb
hugetlb not mounted
mount: permission denied
tried to mount hugetlb, but failed, removing it
making directory pids
pids not mounted
mount: permission denied
tried to mount pids, but failed, removing it
I'm not entirely sure what's going on here, or why the mount is failing, thoughts?
I request a suggestion that rename cgroups-mount/cgroups-umount to mount.cgroups/umount.cgroups, as a file system mount command naming routine under most linux distributions, like any other mount cmd, mount.cifs, mount.fuse, mount.glusterfs, mount.lowntfs-3g, mount.nfs, mount.nfs4, mount.ntfs, mount.ntfs-3g, mount.ploop.
cgroupfs-mount
mounts /sys/fs/cgroup
but cgroupfs-umount
does not unmount it.
Is there any reason for that?
I've extended my script with an umount command.
diff --git a/cgroupfs-umount b/cgroupfs-umount
index 994b66e..13458f4 100644
--- a/cgroupfs-umount
+++ b/cgroupfs-umount
@@ -28,4 +28,10 @@ for sys in *; do
fi
done
+# unmount /sys/fs/cgroup
+cd /sys/fs
+if mountpoint -q /sys/fs/cgroup; then
+ umount /sys/fs/cgroup
+fi
+
exit 0
I'm trying to get docker running on my Server running Ubuntu 14.04 and your package was mentioned as a possible solution to this problem.
However, I have no idea how to best install your package, could you elaborate in the README.md?
There seems to be some really important additions like memory hierarchy that are unreleased. Can a new version be released, so it can be used by softwares like buildroot which is using v0.4?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.