Chapter 8. Cinder tests

The cinder test applies to OpenStack products or components that implement features for the OpenStack Block Storage service only. The test uses Tempest Framework integrated with the Red Hat OpenStack Platform (RHOSP) to test both operational and functional features.

The cinder test verifies the functionality of the corresponding cinder driver that you are certifying by running the selected feature tests. The following features are currently supported:

  • cinder_volumes
  • cinder_consistency_groups
  • cinder_backups
  • cinder_multi-attach_volume

Prerequisites

  1. When deploying the overcloud, ensure that:

    1. You have provided two instances of the backend you intend to certify.

      Note

      Having more than one hardware storage is not required; configuring both cinder backends to use the same hardware array is supported.

    2. You have enabled the cinder-backup service. To do this, add the cinder-backup environment file in the overcloud deployment command.

      -e /usr/share/openstack-tripleo-heat-templates/environments/cinder-backup.yaml

      For more information, see Configuring your overcloud by using environment files.

    3. You have disabled cinder’s LVM/iSCSI backend, and configured Glance to use Cinder as its backend. To do this, create a new custom environment file, for example, rhcert-overrides.yaml and add the following lines:

      parameter_defaults:
        CinderEnableIscsiBackend: false
        GlanceBackend: cinder

      Then, add the rhcert-overrides.yaml file to the overcloud deployment command.

      -e /home/stack/rhcert-overrides.yaml

  2. Before executing the tempest_config test, ensure that:

    1. You have enabled the following flags under their respective section header in the tempest.conf file.

      Note

      If your plugin supports the consistency groups and multi-attach volumes features, then ensure to enable their corresponding flags in the tempest.conf file.

      For example, consistency_group and volume_multiattach flags in the tempest.conf file are enabled.

      [volume-feature-enabled]
      consistency_group = True
      extend_attached_encrypted_volume = True
      extend_attached_volume = True
      manage_snapshot = True
      manage_volume = True
      volume_revert = True
      
      [image-feature-enabled]
      import_image = True
      
      [compute-feature-enabled]
      volume_multiattach = True
    2. You have set the tempest_roles as follows in the tempest.conf file:

      [auth]
      tempest_roles = member,swiftoperator
  3. If your driver supports multi-attach volume feature, perform the following steps before executing cinder’s multi-attach volume tests:

    1. Create a multi-attach volume type by following the procedure explained in Creating a multi-attach volume type. Do not configure cinder’s default volume type to be the multi-attach volume type.
    2. Add a reference to the multi-attach volume type in the tempest.conf file, as shown below:

      [volume]
      volume_type_multiattach = <multiattach volume type>

Additional resources

For more information, see Running tempest_config test.

8.1. cinder_volumes

The cinder_volume test checks if the driver functionalities and base functionalities of cinder, such as volume actions, snapshots, boot, volume migrate, encryption, and clone are working. This test is mandatory.

8.2. cinder_consistency_groups

The cinder_consistency_groups test checks for disaster recovery and the following actions by taking multiple volume snapshots of the consistency group at the same time:

  • Creating and deleting consistency groups
  • Creating and deleting consistency group snapshots
  • Creating a new consistency group from an existing consistency group snapshot

This test is mandatory if your driver implements the consistency groups feature.

8.3. cinder_backups

The cinder_backups test verifies the driver’s backup/restore functionality by testing the following:

  • Creating and restoring a backup from existing volume
  • Testing an incremental backup
  • Taking a backup of a volume snapshot

8.4. cinder_multi-attach_volume

The cinder_multi-attach_volume test checks whether it can attach and access a single block storage volume from multiple hosts or servers by running the following tests:

  • Boot a VM from a multi-attach volume
  • Resize a server with multi-attach volume
  • List volume attachments for a multi-attach volume
  • Snapshot from backed multi-attach volume
  • Attach and detach a multi-attach volume from a shelved or offload server
  • Delete an attached multi-attach volume
  • Attach multi-attach volume to same or different server.

This test is mandatory if your driver implements the multi-attach feature.

Additional resources