Merge "profile/nova/compute: add iscsi bits"
authorJenkins <jenkins@review.openstack.org>
Tue, 12 Jul 2016 18:08:02 +0000 (18:08 +0000)
committerGerrit Code Review <review@openstack.org>
Tue, 12 Jul 2016 18:08:02 +0000 (18:08 +0000)
1  2 
manifests/profile/base/nova/compute.pp

@@@ -41,19 -36,17 +41,30 @@@ class tripleo::profile::base::nova::com
  
      # deploy bits to connect nova compute to neutron
      include ::nova::network::neutron
+     # When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique
+     # https://bugzilla.redhat.com/show_bug.cgi?id=1244328
+     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',
+       before  => File['/etc/iscsi/.initiator_reset'],
+     }
+     file { '/etc/iscsi/.initiator_reset':
+       ensure => present,
+     }
    }
  
 +  # If NFS is used as a Cinder backend
 +  if $cinder_nfs_backend {
 +    ensure_packages('nfs-utils', { ensure => present })
 +    Package['nfs-utils'] -> Service['nova-compute']
 +    if str2bool($::selinux) {
 +      selboolean { 'virt_use_nfs':
 +        value      => on,
 +        persistent => true,
 +      }
 +      Selboolean['virt_use_nfs'] -> Package['nfs-utils']
 +    }
 +  }
 +
  }