-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
CentOS 6
There are jobs set up to monitor trigger files in a directory. So the flow should be continuous instance of jenkins runs a job. If job is successfull it touches a target file. The production build instance of Jenkins then monitores those target files and is supposed to run jobs at designated times if the timestamp is updated.
All works as designed unless I restart the production instance of Jenkins.
Then I get some logs as follows and the corrisponding job does not get run.
==============================================
Polling started on Jan 30, 2014 3:06:30 AM
Polling for the job APP2_Nightly
Looking nodes where the poll can be run.
Looking for a candidate node to run the poll.
Looking for a node with no predefined label.
Trying to poll with the last built on node.
Polling remotely on fred
Checking one file: '/opt/loadbuild/staging/stellar.prodea.local/buildTriggers/APP2.tgt'.
No nodes were available at startup or at previous poll.
Polling complete. Took 48 ms.
No changes.
===============================================
Couple of things:
First would be nice to notified at startup some way that this happend.
Two there are 10 queues accross three servers these could run on at startup. There are only 6 jobs currently using this method of process flow.
Really would like to scale this up but cannot until this is resolved.
I'm running into this issue as well.
Below are a bunch of guesses by a novice Jenkins Plugin developer.
Having a look at:
fstrigger-plugin/src/main/java/org/jenkinsci/plugins/fstrigger/triggers/FolderContentTrigger.java
and
xtrigger-lib/src/main/java/org/jenkinsci/lib/xtrigger/AbstractTrigger.java
...it's my *GUESS* that Mr. Boissinot is using the "offlineSlaveOnStartup" member variable to denote that it is the first time that the trigger has been run since the Jenkins Server initialized.
It looks like the "Map<String, FileInfo> md5Map" is just resident in memory and is not saved between sessions. I think it needs to initialize once before the plug-in has a point of reference for future "checkIfModified()" calls.
Suggested solutions going forward:
EASY: Maybe the message should be more descriptive as to what's going on:
"Initilaizing Folder md5Map... Waiting for next schedule to check if there are modifications.");
or
LESS EASY: Initialize the "md5Map" right when Jenkins starts? (instead of waiting for the next scheduled run)
A.K.A. Override: public void start(BuildableItem project, boolean newInstance)???
or
HARD?: The "md5Map" variable should be committed to disk... somehow? and reloaded after a Jenkins Server Reboot.