4.1 vCenter: perms2 property is passed without ‘owner’ in PUT request . Api-server should reject this.

Bug #1738255 reported by Luke Bockelmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
High
Siva Bavanasi
R4.0
Fix Committed
High
Siva Bavanasi
R4.1
Fix Committed
High
Siva Bavanasi
Trunk
Fix Committed
High
Siva Bavanasi

Bug Description

When a network is created from webui/vcenter, it is issuing a POST request followed by a PUT request. Network creation is fine, but in the PUT request, not sure why perms2 property is again passed without ‘owner’. Api-server is not rejecting such request. So made that change so that api-server rejects such requests when perms2 without owner is present in PUT request.

2017 Dec 14 07:13:41.783809 contrail-41-controller-c [:contrail-api:] : VncApiConfigLog: [VncApiCommon: identifier_uuid = 8d609a79-5d0a-3cbe-b341-a31216188606, object_type = virtual_network, identifier_name = default-domain:vCenter:abc1, url = http://10.183.10.13:8082/virtual-network/8d609a79-5d0a-3cbe-b341-a31216188606, operation = http_put, useragent = Restler for node.js, remote_ip = 10.183.10.13:8082, body = {"virtual-network": {"virtual_network_properties": {"mirror_destination": false, "allow_transit": false, "rpf": "enable"}, "import_route_target_list": {"route_target": []}, "fq_name": ["default-domain", "vCenter", "abc1"], "uuid": "8d609a79-5d0a-3cbe-b341-a31216188606", "address_allocation_mode": "user-defined-subnet-only", "network_policy_refs": [], "security_logging_object_refs": [], "ecmp_hashing_include_fields": {}, "provider_properties": null, "qos_config_refs": [], "virtual_network_refs": [], "route_target_list": {"route_target": []}, "export_route_target_list": {"route_target": []}, "route_table_refs": [], "tag_refs": [], "perms2": {"owner_access": 7, "global_access": 0, "share": []}, "display_name": "abc1", "network_ipam_refs": [{"to": ["default-domain", "vCenter", "vCenter-ipam"], "attr": {"ipam_subnets": [{"subnet": {"ip_prefix": "76.76.76.0", "ip_prefix_len": 24}, "dns_server_address": null, "enable_dhcp": true, "default_gateway": "76.76.76.1", "subnet_uuid": "a0fbae77-a2cb-4fea-bc83-cbcd3754b713", "subnet_name": "a0fbae77-a2cb-4fea-bc83-cbcd3754b713", "addr_from_start": true}]}}]}}, domain = default-domain]

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

Review in progress for https://review.opencontrail.org/38343
Submitter: Suresh Vinapamula (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/38347
Submitter: Suresh Vinapamula (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/38348
Submitter: Suresh Vinapamula (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/38349
Submitter: Suresh Vinapamula (<email address hidden>)

Revision history for this message
Suresh Vinapamula (sureshk) wrote :

Anish,

Could you please reassign to fix the UI part?

thanks
Suresh

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

Reviewed: https://review.opencontrail.org/38343
Committed: http://github.com/Juniper/contrail-controller/commit/781829d8dd4e7359a3453d5a2b62c781c5c096fc
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 781829d8dd4e7359a3453d5a2b62c781c5c096fc
Author: Suresh Venkata <email address hidden>
Date: Thu Dec 14 11:05:08 2017 -0800

reject PUT messages with perms2 but owner is missing

Description: Owner is mandatory field and must be present.
Marked it partial, because webui must fix its call when
passing perms2

Change-Id: I5ceb6292befaeb6aee8457fce7eb3a7555259cd3
Partial-Bug: #1738255

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

Reviewed: https://review.opencontrail.org/38347
Committed: http://github.com/Juniper/contrail-controller/commit/8c761dd508ea698bc6221deaf9b02bf674d4fb30
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 8c761dd508ea698bc6221deaf9b02bf674d4fb30
Author: Suresh Venkata <email address hidden>
Date: Thu Dec 14 11:36:10 2017 -0800

reject PUT messages with perms2 but owner is missing

Description: Owner is mandatory field and must be present.
Marked it partial, because webui must fix its call when
passing perms2

Change-Id: I5ceb6292befaeb6aee8457fce7eb3a7555259cd3
Partial-Bug: #1738255

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

Reviewed: https://review.opencontrail.org/38348
Committed: http://github.com/Juniper/contrail-controller/commit/e4b1da958ae125a2fe38937eb96ec77a8b809f80
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit e4b1da958ae125a2fe38937eb96ec77a8b809f80
Author: Suresh Venkata <email address hidden>
Date: Thu Dec 14 11:36:10 2017 -0800

reject PUT messages with perms2 but owner is missing

Description: Owner is mandatory field and must be present.
Marked it partial, because webui must fix its call when
passing perms2

Change-Id: I5ceb6292befaeb6aee8457fce7eb3a7555259cd3
Partial-Bug: #1738255

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

Reviewed: https://review.opencontrail.org/38349
Committed: http://github.com/Juniper/contrail-controller/commit/6ad217f0ab834476a48677f0d744788a27136012
Submitter: Zuul (<email address hidden>)
Branch: master

commit 6ad217f0ab834476a48677f0d744788a27136012
Author: Suresh Venkata <email address hidden>
Date: Thu Dec 14 11:36:10 2017 -0800

reject PUT messages with perms2 but owner is missing

Description: Owner is mandatory field and must be present.
Marked it partial, because webui must fix its call when
passing perms2

Change-Id: I5ceb6292befaeb6aee8457fce7eb3a7555259cd3
Partial-Bug: #1738255

Revision history for this message
Naga Kiran (nagakiran) wrote :

Noticed 2 issues here:
1. For networks created by “vcenter-plugin”, “owner” is not there under “perms2”. When UI is issuing PUT later, it's sending same perms2 object which doesn’t have “owner” field.
2. will check on UI why perms2 is being sent as we strip-off the fields that are not modified before sending to API server and fix it

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

Review in progress for https://review.opencontrail.org/38786
Submitter: Siva Bavanasi (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/38786
Committed: http://github.com/Juniper/contrail-web-controller/commit/4555ea5c35e03334e84194f8369f44be910c01df
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 4555ea5c35e03334e84194f8369f44be910c01df
Author: Siva Kumar Bavanasi <email address hidden>
Date: Wed Jan 10 17:34:23 2018 +0530

Fixed the issue 'owner is missing in perms2 for vcenter'

and also fixed The issue 'Not showing list of available pools'.

Change-Id: I8b0a5b3be291ca1d00d9e72f341bac7fbc87acdb
Partial-bug: #1738255

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

Review in progress for https://review.opencontrail.org/39321
Submitter: Siva Bavanasi (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/39322
Submitter: Siva Bavanasi (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/39323
Submitter: Siva Bavanasi (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/39321
Committed: http://github.com/Juniper/contrail-web-controller/commit/07b440b6bdce8f831f8805a58618b2a5ad003762
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 07b440b6bdce8f831f8805a58618b2a5ad003762
Author: Siva Kumar Bavanasi <email address hidden>
Date: Wed Jan 10 17:34:23 2018 +0530

Fixed the issue 'owner is missing in perms2 for vcenter'

and also fixed The issue 'Not showing list of available pools'.

Change-Id: I8b0a5b3be291ca1d00d9e72f341bac7fbc87acdb
Partial-bug: #1738255
(cherry picked from commit 4555ea5c35e03334e84194f8369f44be910c01df)

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

Reviewed: https://review.opencontrail.org/39322
Committed: http://github.com/Juniper/contrail-web-controller/commit/a100d54c8d52bd536046667985efe4803f98d26f
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit a100d54c8d52bd536046667985efe4803f98d26f
Author: Siva Kumar Bavanasi <email address hidden>
Date: Wed Jan 10 17:34:23 2018 +0530

Fixed the issue 'owner is missing in perms2 for vcenter'

and also fixed The issue 'Not showing list of available pools'.

Change-Id: I8b0a5b3be291ca1d00d9e72f341bac7fbc87acdb
Partial-bug: #1738255
(cherry picked from commit 4555ea5c35e03334e84194f8369f44be910c01df)

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

Reviewed: https://review.opencontrail.org/39323
Committed: http://github.com/Juniper/contrail-web-controller/commit/d8db0907278446ac127a582656ad3468f9a25d7c
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit d8db0907278446ac127a582656ad3468f9a25d7c
Author: Siva Kumar Bavanasi <email address hidden>
Date: Wed Jan 10 17:34:23 2018 +0530

Fixed the issue 'owner is missing in perms2 for vcenter'

and also fixed The issue 'Not showing list of available pools'.

Change-Id: I8b0a5b3be291ca1d00d9e72f341bac7fbc87acdb
Partial-bug: #1738255
(cherry picked from commit 4555ea5c35e03334e84194f8369f44be910c01df)

Sachin Bansal (sbansal)
information type: Proprietary → Public
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.