Can not use symbol '_' in 'Docker Container (package)' field 'Application Name'.

Bug #1622899 reported by Alexander Koryagin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
k8s-docker-suite-app-murano
Fix Released
Medium
Peter Razumovsky

Bug Description

Can not use symbol '_' in 'Docker Container (package)' field 'Application Name'.

Configuration:
MOS 9.1 snapshot #213

Actions:
1) OK - Download 'Docker Container (package)' to murano.
    http://apps.openstack.org/#tab=murano-apps&asset=Docker%20Container

2) OK - Add package to murano-env.

3) OK - In configuration in field 'Application Name' set 'Docker_ImageFromLocalRepo'.
    According description underline symbol is allowed.
    ...
    Application Name:
    Enter a desired name for the application. Just A-Z, a-z, 0-9, dash and underline are allowed
    ...

4) Not OK - Deploy Murano env.
    Deploy has failed.

    Extraction from logs:

    2016-09-13 08:08:47 - Creating services for Pod testpod
    2016-09-13 08:09:19 - Deploying Replication Controller for Pod testpod
    2016-09-13 08:09:33 - Error:
        {'errorCode': 100, 'message': u'Script updateReplicationController returned error code',
        'extra': None,
        'details': {u'stdout': None, u'stderr': u'W0913 08:09:32.556772 2647 cmd.go:258]
        update is DEPRECATED and will be removed in a future version.
        Use replace instead.\n
        The ReplicationController "testpod" is invalid.\n\n
        * spec.template.spec.containers[1].name:
        Invalid value: "docker_imagefromlocalrepo": must match the
        regex [a-z0-9]([-a-z0-9]*[a-z0-9])?
        (e.g. \'my-name\' or \'123-abc\')\n
        * spec.template.spec.containers[1].name:
        Invalid value: "docker_imagefromlocalrepo": must match the
        regex [a-z0-9]([-a-z0-9]*[a-z0-9])?
        (e.g. \'my-name\' or \'123-abc\')',
        u'exitCode': 1}, 'time': u'2016-09-13 08:09:32.739319'}

    As we can see from logs symbol '_' is allowed according to the description, but actually
    is not allowed.

Revision history for this message
Alexander Koryagin (akoryagin) wrote :
Changed in k8s-docker-suite-app-murano:
milestone: none → ongoing
Changed in k8s-docker-suite-app-murano:
assignee: nobody → Sergey Kraynev (skraynev)
importance: Undecided → Medium
Changed in k8s-docker-suite-app-murano:
assignee: Sergey Kraynev (skraynev) → Peter Razumovsky (prazumovsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to k8s-docker-suite-app-murano (master)

Fix proposed to branch: master
Review: https://review.openstack.org/383657

Changed in k8s-docker-suite-app-murano:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to k8s-docker-suite-app-murano (master)

Reviewed: https://review.openstack.org/383657
Committed: https://git.openstack.org/cgit/openstack/k8s-docker-suite-app-murano/commit/?id=82056d980f9ce912ce7352e3d80e3333d5e02501
Submitter: Jenkins
Branch: master

commit 82056d980f9ce912ce7352e3d80e3333d5e02501
Author: Peter Razumovsky <email address hidden>
Date: Fri Oct 7 14:00:45 2016 +0300

    Fix name pattern for DockerApp

    Currently name pattern for DockerApp allows to use underlines, dots and
    doesn't limit name length (at least that's described in field description).
    This occurs validation error with some regexp. Kubernetes docs [1] indicates,
    that container name should be DNS_LABEL, which described in [2]. Also,
    kubernetes code [3] contains regexp and length limit for DNS_LABEL
    pattern.

    [1] http://kubernetes.io/docs/user-guide/pods/multi-container/#containers

    [2] http://kubernetes.io/docs/user-guide/labels/#syntax-and-character-set

    [3] https://github.com/kubernetes/kubernetes/blob/8fd414537b5143ab039cb910590237cabf4af783/pkg/util/validation/validation.go#L88-L89

    Change-Id: Icb2ed2b00afe15bd547c01895beedd5ff02b0b0d
    Closes-bug: #1622899

Changed in k8s-docker-suite-app-murano:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.