nova boot api raises ValueError when incorrect formatted metadata is passed

Bug #1668549 reported by Dinesh Bhor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Medium
Dinesh Bhor
Ocata
Fix Committed
Medium
Matt Riedemann

Bug Description

If you pass incorrect formatted metadata to the 'boot', 'rebuild' and 'image-create'
apis returns following error:

ERROR (ValueError): dictionary update sequence element #0 has length 1; 2 is required

The above error message is not user friendly. It doesn't give proper information to user to change the input accordingly.

Command:
nova boot --image <image-id> --flavor 1 --meta HA_Enabled,qad <instance_name>

Output:
ERROR (ValueError): dictionary update sequence element #0 has length 1; 2 is required

The metdata(--meta) should be in key=value pair.

The same issue is there for 'image-create' and 'rebuild' apis.

description: updated
Changed in python-novaclient:
assignee: nobody → Dinesh Bhor (dinesh-bhor)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

Changed in python-novaclient:
status: New → In Progress
Matt Riedemann (mriedem)
Changed in python-novaclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/444343

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

Reviewed: https://review.openstack.org/441750
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=72a0ec9adcd19a96644638e8324566fcc4af8799
Submitter: Jenkins
Branch: master

commit 72a0ec9adcd19a96644638e8324566fcc4af8799
Author: Dinesh Bhor <email address hidden>
Date: Tue Feb 14 13:10:33 2017 +0530

    Fix ValueError when incorrect metadata passed

    If you pass incorrect formatted metadata to the 'boot', 'rebuild'
    and 'image-create' apis returns following error:

    ERROR (ValueError): dictionary update sequence element #0 has
    length 1; 2 is required

    Caught the ValuError and raised argparse.ArgumentTypeError with
    proper error message.

    Closes-Bug: #1668549
    Change-Id: I14a30b93f4a916fc04610f9e475c12eb352e38c5

Changed in python-novaclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 8.0.0

This issue was fixed in the openstack/python-novaclient 8.0.0 release.

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

Reviewed: https://review.openstack.org/444343
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=b535bbd6831a9747b0b71a9031b1149b48292a94
Submitter: Jenkins
Branch: stable/ocata

commit b535bbd6831a9747b0b71a9031b1149b48292a94
Author: Dinesh Bhor <email address hidden>
Date: Tue Feb 14 13:10:33 2017 +0530

    Fix ValueError when incorrect metadata passed

    If you pass incorrect formatted metadata to the 'boot', 'rebuild'
    and 'image-create' apis returns following error:

    ERROR (ValueError): dictionary update sequence element #0 has
    length 1; 2 is required

    Caught the ValuError and raised argparse.ArgumentTypeError with
    proper error message.

    Closes-Bug: #1668549
    Change-Id: I14a30b93f4a916fc04610f9e475c12eb352e38c5
    (cherry picked from commit 72a0ec9adcd19a96644638e8324566fcc4af8799)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-novaclient 7.1.1

This issue was fixed in the openstack/python-novaclient 7.1.1 release.

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.