Bug 1439589

Summary: [Ansible] New credentials with private keys are not added
Product: Red Hat CloudForms Management Engine Reporter: Roland Wolters <rwolters>
Component: UI - OPSAssignee: Zita Nemeckova <znemecko>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, hkataria, jfrey, jhardy, mkanoor, mpovolny, obarenbo, simaishi, tfitzger, znemecko
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ansible
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1444507 (view as bug list) Environment:
Last Closed: 2018-03-06 15:55:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Ansible Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1444507    

Description Roland Wolters 2017-04-06 09:43:46 UTC
Description of problem:
Adding new ssh credentials via Automation -> Ansible -> Credentials , add new credentials does not actually create new credentials with ssh keys; they are reported as "Add of Credential .... has been successfully queued.", but never appear.

Version-Release number of selected component (if applicable):


How reproducible:
Try to add new credentials with SSH keys.

Steps to Reproduce:
1. Automation -> Ansible -> Credentials, klick Configuration, Add New Credential
2. Credential Type: Machine
3. Enter a username and a SSH key in field "Private key"
4. Click add

Actual results:
"Add of Credential "mySSH" has been successfully queued." is shown - but the credential is not actually added.

Expected results:
The credential should be added.

Comment 3 James Wong 2017-04-07 22:38:46 UTC
Hapreet/Zita,

The ssh_key_data has the newline characters being changed and Tower will fail it.

Also, when user is adding ssh_key_data, they need to also provide ssh_key_unlock. Or else Tower will fail it too.

This is the same for create and update.

Comment 7 Dmitry Misharov 2017-11-01 10:03:49 UTC
Verified in 5.9.0.3.20171017182919_5f3a0ce. A credential with ssh private key can be successfully added.