openstack router remove/add command out without error, when it fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
New
|
Undecided
|
Unassigned |
Bug Description
the command fails but the failure is not shown if you don't use --debug option:
(overcloud) [stack@undercloud-0 ~]$ openstack router remove subnet router selfservice ; echo $?
0
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$ openstack router add subnet router selfservice ; echo $?
0
(overcloud) [stack@undercloud-0 ~]$ openstack router remove subnet router selfservice --debug
START with options: [u'router', u'remove', u'subnet', u'router', u'selfservice', u'--debug']
...
RESP: [409] Content-Length: 268 Content-Type: application/json Date: Fri, 22 Mar 2019 09:29:10 GMT X-Openstack-
RESP BODY: {"NeutronError": {"message": "Router interface for subnet ca7de33b-
PUT call to network for http://
Manager unknown ran task network.
clean_up RemoveSubnetFro
END return value: 0
(overcloud) [stack@undercloud-0 ~]$
Reproduction example:
-create a router:
(overcloud) [stack@undercloud-0 ~]$ history | grep router
18 openstack router create router
19 openstack router add subnet router selfservice
20 openstack router set router --external-gateway public
-associate a floating ip to a vm:
56 openstack server add floating ip provider-instance 10.0.0.216
-try to add/remove the subnet
61 openstack router remove subnet router selfservice --debug
62 openstack router add subnet router selfservice --debug
Logs and versio:
(overcloud) [stack@undercloud-0 ~]$ yum info openstack-neutron
Loaded plugins: search-
Available Packages
Name : openstack-neutron
Arch : noarch
Epoch : 1
Version : 13.0.3
Release : 0.2019011913491
Size : 28 k
Repo : rhelosp-
Summary : OpenStack Networking Service
URL : http://
License : ASL 2.0
Description :
: Neutron is a virtual network service for Openstack. Just like
: OpenStack Nova provides an API to dynamically request and configure
: virtual servers, Neutron provides an API to dynamically request and
: configure virtual networks. These networks connect "interfaces" from
: other OpenStack services (e.g., virtual NICs from Nova VMs). The
: Neutron API supports extensions to provide advanced network
: capabilities (e.g., QoS, ACLs, network monitoring, etc.)
(overcloud) [stack@undercloud-0 ~]$ cat /etc/rhosp-release
Red Hat OpenStack Platform release 14.0.1 RC (Rocky)
(overcloud) [stack@undercloud-0 ~]$ openstack server add floating ip provider-instance 10.0.0.216
(overcloud) [stack@undercloud-0 ~]$ openstack router remove subnet router selfservice
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$ openstack router show router
+------
| Field | Value |
+------
| admin_state_up | UP |
| availability_
| availability_zones | nova |
| created_at | 2019-03-
| description | |
| distributed | None |
| external_
| flavor_id | None |
| ha | None |
| id | daa62d34-
| interfaces_info | [{"subnet_id": "ca7de33b-
| name | router |
| project_id | c4b7aee7b6404c2
| revision_number | 4 |
| routes | |
| status | ACTIVE |
| tags | |
| updated_at | 2019-03-
+------
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$ openstack router remove subnet router selfservice ; echo $?
0
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$ openstack router add subnet router selfservice ; echo $?
0
(overcloud) [stack@undercloud-0 ~]$ openstack router remove subnet router selfservice --debug
START with options: [u'router', u'remove', u'subnet', u'router', u'selfservice', u'--debug']
...
....
489/remove_
RESP: [409] Content-Length: 268 Content-Type: application/json Date: Fri, 22 Mar 2019 09:29:10 GMT X-Openstack-
RESP BODY: {"NeutronError": {"message": "Router interface for subnet ca7de33b-
PUT call to network for http://
Manager unknown ran task network.
clean_up RemoveSubnetFro
END return value: 0
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$ openstack router add subnet router selfservice --debug
START with options: [u'router', u'add', u'subnet', u'router', u'selfservice', u'--debug']
.......
/10.0.0.
Manager unknown ran task network.GET.routers in 0.708297967911s
Manager unknown running task network.
REQ: curl -g -i -X PUT http://
http://
RESP: [400] Content-Length: 162 Content-Type: application/json Date: Fri, 22 Mar 2019 09:29:40 GMT X-Openstack-
RESP BODY: {"NeutronError": {"message": "Bad router request: Router already has a port on subnet ca7de33b-
PUT call to network for http://
Manager unknown ran task network.
clean_up AddSubnetToRouter:
END return value: 0
(overcloud) [stack@undercloud-0 ~]$
(overcloud) [stack@undercloud-0 ~]$ openstack router show router
+------
| Field | Value |
+------
| admin_state_up | UP |
| availability_
| availability_zones | nova |
| created_at | 2019-03-
| description | |
| distributed | None |
| external_
| flavor_id | None |
| ha | None |
| id | daa62d34-
| interfaces_info | [{"subnet_id": "ca7de33b-
| name | router |
| project_id | c4b7aee7b6404c2
| revision_number | 4 |
| routes | |
| status | ACTIVE |
| tags | |
| updated_at | 2019-03-
+------
This bug should be filed against python- openstackclient