When the zoning policy is initiator and a second volume is attached
to an instance, the current implementation deletes the existing zones
and then adds new zone data. While doing so, the configuration is deleted
and it is never added back.
The issue is due to delete/add design. When zones are deleted, active zone
set should also be updated, as based on active zone set config is either
created/updated. Added code to get active zone set before adding the zones.
Change-Id: Ib0cd51c3724142175eb1c602d6c1f87dd5e985fb
Closes-Bug: #
1465207
get_active_zs_mock):
get_active_zs_mock.return_value = active_zoneset
self.add_zones(new_zones, False, None)
- get_active_zs_mock.assert_called_once_with()
+ self.assertEqual(2, get_active_zs_mock.call_count)
self.assertEqual(3, apply_zone_change_mock.call_count)
cfg_save_mock.assert_called_once_with()
iterator_count += 1
zone_with_sep += zone
try:
+ # Get active zone set from device, as some of the zones
+ # could be deleted.
+ active_zone_set = self.get_active_zone_set()
cfg_name = active_zone_set[ZoneConstant.ACTIVE_ZONE_CONFIG]
cmd = None
if not cfg_name: