Skip to content
Snippets Groups Projects
Commit ca6a9fed authored by Sam Yaple's avatar Sam Yaple
Browse files

sudoers script was not properly running

This issues presented as sudo requiring a TTY. We properly update the
sudoers config to remove the tty requirement

Change-Id: I7f31bccdc1774f8afd078267cf23704d95eda8b8
Closes-Bug: 1477351
parent 6d4a5506
No related branches found
No related tags found
No related merge requests found
Showing
with 7 additions and 7 deletions
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
# Neutron uses rootwrap which requires a tty for sudo. # Neutron uses rootwrap which requires a tty for sudo.
# Since the container is running in daemon mode, a tty # Since the container is running in daemon mode, a tty
# is not present and requiretty must be commented out. # is not present and requiretty must be commented out.
if [ ! -f /var/run/sudo-modified ]; then if [ ! -f /sudo-modified ]; then
chmod 0640 /etc/sudoers chmod 0640 /etc/sudoers
sed -i '/Defaults requiretty/s/^/#/' /etc/sudoers sed -i '/Defaults requiretty/s/^/#/' /etc/sudoers
chmod 0440 /etc/sudoers chmod 0440 /etc/sudoers
fi fi
touch /var/run/sudo-modified touch /sudo-modified
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
set -e set -e
. /opt/kolla/config-neutron.sh . /opt/kolla/config-neutron.sh
. /opt/kolla/config-sudoers.sh
: ${DHCP_DRIVER:=neutron.agent.linux.dhcp.Dnsmasq} : ${DHCP_DRIVER:=neutron.agent.linux.dhcp.Dnsmasq}
: ${USE_NAMESPACES:=true} : ${USE_NAMESPACES:=true}
......
...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_ag ...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_ag
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Override set_configs() here because it doesn't work for fat containers like # Override set_configs() here because it doesn't work for fat containers like
# this one. # this one.
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
set -e set -e
. /opt/kolla/config-neutron.sh . /opt/kolla/config-neutron.sh
. /opt/kolla/config-sudoers.sh
: ${USE_NAMESPACES:=true} : ${USE_NAMESPACES:=true}
......
...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agen ...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agen
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Override set_configs() here because it doesn't work for fat containers like # Override set_configs() here because it doesn't work for fat containers like
# this one. # this one.
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
set -e set -e
. /opt/kolla/config-neutron.sh . /opt/kolla/config-neutron.sh
. /opt/kolla/config-sudoers.sh
: ${NEUTRON_FLAT_NETWORK_NAME:=physnet1} : ${NEUTRON_FLAT_NETWORK_NAME:=physnet1}
: ${NEUTRON_FLAT_NETWORK_INTERFACE:=eth1} : ${NEUTRON_FLAT_NETWORK_INTERFACE:=eth1}
......
...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-dir /etc/neut ...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-dir /etc/neut
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Config-internal script exec out of this function, it does not return here. # Config-internal script exec out of this function, it does not return here.
set_configs set_configs
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
set -e set -e
. /opt/kolla/config-neutron.sh . /opt/kolla/config-neutron.sh
. /opt/kolla/config-sudoers.sh
: ${KEYSTONE_REGION:=RegionOne} : ${KEYSTONE_REGION:=RegionOne}
: ${ENDPOINT_TYPE:=adminURL} : ${ENDPOINT_TYPE:=adminURL}
......
...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadat ...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/metadat
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Override set_configs() here because it doesn't work for fat containers like # Override set_configs() here because it doesn't work for fat containers like
# this one. # this one.
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
set -e set -e
. /opt/kolla/config-neutron.sh . /opt/kolla/config-neutron.sh
. /opt/kolla/config-sudoers.sh
: ${NEUTRON_FLAT_NETWORK_NAME:=physnet1} : ${NEUTRON_FLAT_NETWORK_NAME:=physnet1}
: ${NEUTRON_FLAT_NETWORK_INTERFACE:=eth1} : ${NEUTRON_FLAT_NETWORK_INTERFACE:=eth1}
......
...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins ...@@ -6,6 +6,7 @@ ARGS="--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
source /opt/kolla/config-sudoers.sh
# Config-internal script exec out of this function, it does not return here. # Config-internal script exec out of this function, it does not return here.
set_configs set_configs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment