Project

General

Profile

Bug #30405

Hammer export-legacy Fails with Composite Content Views

Added by Piyush Tiwari about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Description of problem:

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

  1. 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:

  1. 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.

Associated revisions

Revision c6c7fafc (diff)
Added by Piyush Tiwari about 2 years ago

Fixes #30405 - Fix Hammer export-legacy Fails with Composite Content Views (#8836)

History

#1 Updated by Piyush Tiwari about 2 years ago

  • Bugzilla link set to 1853504

#2 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8836 added

#3 Updated by Jonathon Turel about 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.0.0
  • Category set to Content Views

#4 Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases Katello 4.0.0 added

#5 Updated by Piyush Tiwari about 2 years ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/Katello/katello/pull/8798 added

#7 Updated by Chris Roberts about 2 years ago

  • Target version changed from Katello 4.0.0 to Katello 3.17.0

#8 Updated by Jonathon Turel almost 2 years ago

  • Pull request deleted (https://github.com/Katello/katello/pull/8798)

Also available in: Atom PDF