malformed command in Keystone Register Identity Providers

Bug #1959022 reported by Kevin Rasmussen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Undecided
Unassigned

Bug Description

When using Keystone federation with OpenID the `Register Identity Providers in OpenStack` task fails with:

openstack: '--os-user-domain-name ${DOMAIN} identity provider create --description ${DESCRIPTION} --remote-id ${REOMOTEID} --domain default ${IDP}' is not an openstack command.

It appears that there is a missing `=` after ` --os-user-domain-name`

In other words this:
```
- name: Register Identity Providers in OpenStack
  become: true
  command: >
    docker exec -t keystone openstack
    --os-auth-url={{ openstack_auth.auth_url }}
    --os-password={{ openstack_auth.password }}
    --os-username={{ openstack_auth.username }}
    --os-identity-api-version=3
    --os-interface={{ openstack_interface }}
    --os-system-scope={{ openstack_auth.system_scope }}
    --os-user-domain-name{{ openstack_auth.user_domain_name }}
    --os-region-name={{ openstack_region_name }}
    {% if openstack_cacert != '' %}--os-cacert={{ openstack_cacert }}{% endif %}
    identity provider create
    --description "{{ item.public_name }}"
    --remote-id "{{ item.identifier }}"
    --domain "{{ item.openstack_domain }}"
    {{ item.name }}
  run_once: True
  when:
    - item.name not in existing_idps
  with_items: "{{ keystone_identity_providers }}"
```

Should be this:
```
- name: Register Identity Providers in OpenStack
  become: true
  command: >
    docker exec -t keystone openstack
    --os-auth-url={{ openstack_auth.auth_url }}
    --os-password={{ openstack_auth.password }}
    --os-username={{ openstack_auth.username }}
    --os-identity-api-version=3
    --os-interface={{ openstack_interface }}
    --os-system-scope={{ openstack_auth.system_scope }}
    --os-user-domain-name={{ openstack_auth.user_domain_name }}
    --os-region-name={{ openstack_region_name }}
    {% if openstack_cacert != '' %}--os-cacert={{ openstack_cacert }}{% endif %}
    identity provider create
    --description "{{ item.public_name }}"
    --remote-id "{{ item.identifier }}"
    --domain "{{ item.openstack_domain }}"
    {{ item.name }}
  run_once: True
  when:
    - item.name not in existing_idps
  with_items: "{{ keystone_identity_providers }}"
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)
Changed in kolla-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/826322
Committed: https://opendev.org/openstack/kolla-ansible/commit/f955383b9c8cbc38dc1a8d03323ba6d9e83d3664
Submitter: "Zuul (22348)"
Branch: master

commit f955383b9c8cbc38dc1a8d03323ba6d9e83d3664
Author: Kevin Rasmussen <email address hidden>
Date: Tue Jan 25 09:19:11 2022 -0700

    Fix bad openstack command while registering IDP

    This fixes a bug in registering identity providers

    The bug was caused by a missing `=` in the openstack command

    Add the missing `=` after `--os-user-domain-name`

    Closes-Bug: #1959022
    Change-Id: I73f80cd2c81a3944de0933e60f5768956a1a3b70

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/826375

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/826376

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-ansible (stable/wallaby)

Change abandoned by "Michal Nasiadka <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/826376
Reason: not needed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/826375
Committed: https://opendev.org/openstack/kolla-ansible/commit/464877f0192292a8df500ae134f2a03716641e9e
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 464877f0192292a8df500ae134f2a03716641e9e
Author: Kevin Rasmussen <email address hidden>
Date: Tue Jan 25 09:19:11 2022 -0700

    Fix bad openstack command while registering IDP

    This fixes a bug in registering identity providers

    The bug was caused by a missing `=` in the openstack command

    Add the missing `=` after `--os-user-domain-name`

    Closes-Bug: #1959022
    Change-Id: I73f80cd2c81a3944de0933e60f5768956a1a3b70
    (cherry picked from commit f955383b9c8cbc38dc1a8d03323ba6d9e83d3664)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 14.0.0.0rc1

This issue was fixed in the openstack/kolla-ansible 14.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 13.1.0

This issue was fixed in the openstack/kolla-ansible 13.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.