Ask Your Question
0

Cinder rootwrap: add a new command...

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

Ilango gravatar image

Hi,

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
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 530 times

Last updated: Sep 24 '14