Hi,

I'm trying to run the following script in before_vm_start hook:

#!/usr/bin/python
import subprocess

args = ['brctl', 'addbr', 'net10']
print("Running command: " + " ".join(args))
p = subprocess.Popen(args, stdout=subprocess.PIPE)

I get the following error:
add bridge failed: Operation not permitted

From Red Hat Enterprise Virtualization 3.0 Documentation"
"Before VDSM is started on the hypervisor host. before_vdsm_start hooks are 
executed as the user root, and do not inherit the environment of the VDSM 
process."

As I understand it there should be no problem if user root executes this script.
When giving the vdsm user the right sudo permissions and adding sudo to the 
command - it works.

Is the documentation wrong or am I missing something?

Best regards,
Itzik
_______________________________________________
vdsm-devel mailing list
vdsm-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/vdsm-devel

Reply via email to