Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem: Unable to create docker type repository
Steps to reproduce:
1. Content -> Lifecycle Environment
2. Select environment other than "Library" (create one if necessary)
3. In registry pattern name field, put the pattern with content_view.version and save the 'Registry Name Pattern'
4. Now try to create a repository of type docker
==> /var/log/foreman/production.log <==
2019-02-28T12:24:16 [I|app|] Started PUT "/katello/api/v2/environments/1?organization_id=1" for 10.76.1.165 at 2019-02-28 12:24:16 +0530
2019-02-28T12:24:16 [I|app|33a520d0] Processing by Katello::Api::V2::EnvironmentsController#update as JSON
2019-02-28T12:24:16 [I|app|33a520d0] Parameters: {"library"=>true, "registry_name_pattern"=>"<%=content_view.version%>", "registry_unauthenticated_pull"=>true, "id"=>"1", "name"=>"Library", "label"=>"Library", "description"=>nil, "organization_id"=>"1", "organization"=>{"name"=>"RedHat", "label"=>"RedHat", "id"=>1}, "created_at"=>"2019-02-11 15:54:15 +0530", "updated_at"=>"2019-02-28 12:21:35 +0530", "prior"=>nil, "successor"=>nil, "counts"=>{"content_hosts"=>2, "content_views"=>3, "packages"=>35112, "puppet_modules"=>13, "module_streams"=>0, "errata"=>{"security"=>785, "bugfix"=>2553, "enhancement"=>750, "total"=>4088}, "yum_repositories"=>8, "docker_repositories"=>1, "ostree_repositories"=>0, "products"=>8}, "permissions"=>{"create_lifecycle_environments"=>true, "view_lifecycle_environments"=>true, "edit_lifecycle_environments"=>true, "destroy_lifecycle_environments"=>false, "promote_or_remove_content_views_to_environments"=>true}, "api_version"=>"v2", "environment"=>{"id"=>"1", "name"=>"Library", "description"=>nil, "library"=>true, "organization_id"=>"1", "created_at"=>"2019-02-11 15:54:15 +0530", "updated_at"=>"2019-02-28 12:21:35 +0530", "label"=>"Library", "registry_name_pattern"=>"<%=content_view.version%>", "registry_unauthenticated_pull"=>true, "prior"=>nil}}
2019-02-28T12:24:16 [I|app|33a520d0] Current user set to admin (admin)
2019-02-28T12:24:17 [E|app|33a520d0] Safemode::NoMethodError: undefined method '#version' for Katello::ContentView::Jail (Katello::ContentView)
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode/jail.rb:22:in `method_missing'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:52:in `bind'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:51:in `eval'
/opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:51:in `eval'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/models/katello/repository.rb:681:in `safe_render_container_name'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/lib/katello/validators/environment_docker_repositories_validator.rb:25:in `block in validate_repositories'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/lib/katello/validators/environment_docker_repositories_validator.rb:24:in `validate_repositories'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/lib/katello/validators/environment_docker_repositories_validator.rb:12:in `validate'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
Version-Release number of selected component (if applicable): 6.5
How reproducible: Always
The documentation around this feature says you can use 'content_view.version', however this doesnt' make any sense as content_views don't have versions. It should say 'content_view_version.version', however this does not work. I have opened up an upstream Pr to resolve this.
In addition, this is the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=1683936, so i am going to close as a dup.
Context help by registry name pattern doesn't mention "content_view.version" - "content_view_version.version" is listed instead.
I have set up registry name pattern to every field listed in help in sequence, and each time verified that change is visible and affects container URLs. So we should have pretty good confidence that fields that we document really can be used.
Version:
Satellite 6.5 snap 21
pulp-server-2.18.1.1-1.el7sat.noarch
foreman-1.20.1.29-1.el7sat.noarch
tfm-rubygem-katello-3.10.0.33-2.el7sat.noarch
satellite-6.5.0-10.el7sat.noarch
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, 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-2019:1222
Description of problem: Unable to create docker type repository Steps to reproduce: 1. Content -> Lifecycle Environment 2. Select environment other than "Library" (create one if necessary) 3. In registry pattern name field, put the pattern with content_view.version and save the 'Registry Name Pattern' 4. Now try to create a repository of type docker ==> /var/log/foreman/production.log <== 2019-02-28T12:24:16 [I|app|] Started PUT "/katello/api/v2/environments/1?organization_id=1" for 10.76.1.165 at 2019-02-28 12:24:16 +0530 2019-02-28T12:24:16 [I|app|33a520d0] Processing by Katello::Api::V2::EnvironmentsController#update as JSON 2019-02-28T12:24:16 [I|app|33a520d0] Parameters: {"library"=>true, "registry_name_pattern"=>"<%=content_view.version%>", "registry_unauthenticated_pull"=>true, "id"=>"1", "name"=>"Library", "label"=>"Library", "description"=>nil, "organization_id"=>"1", "organization"=>{"name"=>"RedHat", "label"=>"RedHat", "id"=>1}, "created_at"=>"2019-02-11 15:54:15 +0530", "updated_at"=>"2019-02-28 12:21:35 +0530", "prior"=>nil, "successor"=>nil, "counts"=>{"content_hosts"=>2, "content_views"=>3, "packages"=>35112, "puppet_modules"=>13, "module_streams"=>0, "errata"=>{"security"=>785, "bugfix"=>2553, "enhancement"=>750, "total"=>4088}, "yum_repositories"=>8, "docker_repositories"=>1, "ostree_repositories"=>0, "products"=>8}, "permissions"=>{"create_lifecycle_environments"=>true, "view_lifecycle_environments"=>true, "edit_lifecycle_environments"=>true, "destroy_lifecycle_environments"=>false, "promote_or_remove_content_views_to_environments"=>true}, "api_version"=>"v2", "environment"=>{"id"=>"1", "name"=>"Library", "description"=>nil, "library"=>true, "organization_id"=>"1", "created_at"=>"2019-02-11 15:54:15 +0530", "updated_at"=>"2019-02-28 12:21:35 +0530", "label"=>"Library", "registry_name_pattern"=>"<%=content_view.version%>", "registry_unauthenticated_pull"=>true, "prior"=>nil}} 2019-02-28T12:24:16 [I|app|33a520d0] Current user set to admin (admin) 2019-02-28T12:24:17 [E|app|33a520d0] Safemode::NoMethodError: undefined method '#version' for Katello::ContentView::Jail (Katello::ContentView) /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode/jail.rb:22:in `method_missing' /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:52:in `bind' /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:51:in `eval' /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.3.5/lib/safemode.rb:51:in `eval' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/models/katello/repository.rb:681:in `safe_render_container_name' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/lib/katello/validators/environment_docker_repositories_validator.rb:25:in `block in validate_repositories' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/lib/katello/validators/environment_docker_repositories_validator.rb:24:in `validate_repositories' /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.23/app/lib/katello/validators/environment_docker_repositories_validator.rb:12:in `validate' /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda' Version-Release number of selected component (if applicable): 6.5 How reproducible: Always