Skip to content

Commit

Permalink
Merge pull request #118 from ceph/wip-fqdn-upgrade-fix
Browse files Browse the repository at this point in the history
Handle the case where FQDN is the same as hostname
  • Loading branch information
mikechristie authored Jul 1, 2019
2 parents b2a236f + 826f788 commit c435110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ceph_iscsi_config/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,15 @@ def _upgrade_config(self):
gateways_config = self.config['gateways']
gateway_config = gateways_config.get(this_shortname)
if gateway_config:
gateways_config[this_fqdn] = gateway_config
gateways_config.pop(this_shortname)
gateways_config[this_fqdn] = gateway_config
self.update_item("gateways", None, gateways_config)
for target_iqn, target in self.config['targets'].items():
portals_config = target['portals']
portal_config = portals_config.get(this_shortname)
if portal_config:
portals_config[this_fqdn] = portal_config
portals_config.pop(this_shortname)
portals_config[this_fqdn] = portal_config
self.update_item("targets", target_iqn, target)
for disk_id, disk in self.config['disks'].items():
if disk.get('allocating_host') == this_shortname:
Expand Down

0 comments on commit c435110

Please sign in to comment.