Merge code - ip locked and copyright issue

Merge code - ip locked(https://review.openstack.org/#/c/236829/)
and file copyright.

Change-Id: Id787e7a37aeacee0717ebc941e4f200471ace297
Closes-Bug: #1507509
This commit is contained in:
Qing Wu Wang
2015-10-19 04:41:52 -05:00
parent beafd289d2
commit 54896b51dd
2 changed files with 11 additions and 2 deletions

View File

@@ -524,7 +524,16 @@ class PowerVCNeutronAgent(object):
# If HyperV/KVM or Lock Port, reserve IP address in PowerVC
if device_id == constants.POWERVC_LOCKDEVICE_ID\
or not self.local.is_instance_on_power(device_id):
new_port = self.pvc.create_port(port)
# RTC 211682 - ip locked issue.
# Nova booting a vm and neutron creating new port would race the port.
# If the neutron creates the port before booting vm,
# the booting process would be failed as ip/port locked.
time.sleep(15)
try:
new_port = self.pvc.create_port(port)
except Exception, msg:
LOG.warn(_("Try to create a port which has been used in booting vm. %s"), msg)
# RTC 211682 - end
if new_port:
self.db.set_port_pvc_id(db_port, new_port.get('id'))

View File

@@ -1,4 +1,4 @@
# Copyright 2013, 2014 IBM Corp.
# Copyright 2013, 2015 IBM Corp.
"""
Doing PowerVC initialize work, including image, instance sync.