[JIRA] (JENKINS-61586) Ansible Tower Plugin version 0.10.0 does not pass credentials from job to Ansible tower 3.6.1

0 views
Skip to first unread message

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 19, 2020, 9:59:02 AM3/19/20
to jenkinsc...@googlegroups.com
Lakshmi Prasanna Damineni created an issue
 
Jenkins / Bug JENKINS-61586
Ansible Tower Plugin version 0.10.0 does not pass credentials from job to Ansible tower 3.6.1
Issue Type: Bug Bug
Assignee: John Westcott
Components: ansible-tower-plugin
Created: 2020-03-19 13:58
Environment: jenkins version :2.15.0, ansible tower plugin version:0.10.0, Ansible tower version 3.16.1
Priority: Critical Critical
Reporter: Lakshmi Prasanna Damineni

Ansible Tower Plugin version 0.10.0 does not pass credentials from jenkins job to Ansible tower 3.6.1 version

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 8:05:02 AM3/20/20
to jenkinsc...@googlegroups.com
Lakshmi Prasanna Damineni commented on Bug JENKINS-61586
 
Re: Ansible Tower Plugin version 0.10.0 does not pass credentials from job to Ansible tower 3.6.1

Hi John,

it is not passing Machine type credentials from job to Ansible tower

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 8:07:17 AM3/20/20
to jenkinsc...@googlegroups.com

can you please provide me the solution as soon as possible here the issue is critical

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

unread,
Mar 20, 2020, 9:17:03 AM3/20/20
to jenkinsc...@googlegroups.com

Could you please provide more details as to what is happening? Are you getting an error back from the plugin? Is your playbook throwing an error?

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 9:28:02 AM3/20/20
to jenkinsc...@googlegroups.com

Hi John,

 

while I am trying to push machine type credentials from Jenkins job to ansible tower ,Credentials are not displaying in ansible tower job template.only  I have this issue with machine type credentials .

currently I am using ansible tower plugin version 0.10 and ansible tower version 3.6

 

while I am trying with ansible tower plugin version with 0.14.0 getting Java Null Pointer exception

 

can you please help me to get out of this issue

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 9:29:02 AM3/20/20
to jenkinsc...@googlegroups.com

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 9:30:02 AM3/20/20
to jenkinsc...@googlegroups.com

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 9:36:03 AM3/20/20
to jenkinsc...@googlegroups.com

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 9:37:02 AM3/20/20
to jenkinsc...@googlegroups.com
 
Re: Ansible Tower Plugin version 0.10.0 does not pass credentials from job to Ansible tower 3.6.1

Hi this comment by mistake assigned to me john can you please take look on it

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 9:39:02 AM3/20/20
to jenkinsc...@googlegroups.com

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

unread,
Mar 20, 2020, 9:53:02 AM3/20/20
to jenkinsc...@googlegroups.com
John Westcott commented on Bug JENKINS-61586
 
Re: Ansible Tower Plugin version 0.10.0 does not pass credentials from job to Ansible tower 3.6.1

We want to be using the latest version of the plugin. Are you getting a stack trace along with the Null Pointer Exception? If so, can you send that along? Also, are you referencing the credential by ID or by name?

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 10:05:04 AM3/20/20
to jenkinsc...@googlegroups.com

Hi John,

we are referencing credential by name, while using latest version plugin I am getting below error

java.lang.NullPointerException
at org.jenkinsci.plugins.ansible_tower.util.TowerConnector.processCredentials(TowerConnector.java:518)
at org.jenkinsci.plugins.ansible_tower.util.TowerConnector.submitTemplate(TowerConnector.java:564)
at org.jenkinsci.plugins.ansible_tower.AnsibleTowerRunner.runJobTemplate(AnsibleTowerRunner.java:184)
at org.jenkinsci.plugins.ansible_tower.AnsibleTowerStep$AnsibleTowerStepExecution.run(AnsibleTowerStep.java:266)
at org.jenkinsci.plugins.ansible_tower.AnsibleTowerStep$AnsibleTowerStepExecution.run(AnsibleTowerStep.java:202)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 10:07:06 AM3/20/20
to jenkinsc...@googlegroups.com

