[JIRA] (JENKINS-58725) Ansible-Tower Plugin: Ansible Tower will hang when Jenkins job is cancelled on the web portal. And now the latter jobs will all be pending.

0 views
Skip to first unread message

fen.zhou@yitu-inc.com (JIRA)

unread,
Jul 30, 2019, 5:36:03 AM7/30/19
to jenkinsc...@googlegroups.com
fen zhou updated an issue
 
Jenkins / Bug JENKINS-58725
Ansible-Tower Plugin: Ansible Tower will hang when Jenkins job is cancelled on the web portal. And now the latter jobs will all be pending.
Change By: fen zhou
Summary: Ansible-Tower Plugin: Ansible Tower will hang when Jenkins job is cancelled on the web portal. And now the latter job jobs will all be pending.
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

fen.zhou@yitu-inc.com (JIRA)

unread,
Jul 30, 2019, 5:37:02 AM7/30/19
to jenkinsc...@googlegroups.com

john.westcott.iv@redhat.com (JIRA)

unread,
Aug 13, 2019, 2:21:02 PM8/13/19
to jenkinsc...@googlegroups.com
John Westcott assigned an issue to fen zhou
 

You are seeing jobs in Tower which were launched by Jenkins stuck in a pending state?
Can you add more details to this? i.e. what version of Tower are you on. What version of the plugin are you using? Also, can you manually invoke a job in Tower and get it past the pending state?

The pending state in Tower means that the job was requested but its waiting to be scheduled (actually run) within the Tower cluster.
Once the jobs is scheduled in Jenkins, nothing else is done on the Jenkins side other than monitor the job.

Jobs getting stuck in a pending state would indicate (to me) that there is some kind of issue with your Tower installation.

Change By: John Westcott
Assignee: John Westcott fen zhou

fen.zhou@yitu-inc.com (JIRA)

unread,
Aug 30, 2019, 11:13:04 PM8/30/19
to jenkinsc...@googlegroups.com
fen zhou commented on Bug JENKINS-58725
 
Re: Ansible-Tower Plugin: Ansible Tower will hang when Jenkins job is cancelled on the web portal. And now the latter jobs will all be pending.

4.0.0 AWX.

0.9.1 Ansible Tower Plugin.

When I invoke Jenkins Job which has already called a Tower job, the Jenkins job gets stopped with Tower job still running. But actually, if the Tower job is stucked in one step like running a long-term progress, it will still remain running, which makes it impossible for me to call another Tower job in the same Tower project.

I think one problem is I can't parallel the Tower jobs which is a normal feature of Tower (no way to change this). On the other hand, Ansible Tower Plugin doesn't notify Tower when it stops. These two features make me feel uncomfortable, and the page shows all the latter jobs wait to be scheduled. Then it will be one-century waiting without any feedback.

Now, I can only stop the world with manually invoking on the Tower. But I hope there is any way to stop the Tower job without handly stopping.

 

fen.zhou@yitu-inc.com (JIRA)

unread,
Sep 17, 2019, 7:59:02 AM9/17/19
to jenkinsc...@googlegroups.com
fen zhou commented on Bug JENKINS-58725

Is there any comment about this?

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

john.westcott.iv@redhat.com (JIRA)

unread,
Sep 17, 2019, 9:46:04 AM9/17/19
to jenkinsc...@googlegroups.com

I am either unable to replicate this problem or I am not understanding what is going on exactly in your case. When Jenkins executes a job on Tower is calling the Tower API and Tower will run the job asynchronously from Jenkins but Jenkins will wait for that job to complete before Jenkins moves on to the next step. If you are running two Jenkins jobs concurrently and they both call the same Tower instance as long as the Tower job is configured to run the job concurrently both Jenkins job should run in parallel. Is that what you are seeing as not working? If so can you confirm that your Tower job is correctly set for concurrent execution?

Also, if you stop the Jenkins job any further jobs it would have run in Tower will not be run but the currently active Tower job will continue to run until Tower is complete. Are you looking for a feature where a cancelled job in Jenkins would attempt to cancel the Tower job? if so, I can look into the possibility of a feature like this.

Also, for async jobs between Tower and Jenkins (i.e. having Jenkins not wait for a job to complete in Tower) this can now be done in the latest version of the plugin so long as your Jenkins job is a pipeline and not a freestyle job. See the "Async Execution" section on https://wiki.jenkins.io/display/JENKINS/Ansible+Tower+Plugin and let me know if that helps this situation at all.

If none of this helps can you please try to describe further what is currently happening and what you expect to happen?

fen.zhou@yitu-inc.com (JIRA)

unread,
Sep 17, 2019, 11:33:02 PM9/17/19
to jenkinsc...@googlegroups.com
fen zhou commented on Bug JENKINS-58725

 

1. Tower job is correctly set for concurrent execution.

We use Tower job for real case in CD, so we want to keep it running one by one instead of parallelismhttps://www.google.com/search?safe=active&rlz=1C1GCEU_zh-CNCN857CN857&sxsrf=ACYBGNQJoniRJOVPz950NTUk8Kud9Faz1g:1568777498331&q=parallelism&spell=1&sa=X&ved=0ahUKEwj95pPMt9nkAhVU62EKHUaACXYQkeECCC8oAA, so we will not change the settings. Anyway, thanks for ur reminder.

2.  A cancelled job in Jenkins attempt to cancel the Tower job.

This is exactly what I want. It's more natural to cancel the Tower job when Jenkins job is cancelled.

3. Tower will run the job asynchronously.

I checked this awesome new feature, and thanks for ur help. But I think it can't help with the situation directly.

 

Thanks for your support

fen.zhou@yitu-inc.com (JIRA)

unread,
Sep 17, 2019, 11:34:01 PM9/17/19
to jenkinsc...@googlegroups.com
fen zhou edited a comment on Bug JENKINS-58725
 

1. Tower job is correctly set for concurrent execution.

We use Tower job for real case in CD, so we want to keep it running one by one instead of parallelism [|https://www.google.com/search?safe=active&rlz=1C1GCEU_zh-CNCN857CN857&sxsrf=ACYBGNQJoniRJOVPz950NTUk8Kud9Faz1g:1568777498331&q=parallelism&spell=1&sa=X&ved=0ahUKEwj95pPMt9nkAhVU62EKHUaACXYQkeECCC8oAA] , so we will not change the settings. Anyway, thanks for ur reminder.

2.  *A cancelled job in Jenkins attempt to cancel the Tower job.*


This is exactly what I want. It's more natural to cancel the Tower job when Jenkins job is cancelled.

3. Tower will run the job asynchronously.

I checked this awesome new feature, and thanks for ur help. But I think it can't help with the situation directly.

 

Thanks for your support ;)

fen.zhou@yitu-inc.com (JIRA)

unread,
Sep 17, 2019, 11:59:04 PM9/17/19
to jenkinsc...@googlegroups.com
fen zhou commented on Bug JENKINS-58725

BTW, I have just tested the parallelism of the same Tower job template, Tower jobs of the same Tower job template will run one by one when I click the launch button twice in a short time. But never mind, it's accessible in my situation.

john.westcott.iv@redhat.com (JIRA)

unread,
Oct 14, 2019, 8:36:03 AM10/14/19
to jenkinsc...@googlegroups.com
John Westcott resolved as Fixed
 

Please try v0.11.0 of the plugin. It will now attempt to cancel a job running in Tower if the Jenkins job is canceled.

Change By: John Westcott
Status: Open Resolved
Resolution: Fixed
Released As: 0.11.0

john.westcott.iv@redhat.com (JIRA)

unread,
Jan 8, 2020, 9:54:04 AM1/8/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages