Bug 1885307 - hostPathProvisioner ReadBool fails to parse "false" as boolean
Summary: hostPathProvisioner ReadBool fails to parse "false" as boolean
Keywords:
Status: CLOSED DUPLICATE of bug 1885182
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: Alexander Wels
QA Contact: Ying Cui
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-05 15:03 UTC by Chandler Wilkerson
Modified: 2020-10-14 12:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-14 12:29:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chandler Wilkerson 2020-10-05 15:03:51 UTC
Description of problem:
Creating an instance of HostPathProvisioner CR according to documentation at [1] results in hostpath-provisioner-operator stuck looping with error like

E1005 14:32:10.431228       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 ...|athConfig":{"path":"/hostpath","useNamingPrefix":"false"}}}],"kind":"HostPathProvisionerList","metad|...

Further: Admission controller rejects string false without quotes with error:

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

Used oc edit to remove quotes functioned as a work-around.

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

OCP 4.6

CNV 2.5 bundle 
registry.redhat.io/container-native-virtualization/hostpath-provisioner-rhel8@sha256:8bc3dc8175521647415c82a354176b41f5c7267dcebbe8c8d396773ca11a1333

How reproducible:
Found once. Likely always reproducible.

Steps to Reproduce:
1. Install CNV 2.5 on OCP 4.6
2. Create CR from [1]
3. Watch logs for operator pod in openshift-cnv

Actual results:
Operator stuck validating its own CR

Expected results:
Operator spins up pods


Additional info:

1. https://docs.openshift.com/container-platform/4.5/virt/virtual_machines/virtual_disks/virt-configuring-local-storage-for-vms.html

Comment 1 Alexander Wels 2020-10-07 12:38:56 UTC
So that field changed from alphav1 to betav1. In alphav1 it is a string (my mistake, shouldn't have been one) in betav1 it changed to a boolean. Can you tell me which APIVersion you are using the CR?

Comment 2 Chandler Wilkerson 2020-10-07 14:33:27 UTC
Sure enough, I'm using alpha:

apiVersion: hostpathprovisioner.kubevirt.io/v1alpha1

Comment 3 Natalie Gavrielov 2020-10-14 12:29:26 UTC

*** This bug has been marked as a duplicate of bug 1885182 ***


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