mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "y123456yz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-3009) Reproduce systemd cgroup behavior
Date Sat, 22 Jul 2017 09:59:00 GMT

    [ https://issues.apache.org/jira/browse/MESOS-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097216#comment-16097216
] 

y123456yz commented on MESOS-3009:
----------------------------------

when Delegate=false, 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=false                                    //Delegate=false    
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]# systemctl daemon-reload
[root@bogon xxx]# systemctl restart lxc

[root@bogon xxx]# 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


[root@bogon xxx]#  echo 23340 > /sys/fs/cgroup/memory/user.slice/tasks 
[root@bogon xxx]# echo 23340 > /sys/fs/cgroup/blkio/user.slice/tasks 

[root@bogon xxx]# 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:/user.slice
7:blkio:/user.slice
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

[root@bogon xxx]# systemctl restart lxc
[root@bogon xxx]# 
[root@bogon xxx]# ps -ef | grep init
root     23643 23638  0 17:49 ?        00:00:00 /sbin/init
root     23859 15894  0 17:50 pts/2    00:00:00 grep --color=auto init
[root@bogon xxx]# cat /proc/23643/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
[root@bogon xxx]# 



> 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)

Mime
View raw message