kimchi-project / kimchi

An HTML5 management interface for KVM guests
https://github.com/kimchi-project/kimchi/releases/latest
Other
3.11k stars 364 forks source link

Storage Pool name does not support spaces #934

Closed Styx13 closed 8 years ago

Styx13 commented 8 years ago

I noticed that using Storage Pool names that contains spaces can lead to different kind of weird behavior, such as disappearing storage pool in templates when editing templates.

I would recommend not letting the user define storage pool with spaces in the name (and probably special characters), or tracking down the different places that are handling storage pool name to fix the issue.

Below a few steps to reproduce one of the issues:

  1. Create a new Storage Pool and give it a name that contains a space (example "My Storage Pool")
  2. Create a new template (from ISO or raw disk image)
  3. Edit the template a first time, change its name and assign your newly created storage pool: "My Storage Pool"
  4. Edit the template a second time (change the name again for example) and save

Now if you check your template (just via edit, but without changing anything), you will see that it does not have a storage pool anymore.

If you go and check /var/log/wok/wok-error.log you will find an error like this:

KCHTMPL0004E: Storage pool /plugins/kimchi/storagepools/My specified for template Template1 v1.0 does not exist

danielhb commented 8 years ago

Patch sent to ML for review