Bug 1942883 - AWS EBS CSI driver does not support partitions
Summary: AWS EBS CSI driver does not support partitions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Jan Safranek
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-25 09:38 UTC by Jan Safranek
Modified: 2021-07-27 22:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 22:55:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift aws-ebs-csi-driver pull 183 0 None open Bug 1942883: Rebase to v0.10.1 2021-04-13 12:43:09 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:56:10 UTC

Description Jan Safranek 2021-03-25 09:38:14 UTC
Description of problem:

With CSI migration enabled && in-tree PV (or inline volume) with a partition specified, the CSI driver tries to mount the whole disk.

Version-Release number of selected component (if applicable):
4.7

How reproducible:

Steps to Reproduce:
1. Enable CSI migration on AWS
2. Manually create a volume and a partition on it.
3. Run this pod:

{
    "apiVersion": "v1",
    "kind": "Pod",
    "metadata": {
        "name": "inline"
    },
    "spec": {
        "nodeSelector": {
                "topology.kubernetes.io/zone": "us-east-2a"
        },
        "containers": [
            {
                "name": "inline",
                "image":
"quay.io/openshifttest/storage@sha256:a05b96d373be86f46e76817487027a7f5b8b5f87c0ac18a246b018df11529b40",
                "securityContext": {
                    "privileged": true
                },
                "imagePullPolicy": "IfNotPresent",
                "volumeMounts": [
                    {
                        "mountPath": "/mnt/storage",
                        "name": "inline"
                    }
                ]
            }
        ],
        "volumes": [
            {
                "name": "inline",
                "awsElasticBlockStore": {
                    "fsType": "xfs",
                    "volumeID": "vol-0140cff45bc3ecdbc",
                    "partition": 1,
                    "readOnly": false
                }
            }
        ]
    }
}


Fix both with "traditional" (volumes are /dev/xvdXY) and Nitro systems (/dev/nvmeXYZ)!

Upstream issue: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues/812

Comment 2 Qin Ping 2021-04-15 09:19:32 UTC
Checked with: 4.8.0-0.nightly-2021-04-14-211524

With the following definition in PV:
  csi:
    driver: ebs.csi.aws.com
    volumeHandle: vol-0ceb1fe2304435f21
    fsType: xfs
    volumeAttributes:
      partition: "1"

Nitro system works well:
sh-4.4# df -T /mnt/storage/
Filesystem     Type 1K-blocks  Used Available Use% Mounted on
/dev/nvme1n1p1 xfs    2085888 47580   2038308   3% /mnt/storage

Traditional system workes well too:
sh-4.4# df /mnt/storage/
Filesystem     1K-blocks  Used Available Use% Mounted on
/dev/xvdba1      2085888 49892   2035996   3% /mnt/storage

Comment 5 errata-xmlrpc 2021-07-27 22:55:38 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438


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