Bug #4982

Sunstone - Update template in master branch adds a ghost DISK section which prevents vCenter template to be instantiated.

Added by Miguel Ángel Álvarez Cabrerizo over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:01/13/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Sunstone
Target version:Release 5.4
Resolution:fixed Pull request:
Affected Versions:Development

Description

Using master branch.

A vCenter template is imported from vSphere using Sunstone's Import wizard. This is the template as shown in OpenNebula:

CONTEXT = [
  NETWORK = "YES",
  SSH_PUBLIC_KEY = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyzMmVf/YFkEs66nksbbbpDYbTHqrXhOwl/pxV4sAASn3uYqfeMHWpHkTt56VS0LKPg9xhZsAYJ92YOipTSV92K5DZpnPOV774rlxT6RAQ+c/ehC8jeZnnz2qwWmPZRrSgYEHWRVwepZHu0jKLHxdztRXwYpzy6crKc9UyWYEF25nFHpChLZvm28m/Y1fuNM7PIFzmRuDS7fuhJyudsgIXpRi+AmTzlKXTZLn/PAM90bO6Sv3PTPleMkK9FGkDkumcQ1VqBgyHuyZ+dezB7itAdEh7/tbXI98qeFTajCJD9R1XIMfAzWT189p+ZUX/2wv3I5asUQNYpt8H3ljcH+dw1 mcabrerizo@auriga" ]
CPU = "1" 
DESCRIPTION = "vCenter Template imported by OpenNebula from Cluster devel" 
GRAPHICS = [
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]
HYPERVISOR = "vcenter" 
KEEP_DISKS_ON_DONE = "NO" 
LOGO = "images/logos/linux.png" 
MEMORY = "256" 
PUBLIC_CLOUD = [
  TYPE = "vcenter",
  VM_TEMPLATE = "42151ddd-5a5b-4e99-f5b1-95dcec8b5391" ]
SCHED_REQUIREMENTS = "NAME=\"devel\"" 
VCENTER_DATASTORE = "nfs" 
VCPU = "1" 

In this template, no DISK section is found, which is absolutely fine for vcenter.

Using Sunstone I click on the Update button so I can edit the template e.g adding a SSH key under the Context tab. After the update, a DISK section is added with a SIZE element having a NaN number.

CONTEXT = [
  NETWORK = "YES",
  SSH_PUBLIC_KEY = "ssh-rsa AAAAB3NzaC1yc2EAAAAFAQABAAABAQCizMmVf/YFkEs66nksbbbpDYbTHqrXhOwl/pxV4sAASn3uYqfeMHWpHkTt56VS0LKPg9xhZsAYJ92YOipTSV92K5DZpnPOV774rlxT6RAQ+c/ehC8jeZnnz2qwWmPZRrDgYEHWRVwepZHu0jLHxdztRXwYpzy6crKc9UyWYEF25nFHpChLZvm28m/Y1fuNM7PIFzmRuDS7fuhJyudsgIXpRi+AmTzlKXTZLn/PAM90bO6Sv3PTPleMkK9FGkDkumcQ1VqBgyHuyZ+dezB7itAdEh7/tbXI98qeFTajCJD9R1XIMfAzWT189p+ZUX/2wv3I5asUQNYpt8H3ljcH+dw1 mcabrerizo@auriga" ]
CPU = "1" 
DESCRIPTION = "vCenter Template imported by OpenNebula from Cluster devel" 
DISK = [
  SIZE = "NaN" ]
DISK_COST = "" 
GRAPHICS = [
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]
HYPERVISOR = "vcenter" 
KEEP_DISKS_ON_DONE = "NO" 
MEMORY = "256" 
MEMORY_UNIT_COST = "MB" 
PUBLIC_CLOUD = [
  TYPE = "vcenter",
  VM_TEMPLATE = "42151ddd-5a5b-4e99-f5b1-95dcec8b5391" ]
SCHED_REQUIREMENTS = "NAME=\"devel\"" 
VCENTER_DATASTORE = "nfs" 
VCPU = "1" 

This ghost disk prevents the vcenter based template to be instantiated:

Sunstone complains: [TemplateInstantiate] Error allocating a new virtual machine template. DISK 0: Unknown disk type

Internal Server Error: "POST /vmtemplate/0/action HTTP/1.1" 500

The XML section:

    <DISK>
      <SIZE><![CDATA[NaN]]></SIZE>
    </DISK>
    <DISK_COST><![CDATA[]]></DISK_COST>

This behavior does not affect OpenNebula 5.2.1, no DISK is created once you update the template.

History

#1 Updated by OpenNebula Systems Support Team over 4 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF