Description of problem: The customer is not able to export or import docker content on Satellite Version-Release number of selected component (if applicable): 6.7 How reproducible: 100% Steps to Reproduce: 1. sync docker 2. export 3. import on a disconnected satellite server Actual results: it's not possible to do it Expected results: easy way to export/import Additional info:
Hello all We have a customer trying to export from connected Satellite and import on a air-gapped Satellite docker containers. At this moment, we are not able to export the docker content, once the export process require at least one repo on the content view or in the default content view. We created a cv and added only dockers, then the process failed. That said, let's download/export the docker directly from the cdn and just import on Satellite "let's skip the satellite sync and export process from now" Below the complete steps // Downloading the image --- [root@wallsat67 docker]# docker pull httpd Using default tag: latest Trying to pull repository registry.access.redhat.com/httpd ... Pulling repository registry.access.redhat.com/httpd Trying to pull repository registry.redhat.io/httpd ... Trying to pull repository docker.io/library/httpd ... latest: Pulling from docker.io/library/httpd f7ec5a41d630: Pull complete d1589b6d8645: Pull complete 83d3755a8d28: Pull complete f8459b08e404: Pull complete 30fabbf5a067: Pull complete Digest: sha256:a6e472ad921c93d9fc2cbe2ff07560b9a526c145c4e10faff3aeb28c48cce585 Status: Downloaded newer image for docker.io/httpd:latest --- // Checking the image --- [root@wallsat67 docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/httpd latest 0b932df43057 13 days ago 138 MB --- // Exporting it --- [root@wallsat67 docker]# docker save httpd -o httpd.tar --- // Checking the file --- [root@wallsat67 docker]# ll total 138260 -rw-------. 1 root root 141574656 Apr 23 20:20 httpd.tar --- Now, let's import this data on Satellite. Below we can see the the command that should be doing it. --- hammer> repository upload-content -h Usage: repository upload-content [OPTIONS] Options: --content-type CONTENT_TYPE Content type ('deb', 'docker_manifest', 'file', 'ostree', 'puppet_module', 'rpm', 'srpm') Possible value(s): 'docker_manifest', 'file', 'ostree', 'puppet_module', 'rpm', 'srpm' --fields FIELDS Show specified fileds or predefined filed sets only. (See below) Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --id ID Repository ID --name NAME Repository name to search by --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --path PATH Upload file, directory of files, or glob of files as content for a repository. Globs must be escaped by single or double quotes --product PRODUCT_NAME Product name to search by --product-id PRODUCT_ID Product numeric identifier -h, --help Print help Predefined field sets: ------ FIELDS ------ hammer> --- // Here we can see the docker repo --- [root@wallsat67 docker]# hammer --csv repository list Id,Name,Product,Content Type,URL ... 195,new_repo_upload_via_webUI,new_docker_product,docker, ... --- // Trying to upload the tarball file --- [root@wallsat67 docker]# hammer repository upload-content --path httpd.tar --id 195 --organization ACME Could not upload the content: 500 Internal Server Error --- // And here more details --- ... [ INFO 2021-04-23T20:24:07 API] POST /katello/api/repositories/195/content_uploads [DEBUG 2021-04-23T20:24:07 API] Params: { :size => 141574656, :checksum => "39468432e43292058dbdc337957f66a45fdb9e091d2b6bca456df1baf698dc55", :content_type => nil } [DEBUG 2021-04-23T20:24:07 API] Headers: {} [DEBUG 2021-04-23T20:24:07 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [ERROR 2021-04-23T20:24:38 API] 400 Bad Request [DEBUG 2021-04-23T20:24:38 API] { "displayMessage" => "500 Internal Server Error", "errors" => [ [0] "500 Internal Server Error" ] } [DEBUG 2021-04-23T20:24:38 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_bad_request [ERROR 2021-04-23T20:24:38 Exception] 500 Internal Server Error Could not upload the content: 500 Internal Server Error [ERROR 2021-04-23T20:24:38 Exception] RestClient::BadRequest (400 Bad Request): /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_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:386:in `create_content_upload' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:357:in `upload_file' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:306:in `block (2 levels) in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:306:in `open' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:306:in `block in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:304:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.20.2.3/lib/hammer_cli_katello/repository.rb:304: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>' [root@wallsat67 docker]# --- // Some additional tests using single and double quotation --- [root@wallsat67 docker]# hammer repository upload-content --path 'httpd.tar' --id 195 --organization ACME Could not upload the content: 500 Internal Server Error [root@wallsat67 docker]# hammer repository upload-content --path "httpd.tar" --id 195 --organization ACME Could not upload the content: 500 Internal Server Error [root@wallsat67 docker]# hammer repository upload-content --path "/root/docker/httpd.tar" --id 195 --organization ACME Could not upload the content: 500 Internal Server Error --- // Testing the same file on Satellite 6.8 --- [root@wallsat68 ~]# hammer repository upload-content --path httpd.tar --id 29 --organization RedHat Could not upload the content: Task 084a7c37-4c94-4188-a214-6063eb420367: Katello::Errors::PulpError: PLP0047: The importer docker_importer indicated a failed response when uploading docker_manifest unit to repository 3ff309b3-cb81-48db-81a6-c571ae7ef6c2. Summary: 'list indices must be integers, not str'. Details: '{}' [root@wallsat68 ~]# [DEBUG 2021-04-23T20:44:14 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [DEBUG 2021-04-23T20:44:15 API] Response: "" [DEBUG 2021-04-23T20:44:15 API] Response headers: { :date => "Sat, 24 Apr 2021 00:44:14 GMT", :server => "Apache", :foreman_version => "2.1.2.26", :foreman_api_version => "2", :foreman_current_organization => "; ANY", :foreman_current_location => "; ANY", :apipie_checksum => "e0622cd2a19bdab911888375616d292044e0b06d", :cache_control => "no-cache", :x_request_id => "a9e84e27-441a-479d-8710-1fb51e2f9662", :x_runtime => "0.471292", :strict_transport_security => "max-age=631139040; includeSubdomains", :x_frame_options => "sameorigin", :x_content_type_options => "nosniff", :x_xss_protection => "1; mode=block", :x_download_options => "noopen", :x_permitted_cross_domain_policies => "none", :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data:; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'", :x_powered_by => "Phusion Passenger 4.0.18", :set_cookie => [ [0] "_session_id=bbe183e449c9948a9d90738e8773efd4; path=/; secure; HttpOnly; SameSite=Lax" ], :status => "204 No Content" } [DEBUG 2021-04-23T20:44:15 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_bad_request [ERROR 2021-04-23T20:44:15 Exception] Task 4f00e9b9-e1a7-46b4-a3d7-b75ce217ab2a: Katello::Errors::PulpError: PLP0047: The importer docker_importer indicated a failed response when uploading docker_manifest unit to repository 3ff309b3-cb81-48db-81a6-c571ae7ef6c2. Summary: 'list indices must be integers, not str'. Details: '{}' Could not upload the content: Task 4f00e9b9-e1a7-46b4-a3d7-b75ce217ab2a: Katello::Errors::PulpError: PLP0047: The importer docker_importer indicated a failed response when uploading docker_manifest unit to repository 3ff309b3-cb81-48db-81a6-c571ae7ef6c2. Summary: 'list indices must be integers, not str'. Details: '{}' [ERROR 2021-04-23T20:44:15 Exception] RestClient::BadRequest (400 Bad Request): /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:76:in `put' /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_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:492:in `import_uploads' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:436:in `upload_file' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:378:in `block (2 levels) in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:378:in `open' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:378:in `block in execute' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:376:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.22.2.3/lib/hammer_cli_katello/repository.rb:376: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-2.1.2/lib/hammer_cli/abstract.rb:77: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-2.1.2/lib/hammer_cli/abstract.rb:77: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-2.1.2/lib/hammer_cli/abstract.rb:77: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-2.1.2/bin/hammer:147:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>' [root@wallsat68 ~]# --- So, at this moment, we are unable to sync/export/import docker to a disconnected Satellite. Any insight or help on that? Thank you
*** This bug has been marked as a duplicate of bug 1650468 ***