forked from moby/vpnkit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hostnet: convert Uwt errors to Unix_errors, pretty-print "expected" c…
…ases Previously we lacked a function to convert from Uwt.error to Unix.error. Happily uwt.0.0.3 contains such a useful error converting function, so we use it. When a port forward is requested, use `Lwt.catch` to handle the exception at the top-level and pretty-print the error message for the expected cases - EADDRINUSE: the port was already 'allocated' - EADDRNOTAVAIL: the interface IP was not found (probably it exists in a VM but not on the host) - EPERM: insufficient privileges to bind a privileged port The pretty-printing is intended to match the output of `docker` on regular Linux. This is related to [docker/compose#3277] Signed-off-by: David Scott <dave.scott@docker.com>
- Loading branch information
Showing
2 changed files
with
60 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters