Bug 1511097 - Better error description for multliple attach
Summary: Better error description for multliple attach
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.9.0
Assignee: Jan Safranek
QA Contact: Jianwei Hou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 16:41 UTC by Jan Safranek
Modified: 2018-08-17 04:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-03-28 14:11:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:11:45 UTC

Description Jan Safranek 2017-11-08 16:41:22 UTC
When user runs two pods that use the same PV we send this event:
Multi-Attach error for volume "pvc-61e094bc-b375-11e7-b95b-02d8407159d1" Volume is already exclusively attached to one node and can't be attached to another.

What we should do:

- check on what node is the volume attached
- check if there is a pod on the node that uses the volume
  - if so, send an event to user that explicitly mentions that pod XYZ already uses the volume and it must be killed first
  - if not, log an error that would say where the volume is attached and that there is no pod that uses it and something is badly broken. We should send an event somewhere, but not to user - he can't do anything with it.

Comment 1 Jan Safranek 2017-11-23 11:58:16 UTC
>   - if not, log an error that would say where the volume is attached and 
> that there is no pod that uses it and something is badly broken. We should 
> send an event somewhere, but not to user - he can't do anything with it.

Still, the user should see something so he knows what's going on and he can ask admin to fix it (or fill a bug and we'll see at least the faulty nodes).


Upstream PR: https://github.com/kubernetes/kubernetes/pull/56288
(sends both events to user)

Comment 2 Jan Safranek 2018-01-19 10:09:31 UTC
still pending upstream...

Comment 4 Jan Safranek 2018-01-25 14:45:13 UTC
Origin 3.9 PR: https://github.com/openshift/origin/pull/18290

Comment 5 Jan Safranek 2018-02-02 09:47:44 UTC
Merged today

Comment 7 Jianwei Hou 2018-02-22 04:57:27 UTC
Verified on v3.9.0-0.47.0

Steps
1. Create a PV with block volume, gluster-block for example
2. Create an RC with replicas=2
3. Verify the description for multi-attach:
```
  Warning  FailedAttachVolume     1h                attachdetach-controller             Multi-Attach error for volume "pvc-bb2d1def-177d-11e8-b77c-0050569f5abb" Volume is already used by pod(s) vpod-skhtb
```

Comment 10 errata-xmlrpc 2018-03-28 14:11:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0489


Note You need to log in before you can comment on or make changes to this bug.