[Openstack] 'sudo ovs-vsctl' hit no tty issue

Thierry Carrez thierry at openstack.org
Tue Aug 20 13:15:17 UTC 2013


Yuling_C at DELL.com wrote:
> I’m developing a Quantum plugin and need to run ‘sudo ovs-vsctl’ command
> in my python code. When I run it as a script on Ubuntu, it was OK.
> However, if I run it as a background service(process), I hit the
> following error:
> 
> **YuLing debug -->line=sudo: no tty present and no askpass program specified

You should use the rootwrap to make sudo calls. See other examples in
the code where you call execute with run_as_root=True and add the
corresponding filter to etc/rootwrap.d.

Slightly outdated doc @ https://wiki.openstack.org/wiki/Nova/Rootwrap

-- 
Thierry Carrez (ttx)




More information about the Openstack mailing list