Openstack: Cannot attach a volume while using CHAP
Applies to
- Openstack
- Cinder
Issue
When attempting to attach a cinder volume to an instance while using unidirectional CHAP authentication, a 'VolumeBackendAPIException' is seen. To reproduce the issue:
- Attempt to attach a cinder volume to a instance
# openstack server add volume <server> <volume>
- The cinder volume log shows the following VolumeBackendAPIException:
2021-02-19 15:33:22.495 26388 ERROR cinder.volume.manager VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Failed to set CHAP authentication for target IQN iqn.1994-05.com.redhat:xxxxxxxxxx. Details: Unexpected output. Expected [Password:] but received [Last login time: 2/19/2021 20:29:52^M
2021-02-19 15:33:22.495 26388 ERROR cinder.volume.manager
2021-02-19 15:33:22.495 26388 ERROR cinder.volume.manager Password:]
2021-02-19 15:33:22.495 26388 ERROR cinder.volume.manager
2021-02-19 15:33:22.496 26388 ERROR oslo_messaging.rpc.server [req-6986ef79-84e3-48b4-b38c-a2dfc7c8eba8 9f61737278e74e299ecf78393c6f2cc4 aa13b5b8c1e449fd93e598af2b4af8d0 - default default] Exception during message handling: VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Driver initialize connection failed (error: Bad or unexpected response from the storage volume backend API: Failed to set CHAP authentication for target IQN iqn.1994-05.com.redhat:xxxxxxxxxxx. Details: Unexpected output. Expected [Password:] but received [Last login time: 2/19/2021 20:29:52^M