we are giving credentials in pipeline like below

credential: 'nameofcredential'

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

unread,
Mar 20, 2020, 10:40:02 AM3/20/20
to jenkinsc...@googlegroups.com

Thanks for the stack trace, it looks like the plugin was unable to determine the version of Tower you are connecting to. Can you go to Jenkins => Manage Jenkins => Configure System. On this page find the Ansible Tower section and check the "Enable Debugging" option next to the Tower installation you are running. After thats enabled tail your Jenkins log file and run your Jenkins job again. In the log file you should see messages that begin with the string `[Ansible-Tower]` like:
```
[Ansible-Tower] Building GET request to https://10.0.1.24/api/v2/ping/
[Ansible-Tower] Forcing cert trust
[Ansible-Tower] Request completed with (200)
[Ansible-Tower] Ping page loaded
[Ansible-Tower] Successfully got version 3.6.2
[Ansible-Tower] Connecting to Tower version: 3.6.2
```

Please attach those first couple of lines so we can see if we are getting anything back.

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 11:17:02 AM3/20/20
to jenkinsc...@googlegroups.com

I did all above steps but again I am getting below error

 

java.lang.NullPointerException
at org.jenkinsci.plugins.ansible_tower.util.TowerConnector.processCredentials(TowerConnector.java:518)
at org.jenkinsci.plugins.ansible_tower.util.TowerConnector.submitTemplate(TowerConnector.java:564)
at org.jenkinsci.plugins.ansible_tower.AnsibleTowerRunner.runJobTemplate(AnsibleTowerRunner.java:184)
at org.jenkinsci.plugins.ansible_tower.AnsibleTowerStep$AnsibleTowerStepExecution.run(AnsibleTowerStep.java:266)
at org.jenkinsci.plugins.ansible_tower.AnsibleTowerStep$AnsibleTowerStepExecution.run(AnsibleTowerStep.java:202)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 20, 2020, 11:37:03 AM3/20/20
to jenkinsc...@googlegroups.com

can you please tell the reason why the ansible tower plugin version 0.10 and 0.12 is not able to pass machine type of credentials to ansible tower,

recently we upgraded ansible tower version after this we are facing this issue ,previously it is working with this plugin versions

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

unread,
Mar 20, 2020, 3:17:02 PM3/20/20
to jenkinsc...@googlegroups.com

In Tower 3.5 they changed how credentials are passed through he API. The commit that tried to compensate for that was release as part of 0.14.0. https://github.com/jenkinsci/ansible-tower-plugin/commit/4f2dc4055519fc2c247897209af1a135bfe02864

So we want to be using the latest version of the plugin to get those changes.

The NPE exception you sent me is related to this line of code:
`this.towerVersion.is_greater_or_equal("3.5.0") ||`

 

Which is telling me that the module was unsuccessful at getting the details about your version of Tower. Can you log into Tower as the same user that the Jenkins plugin is using and then navigate to /api/v2/ping and paste the results into this ticket? I do see an issue where the plugin does not "complain" if its unable to get a version from Tower. But the ping page should be open to all users of Tower so that really shouldn't happen.

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 23, 2020, 2:57:02 AM3/23/20
to jenkinsc...@googlegroups.com

Hi John,

 

I did all above steps as per your response, getting like below.

 
HTTP 200 OKAllow: GET, HEAD, OPTIONS*Content-Type:* application/json*Vary:* Accept*X-API-Node:* awx-77996979f4-gbtkn*X-API-Time:* 0.011s{"ha": false,"version": "8.0.0.0","active_node": "awx-77996979f4-gbtkn","install_uuid": "f04571db-6ac8-4e9e-8e2f-7f7ceaa1c834","instances": [

{"node": "awx-77996979f4-gbtkn","uuid": "00000000-0000-0000-0000-000000000000","heartbeat": "2020-03-23T06:49:44.447859Z","capacity": 184,"version": "8.0.0.0"}

],"instance_groups": [

{"name": "tower","capacity": 184,"instances": ["awx-77996979f4-gbtkn"]}

]}
 

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 23, 2020, 5:24:04 AM3/23/20
to jenkinsc...@googlegroups.com

