What is Shelving ?

Shelving is a term using in Openstack. Shelving stops the instance and takes a snapshot of it. Then depending on the value of the shelved_offload_time config option, the instance is deleted from the hypervisor (0), never deleted (-1), or deleted after some period of time (> 0). Note that it’s just destroying the backing instance on the hypervisor, the actual instance in the nova database is not deleted. Then you can later unshelve the instance.

Shelving is useful if you have an instance that you are not using, but would like retain in your list of servers. For example, you can stop an instance at the end of a work week, and resume work again at the start of the next week. All associated data and resources are kept; however, anything still in memory is not retained. If a shelved instance is no longer needed, it can also be entirely removed.

If an instance has been shelved for some amount of time, say 72 hours(configurable), then a periodic task can begin freeing up hypervisor resources by possibly snapshotting the disk and offloading to ‘cold storage’ and removing the instance from its host. This has the potential to lengthen the unshelve time, so deployers will need to inform users. Perhaps a new state could be added to indicate that the instance no longer exists on a host, but that discussion can be had later.

stack@devstack:~$ nova list
+————————————–+——————+——–+————+————-+——————————————————————-+
| ID | Name | Status | Task State | Power State | Networks |
+————————————–+——————+——–+————+————-+——————————————————————-+
| b20ec423-6760-43dc-b406-6c86c808ed02 | devstack-testing | ACTIVE | – | Running | private=10.0.0.3, fd67:9e9:cdca:0:f816:3eff:fe58:8506, 172.24.4.3 |
+————————————–+——————+——–+————+————-+——————————————————————-+
stack@devstack:~$

stack@devstack:~$ nova shelve devstack-testing

stack@devstack:~$ nova list
+————————————–+——————+——–+——————————-+————-+——————————————————————-+
| ID | Name | Status | Task State | Power State | Networks |
+————————————–+——————+——–+——————————-+————-+——————————————————————-+
| b20ec423-6760-43dc-b406-6c86c808ed02 | devstack-testing | ACTIVE | shelving_image_pending_upload | Running | private=10.0.0.3, fd67:9e9:cdca:0:f816:3eff:fe58:8506, 172.24.4.3 |
+————————————–+——————+——–+——————————-+————-+——————————————————————-+
stack@devstack:~$

stack@devstack:~$ nova list
+————————————–+——————+——————-+————+————-+——————————————————————-+
| ID | Name | Status | Task State | Power State | Networks |
+————————————–+——————+——————-+————+————-+——————————————————————-+
| b20ec423-6760-43dc-b406-6c86c808ed02 | devstack-testing | SHELVED_OFFLOADED | – | Shutdown | private=10.0.0.3, fd67:9e9:cdca:0:f816:3eff:fe58:8506, 172.24.4.3 |
+————————————–+——————+——————-+————+————-+——————————————————————-+
stack@devstack:~$

stacker has written 18 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Humans Only. * Time limit is exhausted. Please reload the CAPTCHA.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>