-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create: Fix VNeT template not applying when mixed with thick or thin … #843
create: Fix VNeT template not applying when mixed with thick or thin … #843
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, gave it a spin. While the patch is correct, it is incomplete. If you consider that VNET comes always on top of a jail type, you need to modify the vnet template and document the (breaking) change if someone like me has forked the default templates. Moreover, the question is whether VNET and Linux jail can be combined at all. Never tried.
This is missing:
Index: vnet/Bastillefile
===================================================================
--- vnet/Bastillefile (Revision 1900)
+++ vnet/Bastillefile (Arbeitskopie)
@@ -1,8 +1,3 @@
-ARG BASE_TEMPLATE=dw/base
-ARG HOST_RESOLV_CONF=/etc/resolv.conf
-
-INCLUDE ${BASE_TEMPLATE} --arg HOST_RESOLV_CONF="${HOST_RESOLV_CONF}"
-
ARG EPAIR
ARG GATEWAY
ARG IFCONFIG="SYNCDHCP"
and cut down to:
bastille template "${NAME}" ${bastille_template_vnet} --arg EPAIR="${uniq_epair}" --arg GATEWAY="${_gateway}" --arg GATEWAY6="${_gateway6}" --arg IFCONFIG="${_ifconfig}"
We need a discussion here.
Linux jails can't do VNET because of a check that happens on line 734-737 so no worries there for now. I think we should have the VNET template not include the base template as you said above, and instead just add the base template command to each of THICK, THIN, CLONE and THIN template INCLUDE commands. |
@michael-o I've now changed the VNET template to not do either the RESOLVE arg or the BASE_TEMPLATE arg. These are handled by the jail types, and rightly so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but still requires some sort of changelog entry to signal the change in the default template for forks.
@tschettervictor I think we are good to merge. The release just needs to mention this change, that's it. Thanks! |
@michael-o did you test this code on your systems? |
Yes, I did. Works perfectly. |
#401
@michael-o