purestorage / helm-charts

Pure Storage Helm Charts
Apache License 2.0
47 stars 43 forks source link

Plugin image 2.2.1 states my json is malformed #58

Closed japaniel closed 5 years ago

japaniel commented 5 years ago

When I try to use the 2.2.1 helm chart that defaults to the 2.2.1 image I get the following errors from the pure-provisioner

pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:39Z" level=debug msg="Initializing Mount config, conf = '<nil>'"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:39Z" level=debug msg="Done initializing config, conf = '&{DefaultBlkFSType:xfs DefaultBlkFSOpts:-q DefaultBlkMountOpts:}'"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:39Z" level=debug msg="Initializing discovery config, conf = '<nil>'"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:39Z" level=debug msg="Done initializing discovery config, conf = '&{DiscoveryType:json Pure1APIHost:localhost:8080}'"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:39Z" level=info msg="namespace = k8s"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:39Z" level=info msg="Starting pureProvisioner" provisionerName=pure-provisioner serverVersion=v1.12.3
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=info msg="Provision volume" id="{k8s pvc-f3052460-1ea0-11e9-bef5-005056975897}" spec="{map[size:107374182400 volume_label_selector:purestorage.com/backend=block]}"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=debug msg="No backends discovered, unable to schedule volume." spec="{map[size:107374182400 volume_label_selector:purestorage.com/backend=block]}"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=info msg="Provisioned volume for PVC" annotations="map[]" backend=block error="no storage backends were able to meet the request specification" k8sNamespace=monitoring pvname=pvc-f3052460-1ea0-11e9-bef5-005056975897 size="{{0 0} {0xc420417590} 100Gi BinarySI}" volume="<nil>"
pure-provisioner-85b786974b-w4n74 pure-provisioner E0123 00:08:56.597730       1 controller.go:672] Failed to provision volume for claim "monitoring/prometheus-prometheus-operator-prometheus-db-prometheus-prometheus-operator-prometheus-0" with StorageClass "pure": no storage backends were able to meet the request specification
pure-provisioner-85b786974b-w4n74 pure-provisioner E0123 00:08:56.598362       1 goroutinemap.go:151] operation for "provision-monitoring/prometheus-prometheus-operator-prometheus-db-prometheus-prometheus-operator-prometheus-0[f3052460-1ea0-11e9-bef5-005056975897]" failed with: no storage backends were able to meet the request specification
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=info msg="Provision volume" id="{k8s pvc-ef113003-1ea0-11e9-bef5-005056975897}" spec="{map[volume_label_selector:purestorage.com/backend=block size:53687091200]}"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="JSON validation failed" err="NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=error msg="Error validating json: NFSEndPoint: NFSEndPoint is required\t"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=debug msg="No backends discovered, unable to schedule volume." spec="{map[size:53687091200 volume_label_selector:purestorage.com/backend=block]}"
pure-provisioner-85b786974b-w4n74 pure-provisioner time="2019-01-23T00:08:56Z" level=info msg="Provisioned volume for PVC" annotations="map[]" backend=block error="no storage backends were able to meet the request specification" k8sNamespace=monitoring pvname=pvc-ef113003-1ea0-11e9-bef5-005056975897 size="{{0 0} {0xc42014c3f0} 50Gi BinarySI}" volume="<nil>"

The values.yaml file I was using looks something like

orchestrator:
  k8s:
    flexPath: /var/lib/kubelet/volumeplugins
arrays:
  FlashBlades:
    - MgmtEndPoint: "10.123.456.140"
      APIToken: "T-obfuscat-e989-4ade-beaa-obfuscated0e"
      NfsEndPoint: "d-gp2-nas-1.domain.com"
storageclass:
  isPureDefault: true
  pureBackend: file

I resolved it by using the previous image in the values.yaml

image:
  name: purestorage/k8s
  tag: 2.1.2
  pullPolicy: IfNotPresent
orchestrator:
  k8s:
    flexPath: /var/lib/kubelet/volumeplugins
arrays:
  FlashBlades:
    - MgmtEndPoint: "10.123.456.140"
      APIToken: "T-obfuscat-e989-4ade-beaa-obfuscated0e"
      NfsEndPoint: "d-gp2-nas-1.domain.com"
storageclass:
  isPureDefault: true
  pureBackend: file

It seems that since the config map just takes what is in the yaml and converts it to json the acceptable format for the json likely changed in the image, maybe?

If that is the case what would the acceptable json look like?

trevormeiss commented 5 years ago

Hi @japaniel. This is a known issue and we are working on a fix. A quick fix for you would be to replace NfsEndPoint with NFSEndPoint. Our apologies for the inconvenience.

japaniel commented 5 years ago

@trevormeiss thanks. I have a workaround for now.