RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1231410 - preupgrade fails if stdin fed from pipe (list index out of range)
Summary: preupgrade fails if stdin fed from pipe (list index out of range)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: preupgrade-assistant
Version: 6.7
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Petr Hracek
QA Contact: Tereza Cerna
URL:
Whiteboard:
: 1261763 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-13 01:32 UTC by Alois Mahdal
Modified: 2016-05-11 08:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Piped input no longer causes preupgrade-assistant to crash A bug caused the "preupg" command to crash if input was sent non-interactively from a UNIX pipe. With this release, "preupg" is now able to correctly accept input from a pipe.
Clone Of:
Environment:
Last Closed: 2016-05-11 08:26:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1022 0 normal SHIPPED_LIVE preupgrade-assistant bug fix and enhancement update 2016-05-11 12:23:56 UTC

Description Alois Mahdal 2015-06-13 01:32:07 UTC
Description of problem
======================

preupg fails if stdin is not terminal:

    # preupg <<<y
    The Preupgrade Assistant is a diagnostics tool 
    and does not perform the actual upgrade.
    Make sure you back up your system and all of your data now,
    before using the Upgrade Tool to avoid potential data loss.
    Do you want to continue? y/n
    Gathering logs used by preupgrade assistant:
    All installed packages                                 : 01/10 ...finished (time 00:00s)
    All changed files                                      : 02/10 ...finished (time 01:17s)
    Changed config files                                   : 03/10 ...finished (time 00:00s)
    All users                                              : 04/10 ...finished (time 00:00s)
    All groups                                             : 05/10 ...finished (time 00:00s)
    Service statuses                                       : 06/10 ...finished (time 00:00s)
    All installed files                                    : 07/10 ...finished (time 00:03s)
    All local files                                        : 08/10 ...finished (time 00:02s)
    All executable files                                   : 09/10 ...finished (time 00:01s)
    RedHat signed packages                                 : 10/10 ...finished (time 00:00s)
    Assessment of the system, running checks / SCE scripts:
    001/131 ...running (Configuration Files to Review)stty: standard input: Inappropriate ioctl for device
    Usage: preupg [options]

    preupg: error: list index out of range
    #


Version-Release number of selected component
============================================

preupgrade-assistant-2.0.3-8.el6


How reproducible
================

Always if stdin fed from pipe


Steps to Reproduce
==================

    preupg <<<y


Actual results
==============

Error from content and eventually preupg taken down.


Expected results
================

No failure.


Additional info
===============

Possibly there is also some problem with the content, but OTOH preupg
should be able to prevent this (by closing stdin for contents...if
it's doable...?)

Also note the Usage: message---this is probably also not intentional.

Comment 2 Petr Hracek 2015-09-10 07:14:47 UTC
*** Bug 1261763 has been marked as a duplicate of this bug. ***

Comment 4 Petr Hracek 2015-11-03 07:24:55 UTC
Great bug. I will look on it.

Comment 5 Petr Hracek 2015-11-03 11:42:38 UTC
For now I have fixed the issue by upstream commit https://github.com/phracek/preupgrade-assistant/commit/16be28741f77a45082d58fff9cd84fc3601afa7c

It doesn't finish with traceback and output looks like:

[root@rhel6 ~]# preupg --skip-common --debug  <<<y
The Preupgrade Assistant is a diagnostics tool 
and does not perform the actual upgrade.
Make sure you back up your system and all of your data now,
before using the Upgrade Tool to avoid potential data loss.
Do you want to continue? y/n
y
Assessment of the system, running checks / SCE scripts:
001/132 ...running (Configuration Files to Review)stty: standard input: Inappropriate ioctl for device
done    (Configuration Files to Review)
002/132 ...running (File Lists for Manual Migration)stty: standard input: Inappropriate ioctl for device
done    (File Lists for Manual Migration)
003/132 ...running (Bacula Backup Software)stty: standard input: Inappropriate ioctl for device
done    (Bacula Backup Software)
... snip ...
|Removed .so libs                                                                                            |needs_action      |
|Content for enabling and disabling services based on RHEL 6 system                                          |needs_action      |
|GNOME Desktop Environment underwent several design modifications in Red Hat Enterprise Linux 7 release      |fail              |
|Check the system version                                                                                    |fail              |
---------------------------------------------------------------------------------------------------------------------------------
Tarball with results is stored here /root/preupgrade-results/preupg_results-151103123604.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Summary information:
We found some critical issues. In-place upgrade is not advised.
Read the file /root/preupgrade/result.html for more details.
Read the admin report file /root/preupgrade/result-admin.html for more details.
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .
[root@rhel6 ~]# y
-bash: y: command not found
[root@rhel6 ~]#

Comment 9 errata-xmlrpc 2016-05-11 08:26:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1022.html


Note You need to log in before you can comment on or make changes to this bug.