Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created April 10, 2014 23:55
Show Gist options
  • Save j-griffith/10433007 to your computer and use it in GitHub Desktop.
Save j-griffith/10433007 to your computer and use it in GitHub Desktop.
Fix timing issue in iqn set on create-from-snapshot in Essex
➜ mercado diff san.py ~/Downloads/san.py
32d31
< import time
962c961
<
---
> volume_list = self._get_volumes_by_sfaccount(sf_account['accountID'])
964,974c963,966
< while iqn is None:
< volume_list = self._get_volumes_by_sfaccount(sf_account['accountID'])
< for v in volume_list:
< if v['volumeID'] == volume_id:
< LOG.debug(_("matched internal id: %s") % volume_id)
< iqn = v['iqn']
< if iqn is None:
< LOG.warning(_("Matched, but IQN wasn't set, "
< "requerie in 1 second..."))
< time.sleep(1)
< break
---
> for v in volume_list:
> if v['volumeID'] == volume_id:
> iqn = v['iqn']
> break
➜ mercado
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment