[NetApp] Issue while trying to attach a volume using CHAP authentication

Bug #1914639 reported by Carlos Eduardo
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Andre Luiz Beltrami Rocha

Bug Description

Description
===========
The Cinder ONTAP driver has got an issue while trying to attach an iSCSI volume using CHAP authentication.

Steps to reproduce
==================

1. Have an iSCSI NetApp backend configured
2. Set 'use_chap_auth = True' in the backend
3. Create a new volume in the referred backend
4. Create a VM with Nova
5. Request to attach the created volume in the VM

Expected result
===============
The volume should be attached properly.

Actual result
=============
The NetApp ONTAP driver wasn't able to attach the volume to the VM. and the below exception was raised.

  cinder.exception.VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Failed to set CHAP authentication for target IQN random. Details: Unexpected output. Expected [Password:] but received [b'Last login time: 2/4/2021 15:46:19\r\r\n\r\nPassword:']

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
      res = self.dispatcher.dispatch(message)
    File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/dispatcher.py", line 273, in dispatch
      return self._do_dispatch(endpoint, method, ctxt, args)
    File "/usr/local/lib/python3.6/dist-packages/oslo_messaging/rpc/dispatcher.py", line 193, in _do_dispatch
      result = func(ctxt, **new_args)
    File "/opt/stack/new/cinder/cinder/volume/manager.py", line 4558, in attachment_update
      connector)
    File "/opt/stack/new/cinder/cinder/volume/manager.py", line 4507, in _connection_create
      raise exception.VolumeBackendAPIException(data=err_msg)
  cinder.exception.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 random. Details: Unexpected output. Expected [Password:] but received [b'Last login time: 2/4/2021 15:46:19\r\r\n\r\nPassword:']).

Environment
===========
1. Cinder using the master branch

2. NetApp backend

description: updated
tags: added: netapp
tags: added: attach volume
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
Carlos Eduardo (silvacarlose) wrote :
Changed in cinder:
assignee: nobody → Andre Luiz Beltrami Rocha (andrebeltrami)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/785865
Committed: https://opendev.org/openstack/cinder/commit/a5c80032f623b4a593612bc159257a2f52fe285e
Submitter: "Zuul (22348)"
Branch: master

commit a5c80032f623b4a593612bc159257a2f52fe285e
Author: silvacarloss <email address hidden>
Date: Thu Feb 4 14:08:59 2021 -0300

    [NetApp] Fix iSCSI CHAP auth issue during volume attach

    Fixes a failure in the NetApp ONTAP driver while trying to
    configure CHAP authentication during a volume attach operation, by
    making the code more flexible while trying to identify if the
    prompted field is available in the buffered message.

    Change-Id: I81dd9861b9464244f23967f4f83888d06b50754e
    Closes-Bug: #1914639

Changed in cinder:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/cinder/+/848064

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 21.0.0.0rc1

This issue was fixed in the openstack/cinder 21.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/yoga)

Change abandoned by "Brian Rosmaita <email address hidden>" on branch: stable/yoga
Review: https://review.opendev.org/c/openstack/cinder/+/848064
Reason: The stable/yoga branch is now in Unmaintained status, and is in the process of being tagged end-of-maintenance and deleted by change I99a8120217aa. If you want to continue with this patch, please propose it to the unmaintained/yoga branch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.