aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Oxenham <roxenham@redhat.com>2016-02-03 18:57:33 +0000
committerRhys Oxenham <roxenham@redhat.com>2016-02-03 20:57:40 +0000
commit4b4415620f9089deeabf18662a45dd305732f08d (patch)
tree535806d98d6f2cab1e58a5c45b5182f744237025
parentb9e421ec6db97782c4b3024203e827812e87ddf3 (diff)
Makes the iSCSI initiator name unique for compute nodes
When we utilise images for deployment, the iSCSI initiator name is not unique, leading to problems with live migration. This patch simply updates the iSCSI initiator name to a unique ID randomly generated by iscsi-iname. https://bugzilla.redhat.com/show_bug.cgi?id=1244328 Change-Id: I170e7f45f67fa8ce70436f24807d1ed7808f2c32
-rw-r--r--puppet/manifests/overcloud_compute.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
index 593cc500..4b0f98e4 100644
--- a/puppet/manifests/overcloud_compute.pp
+++ b/puppet/manifests/overcloud_compute.pp
@@ -37,6 +37,16 @@ exec { 'libvirt-default-net-destroy':
before => Service['libvirt'],
}
+# When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique
+exec { 'reset-iscsi-initiator-name':
+ command => '/bin/echo InitiatorName=$(/usr/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi',
+ onlyif => '/usr/bin/test ! -f /etc/iscsi/.initiator_reset',
+}->
+
+file { '/etc/iscsi/.initiator_reset':
+ ensure => present,
+}
+
include ::nova
include ::nova::config
include ::nova::compute