Bug 1542867 - local-storage-provisioner log message for regular file is not clear
Summary: local-storage-provisioner log message for regular file is not clear
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.9.0
Assignee: Jan Safranek
QA Contact: Qin Ping
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-07 08:42 UTC by Qin Ping
Modified: 2018-05-17 06:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-17 06:42:42 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1566 None None None 2018-05-17 06:43:24 UTC

Description Qin Ping 2018-02-07 08:42:57 UTC
Description of problem:
local-storage-provisioner checks mountDir and creates PVs for local volumes, when there is a regular file in mountDir, it will not create PV for it and report error.

Version-Release number of selected component (if applicable):
openshift v3.9.0-0.39.0
kubernetes v1.9.1+a0ce1bc657

How reproducible:
Always

Steps to Reproduce:
1. Create hostDir on one node, and create a regular file under hostDir
2. using image: registry.reg-aws.openshift.com:443/openshift3/local-storage-provisioner:v3.9.0-0.39.0 to create local storage provisoiner
3. No PV is created
4. check local storage provisioner pod log message.
   oc logs local-volume-provisioner-jxxpj

Actual results:
E0207 07:29:33.448320       1 discovery.go:106] Block device check for "/mnt/local-storage/fast/vol3" failed: DirErr - <nil> BlkErr - <nil>

Expected results:
vol3 is not a mountpoint or directory, does not create PV for it?

Comment 1 Jan Safranek 2018-02-07 16:58:18 UTC
This is trivial to fix, however I am not sure it can catch 3.9

Comment 2 Jan Safranek 2018-02-08 13:23:02 UTC
Upstream PR: https://github.com/kubernetes-incubator/external-storage/pull/595

Proposed log message: "Skipping file "/mnt/local-storage/fast/vol3": not a directory nor block device".

Comment 3 Jan Safranek 2018-02-12 12:33:51 UTC
Upstream PR is merged, now I am looking for a way how to release updated local-storage images.

Comment 4 Jan Safranek 2018-02-20 15:50:39 UTC
3.9 image built and pushed somewhere where 3.9 installed with Jenkins can find it. Checked with:

$ docker run -ti --entrypoint=/bin/sh registry.reg-aws.openshift.com:443/openshift3/local-storage-provisioner:v3.9

(inside the container) $ rpm -q openshift-external-storage-local-provisioner 
openshift-external-storage-local-provisioner-0.0.1-8.git78d6339.el7.x86_64

(inside the container) $ rpm -q --changelog openshift-external-storage-local-provisioner | head
* Fri Feb 16 2018 jsafrane <jsafrane@redhat.com> - 0.0.1-8.git78d6339
- Rebuilt for 3.9

* Mon Feb 12 2018 jsafrane <jsafrane@redhat.com> - 0.0.1-7.git78d6339
- Fix error message when a plain file is discovered
- Resolves: rhbz#1542867

Comment 6 Qin Ping 2018-04-17 07:02:38 UTC
Now the image local-storage-provisioner with tag v3.9 has fixed this issue.

# docker images
REPOSITORY                                                                  TAG                 IMAGE ID            CREATED             SIZE
registry.access.redhat.com/openshift3/local-storage-provisioner             v3.9                a5cfdbd5ba3f        3 weeks ago         234 MB

# oc exec local-volume-provisioner-rgs68 -- rpm -qa|grep local
openshift-external-storage-local-provisioner-0.0.1-8.git78d6339.el7.x86_64

Comment 8 Qin Ping 2018-04-20 03:07:28 UTC
Verified in OCP:
oc v3.9.24
openshift v3.9.24
kubernetes v1.9.1+a0ce1bc657

# oc exec local-volume-provisioner-qfg5b -- rpm -qa|grep local
openshift-external-storage-local-provisioner-0.0.1-8.git78d6339.el7.x86_64

# uname -a
Linux host-172-16-120-35 3.10.0-693.21.1.el7.x86_64 #1 SMP Fri Feb 23 18:54:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)

Report error as expected:
E0420 03:04:43.477544       1 discovery.go:106] Skipping file "/mnt/local-storage/ssd/testfile": not a directory nor block device

Comment 11 errata-xmlrpc 2018-05-17 06:42:42 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:1566


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