Bug 1885182 - Failure when creating HostPathProvisioner with useNamingPrefix
Summary: Failure when creating HostPathProvisioner with useNamingPrefix
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 2.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Adam Litke
QA Contact: Qixuan Wang
URL:
Whiteboard:
: 1885307 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-05 11:11 UTC by Marius Cornea
Modified: 2020-10-23 11:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-23 11:27:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marius Cornea 2020-10-05 11:11:48 UTC
Description of problem:

Creating the following HostPathProvisioner resource:

apiVersion: hostpathprovisioner.kubevirt.io/v1alpha1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  imagePullPolicy: IfNotPresent
  pathConfig:
    path: "/var/lib/hppvolumes"
    useNamingPrefix: "false"


results in:

oc -n openshift-cnv logs -f hostpath-provisioner-operator-5754488495-w8x5p

[...]
E1005 11:05:43.914099       1 reflector.go:123] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:204: Failed to list *v1beta1.HostPathProvisioner: v1beta1.HostPathProvisionerList.Items: []v1beta1.HostPathProvisioner: v1beta1.HostPathProvisioner.Spec: v1beta1.HostPathProvisionerSpec.PathConfig: v1beta1.PathConfig.UseNamingPrefix: ReadBool: expect t or f, but found ", error found in #10 byte of ...|gPrefix":"false"}},"|..., bigger context ...|:{"path":"/var/lib/hppvolumes","useNamingPrefix":"false"}},"status":{"conditions":[{"lastHeartbeatTi|...
E1005 11:05:44.917232       1 reflector.go:123] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:204: Failed to list *v1beta1.HostPathProvisioner: v1beta1.HostPathProvisionerList.Items: []v1beta1.HostPathProvisioner: v1beta1.HostPathProvisioner.Spec: v1beta1.HostPathProvisionerSpec.PathConfig: v1beta1.PathConfig.UseNamingPrefix: ReadBool: expect t or f, but found ", error found in #10 byte of ...|gPrefix":"false"}},"|..., bigger context ...|:{"path":"/var/lib/hppvolumes","useNamingPrefix":"false"}},"status":{"conditions":[{"lastHeartbeatTi|...


Version-Release number of selected component (if applicable):
2.5.0 (iib 17315)

How reproducible:
100%

Additional info:

If setting useNamingPrefix as a boolean:

apiVersion: hostpathprovisioner.kubevirt.io/v1alpha1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  imagePullPolicy: IfNotPresent
  pathConfig:
    path: "/var/lib/hppvolumes"
    useNamingPrefix: false

then the resource creation fails with:

The HostPathProvisioner "hostpath-provisioner" is invalid: spec.pathConfig.useNamingPrefix: Invalid value: "boolean": spec.pathConfig.useNamingPrefix in body must be of type string: "boolean"

Comment 1 Natalie Gavrielov 2020-10-14 12:21:52 UTC
Please try it with apiVersion: v1beta1

Comment 2 Natalie Gavrielov 2020-10-14 12:29:15 UTC
*** Bug 1885307 has been marked as a duplicate of this bug. ***

Comment 3 Marius Cornea 2020-10-23 11:27:55 UTC
Worked with:

apiVersion: hostpathprovisioner.kubevirt.io/v1beta1
kind: HostPathProvisioner
metadata:
  name: hostpath-provisioner
spec:
  imagePullPolicy: IfNotPresent
  pathConfig:
    path: "/var/lib/hppvolumes"
    useNamingPrefix: false


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