Incorrect validation and exception message for server name with whitespace

Bug #1207625 reported by Rohit Karajgi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Hirofumi Ichihara

Bug Description

Create a server by passing a name having just one or more whitespaces, such as ' ' or ' '.

Expected error message:
HTTP 400 Bad Request. Server name should contain at least 1 character.

Actual error message:
Error: Server name has less than 1 characters. (HTTP 400) (Request-ID: req-af94d291-af62-4edf-a160-f21a8efa7851)

There is no validation performed for single or multiple whitespaces in server name. The above error
message is also misleading (less than 1 characters??)

Tags: ntt
Changed in nova:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
status: New → In Progress
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

nova/locale/en_US/LC_MESSAGES/nova.po should be also fixed because "256 characters" is bug.

msgid "%(name)s has less than %(min_length)s characters."
msgstr "Server name must be less than 256 characters."

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

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

Rohan (kanaderohan)
tags: added: ntt
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/39877
Committed: http://github.com/openstack/nova/commit/6f47afd4d65bd8b382d01d8b552bc242d8809b23
Submitter: Jenkins
Branch: master

commit 6f47afd4d65bd8b382d01d8b552bc242d8809b23
Author: Hirofumi Ichihara <email address hidden>
Date: Fri Aug 2 17:27:37 2013 +0900

    Fix message for server name with whitespace

    Change-Id: I9007ada4db6502da084fe44ab585e62e689e2f4f
    Fixes: bug #1207625

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
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.