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:
(not really my password, its cleartext is “
use this attribute in the VM template:
CONTEXT = [
CRYPTED_PASSWORD = “$USER[CRYPTED_PASSWORD]”,
instantiate the template.
In 4.x, the resulting
context.sh contained the following assignment:
In 5.0, there is the following line in
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.
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:
THANKS for reporting
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.
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 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!
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
Excellent. I look forward especially to the group-bound tokens system in 5.2.