Request #4295
Instantiate a Service with roles using deleted template should give an informative message
| Status: | Pending | Start date: | 01/18/2016 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | Cloud View | |||
| Target version: | - | |||
| Pull request: |
Description
Hello,
Step to reproduce:
- Create a service with roles
- Delete a VM template referenced by a role
- Start instantiate the service template
The error displayed is KEY: 'cardinality' must be an Integer.
Looking at the request I see roles without a cardinality:
"roles": [ { "user_inputs_values": null, "scheduled_policies": [], "elasticity_policies": [], "max_vms": 1, "min_vms": 1, "vm_template": 12492, "cardinality": "", "name": "Amon" },
As our template are maintained by jenkins jobs, they can be deleted/created instead of being edited in place when changes must occurs, so the template 12492 does not exists anymore.
Is it possible to display a message like VM template <TEMPLATE ID>/<TEMPLATE NAME> for role <ROLE NAME> does not exists
Regards.
History
#1
Updated by Daniel Molina over 5 years ago
Hi,
I cannot reproduce this error. If I delete a vm template that is defined in an existing service template and then instantiate it. The service state is FAILED_DEPLOYING and the error message shows the problem with the vm template:
01/22/16 16:42 [E] Role front : Instantiate failed for template 12; [TemplateInstantiate] Error getting virtual machine template [12].
#2
Updated by EOLE Team over 5 years ago
- File missing-cardinality-and-error.png added
Daniel Molina wrote:
Hi,
I cannot reproduce this error. If I delete a vm template that is defined in an existing service template and then instantiate it. The service state is FAILED_DEPLOYING and the error message shows the problem with the vm template:
01/22/16 16:42 [E] Role front : Instantiate failed for template 12; [TemplateInstantiate] Error getting virtual machine template [12].
Hello,
Some infos:
- OpenNebula 4.14.2 from Ubuntu package
- Iceweasel 44.0b6
When I click on the green Create button, it display the error KEY: 'cardinality' must be an Integer;
I attach a screenshot.
Regards.
#3
Updated by Daniel Molina over 5 years ago
Could you check if the service template defines a cardinality for each role?
#4
Updated by EOLE Team over 5 years ago
Yes, it is defined for each roles, only the vm_template ids are deleted:
oneadmin@one:~$ oneflow-template show 0
SERVICE TEMPLATE 0 INFORMATION
ID : 0
NAME : etb1 2.5.2a1
USER : mensr-admin
GROUP : mensr
PERMISSIONS
OWNER : um-
GROUP : u--
OTHER : ---
TEMPLATE CONTENTS
{
"name": "etb1 2.5.2a1",
"deployment": "straight",
"description": "",
"roles": [
{
"name": "Amon",
"cardinality": 1,
"vm_template": 12578,
"min_vms": 1,
"max_vms": 1,
"elasticity_policies": [
],
"scheduled_policies": [
]
},
{
"name": "Scribe",
"cardinality": 1,
"vm_template": 12521,
"parents": [
"Amon"
],
"min_vms": 1,
"max_vms": 1,
"elasticity_policies": [
],
"scheduled_policies": [
]
}
],
"ready_status_gate": false
}
Regards.
#5
Updated by Daniel Molina over 5 years ago
Could you check if there is any error in the developer console after selecting the service template?
#6
Updated by EOLE Team over 5 years ago
Daniel Molina wrote:
Could you check if there is any error in the developer console after selecting the service template?
Yes, network errors only:
GET XHR http://one.eole.lan/service [HTTP/1.1 200 OK 64ms] GET XHR http://one.eole.lan/vmtemplate/13064 [HTTP/1.1 404 Not Found 79ms] GET XHR http://one.eole.lan/vmtemplate/13068 [HTTP/1.1 404 Not Found 78ms] GET XHR http://one.eole.lan/vmtemplate/13066 [HTTP/1.1 404 Not Found 77ms] GET XHR http://one.eole.lan/vmtemplate/12780 [HTTP/1.1 200 OK 76ms] GET XHR http://one.eole.lan/vmtemplate/12788 [HTTP/1.1 200 OK 75ms] GET XHR http://one.eole.lan/vmtemplate/12784 [HTTP/1.1 200 OK 74ms] POST XHR http://one.eole.lan/service_template/6/action [HTTP/1.1 400 Bad Request 64ms]
The 404 correspond to the deleted templates(1) and the POST 400 to the error when I click the Create button.
Regards.
(1) The template ids changed since last time since I made some tests.
#7
Updated by Daniel Molina about 5 years ago
- Assignee deleted (
Daniel Molina)