Cinder rootwrap: add a new command...

asked 2014-09-24 13:43:37 -0600

Ilango gravatar image


While developing a Cinder Driver, I am trying to execute 'mkdir' command using rootwrap.

Following are the chagnes made: Added "mkdir: CommandFilter, mkdir, root" to /usr/share/cinder/rootwrap/volume.filters

Running "sudo cinder-rootwrap /etc/cinder/rootwrap.conf ['mkdir' '/tmp/test']" results in error: /usr/bin/cinder-rootwrap: Unauthorized command: [mkdir /tmp/test] (no filter matched)

self._execute(['mkdir', volumeDir], run_as_root=True) in the driver failing with error

Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf ['mkdir', u'/tmp/vol-7264261a-b42a-413a-b608-93cb095396b9'] Exit code: 99 Stdout: '' Stderr: "/usr/bin/cinder-rootwrap: Unauthorized command: ['mkdir', u'/tmp/vol-7264261a-b42a-413a-b608-93cb095396b9'] (no filter matched)\n" to caller

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-09-24 15:20:01 -0600

Ilango gravatar image

Got it. Changing the code as below fixed it.

self._execute('mkdir', volumeDir, run_as_root=True) in the driver failing with error

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-09-24 13:43:37 -0600

Seen: 691 times

Last updated: Sep 24 '14