sw-patch command fails

Bug #1790166 reported by Eric MacDonald
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Don Penney

Bug Description

Brief Description
-----------------
Attempting to patch the system using the sw-patch command fails due to a python 'from builtins import input' error.

Severity
--------
Critical: system patching is broken

Steps to Reproduce
------------------
sudo sw-patch upload <patch>

Expected Behavior
------------------
patch upload should succeed

Actual Behavior
----------------
sw-patch command fails with the following error

[wrsroot@controller-0 ~(keystone_admin)]$ sudo sw-patch upload ./SYSINV_01.patch
Password:
Traceback (most recent call last):
  File "/usr/sbin/sw-patch", line 12, in <module>
    from cgcs_patch.patch_client import main
  File "/usr/lib64/python2.7/site-packages/cgcs_patch/patch_client.py", line 8, in <module>
    from builtins import input
ImportError: No module named builtins

Reproducibility
---------------
Issue is 100% reproducible every time.

System Configuration
--------------------
All

Branch/Pull Time/Commit
-----------------------
Aug 31

Timestamp/Logs
--------------
Refer to actual behavior section above.

Revision history for this message
Don Penney (dpenney) wrote :

Any sw-patch command is broken, so running "sw-patch query" or "sw-patch query-hosts" (both can be run without sudo) would show the error.

Revision history for this message
Ghada Khalil (gkhalil) wrote :

This issue was introduced by:
https://review.openstack.org/#/c/598077/

The current plan is to revert the above commit to address this issue

Changed in starlingx:
status: New → Triaged
assignee: nobody → Don Penney (dpenney)
importance: Undecided → High
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-update (master)

Reviewed: https://review.openstack.org/599007
Committed: https://git.openstack.org/cgit/openstack/stx-update/commit/?id=cede41ecf8990e2d9d24da25dd2c29d92c6857cc
Submitter: Zuul
Branch: master

commit cede41ecf8990e2d9d24da25dd2c29d92c6857cc
Author: Don Penney <email address hidden>
Date: Fri Aug 31 15:31:30 2018 +0000

    Revert "Fix raw_input issue for Python 2/3 compatible code."

    This reverts commit 2d1e3b7981ff7b4ff8619a71d6dd569526d99c0e.

    This update causes an import failure for the sw-patch CLI command,
    as the "builtins" module is not currently part of the load.

    Change-Id: I9f71f001dd36ccd769b888fbf45cba105e7bcde2
    Closes-bug: 1790166

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.2018.10 stx.update
Ken Young (kenyis)
tags: added: stx.1.0
removed: stx.2018.10
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.