config: handle exception in object create and undo persisted uuid

Bug #1447859 reported by Hampapur Ajay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Hampapur Ajay
R2.20
Fix Committed
Undecided
Hampapur Ajay

Bug Description

While creating a floating-ip I didn’t have a project set…

I got an exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 525, in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/vnc_cfg_api_server/gen/vnc_api_server_gen.py", line 4832, in floating_ips_http_post
    (ok, result) = r_class.http_post_collection(tenant_name, obj_dict, db_conn)
  File "/usr/local/lib/python2.7/site-packages/vnc_cfg_api_server/vnc_cfg_types.py", line 76, in http_post_collection
    proj_dict = obj_dict['project_refs'][0]
KeyError: 'project_refs'

Once i fixed my code, i can’t create a new entry because:
E0422 00:49:26.230953 20198 opencontrail.go:620] Create floating-ip frontend: 409 Conflict: FQ Name: /fq-name-to-uuid/floating_ip:default-domain:default-project:Public:Public:frontend exists already with ID: 419cad88-6d5e-4d73-87fe-26cbdce07850

curl http://localhost:8082/floating-ips | python -mjson.tool
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 20 100 20 0 0 747 0 --:--:-- --:--:-- --:--:-- 769
{
    "floating-ips": []
}

Tags: config
Hampapur Ajay (hajay)
Changed in juniperopenstack:
assignee: nobody → Hampapur Ajay (hajay)
Changed in juniperopenstack:
importance: Undecided → High
tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/9503
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9503
Committed: http://github.org/Juniper/contrail-generateDS/commit/a671d737fd9b11c343d4143a58619f095fea4f23
Submitter: Zuul
Branch: master

commit a671d737fd9b11c343d4143a58619f095fea4f23
Author: Hampapur Ajay <email address hidden>
Date: Fri Apr 24 10:33:05 2015 -0700

config: handle any exception in resource-type post_collection handler

Closes-Bug1447859

Change-Id: Icad76ff523ceb9b039dc4a28ddd6861894437e5d

Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.20

Review in progress for https://review.opencontrail.org/9553
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/9553
Committed: http://github.org/Juniper/contrail-generateDS/commit/c5e5e856599d0e2dcb80b7eb16390f0e5ec0a18a
Submitter: Zuul
Branch: R2.20

commit c5e5e856599d0e2dcb80b7eb16390f0e5ec0a18a
Author: Hampapur Ajay <email address hidden>
Date: Fri Apr 24 10:33:05 2015 -0700

config: handle any exception in resource-type post_collection handler

Closes-Bug1447859

Change-Id: Icad76ff523ceb9b039dc4a28ddd6861894437e5d
(cherry picked from commit a671d737fd9b11c343d4143a58619f095fea4f23)

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.