From: Tomoki Sekiyama Date: Wed, 25 Jun 2014 21:22:32 +0000 (-0400) Subject: Add cgroups related commands to rootwrap filters X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c9d4bd7c04ad3ca664906c4a528ab5da8d8c0b6f;p=openstack-build%2Fcinder-build.git Add cgroups related commands to rootwrap filters Adds rootwrap filters to allow commands to create/setup cgroups and to put commands into cgroups in order to limit bandwidth usage, that are used in setup_blkio_cgroup() (volume/utils.py). Change-Id: Id74cdd4d2fdfffb12aff8cb3b977324bb5b45173 Signed-off-by: Tomoki Sekiyama Implements: blueprint limit-volume-copy-bandwidth --- diff --git a/etc/cinder/rootwrap.d/volume.filters b/etc/cinder/rootwrap.d/volume.filters index 8dae72777..2143ca2fe 100644 --- a/etc/cinder/rootwrap.d/volume.filters +++ b/etc/cinder/rootwrap.d/volume.filters @@ -47,6 +47,11 @@ ionice_1: RegExpFilter, ionice, root, ionice, -c[0-3]( -n[0-7])?, dd, if=\S+, of ionice_2: RegExpFilter, ionice, root, ionice, -c[0-3]( -n[0-7])?, dd, if=\S+, of=\S+, count=\d+, bs=\S+, iflag=direct, oflag=direct ionice_3: RegExpFilter, ionice, root, ionice, -c[0-3]( -n[0-7])?, dd, if=\S+, of=\S+, count=\d+, bs=\S+, conv=fdatasync +# cinder/volume/utils.py: setup_blkio_cgroup() +cgcreate: CommandFilter, cgcreate, root +cgset: CommandFilter, cgset, root +cgexec: ChainingRegExpFilter, cgexec, root, cgexec, -g, blkio:\S+ + # cinder/volume/driver.py dmsetup: CommandFilter, dmsetup, root ln: CommandFilter, ln, root