Created attachment 1173773 [details] engine log Description of problem: When trying to register unregistered template using REST API (v3) I get the following response: Status: 500 Reason: Internal Server Error Detail: [General command validation failure.] And from the engine.log: 2016-06-29 13:59:39,906 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand] (default task-30) [dea0471] Error during ValidateFailure.: javax.ejb.EJBException: java.lang.IllegalSt ateException: Coding error, pool for requested GUID does not exist Version-Release number of selected component (if applicable): ovirt-engine-4.0.0.6-0.1.el7ev.noarch How reproducible: 100% Steps to Reproduce: Have a working environment with at least 2 storage domains 1. Create a template from VM on one of the domains 2. Deactivate and detach the domain from step 1 3. Attach the domain again and send the request: 3.1 Send GET command to /api/storagedomains/{sd:id}/templates;unregistered ---> search for the link under with 'register' <actions> collections: <actions> <link href="/ovirt-engine/api/storagedomains/{sd:id}/templates/{template:id}/register" rel="register"/> </actions> 3.2 Send POST command to /ovirt-engine/api/storagedomains/{sd:id}/templates/{template:id}/register from step 3.1 body: <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> <cluster> <name>CLUSTER_NAME</name> </cluster> </action> Actual results: Expected results: Additional info:
I can't reproduce in my environment (latest master), but it looks BLL related, and not specific to V3 of the API. The relevant line from the log is this one: Caused by: java.lang.IllegalStateException: Coding error, pool for requested GUID does not exist at org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.getMacPoolWithoutLocking(MacPoolPerDc.java:114)
(In reply to Juan Hernández from comment #1) > I can't reproduce in my environment (latest master), but it looks BLL > related, and not specific to V3 of the API. The relevant line from the log > is this one: > > Caused by: java.lang.IllegalStateException: Coding error, pool for requested > GUID does not exist > at > org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc. > getMacPoolWithoutLocking(MacPoolPerDc.java:114) This is a network error wrt assigning a mac pool to the imported entity. I have a vague recollection it was already solved upstream, but moving to the networking team to verify and/or fix.
Verified - ovirt-engine-4.0.2-0.1.rc.el7ev.noarch Template was registered successfully