Chapter 6. Configuring Compute service storage
You create an instance from a base image, which the Compute (nova) service copies from the Image (glance) service, and caches locally on the Compute nodes. This base image contains the instance disk, which is the back end for the instance.
You can configure the Compute service to store ephemeral instance disk data locally on the host Compute node or remotely on either an NFS share or Ceph cluster. Alternatively, you can configure the Compute service to store instance disk data in persistent storage in a volume provided by the Block Storage (cinder) service.
You can configure image caching for your environment, and configure the performance and security of the instance disks. When the Image service uses Red Hat Ceph RADOS Block Device (RBD) as the back end and the Compute service uses local file-based ephemeral storage, then the Compute service can download images directly from the RBD image repository without using the Image service API.
Additional resources
- Configuring persistent storage.
- Integrating Ceph Storage in Configuring persistent storage.
6.1. Configuring the maximum number of storage devices to attach to one instance Copy linkLink copied to clipboard!
By default, you can attach an unlimited number of storage devices to a single instance. Attaching a large number of disk devices to an instance can degrade performance on the instance. You can tune the maximum number of devices that can be attached to an instance based on the boundaries of what your environment can support. The number of storage disks supported by an instance depends on the bus that the disk uses. For example, the IDE disk bus is limited to 4 attached devices. You can attach a maximum of 500 disk devices to instances with machine type Q35.
Q35 is the default machine type, which uses PCIe ports. You can manage the number of PCIe port devices by adding the [libvirt]
parameter num_pcie_ports
to the nova-extra-config
ConfigMap
CR. The number of devices that can attach to a PCIe port is fewer than instances running on previous versions. If you want to use more devices, you must use the hw_disk_bus=scsi
or hw_scsi_model=virtio-scsi
image property. For more information, see Metadata properties for virtual hardware in Performing storage operations.
-
Changing the value of the
[compute]
parametermax_disk_devices_to_attach
in thenova-extra-config
ConfigMap
CR on a Compute node with active instances can cause rebuilds to fail if the maximum number is lower than the number of devices already attached to instances. For example, if instance A has 26 devices attached and you changemax_disk_devices_to_attach
to 20, a request to rebuild instance A will fail. - During cold migration, the configured maximum number of storage devices is enforced only on the source for the instance that you want to migrate. The destination is not checked before the move. This means that if Compute node A has 26 attached disk devices, and Compute node B has a configured maximum of 20 attached disk devices, a cold migration of an instance with 26 attached devices from Compute node A to Compute node B succeeds. However, a subsequent request to rebuild the instance in Compute node B fails because 26 devices are already attached which exceeds the configured maximum of 20.
The configured maximum number of storage devices is not enforced on shelved offloaded instances, as they have no Compute node.
Prerequisites
-
The
oc
command line tool is installed on your workstation. -
You are logged in to Red Hat OpenStack Services on OpenShift (RHOSO) as a user with
cluster-admin
privileges. -
You have selected the
OpenStackDataPlaneNodeSet
CR that defines which nodes you can configure the maximum number of storage devices to attach to one instance. For more information about creating anOpenStackDataPlaneNodeSet
CR, see Creating the data plane in the Deploying Red Hat OpenStack Services on OpenShift guide.
Procedure
Create or update the
ConfigMap
CR namednova-extra-config
and set the values of the parameters under[compute]
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For more information about creating
ConfigMap
objects, see Creating and using config maps in Nodes.Create a new
OpenStackDataPlaneDeployment
CR to configure the services on the data plane nodes and deploy the data plane. Save the CR to a file namedcompute_storage_devices_deploy.yaml
on your workstation:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: compute-storage-devices
apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: compute-storage-devices
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For more information about creating an
OpenStackDataPlaneDeployment
CR, see Deploying the data plane in the Deploying Red Hat OpenStack Services on OpenShift guide.In the
compute_storage_devices_deploy.yaml
, specifynodeSets
to include all theOpenStackDataPlaneNodeSet
CRs you want to deploy. Ensure that you include theOpenStackDataPlaneNodeSet
CR that you selected as a prerequisite. ThatOpenStackDataPlaneNodeSet
CR defines the nodes that you want to configure the maximum number of storage devices to attach to one instance.WarningYou cannot reconfigure a subset of the nodes within a node set. If you need to do this, you must scale the node set down, and create a new node set from the previously removed nodes.
WarningIf your deployment has more than one node set, changes to the
nova-extra-config.yaml
ConfigMap
might directly affect more than one node set, depending on how the node sets and theDataPlaneServices
are configured. To check if a node set uses thenova-extra-config
ConfigMap
and therefore will be affected by the reconfiguration, complete the following steps:-
Check the services list of the node set and find the name of the
DataPlaneService
that points to nova. Ensure that the value of the
edpmServiceType
field of theDataPlaneService
is set tonova
.If the
dataSources
list of theDataPlaneService
contains aconfigMapRef
namednova-extra-config
, then this node set uses thisConfigMap
and therefore will be affected by the configuration changes in thisConfigMap
. If some of the node sets that are affected should not be reconfigured, you must create a newDataPlaneService
pointing to a separateConfigMap
for these node sets and use that custom service in the required node sets instead.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<nodeSet_name>
with the names of the `OpenStackDataPlaneNodeSet`CRs that you want to include in your data plane deployment.
-
Check the services list of the node set and find the name of the
-
Save the
compute_storage_devices_deploy.yaml
deployment file. Deploy the data plane:
oc create -f compute_storage_devices_deploy.yaml
$ oc create -f compute_storage_devices_deploy.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the data plane is deployed:
oc get openstackdataplanenodeset
$ oc get openstackdataplanenodeset NAME STATUS MESSAGE compute-storage-devices True Deployed
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Access the remote shell for
openstackclient
and verify that the deployed Compute nodes are visible on the control plane:oc rsh -n openstack openstackclient openstack hypervisor list
$ oc rsh -n openstack openstackclient $ openstack hypervisor list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
6.3. Configuring image downloads directly from Red Hat Ceph RADOS Block Device (RBD) Copy linkLink copied to clipboard!
When the Image service (glance) uses Red Hat Ceph RADOS Block Device (RBD) as the back end, and the Compute service (nova) uses local file-based ephemeral storage, you can configure the Compute service to download images directly from the RBD image repository without using the Image service API. This reduces the time it takes to download an image to the Compute node image cache at instance boot time, which improves instance launch time.
Prerequisites
- The Image service back end is a Red Hat Ceph RADOS Block Device (RBD).
- The Compute service is using a local file-based ephemeral store for the image cache and instance disks.
-
The
oc
command line tool is installed on your workstation. -
You are logged in to Red Hat OpenStack Services on OpenShift (RHOSO) as a user with
cluster-admin
privileges. -
You have selected the
OpenStackDataPlaneNodeSet
CR that defines which nodes you want to configure image downloads directly from RBD. For more information about creating anOpenStackDataPlaneNodeSet
CR, see Creating an OpenStackDataPlaneNodeSet CR with pre-provisioned nodes in the Deploying Red Hat OpenStack Services on OpenShift guide.
Procedure
Create or update the
ConfigMap
CR namednova-extra-config
and set the values of the parameters under [glance] to specify the Image service RBD back end, and the maximum length of time that the Compute service waits to connect to the Image service RBD back end, in seconds:Copy to Clipboard Copied! Toggle word wrap Toggle overflow For more information about creating
ConfigMap
objects, see Creating and using config maps in Nodes.Create a new
OpenStackDataPlaneDeployment
CR to configure the services on the data plane nodes and deploy the data plane, and save it to a file namedcompute_image_rbd_deploy.yaml
on your workstation:apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: compute-image-rbd
apiVersion: dataplane.openstack.org/v1beta1 kind: OpenStackDataPlaneDeployment metadata: name: compute-image-rbd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow In the
compute_image_rbd_deploy.yaml
CR, specifynodeSets
to include all theOpenStackDataPlaneNodeSet
CRs you want to deploy. Ensure that you include the OpenStackDataPlaneNodeSet CR that you selected as a prerequisite, which defines the nodes that you want to configure image downloads directly from RBD.WarningYou cannot reconfigure a subset of the nodes within a node set. If you need to do this, you must scale the node set down and create a new node set from the previously removed nodes.
WarningIf your deployment has more than one node set, changes to the
nova-extra-config.yaml
ConfigMap
might directly affect more than one node set, depending on how the node sets and theDataPlaneServices
are configured. To check if a node set uses thenova-extra-config
ConfigMap
and therefore will be affected by the reconfiguration, complete the following steps:-
Check the services list of the node set and find the name of the
DataPlaneService
that points to nova. Ensure that the value of the
edpmServiceType
field of theDataPlaneService
is set tonova
.If the
dataSources
list of theDataPlaneService
contains aconfigMapRef
namednova-extra-config
, then this node set uses thisConfigMap
and therefore will be affected by the configuration changes in thisConfigMap
. If some of the node sets that are affected should not be reconfigured, you must create a newDataPlaneService
pointing to a separateConfigMap
for these node sets and use that custom service in the required node sets instead.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
Replace
<nodeSet_name>
with the names of the `OpenStackDataPlaneNodeSet`CRs that you want to include in your data plane deployment.
-
Check the services list of the node set and find the name of the
-
Save the
compute_image_rbd_deploy.yaml
deployment file. Deploy the data plane:
oc create -f compute_image_rbd_deploy.yaml
$ oc create -f compute_image_rbd_deploy.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the data plane is deployed:
oc get openstackdataplanenodeset
$ oc get openstackdataplanenodeset NAME STATUS MESSAGE compute-image-rbd True Deployed
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Access the remote shell for
openstackclient
and verify that the deployed Compute nodes are visible on the control plane:oc rsh -n openstack openstackclient openstack hypervisor list
$ oc rsh -n openstack openstackclient $ openstack hypervisor list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow