[openstack-dev] Quantum installation error

Alvise Dorigo alvise.dorigo at pd.infn.it
Thu May 23 07:32:00 UTC 2013


On May 22, 2013, at 5:14 PM, Mike Wilson wrote:

> Alvise,
> 
> You should probably use the openstack-operators mailing list. However, you already solved the first part of your problem, which was that the openvswitch servers weren't running. The problem you have now is that sudo isn't paying attention to the quantum sudoers file which you should be able to find in /etc/sudoers.d/quantum. You need to have a line in /etc/sudoers that looks like this:
> 
> #includedir /etc/sudoers.d
> 
> If you don't, use visudo and add it. Alternatively you can just dump the contents of /etc/sudoers.d/quantum into /etc/sudoers. That should take care of things also.
> 
> For convenience I'll dump out the contents of my quantum sudoers file:
> 
> Defaults:quantum !requiretty
> 
> quantum ALL = (root) NOPASSWD: SETENV: /usr/bin/quantum-rootwrap
> 

Unfortunately the problem persists:

[root at gilda-11 ~]# service quantum-openvswitch-agent status
quantum-openvswitch-agent (pid  2510) is running...

[root at gilda-11 ~]# grep include /etc/sudoers
#includedir /etc/sudoers.d

[root at gilda-11 ~]# tail -10 /var/log/quantum/openvswitch-agent.log
2013-05-23 09:12:16    ERROR [quantum.agent.linux.ovs_lib] Unable to execute ['ovs-vsctl', '--timeout=2', 'list-ports', 'br-int']. Exception: 
Command: ['sudo', 'ovs-vsctl', '--timeout=2', 'list-ports', 'br-int']
Exit code: 1
Stdout: ''
Stderr: 'sudo: no tty present and no askpass program specified\n'
2013-05-23 09:12:18    ERROR [quantum.agent.linux.ovs_lib] Unable to execute ['ovs-vsctl', '--timeout=2', 'list-ports', 'br-int']. Exception: 
Command: ['sudo', 'ovs-vsctl', '--timeout=2', 'list-ports', 'br-int']
Exit code: 1
Stdout: ''
Stderr: 'sudo: no tty present and no askpass program specified\n'

[root at gilda-11 ~]# cat /etc/sudoers.d/quantum 
Defaults:quantum !requiretty

quantum ALL = (root) NOPASSWD: SETENV: /usr/bin/quantum-rootwrap


[root at gilda-11 ~]# ps -ef|grep quantum
quantum   2510     1  1 09:10 ?        00:00:02 python /usr/bin/quantum-openvswitch-agent --log-file /var/log/quantum/openvswitch-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini


I wonder about the actual meaning of the message "sudo: no tty present and no askpass program specified". In addition, why the nova-compute service doesn't have the same problem having a very similar entry in /etc/sudoers.d ? And why sudo needs a password while there's a clear directive NOPASSWD in the /etc/sudoers.d/quantum file ?


  Alvise




More information about the OpenStack-dev mailing list