Skip to content
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

Quick read of ipv6 docs and small fixes. #57

Merged
merged 2 commits into from
Aug 12, 2015

Conversation

ypid
Copy link
Contributor

@ypid ypid commented Aug 11, 2015

  • Why on earth does one directly edit the systemd/system/docker.service
    file just to add a start argument?
  • Fixed typos.
  • I have not fully tested it yet, but I will when I have time.

* Why on earth does one directly edit the systemd/system/docker.service
  file just to add a start argument?
* Fixed typos.
* I have not fully tested it yet, but I will when I have time.

Reload the daemon and restart docker so that it takes affect:

systemctl daemon-reload && systemctl restart docker.service
service docker restart
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using systemd, people need to use systemctl. Ubuntu provides service binary to manage upstart services and maybe will soon wrap systemd interface.

Probably need service and systemctl commands for upstart and systemd respectively.

@kylemanna
Copy link
Owner

Thanks for reviewing!

I don't understand your comment about modifying the systemd service for two reasons:

  1. People shouldn't be modifying the service file directly. It should be overriden as described in the init file. I'm currently running several OpenVPN servers on one of my servers and it works. The goal is to make the systemd service extensible and have sensible defaults. Open to other suggestions.

    The IPv6 stuff in the service file is an eye sore, but Docker doesn't handle network configuration very well at this point.

  2. Why are you using the start argument? Are you storing the state in a single container? Running a single container makes it very hard to update. My philosophy is to do a docker pull to always pull the latest openvpn image (and fail gracefully if the pull fails) to get the latest security updates and then create a new container with docker run. If you're doing docker start ... it suggests you're re-using a container, why?

@ypid
Copy link
Contributor Author

ypid commented Aug 12, 2015

Hi

Not sure if I understand you correctly.

My main confusion was about the sed -e 's:^\(ExecStart.*\):\1 --ipv6:' /lib/systemd/system/docker.service | tee /etc/systemd/system/docker.service line which you used to append the --ipv6 switch. This can be done much simpler and more robust using the /etc/default/docker file. (Wrote an Ansible Role for that 😄 ypid.docker)

About the systemctl restart vs. service command I guess they are interchangeble on most systems running systemd (which is the majority of current distributions). I am just used to the service command because it is shorter 😄 (reverted …).

To 2. Not sure what you mean. I published parts of my Docker setup configuration on GitHub. Here is the relevant part.

BTW. Thanks for your work on v6 integration!


Reload the daemon and restart docker so that it takes affect:

systemctl daemon-reload && systemctl restart docker.service
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to tell systemd to examine the updated docker.service file, so the daemon-reload is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v6 is now configured in /etc/default/docker which is read on normal service restart. There should be no need to restart systemd itself for that.

For Step 3 — Setup the systemd Unit File, it is a good idea, but for adding a start augment, no.

@kylemanna
Copy link
Owner

Ahh. I was thinking of [email protected] and you're talking about docker.service.

The /etc/default configuration directory is Debian (and derivative) specific thing, as is service. These will hopefully go away when people finally standardize an init system across distributions. Systemd defines all these things in a much more extensible way.

In short, we need both until the Debian way dies (as it has already moved ot systemd) and Ubuntu will soon follow. Fedora and Arch has been on systemd for years.

kylemanna added a commit that referenced this pull request Aug 12, 2015
Quick read of ipv6 docs and small fixes.
@kylemanna kylemanna merged commit bce012b into kylemanna:master Aug 12, 2015
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.

None yet

2 participants