the return info is unclear when creating subnetpool without prefixes

Bug #1536479 reported by hgangwx
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Medium
Inessa Vasilevskaya
python-openstackclient
Fix Released
Undecided
Inessa Vasilevskaya

Bug Description

[Summary]
the return info is unclear when creating subnetpool without prefixes

[Topo]
devstack all-in-one node

[Description and expect result]
the return info is clear when creating subnetpool without prefixes

[Reproduceable or not]
reproduceable

[Recreate Steps]
1) create subnetpool without prefixes, the return info is unclear:
root@45-59:/opt/stack/devstack# neutron subnetpool-create pool1
Invalid input for prefixes. Reason: 'None' is not a list.

ISSUE: "Reason: 'None' is not a list" is useless

[Configration]
reproduceable bug, no need

[logs]
reproduceable bug, no need

[Root cause anlyze or debug inf]
reproduceable bug

[Attachment]
None

linwei,wu (wlwwu)
Changed in python-neutronclient:
assignee: nobody → linwei,wu (wlwwu)
Revision history for this message
linwei,wu (wlwwu) wrote :

this may be caused by one argument can't be treated as list.

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

I think at least one --pool-prefix must be specified.

Changed in python-neutronclient:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
linwei,wu (wlwwu) wrote :

this error information is got from neutron side. So I think this is a neutron bug.

Revision history for this message
linwei,wu (wlwwu) wrote :

stack@admin:~/neutron$ grep -n "Invalid input for %" -r ./
./neutron/locale/tr_TR/LC_MESSAGES/neutron.po:1131:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/es/LC_MESSAGES/neutron.po:1055:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/it/LC_MESSAGES/neutron.po:1048:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/ko_KR/LC_MESSAGES/neutron.po:999:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/ru/LC_MESSAGES/neutron.po:1039:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/neutron.pot:1095:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/pt_BR/LC_MESSAGES/neutron.po:1041:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/ja/LC_MESSAGES/neutron.po:1039:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/de/LC_MESSAGES/neutron.po:1054:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/fr/LC_MESSAGES/neutron.po:1164:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/zh_CN/LC_MESSAGES/neutron.po:963:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/locale/zh_TW/LC_MESSAGES/neutron.po:966:msgid "Invalid input for %(attr)s. Reason: %(reason)s."
./neutron/api/v2/attributes.py:966: msg = _("Invalid input for %(attr)s. "
Binary file ./neutron/api/v2/attributes.pyc matches
stack@admin:~/neutron$ neutron subnetpool-create abc
Invalid input for prefixes. Reason: 'None' is not a list.

affects: python-neutronclient → neutron
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Hi Linwei,
Cant this be fixed by just defaulting --pool-prefix with [] in the neutronclient side?
Would it help changing it in neutron?

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

Just another point:
In neutronclient, where ever we have defined action=append, there is a check (if clause ) in the args2body
Example:
https://github.com/openstack/python-neutronclient/blob/master/neutronclient/neutron/v2_0/fw/firewall.py#L72

This is missing in the current code for subnetpool

Changed in neutron:
importance: High → Medium
linwei,wu (wlwwu)
affects: neutron → python-neutronclient
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

If you are not working on it, then can I take this up ? Seems to be a small fix

Revision history for this message
linwei,wu (wlwwu) wrote :

Hi reedip,
I will continue to do it this week... thanks!

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

okay, thanks for the information :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/298598

Changed in python-neutronclient:
status: Confirmed → In Progress
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Found a duplicate bug: https://bugs.launchpad.net/neutron/+bug/1477889 assigned to me.... :)
Looks like you beat me to it

Changed in python-neutronclient:
assignee: linwei,wu (wlwwu) → Inessa Vasilevskaya (ivasilevskaya)
Revision history for this message
Richard Theis (rtheis) wrote :

It appears that this bug impact OSC too:

$ openstack subnet pool create test
HttpException: Bad Request

Changed in python-openstackclient:
assignee: nobody → Inessa Vasilevskaya (ivasilevskaya)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/309954

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/304161
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=37ec942417c77b3104ff69a8b33a5549fb3d0c98
Submitter: Jenkins
Branch: master

commit 37ec942417c77b3104ff69a8b33a5549fb3d0c98
Author: Inessa Vasilevskaya <email address hidden>
Date: Mon Apr 11 17:22:48 2016 +0300

    Fixes unclear error when no --pool-prefix given

    --pool-prefix is required on subnetpool creation.
    refactor: removed unused 'for_create' argument in
    add_updatable_arguments in subnetpool module.
    Closes-bug: #1536479

    Change-Id: I79573369cb95c0b090e9ebfea9af40485d968e2f

Changed in python-neutronclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/309954
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=08759b853a2611144a2d3f0e9216d6801fc23ef2
Submitter: Jenkins
Branch: master

commit 08759b853a2611144a2d3f0e9216d6801fc23ef2
Author: Inessa Vasilevskaya <email address hidden>
Date: Mon Apr 25 12:22:14 2016 +0000

    Fixes BadRequest when no --pool-prefix given

    --pool-prefix is made required on subnetpool creation.
    Closes-bug: #1536479

    Change-Id: I3d183e45e9b96bc08011c36f45ec2b7a9c01b627

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.5.0

This issue was fixed in the openstack/python-openstackclient 2.5.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-neutronclient (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/298598
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/338310

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (stable/mitaka)

Reviewed: https://review.openstack.org/338310
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=a04f98c9932eacf58275356a8be372cdae939c95
Submitter: Jenkins
Branch: stable/mitaka

commit a04f98c9932eacf58275356a8be372cdae939c95
Author: Inessa Vasilevskaya <email address hidden>
Date: Mon Apr 11 17:22:48 2016 +0300

    Fixes unclear error when no --pool-prefix given

    --pool-prefix is required on subnetpool creation.
    refactor: removed unused 'for_create' argument in
    add_updatable_arguments in subnetpool module.
    Closes-bug: #1536479

    Change-Id: I79573369cb95c0b090e9ebfea9af40485d968e2f
    (cherry-picked from commit 37ec942417c77b3104ff69a8b33a5549fb3d0c98)

tags: added: in-stable-mitaka
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-neutronclient 5.0.0

This issue was fixed in the openstack/python-neutronclient 5.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.