Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1909768 - hammer content-view version export-histories failing for '--help' flag
Summary: hammer content-view version export-histories failing for '--help' flag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.9.0
Assignee: Chris Roberts
QA Contact: Danny Synk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-21 15:05 UTC by Gaurav Talreja
Modified: 2021-04-21 13:24 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_katello-0.24.0.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:24:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:24:45 UTC

Description Gaurav Talreja 2020-12-21 15:05:21 UTC
Description of problem:

Version-Release number of selected component (if applicable):
@Satellite 6.9.0 snap 6.0
tfm-rubygem-hammer_cli_katello-0.24.0-1.el7sat.noarch
tfm-rubygem-hammer_cli-2.3.0-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. # hammer content-view version export-histories --help
   Error: undefined method `[]' for nil:NilClass

2. # echo $?
   70
3. # hammer full-help
   .
   .
   .
   Error: undefined method `[]' for nil:NilClass


Actual results:
Error: undefined method `[]' for nil:NilClass

Expected results:
1. Output of command with --help flag
2. hammer full-help should work

Additional info:
Works in Satellite 6.9.0 snap 5.0

Comment 1 Brad Buckingham 2021-01-04 15:37:19 UTC
Removing Regression keyword as this is a new command in Satellite.  Also, this command will only apply with Pulp3.

Comment 2 Justin Sherrill 2021-02-05 00:56:56 UTC
Chris, 

it looks like this command was removed here:  https://github.com/Katello/hammer-cli-katello/commit/6ca1e65df2520e92b7f5294180214445591be5b6 

i wonder if for 6.9 we should just remove this command?

Comment 3 Chris Roberts 2021-02-12 15:43:20 UTC
Justin,

Yeah we can just remove it from 6.9.

I will open up a MR for it

Comment 5 Danny Synk 2021-02-22 16:05:34 UTC
Steps to test:

1. Deploy a Satellite 6.9, snap 14.

2. Enter hammer shell and verify that `export-histories` is not present in the list of subcommands of `hammer content-view version`:

~~~
# hammer shell
Welcome to the hammer interactive shell.
Type 'help' for usage information.
hammer> content-view version 
--help                   export                   import                   info                     republish-repositories   
-h                       export-default           incremental-update       list                     show                     
delete                   export-legacy            index                    promote                  update                   
~~~

3. Verify that `export-histories` is not present in the output of `hammer content-view version --help`:

~~~
# hammer content-view version --help
Usage:
    hammer content-view version [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 delete                        Remove content view version
 export                        Export a content view version
 export-default                Export the library default content view
 export-legacy                 Export a content view (legacy method)
 import                        Import a content view version
 incremental-update            Perform an Incremental Update on one or more Content View Versions
 info                          Show content view version
 list                          List content view versions
 promote                       Promote a content view version
 republish-repositories        Forces a republish of the version's repositories' metadata
 update                        Update a content view version

Options:
 -h, --help                    Print help
~~~

4. Attempt to run `hammer content-view version export-histories --help`:

~~~
# hammer content-view version export-histories --help
Error: No such sub-command 'export-histories'.

See: 'hammer content-view version --help'.
You have mail in /var/spool/mail/root
~~~

Expected Results:
`export-histories` is no longer present in help text or hammer shell options of `hammer content-view version`. Running `hammer content-view version export-histories` produces an error indicating that this is not a valid subcommand.

Actual Results:
`export-histories` is no longer present in help text or hammer shell options of `hammer content-view version`. Running `hammer content-view version export-histories` produces an error indicating that this is not a valid subcommand.

Verified on Satellite 6.9, snap 14 (tfm-rubygem-hammer_cli_katello-0.24.0.1-1.el7sat.noarch).

Comment 8 errata-xmlrpc 2021-04-21 13:24:23 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 (Moderate: Satellite 6.9 Release), 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/RHSA-2021:1313


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