Detect in a pipeline that a node is not working

19 views
Skip to first unread message

Jean-Philippe Humbert

unread,
Feb 7, 2023, 11:13:21 AM2/7/23
to jenkins...@googlegroups.com

I need some help for the following problem:

I have a pipeline which starts parallel jobs (test cases) and wait until they are all finished, to produce a report.

Sometime the test case breaks the node (OS crash, the network not responding).

My pipeline waits because of the hung job. Jenkins shows me that the connection with the node ist nor working.


My question: can I check this situation in my pipeline, setting the job as failed and my test report will be produced?

Kumar, Ashwath

unread,
Feb 7, 2023, 11:56:17 AM2/7/23
to jenkins...@googlegroups.com
Facing same problem. Any solutions??

Regards
Ashwath Kumar

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/06023261-10F2-4F8D-8607-662911E860C1%40me.com.

Baptiste Mathus

unread,
Feb 7, 2023, 2:01:41 PM2/7/23
to jenkins...@googlegroups.com
I'd consider simply putting a timeout in place for this node or so, so it eventually fails and you get to your reporting step.

--

Jean-Philippe Humbert

unread,
Feb 7, 2023, 4:18:55 PM2/7/23
to jenkins...@googlegroups.com
This is not a solution for me.
I can’t predict the duration of some test cases.

Baptiste Mathus

unread,
Feb 8, 2023, 7:50:05 AM2/8/23
to jenkins...@googlegroups.com
I mean putting a high timeout, like 1 hour, or 10 or whatever depending on what it does, so the pipeline eventually does complete and creates the reports. Without this, it may indeed stay stalled forever.

Xavier Raynaud

unread,
Feb 8, 2023, 10:48:28 AM2/8/23
to jenkinsci-users
Hi,

timeout has "activity" flag: When set, it timeout after no activity in logs for this block instead of absolute duration.
If your testcases print something in console, it may fit your needs.

timeout(activity: true, time: 1, unit: 'HOURS') {
    // some block
}

Xavier



From: "Baptiste Mathus" <m...@batmat.net>
To: "jenkinsci-users" <jenkins...@googlegroups.com>
Sent: Wednesday, February 8, 2023 1:49:39 PM
Subject: Re: Detect in a pipeline that a node is not working

Reply all
Reply to author
Forward
0 new messages