app-name-validation

Bug #1578783 reported by Devdatta Kulkarni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Fix Released
Undecided
Vijendar Komalla
python-solumclient
Fix Committed
Undecided
Vijendar Komalla

Bug Description

solum app create with app name '-123'

solum-deployer shows following error:

{"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Invalid stack name -123-fd116777-0ab7-4139-ae4a-c8c5291db5a7 must contain only alphanumeric or \"_-.\" characters, must start with alpha and must be 255 characters or less.", "traceback": "Traceback (most recent call last):\n\n File \"/opt/stack/heat/heat/common/context.py\", line 329, in wrapped\n return func(self, ctx, *args, **kwargs)\n\n File \"/opt/stack/heat/heat/engine/service.py\", line 802, in create_stack\n stack_user_project_id, convergence, parent_resource_name)\n\n File \"/opt/stack/heat/heat/engine/service.py\", line 677, in _parse_template_and_validate_stack\n **common_params)\n\n File \"/opt/stack/heat/heat/engine/stack.py\", line 150, in __init__\n _validate_stack_name(stack_name)\n\n File \"/opt/stack/heat/heat/engine/stack.py\", line 144, in _validate_stack_name\n raise exception.StackValidationFailed(message=message)\n\nStackValidationFailed: Invalid stack name -123-fd116777-0ab7-4139-ae4a-c8c5291db5a7 must contain only alphanumeric or \"_-.\" characters, must start with alpha and must be 255 characters or less.\n", "type": "StackValidationFailed"}, "title": "Bad Request"}
 log_http_response /usr/local/lib/python2.7/dist-packages/heatclient/common/http.py:155
2016-05-05 19:14:08.113 10821 ERROR solum.deployer.handlers.heat [-] Error creating Heat Stack for, assembly 2
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat [-] ERROR: Invalid stack name -123-fd116777-0ab7-4139-ae4a-c8c5291db5a7 must contain only alphanumeric or "_-." characters, must start with alpha and must be 255 characters or less.
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat Traceback (most recent call last):
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat File "/opt/stack/solum/solum/deployer/handlers/heat.py", line 454, in deploy
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat files=get_file_dict)
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat File "/usr/local/lib/python2.7/dist-packages/heatclient/v1/stacks.py", line 162, in create
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat data=kwargs, headers=headers)
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat File "/usr/local/lib/python2.7/dist-packages/heatclient/common/http.py", line 294, in post
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat return self.client_request("POST", url, **kwargs)
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat File "/usr/local/lib/python2.7/dist-packages/heatclient/common/http.py", line 284, in client_request
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat resp, body = self.json_request(method, url, **kwargs)
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat File "/usr/local/lib/python2.7/dist-packages/heatclient/common/http.py", line 273, in json_request
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat resp = self._http_request(url, method, **kwargs)
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat File "/usr/local/lib/python2.7/dist-packages/heatclient/common/http.py", line 228, in _http_request
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat raise exc.from_response(resp)
2016-05-05 19:14:08.114 10821 ERROR solum.deployer.handlers.heat HTTPBadRequest: ERROR: Invalid stack name -123-fd116777-0ab7-4139-ae4a-c8c5291db5a7 must contain only alphanumeric or "_-." characters, must start with alpha and must be 255 characters or less.

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

If we create an app with app name '-abc' then we are not even able to deploy that app.

Changed in python-solumclient:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
Changed in solum:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
Changed in python-solumclient:
status: New → In Progress
Changed in solum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to solum (master)

Reviewed: https://review.openstack.org/313705
Committed: https://git.openstack.org/cgit/openstack/solum/commit/?id=5f684d6c3c5b95474d02912e2651e6d875785a2a
Submitter: Jenkins
Branch: master

commit 5f684d6c3c5b95474d02912e2651e6d875785a2a
Author: Vijendar Komalla <email address hidden>
Date: Fri May 6 16:37:03 2016 -0500

    Check app name starts with alpha char

    Change-Id: Ib57d8ad81ab2ebc0d6296ad14be2501c7c403886
    Closes-Bug: #1578783

Changed in solum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-solumclient (master)

Reviewed: https://review.openstack.org/313703
Committed: https://git.openstack.org/cgit/openstack/python-solumclient/commit/?id=3ca5e7cface3579e274527930eb95d0e71579433
Submitter: Jenkins
Branch: master

commit 3ca5e7cface3579e274527930eb95d0e71579433
Author: Vijendar Komalla <email address hidden>
Date: Fri May 6 16:23:35 2016 -0500

    app name must start with alphabet character

    Change-Id: I58f2ea7089bf5d0a3bac1da01d165eebf57d83f5
    Partial-Bug: #1578783

Changed in python-solumclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/solum 5.0.0

This issue was fixed in the openstack/solum 5.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.