the error message when a invalid instance name is given on an instance creation have a generic error

Bug #1655964 reported by Alphaxx
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Unassigned

Bug Description

Hello guys,

Here is my problem, when you give your instance a name with an exclusive numeric last part, it fails, example :

cow.moo => ok
cow.moo3 => ok
cow => ok
cow. => ok
cow.333 => KO
cow.333. => KO

it's ok, because it's a conceptual choice : https://bugs.launchpad.net/nova/+bug/1581977

  RESP BODY: {"NeutronError": {"message": "Invalid input for dns_name. Reason: 'myinstance6.4' not a valid PQDN or FQDN. Reason: TLD '4' must not be all numeric.", "type": "HTTPBadRequest", "detail": ""}}

but when a customer gives a invalid instance name the instance creation fails and the standard error message "no valid host was found" appears in Horizon, which has nothing to do with it.

Could it be more interesting to get a more obvious error, in the same format we could have when we forget to chose an image ? something like "this instance name is not valid".

I tried to modify "create_instance.py" and "update_instance.py" myself by simply add a regexp in

name = forms.CharField(label=_("Instance Name"), max_length=255)

but it isn't seems to be satisfactory at all.

If you have a better idea it could be great !

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Horizon is simply forwarding on nova's (arguably misleading) error message to the user. The proper place to fix this is in nova rather than horizon. It is not appropriate for horizon to try to reverse-engineer nova's errors to try to figure out what the "real" problem is.

Changed in horizon:
status: New → Invalid
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.