Build names and links at runtime - no more sqlite#16032
Conversation
a94aa9c to
77fb28a
Compare
102a747 to
7283b4e
Compare
|
phew, these rebases are rough. |
|
And realizing that hostconfig.Links was being set to nil before, so this information is only in sqlite... |
|
−158,972 |
hack/make/validate-lint
Outdated
|
Looks cool |
|
Wow this is epic. Thanks so much @cpuguy83 ! Is there any undesirable side effect you can think of? |
|
Maybe an obvious question, but does this mean that links won't survive a daemon restart, or were they still stored on-disk somewhere else besides SQLite? |
|
Adding some context this from IRC convo: |
|
Confirmed that this works with Windows containers (both existing images after updating just docker.exe and on a fresh install). Not sure why Windows Jenkins run is failing, but it works fine in manual tests. LGTM |
7283b4e to
faf92dd
Compare
|
ping @mavenugo @mrjana could you have a look at #16032 (comment) now that 1.9 has been release (and you hopefully have a bit more time ❤️) |
|
we cannot remove links from one version to the other. If we're really going to remove links we should deprecated them in 1.10 to completely remove sqlite3 and the code related in 1.12. If we're going to keep links as they are, we can make the transition to in-memory links in 1.10, loading from sqlite to memory in that version, and remove the dependency in 1.11. If we're going to keep links with a different implementation under the hood, we should make sure we remove sqlite from the dependencies. |
|
@calavera unfortunately we are stuck with sqlite in any case since |
|
@cpuguy83 should we close this for now or is this still an option? I see a discussion around removal of links, which is not yet clear when that'll happen |
|
@thaJeztah The overall goal is still valid, don't use sqlite for storing things on disk which we can build at runtime easily enough. |
|
@cpuguy83 need rebase |
faf92dd to
3525c75
Compare
|
@LK4D4 Not yet. |
aeeb1c6 to
5c22bf2
Compare
|
I might be wrong but, the graceful downgrade is guaranteed unless we remove |
f0d3a83 to
c92aeba
Compare
|
That's fine, I updated to make it not remove the db. |
|
All green |
daemon/daemon.go
Outdated
There was a problem hiding this comment.
@cpuguy83 couldn't we do the container.HostConfig == nil || container.HostConfig.Links != nil check in the containers loop above to detect if legacyLinkDB should be set at all?
Before moby#16032, once links were setup in the sqlite db, hostConfig.Links was cleared out. This means that we need to migrate data back out of the sqlite db and put it back into hostConfig.Links so that links specified on older daemons can be used. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
c92aeba to
2600777
Compare
|
LGTM |
|
LGTM |
|
ping @ibuildthecloud aka, demolisher of code, hopes, and dreams. |
|
Yay, merged! Thanks for being so patient @cpuguy83 🤘 |
|
Is this the candidate fix to #17720? If this is on experimental I'm down to see if it'll still lockup on my production boxes. |
|
@vincentwoo This definitely speeds up some pieces of |
|
I can give it a run. Is it on https://experimental.docker.com? I have a hard time figuring out what revision that thing is at. |
|
This is in stable. |
|
Right, but there's not binaries out against it yet, right? Slated for 1.10? |
|
Niiiice. |
This stores all names and link info in memory at runtime rather than relying on sqlite.
Please test thoroughly.
I added some tests, but this is a big change!
Fixes #17691