Migration of volume fails

Bug #1386321 reported by Sridhar Venkat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Jeegn Chen

Bug Description

This is related to EMC VNX driver (EMCCLIFCDriver). Migration of volume during deployment fails with this error :

2014-10-24 07:37:03.648 3859 INFO cinder.volume.flows.manager.create_volume [req-04a4fad2-c685-4159-9c16-9bb085856375 0 3f2bb9e18c9542df8d6c264c810b2a63 - - -] Volume e0819649-73c2-4619-817f-cbdc7e6a7f1c: being created as source_vol with specification: {'status': u'creating', 'volume_size': 20, 'source_volstatus': u'available', 'source_volid': u'5b4855ca-33b7-45e1-85c6-99e84094d62e', 'volume_name': u'volume-boot-8202E4D_067A7DT-VNX_vscsi_npi-0a-e0819649-73c2'}
2014-10-24 07:37:03.680 3859 INFO cinder.volume.drivers.emc.emc_vnx_cli [req-04a4fad2-c685-4159-9c16-9bb085856375 0 3f2bb9e18c9542df8d6c264c810b2a63 - - -] Create snapshot: tmp-snap-e0819649-73c2-4619-817f-cbdc7e6a7f1c: volume: volume-Image_VNX_vscsi_npiv_DND_99P_capture_-5b4855ca-33b7
2014-10-24 07:37:53.783 3859 INFO cinder.volume.manager [-] Updating volume status
2014-10-24 07:38:13.656 3859 INFO cinder.volume.manager [-] Updating volume replication status.
2014-10-24 07:38:14.464 3859 WARNING cinder.exception [req-04a4fad2-c685-4159-9c16-9bb085856375 0 3f2bb9e18c9542df8d6c264c810b2a63 - - -] EMCVnxCLICmdError : ('migrate', '-start', '-source', 8122, '-dest', 77, '-rate', 'high', '-o') (Return Code: 7) (Output: [u'Error: migrate -start command failed.\\nThe destination LUN is not available for migration.\\n'])
2014-10-24 07:38:14.465 3859 WARNING cinder.volume.drivers.emc.emc_vnx_cli [req-04a4fad2-c685-4159-9c16-9bb085856375 0 3f2bb9e18c9542df8d6c264c810b2a63 - - -] Start migration failed. Message: Error: migrate -start command failed.\nThe destination LUN is not available for migration.\n
2014-10-24 07:38:26.900 3859 WARNING cinder.openstack.common.loopingcall [-] task <function _inner at 0x4a27f50> run outlasted interval by 5.22 sec
2014-10-24 07:38:34.510 3859 WARNING cinder.openstack.common.loopingcall [-] task <function _inner at 0x4a27f50> run outlasted interval by 2.61 sec
2014-10-24 07:38:41.041 3859 WARNING cinder.openstack.common.loopingcall [-] task <function _inner at 0x4a27f50> run outlasted interval by 1.53 sec
2014-10-24 07:38:47.025 3859 WARNING cinder.openstack.common.loopingcall [-] task <function _inner at 0x4a27f50> run outlasted interval by 0.98 sec
2014-10-24 07:38:53.479 3859 WARNING cinder.openstack.common.loopingcall [-] task <function _inner at 0x4a27f50> run outlasted interval by 1.45 sec
2014-10-24 07:38:53.787 3859 INFO cinder.volume.manager [-] Updating volume status

If a migration cannot be started, driver should exit before attempting to migrate. (probably due to lack of space).

We see
        self._client.migrate_lun_with_verification(source_vol_lun_id,
                                                   temp_vol_lun_id,
                                                   dest_volume_name)
        self._client.check_smp_not_attached(volume_name)

and

   @log_enter_exit
    def check_smp_not_attached(self, smp_name):
        """Ensure a snap mount point with snap become a LUN."""

        def _wait_for_sync_status():
            lun_list = ('lun', '-list', '-name', smp_name,
                        '-attachedSnapshot')
            out, rc = self.command_execute(*lun_list)
            if rc == 0:
                vol_details = out.split('\n')
                snap_name = vol_details[2].split(':')[1].strip()
            if (snap_name == 'N/A'):
                return True
            return False

        self._wait_for_a_condition(_wait_for_sync_status)

Default timeout is set to 365 days:
default_timeout = 525600

This code needs to be hardened, migration could fail due to lack of space, but it should be detected upfront before invoking migrate.

Tags: drivers emc vnx
Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Jeegn Chen (jeegn-chen)
importance: Undecided → Medium
Xing Yang (xing-yang)
Changed in cinder:
status: New → Triaged
Mike Perez (thingee)
tags: added: drivers emc
Jeegn Chen (jeegn-chen)
Changed in cinder:
status: Triaged → In Progress
Revision history for this message
Jeegn Chen (jeegn-chen) wrote :
Changed in cinder:
status: In Progress → Fix Committed
Jeegn Chen (jeegn-chen)
tags: added: vnx
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.