jx: Error while `jx upgrade boot` ( `{}.SSHConfigError` )

Summary

I’ve run

jx upgrade cli
jx upgrade boot 

Got:

# jx upgrade boot
Version stream upgrade available
using default boot config https://github.com/jenkins-x/jenkins-x-boot-config.git
boot config upgrade available
Upgrading from v1.0.96 to v1.0.99
cherry picking commits in the range 6f19480399d9ab9652c4b3ac22564dde2e3bbc2f..d8c421d1b360dfd1fb6733eaa24686f9988341e1
4d1a8dca9a9403a09a121625441deaade2d5c08e - feat: add manifests to be used when installing Jenkins X on a restricted permissions openshift cluster
1095bf090b412990cabdd278587727cd6247aad7 - suppress old DOCKER_REGISTRY definition
59793e95e198a25ae31ec62da2e6abb55a0cb113 - up to date installation on IBM Cloud Kubernetes Service (IKS)
df3d34674dcda420efe685a0e7921a35c221c668 - up to date installation on IBM Cloud Kubernetes Service (IKS)
82d0d65e601aced781e88ca42ffbcc9752127ad5 - up to date installation on IBM Cloud Kubernetes Service (IKS)
0115c16b6bf450b23425b7d420653a5bea0c7294 - feat(pencil): Added in external dns secret name for Azure DNS provider
d8c421d1b360dfd1fb6733eaa24686f9988341e1 - release 1.0.99
Upgrading version stream ref to 1acfedab3e318b32425b9505e54a283a1336106c
Updating pipeline agent images to gcr.io/jenkinsxio/builder-go:2.1.110-735
Updating template builder images to gcr.io/jenkinsxio/builder-go:2.1.110-735
Skipping template builder image update as no changes were detected
? Do you wish to use mycorp-eu-cicd as the user name to use for authenticating with git issues Yes
Created Pull Request: https://github.com/mycorp/jx-environment-vanessa-dev/pull/14

Then I approved the PR and opened Tekton UI to see what is going on. The PR is merged automatically, but the PipelineRun actually failed on step install-jenkins-x:

Modified file /workspace/source/env/Chart.yaml to set the chart to version 20
creating the lock configmap jx-lock-jx
lock configmap jx-lock-jx already exists
locking pod mycorp-eu-jx-environment-vanes-txr9g-20-release-xpjwf-pod-a471b2 is in phase Pending
waiting for updates on the lock configmap jx-lock-jx
creating the lock configmap jx-lock-jx
lock configmap jx-lock-jx created
Ignoring templates/.gitignore
Applying the kubernetes overrides at ../kubeProviders/kubernetes/values.tmpl.yaml
Adding missing Helm repo: chartmuseum.jenkins-x.io http://chartmuseum.jenkins-x.io
Successfully added Helm repository chartmuseum.jenkins-x.io.
cleaning the lock configmap jx-lock-jx
error: failed to lint the chart '/tmp/jx-helm-apply-145881293/env': failed to run 'helm lint --set tags.jx-lint=true --set global.jxLint=true --set-string global.jxTypeEnv=lint' command in directory '/tmp/jx-helm-apply-145881293/env', output: '==> Linting .
[ERROR] templates/: render error in "env/charts/jenkins-x-platform/templates/ssh-config-secret.yaml": template: env/charts/jenkins-x-platform/templates/ssh-config-secret.yaml:3:14: executing "env/charts/jenkins-x-platform/templates/ssh-config-secret.yaml" at <.Values.PipelineSecrets.SSHConfig>: nil pointer evaluating interface {}.SSHConfig

Error: 1 chart(s) linted, 1 chart(s) failed'

Step failed

Attached a screenshot for better explaining.

jx-upgrade-boot-error

Steps to reproduce the behavior

Expected behavior

The upgrade process will finish successfully.

Actual behavior

Got an error.

Jx version

The output of jx version is:

Version        2.1.69
Commit         db7c4e1
Build date     2020-06-16T12:57:09Z
Go version     1.13.8
Git tree state clean

Diagnostic information

The output of jx diagnose version is:

Running in namespace: jx
Version        2.1.69
Commit         db7c4e1
Build date     2020-06-16T12:57:09Z
Go version     1.13.8
Git tree state clean
NAME                          VERSION
Kubernetes cluster            v1.15.11
kubectl (installed in JX_BIN) v1.13.2
helm client                   2.12.2
git                           2.25.1
Operating System              Ubuntu 20.04 LTS

Kubernetes cluster

MicroK8s on Ubuntu 20.04 ( v1.15.11 )

Kubectl version

The output of kubectl version --client is:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.11", GitCommit:"d94a81c724ea8e1ccc9002d89b7fe81d58f89ede", GitTreeState:"clean", BuildDate:"2020-03-12T21:08:59Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}

Operating system / Environment

Ubuntu 20.04

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

I have the exact same error on a fresh jx boot.

Version        2.1.127
Commit         4bc05a9
Build date     2020-08-05T20:34:57Z
Go version     1.13.8
Git tree state clean
Modified file /Users/jodewey/git/jenkins-x-boot-config/env/Chart.yaml to set the chart to version 1
Ignoring templates/.gitignore
Applying the kubernetes overrides at ../kubeProviders/kubernetes/values.tmpl.yaml
error: failed to lint the chart '/var/folders/71/bwx5tjjn3_b_r17v8vtz56180000gn/T/jx-helm-apply-165286302/env': failed to run 'helm lint --set tags.jx-lint=true --set global.jxLint=true --set-string global.jxTypeEnv=lint' command in directory '/var/folders/71/bwx5tjjn3_b_r17v8vtz56180000gn/T/jx-helm-apply-165286302/env', output: '==> Linting .
[ERROR] templates/: render error in "env/charts/jenkins-x-platform/templates/ssh-config-secret.yaml": template: env/charts/jenkins-x-platform/templates/ssh-config-secret.yaml:3:14: executing "env/charts/jenkins-x-platform/templates/ssh-config-secret.yaml" at <.Values.PipelineSecrets.SSHConfig>: nil pointer evaluating interface {}.SSHConfig

Error: 1 chart(s) linted, 1 chart(s) failed'
error: failed to interpret pipeline file jenkins-x.yml: failed to run '/bin/sh -c jx step helm apply --boot --remote --name jenkins-x --provider-values-dir ../kubeProviders' command in directory 'env', output: ''

I don’t understand why shall I set an external registry, but it however deploys nexus and docker-registry. Is there any way to fix it and let it use the internal registry ?

Yes, I have that as false. enableDocker: false

Interesting, I was unable to reproduce this on eks in a freshly created cluster (using terraform) using the latest version of jx (Ran jx upgrade cli and boot). ~Not sure, what would be different in eks and microK8s, pretty sure, that is not the root issue.~ Any chance the jx-requirements are using jenkins instead of prow/lighthouse and tekon?

Seems like this could be some weird issue with kubernetes provider vs eks/gke. From the comments in the issue, it seems that all the people having this issue have cluster provider set to kubernetes …

https://github.com/jenkins-x/jenkins-x-boot-config/blob/master/kubeProviders/kubernetes/values.tmpl.yaml#L5 -> Is it set to false?

Is there any update to this issue? I’m still encountering it and setting enableDocker to true causes other unrelated issues.

I also have exactly the same issue when trying a fresh install using jx boot .

I unpacked the jenkins-x-platform chart which is built by jx boot and I see the following value for .Values.PipelineSecrets.SSHConfig

 SSHConfig: |-
    Host github.com
        User git
        IdentityFile /root/.ssh-git/ssh-key
        StrictHostKeyChecking no