Modification of devstack broke OVN metadata agent

In patch [1] of devstack, "sudo" was remove from variable
NEUTRON_ROOTWRAP_DAEMON_CMD and new function configure_root_helper_options
was introduced.
Because of this change, "sudo" is missing now in networking_ovn_metadata_agent.ini[2]
and namespace can not be created due to "permission denied"[3].

Replace "iniset $OVN_META_CONF agent root_helper_daemon $NEUTRON_ROOTWRAP_DAEMON_CMD""
with "configure_root_helper_options $OVN_META_CONF" to fix it[4].

[1]https://review.openstack.org/#/c/440933/4
[2]root_helper_daemon = /usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
[3]neutron.agent.linux.utils [-] Exit code: 1; Stdin: ; Stdout: ; Stderr: mkdir /var/run/netns failed: Permission denied
[4]
root_helper_daemon = sudo /usr/local/bin/neutron-rootwrap-daemon /etc/neutron/rootwrap.conf
root_helper = sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf

Change-Id: I65548641380898c5894a12accef2ce1625db633c
closes-bug: 1725124
Signed-off-by: Dong Jun <dongj@dtdream.com>
changes/22/513622/1
Dong Jun 5 years ago
parent f1eada645d
commit 3abbc15460

@ -179,12 +179,12 @@ function configure_ovn {
(cd $NETWORKING_OVN_DIR && exec ./tools/generate_config_file_samples.sh)
cp $NETWORKING_OVN_DIR/etc/networking_ovn_metadata_agent.ini.sample $OVN_META_CONF
configure_root_helper_options $OVN_META_CONF
iniset $OVN_META_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $OVN_META_CONF DEFAULT nova_metadata_ip $SERVICE_HOST
iniset $OVN_META_CONF DEFAULT metadata_workers $API_WORKERS
iniset $OVN_META_CONF DEFAULT state_path $NEUTRON_STATE_PATH
iniset $OVN_META_CONF agent root_helper_daemon "$NEUTRON_ROOTWRAP_DAEMON_CMD"
iniset $OVN_META_CONF ovs ovsdb_connection unix:/usr/local/var/run/openvswitch/db.sock
iniset $OVN_META_CONF ovn ovn_sb_connection $OVN_SB_REMOTE
fi

Loading…
Cancel
Save