Skip to content

Fix package installation during "iocell create" (#19) - #26

Open
orichoni wants to merge 2 commits into
bartekrutkowski:developfrom
orichoni:develop
Open

Fix package installation during "iocell create" (#19)#26
orichoni wants to merge 2 commits into
bartekrutkowski:developfrom
orichoni:develop

Conversation

@orichoni

Copy link
Copy Markdown

Always mount "${release}" in order to have "basedirs" at the time of jail creation.

Make sure to follow and check these boxes before submitting a PR! Thank you.

The issue is caused by the following if condition:

 703         if [ "${_template}" != "1" ] ; then
 704             __mount_basejail "${uuid}" "${template}"
 705         else
 706             __mount_basejail "${uuid}" "${release}"
 707         fi

In my opinion the whole if condition doesn't make sense. The negation of the if statement would be more logical. But even then it wouldn't solve the problem because the function __mount_basejail () anyway mounts only directories located in "${iocroot}/releases/".

Always mount "${release}" in order to have "basedirs" at the time of jail creation.
@bsdlme

bsdlme commented Jun 27, 2017

Copy link
Copy Markdown

Works for me! :)

@bartekrutkowski

Copy link
Copy Markdown
Owner

Thanks for the patch! Could you please explain in detail your train of thoughts and code analysis around it? I am asking, because I didn't had the time to do it myself, and we must be careful not to introduce new issues around templates/releases by changing things right and left. While I am not saying this is what you do here in this patch, until you explain it in detail, you'll have to wait for me to find some time to do it, in order for me to merge this change.

Templates are created by setting "istemplate" property. The old fashion "template" property souldn´t be used.
@orichoni

orichoni commented Jul 3, 2017

Copy link
Copy Markdown
Author

I have tried to analyze the code more deeply and found out that there are two possibilities how to create a template. One using "template" property and one using "istemplate" property. As far as I understood, the first one is obsolete and the second one is the right one to use. I have committed another change that removes remaining code related to the "template" property from __create_jail () function. Setting the "istemplate" property and newly also the "template" property are not allowed during __create_jail ().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants