Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1540848 - Using Red Hat image for Local PV provisioner
Using Red Hat image for Local PV provisioner
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.9.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.9.0
Assigned To: Jan Safranek
Qin Ping
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-01 02:03 EST by Qin Ping
Modified: 2018-03-28 10:25 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-28 10:24:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 10:25 EDT

  None (edit)
Description Qin Ping 2018-02-01 02:03:18 EST
Description:
As Red Hat customers they want to use images for local storage that is maintained and signed by Red Hat, but we didn't use the image in our examples


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

How reproducible:
Always

Steps to Reproduce:
1. Enable feature gates: PersistentLocalVolumes, VolumeScheduling
2. Create local provsioner per doc [1], and use the local-storage-provisioner-template[2]
3. Check local PV provisioner

Actual results:
Pulled from quay.io/external_storage/local-volume-provisioner

Expected results:
Pulled from openshift3/local-storage-provisioner

Additional info:
Image quay.io/external_storage/local-volume-provisioner:v1.0.1 and  openshift3/local-storage-provisioner:latest is different, quay.io/external_storage/local-volume-provisioner:v1.0.1 works better than openshift3/local-storage-provisioner:latest
Pod created using image openshift3/local-storage-provisioner:latest reports error and no PV is created:
I0201 03:03:58.588122       1 main.go:58] Starting controller
I0201 03:03:58.594290       1 main.go:76] Could not get config map due to: open /etc/provisioner/config/: no such file or directory, using default configmap
I0201 03:03:58.594300       1 main.go:79] Running provisioner with config map[local-storage:{HostDir:/mnt/disks MountDir:/local-disks}]
I0201 03:03:58.594318       1 controller.go:41] Initializing volume cache
I0201 03:03:58.594375       1 populator.go:85] Starting Informer controller
I0201 03:03:58.594386       1 populator.go:89] Waiting for Informer initial sync
I0201 03:03:59.594631       1 controller.go:69] Controller started
E0201 03:03:59.594658       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:04:09.594836       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:04:19.595001       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:04:29.595250       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:04:39.595424       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
I0201 03:04:47.191860       1 cache.go:73] Deleted pv "local-pv-137af31f" from cache
I0201 03:04:47.192488       1 cache.go:73] Deleted pv "local-pv-c8066f5d" from cache
E0201 03:04:49.595749       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:04:59.595953       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:05:09.596114       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:05:19.596284       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory
E0201 03:05:29.596491       1 discovery.go:91] Error reading directory: open /local-disks: no such file or directory


[1] https://github.com/openshift/ose/blob/master/examples/storage-examples/local-examples/local-storage-provisioner-template.yaml
[2] https://github.com/openshift/ose/blob/master/examples/storage-examples/local-examples/local-storage-provisioner-template.yaml
Comment 1 Jan Safranek 2018-02-05 12:08:48 EST
RedHat ships an image with local storage provisioner, however it's a newer one than the guide in https://github.com/openshift/ose/blob/master/examples/storage-examples/local-examples/ expects.

Template needs just a little change:

--- template.yaml	2018-02-05 12:04:08.605683395 -0500
+++ t.yaml	2018-02-05 11:54:21.715422738 -0500
@@ -57,18 +57,24 @@
                 fieldPath: metadata.namespace
           - name: VOLUME_CONFIG_NAME
             value: ${CONFIGMAP}
-          image: quay.io/external_storage/local-volume-provisioner:v1.0.1
+          image: openshift3/local-storage-provisioner:v3.9
           name: provisioner
           securityContext:
             runAsUser: 0
           volumeMounts:
           - mountPath: /mnt/local-storage
             name: local-storage
+          - mountPath: /etc/provisioner/config 
+            name: provisioner-config
+            readOnly: true
         serviceAccountName: "${SERVICE_ACCOUNT}"
         volumes:
         - hostPath:
             path: /mnt/local-storage
           name: local-storage
+        - configMap:
+            name: ${CONFIGMAP}
+          name: provisioner-config
 
 
 parameters:


But the example went to OSE from Origin. And we can't use RHEL images in Origin examples. I honestly don't know what's the right solution here.
Comment 2 Jan Safranek 2018-02-05 12:12:24 EST
Well, the right solution is of course openshift-ansible that installs everything that's needed and sets up local volumes, so we don't need templates from Origin. However we're not there yet.
Comment 3 Bradley Childs 2018-02-05 14:05:47 EST
The local storage provisioner container image should be built, tagged and released with the 3.8, 3.9 errata.  re-assigning to 'release' component.
Comment 5 Jan Safranek 2018-02-07 07:31:35 EST
I talked to mfojtik (OpenShift Master lead), "common" practice is to have a parameter in template with image to use (Red Hat / upstream) and document it. "common" - he has seen it in a template or two.

Therefore we need:

Change the template at https://github.com/openshift/ose/blob/master/examples/storage-examples/local-examples/local-storage-provisioner-template.yaml
  - add param with image to use

Change docs at https://github.com/openshift/openshift-docs/blob/master/install_config/configuring_local.adoc
  - document the parameter, with recommended values for origin and OSE
Comment 6 Jan Safranek 2018-02-07 09:04:04 EST
(In reply to Jan Safranek from comment #5)
> Therefore we need:
> 
> Change the template at
> https://github.com/openshift/ose/blob/master/examples/storage-examples/local-
> examples/local-storage-provisioner-template.yaml
>   - add param with image to use

https://github.com/openshift/origin/pull/18498

 
> Change docs at
> https://github.com/openshift/openshift-docs/blob/master/install_config/
> configuring_local.adoc
>   - document the parameter, with recommended values for origin and OSE

https://github.com/openshift/openshift-docs/pull/7633
Comment 7 Jan Safranek 2018-02-07 09:08:07 EST
Qin, can you please check the PRs if it works? It's just template update, no new code in OpenShift.
Comment 8 Jan Safranek 2018-02-07 10:22:10 EST
Origin PR has been merged, doc have LGTM so I guess I can mark it as modified.
Comment 9 Qin Ping 2018-02-07 21:10:31 EST
Jan, the new template works in OCP v3.9.0-0.39.0
Comment 11 Qin Ping 2018-02-22 21:05:21 EST
Verified in openshift v3.9.0-0.47.0
Comment 14 errata-xmlrpc 2018-03-28 10:24:57 EDT
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.