[JIRA] (JENKINS-58789) Timestamps disappear without any reason inside podTemplate

13 views
Skip to first unread message

sergio.merino.a@gmail.com (JIRA)

unread,
Aug 2, 2019, 12:47:02 PM8/2/19
to jenkinsc...@googlegroups.com
Sergio Merino created an issue
 
Jenkins / Bug JENKINS-58789
Timestamps disappear without any reason inside podTemplate
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2019-08-02 16:46
Priority: Minor Minor
Reporter: Sergio Merino

I found this problem after updating from kubernetes:1.17.2 to kubernetes:1.18.1.

The timestamp stop appearing for code running inside podTemplate. Not sure if this problem could be related with other plugins, but it is only happening inside podTemplate.

Code to replicate the behavior:

timestamps{
    Integer echoNumbers = 3
    node("master") {
        for (i = 0; i <echoNumbers; i++) {
            sh "echo \"Pre POD hello ${i}\" && sleep 1"
        }
    }
    podTemplate(showRawYaml: false, label: "alpine1", cloud: "Build farm", containers: [
                containerTemplate(name: 'alpine', image: 'alpine', ttyEnabled: true, command: "cat")]) {
        node ("alpine1") {
            for (i = 0; i <echoNumbers; i++) {
              sh "echo \"POD hello ${i}\" && sleep 1"
            }
        }
    }
    node("master") {
        for (i = 0; i <echoNumbers; i++) {
            sh "echo \"POST POD hello ${i}\" && sleep 1"
        }
    }
}

 

Console log:


Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] timestamps
[Pipeline] {
[Pipeline] node
17:44:27  Running on Jenkins in /var/jenkins_home/jobs/***/workspace
[Pipeline] {
[Pipeline] sh
17:44:27  + echo Pre POD hello 0
17:44:27  Pre POD hello 0
17:44:27  + sleep 1
[Pipeline] sh
17:44:28  + echo Pre POD hello 1
17:44:28  Pre POD hello 1
17:44:28  + sleep 1
[Pipeline] sh
17:44:30  + echo Pre POD hello 2
17:44:30  Pre POD hello 2
17:44:30  + sleep 1
[Pipeline] }
[Pipeline] // node
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
17:44:46  Still waiting to schedule task
17:44:46  'alpine1-q8mvp-wbn4z' is offline
17:44:48  Agent alpine1-q8mvp-wbn4z is provisioned from template Kubernetes Pod Template
17:44:48  Running on alpine1-q8mvp-wbn4z in /home/jenkins/agent/workspace/***
[Pipeline] {
[Pipeline] sh
17:44:49  + echo 'POD hello 0'
17:44:49  POD hello 0
17:44:49  + sleep 1
[Pipeline] sh
+ echo 'POD hello 1'
POD hello 1
+ sleep 1
[Pipeline] sh
+ echo 'POD hello 2'
POD hello 2
+ sleep 1
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] node
17:44:53  Running on Jenkins in /var/jenkins_home/jobs/CII_2854_test_timestamp/workspace
[Pipeline] {
[Pipeline] sh
17:44:53  + echo POST POD hello 0
17:44:53  POST POD hello 0
17:44:53  + sleep 1
[Pipeline] sh
17:44:55  + echo POST POD hello 1
17:44:55  POST POD hello 1
17:44:55  + sleep 1
[Pipeline] sh
17:44:56  + echo POST POD hello 2
17:44:56  POST POD hello 2
17:44:56  + sleep 1
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
Finished: SUCCESS

 

In the log, it can be seen that POD hello 1 and POD hello 2 don't have timestamps

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

sergio.merino.a@gmail.com (JIRA)

unread,
Aug 2, 2019, 12:48:02 PM8/2/19
to jenkinsc...@googlegroups.com
Sergio Merino commented on Bug JENKINS-58789
 
Re: Timestamps disappear without any reason inside podTemplate

As workaround, adding "timestamps{}" inside podTemplate works. But I was expecting, that configuring it at the higher level would be enough

sergio.merino.a@gmail.com (JIRA)

unread,
Aug 7, 2019, 6:23:02 AM8/7/19
to jenkinsc...@googlegroups.com
Sergio Merino updated an issue
 
Change By: Sergio Merino
Comment:
As workaround, adding "timestamps{}" inside podTemplate works. But I was expecting, that configuring it at the higher level would be enough

vincent@latombe.net (JIRA)

unread,
Dec 17, 2019, 6:18:03 AM12/17/19
to jenkinsc...@googlegroups.com
Vincent Latombe started work on Bug JENKINS-58789
 
Change By: Vincent Latombe
Status: Open In Progress
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

vincent@latombe.net (JIRA)

unread,
Dec 17, 2019, 6:18:03 AM12/17/19
to jenkinsc...@googlegroups.com
Vincent Latombe assigned an issue to Vincent Latombe
Change By: Vincent Latombe
Assignee: Carlos Sanchez Vincent Latombe

vincent@latombe.net (JIRA)

unread,
Dec 17, 2019, 6:28:03 AM12/17/19
to jenkinsc...@googlegroups.com

vincent@latombe.net (JIRA)

unread,
Jan 24, 2020, 11:34:02 AM1/24/20
to jenkinsc...@googlegroups.com
Change By: Vincent Latombe
Status: In Review Resolved
Resolution: Fixed
Released As: kubernetes-1.22.1
Reply all
Reply to author
Forward
0 new messages