Problem updating templates

Hi.

I think there are any kind of problem at opennebula when trying to update a template.

We use OpenNebula 4.14.2

If one user create a template like:

[CONTEXT=[
NETWORK=“YES”,
SET_HOSTNAME=“VMDUse$VMID”,
SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
CPU="2"
DESCRIPTION="MV "
DISK=[
IMAGE=“VMDUse”,
IMAGE_UNAME=“xxx” ]
DISK=[
DEV_PREFIX=“vdb”,
SIZE=“2000”,
TYPE=“swap” ]
GRAPHICS=[
KEYMAP=“es”,
LISTEN=“0.0.0.0”,
TYPE=“VNC” ]
HYPERVISOR="kvm"
LOGO="images/logos/debian.png"
MEMORY="2048"
NIC=[
NETWORK=“Private-10.38.2.x”,
NETWORK_UNAME=“oneadmin” ]
PCI=[
CLASS=“0300”,
DEVICE=“11bf”,
VENDOR=“10de” ]
VCPU=“2”]

After saving that if the user whan to delete the “PCI” entry he will found that is impossible.

user perform:

  • onetemplate update XX
  • delete the entry:

PCI=[
CLASS=“0300”,
DEVICE=“11bf”,
VENDOR=“10de” ]

  • save.

and now, if perform the “onetemplate show 10” all are equal… there are no changes in the template.

Any idea?

logs not show any.

Tue Apr 26 17:03:20 2016 [Z0][ReM][D]: Req:8240 UID:2 TemplateUpdateTemplate invoked , 10, “CONTEXT=[…”, 0
Tue Apr 26 17:03:20 2016 [Z0][ReM][D]: Req:8240 UID:2 TemplateUpdateTemplate result SUCCESS, 10

Hi,

PCI is a restricted attribute.

A regular user is not allowed to create a template with that attribute. In this case, you probably created the template as oneadmin and then changed its ownership. Now OpenNebula is enforcing the existing PCI attribute because the user is not supposed to add/remove/edit it.

If you remove it from oned.conf it should work.

1 Like

Oh thanks so much! :slight_smile:

maybe an alert in sunstone or similar… because there are no notification about it when user perform a change in the template.

Thanks again @cmartin

You are right, maybe OpenNebula should return a warning.

Thanks for the suggestion, I’ve opened a ticket to consider it in future releases:
http://dev.opennebula.org/issues/4434