Browse code

fix typo in comments and log

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2016/07/30 03:21:10
Showing 5 changed files
... ...
@@ -97,7 +97,7 @@ type NetworkController interface {
97 97
 	// Sandboxes returns the list of Sandbox(s) managed by this controller.
98 98
 	Sandboxes() []Sandbox
99 99
 
100
-	// WlakSandboxes uses the provided function to walk the Sandbox(s) managed by this controller.
100
+	// WalkSandboxes uses the provided function to walk the Sandbox(s) managed by this controller.
101 101
 	WalkSandboxes(walker SandboxWalker)
102 102
 
103 103
 	// SandboxByID returns the Sandbox which has the passed id. If not found, a types.NotFoundError is returned.
... ...
@@ -14,7 +14,7 @@ const (
14 14
 var procGwNetwork = make(chan (bool), 1)
15 15
 
16 16
 /*
17
-   libnetwork creates a bridge network "docker_gw_bridge" for provding
17
+   libnetwork creates a bridge network "docker_gw_bridge" for providing
18 18
    default gateway for the containers if none of the container's endpoints
19 19
    have GW set by the driver. ICC is set to false for the GW_bridge network.
20 20
 
... ...
@@ -29,7 +29,7 @@ var procGwNetwork = make(chan (bool), 1)
29 29
 
30 30
 func (sb *sandbox) setupDefaultGW() error {
31 31
 
32
-	// check if the conitainer already has a GW endpoint
32
+	// check if the container already has a GW endpoint
33 33
 	if ep := sb.getEndpointInGWNetwork(); ep != nil {
34 34
 		return nil
35 35
 	}
... ...
@@ -564,7 +564,7 @@ func (d *driver) CreateNetwork(id string, option map[string]interface{}, nInfo d
564 564
 	}
565 565
 	d.Unlock()
566 566
 
567
-	// Parse and validate the config. It should not conflict with existing networks' config
567
+	// Parse and validate the config. It should not be conflict with existing networks' config
568 568
 	config, err := parseNetworkOptions(id, option)
569 569
 	if err != nil {
570 570
 		return err
... ...
@@ -1206,7 +1206,7 @@ func (n *network) requestPoolHelper(ipam ipamapi.Ipam, addressSpace, preferredPo
1206 1206
 		}()
1207 1207
 
1208 1208
 		// If this is a preferred pool request and the network
1209
-		// is local scope and there is a overlap, we fail the
1209
+		// is local scope and there is an overlap, we fail the
1210 1210
 		// network creation right here. The pool will be
1211 1211
 		// released in the defer.
1212 1212
 		if preferredPool != "" {
... ...
@@ -316,7 +316,7 @@ func (sb *sandbox) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*P
316 316
 
317 317
 	i, err := ipvs.New(sb.Key())
318 318
 	if err != nil {
319
-		logrus.Errorf("Failed to create a ipvs handle for sbox %s: %v", sb.Key(), err)
319
+		logrus.Errorf("Failed to create an ipvs handle for sbox %s: %v", sb.Key(), err)
320 320
 		return
321 321
 	}
322 322
 	defer i.Close()
... ...
@@ -371,7 +371,7 @@ func (sb *sandbox) rmLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*Po
371 371
 
372 372
 	i, err := ipvs.New(sb.Key())
373 373
 	if err != nil {
374
-		logrus.Errorf("Failed to create a ipvs handle for sbox %s: %v", sb.Key(), err)
374
+		logrus.Errorf("Failed to create an ipvs handle for sbox %s: %v", sb.Key(), err)
375 375
 		return
376 376
 	}
377 377
 	defer i.Close()