Skip to content

Shorten controller ID in exec-root to not hit UNIX_PATH_MAX#2443

Merged
selansen merged 2 commits intomoby:masterfrom
Rid:shorten-setkey-id
Sep 28, 2019
Merged

Shorten controller ID in exec-root to not hit UNIX_PATH_MAX#2443
selansen merged 2 commits intomoby:masterfrom
Rid:shorten-setkey-id

Conversation

@Rid
Copy link
Contributor

@Rid Rid commented Aug 29, 2019

Signed-off-by: Grant Millar rid@cylo.io

Use short controller ID in setkey in order to avoid moby/moby#39608 where using a custom exec-root which contains > 27 chars before the controller ID causes the daemon to fail starting with:

failed to start daemon: Error initializing network controller: error obtaining controller instance: listen unix /cylostore/sdj/9598/var/run/docker/libnetwork/b2757cb82eadaaea94aab22529663e38c3bf799369f5b578fe8a5bb4bcefe0f0.sock: bind: invalid argument

This happens due to hitting the UNIX_PATH_MAX limit (which is 108, ours is 115 in the example above). The patch gives us 79 chars to play with vs 27.

Signed-off-by: Grant Millar <rid@cylo.io>
@Rid
Copy link
Contributor Author

Rid commented Sep 2, 2019

@fcrisciani @ctelfer @AkihiroSuda PTAL?

@arkodg
Copy link
Contributor

arkodg commented Sep 24, 2019

@Rid can you please retry, the failed test is flaky and will be fixed soon

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "shorten-setkey-id" git@github.com:Rid/libnetwork.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354554968
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Signed-off-by: Grant Millar <rid@cylo.io>
@Rid
Copy link
Contributor Author

Rid commented Sep 25, 2019

@arkodg done, it's now passed.

@arkodg
Copy link
Contributor

arkodg commented Sep 25, 2019

thanks @Rid
cc @euanh @selansen

@selansen
Copy link
Contributor

Thanks @Rid

@selansen selansen merged commit 0025177 into moby:master Sep 28, 2019
espensuenson added a commit to espensuenson/moby that referenced this pull request Oct 1, 2019
Issues that are fixed :
log the actual error when failing to add IPv6 route moby/libnetwork#2444
Shorten controller ID in exec-root to not hit UNIX_PATH_MAX moby/libnetwork#2443
Fixed getNetworkFromStore, which returned an incorrect struct moby/libnetwork#2449
weighted scheduling methods constants for ipvs moby/libnetwork#2453
Resolve "bridge fdb show" hang issue moby/libnetwork#2456

Signed-off-by: Espen Suenson <mail@espensuenson.dk>
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.

5 participants