test_ssh_encrypt_decrypt_text fails with UnicodeDecodeError after oslo.concurrency 0.4.0 release

Bug #1410348 reported by Matt Riedemann
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
oslo.concurrency
Fix Released
Critical
Doug Hellmann
Tags: testing
Matt Riedemann (mriedem)
tags: added: testing
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/146929

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Doug Hellmann (doug-hellmann)
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

Revert proposed for the original breaking change: https://review.openstack.org/#/c/146940/

Revision history for this message
Matt Riedemann (mriedem) wrote :

global-requirements block on oslo.concurrency 0.4.0: https://review.openstack.org/#/c/146942/

Revision history for this message
Victor Stinner (vstinner) wrote :

History of the change.

My initial goal was to port oslo_concurrency to Python 3.

I had issues with the mask_password() function of oslo_utils.strutils which wants to work on unicode. If the input type is bytes, mask_password() tries to decode the input from the default Python encoding (ex: ascii in Python 2, utf-8 on Python 3), but it keeps the input unchanged on UnicodeDecodeError. I proposed a change to be able to work on bytes, but it was rejected (or at least not accepted):
https://review.openstack.org/#/c/137600/

I chose a different approach: have a reliable behaviour on Python 2 & Python 3, for any kind of output (ascii or non-ascii output): always work on Unicode.

I don't understand the expectations of these functions (execute, ssh_execute). The output (stdout/stderr) should be considered as binary or text? I prefer to consider that it is text because on error was tried to replace a text pattern with a message to hide passwords.

I'm working on a change which would restore the previous behaviour on Python 2, and keep the Python 3 compatibility. Hint: don't decode stdout/stderr on Python 2.

Revision history for this message
Victor Stinner (vstinner) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Doug Hellmann (<email address hidden>) on branch: master
Review: https://review.openstack.org/146937
Reason: Reverting the breaking change in oslo.concurrency: https://review.openstack.org/146940

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/146929

Changed in oslo.concurrency:
assignee: nobody → Doug Hellmann (doug-hellmann)
Changed in nova:
assignee: Doug Hellmann (doug-hellmann) → nobody
Changed in oslo.concurrency:
status: New → Fix Committed
importance: Undecided → Critical
milestone: none → next-kilo
Changed in oslo.concurrency:
status: Fix Committed → Fix Released
melanie witt (melwitt)
Changed in nova:
status: In Progress → New
Revision history for this message
Joe Gordon (jogo) wrote :

not seeing this cause nova breaking change in oslo.concurrency was reverted

Changed in nova:
status: New → Invalid
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.