Make sure iscsid has a unique InitiatorName
os_brick may require InitiatorName in /etc/iscsi/initiatorname.iscsi
before iscsid is invoked via iscsid.socket with iscsiadm. Cloud images
including MAAS ones have "GenerateName=yes" instead of "InitiatorName="
on purpose not to clone the initiator name. Let's initialize it so
Cinder units can be fully ready to accept iSCSI based subordinate and
storage backend charms.
Closes-Bug: 1825809
Change-Id: I413bbb29dd609e0c86ac3691556f37a9fcc13439
(cherry picked from commit bde329d973
)
This commit is contained in:
parent
fe162c39b4
commit
82bc1e227b
|
@ -91,6 +91,7 @@ from charmhelpers.fetch import (
|
|||
from charmhelpers.core.host import (
|
||||
lsb_release,
|
||||
service_reload,
|
||||
service_start,
|
||||
umount,
|
||||
)
|
||||
|
||||
|
@ -182,6 +183,11 @@ def install():
|
|||
'cinder',
|
||||
restart_handler=lambda: service_restart('cinder-api'))
|
||||
|
||||
# Make sure iscsid has a unique InitiatorName by starting iscsid
|
||||
# and invoking /lib/open-iscsi/startup-checks.sh indirectly as
|
||||
# ExecStartPre script of it
|
||||
service_start('iscsid')
|
||||
|
||||
|
||||
@hooks.hook('config-changed')
|
||||
@restart_on_change(restart_map(), stopstart=True)
|
||||
|
@ -621,6 +627,11 @@ def upgrade_charm():
|
|||
'cinder',
|
||||
restart_handler=lambda: service_restart('cinder-api'))
|
||||
|
||||
# Make sure iscsid has a unique InitiatorName by starting iscsid
|
||||
# and invoking /lib/open-iscsi/startup-checks.sh indirectly as
|
||||
# ExecStartPre script of it
|
||||
service_start('iscsid')
|
||||
|
||||
|
||||
@hooks.hook('storage-backend-relation-changed')
|
||||
@hooks.hook('storage-backend-relation-broken')
|
||||
|
|
|
@ -77,6 +77,7 @@ TO_PATCH = [
|
|||
'filter_installed_packages',
|
||||
'service_reload',
|
||||
'service_restart',
|
||||
'service_start',
|
||||
# charmhelpers.contrib.openstack.openstack_utils
|
||||
'configure_installation_source',
|
||||
'openstack_upgrade_available',
|
||||
|
|
Loading…
Reference in New Issue