Fix for race condition where 'captured' Windows Azure instances identify
as the previous instance (LP: #1269626).
This commit is contained in:
parent
1f0eab4c8c
commit
f29d70e4e7
@ -93,6 +93,12 @@ class DataSourceAzureNet(sources.DataSource):
|
|||||||
try:
|
try:
|
||||||
if cdev.startswith("/dev/"):
|
if cdev.startswith("/dev/"):
|
||||||
ret = util.mount_cb(cdev, load_azure_ds_dir)
|
ret = util.mount_cb(cdev, load_azure_ds_dir)
|
||||||
|
|
||||||
|
# If we load the OVF from a device, it means that a
|
||||||
|
# new ovf-env.xml has been found. (LP: #1269626)
|
||||||
|
if os.path.exists(ddir):
|
||||||
|
LOG.info("removing old agent directory %s" % ddir)
|
||||||
|
util.del_dir(ddir)
|
||||||
else:
|
else:
|
||||||
ret = load_azure_ds_dir(cdev)
|
ret = load_azure_ds_dir(cdev)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user