Manila share create failure to a Ceph cluster with multiple filesystems

Solution Verified - Updated -

Environment

  • Red Hat OpenStack Platform 17.1

Issue

With external Ceph as backend, all shares created enter ERROR state because Manila was unable to determine the filesystem to use.

Also, it's not possible to set filesystem in templates.

Resolution

  1. Identify the Ceph filesystem that should be used.
[root@ceph01 ceph_admin]# ceph fs ls
name: filesystem, metadata pool: cephfs_metadata, data pools: [cephfs_data_ssd]
name: filesystem1, metadata pool: filesystem1_metadata, data pools: [filesystem1_data]

On a Director Ceph installation, the default is cephfs.

  1. Set the parameter cephfs_filesystem_name in the section [cephfs] of file /var/lib/config-data/puppet-generated/manila/etc/manila/manila.conf of each controller with the filesystem and save the file.
[root@overcloud-controller-1 ~]# vi /var/lib/config-data/puppet-generated/manila/etc/manila/manila.conf
...
[cephfs]
cephfs_filesystem_name = filesystem
...

There is a example of the parameter in default section and the solution will not work if set there.

  1. Restart the openstack-manila-share service to apply the changes to containers.
[root@overcloud-controller-1 ~]# pcs resource restart openstack-manila-share
  1. Test the creation of a share.

Root Cause

The heat templates were not prepared to set the parameter cephfs_filesystem_name as BZ2255302.

Diagnostic Steps

  1. Check Manila share logs on each controllers for the error message.
[root@overcloud-controller-1 ~]# grep " Specify Ceph filesystem name using 'cephfs_filesystem_name' driver option." /var/log/containers/manila/manila-share.log
2023-12-17 17:10:47.543 9 ERROR manila.share.manager [req-9005efb6-0000-0000-a35d-07bfd69de73e - - - - -] Error encountered during initialization of driver CephFSDriver@hostgroup@cephfs: manila.exception.ShareBackendException: Share backend error: Specify Ceph filesystem name using 'cephfs_filesystem_name' driver option.
  1. Shares are in error state.
(overcloud) [stack@director ~]$ openstack share list
+--------------------------------------+------------------+------+-------------+--------+-----------+------------------+------+-------------------+
| ID                                   | Name             | Size | Share Proto | Status | Is Public | Share Type Name  | Host | Availability Zone |
+--------------------------------------+------------------+------+-------------+--------+-----------+------------------+------+-------------------+
| 00000000-1c96-4005-933c-f7ce7c4b67cd | share1 |    1 | CEPHFS      | error  | False     | cephfsnativetype |      | None              |
| 00000000-3299-4e94-be9f-3fc73873e7a0 | sharetest        |    1 | CEPHFS      | error  | False     | cephfsnativetype |      | None              |
+--------------------------------------+------------------+------+-------------+--------+-----------+------------------+------+-------------------+
  1. Shares messages show that no storage cloud be allocated.
(overcloud) [stack@director ~]$  openstack share message list --fit-width
+------------------------------------+---------------+------------------------------------+-----------+------------------------------------+-----------+----------------------------+
| ID                                 | Resource Type | Resource ID                        | Action ID | User Message                       | Detail ID | Created At                 |
+------------------------------------+---------------+------------------------------------+-----------+------------------------------------+-----------+----------------------------+
| 00000000-4626-4d1a-8a12-4717b16897 | SHARE         | 00000000-05e8-44f6-9262-f47639bc29 | 001       | allocate host: No storage could be | 007       | 2023-12-10T16:21:56.210841 |
| c4                                 |               | c6                                 |           | allocated for this share request,  |           |                            |
|                                    |               |                                    |           | AvailabilityZone filter didn't     |           |                            |
|                                    |               |                                    |           | succeed.                           |           |                            |

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments