Project

General

Profile

Actions

Feature #25781

closed

[Container Admin Feature] Registry Name Pattern with repository.url will always be rejected

Added by Andrew Kofink almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1646603

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:
/\A([a-z0-9]+[a-z0-9\-\_\.]*)+(\/[a-z0-9]+[a-z0-9\-\_\.]*)*\z/

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.

Version:
katello-3.9.0-0.11.rc2.el7sat.noarch
foreman-1.20.0-0.17.RC2.el7sat.noarch

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

Actions #1

Updated by Andrew Kofink almost 6 years ago

  • Subject changed from [Container Admin Feature] Registry Name Pattern with repository.url will always be rejected to [Container Admin Feature] Registry Name Pattern with repository.url will always be rejected
  • Assignee set to Andrew Kofink
  • Target version set to Katello 3.11.0
Actions #2

Updated by The Foreman Bot almost 6 years ago

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

Updated by Andrew Kofink almost 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Jonathon Turel almost 6 years ago

  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF