Static docker init #2157

Closed
wants to merge 6 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

alexlarsson commented Oct 10, 2013

This moves the SysInit code to a separate module, allowing docker-init to avoid importing the main docker module, which in turn means it doesn't pick up dependencies like sqlite.

Note, this pull is based on (and contains the commits from) my netlink pull (dotcloud#2156) to avoid conflicts with that as they touch the same code.

Collaborator

vieux commented Oct 10, 2013

LGTM

Contributor

crosbymichael commented Oct 10, 2013

@alexlarsson Can you please squash your commits before submitting PRs? Thanks

Contributor

alexlarsson commented Oct 10, 2013

@crosbymichael Really? I on purpose create nicely separated git-style microcommits and you want me to just squash them together? Why?

Member

tianon commented Oct 10, 2013

This is the best way I can think of to describe why: dotcloud#1972

Reading the changelog at each release gets pretty heinous. I personally prefer tons of microcommits also, but see the value in having an easier to digest release changelog.

Contributor

alexlarsson commented Oct 10, 2013

Release changelogs are better written manually anyway. Microcommits have real value in terms of things like bisecting, rebasing, cherry-picking, git blame, review, etc. Its one of the main reasons git is so good.

Collaborator

shykes commented Oct 10, 2013

Per today's irc meeting, it's ok to separate a pull request into logical changes with 1 commut per change. As a rule pull requests should be the smallest possible thing that can be merged.

With that in mind, this particular PR looks well delineated.

Collaborator

shykes commented Oct 11, 2013

NOTE: this needs to be merged into the "device-mapper" branch. Once approved please merge into the correct branch manually then close this PR.

Collaborator

shykes commented Oct 11, 2013

Please briefly document the exported functions.

alexlarsson added some commits Oct 10, 2013

Add netlink submodule
This contains various operations that can replace the use of
shelling out to "ip".
Use netlink directly instead of /bin/ip in Sysinit
The sysinit code only uses /bin/ip to set a default gateway. This
is pretty easy to do via netlink directly, so we can avoid
the ip dependency.
Add a network test
This just tries pinging first 127.0.0.1 and then 8.8.8.8.

We can't ping via a dns name, because libresolv.so is missing
from the test image, so dns resolving doesn't work.
network: Stop shelling out to /sbin/ip
We have our own netlink version of all the required calls now, so
we can just skip the /sbin/ip dependency.
Move ListOps to utils submodule
This will be needed for later use in docker-init without a docker
dependency
Move SysInit to a submodule
This allows docker-init to not import the main docker
module, which means it won't e.g. pick up any sqlite
dependencies.
Contributor

alexlarsson commented Oct 11, 2013

New version with docs for the netlink public symbols

Collaborator

shykes commented Oct 11, 2013

LGTM

Collaborator

shykes commented Oct 11, 2013

Merged manually into the device-mapper branch

@shykes shykes closed this Oct 11, 2013

Contributor

alexlarsson commented Oct 14, 2013

Really? Where was this merged? I can't find it.

Member

tianon commented Oct 14, 2013

@alexlarsson it was merged on the links branch, not the device-mapper branch - @crosbymichael and @shykes have assured me that there will be an rc4 later today with the combination of those two branches for testing

@alexlarsson alexlarsson deleted the alexlarsson:static-docker-init branch Mar 28, 2014

wking added a commit to wking/dockerfile that referenced this pull request Apr 16, 2014

gentoo-iproute2: Add sys-apps/iproute2 to images
Avoid:

  lxc-start: failed to open log file "/var/lib/lxc/b149.../b149....log" :
    No such file or directory

because iproute2 needs to be in the image [1].

Really?
  moby/moby#925
  moby/moby#2157

[1]: https://groups.google.com/forum/#!msg/docker-user/yXOt3qISHXU/8ntkUNJR0h0J
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment