openstack complete triggers password prompt

Bug #1619274 reported by Monty Taylor on 2016-09-01
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Critical
Dean Troyer
tripleo
High
Unassigned

Bug Description

The prompt-for-password code that is run in the case of a missing password field is triggered when running openstack complete - even though that is not a command that needs auth. This gets tripped on subnodes in multi-node tests in the gate and causes them to hang indefinitely waiting on the prompt.

tamil vanan (tamilhce) on 2016-09-01
Changed in python-openstackclient:
assignee: nobody → tamil vanan (tamilhce)
Dean Troyer (dtroyer) wrote :

This was exposed by the move of password prompting into the os-client-config flow, which happens well before commands are parsed so the information to skip the prompt is not available for commands that do not require authorization.

Will fix by deferring the loading of KSA plugins into ClientManager.setup_suth() where it used to happen in the distant past. Yet one more thing to backport into os-client-config and osc-lib once the stable release stuff has settled down.

Changed in python-openstackclient:
status: New → Triaged
importance: Undecided → Critical
assignee: tamil vanan (tamilhce) → Dean Troyer (dtroyer)

Fix proposed to branch: master
Review: https://review.openstack.org/364518

Changed in python-openstackclient:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/364518
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=14dbfe44741b65c9e0514a34669f52de8629b1c0
Submitter: Jenkins
Branch: master

commit 14dbfe44741b65c9e0514a34669f52de8629b1c0
Author: Dean Troyer <email address hidden>
Date: Thu Sep 1 10:54:29 2016 -0500

    Defer auth prompting until it is actually needed

    Auth option prompting happens waaaay to early in the default
    os-client-config flow, we need to defer it until adter the commands
    have been parsed. This is why ClientManager.setup_auth() exists,
    as it is not called until the first attempt to connect to a server
    occurs. Commands that do not require authentication never hit this.

    Also, required options were not being enforced. By doing this we handle
    when no authentication info is present, we fail on missing auth-url rather
    than attempt to prompt for a password (default auth is password).

    Closes-Bug: 1619274
    Change-Id: Ia4eae350e6904c9eb2c8507d9b3429fe52418726

Changed in python-openstackclient:
status: In Progress → Fix Released
Changed in tripleo:
status: New → In Progress
importance: Undecided → High
assignee: nobody → James Slagle (james-slagle)

This issue was fixed in the openstack/python-openstackclient 3.3.0 release.

Change abandoned by James Slagle (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/372712
Reason: went in a different direction

Reviewed: https://review.openstack.org/372712
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=9484cd3850594ef6cb62d3c57dc5ec402305975c
Submitter: Jenkins
Branch: stable/newton

commit 9484cd3850594ef6cb62d3c57dc5ec402305975c
Author: Dean Troyer <email address hidden>
Date: Thu Sep 1 10:54:29 2016 -0500

    Defer auth prompting until it is actually needed

    Auth option prompting happens waaaay to early in the default
    os-client-config flow, we need to defer it until adter the commands
    have been parsed. This is why ClientManager.setup_auth() exists,
    as it is not called until the first attempt to connect to a server
    occurs. Commands that do not require authentication never hit this.

    Also, required options were not being enforced. By doing this we handle
    when no authentication info is present, we fail on missing auth-url rather
    than attempt to prompt for a password (default auth is password).

    Closes-Bug: 1619274
    Change-Id: Ia4eae350e6904c9eb2c8507d9b3429fe52418726
    (cherry picked from commit 14dbfe44741b65c9e0514a34669f52de8629b1c0)

tags: added: in-stable-newton

This issue was fixed in the openstack/python-openstackclient 3.2.1 release.

Emilien Macchi (emilienm) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in tripleo:
status: In Progress → New
assignee: James Slagle (james-slagle) → nobody
Ben Nemec (bnemec) wrote :

I believe tripleo was added to this bug because it was causing openstack undercloud install to prompt for a password. The osc fix has addressed that so I'm closing it.

Changed in tripleo:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers