bay's name should be less than 255

Bug #1606785 reported by Eli Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Low
Eli Qiao

Bug Description

We limit the bay's name to 255, but when we create a heat stack, we have the stack_name as:

stack_name = '%s-%s' % (bay.name, short_id.generate_id())

but in heat, we see that:

147 message = _('Invalid stack name %s must contain '
 148 'only alphanumeric or \"_-.\" characters, '
 149 'must start with alpha and must be 255 '
 150 'characters or less.') % name

the length of bay's name should be 255 - len(short_id.generate_id()) -1 = 255-12-1 = 242

Eli Qiao (taget-9)
Changed in magnum:
assignee: nobody → Eli Qiao (taget-9)
description: updated
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/347644

Changed in magnum:
status: New → In Progress
Eli Qiao (taget-9)
Changed in magnum:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/347644
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=e4a8242b96360cddbf3b5c7114e814af53aa9796
Submitter: Jenkins
Branch: master

commit e4a8242b96360cddbf3b5c7114e814af53aa9796
Author: Eli Qiao <email address hidden>
Date: Wed Jul 27 14:31:27 2016 +0800

    API: restrict length of bay's name to 242

    Restrict the length of bay's name to avoid passing a invalid long name
    to heat stack.

    Reason of 242 is:
    stack_name = '%s-%s' % (bay.name, short_id.generate_id())
    255 - len(short_id.generate_id()) - 1 = 242

    Closes-bug: #1606785
    Change-Id: If22a9018ece718f014c40e8059b945ae1a411f5b

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 3.0.0

This issue was fixed in the openstack/magnum 3.0.0 release.

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.