-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #38103 - disallow direct container tar uploads #11262
base: master
Are you sure you want to change the base?
Fixes #38103 - disallow direct container tar uploads #11262
Conversation
c35b116
to
9361aa3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a product and docker type repo, then tried to upload a random file to it. Not sure what I did wrong but I got this:
[vagrant@centos9-katello-devel hammer-cli-katello]$ hammer repository upload-content --id 52 --path ./release_notes.md
[..............................................................................................................................................................] [100%]
Error: undefined method `create' for #<PulpContainerClient::ContentManifestsApi:0x00007ffb5edfc800 @api_client=#<PulpContainerClient::ApiClient:0x00007ffb5edfc990 @config=#<PulpContainerClient::Configuration:0x00007ffb5edf4970 @scheme="https", @host="centos9-katello-devel.fedora.example.com", @base_path="", @api_key={}, @api_key_prefix={}, @timeout=3600, @client_side_validation=true, @ssl_verify=true, @ssl_verify_mode=nil, @ssl_ca_file="/home/vagrant/foreman-certs/proxy_ca.pem", @ssl_client_cert=#<OpenSSL::X509::Certificate: subject=#<OpenSSL::X509::Name CN=centos9-katello-devel.fedora.example.com,OU=PUPPET,O=FOREMAN,ST=North Carolina,C=US>, issuer=#<OpenSSL::X509::Name CN=centos9-katello-devel.fedora.example.com,OU=SomeOrgUnit,O=Katello,L=Raleigh,ST=North Carolina,C=US>, serial=#<OpenSSL::BN:0x00007ffb5edbdfb0>, not_before=2024-11-12 19:44:38 UTC, not_after=2038-01-17 19:44:39 UTC>, @ssl_client_key=#<OpenSSL::PKey::RSA:0x00007ffb27e5e6b8 oid=rsaEncryption>, @params_encoder=Faraday::FlatParamsEncoder, @debugging=true, @inject_format=false, @force_ending_format=false, @logger=#<Logging::Logger:0x00007ffb600d80f0 @name="katello/pulp_rest", @parent=#<Logging::RootLogger:0x00007ffb600f8030 @name="root", @appenders=[#<Logging::Appenders::File:0x00007ffb5fd774b0 @filename="/home/vagrant/foreman/log/development.log", @encoding=#<Encoding:UTF-8>, @io=#<File:/home/vagrant/foreman/log/development.log>, @close_method=:close, @buffer=[], @immediate=[], @auto_flushing=1, @async=false, @async_flusher=nil, @flush_period=nil, @name="foreman", @closed=false, @filters=[], @mutex=#<ReentrantMutex:0x00007ffb5fd76ee8 @locker=nil>, @layout=#<Foreman::LoggingImpl::MultilineRequestPatternLayout:0x00007ffb5fd7a340 @obj_format=:string, @backtrace=true, @utc_offset=nil, @cause_depth=8, @created_at=2024-12-16 17:42:19.790354631 +0000, @date_pattern="%Y-%m-%dT%H:%M:%S", @date_method=nil, @pattern="%d [%.1l|%.3c|%.8X{request}] %m\n", @color_scheme=#<Logging::ColorScheme:0x00007ffb600f8c38 @scheme={"date"=>"\e[32m", "logger"=>"\e[36m", "line"=>"\e[33m", "file"=>"\e[33m", "method"=>"\e[33m", "info"=>"\e[32m", "warn"=>"\e[33m", "error"=>"\e[31m", "fatal"=>"\e[37m\e[41m"}, @lines=false, @levels=true>, @name_map_0=["D", "\e[32mI\e[0m", "\e[33mW\e[0m", "\e[31mE\e[0m", "\e[37m\e[41mF\e[0m"]>, @level=0, @write_size=500>, #<Logging::Appenders::Stdout:0x00007ffb5fd74990 @io=#<IO:<STDOUT>>, @close_method=:close, @buffer=[], @immediate=[], @auto_flushing=1, @async=false, @async_flusher=nil, @flush_period=nil, @name="foreman", @closed=false, @filters=[], @mutex=#<ReentrantMutex:0x00007ffb5fd74670 @locker=nil>, @layout=#<Foreman::LoggingImpl::MultilineRequestPatternLayout:0x00007ffb5fd760d8 @obj_format=:string, @backtrace=true, @utc_offset=nil, @cause_depth=8, @created_at=2024-12-16 17:42:19.7906453 +0000, @date_pattern="%Y-%m-%dT%H:%M:%S", @date_method=nil, @pattern="%d [%.1l|%.3c|%.8X{request}] %m\n", @color_scheme=nil>, @level=0, @encoding=#<Encoding:UTF-8>, @write_size=500>], @additive=false, @caller_tracing=false, @level=0>, @appenders=[], @additive=true, @level=nil, @caller_tracing=false>, @username=nil, @password=nil>, @user_agent="OpenAPI-Generator/2.22.0/ruby", @default_headers={"Content-Type"=>"application/json", "User-Agent"=>"OpenAPI-Generator/2.22.0/ruby", "Correlation-ID"=>"26ece985-d6ea-48d7-b115-9c52053eac90"}>>
Successfully uploaded file release_notes.md
@jeremylenz mind if I see the entire backtrace from Dynflow? |
Sure here it is
|
@jeremylenz I'm not sure how your request got that far along with my PR here since it blocks If you're still hitting this, mind sticking a debugger right before my new code and seeing why it's passing? |
9361aa3
to
76287e9
Compare
I think my server must have been running stale code or something. Working fine now!
|
What are the changes introduced in this pull request?
Disables uploading container tar files via API/Hammer because podman push is supported now. The workflow was never properly implemented with Pulp 3 Katello and is mostly broken.
Considerations taken when implementing this change?
We could technically get the uploads working again, but I don't see a reason why we should support uploading container content outside of the container registry.
What are the testing steps for this pull request?
hammer repository upload-content
on a container repo.