Bug 1646603 - [Container Admin] Registry Name Pattern with repository.url will always be rejected
Summary: [Container Admin] Registry Name Pattern with repository.url will always be re...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management - Content
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Released
Assignee: Andrew Kofink
QA Contact: Mirek Zalewski
Depends On:
TreeView+ depends on / blocked
Reported: 2018-11-05 18:19 UTC by Mirek Zalewski
Modified: 2019-10-07 17:13 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-katello-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-14 12:38:40 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:38:47 UTC
Foreman Issue Tracker 25781 None None None 2019-01-04 15:16:24 UTC

Description Mirek Zalewski 2018-11-05 18:19:01 UTC
Registry Name Pattern claims to allow repository.url variable, but it always reject it. If that variable is used, error message will be displayed: "An error occurred saving the Environment: Registry name pattern will result in invalid container image name of member repositories".

The problem is that name created by pattern must pass through ContainerImageNameValidator.validate_name function. It checks name against following regexp:

This regexp allows multiple slashes in name, but not subsequently (/ is OK, // is not). URL will contain :// (colon slash slash) sequence between protocol and host name. So URL technically can be used, but it will be rejected as invalid.

Satellite 6.5 snap 2

Steps to reproduce:
1. Content -> Lifecycle Environment
2. Select environment other than "Library" (create one if necessary)
3. In registry pattern name field, put pattern with repository.url variable (example: "<%= organization.label %>/<%= repository.url %>/<%= repository.docker_upstream_name %>")
4. Save

Comment 4 Andrew Kofink 2019-01-04 15:16:23 UTC
Created redmine issue https://projects.theforeman.org/issues/25781 from this bug

Comment 5 Bryan Kearney 2019-01-07 21:15:08 UTC
Upstream bug assigned to akofink@redhat.com

Comment 6 Bryan Kearney 2019-01-08 21:17:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25781 has been resolved.

Comment 8 Mirek Zalewski 2019-01-28 10:56:29 UTC
Fix confirmed after re-test.
There is no mention of "repository.url" in contextual help on Lifecycle Environment page.
Using registry name pattern from initial report above, on saving I get error message: "An error occurred saving the Environment: Registry name pattern will result in invalid container image name of member repositories"

Tested on:
Satellite 6.5 snap 13

Comment 11 errata-xmlrpc 2019-05-14 12:38:40 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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