Adds declaring disk device to use on overcloud nodes
[apex.git] / lib / undercloud-functions.sh
index bd93aa7..6f7addb 100755 (executable)
@@ -208,7 +208,7 @@ sudo openstack-config --set /etc/ironic/ironic.conf disk_utils iscsi_verify_atte
 sudo openstack-config --set /etc/ironic/ironic.conf disk_partitioner check_device_max_retries 40
 
 if [[ -n "${deploy_options_array['ceph_device']}" ]]; then
-    sed -i '/ExtraConfig/a\\    ceph::profile::params::osds: {\\x27${deploy_options_array['ceph_device']}\\x27: {}}' opnfv-environment.yaml
+    sed -i '/ExtraConfig/a\\    ceph::profile::params::osds: {\\x27${deploy_options_array['ceph_device']}\\x27: {}}' ${ENV_FILE}
 fi
 
 sudo sed -i '/CephClusterFSID:/c\\  CephClusterFSID: \\x27$(cat /proc/sys/kernel/random/uuid)\\x27' /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
@@ -253,6 +253,7 @@ sudo systemctl restart openstack-heat-api
 EOI
 
 # configure external network
+if [[ "$enabled_network_list" =~ "external" ]]; then
   ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" << EOI
 if [[ "$external_installer_vm_vlan" != "native" ]]; then
   cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-vlan${external_installer_vm_vlan}
@@ -274,6 +275,7 @@ else
   fi
 fi
 EOI
+fi
 
 # WORKAROUND: must restart the above services to fix sync problem with nova compute manager
 # TODO: revisit and file a bug if necessary. This should eventually be removed