[3.0-2706]UI, It is showing the instance record after deleting the parent port when it has sub-interface

Bug #1540789 reported by musharani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
Rahul
Trunk
Fix Committed
High
Rahul

Bug Description

Created one network as ‘net1’. Under this network one instance is running. I could able to see the port for that instance under Configure -> Networking -> Ports. Then created one sub-interface ‘net1-subinter1’ under that port.

Then both the port and sub-interface are listed under Monitor -> Networking -> Dashboard. Now I deleted the port. The reference of this port got removed from sub-interface as expected and sub-interface also exists in Configure->Network->Ports.

But it is showing one record for the instance under Monitor -> Networking -> Dashboard -> Instance after deleting the port. If it is attached with that sub-interface then that sub-interfaces should be shown under Monitor -> Networking -> Dashboard -> Interfaces.
But it is not showing the sub-interface under sub-interface list.

And also there is no associated instance and interface for net1 if you check Monitor -> Networking -> Dashboard -> Networks. But it is showing the number of instance as 1 under Instances menu.

Please find the mail attachment for reference.

Tags: config ui
Revision history for this message
musharani (musharani) wrote :
  • DE_mail.docx Edit (15.2 KiB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
summary: [3.0-2706]UI, It is showing the instance record after deleting the
- parent port if it has sub-interface
+ parent port when it has sub-interface
Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Sachin Bansal (sbansal) → Ignatious Johnson Christopher (ijohnson-x)
tags: added: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/16903
Submitter: Ignatious Johnson Christopher (<email address hidden>)

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

After the changes(https://review.opencontrail.org/16903) in api-server to deny deletion of VMI with subinterface, following trace is seen in contrail-webui-stdout.log

Need to handle this error and propagate it to the webui

02/04/2016 10:55:33 PM - ^[[31merror^[[39m: URL [http://10.84.14.46:9100/virtual-machine-interface/c549f2eb-6f1e-445d-80eb-93e5e2e1dce4] returned error ["Cannot delete vmi with existing ref to sub interface"]
02/04/2016 10:55:33 PM - ^[[31merror^[[39m: Encountered broken link: /virtual-machine-interface/c549f2eb-6f1e-445d-80eb-93e5e2e1dce4
02/04/2016 10:55:33 PM - ^[[31merror^[[39m: REST Server Error: Cannot delete vmi with existing ref to sub interface
    at APIServer.retryMakeCall (/usr/src/contrail/contrail-web-core/src/serverroot/common/rest.api.js:170:13)
    at Request.<anonymous> (/usr/src/contrail/contrail-web-core/src/serverroot/common/rest.api.js:285:18)
    at Request.emit (events.js:98:17)
    at Request.mixin._fireSuccess (/usr/lib64/node_modules/restler/lib/restler.js:226:10)
    at /usr/lib64/node_modules/restler/lib/restler.js:157:20
    at IncomingMessage.parsers.auto (/usr/lib64/node_modules/restler/lib/restler.js:390:7)
    at Request.mixin._encode (/usr/lib64/node_modules/restler/lib/restler.js:194:29)
    at /usr/lib64/node_modules/restler/lib/restler.js:153:16
    at Request.mixin._decode (/usr/lib64/node_modules/restler/lib/restler.js:169:7)
    at IncomingMessage.<anonymous> (/usr/lib64/node_modules/restler/lib/restler.js:146:14)
02/04/2016 10:56:16 PM - ^[[31merror^[[39m: URL [http://10.84.14.46:9100/virtual-machine-interface/293d873d-a42e-4711-9070-fa7fd26bdc4a] returned error ["Cannot delete vmi with existing ref to sub interface"]
02/04/2016 10:56:16 PM - ^[[31merror^[[39m: REST Server Error: Cannot delete vmi with existing ref to sub interface<br>
    at /usr/src/contrail/contrail-web-controller/webroot/config/common/api/configUtil.api.js:142:24
    at /usr/lib64/node_modules/async/lib/async.js:254:17
    at /usr/lib64/node_modules/async/lib/async.js:203:33
    at /usr/lib64/node_modules/async/lib/async.js:251:21
    at /usr/src/contrail/contrail-web-controller/webroot/config/networking/port/api/portsconfig.api.js:1763:13
    at /usr/src/contrail/contrail-web-controller/webroot/config/networking/port/api/portsconfig.api.js:2180:9
    at /usr/lib64/node_modules/async/lib/async.js:254:17
    at /usr/lib64/node_modules/async/lib/async.js:151:21
    at /usr/lib64/node_modules/async/lib/async.js:251:21
    at /usr/src/contrail/contrail-web-controller/webroot/config/networking/port/api/portsconfig.api.js:1876:21

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

Also the error (409, Cannot delete vmi with existing ref to sub interface) returned by the api-server is ignored and the Restler continues to delete the instance_ip from the VMI, Attached( the contrail-logs

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/16903
Submitter: Ignatious Johnson Christopher (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/16903
Committed: http://github.org/Juniper/contrail-controller/commit/a08fc0498bf19abf78bdd4c83d4cf6bde097adff
Submitter: Zuul
Branch: master

commit a08fc0498bf19abf78bdd4c83d4cf6bde097adff
Author: Ignatious Johnson Christopher <email address hidden>
Date: Thu Feb 4 22:47:38 2016 -0800

Changes to not allow deletion of a vmi, if it has sub-interfaces connected to it
Partial-Bug: 1540789

Change-Id: If0f4103285b99714af23bd09284ed43f0a97862b

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

Assigning it to Rahul, as we need additional changes in webui

Revision history for this message
Rahul (rahuls) wrote :

On parent vmi delete, vm ref should be deleted from all subinterfaces by the owner who adds them implicitly when subinterface refs are added to parent vmi.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/17024
Submitter: Balamurugan Gopal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/17030
Submitter: Balamurugan Gopal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/17738
Submitter: Balamurugan Gopal (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/17030
Committed: http://github.org/Juniper/contrail-web-controller/commit/cbc315b164a9b49b8afa4cc3dece0d574dd705eb
Submitter: Zuul
Branch: master

commit cbc315b164a9b49b8afa4cc3dece0d574dd705eb
Author: balamurugang <email address hidden>
Date: Tue Feb 9 21:27:02 2016 +0530

In Edit case of a Parent port, subinterface ref is getting set to empty - Fixed it

* In case of edit a parent port vmiRef was set to empty array because of
that the reference to the subInterface was removed - Fixed it.
* Added The name along with the UUID in the landing page grid.
* In landing page grid row It shows (N more) after 3 data exist In other place
it is followed as 2 so, Changed to 2.
* Not showing the sub-interface if it is a parent port.
* dropdownAutoWidth : false, is added for the drop down's to avoid the drop down
growing beyond the view area.
* Sub-interface cannot be removed In UI the checkbox is disabled
* In Delete case, If it is a parent port We show a message saying even the
subinterface will be delete do you want to conform then sending all the UUID of
children so that the children will be removed first and then the parent will be
removed.

Service Health Check is added in UI.
Closes-Bug: #1549112

API FIX
* The sub-interface remove is not supported in delete we are trying to update the
parent port so it was throwing some error - Fixed it.
* vm ref in subinterface was added for DNS resolution and stats.
Now it is not required
* The subinterface are removed and then the parentport is removed.
* The delete is handled in both delete and delete all

Removed the reference of that VM from the created/edited Sub-interface.
Closes-Bug: #1540789

The flow was like attach of VM will happen first and then the IP was created
because of that the ip was not setting to VM To avoid that
The interface IP is added first and then the compute is getting attachecd.

Removel of VM ref from the subinterface also solves the issue
Instance name is replaced by '-' under monitor-instance tab
Closes-Bug: #1538531

Port page not able to load sometimes
Issue:
TypeError: self.deviceOwner is not a function
- Placed the function return as inline.
So it will be not be looking for that variable.
Closes-Bug: #1542295

Change-Id: I0e198219f85904f30b2420ecac79ce332c1b29bc
Closes-Bug: #1543632

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/17738
Committed: http://github.org/Juniper/contrail-web-controller/commit/7decc642d139e8d45657552ea7b2fe0e33a3690c
Submitter: Zuul
Branch: R3.0

commit 7decc642d139e8d45657552ea7b2fe0e33a3690c
Author: balamurugang <email address hidden>
Date: Tue Feb 9 21:27:02 2016 +0530

In Edit case of a Parent port, subinterface ref is getting set to empty - Fixed it

* In case of edit a parent port vmiRef was set to empty array because of
that the reference to the subInterface was removed - Fixed it.
* Added The name along with the UUID in the landing page grid.
* In landing page grid row It shows (N more) after 3 data exist In other place
it is followed as 2 so, Changed to 2.
* Not showing the sub-interface if it is a parent port.
* dropdownAutoWidth : false, is added for the drop down's to avoid the drop down
growing beyond the view area.
* Sub-interface cannot be removed In UI the checkbox is disabled
* In Delete case, If it is a parent port We show a message saying even the
subinterface will be delete do you want to conform then sending all the UUID of
children so that the children will be removed first and then the parent will be
removed.

Service Health Check is added in UI.
Closes-Bug: #1549112

API FIX
* The sub-interface remove is not supported in delete we are trying to update the
parent port so it was throwing some error - Fixed it.
* vm ref in subinterface was added for DNS resolution and stats.
Now it is not required
* The subinterface are removed and then the parentport is removed.
* The delete is handled in both delete and delete all

Removed the reference of that VM from the created/edited Sub-interface.
Closes-Bug: #1540789

The flow was like attach of VM will happen first and then the IP was created
because of that the ip was not setting to VM To avoid that
The interface IP is added first and then the compute is getting attachecd.

Removel of VM ref from the subinterface also solves the issue
Instance name is replaced by '-' under monitor-instance tab
Closes-Bug: #1538531

Port page not able to load sometimes
Issue:
TypeError: self.deviceOwner is not a function
- Placed the function return as inline.
So it will be not be looking for that variable.
Closes-Bug: #1542295

Change-Id: I0e198219f85904f30b2420ecac79ce332c1b29bc
Closes-Bug: #1543632

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.