Skip to content

Commit

Permalink
Merge "When ip_alloc request lands in different api servers the bitar…
Browse files Browse the repository at this point in the history
…ray local to the api-server wont have marked the ip is used, However the other api-server might have allocated the ip and locked it in zookeeper with id "user-opaque-alloc". So this api-server assumes that the ip is not allocated and try to create a lock with same id "user-opaque-alloc" to get the last allocated ip as response from zookeeper as the id(user-opaque-alloc) is same."
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 6, 2016
2 parents bdb68e9 + bdead2d commit f57b988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/api-server/vnc_cfg_types.py
Expand Up @@ -973,7 +973,7 @@ def ip_alloc(cls, vn_fq_name, subnet_name, count, family=None):
ip_version = 6 if family == 'v6' else 4
ip_list = [cls.addr_mgmt.ip_alloc_req(vn_fq_name, sub=subnet_name,
asked_ip_version=ip_version,
alloc_id='user-opaque-alloc')
alloc_id=str(uuid.uuid4()))
for i in range(count)]
msg = 'AddrMgmt: reserve %d IP for vn=%s, subnet=%s - %s' \
% (count, vn_fq_name, subnet_name if subnet_name else '', ip_list)
Expand Down

0 comments on commit f57b988

Please sign in to comment.