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
added ip forwarding flag #115
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,11 @@ Environment="HTTP_PROXY=<%= node['docker']['http_proxy'] %>" | |
<% if node['docker']['tmpdir'] -%> | ||
Environment="TMPDIR=<%= node['docker']['tmpdir'] %>" | ||
<% end -%> | ||
<% if node['docker']['ipv4_forward'] -%> | ||
ExecStartPre=/usr/sbin/sysctl -w net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1 | ||
<% else -%> | ||
ExecStartPre=/usr/sbin/sysctl -w net.ipv6.conf.all.forwarding=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you create a second attribute for IPv6? Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implementation detail: IPv4 would be inside its own if/end block while IPv6 would be inside its own if/end block. |
||
<% end -%> | ||
ExecStart=<%= node['docker']['install_dir'] %>/docker -d<%= node['docker']['bind_socket'] ? " -H #{node['docker']['bind_socket']}" : '' %><%= node['docker']['bind_uri'] ? " -H #{node['docker']['bind_uri']}" : '' %><%= node['docker']['container_init_type'] ? ' -r=false' : '' %><%= node['docker']['options'] ? " #{node['docker']['options']}" : '' %><%= node['docker']['storage_driver'] ? " -s #{node['docker']['storage_driver']}" : '' %><%= node['docker']['exec_driver'] ? " -e #{node['docker']['exec_driver']}" : '' %><%= node['docker']['group'] ? " -G #{node['docker']['group']}" : '' %> | ||
Restart=on-failure | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,9 @@ prestart() { | |
|
||
preexec="/sbin/sysctl" | ||
[ -x $preexec ] || exit 6 | ||
<% if node['docker']['ipv4_forward'] -%> | ||
$preexec -w net.ipv4.ip_forward=1 > /dev/null 2>&1 | ||
<% end -%> | ||
$preexec -w net.ipv6.conf.all.forwarding=1 > /dev/null 2>&1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please use new IPv6 forward attribute to also wrap this in if/end? Thanks! |
||
|
||
} | ||
|
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.
I'm guessing we should also allow IPv6 control as well here. Something like: