Bug 1768667 - Creating a migplan with a dot in the name causes reconcile failure
Summary: Creating a migplan with a dot in the name causes reconcile failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.3.0
Assignee: Scott Seago
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks: 1782265
TreeView+ depends on / blocked
 
Reported: 2019-11-04 22:24 UTC by Scott Seago
Modified: 2020-02-06 20:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1782265 (view as bug list)
Environment:
Last Closed: 2020-02-06 20:20:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:0440 0 None None None 2020-02-06 20:21:01 UTC

Description Scott Seago 2019-11-04 22:24:13 UTC
Description of problem:
Creating a migplan with a dot in the name (or anything other than lowercase alphanumeric characters plus "-") results in a reconcile error

Version-Release number of selected component (if applicable):
CAM 1.0

How reproducible:
Always

Steps to Reproduce:
1. Create a migplan with a dot in the name (i.e. "migplan-1.1")
2. Wait for reconcile.
3. Look at migplan yaml output

Actual results:
Reconcile error is displayed:
    message: 'Reconcile failed: [DeploymentConfig.apps.openshift.io "registry-registry-example-plan-4.2-khf6n"
      is invalid: [spec.template.spec.volumes[0].name: Invalid value: "registry-registry-example-plan-4.2-khf6n-volume-1":
      a DNS-1123 label must consist of lower case alphanumeric characters or ''-'',
      and must start and end with an alphanumeric character (e.g. ''my-name'',  or
      ''123-abc'', regex used for validation is ''[a-z0-9]([-a-z0-9]*[a-z0-9])?''),
      spec.template.spec.containers[0].name: Invalid value: "registry-registry-example-plan-4.2-khf6n":
      a DNS-1123 label must consist of lower case alphanumeric characters or ''-'',
      and must start and end with an alphanumeric character (e.g. ''my-name'',  or
      ''123-abc'', regex used for validation is ''[a-z0-9]([-a-z0-9]*[a-z0-9])?''),
      spec.template.spec.containers[0].volumeMounts[0].name: Not found: "registry-registry-example-plan-4.2-khf6n-volume-1"]].
      See controller logs for details.'


Expected results:
Plan is ready.

Additional info:

Comment 1 Scott Seago 2019-11-04 22:27:00 UTC
The error comes from using the plan name to build a name for a mount point in the container, which has stricter rules for labels than the migplan name itself. Since this mount point is an EmptyDir volume source that's not shared outside the container, the solution is probably just to remove the migplan name from the mount and just call it "volume-1". We'll need to verify that this doesn't break anything, though, and make sure there aren't other errors related to other places where the migplan name is used.

Comment 2 Scott Seago 2019-11-06 14:17:11 UTC
Fix is here: https://github.com/fusor/mig-controller/pull/362

Comment 6 Sergio 2020-01-13 12:25:50 UTC
Verified in CAM 1.1.0 version from osbs    

image: image-registry.openshift-image-registry.svc:5000/rhcam-1-1/openshift-migration-controller-rhel8@sha256:b55c0c36333656a46e1d0500cf11cc8aa06e093d312e7c54f8e1075d4ab4c6c1

Comment 8 errata-xmlrpc 2020-02-06 20:20:44 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.

https://access.redhat.com/errata/RHEA-2020:0440


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