Skip to content

Commit bc85efd

Browse files
committed
fix nits in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
1 parent 176088a commit bc85efd

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

libnetwork/controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (c *controller) SetKeys(keys []*types.EncryptionKey) error {
273273
}
274274
for s, count := range subsysKeys {
275275
if count != keyringSize {
276-
return fmt.Errorf("incorrect number of keys for susbsystem %v", s)
276+
return fmt.Errorf("incorrect number of keys for subsystem %v", s)
277277
}
278278
}
279279

@@ -582,7 +582,7 @@ func (c *controller) pushNodeDiscovery(d driverapi.Driver, cap driverapi.Capabil
582582
err = d.DiscoverDelete(discoverapi.NodeDiscovery, nodeData)
583583
}
584584
if err != nil {
585-
logrus.Debugf("discovery notification error : %v", err)
585+
logrus.Debugf("discovery notification error: %v", err)
586586
}
587587
}
588588
}
@@ -997,7 +997,7 @@ func (c *controller) NewSandbox(containerID string, options ...SandboxOption) (s
997997

998998
err = sb.storeUpdate()
999999
if err != nil {
1000-
return nil, fmt.Errorf("updating the store state of sandbox failed: %v", err)
1000+
return nil, fmt.Errorf("failed to update the store state of sandbox: %v", err)
10011001
}
10021002

10031003
return sb, nil

libnetwork/docs/macvlan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ There are positive performance implication as a result of bypassing the Linux br
3838

3939
- The driver limits one network per parent interface. The driver does however accommodate secondary subnets to be allocated in a single Docker network for a multi-subnet requirement. The upstream router is responsible for proxy-arping between the two subnets.
4040

41-
- Any Macvlan container sharing the same subnet can communicate via IP to any other container in the same subnet without a gateway. It is important to note, that the parent will go into promiscuous mode when a container is attached to the parent since each container has a unique MAC address. Alternatively, Ipvlan which is currently a experimental driver uses the same MAC address as the parent interface and thus precluding the need for the parent being promiscuous.
41+
- Any Macvlan container sharing the same subnet can communicate via IP to any other container in the same subnet without a gateway. It is important to note, that the parent will go into promiscuous mode when a container is attached to the parent since each container has a unique MAC address. Alternatively, Ipvlan which is currently an experimental driver uses the same MAC address as the parent interface and thus precluding the need for the parent being promiscuous.
4242

4343
In the following example, `eth0` on the docker host has an IP on the `172.16.86.0/24` network and a default gateway of `172.16.86.1`. The gateway is an external router with an address of `172.16.86.1`. An IP address is not required on the Docker host interface `eth0` in `bridge` mode, it merely needs to be on the proper upstream network to get forwarded by a network switch or network router.
4444

@@ -150,7 +150,7 @@ In the case of a host reboot, instead of needing to modify often complex network
150150

151151
The same holds true if the network is deleted `docker network rm`. If driver created the sub-interface with `docker network create` it will remove the sub-interface link for the operator.
152152

153-
If the user doesn't want Docker to create and delete the `-o parent` sub-interface, then you simply pass a interface that already exists as the parent link. Parent interfaces such as `eth0` are not deleted, only interfaces that are slave links.
153+
If the user doesn't want Docker to create and delete the `-o parent` sub-interface, then you simply pass an interface that already exists as the parent link. Parent interfaces such as `eth0` are not deleted, only interfaces that are slave links.
154154

155155
For the driver to add/delete the vlan sub-interfaces the format needs to be `-o parent interface_name.vlan_tag`.
156156

libnetwork/driverapi/driverapi.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type Driver interface {
6262
// programming to allow the external connectivity dictated by the passed options
6363
ProgramExternalConnectivity(nid, eid string, options map[string]interface{}) error
6464

65-
// RevokeExternalConnectivity aks the driver to remove any external connectivity
65+
// RevokeExternalConnectivity asks the driver to remove any external connectivity
6666
// programming that was done so far
6767
RevokeExternalConnectivity(nid, eid string) error
6868

@@ -72,7 +72,7 @@ type Driver interface {
7272
// only invoked for the global scope driver.
7373
EventNotify(event EventType, nid string, tableName string, key string, value []byte)
7474

75-
// Type returns the the type of this driver, the network type this driver manages
75+
// Type returns the type of this driver, the network type this driver manages
7676
Type() string
7777

7878
// IsBuiltIn returns true if it is a built-in driver

libnetwork/drivers/windows/overlay/peerdb_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (d *driver) peerAdd(nid, eid string, peerIP net.IP, peerIPMask net.IPMask,
8181
return err
8282
}
8383

84-
// Temp: We have to create a endpoint object to keep track of the HNS ID for
84+
// Temp: We have to create an endpoint object to keep track of the HNS ID for
8585
// this endpoint so that we can retrieve it later when the endpoint is deleted.
8686
// This seems unnecessary when we already have dockers EID. See if we can pass
8787
// the global EID to HNS to use as it's ID, rather than having each HNS assign

libnetwork/libnetwork_linux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func TestEndpointJoin(t *testing.T) {
318318
}
319319

320320
if info.Sandbox() == nil {
321-
t.Fatalf("Expected an non-empty sandbox key for a joined endpoint. Instead found a empty sandbox key")
321+
t.Fatalf("Expected an non-empty sandbox key for a joined endpoint. Instead found an empty sandbox key")
322322
}
323323

324324
// Check endpoint provided container information

libnetwork/sandbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type Sandbox interface {
4545
// EnableService makes a managed container's service available by adding the
4646
// endpoint to the service load balancer and service discovery
4747
EnableService() error
48-
// DisableService removes a managed contianer's endpoints from the load balancer
48+
// DisableService removes a managed container's endpoints from the load balancer
4949
// and service discovery
5050
DisableService() error
5151
}

0 commit comments

Comments
 (0)