* addresses
* assigned
* at least
* attachments
* auxiliary
* available
* cleanup
* communicate
* communications
* configuration
* connection
* connectivity
* destination
* encountered
* endpoint
* example
* existing
* expansion
* expected
* external
* forwarded
* gateway
* implementations
* implemented
* initialize
* internally
* loses
* message
* network
* occurred
* operational
* origin
* overlapping
* reaper
* redirector
* release
* representation
* resolver
* retrieve
* returns
* sanbdox
* sequence
* succesful
* synchronizing
* update
* validates
Signed-off-by: Josh Soref <jsoref@gmail.com>
| ... | ... |
@@ -30,7 +30,7 @@ |
| 30 | 30 |
- Fix the handling for default gateway Endpoint join/leave. |
| 31 | 31 |
|
| 32 | 32 |
## 0.7.0-rc.3 (2016-04-05) |
| 33 |
-- Revert fix for default gateway endoint join/leave. Needs to be reworked. |
|
| 33 |
+- Revert fix for default gateway endpoint join/leave. Needs to be reworked. |
|
| 34 | 34 |
- Persist the network internal mode for bridge networks |
| 35 | 35 |
|
| 36 | 36 |
## 0.7.0-rc.2 (2016-04-05) |
| ... | ... |
@@ -194,7 +194,7 @@ func (c *controller) handleKeyChange(keys []*types.EncryptionKey) error {
|
| 194 | 194 |
func (c *controller) agentSetup(clusterProvider cluster.Provider) error {
|
| 195 | 195 |
agent := c.getAgent() |
| 196 | 196 |
|
| 197 |
- // If the agent is already present there is no need to try to initilize it again |
|
| 197 |
+ // If the agent is already present there is no need to try to initialize it again |
|
| 198 | 198 |
if agent != nil {
|
| 199 | 199 |
return nil |
| 200 | 200 |
} |
| ... | ... |
@@ -372,7 +372,7 @@ func (h *Handle) set(ordinal, start, end uint64, any bool, release bool, serial |
| 372 | 372 |
h.Lock() |
| 373 | 373 |
} |
| 374 | 374 |
|
| 375 |
- // Previous atomic push was succesfull. Save private copy to local copy |
|
| 375 |
+ // Previous atomic push was successful. Save private copy to local copy |
|
| 376 | 376 |
h.unselected = nh.unselected |
| 377 | 377 |
h.head = nh.head |
| 378 | 378 |
h.dbExists = nh.dbExists |
| ... | ... |
@@ -1225,7 +1225,7 @@ func (v mergeVal) IsBoolFlag() bool {
|
| 1225 | 1225 |
|
| 1226 | 1226 |
// Name returns the name of a mergeVal. |
| 1227 | 1227 |
// If the original value had a name, return the original name, |
| 1228 |
-// otherwise, return the key asinged to this mergeVal. |
|
| 1228 |
+// otherwise, return the key assigned to this mergeVal. |
|
| 1229 | 1229 |
func (v mergeVal) Name() string {
|
| 1230 | 1230 |
type namedValue interface {
|
| 1231 | 1231 |
Name() string |
| ... | ... |
@@ -96,7 +96,7 @@ func lookupServiceID(cli *NetworkCli, nwName, svNameID string) (string, error) {
|
| 96 | 96 |
|
| 97 | 97 |
func lookupContainerID(cli *NetworkCli, cnNameID string) (string, error) {
|
| 98 | 98 |
// Container is a Docker resource, ask docker about it. |
| 99 |
- // In case of connecton error, we assume we are running in dnet and return whatever was passed to us |
|
| 99 |
+ // In case of connection error, we assume we are running in dnet and return whatever was passed to us |
|
| 100 | 100 |
obj, _, err := readBody(cli.call("GET", fmt.Sprintf("/containers/%s/json", cnNameID), nil, nil))
|
| 101 | 101 |
if err != nil {
|
| 102 | 102 |
// We are probably running outside of docker |
| ... | ... |
@@ -121,7 +121,7 @@ type NetworkController interface {
|
| 121 | 121 |
// Stop network controller |
| 122 | 122 |
Stop() |
| 123 | 123 |
|
| 124 |
- // ReloadCondfiguration updates the controller configuration |
|
| 124 |
+ // ReloadConfiguration updates the controller configuration |
|
| 125 | 125 |
ReloadConfiguration(cfgOptions ...config.Option) error |
| 126 | 126 |
|
| 127 | 127 |
// SetClusterProvider sets cluster provider |
| ... | ... |
@@ -185,7 +185,7 @@ func Key(key ...string) string {
|
| 185 | 185 |
func ParseKey(key string) ([]string, error) {
|
| 186 | 186 |
chain := strings.Split(strings.Trim(key, "/"), "/") |
| 187 | 187 |
|
| 188 |
- // The key must atleast be equal to the rootChain in order to be considered as valid |
|
| 188 |
+ // The key must at least be equal to the rootChain in order to be considered as valid |
|
| 189 | 189 |
if len(chain) <= len(rootChain) || !reflect.DeepEqual(chain[0:len(rootChain)], rootChain) {
|
| 190 | 190 |
return nil, types.BadRequestErrorf("invalid Key : %s", key)
|
| 191 | 191 |
} |
| ... | ... |
@@ -589,7 +589,7 @@ func (ds *datastore) DeleteObject(kvObject KVObject) error {
|
| 589 | 589 |
defer ds.Unlock() |
| 590 | 590 |
} |
| 591 | 591 |
|
| 592 |
- // cleaup the cache first |
|
| 592 |
+ // cleanup the cache first |
|
| 593 | 593 |
if ds.cache != nil {
|
| 594 | 594 |
// If persistent store is skipped, sequencing needs to |
| 595 | 595 |
// happen in cache. |
| ... | ... |
@@ -645,7 +645,7 @@ func (ds *datastore) DeleteTree(kvObject KVObject) error {
|
| 645 | 645 |
defer ds.Unlock() |
| 646 | 646 |
} |
| 647 | 647 |
|
| 648 |
- // cleaup the cache first |
|
| 648 |
+ // cleanup the cache first |
|
| 649 | 649 |
if ds.cache != nil {
|
| 650 | 650 |
// If persistent store is skipped, sequencing needs to |
| 651 | 651 |
// happen in cache. |
| ... | ... |
@@ -8,8 +8,8 @@ import ( |
| 8 | 8 |
) |
| 9 | 9 |
|
| 10 | 10 |
var ( |
| 11 |
- // ErrNotImplmented exported |
|
| 12 |
- ErrNotImplmented = errors.New("Functionality not implemented")
|
|
| 11 |
+ // ErrNotImplemented exported |
|
| 12 |
+ ErrNotImplemented = errors.New("Functionality not implemented")
|
|
| 13 | 13 |
) |
| 14 | 14 |
|
| 15 | 15 |
// MockData exported |
| ... | ... |
@@ -65,7 +65,7 @@ func (s *MockStore) Exists(key string) (bool, error) {
|
| 65 | 65 |
|
| 66 | 66 |
// List gets a range of values at "directory" |
| 67 | 67 |
func (s *MockStore) List(prefix string) ([]*store.KVPair, error) {
|
| 68 |
- return nil, ErrNotImplmented |
|
| 68 |
+ return nil, ErrNotImplemented |
|
| 69 | 69 |
} |
| 70 | 70 |
|
| 71 | 71 |
// DeleteTree deletes a range of values at "directory" |
| ... | ... |
@@ -76,17 +76,17 @@ func (s *MockStore) DeleteTree(prefix string) error {
|
| 76 | 76 |
|
| 77 | 77 |
// Watch a single key for modifications |
| 78 | 78 |
func (s *MockStore) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error) {
|
| 79 |
- return nil, ErrNotImplmented |
|
| 79 |
+ return nil, ErrNotImplemented |
|
| 80 | 80 |
} |
| 81 | 81 |
|
| 82 | 82 |
// WatchTree triggers a watch on a range of values at "directory" |
| 83 | 83 |
func (s *MockStore) WatchTree(prefix string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error) {
|
| 84 |
- return nil, ErrNotImplmented |
|
| 84 |
+ return nil, ErrNotImplemented |
|
| 85 | 85 |
} |
| 86 | 86 |
|
| 87 | 87 |
// NewLock exposed |
| 88 | 88 |
func (s *MockStore) NewLock(key string, options *store.LockOptions) (store.Locker, error) {
|
| 89 |
- return nil, ErrNotImplmented |
|
| 89 |
+ return nil, ErrNotImplemented |
|
| 90 | 90 |
} |
| 91 | 91 |
|
| 92 | 92 |
// AtomicPut put a value at "key" if the key has not been |
| ... | ... |
@@ -7,7 +7,7 @@ For the semantics of driver methods, which correspond to the protocol below, ple |
| 7 | 7 |
|
| 8 | 8 |
## LibNetwork integration with the Docker `plugins` package |
| 9 | 9 |
|
| 10 |
-When LibNetwork initialises the `drivers.remote` package with the `Init()` function, it passes a `DriverCallback` as a parameter, which implements `RegisterDriver()`. The remote driver package uses this interface to register remote drivers with LibNetwork's `NetworkController`, by supplying it in a `plugins.Handle` callback. |
|
| 10 |
+When LibNetwork initializes the `drivers.remote` package with the `Init()` function, it passes a `DriverCallback` as a parameter, which implements `RegisterDriver()`. The remote driver package uses this interface to register remote drivers with LibNetwork's `NetworkController`, by supplying it in a `plugins.Handle` callback. |
|
| 11 | 11 |
|
| 12 | 12 |
The callback is invoked when a driver is loaded with the `plugins.Get` API call. How that comes about is out of scope here (but it might be, for instance, when that driver is mentioned by the user). |
| 13 | 13 |
|
| ... | ... |
@@ -75,10 +75,10 @@ type Driver interface {
|
| 75 | 75 |
// DecodeTableEntry passes the driver a key, value pair from table it registered |
| 76 | 76 |
// with libnetwork. Driver should return {object ID, map[string]string} tuple.
|
| 77 | 77 |
// If DecodeTableEntry is called for a table associated with NetworkObject or |
| 78 |
- // EndpointObject the return object ID should be the network id or endppoint id |
|
| 78 |
+ // EndpointObject the return object ID should be the network id or endpoint id |
|
| 79 | 79 |
// associated with that entry. map should have information about the object that |
| 80 | 80 |
// can be presented to the user. |
| 81 |
- // For exampe: overlay driver returns the VTEP IP of the host that has the endpoint |
|
| 81 |
+ // For example: overlay driver returns the VTEP IP of the host that has the endpoint |
|
| 82 | 82 |
// which is shown in 'network inspect --verbose' |
| 83 | 83 |
DecodeTableEntry(tablename string, key string, value []byte) (string, map[string]string) |
| 84 | 84 |
|
| ... | ... |
@@ -97,7 +97,7 @@ type NetworkInfo interface {
|
| 97 | 97 |
TableEventRegister(tableName string, objType ObjectType) error |
| 98 | 98 |
} |
| 99 | 99 |
|
| 100 |
-// InterfaceInfo provides a go interface for drivers to retrive |
|
| 100 |
+// InterfaceInfo provides a go interface for drivers to retrieve |
|
| 101 | 101 |
// network information to interface resources. |
| 102 | 102 |
type InterfaceInfo interface {
|
| 103 | 103 |
// SetMacAddress allows the driver to set the mac address to the endpoint interface |
| ... | ... |
@@ -104,7 +104,7 @@ type containerConfiguration struct {
|
| 104 | 104 |
ChildEndpoints []string |
| 105 | 105 |
} |
| 106 | 106 |
|
| 107 |
-// cnnectivityConfiguration represents the user specified configuration regarding the external connectivity |
|
| 107 |
+// connectivityConfiguration represents the user specified configuration regarding the external connectivity |
|
| 108 | 108 |
type connectivityConfiguration struct {
|
| 109 | 109 |
PortBindings []types.PortBinding |
| 110 | 110 |
ExposedPorts []types.TransportPort |
| ... | ... |
@@ -53,7 +53,7 @@ func TestLinkCreate(t *testing.T) {
|
| 53 | 53 |
t.Fatalf("Failed to create a link: %s", err.Error())
|
| 54 | 54 |
} |
| 55 | 55 |
|
| 56 |
- // Verify sbox endoint interface inherited MTU value from bridge config |
|
| 56 |
+ // Verify sbox endpoint interface inherited MTU value from bridge config |
|
| 57 | 57 |
sboxLnk, err := netlink.LinkByName(te.iface.srcName) |
| 58 | 58 |
if err != nil {
|
| 59 | 59 |
t.Fatal(err) |
| ... | ... |
@@ -167,7 +167,7 @@ func TestLinkCreateNoEnableIPv6(t *testing.T) {
|
| 167 | 167 |
|
| 168 | 168 |
iface := te.iface |
| 169 | 169 |
if iface.addrv6 != nil && iface.addrv6.IP.To16() != nil {
|
| 170 |
- t.Fatalf("Expectd IPv6 address to be nil when IPv6 is not enabled. Got IPv6 = %s", iface.addrv6.String())
|
|
| 170 |
+ t.Fatalf("Expected IPv6 address to be nil when IPv6 is not enabled. Got IPv6 = %s", iface.addrv6.String())
|
|
| 171 | 171 |
} |
| 172 | 172 |
|
| 173 | 173 |
if te.gw6.To16() != nil {
|
| ... | ... |
@@ -84,7 +84,7 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, |
| 84 | 84 |
} |
| 85 | 85 |
v4gw, _, err := net.ParseCIDR(s.GwIP) |
| 86 | 86 |
if err != nil {
|
| 87 |
- return fmt.Errorf("gatway %s is not a valid ipv4 address: %v", s.GwIP, err)
|
|
| 87 |
+ return fmt.Errorf("gateway %s is not a valid ipv4 address: %v", s.GwIP, err)
|
|
| 88 | 88 |
} |
| 89 | 89 |
err = jinfo.SetGateway(v4gw) |
| 90 | 90 |
if err != nil {
|
| ... | ... |
@@ -101,7 +101,7 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, |
| 101 | 101 |
} |
| 102 | 102 |
v6gw, _, err := net.ParseCIDR(s.GwIP) |
| 103 | 103 |
if err != nil {
|
| 104 |
- return fmt.Errorf("gatway %s is not a valid ipv6 address: %v", s.GwIP, err)
|
|
| 104 |
+ return fmt.Errorf("gateway %s is not a valid ipv6 address: %v", s.GwIP, err)
|
|
| 105 | 105 |
} |
| 106 | 106 |
err = jinfo.SetGatewayIPv6(v6gw) |
| 107 | 107 |
if err != nil {
|
| ... | ... |
@@ -68,7 +68,7 @@ func (d *driver) CreateNetwork(nid string, option map[string]interface{}, nInfo
|
| 68 | 68 |
err = d.storeUpdate(config) |
| 69 | 69 |
if err != nil {
|
| 70 | 70 |
d.deleteNetwork(config.ID) |
| 71 |
- logrus.Debugf("encoutered an error rolling back a network create for %s : %v", config.ID, err)
|
|
| 71 |
+ logrus.Debugf("encountered an error rolling back a network create for %s : %v", config.ID, err)
|
|
| 72 | 72 |
return err |
| 73 | 73 |
} |
| 74 | 74 |
|
| ... | ... |
@@ -92,7 +92,7 @@ func (d *driver) createNetwork(config *configuration) error {
|
| 92 | 92 |
return err |
| 93 | 93 |
} |
| 94 | 94 |
config.CreatedSlaveLink = true |
| 95 |
- // notify the user in logs they have limited comunicatins |
|
| 95 |
+ // notify the user in logs they have limited communications |
|
| 96 | 96 |
if config.Parent == getDummyName(stringid.TruncateID(config.ID)) {
|
| 97 | 97 |
logrus.Debugf("Empty -o parent= and --internal flags limit communications to other containers inside of network: %s",
|
| 98 | 98 |
config.Parent) |
| ... | ... |
@@ -30,7 +30,7 @@ func createIPVlan(containerIfName, parent, ipvlanMode string) (string, error) {
|
| 30 | 30 |
// Get the link for the master index (Example: the docker host eth iface) |
| 31 | 31 |
parentLink, err := ns.NlHandle().LinkByName(parent) |
| 32 | 32 |
if err != nil {
|
| 33 |
- return "", fmt.Errorf("error occoured looking up the %s parent iface %s error: %s", ipvlanType, parent, err)
|
|
| 33 |
+ return "", fmt.Errorf("error occurred looking up the %s parent iface %s error: %s", ipvlanType, parent, err)
|
|
| 34 | 34 |
} |
| 35 | 35 |
// Create an ipvlan link |
| 36 | 36 |
ipvlan := &netlink.IPVlan{
|
| ... | ... |
@@ -169,7 +169,7 @@ func createDummyLink(dummyName, truncNetID string) error {
|
| 169 | 169 |
} |
| 170 | 170 |
parentDummyLink, err := ns.NlHandle().LinkByName(dummyName) |
| 171 | 171 |
if err != nil {
|
| 172 |
- return fmt.Errorf("error occoured looking up the %s parent iface %s error: %s", ipvlanType, dummyName, err)
|
|
| 172 |
+ return fmt.Errorf("error occurred looking up the %s parent iface %s error: %s", ipvlanType, dummyName, err)
|
|
| 173 | 173 |
} |
| 174 | 174 |
// bring the new netlink iface up |
| 175 | 175 |
if err := ns.NlHandle().LinkSetUp(parentDummyLink); err != nil {
|
| ... | ... |
@@ -31,7 +31,7 @@ func (d *driver) deleteNetwork(nid string) {
|
| 31 | 31 |
d.Unlock() |
| 32 | 32 |
} |
| 33 | 33 |
|
| 34 |
-// getNetworks Safely returns a slice of existng networks |
|
| 34 |
+// getNetworks Safely returns a slice of existing networks |
|
| 35 | 35 |
func (d *driver) getNetworks() []*network {
|
| 36 | 36 |
d.Lock() |
| 37 | 37 |
defer d.Unlock() |
| ... | ... |
@@ -46,7 +46,7 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, |
| 46 | 46 |
} |
| 47 | 47 |
v4gw, _, err := net.ParseCIDR(s.GwIP) |
| 48 | 48 |
if err != nil {
|
| 49 |
- return fmt.Errorf("gatway %s is not a valid ipv4 address: %v", s.GwIP, err)
|
|
| 49 |
+ return fmt.Errorf("gateway %s is not a valid ipv4 address: %v", s.GwIP, err)
|
|
| 50 | 50 |
} |
| 51 | 51 |
err = jinfo.SetGateway(v4gw) |
| 52 | 52 |
if err != nil {
|
| ... | ... |
@@ -63,7 +63,7 @@ func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, |
| 63 | 63 |
} |
| 64 | 64 |
v6gw, _, err := net.ParseCIDR(s.GwIP) |
| 65 | 65 |
if err != nil {
|
| 66 |
- return fmt.Errorf("gatway %s is not a valid ipv6 address: %v", s.GwIP, err)
|
|
| 66 |
+ return fmt.Errorf("gateway %s is not a valid ipv6 address: %v", s.GwIP, err)
|
|
| 67 | 67 |
} |
| 68 | 68 |
err = jinfo.SetGatewayIPv6(v6gw) |
| 69 | 69 |
if err != nil {
|
| ... | ... |
@@ -72,7 +72,7 @@ func (d *driver) CreateNetwork(nid string, option map[string]interface{}, nInfo
|
| 72 | 72 |
err = d.storeUpdate(config) |
| 73 | 73 |
if err != nil {
|
| 74 | 74 |
d.deleteNetwork(config.ID) |
| 75 |
- logrus.Debugf("encoutered an error rolling back a network create for %s : %v", config.ID, err)
|
|
| 75 |
+ logrus.Debugf("encountered an error rolling back a network create for %s : %v", config.ID, err)
|
|
| 76 | 76 |
return err |
| 77 | 77 |
} |
| 78 | 78 |
|
| ... | ... |
@@ -96,7 +96,7 @@ func (d *driver) createNetwork(config *configuration) error {
|
| 96 | 96 |
return err |
| 97 | 97 |
} |
| 98 | 98 |
config.CreatedSlaveLink = true |
| 99 |
- // notify the user in logs they have limited comunicatins |
|
| 99 |
+ // notify the user in logs they have limited communications |
|
| 100 | 100 |
if config.Parent == getDummyName(stringid.TruncateID(config.ID)) {
|
| 101 | 101 |
logrus.Debugf("Empty -o parent= and --internal flags limit communications to other containers inside of network: %s",
|
| 102 | 102 |
config.Parent) |
| ... | ... |
@@ -30,7 +30,7 @@ func createMacVlan(containerIfName, parent, macvlanMode string) (string, error) |
| 30 | 30 |
// Get the link for the master index (Example: the docker host eth iface) |
| 31 | 31 |
parentLink, err := ns.NlHandle().LinkByName(parent) |
| 32 | 32 |
if err != nil {
|
| 33 |
- return "", fmt.Errorf("error occoured looking up the %s parent iface %s error: %s", macvlanType, parent, err)
|
|
| 33 |
+ return "", fmt.Errorf("error occurred looking up the %s parent iface %s error: %s", macvlanType, parent, err)
|
|
| 34 | 34 |
} |
| 35 | 35 |
// Create a macvlan link |
| 36 | 36 |
macvlan := &netlink.Macvlan{
|
| ... | ... |
@@ -173,7 +173,7 @@ func createDummyLink(dummyName, truncNetID string) error {
|
| 173 | 173 |
} |
| 174 | 174 |
parentDummyLink, err := ns.NlHandle().LinkByName(dummyName) |
| 175 | 175 |
if err != nil {
|
| 176 |
- return fmt.Errorf("error occoured looking up the %s parent iface %s error: %s", macvlanType, dummyName, err)
|
|
| 176 |
+ return fmt.Errorf("error occurred looking up the %s parent iface %s error: %s", macvlanType, dummyName, err)
|
|
| 177 | 177 |
} |
| 178 | 178 |
// bring the new netlink iface up |
| 179 | 179 |
if err := ns.NlHandle().LinkSetUp(parentDummyLink); err != nil {
|
| ... | ... |
@@ -601,7 +601,7 @@ func (n *network) maxMTU() int {
|
| 601 | 601 |
mtu -= vxlanEncap |
| 602 | 602 |
if n.secure {
|
| 603 | 603 |
// In case of encryption account for the |
| 604 |
- // esp packet espansion and padding |
|
| 604 |
+ // esp packet expansion and padding |
|
| 605 | 605 |
mtu -= pktExpansion |
| 606 | 606 |
mtu -= (mtu % 4) |
| 607 | 607 |
} |
| ... | ... |
@@ -115,11 +115,11 @@ func TestOverlayConfig(t *testing.T) {
|
| 115 | 115 |
|
| 116 | 116 |
d := dt.d |
| 117 | 117 |
if d.notifyCh == nil {
|
| 118 |
- t.Fatal("Driver notify channel wasn't initialzed after Config method")
|
|
| 118 |
+ t.Fatal("Driver notify channel wasn't initialized after Config method")
|
|
| 119 | 119 |
} |
| 120 | 120 |
|
| 121 | 121 |
if d.exitCh == nil {
|
| 122 |
- t.Fatal("Driver serfloop exit channel wasn't initialzed after Config method")
|
|
| 122 |
+ t.Fatal("Driver serfloop exit channel wasn't initialized after Config method")
|
|
| 123 | 123 |
} |
| 124 | 124 |
|
| 125 | 125 |
if d.serfInstance == nil {
|
| ... | ... |
@@ -150,7 +150,7 @@ type JoinRequest struct {
|
| 150 | 150 |
Options map[string]interface{}
|
| 151 | 151 |
} |
| 152 | 152 |
|
| 153 |
-// InterfaceName is the struct represetation of a pair of devices with source |
|
| 153 |
+// InterfaceName is the struct representation of a pair of devices with source |
|
| 154 | 154 |
// and destination, for the purposes of putting an endpoint into a container. |
| 155 | 155 |
type InterfaceName struct {
|
| 156 | 156 |
SrcName string |
| ... | ... |
@@ -54,7 +54,7 @@ type IPAMNotifyFunc func(name string, driver ipamapi.Ipam, cap *ipamapi.Capabili |
| 54 | 54 |
// DriverNotifyFunc defines the notify function signature when a new network driver gets registered. |
| 55 | 55 |
type DriverNotifyFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) error |
| 56 | 56 |
|
| 57 |
-// New retruns a new driver registry handle. |
|
| 57 |
+// New returns a new driver registry handle. |
|
| 58 | 58 |
func New(lDs, gDs interface{}, dfn DriverNotifyFunc, ifn IPAMNotifyFunc, pg plugingetter.PluginGetter) (*DrvRegistry, error) {
|
| 59 | 59 |
r := &DrvRegistry{
|
| 60 | 60 |
drivers: make(driverTable), |
| ... | ... |
@@ -1104,7 +1104,7 @@ func TestRelease(t *testing.T) {
|
| 1104 | 1104 |
{"192.168.1.254"},
|
| 1105 | 1105 |
} |
| 1106 | 1106 |
|
| 1107 |
- // One by one, relase the address and request again. We should get the same IP |
|
| 1107 |
+ // One by one, release the address and request again. We should get the same IP |
|
| 1108 | 1108 |
for i, inp := range toRelease {
|
| 1109 | 1109 |
ip0 := net.ParseIP(inp.address) |
| 1110 | 1110 |
a.ReleaseAddress(pid, ip0) |
| ... | ... |
@@ -477,7 +477,7 @@ func raw(args ...string) ([]byte, error) {
|
| 477 | 477 |
return filterOutput(startTime, output, args...), err |
| 478 | 478 |
} |
| 479 | 479 |
|
| 480 |
-// RawCombinedOutput inernally calls the Raw function and returns a non nil |
|
| 480 |
+// RawCombinedOutput internally calls the Raw function and returns a non nil |
|
| 481 | 481 |
// error if Raw returned a non nil error or a non empty output |
| 482 | 482 |
func RawCombinedOutput(args ...string) error {
|
| 483 | 483 |
if output, err := Raw(args...); err != nil || len(output) != 0 {
|
| ... | ... |
@@ -100,7 +100,7 @@ func fillService(s *Service) nl.NetlinkRequestData {
|
| 100 | 100 |
return cmdAttr |
| 101 | 101 |
} |
| 102 | 102 |
|
| 103 |
-func fillDestinaton(d *Destination) nl.NetlinkRequestData {
|
|
| 103 |
+func fillDestination(d *Destination) nl.NetlinkRequestData {
|
|
| 104 | 104 |
cmdAttr := nl.NewRtAttr(ipvsCmdAttrDest, nil) |
| 105 | 105 |
|
| 106 | 106 |
nl.NewRtAttrChild(cmdAttr, ipvsDestAttrAddress, rawIPData(d.Address)) |
| ... | ... |
@@ -134,7 +134,7 @@ func (i *Handle) doCmdwithResponse(s *Service, d *Destination, cmd uint8) ([][]b |
| 134 | 134 |
} |
| 135 | 135 |
|
| 136 | 136 |
} else {
|
| 137 |
- req.AddData(fillDestinaton(d)) |
|
| 137 |
+ req.AddData(fillDestination(d)) |
|
| 138 | 138 |
} |
| 139 | 139 |
|
| 140 | 140 |
res, err := execute(i.sock, req, 0) |
| ... | ... |
@@ -1410,12 +1410,12 @@ func TestValidRemoteDriver(t *testing.T) {
|
| 1410 | 1410 |
} |
| 1411 | 1411 |
|
| 1412 | 1412 |
var ( |
| 1413 |
- once sync.Once |
|
| 1414 |
- start = make(chan struct{})
|
|
| 1415 |
- done = make(chan chan struct{}, numThreads-1)
|
|
| 1416 |
- origns = netns.None() |
|
| 1417 |
- testns = netns.None() |
|
| 1418 |
- sboxes = make([]libnetwork.Sandbox, numThreads) |
|
| 1413 |
+ once sync.Once |
|
| 1414 |
+ start = make(chan struct{})
|
|
| 1415 |
+ done = make(chan chan struct{}, numThreads-1)
|
|
| 1416 |
+ origins = netns.None() |
|
| 1417 |
+ testns = netns.None() |
|
| 1418 |
+ sboxes = make([]libnetwork.Sandbox, numThreads) |
|
| 1419 | 1419 |
) |
| 1420 | 1420 |
|
| 1421 | 1421 |
const ( |
| ... | ... |
@@ -1430,13 +1430,13 @@ func createGlobalInstance(t *testing.T) {
|
| 1430 | 1430 |
var err error |
| 1431 | 1431 |
defer close(start) |
| 1432 | 1432 |
|
| 1433 |
- origns, err = netns.Get() |
|
| 1433 |
+ origins, err = netns.Get() |
|
| 1434 | 1434 |
if err != nil {
|
| 1435 | 1435 |
t.Fatal(err) |
| 1436 | 1436 |
} |
| 1437 | 1437 |
|
| 1438 | 1438 |
if testutils.IsRunningInContainer() {
|
| 1439 |
- testns = origns |
|
| 1439 |
+ testns = origins |
|
| 1440 | 1440 |
} else {
|
| 1441 | 1441 |
testns, err = netns.New() |
| 1442 | 1442 |
if err != nil {
|
| ... | ... |
@@ -12,7 +12,7 @@ import ( |
| 12 | 12 |
"github.com/vishvananda/netlink" |
| 13 | 13 |
) |
| 14 | 14 |
|
| 15 |
-func TestNonOverlapingNameservers(t *testing.T) {
|
|
| 15 |
+func TestNonOverlappingNameservers(t *testing.T) {
|
|
| 16 | 16 |
network := &net.IPNet{
|
| 17 | 17 |
IP: []byte{192, 168, 0, 1},
|
| 18 | 18 |
Mask: []byte{255, 255, 255, 0},
|
| ... | ... |
@@ -26,7 +26,7 @@ func TestNonOverlapingNameservers(t *testing.T) {
|
| 26 | 26 |
} |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
-func TestOverlapingNameservers(t *testing.T) {
|
|
| 29 |
+func TestOverlappingNameservers(t *testing.T) {
|
|
| 30 | 30 |
network := &net.IPNet{
|
| 31 | 31 |
IP: []byte{192, 168, 0, 1},
|
| 32 | 32 |
Mask: []byte{255, 255, 255, 0},
|
| ... | ... |
@@ -260,7 +260,7 @@ func TestNetworkRequest(t *testing.T) {
|
| 260 | 260 |
t.Fatal(err) |
| 261 | 261 |
} |
| 262 | 262 |
if !types.CompareIPNet(exp, nw) {
|
| 263 |
- t.Fatalf("exected %s. got %s", exp, nw)
|
|
| 263 |
+ t.Fatalf("expected %s. got %s", exp, nw)
|
|
| 264 | 264 |
} |
| 265 | 265 |
} |
| 266 | 266 |
|
| ... | ... |
@@ -88,7 +88,7 @@ type NetworkInfo interface {
|
| 88 | 88 |
type EndpointWalker func(ep Endpoint) bool |
| 89 | 89 |
|
| 90 | 90 |
// ipInfo is the reverse mapping from IP to service name to serve the PTR query. |
| 91 |
-// extResolver is set if an externl server resolves a service name to this IP. |
|
| 91 |
+// extResolver is set if an external server resolves a service name to this IP. |
|
| 92 | 92 |
// Its an indication to defer PTR queries also to that external server. |
| 93 | 93 |
type ipInfo struct {
|
| 94 | 94 |
name string |
| ... | ... |
@@ -1654,7 +1654,7 @@ func (n *network) ipamAllocateVersion(ipVer int, ipam ipamapi.Ipam) error {
|
| 1654 | 1654 |
return types.BadRequestErrorf("non parsable secondary ip address (%s:%s) passed for network %s", k, v, n.Name())
|
| 1655 | 1655 |
} |
| 1656 | 1656 |
if !d.Pool.Contains(ip) {
|
| 1657 |
- return types.ForbiddenErrorf("auxilairy address: (%s:%s) must belong to the master pool: %s", k, v, d.Pool)
|
|
| 1657 |
+ return types.ForbiddenErrorf("auxiliary address: (%s:%s) must belong to the master pool: %s", k, v, d.Pool)
|
|
| 1658 | 1658 |
} |
| 1659 | 1659 |
// Attempt reservation in the container addressable pool, silent the error if address does not belong to that pool |
| 1660 | 1660 |
if d.IPAMData.AuxAddresses[k], _, err = ipam.RequestAddress(d.PoolID, ip, nil); err != nil && err != ipamapi.ErrIPOutOfRange {
|
| ... | ... |
@@ -2036,7 +2036,7 @@ func (n *network) ResolveService(name string) ([]*net.SRV, []net.IP) {
|
| 2036 | 2036 |
|
| 2037 | 2037 |
logrus.Debugf("Service name To resolve: %v", name)
|
| 2038 | 2038 |
|
| 2039 |
- // There are DNS implementaions that allow SRV queries for names not in |
|
| 2039 |
+ // There are DNS implementations that allow SRV queries for names not in |
|
| 2040 | 2040 |
// the format defined by RFC 2782. Hence specific validations checks are |
| 2041 | 2041 |
// not done |
| 2042 | 2042 |
parts := strings.Split(name, ".") |
| ... | ... |
@@ -243,7 +243,7 @@ func (nDB *NetworkDB) clusterLeave() error {
|
| 243 | 243 |
} |
| 244 | 244 |
|
| 245 | 245 |
func (nDB *NetworkDB) triggerFunc(stagger time.Duration, C <-chan time.Time, f func()) {
|
| 246 |
- // Use a random stagger to avoid syncronizing |
|
| 246 |
+ // Use a random stagger to avoid synchronizing |
|
| 247 | 247 |
randStagger := time.Duration(uint64(rnd.Int63()) % uint64(stagger)) |
| 248 | 248 |
select {
|
| 249 | 249 |
case <-time.After(randStagger): |
| ... | ... |
@@ -58,7 +58,7 @@ type NetworkDB struct {
|
| 58 | 58 |
// List of all peer nodes which have left |
| 59 | 59 |
leftNodes map[string]*node |
| 60 | 60 |
|
| 61 |
- // A multi-dimensional map of network/node attachmemts. The |
|
| 61 |
+ // A multi-dimensional map of network/node attachments. The |
|
| 62 | 62 |
// first key is a node name and the second key is a network ID |
| 63 | 63 |
// for the network that node is participating in. |
| 64 | 64 |
networks map[string]map[string]*network |
| ... | ... |
@@ -153,7 +153,7 @@ type network struct {
|
| 153 | 153 |
entriesNumber int |
| 154 | 154 |
} |
| 155 | 155 |
|
| 156 |
-// Config represents the configuration of the networdb instance and |
|
| 156 |
+// Config represents the configuration of the networkdb instance and |
|
| 157 | 157 |
// can be passed by the caller. |
| 158 | 158 |
type Config struct {
|
| 159 | 159 |
// NodeID is the node unique identifier of the node when is part of the cluster |
| ... | ... |
@@ -48,7 +48,7 @@ type MessageType int32 |
| 48 | 48 |
|
| 49 | 49 |
const ( |
| 50 | 50 |
MessageTypeInvalid MessageType = 0 |
| 51 |
- // NetworEvent message type is used to communicate network |
|
| 51 |
+ // NetworkEvent message type is used to communicate network |
|
| 52 | 52 |
// attachments on the node. |
| 53 | 53 |
MessageTypeNetworkEvent MessageType = 1 |
| 54 | 54 |
// TableEvent message type is used to communicate any table |
| ... | ... |
@@ -66,7 +66,7 @@ const ( |
| 66 | 66 |
// which is a pack of many message of above types, packed into |
| 67 | 67 |
// a single compound message. |
| 68 | 68 |
MessageTypeCompound MessageType = 5 |
| 69 |
- // NodeEvent message type is used to communicare node |
|
| 69 |
+ // NodeEvent message type is used to communicate node |
|
| 70 | 70 |
// join/leave events in the cluster |
| 71 | 71 |
MessageTypeNodeEvent MessageType = 6 |
| 72 | 72 |
) |
| ... | ... |
@@ -19,7 +19,7 @@ enum MessageType {
|
| 19 | 19 |
|
| 20 | 20 |
INVALID = 0 [(gogoproto.enumvalue_customname) = "MessageTypeInvalid"]; |
| 21 | 21 |
|
| 22 |
- // NetworEvent message type is used to communicate network |
|
| 22 |
+ // NetworkEvent message type is used to communicate network |
|
| 23 | 23 |
// attachments on the node. |
| 24 | 24 |
NETWORK_EVENT = 1 [(gogoproto.enumvalue_customname) = "MessageTypeNetworkEvent"]; |
| 25 | 25 |
|
| ... | ... |
@@ -42,7 +42,7 @@ enum MessageType {
|
| 42 | 42 |
// a single compound message. |
| 43 | 43 |
COMPOUND = 5 [(gogoproto.enumvalue_customname) = "MessageTypeCompound"]; |
| 44 | 44 |
|
| 45 |
- // NodeEvent message type is used to communicare node |
|
| 45 |
+ // NodeEvent message type is used to communicate node |
|
| 46 | 46 |
// join/leave events in the cluster |
| 47 | 47 |
NODE_EVENT = 6 [(gogoproto.enumvalue_customname) = "MessageTypeNodeEvent"]; |
| 48 | 48 |
} |
| ... | ... |
@@ -119,7 +119,7 @@ func newInfo(hnd *netlink.Handle, t *testing.T) (Sandbox, error) {
|
| 119 | 119 |
func verifySandbox(t *testing.T, s Sandbox, ifaceSuffixes []string) {
|
| 120 | 120 |
_, ok := s.(*networkNamespace) |
| 121 | 121 |
if !ok {
|
| 122 |
- t.Fatalf("The sandox interface returned is not of type networkNamespace")
|
|
| 122 |
+ t.Fatalf("The sandbox interface returned is not of type networkNamespace")
|
|
| 123 | 123 |
} |
| 124 | 124 |
|
| 125 | 125 |
sbNs, err := netns.GetFromPath(s.Key()) |
| ... | ... |
@@ -35,7 +35,7 @@ type Resolver interface {
|
| 35 | 35 |
} |
| 36 | 36 |
|
| 37 | 37 |
// DNSBackend represents a backend DNS resolver used for DNS name |
| 38 |
-// resolution. All the queries to the resolver are forwared to the |
|
| 38 |
+// resolution. All the queries to the resolver are forwarded to the |
|
| 39 | 39 |
// backend resolver. |
| 40 | 40 |
type DNSBackend interface {
|
| 41 | 41 |
// ResolveName resolves a service name to an IPv4 or IPv6 address by searching |
| ... | ... |
@@ -467,7 +467,7 @@ func (sb *sandbox) ResolveService(name string) ([]*net.SRV, []net.IP) {
|
| 467 | 467 |
|
| 468 | 468 |
logrus.Debugf("Service name To resolve: %v", name)
|
| 469 | 469 |
|
| 470 |
- // There are DNS implementaions that allow SRV queries for names not in |
|
| 470 |
+ // There are DNS implementations that allow SRV queries for names not in |
|
| 471 | 471 |
// the format defined by RFC 2782. Hence specific validations checks are |
| 472 | 472 |
// not done |
| 473 | 473 |
parts := strings.Split(name, ".") |
| ... | ... |
@@ -241,7 +241,7 @@ func (sb *sandbox) setupDNS() error {
|
| 241 | 241 |
sb.setExternalResolvers(newRC.Content, types.IPv4, false) |
| 242 | 242 |
} else {
|
| 243 | 243 |
// If the host resolv.conf file has 127.0.0.x container should |
| 244 |
- // use the host restolver for queries. This is supported by the |
|
| 244 |
+ // use the host resolver for queries. This is supported by the |
|
| 245 | 245 |
// docker embedded DNS server. Hence save the external resolvers |
| 246 | 246 |
// before filtering it out. |
| 247 | 247 |
sb.setExternalResolvers(currRC.Content, types.IPv4, true) |
| ... | ... |
@@ -27,7 +27,7 @@ import ( |
| 27 | 27 |
|
| 28 | 28 |
func init() {
|
| 29 | 29 |
reexec.Register("fwmarker", fwMarker)
|
| 30 |
- reexec.Register("redirecter", redirecter)
|
|
| 30 |
+ reexec.Register("redirector", redirector)
|
|
| 31 | 31 |
} |
| 32 | 32 |
|
| 33 | 33 |
// Populate all loadbalancers on the network that the passed endpoint |
| ... | ... |
@@ -431,7 +431,7 @@ func programIngress(gwIP net.IP, ingressPorts []*PortConfig, isDelete bool) erro |
| 431 | 431 |
// DOCKER-USER so the user is able to filter packet first. |
| 432 | 432 |
// The second rule should be jump to INGRESS-CHAIN. |
| 433 | 433 |
// This chain has the rules to allow access to the published ports for swarm tasks |
| 434 |
-// from local bridge networks and docker_gwbridge (ie:taks on other swarm netwroks) |
|
| 434 |
+// from local bridge networks and docker_gwbridge (ie:taks on other swarm networks) |
|
| 435 | 435 |
func arrangeIngressFilterRule() {
|
| 436 | 436 |
if iptables.ExistChain(ingressChain, iptables.Filter) {
|
| 437 | 437 |
if iptables.Exists(iptables.Filter, "FORWARD", "-j", ingressChain) {
|
| ... | ... |
@@ -668,7 +668,7 @@ func addRedirectRules(path string, eIP *net.IPNet, ingressPorts []*PortConfig) e |
| 668 | 668 |
|
| 669 | 669 |
cmd := &exec.Cmd{
|
| 670 | 670 |
Path: reexec.Self(), |
| 671 |
- Args: append([]string{"redirecter"}, path, eIP.String(), ingressPortsFile),
|
|
| 671 |
+ Args: append([]string{"redirector"}, path, eIP.String(), ingressPortsFile),
|
|
| 672 | 672 |
Stdout: os.Stdout, |
| 673 | 673 |
Stderr: os.Stderr, |
| 674 | 674 |
} |
| ... | ... |
@@ -680,8 +680,8 @@ func addRedirectRules(path string, eIP *net.IPNet, ingressPorts []*PortConfig) e |
| 680 | 680 |
return nil |
| 681 | 681 |
} |
| 682 | 682 |
|
| 683 |
-// Redirecter reexec function. |
|
| 684 |
-func redirecter() {
|
|
| 683 |
+// Redirector reexec function. |
|
| 684 |
+func redirector() {
|
|
| 685 | 685 |
runtime.LockOSThread() |
| 686 | 686 |
defer runtime.UnlockOSThread() |
| 687 | 687 |
|
| ... | ... |
@@ -289,17 +289,17 @@ function test_single_network_connectivity() {
|
| 289 | 289 |
echo $(docker ps) |
| 290 | 290 |
dnet_cmd $(inst_id2port 1) network create -d bridge --internal internal |
| 291 | 291 |
dnet_cmd $(inst_id2port 1) container create container_1 |
| 292 |
- # connects to internal network, confirm it can't conmunicate with outside world |
|
| 292 |
+ # connects to internal network, confirm it can't communicate with outside world |
|
| 293 | 293 |
net_connect 1 container_1 internal |
| 294 | 294 |
run runc $(dnet_container_name 1 bridge) $(get_sbox_id 1 container_1) "ping -c 1 8.8.8.8" |
| 295 | 295 |
[[ "$output" == *"1 packets transmitted, 0 packets received, 100% packet loss"* ]] |
| 296 | 296 |
net_disconnect 1 container_1 internal |
| 297 |
- # connects to bridge network, confirm it can conmunicate with outside world |
|
| 297 |
+ # connects to bridge network, confirm it can communicate with outside world |
|
| 298 | 298 |
net_connect 1 container_1 bridge |
| 299 | 299 |
runc $(dnet_container_name 1 bridge) $(get_sbox_id 1 container_1) "ping -c 1 8.8.8.8" |
| 300 | 300 |
net_disconnect 1 container_1 bridge |
| 301 | 301 |
dnet_cmd $(inst_id2port 1) container rm container_1 |
| 302 |
- # test conmunications within internal network |
|
| 302 |
+ # test communications within internal network |
|
| 303 | 303 |
test_single_network_connectivity internal 3 |
| 304 | 304 |
dnet_cmd $(inst_id2port 1) network rm internal |
| 305 | 305 |
} |