Bug 1261653 - Deployment with a space in the name fails during RHEV deployment
Summary: Deployment with a space in the name fails during RHEV deployment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: Installation - RHEV
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: TP2
: 1.0
Assignee: Erik Nelson
QA Contact: Dave Johnson
Dan Macpherson
URL:
Whiteboard:
Depends On:
Blocks: rhci-sprint-11 rhci-sprint-12
TreeView+ depends on / blocked
 
Reported: 2015-09-09 21:01 UTC by Matt Reid
Modified: 2016-10-03 18:59 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-03 18:59:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1267348 0 medium CLOSED Space in deployment name breaks cloudforms install 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1300368 0 unspecified CLOSED [Docs] 404 Not found at 90.4% of RHELOSP install 2021-02-22 00:41:40 UTC

Internal Links: 1267348 1300368

Description Matt Reid 2015-09-09 21:01:13 UTC
Description of problem:
If you name a deployment something that includes a space (not sure if this also applies to special characters as well, it could), when it comes time during RHEV deployment and configuration, the template import will fail, since it names the template after the deployment, but doesn't replace the spaces, and doesn't wrap the name in quotes.

Error Unable to import template: Status: 1. Output: ["'NoneType' object has no attribute 'import_template'\n", "Error importing template 'another' to export domain 'my_export'\n"]

[E] Error running command: /usr/share/fusor_ovirt/bin/ovirt_import_template.py --api_user [redacted] --api_pass [redacted] --api_host [redacted] --cluster_name Default --data_center_name Default --export_domain_name my_export --storage_domain_name my_storage --vm_template_name another space name-cfme-template

Seems like need to be creating the equivalent of a deployment label behind the scenes, similar to how we sanitize organization and environment path names that contain spaces and special characters, and replace them with underscores. That way we don't end up trying to feed a cli command an input with spaces that will break. Not sure if we could get away with wrapping the --vm_template_name input in quotes.

Version-Release number of selected component (if applicable):
Tech Preview

Actual results:
UI accepts a deployment name with a space, which later breaks the deployment process

Expected results:
User should be able to name the deployment what they want, and have it format the name however it needs to on the backend for it to work properly

Additional info:

Comment 1 John Matthews 2015-09-10 14:23:36 UTC
Plan is to update fusor_server so when it calls out to external scripts it quotes the parameters correctly to handle spaces

Comment 2 Matt Reid 2015-09-16 17:42:23 UTC
An exclamation point in the name was fine, but a single quote forced a failed deployment as well.

Comment 3 Antonin Pagac 2015-11-11 19:12:05 UTC
I saw a similar error due to a '+' in the deployment name. My one was:

ovirtsdk.infrastructure.errors.RequestError:
status: 400
reason: Bad Request
detail: Can not add VM. The given name contains special characters. Only lower-case and upper-case letters, numbers, '_', '-', '.' are allowed.

[E] Error running command: /usr/share/fusor_ovirt/bin/ovirt_create_vm_from_template.py --api_host <retracted> --api_pass <retracted> --vm_template_name apagac-rhevm+cfme4-cfme-template --cluster_name Default --vm_name apagac-rhevm+cfme4-cfme

I named the deployment: apagac-rhevm+cfme4

Comment 4 Jason Montleon 2015-12-02 16:38:51 UTC
I'd suggest, since special characters seem to be causing problems in numerous areas that we limit deployment names to a-z A-Z 0-9 _ -

Is there a downside to limiting the deployment name to these characters?

Comment 5 Matt Reid 2015-12-07 16:38:02 UTC
I would prefer to see us accept spaces in deployment names, and swap them out for underscores on the backend (or however we can handle it). As far as I know, that's what Satellite does for most of its underlying parts. If I create an org in Satellite, I can use a name of "My Org" and it will assign it a label of "My_Org". It's a lot more natural to use a space for a name. 

Special characters would be nice, if they want to use + or & or something (like the above comment), but probably not as critical.

Comment 7 Erik Nelson 2016-01-13 18:29:53 UTC
Temporarily patching to disallow spaces.

Comment 8 Erik Nelson 2016-01-13 21:46:25 UTC
PR621: https://github.com/fusor/fusor/pull/621

Comment 9 Antonin Pagac 2016-01-26 09:43:51 UTC
I can't create deployment with space in the name. Other characters to consider are beyond the scope of this bug, so marking as verified.

RHCI-6.0-RHEL-7-20160122.t.1-RHCI-x86_64-dvd1.iso


Note You need to log in before you can comment on or make changes to this bug.