power_state of nova diagnostics is number instead of string

Bug #1587780 reported by Eli Qiao
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Eli Qiao

Bug Description

taget@taget-ThinkStation-P300:~/devstack$ nova diagnostics 87c91515-acc7-4953-b0a3-f942484e986e
ERROR (Conflict): Cannot 'get_diagnostics' instance 87c91515-acc7-4953-b0a3-f942484e986e while it is in power_state 4 (HTTP 409) (Request-ID: req-caaf21fc-fa11-4382-9f87-c23928b46eb1)

We need to map instance.power_state to string by
STATE_MAP = {
    NOSTATE: 'pending',
    RUNNING: 'running',
    PAUSED: 'paused',
    SHUTDOWN: 'shutdown',
    CRASHED: 'crashed',
    SUSPENDED: 'suspended',
}

Tags: api
Eli Qiao (taget-9)
Changed in nova:
assignee: nobody → Eli Qiao (taget-9)
tags: added: api
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Changed in nova:
status: Confirmed → In Progress
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/335776

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

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

commit 4e750dfcc6013e980b3d3698115c6b6b8ad3c96b
Author: Eli Qiao <email address hidden>
Date: Thu Jun 30 10:40:17 2016 +0800

    Mapping power_state from integer to string

    To improve user experience, mapping an integer code of power state to
    real string.

    Closes-Bug: #1587780
    Change-Id: I4fbeab0f31492a8aa153044f14f588656f3e332f

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

This issue was fixed in the openstack/nova 14.0.0.0b2 development milestone.

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.