The image name of a shelved server should contain a server name.

Bug #1232991 reported by Ken'ichi Ohmichi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Ken'ichi Ohmichi

Bug Description

The shelve feature powers a server off, and creates a snapshot of the server.
The snapshot image name is "instance-XXXXXXXXX-shelved" and it doesn't contain a server name like the following:

$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------+
| ee662daa-8eb6-4596-b8b8-9c7d76183d65 | vm01 | ACTIVE | None | Running | private=10.0.0.5 |
+--------------------------------------+------+--------+------------+-------------+------------------+
$ nova shelve vm01
$ nova list
+--------------------------------------+------+-------------------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+-------------------+------------+-------------+------------------+
| ee662daa-8eb6-4596-b8b8-9c7d76183d65 | vm01 | SHELVED_OFFLOADED | None | Shutdown | private=10.0.0.5 |
+--------------------------------------+------+-------------------+------------+-------------+------------------+
$ nova image-list
+--------------------------------------+---------------------------------+--------+--------------------------------------+
| ID | Name | Status | Server |
+--------------------------------------+---------------------------------+--------+--------------------------------------+
| 9cd7f2fb-f088-4634-9452-a5dd2ef4b3b5 | instance-00000004-shelved | ACTIVE | ee662daa-8eb6-4596-b8b8-9c7d76183d65 |
+--------------------------------------+---------------------------------+--------+--------------------------------------+

Note: "nova shelve" command is review in progress.
(https://review.openstack.org/#/c/48596/)

Changed in nova:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
Changed in nova:
status: New → In Progress
Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

"instance-XXXXXXXXX" is OS-EXT-SRV-ATTR:instance_name, and a non-admin cannot see it.
Also a non-admin user can use this API in the default.

So if a shelved snapshot name contains "instance-XXXXXXXXX" as current behavior, the user cannot understand the reason of its name.

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

Reviewed: https://review.openstack.org/48886
Committed: http://github.com/openstack/nova/commit/abec25a7bafa4ca320ae222a34fc45ad3c1d27a8
Submitter: Jenkins
Branch: master

commit abec25a7bafa4ca320ae222a34fc45ad3c1d27a8
Author: Ken'ichi Ohmichi <email address hidden>
Date: Mon Sep 30 13:24:24 2013 +0900

    Fix the image name of a shelved server

    The shelve feature powers a server off, and creates a snapshot of the
    server. The snapshot image name is "instance-XXXXXXXXX-shelved" and it
    doesn't contain a server name like the following:

      $ nova list
      +----+------+--------+------------+-------------+------------------+
      | ID | Name | Status | Task State | Power State | Networks |
      +----+------+--------+------------+-------------+------------------+
      | .. | vm01 | ACTIVE | None | Running | private=10.0.0.5 |
      +----+------+--------+------------+-------------+------------------+
      $ nova shelve vm01
      $ nova image-list
      +----+---------------------------------+--------+--------+
      | ID | Name | Status | Server |
      +----+---------------------------------+--------+--------+
      | .. | instance-00000004-shelved | ACTIVE | .. |
      +----+---------------------------------+--------+--------+
      $

    "instance-XXXXXXXXX" is OS-EXT-SRV-ATTR:instance_name, and a non-admin
    cannot see it.

    This patch changes the name to "<server name>-shelved", so that a non-
    admin user can know the server name of a shelved image:

      $ nova image-list
      +----+--------------------+--------+--------+
      | ID | Name | Status | Server |
      +----+--------------------+--------+--------+
      | .. | vm01-shelved | ACTIVE | .. |
      +----+--------------------+--------+--------+
      $

    Closes-Bug: 1232991

    Change-Id: Idc73658e29cb77dfcc8b046535a36affc1831605

Changed in nova:
status: In Progress → Fix Committed
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/54560

Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/68652

Changed in nova:
importance: Undecided → Wishlist
tags: added: compute
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/havana)

Change abandoned by Jordan Pittier (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/68652

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.