From 3cd5198d5a767566e3cbba5a33ac4a7ae3d53aef Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 1 Aug 2018 18:51:31 -0400 Subject: [PATCH] doc: fix resize user guide link The admin config resize doc was linking to a now non-existent user guide doc which was deleted in pike. This change imports the resize user guide from the openstack-manuals stable/ocata branch, fixes the link, and updates the resize user doc to (1) link to our internal shutdown_timeout config option reference and (2) link to the image properties doc in glance for the os_shutdown_timeout image property. Change-Id: I9988abfd344d1d3b0b6eaf32b036369b51853965 Closes-Bug: #1784715 --- doc/source/admin/configuration/resize.rst | 8 +- doc/source/user/index.rst | 1 + doc/source/user/resize.rst | 119 ++++++++++++++++++++++ 3 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 doc/source/user/resize.rst diff --git a/doc/source/admin/configuration/resize.rst b/doc/source/admin/configuration/resize.rst index afe6be5217ac..7dd2041815ff 100644 --- a/doc/source/admin/configuration/resize.rst +++ b/doc/source/admin/configuration/resize.rst @@ -6,6 +6,9 @@ Resize (or Server resize) is the ability to change the flavor of a server, thus allowing it to upscale or downscale according to user needs. For this feature to work properly, you might need to configure some underlying virt layers. +.. todo:: This document needs to be updated for other virt drivers, shared + storage considerations, etc. + KVM ~~~ @@ -14,9 +17,8 @@ compute nodes over ssh. For KVM you need hostnames to resolve properly and passwordless ssh access between your compute hosts. Direct access from one compute host to another is needed to copy the VM file across. -Cloud end users can find out how to resize a server by reading the -:python-openstackclient-doc:`OpenStack CLI Guide -` +Cloud end users can find out how to resize a server by reading +:doc:`/user/resize`. XenServer ~~~~~~~~~ diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst index f21b49a6f298..e652c03476f6 100644 --- a/doc/source/user/index.rst +++ b/doc/source/user/index.rst @@ -12,6 +12,7 @@ End user guide config-drive metadata-service certificate-validation + resize .. todo:: The rest of this document should probably move to the admin guide. diff --git a/doc/source/user/resize.rst b/doc/source/user/resize.rst new file mode 100644 index 000000000000..10aa3660b80b --- /dev/null +++ b/doc/source/user/resize.rst @@ -0,0 +1,119 @@ +============================== +Change the size of your server +============================== + +Change the size of a server by changing its flavor. + +#. Show information about your server, including its size, which is shown + as the value of the flavor property: + + .. code-block:: console + + $ openstack server show myCirrosServer + +--------------------------------------+----------------------------------------------------------+ + | Field | Value | + +--------------------------------------+----------------------------------------------------------+ + | OS-DCF:diskConfig | AUTO | + | OS-EXT-AZ:availability_zone | nova | + | OS-EXT-SRV-ATTR:host | node-7.domain.tld | + | OS-EXT-SRV-ATTR:hypervisor_hostname | node-7.domain.tld | + | OS-EXT-SRV-ATTR:instance_name | instance-000000f3 | + | OS-EXT-STS:power_state | 1 | + | OS-EXT-STS:task_state | None | + | OS-EXT-STS:vm_state | active | + | OS-SRV-USG:launched_at | 2016-10-26T01:13:15.000000 | + | OS-SRV-USG:terminated_at | None | + | accessIPv4 | | + | accessIPv6 | | + | addresses | admin_internal_net=192.168.111.139 | + | config_drive | True | + | created | 2016-10-26T01:12:38Z | + | flavor | m1.small (2) | + | hostId | d815539ce1a8fad3d597c3438c13f1229d3a2ed66d1a75447845a2f3 | + | id | 67bc9a9a-5928-47c4-852c-3631fef2a7e8 | + | image | cirros-test (dc5ec4b8-5851-4be8-98aa-df7a9b8f538f) | + | key_name | None | + | name | myCirrosServer | + | os-extended-volumes:volumes_attached | [] | + | progress | 0 | + | project_id | c08367f25666480f9860c6a0122dfcc4 | + | properties | | + | security_groups | [{u'name': u'default'}] | + | status | ACTIVE | + | updated | 2016-10-26T01:13:00Z | + | user_id | 0209430e30924bf9b5d8869990234e44 | + +--------------------------------------+----------------------------------------------------------+ + + The size (flavor) of the server is ``m1.small (2)``. + +#. List the available flavors with the following command: + + .. code-block:: console + + $ openstack flavor list + +-----+-----------+-------+------+-----------+-------+-----------+ + | ID | Name | RAM | Disk | Ephemeral | VCPUs | Is_Public | + +-----+-----------+-------+------+-----------+-------+-----------+ + | 1 | m1.tiny | 512 | 1 | 0 | 1 | True | + | 2 | m1.small | 2048 | 20 | 0 | 1 | True | + | 3 | m1.medium | 4096 | 40 | 0 | 2 | True | + | 4 | m1.large | 8192 | 80 | 0 | 4 | True | + | 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True | + +-----+-----------+-------+------+-----------+-------+-----------+ + +#. To resize the server, use the :command:`openstack server resize` command and + add the server ID or name and the new flavor. For example: + + .. code-block:: console + + $ openstack server resize --flavor 4 myCirrosServer + + + .. note:: + + By default, the :command:`openstack server resize` command gives + the guest operating + system a chance to perform a controlled shutdown before the instance + is powered off and the instance is resized. + The shutdown behavior is configured by the + :oslo.config:option:`shutdown_timeout` parameter that can be set in the + ``nova.conf`` file. Its value stands for the overall + period (in seconds) a guest operating system is allowed + to complete the shutdown. The default timeout is 60 seconds. + + The timeout value can be overridden on a per image basis + by means of ``os_shutdown_timeout`` that is an image metadata + setting allowing different types of operating systems to specify + how much time they need to shut down cleanly. See + :glance-doc:`Useful image properties ` + for details. + +#. Show the status for your server. + + .. code-block:: console + + $ openstack server list + +----------------------+----------------+--------+-----------------------------------------+ + | ID | Name | Status | Networks | + +----------------------+----------------+--------+-----------------------------------------+ + | 67bc9a9a-5928-47c... | myCirrosServer | RESIZE | admin_internal_net=192.168.111.139 | + +----------------------+----------------+--------+-----------------------------------------+ + + When the resize completes, the status becomes ``VERIFY_RESIZE``. + +#. Confirm the resize. For example: + + .. code-block:: console + + $ openstack server resize --confirm 67bc9a9a-5928-47c4-852c-3631fef2a7e8 + + The server status becomes ``ACTIVE``. + +#. If the resize fails or does not work as expected, you can revert the + resize. For example: + + .. code-block:: console + + $ openstack server resize --revert 67bc9a9a-5928-47c4-852c-3631fef2a7e8 + + The server status becomes ``ACTIVE``.