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 1853504 - [Regression] Hammer export-legacy Fails with Composite Content Views
Summary: [Regression] Hammer export-legacy Fails with Composite Content Views
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: 6.8.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-02 20:29 UTC by myoder
Modified: 2023-12-15 18:22 UTC (History)
8 users (show)

Fixed In Version: tfm-rubygem-katello-3.16.0.8-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1884025 (view as bug list)
Environment:
Last Closed: 2020-10-27 13:03:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30405 0 Normal Closed Hammer export-legacy Fails with Composite Content Views 2021-02-01 15:36:57 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:04:14 UTC

Description myoder 2020-07-02 20:29:44 UTC
Description of problem:

Trying to export a composite content view with hammer export-legacy command like so:

   # hammer -d content-view version export-legacy --organization Studio-14 --content-view "ccv-sat-6.7" --version 1

But getting this error when sending a POST to /katello/api/content_view_versions/ endpoint:

        [ INFO 2021-07-02T16:07:27 API] POST /katello/api/content_view_versions/14/export
        [DEBUG 2020-07-02T16:07:27 API] Params: {}
        [DEBUG 2020-07-02T16:07:27 API] Headers: {}
        [DEBUG 2020-07-02T16:07:27 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
        [ERROR 2020-07-02T16:07:28 API] 500 Internal Server Error
        [DEBUG 2020-07-02T16:07:28 API] {
            "displayMessage" => "wrong number of arguments (given 2, expected 3..4)",
                    "errors" => [ 
                [0] "wrong number of arguments (given 2, expected 3..4)"
            ]
        }
        [DEBUG 2020-07-02T16:07:28 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_internal_error
        [ERROR 2020-07-02T16:07:28 Exception] wrong number of arguments (given 2, expected 3..4)
        Could not export the content view:
          wrong number of arguments (given 2, expected 3..4)
        [ERROR 2020-07-02T16:07:28 Exception] 

        RestClient::InternalServerError (500 Internal Server Error):
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
            /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:353:in `block in rest_client_call_block'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:807:in `process_result'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:725:in `block in transmit'
            /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:910:in `start'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:715:in `transmit'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:145:in `execute'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:52:in `execute'
            /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/resource.rb:67:in `post'
            /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:327:in `call_client'
            /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:240:in `http_call'
            /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:190:in `call_action'
            /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:185:in `call'
            /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.3.0/lib/apipie_bindings/resource.rb:21:in `call'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.2.1/lib/hammer_cli/apipie/command.rb:53:in `send_request'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.19.6.4/lib/hammer_cli_foreman/commands.rb:188:in `send_request'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_tasks-0.0.14/lib/hammer_cli_foreman_tasks/async_command.rb:14:in `execute'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.2.1/lib/hammer_cli/abstract.rb:76:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.2.1/lib/hammer_cli/abstract.rb:76:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.2.1/lib/hammer_cli/abstract.rb:76:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.2.1/lib/hammer_cli/abstract.rb:76:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
            /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.19.2.1/bin/hammer:147:in `<top (required)>'
            /usr/bin/hammer:23:in `load'
            /usr/bin/hammer:23:in `<main>'


When I try a regular content view (the only content view that is in the composite content view that failed above), I get a successful response for that same api endpoint:

        # hammer -d content-view version export-legacy --organization Studio-14 --content-view "sat-6.7" --version 1

        [ INFO 2020-07-02T16:08:27 API] POST /katello/api/content_view_versions/13/export
        [DEBUG 2020-07-02T16:08:27 API] Params: {}
        [DEBUG 2020-07-02T16:08:27 API] Headers: {}
        [DEBUG 2020-07-02T16:08:27 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
        [DEBUG 2020-07-02T16:08:28 API] Response: {
                           "id" => "738ca4c0-19ab-45b8-a626-fc06d316f6de",
                        "label" => "Actions::Katello::ContentViewVersion::Export",
                      "pending" => true,
                       "action" => "Export content view version 'sat-6.7 1.0'; content view 'sat-6.7'; organization 'Studio-14'",
                     "username" => "admin",
                   "started_at" => "2020-07-02 20:08:27 UTC",
                     "ended_at" => nil,
                        "state" => "planned",
                       "result" => "pending",

        < - - - skipped output - - - >

                    [1] [
                        [0] "content_view",
                        [1] {
                            "text" => "content view 'sat-6.7'",
                            "link" => "/content_views/8/versions"
                        }
                    ],
                    [2] [
                        [0] "organization",
                        [1] {
                            "text" => "organization 'Studio-14'",
                            "link" => "/organizations/1/edit"
                        }
                    ]
                ],
                "output" => "",
                "errors" => []
            },
                  "cli_example" => nil,
            "available_actions" => {
                "cancellable" => false,
                  "resumable" => false
            }
        }

Version-Release number of selected component (if applicable):
Satellite 6.7.0

How reproducible:
Always

Steps to Reproduce:
1. Set a repository for immediate download policy and sync it
2. Create a content view with this repository and publish it (make sure repo has completely synced)
3. Create a composite content view with only the content view created in step 2 (make sure to wait for first publish to finish)
4. Try and export composite content view with the hammer export-legacy command

Actual results:
Fails with error.

Expected results:
Successfully export composite content view.

Additional info:
I have tested this on Satellite 6.6 and I am able to successfully export composite content views.

Comment 1 Oleh Fedorenko 2020-07-03 00:24:45 UTC
Changing component to Content Views since this seems to be an issue on the server/plugin side (500 error code for response).

Comment 2 piytiwar 2020-07-14 19:22:45 UTC
Connecting redmine issue https://projects.theforeman.org/issues/30405 from this bug

Comment 3 Bryan Kearney 2020-07-16 00:04:34 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30405 has been resolved.

Comment 6 Lai 2020-09-22 17:53:15 UTC
Steps to retest:
1. Set a repository for immediate download policy and sync it
2. Create a content view with this repository and publish it (make sure repo has completely synced)
3. Create a composite content view with only the content view created in step 2 (make sure to wait for first publish to finish)
4. Try and export composite content view with the hammer export-legacy command

Actual results:
[...............] [100%]

Successfully export composite content view.


Expected results:
[...............] [100%]
Successfully export composite content view.


Verified on 6.8.0_016

Comment 10 errata-xmlrpc 2020-10-27 13:03:56 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 (Important: Satellite 6.8 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-2020:4366


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