Limit the name of the Instance names

Bug #1718947 reported by Spyros Trigazis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Confirmed
Critical
kwozyman

Bug Description

After patch: https://review.openstack.org/#/c/499617/

we name the cluster instaces like following:
<cluster-name>-<short string generated by heat>-<master or node>-<index of node> this recipe can create very long names and break vm boot.

In certain deployments like CERN's, _ are not allowed in the hostnames. This is deployment specific but we should find a solution that works for all users.

1. limit the name of cluster instances
2, replace _ with -

Revision history for this message
Spyros Trigazis (strigazi) wrote :
Changed in magnum:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Madhuri Kumari (madhuri-rai07) wrote :

We can remove the `<master-or-node>-<index>` part and keep only the <cluster-name>-<short-id> part here in all templates.

For eg: https://github.com/openstack/magnum/blob/62afc249d1c646040941c1d3424fcbf3a928b8fb/magnum/drivers/swarm_fedora_atomic_v2/templates/swarmcluster.yaml#L276

What do you think?

Changed in magnum:
assignee: nobody → Sayali Lunkad (sayalilunkad)
Changed in magnum:
assignee: Sayali Lunkad (sayalilunkad) → Costin Eugen Gament (kwozyman)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/511219
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=283c0931879acc876c7f053f561efc383b7a0da1
Submitter: Zuul
Branch: master

commit 283c0931879acc876c7f053f561efc383b7a0da1
Author: Costin Gamenț <email address hidden>
Date: Wed Oct 11 14:24:13 2017 +0200

    Generate stack name as a valid hostname

    Truncate cluster name to 30 characters, map ('_', '.') to '-' and remove non
    alpha-numeric characters.

    Change-Id: Ibb2bddc5b602a34d0e2bebd1f6bb197669bf21ec
    Close-Bug: #1718947

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Revision history for this message
kwozyman (kwozyman) wrote :

Openstack (kubernetes) Cloud Provider does not accept a stack name with upper case letters, so we're transforming the generated stack name to all lower case.

Revision history for this message
Spyros Trigazis (strigazi) wrote :

Unable to register node "rally-cddc-41GE-5jefaj3mozvx-minion-0" with API server: Node "rally-cddc-41GE-5jefaj3mozvx-minion-0" is invalid: metadata.name: Invalid value: "rally-cddc-41GE-5jefaj3mozvx-minion-0": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

This the error in question.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/522513
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=336404c861dfde68ab15a3f66fce714ee4f12291
Submitter: Zuul
Branch: master

commit 336404c861dfde68ab15a3f66fce714ee4f12291
Author: Costin Gamenț <email address hidden>
Date: Thu Nov 23 11:13:50 2017 +0100

    Generate lower case stack name

    If stack name contains upper case characters, Openstack Cloud Provider
    will complain.

    Change-Id: I482e7143fb772d409d2c25b68ce6a6020e130bc3
    Close-Bug: #1718947

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (stable/pike)

Reviewed: https://review.openstack.org/522811
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=6a2d14d3276bb4fe289ad2dd839ffe7b73f80794
Submitter: Zuul
Branch: stable/pike

commit 6a2d14d3276bb4fe289ad2dd839ffe7b73f80794
Author: Costin Gamenț <email address hidden>
Date: Wed Oct 11 14:24:13 2017 +0200

    Generate stack name as a valid hostname

    Truncate cluster name to 30 characters, map ('_', '.') to '-' and remove non
    alpha-numeric characters.

    Change-Id: Ibb2bddc5b602a34d0e2bebd1f6bb197669bf21ec
    Close-Bug: #1718947
    (cherry picked from commit 283c0931879acc876c7f053f561efc383b7a0da1)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/523874

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (stable/pike)

Reviewed: https://review.openstack.org/523874
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=c58b727bec3561d8d283497d784a3437185924dd
Submitter: Zuul
Branch: stable/pike

commit c58b727bec3561d8d283497d784a3437185924dd
Author: Costin Gamenț <email address hidden>
Date: Thu Nov 23 11:13:50 2017 +0100

    Generate lower case stack name

    If stack name contains upper case characters, Openstack Cloud Provider
    will complain.

    Change-Id: I482e7143fb772d409d2c25b68ce6a6020e130bc3
    Close-Bug: #1718947
    (cherry picked from commit 336404c861dfde68ab15a3f66fce714ee4f12291)

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.