Updating all jobs through update-job CLI command screws up currently running builds

60 views
Skip to first unread message

nimeacuerdo

unread,
Oct 20, 2011, 12:07:03 PM10/20/11
to Jenkins Users
Hi,

We have just faced the following problem: updating the configuration
of all our jobs with the update-job CLI command results, after the
update for all the jobs is finished, in all the running builds to
behave weirdly.

They appear to be running (and in fact the associated processes are
running in the slaves we have), but the links to all the builds are
broken. Also, when going to any of the jobs for which there is a build
running, it does not appear in the list of builds of the job. It's
like if it did not exist. Furthermore, if we let those somewhat
orphaned builds to fiinish, they never appear associated to their
corresponding jobs, as if they never had existed.

This is a big problem for us as this is the way we wanted to use to
perform bulk updates in all our jobs configurations :/

Any ideas regarding this?


Thanks in advance,
David

Noah Hoffman

unread,
Oct 20, 2011, 2:43:02 PM10/20/11
to jenkins...@googlegroups.com
Hi All,

I'm investigating a bug in our Jenkins setup in that, when we trigger a safe restart, it does correctly wait for running builds to finish before restarting but all pending jobs are lost on reboot. It might be something in some custom scripts we use that handle the restart (we copy files from a local Perforce depot into the Jenkins homedir). Does anyone know where Jenkins stores pending build info? I don't see anything written anywhere in the Jobs folder that suggests it's here.

Thanks,
Noah

Dean Yu

unread,
Oct 20, 2011, 6:33:18 PM10/20/11
to jenkins...@googlegroups.com, Noah Hoffman
I think it's the queue.xml file in the home directory.

-- Dean

David Karlsen

unread,
Oct 20, 2011, 7:04:42 PM10/20/11
to jenkins...@googlegroups.com

Try the persistent build queue plugin.

nimeacuerdo

unread,
Nov 10, 2011, 4:10:26 AM11/10/11
to Jenkins Users
Anybody experiencing this problem? I would like to know if there's a
better approach to jobs configurations bulk updates...

On 20 oct, 17:07, nimeacuerdo <davi...@gmail.com> wrote:
> Hi,
>
> We have just faced the following problem: updating the configuration
> of all our jobs with the update-job CLI command results, after the
> update for all the jobs is finished, in all the running builds to
> behave weirdly.
>
> They appear to be running (and in fact the associated processes are
> running in the slaves we have), but the links to all the builds are
> broken. Also, when going to any of the jobs for which there is a build
> running, it does not appear in the list of builds of the job. It's
> like if it did not exist. Furthermore, if we let those somewhat
> orphaned builds to fiinish, they never appear associated to their
> corresponding jobs, as if they never had existed.
>
> This is a big problem for us as this is the way we wanted to use to
> performbulkupdates in all our jobs configurations :/

Jan Seidel

unread,
Nov 10, 2011, 4:17:20 AM11/10/11
to Jenkins Users
Seems to be a kind of standard behaviour.
I assume that changes are written to logs and configuration files when
the jobs have finished.
This behaviour is already been addressed by me at an earlier time.
The exact some behaviour can be observed when you reload the
configuration from disk by URL or manage jenkins :/
Only thing you can do is to make sure that no job is running.

Jan

nimeacuerdo

unread,
Nov 10, 2011, 4:55:58 AM11/10/11
to Jenkins Users
Thx for the feedback Jan. I have updated https://issues.jenkins-ci.org/browse/JENKINS-3265
with this information.
Reply all
Reply to author
Forward
0 new messages