Bug 1495568 - Providing invalid phase in foreman-maintain upgrade run shows undefined method `to_hash' for nil:NilClass
Summary: Providing invalid phase in foreman-maintain upgrade run shows undefined metho...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Kavita
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks: 1496794
TreeView+ depends on / blocked
 
Reported: 2017-09-26 10:15 UTC by Nikhil Kathole
Modified: 2019-09-26 15:38 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-19 17:22:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log in foreman-maintain.log file (2.69 KB, text/plain)
2017-09-26 10:15 UTC, Nikhil Kathole
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21211 0 None None None 2017-10-05 12:39:21 UTC
Red Hat Product Errata RHBA-2018:0330 0 normal SHIPPED_LIVE Satellite Maintenance bug fix update 2018-02-19 22:22:51 UTC

Description Nikhil Kathole 2017-09-26 10:15:27 UTC
Created attachment 1330971 [details]
log in foreman-maintain.log file

Description of problem: While running foreman-maintain upgrade run with option --phase provided invalid phase name shows "undefined method `to_hash' for nil:NilClass".


Version-Release number of selected component (if applicable): Foreman-maintain snap 2.0


How reproducible: always


Steps to Reproduce:

1. # foreman-maintain upgrade run --phase pre-upgrade


Actual results: 
Error as "undefined method `to_hash' for nil:NilClass"


Expected results: Error should get handled and proper message showing phase is invalid.


Additional info:

Comment 3 Satellite Program 2017-10-05 14:23:34 UTC
Upstream bug assigned to kgaikwad

Comment 4 Satellite Program 2017-10-10 12:12:26 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21211 has been resolved.

Comment 5 Nikhil Kathole 2017-12-15 08:57:12 UTC
VERIFIED

Version Tested:

# rpm -q rubygem-foreman_maintain
rubygem-foreman_maintain-0.1.1-1.el7sat.noarch

# foreman-maintain upgrade run --phase pre-upgrade
Unknown phase pre-upgrade

Error handled and showed message as unknown phase. But if --phase not passed, it showed

# foreman-maintain upgrade run --phase
undefined method `to_sym' for nil:NilClass

Verifying this as this will be tracked by https://bugzilla.redhat.com/show_bug.cgi?id=1523933 .

Comment 8 errata-xmlrpc 2018-02-19 17:22:26 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://access.redhat.com/errata/RHBA-2018:0330


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