IBM Support

Networking configuration failure occurs with a "sudo: no tty present" error

Troubleshooting


Problem

Attempts to configure networking using IBM Cloud Orchestrator result in the neutron service being down.

Symptom

The /var/log/neutron/neutron-linuxbridge-agent file and the log shows text that is similar to the following messages:
  2015-02-05 12:01:16.084 21651 CRITICAL neutron [-] NT-FDA3026   Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf',             'ip', '-o', '-d', 'link', 'list']
 Exit code: 1
 Stdout: ''
 Stderr: 'sudo: no tty present and no askpass program specified\n'



When you run the SCOrchestrator.py script to view the system status, the following output is seen:
 Component                     Hostname             Status
---------------------------------------------------------
...
neutron-linuxbridge-agent     10.10.4.4         offline
...
openstack-nova-metadata-api   10.10.4.4         offline

...

For information on running the SCOrchestrator.py script, see the following topics in the product documentation:

Cause

The sudoer configuration is not correct on your region and neutron virtual machine systems.

Resolving The Problem

The error is caused by sudo requiring the root password for the neutron user.

The proper configuration in the sudoers file includes the following line:
#includedir /etc/sudoers.d

This configuration allows the following files to be included with the sudo function:
/etc/sudoers.d/cinder
/etc/sudoers.d/neutron
/etc/sudoers.d/nova

Each file contains a related entry to allow sudo for that user without a password. For example:
# cat /etc/sudoers.d/neutron
Defaults:neutron !requiretty

neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap
/etc/neutron/rootwrap.conf *

[{"Product":{"code":"SS4KMC","label":"IBM SmartCloud Orchestrator"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Configuration","Platform":[{"code":"PF016","label":"Linux"}],"Version":"2.4;2.4.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21696277