Hi John,

 

for NPE the main issue is with towerVersion variable .

I saw below comment on JENKINS-60352 issue 

This patch cause a NullPointerException (with AWX) because towerVersion attribute is apparently not properly filled.

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

unread,
Mar 23, 2020, 11:14:50 AM3/23/20
to jenkinsc...@googlegroups.com

Thanks you for the details, I believe I know what is going on now and am working on a fix. I'll let you know when that has been pushed and is ready for testing. Hopefully that will be later today.

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 23, 2020, 11:21:03 AM3/23/20
to jenkinsc...@googlegroups.com

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

unread,
Mar 23, 2020, 12:54:04 PM3/23/20
to jenkinsc...@googlegroups.com
John Westcott started work on Bug JENKINS-61586
 
Change By: John Westcott
Status: Open In Progress

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

unread,
Mar 23, 2020, 12:54:04 PM3/23/20
to jenkinsc...@googlegroups.com

This appears to have been an issue specifically with AWX v8.0.0 which reported its version as 8.0.0.0 (a 4 part notation instead of a three part notation). Jenkins 0.14.1 has been released which should hopefully address this scenario. It may take a couple days to be available for download. Please test and let me know if this now works. 

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 23, 2020, 3:00:02 PM3/23/20
to jenkinsc...@googlegroups.com

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

unread,
Mar 23, 2020, 3:06:02 PM3/23/20
to jenkinsc...@googlegroups.com

I just checked on the plugin site (https://plugins.jenkins.io/ansible-tower/) its still referencing 0.14.0 but on the Jenkins Update center (https://updates.jenkins.io/current/update-center.json) it looks like 0.14.1 is there. Please check your plugins page in Jenkins and see if the 0.14.1 version is available to you to test. If not, you may need to check over the next couple of days for it to become available. 

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 23, 2020, 3:11:05 PM3/23/20
to jenkinsc...@googlegroups.com

I am not able to see 0.14.1 version in plugin page of Jenkins,
Do you have any idea how many days it will take,
Can I expect this version will handle machine credentials of ansible tower correctly

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

unread,
Mar 23, 2020, 4:18:02 PM3/23/20
to jenkinsc...@googlegroups.com

I am hoping that the 0.14.1 will fix the issue with the extracting the version which is what is causing the machine credentials to fail. As for the number of days it can vary based on your installation. It appears to be published out on the plugin page but now its a matter of how long will that take to sync down to your installation. i.e. I've seen some installations which have additional proxies between Jenkins and the update center; I'd say to check back later tonight and then again tomorrow. You can also look at what your update center is set to and when your installation last checked for updates. To do this go to manage jenkins => manage plugins => advanced tab. The last field on here Update Site is where you are pulling plugins from and in the bottom right corner of the page there should be text indicating when the installation last pulled that source (i.e. Update information obtained: 4 hr 40 min ago). If that isn't recent you can hit the "check now" button and it should try to fetch the current data. I am seeing the 0.14.1 version of the plugin after hitting the check now button and my update site is set to the default: https://updates.jenkins.io/update-center.json

lakshmiprasanna.cse1@gmail.com (JIRA)

unread,
Mar 24, 2020, 4:23:04 AM3/24/20
to jenkinsc...@googlegroups.com

Hi John,

Thank you very much for your support, finally it successfully passing machine credentials from Jenkins job to ansible tower

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

unread,
Mar 24, 2020, 7:52:02 AM3/24/20
to jenkinsc...@googlegroups.com
John Westcott started work on Bug JENKINS-61586
 
Change By: John Westcott
Status: Open In Progress

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

unread,
Mar 24, 2020, 7:52:02 AM3/24/20
to jenkinsc...@googlegroups.com
John Westcott stopped work on Bug JENKINS-61586
 
Change By: John Westcott
Status: In Progress Open

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

unread,
Mar 24, 2020, 7:53:02 AM3/24/20
to jenkinsc...@googlegroups.com
John Westcott resolved as Fixed
 
Change By: John Westcott
Status: In Progress Resolved
Resolution: Fixed
Released As: 0.14.1
Reply all
Reply to author
Forward
0 new messages