]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add cgroups related commands to rootwrap filters
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Wed, 25 Jun 2014 21:22:32 +0000 (17:22 -0400)
committerTomoki Sekiyama <tomoki.sekiyama@hds.com>
Wed, 25 Jun 2014 22:17:13 +0000 (18:17 -0400)
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 <tomoki.sekiyama@hds.com>
Implements: blueprint limit-volume-copy-bandwidth

etc/cinder/rootwrap.d/volume.filters

index 8dae72777c122e28c670383b5732ec2079658e38..2143ca2fef213446ce7ff8272db9d7170d3454b0 100644 (file)
@@ -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