lbaas: command "--admin-state-down" doesn't work in neutron lb-vip.

Bug #1520156 reported by hgangwx
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Expired
Undecided
Unassigned

Bug Description

in openstack kilo ubuntu 14.04 setup, when try to create or update lb vip admin state using command "--admin-state-down", it will be failed, this command can't be accepted, if want to set vip admin state, we have issue command "--admin-state-up False/True" instead.

[root@nsj1 ~]# neutron lb-vip-create
usage: neutron lb-vip-create [-h] [-f {shell,table,value}] [-c COLUMN]
                             [--max-width <integer>] [--prefix PREFIX]
                             [--request-format {json,xml}]
                             [--tenant-id TENANT_ID] [--address ADDRESS]
                             [--admin-state-down] >>>>>>>>>>>>>>>>
                             [--connection-limit CONNECTION_LIMIT]
                             [--description DESCRIPTION] --name NAME
                             --protocol-port PROTOCOL_PORT --protocol
                             {TCP,HTTP,HTTPS} --subnet-id SUBNET
                             POOL
neutron lb-vip-create: error: too few arguments

create or update will be failed command including parameter "--admin_state_down".

[root@nsj1 ~]# neutron lb-vip-create --connection-limit 0 --description vip --name lb_vip --protocol-port 80 --protocol TCP --subnet-id 0f27a0a7-5a43-48f6-bcd3-e03dd7b39254 uat-lb-alan --admin_state_down
Bad Request (HTTP 400) (Request-ID: req-a8df8529-0c3e-484c-92a1-61447029de15)

[root@nsj1 ~]# neutron lb-vip-update 5c8d692e-5582-4f48-8835-5d7a08f0d9c1 --admin_state_down
Bad Request (HTTP 400) (Request-ID: req-8fd0f8c4-7e2c-4dd4-b67c-9b367aa2d6b1)

if using "--admin_state_up False" or "--admin_state_up True", then it will be successful.

[root@nsj1 ~]# neutron lb-vip-update 5c8d692e-5582-4f48-8835-5d7a08f0d9c1 --admin_state_up False
Updated vip: 5c8d692e-5582-4f48-8835-5d7a08f0d9c1

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Could you clarify in which command --admin-state-down does not work? lb-vip-create? lb-vip-update?

For lb-vip-update, we don't have a plan to support --admin-state-down.
Instead we are discussing to register --admin-state-up True/False explicitly.

For lb-vip-create, could you provide an exact command-line example?
In the master of neutronclient, it works as expected.

I would like to know your neutronclient version.
Kilo is not shipped with Ubuntu 14.04 so I think you got neutroncleint from somewhere (cloud archive or pypi).

ubuntu@dev16:~$ neutron lb-vip-create --admin-state-down --name vip1 --protocol-port 80 --protocol HTTP --subnet-id mysubnet mypool
Created a new vip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 192.168.100.2 |
| admin_state_up | False |
| connection_limit | -1 |
| description | |
| id | c3658b98-44d6-4c4f-bf7d-7f1818282524 |
| name | vip1 |
| pool_id | ada28c0c-8709-446c-9b57-0a208eeae411 |
| port_id | 3f6e7057-d646-4254-a768-54ff138e567c |
| protocol | HTTP |
| protocol_port | 80 |
| session_persistence | |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | 92672a45-e590-4b35-a662-1ea9c36f4cec |
| tenant_id | 8f0ebf767043483a987736c8c684178d |
+---------------------+--------------------------------------+

Changed in python-neutronclient:
status: New → Incomplete
Jas (singhj)
Changed in python-neutronclient:
assignee: nobody → Jas (singhj)
assignee: Jas (singhj) → nobody
Revision history for this message
Jas (singhj) wrote :

Slightly off-topic but in looking into this, I realized that "-h" on update/delete commands does not print the full usage string, whereas on create operations, when you do "-h", the full list of acceptable args is printed:
usage: neutron subnet-create [-h]
                             [-f {html,json,json,shell,table,value,yaml,yaml}]
                             [-c COLUMN] [--max-width <integer>] [--noindent]
                             [--prefix PREFIX] [--request-format {json,xml}]
                             [--tenant-id TENANT_ID] [--name NAME]
                             [--gateway GATEWAY_IP | --no-gateway]
                             [--allocation-pool start=IP_ADDR,end=IP_ADDR]
                             [--host-route destination=CIDR,nexthop=IP_ADDR]
                             [--dns-nameserver DNS_NAMESERVER]
                             [--disable-dhcp] [--enable-dhcp]
                             [--ip-version {4,6}]
                             [--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
                             [--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]
                             [--subnetpool SUBNETPOOL]
                             [--prefixlen PREFIX_LENGTH]
                             NETWORK [CIDR]

vs.
usage: neutron net-update [-h] [--request-format {json,xml}]
                          [--qos-policy QOS_POLICY | --no-qos-policy]
                          NETWORK

is there a specific reason for this?

The reason I'm asking this in relation to this bug is because from doing " neutron lb-vip-update -h", I should ideally be able to know whether or not the command is supported. --admin-state-up works but it isn't even listed as a perspective argument.

Revision history for this message
hgangwx (hgangwx) wrote :

Hi Akihiro,

Can u tell me how to check the neutronclient version? maybe it is caused by this, because I checked it in another kilo ubuntu setup, it can be configured.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

neutron --version shows the version of neutronclient.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

If it is a bug about the help message, it is a valid bug, but the bug description and summary are completely inappropriate.
The incomplete help message for *-update in neutronclient is a known problem and there are ongoing effort to add it.

Revision history for this message
hgangwx (hgangwx) wrote :

[root@nsj1 ~]#
[root@nsj1 ~]# neutron --version
3.1.0

neutron lb-vip-update ef4b4f74-3c6f-408f-9f06-76da2486ff92 --admin-state-down

Unrecognized attribute(s) 'admin_state_down'

there is no such issue when creating lb vip.

neutron lb-vip-create --address 10.10.2.201 --admin-state-down --name vip --protocol-port 80 --protocol HTTP --subnet-id d980973d-8d86-4494-90e0-f5039ca87cb4 pool1

Created a new vip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 10.10.2.201 |
| admin_state_up | False |
| connection_limit | -1 |
| description | |
| id | 1bf31c39-02f3-4a54-863a-a2be2b0501c7 |
| name | vip |
| pool_id | c1e9b02a-10d3-437a-8cab-375f3cd8c043 |
| port_id | f090a388-9cde-49d4-a175-340a85fa093b |
| protocol | HTTP |
| protocol_port | 80 |
| session_persistence | |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | d980973d-8d86-4494-90e0-f5039ca87cb4 |
| tenant_id | 2decc6502cb043f29ab6217040bb2367 |
+---------------------+--------------------------------------+
[root@nsj1 ~]#

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

admin-state-down is available for *-create commands in NeutronClient
admin-state-up is available for *-update commands in NeutronClient

However, as Akihiro San mentioned above , the *-update is missing in several of the Neutron Commands ( lb being one of them)
For lbaas-v2, changes are already submitted, however lbaas-v1 is deprecated from M-release.

If backport is required for lbaas-v1, then this can be taken up.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-neutronclient because there has been no activity for 60 days.]

Changed in python-neutronclient:
status: Incomplete → Expired
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.