[
https://issues.apache.org/jira/browse/MESOS-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
y123456yz updated MESOS-3009:
-----------------------------
Comment: was deleted
(was: when Delegate=true, restart result:
[root@bogon xxx]# cat /etc/systemd/system/lxc.service
[Unit]
Description=LXC Container Initialization and Autoboot Code
After=network.target lxc-net.service
Wants=lxc-net.service
Documentation=man:lxc-autostart man:lxc
[Service]
Delegate=yes //here Delegate=yes
Type=oneshot
RemainAfterExit=yes
ExecStart= /usr/bin/lxc-start -f /home/xxx/lxc.conf3 -n yyz-test -d -o
/home/xxx/yyzlxc.log
ExecStop=/usr/bin/lxc-stop -n yyz-test
[Install]
WantedBy=multi-user.target
[root@bogon xxx]#
[root@bogon xxx]# cat /proc/21640/cgroup
145:name=cgroup-yyztest:/
11:cpuacct,cpu:/lxc/yyz-test-2
10:cpuset:/lxc/yyz-test-2
9:perf_event:/lxc/yyz-test-2
8:memory:/lxc/yyz-test-2
7:blkio:/lxc/yyz-test-2
6:freezer:/lxc/yyz-test-2
5:devices:/lxc/yyz-test-2
4:net_prio,net_cls:/lxc/yyz-test-2
3:pids:/lxc/yyz-test-2
2:hugetlb:/lxc/yyz-test-2
1:name=systemd:/lxc/yyz-test-2
[root@bogon xxx]#
[root@bogon xxx]# echo 21640 > /sys/fs/cgroup/
blkio/ cpuacct/ cpuset/ freezer/ memory/
net_cls,net_prio/ perf_event/ systemd/
cpu/ cpu,cpuacct/ devices/ hugetlb/
net_cls/ net_prio/ pids/
[root@bogon xxx]# echo 21640 > /sys/fs/cgroup/memory/user.slice/tasks
[root@bogon xxx]# echo 21640 > /sys/fs/cgroup/blkio/user.slice/tasks
[root@bogon xxx]# cat /proc/21640/cgroup
145:name=cgroup-yyztest:/
11:cpuacct,cpu:/lxc/yyz-test-2
10:cpuset:/lxc/yyz-test-2
9:perf_event:/lxc/yyz-test-2
8:memory:/user.slice //here change
7:blkio:/user.slice //here change
6:freezer:/lxc/yyz-test-2
5:devices:/lxc/yyz-test-2
4:net_prio,net_cls:/lxc/yyz-test-2
3:pids:/lxc/yyz-test-2
2:hugetlb:/lxc/yyz-test-2
1:name=systemd:/lxc/yyz-test-2
[root@bogon xxxx]# systemctl restart lxc
//here restart
[root@bogon yangyazhou]# ps -ef |grep init
root 23340 23335 0 17:48 ? 00:00:00 /sbin/init
root 23533 15894 0 17:48 pts/2 00:00:00 grep --color=auto init
[root@bogon yangyazhou]# cat /proc/23340/cgroup
145:name=cgroup-yyztest:/
11:cpuacct,cpu:/lxc/yyz-test-3
10:cpuset:/lxc/yyz-test-3
9:perf_event:/lxc/yyz-test-3
8:memory:/lxc/yyz-test-3
7:blkio:/lxc/yyz-test-3
6:freezer:/lxc/yyz-test-3
5:devices:/lxc/yyz-test-3
4:net_prio,net_cls:/lxc/yyz-test-3
3:pids:/lxc/yyz-test-3
2:hugetlb:/lxc/yyz-test-3
1:name=systemd:/lxc/yyz-test-3
)
> Reproduce systemd cgroup behavior
> ----------------------------------
>
> Key: MESOS-3009
> URL: https://issues.apache.org/jira/browse/MESOS-3009
> Project: Mesos
> Issue Type: Task
> Reporter: Artem Harutyunyan
> Assignee: Joris Van Remoortere
> Labels: mesosphere
>
> It has been noticed before that systemd reorganizes cgroup hierarchy created
> by mesos slave. Because of this mesos is no longer able to find the cgroup,
> and there is also a chance of undoing the isolation that mesos slave puts in
> place.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)