Bug 1813927 - StorageClass mount options not being honored
Summary: StorageClass mount options not being honored
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Jan Safranek
QA Contact: Wei Duan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-16 14:04 UTC by Luke Stanton
Modified: 2020-07-13 17:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: OpenShift iSCSI and FibreChannel volume plugin did not honor mountOptions field in PersistentVolumes nor StorageClasses. Consequence: iSCSI and FibreChannel volumes were mounted without these options. Fix: The volume plugins now properly check mountOptions field in PersistentVolumes and StorageClasses. Result: The volumes are mounted with given mountOptions.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:20:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin pull 24880 0 None closed Bug 1813927: UPSTREAM: 89172: Fix mountOptions in iSCSI and FC volume plugins 2020-11-10 09:23:15 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:20:41 UTC

Description Luke Stanton 2020-03-16 14:04:29 UTC
Description of problem:

Mounts created for iscsi PV's using a StorageClass with the 'discard' mount option (-o discard) are missing the setting. PV's that are created with the StorageClass include the defined mount option and are bound successfully. However, when the PV is mounted on the OpenShift node as defined by the pod spec referencing the PVC/PV, the mount options are not applied during the container creation process.

The pod shows a running status and the mount is seen and can be consumed, however it is missing the desired mount option.


How reproducible: Consistently


Actual results: 'discard' mount option is not applied to actual mount


Expected results: 'discard' option would be applied to mount

Comment 4 Jan Safranek 2020-03-17 09:15:39 UTC
Tested with v3.11.188.

iscsi.MountDevice calls:

mount -t ext4 -o defaults /dev/disk/by-path/ip-10.0.148.103:3260-iscsi-iqn.2003-01.io.k8s:jsafrane-lun-0 /var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/iscsi/iface-default/10.0.148.103:3260-iqn.2003-01.io.k8s:jsafrane-lun-0

(no "-o discard" !)

iscsi.SetUp calls:
mount -o bind /var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/iscsi/iface-default/10.0.148.103:3260-iqn.2003-01.io.k8s:
jsafrane-lun-0 /var/lib/origin/openshift.local.volumes/pods/3e486339-682e-11ea-8b24-fa163e4e2fdb/volumes/kubernetes.io~iscsi/nfs-pv

mount -o bind,remount,discard /var/lib/origin/openshift.local.volumes/plugins/kubernetes.io/iscsi/iface-default/10.0.148.103:3260-iqn
.2003-01.io.k8s:jsafrane-lun-0 /var/lib/origin/openshift.local.volumes/pods/3e486339-682e-11ea-8b24-fa163e4e2fdb/volumes/kubernetes.io~iscsi/nfs-pv

It's too late to add "discard" (or any other real option) at this point.

Comment 15 errata-xmlrpc 2020-07-13 17:20:18 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-2020:2409


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