From c68a8f67a70538d4081c63742a27743e1172c147 Mon Sep 17 00:00:00 2001 From: Dane LeBlanc Date: Thu, 20 Mar 2014 19:10:08 -0400 Subject: [PATCH] stack.sh fails for Cisco plugin with missing cisco_plugins.ini error When the Cisco Nexus monolithic plugin is configured in the localrc, stack.sh fails with the error message: sed: can't read /etc/neutron/plugins/cisco/cisco_plugins.ini: No such file or directory This failure was introduced with the merge of change set 76992 (bug #1285884). Change set 76992 removed the copying of Q_PLUGIN_EXTRA_CONF_FILES from the neutron project area to directories under /etc/neutron. This copy from neutron to /etc is required by the Cisco Nexus monolithic plugin, since this plugin follows the original model for generating extra config files based on localrc settings: - Copy default config file(s) from neutron project to /etc using a relative path (relative to neutron and relative to /) - Modify the copies of the config file(s) using localrc settings - Add a --config-file command line setting for neutron server which points to the modified config file(s) under /etc The fix is to add the copying of the default versions of the extra config files from neutron to /etc into the cisco devstack script. Change-Id: Ifbae197ed591f7cccfd6d51eae2b21e31eb0a409 Closes-Bug: #1295411 --- lib/neutron_plugins/cisco | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/neutron_plugins/cisco b/lib/neutron_plugins/cisco index a1b089e1a3..ca9be75a95 100644 --- a/lib/neutron_plugins/cisco +++ b/lib/neutron_plugins/cisco @@ -183,6 +183,15 @@ function neutron_plugin_configure_common { ovs_neutron_plugin_configure_common Q_PLUGIN_EXTRA_CONF_PATH=etc/neutron/plugins/cisco Q_PLUGIN_EXTRA_CONF_FILES=(cisco_plugins.ini) + # Copy extra config files to /etc so that they can be modified + # later according to Cisco-specific localrc settings. + mkdir -p /$Q_PLUGIN_EXTRA_CONF_PATH + local f + local extra_conf_file + for (( f=0; $f < ${#Q_PLUGIN_EXTRA_CONF_FILES[@]}; f+=1 )); do + extra_conf_file=$Q_PLUGIN_EXTRA_CONF_PATH/${Q_PLUGIN_EXTRA_CONF_FILES[$f]} + cp $NEUTRON_DIR/$extra_conf_file /$extra_conf_file + done else Q_PLUGIN_CONF_PATH=etc/neutron/plugins/cisco Q_PLUGIN_CONF_FILENAME=cisco_plugins.ini