# Problem using FILES\_DS context attribute in 4.14.2-2

**URL:** <https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566>\
**Category:** Product Support\
**Created:** [December 8, 2015, 10:08am UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566 "2015-12-08T10:08:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [December 8, 2015, 10:08am UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/1 "2015-12-08T10:08:31Z")

</div>

Hi all

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:

> CONTEXT=[  
> FILES\_DS=“run\_user\_script.sh”,  
> NETWORK=“YES”,  
> SCRIPT=“build\_all\_repos.sh”,  
> TARGET=“hda”,  
> TOKEN=“YES” ]

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!  
Álvaro

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [December 8, 2015, 1:32pm UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/2 "2015-12-08T13:32:28Z")

</div>

Hi @alvaro_simongarcia,

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,

```auto
FILE_DS=$FILE[IMAGE_ID=18]
INIT_SCRIPTS="set-root-password.sh"

```

You can arrange the thing in the template wizard and then switch to advanced to see exact context variables.

Kind Regards,  
Anton Todorov

---

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [December 8, 2015, 3:46pm UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/3 "2015-12-08T15:46:31Z")

</div>

Hi @atodorov_storpool

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:

> CONTEXT=[  
> FILES\_DS=“$FILE[IMAGE\_ID=155] $FILE[IMAGE\_ID=164]”,  
> INIT\_SCRIPTS=“run\_user\_script.sh”,  
> NETWORK=“YES”,  
> SCRIPT=“build\_all\_repos.sh”,  
> TOKEN=“YES” ]

And now is working correctly 😄

Thanks a lot!  
Álvaro

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [December 9, 2015, 10:26am UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/4 "2015-12-09T10:26:40Z")

</div>

Hi Álvaro,

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?

---

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [December 9, 2015, 11:05am UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/5 "2015-12-09T11:05:20Z")

</div>

Hi Carlos

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…

Cheers  
Alvaro

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [December 10, 2015, 11:55am UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/6 "2015-12-10T11:55:30Z")

</div>

Hi Álvaro,

I was able to reproduce it on 4.14.0. It was due to [bug #4049](http://dev.opennebula.org/issues/4049).

Here is my (duplicate)report [#4153](http://dev.opennebula.org/issues/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.

Cheers,  
Anton

---

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [December 10, 2015, 12:18pm UTC](https://forum.opennebula.io/t/problem-using-files-ds-context-attribute-in-4-14-2-2/1566/7 "2015-12-10T12:18:17Z")

</div>

Hi Anton

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 😊

Cheers  
Álvaro
