# Incorrect attribute quotation (works in 4.14, broken in 5.0)

**URL:** <https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916>\
**Category:** Product Support\
**Created:** [September 12, 2016, 7:08pm UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916 "2016-09-12T19:08:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [September 12, 2016, 7:08pm UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/1 "2016-09-12T19:08:27Z")

</div>

Hello,

I have discovered that my VM templates stopped working when instantiated under ONe 5.0  
(they used to work in 4.14 or 4.12). Steps to reproduce:

- Set the following user attribute:

`CRYPTED_PASSWORD=$6$FF6vBSp81IKWPycG$gyanGclUN8mBi0Wyjqf2Oi9uCfBW16H4v.eQg8dn1C2zzg5JfNCsFv6M1NTi8AOJpfqvlq26..xU4VcKaRrJ6/`

(not really my password, its cleartext is “`opennebula`”)

- use this attribute in the VM template:

- instantiate the template.

In 4.x, the resulting `context.sh` contained the following assignment:

`CRYPTED_PASSWORD='$6$FF6...rJ6/"`

In 5.0, there is the following line in `context.sh`:

`CRYPTED_PASSWORD=".eQg8...rJ6/"`

Without the leading “`$6$...`”. I think the reason is that misquoted dollar signs are taken as undefined shell variables. Is it a bug, or is itdocumented somewhere? In any case, the behaviour of 5.0 is different than that of 4.14.

Thanks,

-Yenya

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [September 13, 2016, 8:17am UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/2 "2016-09-13T08:17:16Z")

</div>

Hi Yenya,

This is in fact a bug, but not related to context parsing itself, but  
introduced with the reconfiguration feature. With 5.0 context is generated  
every time the VM is booted, so you can capture changes in networking  
configuration. The problem is:

1.- When the VM is instantiated (VM in pending) context is generated  
correctly CONTEXT = [CRYPTED\_PASSWORD=’$6$FF6…rJ6/", …]  
2.- When the VM is booted, the context is regenerated so CRTYPTED\_PASSWORD  
is parsed again, in this case $6 and $FF6… are treated as variables and  
they are empty, so we get CRYPTED\_PASSWORD=".eQg8…rJ6/

I’ve filled an issue for this:

[http://dev.opennebula.org/issues/4774](http://dev.opennebula.org/issues/4774)

THANKS for reporting

---

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [September 13, 2016, 9:13am UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/3 "2016-09-13T09:13:34Z")

</div>

Ruben,

thanks for the fast reply. I look forward to the fix, as my users are confused that our preinstalled images do not work for them.

-Yenya

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [September 13, 2016, 11:14am UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/4 "2016-09-13T11:14:56Z")

</div>

Can you try the following patch, it is for the one-5.0 branch

[https://github.com/OpenNebula/one/commit/590805581ac64257f2b58d5e52f9c9e3b1a8755a](https://github.com/OpenNebula/one/commit/590805581ac64257f2b58d5e52f9c9e3b1a8755a)

---

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [September 16, 2016, 1:29pm UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/5 "2016-09-16T13:29:13Z")

</div>

Ruben, thanks for the patch. I took the src.rpm for CentOS 7, edited the .spec file to use the abovementioned patch, compiled it, and installed. I have verified that the patch fixes my problem - the [context.sh](http://context.sh) file contains correctly written CRYPTED\_PASSWORD variable value (both for the new VM and after the undeploy/resume cycle).

Do you plan to make a new release any time soon? If not, I can put the RPMs I have compiled somewhere for other users to download.

Anyway, thanks very much for the fix!

-Yenya

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [September 16, 2016, 2:32pm UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/6 "2016-09-16T14:32:34Z")

</div>

GREAT!!! Thanks for the feedback. We’ve just released 5.2 beta, the final  
stable release should be in a couple of weeks depending on the number of  
bugs we managed to include in the new version 😉

---

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [September 16, 2016, 3:29pm UTC](https://forum.opennebula.io/t/incorrect-attribute-quotation-works-in-4-14-broken-in-5-0/2916/7 "2016-09-16T15:29:40Z")

</div>

Excellent. I look forward especially to the group-bound tokens system in 5.2.

-Yenya
