Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when creating machine credential (embedded ansible) #14532

Closed
mzazrivec opened this issue Mar 28, 2017 · 1 comment · Fixed by #14538
Closed

Error when creating machine credential (embedded ansible) #14532

mzazrivec opened this issue Mar 28, 2017 · 1 comment · Fixed by #14538

Comments

@mzazrivec
Copy link
Contributor

@jameswnl

With latest master and #14483 merged:

$ curl -X POST -d '{"name":"machine-cred-01", "type":"ManageIQ::Providers::EmbeddedAnsible::AutomationManager::MachineCredential", "manager_resource":{"href":"http://localhost:3000/api/providers/10000000000043"}}' http://admin:smartvm@localhost:3000/api/authentications|json_reformat
{
    "results": [
        {
            "success": true,
            "message": "Creating Authentication",
            "task_id": 10000000660519,
            "task_href": "http://localhost:3000/api/tasks/10000000660519"
        }
    ]
}

Then when I later check the task result:

$ curl http://admin:smartvm@localhost:3000/api/tasks/10000000660519|json_reformat
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   381    0   381    0     0   2171      0 --:--:-- --:--:-- --:--:--  2177
{
    "href": "http://localhost:3000/api/tasks/10000000660519",
    "id": 10000000660519,
    "name": "Creating ManageIQ::Providers::EmbeddedAnsible::AutomationManager::MachineCredential with name=",
    "state": "Finished",
    "status": "Error",
    "message": "{\"detail\":[\"Missing 'user', 'team', or 'organization'.\"]}",
    "userid": "system",
    "created_on": "2017-03-28T09:14:13Z",
    "updated_on": "2017-03-28T09:14:20Z"
}
@jameswnl
Copy link
Contributor

This error is because we Embedded is padding the parameter hash with the default_organization before passing it onto Tower. However, Tower is expecting the hash key to be organization instead of organization_id.

I had to be either too sick or crazy and was hallucinating... because my first version was using organization_id and it failed on me so that I had to update it to use organization. So now flipping it back in #14538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants