- Optimize. Use LinkByName instead of iterating over list of available
links. Linux does not support interfaces with the same names.
- Remove unnecessary indirection in utility functions which return
common.NetDev.
* highlight the need for `weave expose` in CNI/k8s
Fixes#2405
* Extend error message
* rearranged the sentences
weave launch <peer hosts> seems a bit orphaned here maybe include the weave connect command as well, since it's being mentioned.
When running in the AWSVPC mode, we need to do the following:
- Keep the HW TX offloading on.
- Check that the allocated address belongs to the default subnet,
because only one subnet is allowed and it should be the default one.
If it is not possible to determine whether AWSVPC is on, we ignore
all the steps, because the attachment routines have to work
regardless whether the router is running and the AWSVPC detection
is done by querying the /ipinfo/tracker endpoint served by
the router.
Now it's off by default, and there is an option to enable the
multicast route per-network.
We turn it on for the `weave` network created when we start the plugin.
Also move netlink and netns code from common to net
Creates interface if not already there
Adds addresses
Move the set link 'up' to after addresses are added
Consistency, consistency, consistency:
- prefix all log messages with "[net]" - important since the same
process acts as both a network and ipam driver
- include the API function name in all log messages
- log request and response details at debug level
- log request summary at info level
- log ContainerStarted as a pseudo API function, but only at debug
level (since it can be quite high volume)
And eliminate some dot imports.
It is a library function, so logging of any errors should be left to
the caller.
We also get rid of a logged warning which contained the complete data
structure returned by netlink.LinkByName.
So this function now does no logging at all. Which is how it should be.