Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble with persistence of build-numbers with backup/restore #210

Closed
pniederlag opened this issue Nov 25, 2019 · 4 comments
Closed

trouble with persistence of build-numbers with backup/restore #210

pniederlag opened this issue Nov 25, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@pniederlag
Copy link

We have backup/restore integrated so whenever a fresh instance of jenkins is created we have the history of our jobs available.

Unfortunatly we can't trigger new builds though as we are running into exceptions when clicking the build buttons/links. We always first have to go to manage jenkins, reload configuration from disk, in order for jenkins to have proper build numbers in place for the build/run actions.

This ist the exception, before running "reload from disk":

Nov 25, 2019 9:00:08 AM SEVERE hudson.model.Executor run
Executor #-1 for master: Unexpected executor death
java.lang.IllegalStateException: JENKINS-23152: /var/jenkins/home/jobs/xxxx/jobs/yyyy/branches/master/builds/3 already existed; will not overwrite with xxxx/yyyy/master #3
	at hudson.model.RunMap.put(RunMap.java:189)
	at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:182)
Caused: java.lang.Error
	at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:190)
	at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.createExecutable(ParameterizedJobMixIn.java:511)
	at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.createExecutable(ParameterizedJobMixIn.java:321)
	at hudson.model.Executor$1.call(Executor.java:365)
	at hudson.model.Executor$1.call(Executor.java:347)
	at hudson.model.Queue._withLock(Queue.java:1438)
	at hudson.model.Queue.withLock(Queue.java:1299)
	at hudson.model.Executor.run(Executor.java:347)

Is this a general problem or just something messed up on our side?

@pawelprazak pawelprazak added the bug Something isn't working label Nov 25, 2019
@tomaszsek
Copy link

tomaszsek commented Nov 25, 2019

Hi @pniederlag,

After the restore the operator calls the Jenkins.instance.reload() https://github.com/jenkinsci/kubernetes-operator/blob/master/pkg/controller/jenkins/configuration/backuprestore/backuprestore.go#L154 which reloads data from the disk. Unfortunately this is not working with the Multibranch jobs. There is no solution implemented in the operator but you can check the workarounds in #104. I have seen a lot of workarounds just for the Multibranch jobs in many of the Jenkins plugins 😞

Cheers

@pawelprazak
Copy link

Yes, I've spent 3 week trying to find all the workarounds to make multi-brunch work with job dls and backups...

@pawelprazak
Copy link

This is a funny bug actually, if you click run enough times it starts to work ;)
There are more details in the #104

pawelprazak added a commit that referenced this issue Nov 26, 2019
For easier workarounds for #104 and #210 specifically
@pawelprazak
Copy link

Closing as a duplicate of #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants