Since we have updated our testing cluster to OpenNebula 4.14.2 we have notice a issue trying to instantiate a template which contains
FILES_DS values into
CONTEXT, here is our template:
And now we get this error from ONE using oneadmin user:
$ onetemplate instantiate 1 --name test
[TemplateInstantiate] Error allocating a new virtual machine. Error parsing: run_user_script.sh. syntax error, unexpected RSTRING, expecting VARIABLE at line 1, columns 1:19
It was working before, it seems that OpenNebula is trying to parse the bash script and it fails… Do you known if this is a known issue or if we should change FILES_DS by another value?
Cheers and thanks!
I have similar issue bu it was due to a bug in 4.14.0. IMO FILE_DS should contain index to the file in the files datastore and INIT_SCRIPTS must have the name of the scripts that should be called. Here is an example where i have uploaded
set-root-password.sh in the FILES datastore and it has ID 18,
You can arrange the thing in the template wizard and then switch to advanced to see exact context variables.
yes that’s it! in our case I think that the template was changed during 4.14.2 upgrade, I have changed the template to the original value:
And now is working correctly
Thanks a lot!
The onedb tool doesn’t change the FILES_DS attribute, and the parser hasn’t been touched lately…
What OpenNebula version were you using before? Are you sure that exact same template was working?
We did a minor update from 4.14.0 to 4.14.2 but at this moment I’m not sure how or when it was modified, (probably it was modified by a human being ). In any case I will try to reproduce the issue, but nothing to be worried about, sorry for the noise…
I was able to reproduce it on 4.14.0. It was due to bug #4049.
Here is my (duplicate)report #4153.
As 4.14.2 is out and working smoothly I would like to suggest to not waste your time on this issue as it seems patched now.
Thanks a lot for the info! This is a test machine and its updated frequently so I was not sure when it was modified. I didn’t found any issue running 4.14.2 either