NEC driver: non-disruptive backup error

Bug #1887885 reported by Naoki Saito
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Naoki Saito

Bug Description

With NEC driver, it gave following error message when the backup is complete and the volume is disconnected from the controller node in running non-disruptive backup.
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager [req-562caf62-260f-4dc9-8b34-67bbb0c202f8 07390ef4f5bc44e9953a4829066763b4 2d4abf67683b48c193427720e98e91aa - default default] Terminate snapshot connection failed: 'Snapshot' object has no attribute 'volume_attachment': AttributeError: 'Snapshot' object has no attribute 'volume_attachment'
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager Traceback (most recent call last):
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/manager.py", line 1950, in terminate_connection_snapshot
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager force=force)
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume.py", line 163, in terminate_connection_snapshot
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager **kwargs)
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume_helper.py", line 1392, in fc_terminate_connection_snapshot
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager ret = self._fc_terminate_connection(snapshot, connector)
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume_helper.py", line 1338, in _fc_terminate_connection
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager self._is_multi_attachment(volume, connector)):
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume_helper.py", line 1409, in _is_multi_attachment
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager attach_list = volume.volume_attachment
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager AttributeError: 'Snapshot' object has no attribute 'volume_attachment'
2020-07-17 06:01:39.637 104 ERROR cinder.volume.manager
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server [req-562caf62-260f-4dc9-8b34-67bbb0c202f8 07390ef4f5bc44e9953a4829066763b4 2d4abf67683b48c193427720e98e91aa - default default] Exception during message handling: cinder.exception.VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Terminate snapshot connection failed: 'Snapshot' object has no attribute 'volume_attachment'
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/manager.py", line 1950, in terminate_connection_snapshot
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server force=force)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume.py", line 163, in terminate_connection_snapshot
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server **kwargs)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume_helper.py", line 1392, in fc_terminate_connection_snapshot
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server ret = self._fc_terminate_connection(snapshot, connector)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume_helper.py", line 1338, in _fc_terminate_connection
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server self._is_multi_attachment(volume, connector)):
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/nec/volume_helper.py", line 1409, in _is_multi_attachment
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server attach_list = volume.volume_attachment
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server AttributeError: 'Snapshot' object has no attribute 'volume_attachment'
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server During handling of the above exception, another exception occurred:
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 274, in dispatch
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/dispatcher.py", line 194, in _do_dispatch
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/manager.py", line 1955, in terminate_connection_snapshot
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server raise exception.VolumeBackendAPIException(data=err_msg)
2020-07-17 06:01:39.639 104 ERROR oslo_messaging.rpc.server cinder.exception.VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Terminate snapshot connection failed: 'Snapshot' object has no attribute 'volume_attachment'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/741597

Changed in cinder:
assignee: nobody → Naoki Saito (n-saito)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/741597
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6e8dd2f0c01060dbde1a0263da053ffd1a7322f3
Submitter: Zuul
Branch: master

commit 6e8dd2f0c01060dbde1a0263da053ffd1a7322f3
Author: Naoki Saito <email address hidden>
Date: Fri Jul 17 16:56:28 2020 +0900

    NEC driver: fix a snapshot detach error

    In NEC driver, _fc_terminate_connection() refers to
    Volume.volume_attachment of an argument.
    However, the argument is a snapshot object when a snapshot is being
    detached.
    The snapshot object does not have the "volume_attachment" attribute.

    This patch avoids referring to the "volume_attachment" attribute when
    the argument is a snapshot.

    Change-Id: Ibc5fa0901ae9c0766f98d623357bade266598bff
    Closes-Bug: #1887885

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/752781

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/ussuri)

Reviewed: https://review.opendev.org/752781
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7e98b66a177d3d8d945d8146cf36c81cbe58a5b0
Submitter: Zuul
Branch: stable/ussuri

commit 7e98b66a177d3d8d945d8146cf36c81cbe58a5b0
Author: Naoki Saito <email address hidden>
Date: Fri Jul 17 16:56:28 2020 +0900

    NEC driver: fix a snapshot detach error

    In NEC driver, _fc_terminate_connection() refers to
    Volume.volume_attachment of an argument.
    However, the argument is a snapshot object when a snapshot is being
    detached.
    The snapshot object does not have the "volume_attachment" attribute.

    This patch avoids referring to the "volume_attachment" attribute when
    the argument is a snapshot.

    Change-Id: Ibc5fa0901ae9c0766f98d623357bade266598bff
    Closes-Bug: #1887885
    (cherry picked from commit 6e8dd2f0c01060dbde1a0263da053ffd1a7322f3)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/756609

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/train)

Reviewed: https://review.opendev.org/756609
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=39905d5df3c350d146531e8eba41719b75ea9dff
Submitter: Zuul
Branch: stable/train

commit 39905d5df3c350d146531e8eba41719b75ea9dff
Author: Naoki Saito <email address hidden>
Date: Fri Jul 17 16:56:28 2020 +0900

    NEC driver: fix a snapshot detach error

    In NEC driver, _fc_terminate_connection() refers to
    Volume.volume_attachment of an argument.
    However, the argument is a snapshot object when a snapshot is being
    detached.
    The snapshot object does not have the "volume_attachment" attribute.

    This patch avoids referring to the "volume_attachment" attribute when
    the argument is a snapshot.

    Change-Id: Ibc5fa0901ae9c0766f98d623357bade266598bff
    Closes-Bug: #1887885
    (cherry picked from commit 6e8dd2f0c01060dbde1a0263da053ffd1a7322f3)
    (cherry picked from commit 7e98b66a177d3d8d945d8146cf36c81cbe58a5b0)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 16.2.1

This issue was fixed in the openstack/cinder 16.2.1 release.

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

This issue was fixed in the openstack/cinder 15.4.1 release.

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.