incorrect nova api documentation for revert resize

Bug #1593295 reported by Matthew Edmonds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matthew Edmonds

Bug Description

The API documentation for revert resize here: http://developer.openstack.org/api-ref/compute/?expanded=revert-resized-server-revertresize-action-detail#revert-resized-server-revertresize-action makes several statements which appear to have been incorrect copies of statements for the confirm resize API. E.g.:

"You can only confirm the resized server where the status is VERIFY_RESIZE and the vm_status is RESIZED."

and possibly also:

"If the server status remains RESIZED, the request failed. Ensure you meet the preconditions and run the request again. If the request fails again, investigate the compute back end."

since I hope you can revert a resize that never actually made it to status RESIZED, in which case there should be more to it than that.

Tags: api-ref doc
tags: added: api-ref
Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
tags: added: doc
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

mriedem pointed out that RESIZED actually is the correct precondition: https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2449

so this should just be replacing 'confirm' with 'revert' in the other message.

Revision history for this message
Matt Riedemann (mriedem) wrote :
Download full text (4.7 KiB)

The docs should probably also say OS-EXT-STS:vm_state rather than vm_status:

stack@glancev2:~$ nova show resize-test
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | glancev2 |
| OS-EXT-SRV-ATTR:hostname | resize-test |
| OS-EXT-SRV-ATTR:hypervisor_hostname | glancev2 |
| OS-EXT-SRV-ATTR:instance_name | instance-00000003 |
| OS-EXT-SRV-ATTR:kernel_id | b93abb5d-3dd8-486f-aa0d-959d7a97bf5a |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | b4c6f51f-8de6-4b86-b62e-5e4132117ff1 |
| OS-EXT-SRV-ATTR:reservation_id | r-d1vuvolz |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | resized |
| OS-SRV-USG:launched_at | 2016-06-16T16:11:14.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-06-16T16:10:17Z |
| description | - |
| flavor | m1.micro (84) |
| hostId | 327fcfbadc81551dc499dbc773b8fa10d99abe7dcdfdc6790fdee6f3 |
| host_status | UP |
| id | 84925bb1-eb3d-4165-929d-db0480ac7923 |
| image ...

Read more...

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

"and a migration_status of reverted" is also wrong, it should be a task_state of 'resize_reverting':

stack@glancev2:~$ nova resize-revert resize-test
stack@glancev2:~$ nova list
+--------------------------------------+-------------+---------------+------------------+-------------+--------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+---------------+------------------+-------------+--------------------------------+
| 84925bb1-eb3d-4165-929d-db0480ac7923 | resize-test | REVERT_RESIZE | resize_reverting | Running | public=2001:db8::5, 172.24.4.5 |
+--------------------------------------+-------------+---------------+------------------+-------------+--------------------------------+

Changed in nova:
importance: Undecided → Medium
assignee: nobody → Matt Riedemann (mriedem)
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/330672

Changed in nova:
assignee: Matt Riedemann (mriedem) → Matthew Edmonds (edmondsw)
status: Confirmed → In Progress
Changed in nova:
assignee: Matthew Edmonds (edmondsw) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Matthew Edmonds (edmondsw)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit ce01ef30e32feff289474047808220f61fbfff16
Author: Matthew Edmonds <email address hidden>
Date: Thu Jun 16 12:14:42 2016 -0400

    fix errors in revert resize api docs

    The revert resize action's documentation appears to have been copied
    from the documentation for confirm resize, and missed replacing the
    word 'confirm' with 'revert' in one case. This fixes that.

    It also gives incorrect information about the states involved through
    the revert process. This also corrects that.

    Change-Id: Ib2436da238a4a7b71454ecfee81ede4054b3018e
    Closes-Bug: #1593295

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.