Urgent BUG: renaming of template fails

Hi, this is my test setup: DC1 with local storage, some templates, e.g. "template1" DC2 with local storage, some templates, e.g. "template2" what I want to do: rename "template2" to "template1" in DC 2 actual results: [Cannot edit Template. The Template name is already in use, please choose a unique name and try again.] This fails via GUI and via REST api (GUI blocks the form, you can't click "ok"). expected results: Template Names should at the very least just be unique for one DC, and not for the whole engine. Strictly speaking even this is not needed as engine uses UUIDs to identify templates, but I agree that it might be handier for end users to just allow a template name once per datacenter. This occurs on ovirt-engine 3.3.3-2.el6 but I fear this is still present in current 3.5 RC and even master. So please, can somebody confirm this bug so I can open a BZ for this? Thanks. PS: the storage architecture type should not matter, I just added it for completeness sake. -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen

Here is some log output to help track this down (from engine.log): 2014-08-14 10:28:35,528 WARN [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (ajp--127.0.0.1-8702-22) [399284fd] The message key UpdateVmTemplate is missing from bundles/ExecutionMessages 2014-08-14 10:28:35,554 WARN [org.ovirt.engine.core.bll.UpdateVmTemplateCommand] (ajp--127.0.0.1-8702-22) [399284fd] CanDoAction of action UpdateVmTemplate failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__VM_TEMP LATE,ACTION_TYPE_FAILED_NAME_ALREADY_USED 2014-08-14 10:28:35,568 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp--127.0.0.1-8702-22) Operation Failed: [Cannot edit Template. The Template name is already in use, please choose a unique name and try again.] -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen

Hi Sven, I tried changing template name on my setup (based on latest master) and it worked. Can you please share the output of the following psql command on your engine DB: SELECT vm_guid, vm_name, entity_type, description from vm_static where vm_name = 'template1' Can u also search this entity in oVirt using the following: Template:name = template* Regards, Maor ----- Original Message ----- From: "Sven Kieske" <S.Kieske@mittwald.de> To: devel@ovirt.org Sent: Thursday, August 14, 2014 1:14:48 PM Subject: Re: [ovirt-devel] Urgent BUG: renaming of template fails BZ created: https://bugzilla.redhat.com/1130090 _______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

Am 14.08.2014 13:12, schrieb Maor Lipchuk:
Hi Sven,
I tried changing template name on my setup (based on latest master) and it worked. Can you please share the output of the following psql command on your engine DB: SELECT vm_guid, vm_name, entity_type, description from vm_static where vm_name = 'template1'
Hi Maor, it seems you did not test properly. You need 2 DCs with a template in each datacenter. rename one of them to match the other. It will fail, quoting Nir from my Bugzilla entry:
This is how the system works. Changing is nice to have feature, as it does not effect much the usage of the system. We have the same issue with cluster names, vm names - most names are > unique globally. I also find this annoying, and practically create names with dc-cluser prefixes to avoid this.
I really don't understand the logic behind making these names unique on a global level. There are many easily thought use cases where you want the same template name in different DCs, now I will have to juggle with dc-prefixes. I really hope this gets fixed up for 3.6 Thanks for your fast replies anyway. -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen

----- Original Message -----
From: "Sven Kieske" <S.Kieske@mittwald.de> To: "Maor Lipchuk" <mlipchuk@redhat.com> Cc: devel@ovirt.org Sent: Thursday, August 14, 2014 2:58:00 PM Subject: Re: [ovirt-devel] Urgent BUG: renaming of template fails
Am 14.08.2014 13:12, schrieb Maor Lipchuk:
Hi Sven,
I tried changing template name on my setup (based on latest master) and it worked. Can you please share the output of the following psql command on your engine DB: SELECT vm_guid, vm_name, entity_type, description from vm_static where vm_name = 'template1'
Hi Maor,
it seems you did not test properly. You need 2 DCs with a template in each datacenter. rename one of them to match the other.
It will fail, quoting Nir from my Bugzilla entry:
This is how the system works. Changing is nice to have feature, as it does not effect much the usage of the system. We have the same issue with cluster names, vm names - most names are > unique globally. I also find this annoying, and practically create names with dc-cluser prefixes to avoid this.
I really don't understand the logic behind making these names unique on a global level.
There are many easily thought use cases where you want the same template name in different DCs, now I will have to juggle with dc-prefixes.
I really hope this gets fixed up for 3.6
I Sven You are right there is no option to have same template name for different DCs The reason for that is that both VMs and Templates are stored in vm_static table We distinguish between VMs/Template according to the entity_type column value. If you think that this is important please issue a RFE for it. Thanks Eli
Thanks for your fast replies anyway.
-- Mit freundlichen Grüßen / Regards
Sven Kieske
Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen _______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

https://bugzilla.redhat.com/show_bug.cgi?id=1130090 Am 18.08.2014 11:53, schrieb Eli Mesika:
If you think that this is important please issue a RFE for it.
-- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
participants (3)
-
Eli Mesika
-
Maor Lipchuk
-
Sven Kieske