Cannot update template. Tried to change restricted attribute: USER_INPUTS

Hello
I have a OpenNebula 5.12.0.1 installation
I want to setup some templates with fixed capacity on Memory, CPU and vCPU
The template file contains the lines:

    USER_INPUTS = [
      CPU = "O|fixed|| |2",
      MEMORY = "O|fixed|| |2048",
      VCPU = "O|fixed|| |2" ]

but i would also give the ability to the final customer to be able to load a SSH public key.

The problem:
when the customer tries to insert the public key in the template, the frontent gives the error “[one.template.update] Cannot update template. Tried to change restricted attribute: USER_INPUTS”

I tried to comment out the USER_INPUTS lines in etc/one/oned.conf
Then if the customer tries to upload the ssh key the template is modified and the memory, cpu and vcpu constraints are removed from the template

Here is the template after a ssh key modification:
empty

What’s wrong?
Thanks for your help

Marco

I tried to upgrade the installation to the latest 5.12.0.3, but did not resolve the issue

Step to reproduce:
1- As admin, create a template with fixed memory, cpu and vcpu parameters
2- Set the proper permission to customers
3- As simple user in the groupadmin view, try to alter any voice in the context tab (example, add a ssh key)

I get the error
“[one.template.update] Cannot update template. Tried to change restricted attribute: USER_INPUTS”

I tried to edit the template file in the Advanced view:
Things goes better: I can edit or delete the ssh key, so the problem could be related only to the Wizard in Sunstone?

Hello @Marco

I tried to follow the steps and I cannot reproduce the issue

My steps:

  1. Enable update template action to customer user view (groupadmin)
    Template.update_dialog: true

  2. Restart sunstone

  3. As admin, create a template with fixed memory, cpu and vcpu parameters

CONTEXT = [
  NETWORK = "YES" ]
CPU = "1"
GRAPHICS = [
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]
INPUTS_ORDER = ""
MEMORY = "1"
MEMORY_UNIT_COST = "MB"
OS = [
  BOOT = "" ]
USER_INPUTS = [
  CPU = "O|fixed|| |1",
  MEMORY = "O|fixed|| |1",
  VCPU = "O|fixed|| |1" ]
VCPU = "1"
  1. Set the proper permission to customers

  2. As customer user in the groupadmin view, edit ssh key e.g.

CONTEXT = [
  NETWORK = "YES",
  SSH_PUBLIC_KEY = "ssh-public-key" ]
CPU = "1"
GRAPHICS = [
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]
INPUTS_ORDER = ""
MEMORY = "1"
MEMORY_UNIT_COST = "MB"
OS = [
  BOOT = "" ]
USER_INPUTS = [
  CPU = "O|fixed|| |1",
  MEMORY = "O|fixed|| |1",
  VCPU = "O|fixed|| |1" ]
VCPU = "1"

Hello @sbetanzos
Thaks for your reply

I followed your steps:

  • set the permission on the template
    immagine
  • change something in context (added net context, onegate token and report ready to onegate)
    immagine
  • Click Update… and bam!
    immagine

Well… seems the problem is related to the Wizard mode in the Update Template.
In Advanced mode, I can actually edit the template.
Did you try to edit the template using Sunstone’s wizard mode?

Thank you
Marco