From c9d4bd7c04ad3ca664906c4a528ab5da8d8c0b6f Mon Sep 17 00:00:00 2001 From: Tomoki Sekiyama Date: Wed, 25 Jun 2014 17:22:32 -0400 Subject: [PATCH] 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 --- etc/cinder/rootwrap.d/volume.filters | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/cinder/rootwrap.d/volume.filters b/etc/cinder/rootwrap.d/volume.filters index 8dae72777c1..2143ca2fef2 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