Instances Fail to Create: "sudo: sorry, you are not allowed to set the following environment variables: LD_LIBRARY_PATH, PYTHONPATH

Problem

Instances fail to create, with an error similar to the following being observed in the /var/log/pf9/ostackhost.log file on the hypervisor which it was assigned.

TRACE nova.compute.manager [instance: 9743b651-c8cd-417b-aa0e-14548e4cdf5d] Command: /opt/pf9/venv/bin/python -m oslo_concurrency.prlimit --as=1073741824 --cpu=30 -- sudo LD_LIBRARY_PATH=/opt/pf9/python/pf9-lib:/opt/pf9/venv/lib/python2.7:${LD_LIBRARY_PATH} PYTHONPATH=/opt/pf9/python/lib/python2.7:/opt/pf9/venv/lib/python2.7:${PYTHONPATH} nova-rootwrap /opt/pf9/etc/nova/rootwrap.conf env LC_ALL=C LANG=C qemu-img info /nova/instances/_base/239272945039cce0d9dfc973dae8f2a096a8348d.partTRACE nova.compute.manager [instance: 9743b651-c8cd-417b-aa0e-14548e4cdf5d] Exit code: 1TRACE nova.compute.manager [instance: 9743b651-c8cd-417b-aa0e-14548e4cdf5d] Stdout: u''TRACE nova.compute.manager [instance: 9743b651-c8cd-417b-aa0e-14548e4cdf5d] Stderr: u'sudo: sorry, you are not allowed to set the following environment variables: LD_LIBRARY_PATH, PYTHONPATH<br>'

Environment

  • Platform9 Managed OpenStack - v4.5 and Higher

  • Nova

  • LDAP

Cause

LDAP sudoers policy is interfering – overwriting the local /etc/sudoers.d/pf9-* policies.

Resolution

  1. In /etc/nsswitch.conf, comment out the following line – if present.

# sudoers: files ldap

Last updated