If that is the case, could you try with a volume that has a different attached_mode? As I believe we may have a bug there.
It looks like we are redoing all attachments as "rw" [1]:
for attachment in volume_attachments: LOG.debug('Re-attaching: %s', attachment)
# This is just a db state toggle, the volume is actually
# already attach and in-use, new attachment flow won't allow
# this rpcapi.attach_volume(ctxt, volume, attachment.instance_uuid, attachment.attached_host, attachment.mountpoint, 'rw')
If that is the case, could you try with a volume that has a different attached_mode? As I believe we may have a bug there.
It looks like we are redoing all attachments as "rw" [1]:
for attachment in volume_attachments:
LOG.debug( 'Re-attaching: %s', attachment)
rpcapi. attach_ volume( ctxt, volume,
attachment. instance_ uuid,
attachment. attached_ host,
attachment. mountpoint,
'rw')
# This is just a db state toggle, the volume is actually
# already attach and in-use, new attachment flow won't allow
# this
[1]: https:/ /github. com/openstack/ cinder/ blob/37f2bdcdec 85f27651b91a9a2 d0fddb66e7bfe8a /cinder/ volume/ manager. py#L2312- L2316