os-networks extension displays cidr incorrectly

Bug #1376945 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

The nova-networks extension is improperly converting cidr values to strings:

$ nova network-list

shows a list of ips for cidr:

[u'192.168.50.0', u'192.168.50.1', u'192.168.50.2', u'192.168.50.3',...]

This is possibly due to the extension being updated to use objects, but I don't recall seeing it previously, so it is possible something changed the way an ipnetwork is converted to json so that it now iterates through the object isntead of printing it as a string.

Revision history for this message
Matt Riedemann (mriedem) wrote :

So I'd think it's related to this:

https://review.openstack.org/#/c/93759/

But maybe it's related to bumping the version of netaddr to 0.7.12:

https://review.openstack.org/#/c/118224/

Back when https://review.openstack.org/#/c/93759/ was being tested, we were using netaddr 0.7.10 in the gate.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Looks like it was this change:

https://review.openstack.org/#/c/109106/

But os_networks wasn't updated.

tags: added: api network unified-objects
Changed in nova:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (proposed/juno)

Fix proposed to branch: proposed/juno
Review: https://review.openstack.org/125815

Changed in nova:
assignee: Vish Ishaya (vishvananda) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Vish Ishaya (vishvananda)
Revision history for this message
John Garbutt (johngarbutt) wrote :

adding rc tag, just in case, not to trigger an RC, just something we could include in the RC

tags: added: juno-rc-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :

I don't consider this a trigger for juno-rc2 given it's been broken since July:

https://review.openstack.org/#/c/109106/

And it's not causing the API to fail, it's just that the output in the response is in a different format - which is bad if you're parsing that data, but I wouldn't consider a blocker for the Juno release.

I asked John Garbutt about it and he said if we do an rc2 it could be in the list but not a trigger for rc2.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/125814
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=da25467aafce9b62dd3fdff9d6cd84121fbee17e
Submitter: Jenkins
Branch: master

commit da25467aafce9b62dd3fdff9d6cd84121fbee17e
Author: Vishvananda Ishaya <email address hidden>
Date: Wed Oct 1 07:43:19 2014 -0700

    Fix the os_networks display to show cidr properly

    Converting network_get and network_get_all to use objects broke
    the display of the os_networks extension, because IPAddress
    fields in Network objects are dumped as lists by the jsonutils
    extension. We therefore must explicitly convert these object
    field values to string.

    The tests are updated to use objects so that we pick up bugs
    like this in the future. Incorrect assertEqual parameter order
    is fixed in the tests too since these are comparing dicts and
    it's not fun debugging a MismatchError when the reference/actual
    values are backwards.

    Change-Id: I0f05a9b4d7bbe5fe0a3b110c191455ca7edefcb5
    Closes-Bug: #1376945
    Co-authored-by: Matt Riedemann <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc2
Thierry Carrez (ttx)
tags: removed: juno-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (proposed/juno)

Reviewed: https://review.openstack.org/125815
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0aeffa12a62604ee3238323d969345e41937b642
Submitter: Jenkins
Branch: proposed/juno

commit 0aeffa12a62604ee3238323d969345e41937b642
Author: Vishvananda Ishaya <email address hidden>
Date: Wed Oct 1 07:43:19 2014 -0700

    Fix the os_networks display to show cidr properly

    Converting network_get and network_get_all to use objects broke
    the display of the os_networks extension, because IPAddress
    fields in Network objects are dumped as lists by the jsonutils
    extension. We therefore must explicitly convert these object
    field values to string.

    The tests are updated to use objects so that we pick up bugs
    like this in the future. Incorrect assertEqual parameter order
    is fixed in the tests too since these are comparing dicts and
    it's not fun debugging a MismatchError when the reference/actual
    values are backwards.

    Change-Id: I0f05a9b4d7bbe5fe0a3b110c191455ca7edefcb5
    Closes-Bug: #1376945
    Co-authored-by: Matt Riedemann <email address hidden>
    (cherry picked from commit da25467aafce9b62dd3fdff9d6cd84121fbee17e)

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc2 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)
Download full text (7.7 KiB)

Reviewed: https://review.openstack.org/128894
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9825784742d010a902ff149765269ad32a8a0dfd
Submitter: Jenkins
Branch: master

commit 7c9aa6da92805f20083203a6ec8f93b1b592fc13
Author: He Jie Xu <email address hidden>
Date: Sun Oct 5 00:20:01 2014 +0800

    Fix pci_request_id break the upgrade from icehouse to juno

    commit a8a5d44c8aca218f00649232c2b8a46aee59b77e add pci_request_id
    as one item for the request_network tuple. But the icehouse code
    assume only three items in the tuple.

    This patch filters pci_request_id out from the tuple.

    Cherry-Pick from:
    https://review.openstack.org/#/c/126144/6

    Change-Id: I991e1c68324fe92fac647583f3ec8f6aec637913
    Closes-Bug: #1377447

commit 10a5eecd0973096b57efd31f8b27d7295a44ab89
Author: Andreas Jaeger <email address hidden>
Date: Thu Oct 9 12:22:36 2014 +0200

    Updated translations

    Commands run:-
    $ python setup.py extract_messages
    $ python setup.py update_catalog --no-fuzzy-matching \
      --ignore-obsolete=true
    $ source \
      ../openstack-infra/project-config/jenkins/scripts/common_translation_update.sh
    $ setup_loglevel_vars
    $ cleanup_po_file nova

    Change-Id: I64b2b468f7edd44dbb445b5b4e68b65c3fa53d9e

commit 3f9003270efd9ac036f3c229b36baa0bb05203bf
Author: Russell Bryant <email address hidden>
Date: Wed Oct 8 12:14:31 2014 +0000

    Fix broken cert revocation

    Cert revocation was broken by
    32b0adb591f80ad2c5c19519b4ffc2b55dbea672. os.chdir() never returns
    anything, so this method would always raise an exception. The proper
    way to handle an error from os.chdir() is to catch OSError.

    There were existing tests for this code, but they conveniently mocked
    os.chdir() to return values that are never actually returned. The
    tests were fixed to match the real behavior.

    Change-Id: I7549bb60a7d43d53d6f81eecea31cbb9720cc8b6
    Closes-bug: #1376368
    (cherry picked from commit c8538208da00c3b0d0646629c9d668aa69944b85)

commit 6ed57972093835f449ad645b3783bbb8b3c4245e
Author: Russell Bryant <email address hidden>
Date: Fri Oct 3 16:41:03 2014 -0400

    Update rpc version aliases for juno

    Update all of the rpc client API classes to include a version alias
    for the latest version implemented in Juno. This alias is needed when
    doing rolling upgrades from Juno to Kilo. With this in place, you can
    ensure all services only send messages that both Juno and Kilo will
    understand.

    Closes-bug: #1378786
    Change-Id: Ia81538130bf8530b70b5f55c7a3d565903ff54b4
    (cherry picked from commit f98d725103c53e767a1cddb0b7e2c3822309db17)

commit ee3594072a7ef1c3f5661021fb31118069cbd646
Author: Tristan Cacqueray <email address hidden>
Date: Fri Oct 3 19:53:42 2014 +0000

    Mask passwords in exceptions and error messages

    When a ProcessExecutionError is thrown by processutils.ssh_execute(),
    the exception may contain information such as password. Upstream
    applications that just log the message (as several appear to do)
    could inadvertently expose these passwords to a u...

Read more...

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.