Build names and links at runtime

Don't rely on sqlite db for name registration and linking.
Instead register names and links when the daemon starts to an in-memory
store.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0f9f99500c40f2a46682967ca358cd2346fd5e13
Component: engine
This commit is contained in:
Brian Goff
2015-09-03 20:51:04 -04:00
parent 6a1af5c70c
commit 20a5900d4d
13 changed files with 584 additions and 264 deletions

View File

@ -1083,9 +1083,9 @@ func (s *DockerSuite) TestContainerApiDeleteRemoveLinks(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(links, checker.Equals, "[\"/tlink1:/tlink2/tlink1\"]", check.Commentf("expected to have links between containers"))
status, _, err := sockRequest("DELETE", "/containers/tlink2/tlink1?link=1", nil)
c.Assert(err, checker.IsNil)
c.Assert(status, checker.Equals, http.StatusNoContent)
status, b, err := sockRequest("DELETE", "/containers/tlink2/tlink1?link=1", nil)
c.Assert(err, check.IsNil)
c.Assert(status, check.Equals, http.StatusNoContent, check.Commentf(string(b)))
linksPostRm, err := inspectFieldJSON(id2, "HostConfig.Links")
c.Assert(err, checker.IsNil)