Jx: error: user x-0

Created on 5 Jul 2019  路  11Comments  路  Source: jenkins-x/jx

Summary

Hi, I'm using Jenkins X in a bitbucketcloud repo, and a local kubernetes cluster, But, every (second) time I run any pipeline I get this error:

+ jx preview --app my app --dir ../..
Creating a preview
error: users.jenkins.io "x-0" already exists
script returned exit code 1

Steps to reproduce the behavior

jx start pipeline -t
....
Finished: SUCCESS
jx start pipeline -t
error: users.jenkins.io "x-0" already exists
script returned exit code 1

Jx version

The output of jx version is:

jx                 2.0.202
jenkins x platform 2.0.768
Kubernetes cluster v1.14.2
kubectl            v1.14.2
helm client        Client: v2.14.1+g5270352
git                git version 2.17.1
Operating System   Ubuntu 18.04.2 LTS

Jenkins type

  • [ ] Serverless Jenkins X Pipelines (Tekton + Prow)
  • [x] Classic Jenkins

Kubernetes cluster

Local cluster:

Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-16T16:14:56Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

Operating system / Environment

ubuntu 18

arejenkins arepreview kinbug lifecyclrotten prioritimportant-soon

Most helpful comment

@lvcz

          dir('./charts/preview') {
            sh "make preview"
            sh "kubectl delete user x-0 || true" ### MAGIC row
            sh "jx preview --app $APP_NAME --dir ../.."
          }

All 11 comments

The same for:
jx 2.0.466
jenkins x platform 0.0.3832
Kubernetes cluster v1.14.3
kubectl v1.15.0
helm client Client: v2.14.2+ga8b13cc
git git version 2.22.0
Operating System Mac OS X 10.15 build 19A501i

Tried to force the user delete, but even with --yes=true the prompt waits for a confirmation

steps {
        container('jx-base') {
           sh "jx delete user x-0 --yes=true"

the pipeline wait for stdin and stall.

/area jenkins

@lvcz

          dir('./charts/preview') {
            sh "make preview"
            sh "kubectl delete user x-0 || true" ### MAGIC row
            sh "jx preview --app $APP_NAME --dir ../.."
          }

I missed this shell class in college, lol.
Thanks, but is still a turnaround.

@lvcz

          dir('./charts/preview') {
            sh "make preview"
            sh "kubectl delete user x-0 || true" ### MAGIC row
            sh "jx preview --app $APP_NAME --dir ../.."
          }

Tryed and does not work

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

@IgorGerasimov
kubectl delete user x-0 --ignore-not-found=true

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

@jenkins-x-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

Was this page helpful?
0 / 5 - 0 ratings