longhorn: [BUG] Upgrade Longhorn Rancher catalog app - Wait helm template failed. panic: interface conversion:

Describe the bug Errors upgrading Longhorn catalog app from 1.0.2 to 1.1.0

To Reproduce Steps to reproduce the behavior:

  1. Go to cluster, go to project, go to apps, see indicator that Longhorn upgrade is available
  2. Click on upgrade available
  3. ensure all values are correct (we are air-gapped, so i used the provided save-images/load-images scripts)
  4. See error

Expected behavior Longhorn is upgraded to v1.1.0

Error

Wait helm template failed. panic: interface conversion: interface {} is string, not map[string]interface {} goroutine 1 [running]: k8s.io/helm/pkg/strvals.(*parser).key(0xc000544f20, 0xc000579a70, 0xc00067d438, 0x8) /go/src/k8s.io/helm/pkg/strvals/parser.go:211 +0xfde k8s.io/helm/pkg/strvals.(*parser).key(0xc000544f20, 0xc000579860, 0xc00067d650, 0x5) /go/src/k8s.io/helm/pkg/strvals/parser.go:215 +0x1ad k8s.io/helm/pkg/strvals.(*parser).key(0xc000544f20, 0xc0005797d0, 0x0, 0x0) /go/src/k8s.io/helm/pkg/strvals/parser.go:215 +0x1ad k8s.io/helm/pkg/strvals.(*parser).parse(0xc000544f20, 0xc0005797d0, 0xe00) /go/src/k8s.io/helm/pkg/strvals/parser.go:133 +0x38 k8s.io/helm/pkg/strvals.ParseInto(0x7fffdc2900f2, 0xee9, 0xc0005797d0, 0xc000000180, 0x200000003) /go/src/k8s.io/helm/pkg/strvals/parser.go:85 +0xbf main.vals(0x0, 0x0, 0x0, 0xc000328bb0, 0x1, 0x1, 0x2e176f8, 0x0, 0x0, 0x2e176f8, ...) /go/src/k8s.io/helm/cmd/helm/install.go:420 +0x29d main.(*templateCmd).run(0xc0000ac360, 0xc00031af00, 0xc0000f7110, 0x1, 0x7, 0x0, 0x0) /go/src/k8s.io/helm/cmd/helm/template.go:139 +0x1dc k8s.io/helm/vendor/github.com/spf13/cobra.(*Command).execute(0xc00031af00, 0xc0000f70a0, 0x7, 0x7, 0xc00031af00, 0xc0000f70a0) /go/src/k8s.io/helm/vendor/github.com/spf13/cobra/command.go:826 +0x465 k8s.io/helm/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc0000bc500, 0x8, 0x8, 0xc0000bc500) /go/src/k8s.io/helm/vendor/github.com/spf13/cobra/command.go:914 +0x2fc k8s.io/helm/vendor/github.com/spf13/cobra.(*Command).Execute(...) /go/src/k8s.io/helm/vendor/github.com/spf13/cobra/command.go:864 main.main() /go/src/k8s.io/helm/cmd/helm/helm.go:270 +0x7a : exit status 2

Environment:

  • Longhorn version: v1.0.2
  • Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: RKE v1.2.3
  • Node config
    • OS type and version: Ubuntu 18.04.5 LTS
    • CPU per node: 4
    • Memory per node: 8
    • Disk type(e.g. SSD/NVMe): SSD
    • Network bandwidth and latency between the nodes: 1Gb
  • Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): VMware ESXi 6.7

Additional context Add any other context about the problem here.

gz#14149

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

This seems to be more likely a rancher issue.

Observed that the payload passed from rancher UI include both old and new answers key values used for generating helm command with --set. This confused helm in rancher and caused panic. Screenshot-2021-01-26-18:49:54

An easy workaround is to update use YAML file. This passes the changes as valuesYaml instead of answers. Screenshot-2021-01-27-09:11:51 On the Longhorn upgrade page:

  1. Select 1.1.0 in Template Version.
  2. Click Edit as YAML.
  3. Click Upgrade.

Thanks @c3y1huang . I saw you already filed a Rancher issue. Let’s wait for the response to the issue before proceeding.

Move the issue to Icebox.

OK. I can reproduce this issue now. Here is the Reproducing step:

  1. Deploy Longhorn via Rancher UI - Cluster Manager
  • Set version to 1.0.2
  • Select Default Image: False
  • Select Customize Default Settings: True
  1. Wait for deployment success then upgrade to v1.1.0. The error reported above will be shown.
  • Set version to 1.1.0 then not change any other existing parameters.