Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
2a6c7a1e
Commit
2a6c7a1e
authored
Sep 30, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14715 from zhengguoyong/capital
set capital in some glog files
parents
3337093e
4c588d77
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
31 additions
and
31 deletions
+31
-31
kube2sky.go
cluster/addons/dns/kube2sky/kube2sky.go
+1
-1
etcd_master.go
contrib/mesos/pkg/election/etcd_master.go
+1
-1
suicide_test.go
contrib/mesos/pkg/executor/suicide_test.go
+6
-6
publish.go
contrib/mesos/pkg/scheduler/service/publish.go
+1
-1
endpoints_controller.go
contrib/mesos/pkg/service/endpoints_controller.go
+1
-1
merged_client_builder.go
pkg/client/unversioned/clientcmd/merged_client_builder.go
+1
-1
helper.go
pkg/client/unversioned/helper.go
+1
-1
request.go
pkg/client/unversioned/request.go
+2
-2
aws.go
pkg/cloudprovider/providers/aws/aws.go
+11
-11
gce.go
pkg/cloudprovider/providers/gce/gce.go
+1
-1
factory.go
plugin/pkg/scheduler/factory/factory.go
+2
-2
plugins.go
plugin/pkg/scheduler/factory/plugins.go
+1
-1
generic_scheduler.go
plugin/pkg/scheduler/generic_scheduler.go
+2
-2
No files found.
cluster/addons/dns/kube2sky/kube2sky.go
View file @
2a6c7a1e
...
...
@@ -336,7 +336,7 @@ func (ks *kube2sky) generateSRVRecord(subdomain, portSegment, recordName, cName
func
(
ks
*
kube2sky
)
addDNS
(
subdomain
string
,
service
*
kapi
.
Service
)
error
{
if
len
(
service
.
Spec
.
Ports
)
==
0
{
glog
.
Fatalf
(
"
u
nexpected service with no ports: %v"
,
service
)
glog
.
Fatalf
(
"
U
nexpected service with no ports: %v"
,
service
)
}
// if ClusterIP is not set, a DNS entry should not be created
if
!
kapi
.
IsServiceIPSet
(
service
)
{
...
...
contrib/mesos/pkg/election/etcd_master.go
View file @
2a6c7a1e
...
...
@@ -71,7 +71,7 @@ func (e *etcdMasterElector) run(path, id string) {
Object
:
Master
(
m
),
}
case
e
:=
<-
errors
:
glog
.
Errorf
(
"
e
rror in election: %v"
,
e
)
glog
.
Errorf
(
"
E
rror in election: %v"
,
e
)
}
}
}
...
...
contrib/mesos/pkg/executor/suicide_test.go
View file @
2a6c7a1e
...
...
@@ -57,7 +57,7 @@ func (t *suicideTracker) Next(d time.Duration, driver bindings.ExecutorDriver, f
func
(
t
*
suicideTracker
)
makeJumper
(
_
jumper
)
jumper
{
return
jumper
(
func
(
driver
bindings
.
ExecutorDriver
,
cancel
<-
chan
struct
{})
{
glog
.
Warningln
(
"
j
umping?!"
)
glog
.
Warningln
(
"
J
umping?!"
)
if
t
.
jumps
!=
nil
{
atomic
.
AddUint32
(
t
.
jumps
,
1
)
}
...
...
@@ -103,7 +103,7 @@ func TestSuicide_WithTasks(t *testing.T) {
k
.
tasks
[
"foo"
]
=
&
kuberTask
{}
// prevent suicide attempts from succeeding
// call reset with a nil timer
glog
.
Infoln
(
"
r
esetting suicide watch with 1 task"
)
glog
.
Infoln
(
"
R
esetting suicide watch with 1 task"
)
select
{
case
<-
k
.
resetSuicideWatch
(
nil
)
:
tracker
=
k
.
suicideWatch
.
(
*
suicideTracker
)
...
...
@@ -125,7 +125,7 @@ func TestSuicide_WithTasks(t *testing.T) {
suicideStart
:=
time
.
Now
()
// reset the suicide watch, which should actually start a timer now
glog
.
Infoln
(
"
r
esetting suicide watch with 0 tasks"
)
glog
.
Infoln
(
"
R
esetting suicide watch with 0 tasks"
)
select
{
case
<-
k
.
resetSuicideWatch
(
nil
)
:
tracker
=
k
.
suicideWatch
.
(
*
suicideTracker
)
...
...
@@ -147,7 +147,7 @@ func TestSuicide_WithTasks(t *testing.T) {
k
.
lock
.
Unlock
()
// reset the suicide watch, which should stop the existing timer
glog
.
Infoln
(
"
r
esetting suicide watch with 1 task"
)
glog
.
Infoln
(
"
R
esetting suicide watch with 1 task"
)
select
{
case
<-
k
.
resetSuicideWatch
(
nil
)
:
tracker
=
k
.
suicideWatch
.
(
*
suicideTracker
)
...
...
@@ -169,7 +169,7 @@ func TestSuicide_WithTasks(t *testing.T) {
k
.
lock
.
Unlock
()
// reset the suicide watch, which should reset a stopped timer
glog
.
Infoln
(
"
r
esetting suicide watch with 0 tasks"
)
glog
.
Infoln
(
"
R
esetting suicide watch with 0 tasks"
)
select
{
case
<-
k
.
resetSuicideWatch
(
nil
)
:
tracker
=
k
.
suicideWatch
.
(
*
suicideTracker
)
...
...
@@ -192,6 +192,6 @@ func TestSuicide_WithTasks(t *testing.T) {
if
j
:=
atomic
.
LoadUint32
(
&
jumps
);
j
!=
1
{
t
.
Fatalf
(
"expected 1 jumps instead of %d since stop was called"
,
j
)
}
else
{
glog
.
Infoln
(
"
j
umps verified"
)
// glog so we get a timestamp
glog
.
Infoln
(
"
J
umps verified"
)
// glog so we get a timestamp
}
}
contrib/mesos/pkg/scheduler/service/publish.go
View file @
2a6c7a1e
...
...
@@ -112,7 +112,7 @@ func (m *SchedulerServer) setEndpoints(serviceName string, ip net.IP, port int)
}
if
!
reflect
.
DeepEqual
(
e
.
Subsets
,
want
)
{
e
.
Subsets
=
want
glog
.
Infof
(
"
s
etting endpoints for master service %q to %#v"
,
serviceName
,
e
)
glog
.
Infof
(
"
S
etting endpoints for master service %q to %#v"
,
serviceName
,
e
)
_
,
err
=
createOrUpdate
(
e
)
return
err
}
...
...
contrib/mesos/pkg/service/endpoints_controller.go
View file @
2a6c7a1e
...
...
@@ -350,7 +350,7 @@ func (e *endpointController) syncService(key string) {
}
}
if
reflect
.
DeepEqual
(
currentEndpoints
.
Subsets
,
subsets
)
&&
reflect
.
DeepEqual
(
currentEndpoints
.
Labels
,
service
.
Labels
)
{
glog
.
V
(
5
)
.
Infof
(
"
e
ndpoints are equal for %s/%s, skipping update"
,
service
.
Namespace
,
service
.
Name
)
glog
.
V
(
5
)
.
Infof
(
"
E
ndpoints are equal for %s/%s, skipping update"
,
service
.
Namespace
,
service
.
Name
)
return
}
newEndpoints
:=
currentEndpoints
...
...
pkg/client/unversioned/clientcmd/merged_client_builder.go
View file @
2a6c7a1e
...
...
@@ -86,7 +86,7 @@ func (config DeferredLoadingClientConfig) ClientConfig() (*client.Config, error)
icc
:=
inClusterClientConfig
{}
defaultConfig
,
err
:=
DefaultClientConfig
.
ClientConfig
()
if
icc
.
Possible
()
&&
err
==
nil
&&
reflect
.
DeepEqual
(
mergedConfig
,
defaultConfig
)
{
glog
.
V
(
2
)
.
Info
(
"
n
o kubeconfig could be created, falling back to service account."
)
glog
.
V
(
2
)
.
Info
(
"
N
o kubeconfig could be created, falling back to service account."
)
return
icc
.
ClientConfig
()
}
...
...
pkg/client/unversioned/helper.go
View file @
2a6c7a1e
...
...
@@ -259,7 +259,7 @@ func InClusterConfig() (*Config, error) {
tlsClientConfig
:=
TLSClientConfig
{}
rootCAFile
:=
"/var/run/secrets/kubernetes.io/serviceaccount/"
+
api
.
ServiceAccountRootCAKey
if
_
,
err
:=
util
.
CertPoolFromFile
(
rootCAFile
);
err
!=
nil
{
glog
.
Errorf
(
"
e
xpected to load root CA config from %s, but got err: %v"
,
rootCAFile
,
err
)
glog
.
Errorf
(
"
E
xpected to load root CA config from %s, but got err: %v"
,
rootCAFile
,
err
)
}
else
{
tlsClientConfig
.
CAFile
=
rootCAFile
}
...
...
pkg/client/unversioned/request.go
View file @
2a6c7a1e
...
...
@@ -309,13 +309,13 @@ type versionToResourceToFieldMapping map[string]resourceTypeToFieldMapping
func
(
v
versionToResourceToFieldMapping
)
filterField
(
apiVersion
,
resourceType
,
field
,
value
string
)
(
newField
,
newValue
string
,
err
error
)
{
rMapping
,
ok
:=
v
[
apiVersion
]
if
!
ok
{
glog
.
Warningf
(
"
f
ield selector: %v - %v - %v - %v: need to check if this is versioned correctly."
,
apiVersion
,
resourceType
,
field
,
value
)
glog
.
Warningf
(
"
F
ield selector: %v - %v - %v - %v: need to check if this is versioned correctly."
,
apiVersion
,
resourceType
,
field
,
value
)
return
field
,
value
,
nil
}
newField
,
newValue
,
err
=
rMapping
.
filterField
(
resourceType
,
field
,
value
)
if
err
!=
nil
{
// This is only a warning until we find and fix all of the client's usages.
glog
.
Warningf
(
"
f
ield selector: %v - %v - %v - %v: need to check if this is versioned correctly."
,
apiVersion
,
resourceType
,
field
,
value
)
glog
.
Warningf
(
"
F
ield selector: %v - %v - %v - %v: need to check if this is versioned correctly."
,
apiVersion
,
resourceType
,
field
,
value
)
return
field
,
value
,
nil
}
return
newField
,
newValue
,
nil
...
...
pkg/cloudprovider/providers/aws/aws.go
View file @
2a6c7a1e
...
...
@@ -683,7 +683,7 @@ func isAlive(instance *ec2.Instance) bool {
case
"pending"
,
"running"
:
return
true
default
:
glog
.
Errorf
(
"
u
nknown EC2 instance state: %s"
,
stateName
)
glog
.
Errorf
(
"
U
nknown EC2 instance state: %s"
,
stateName
)
return
false
}
}
...
...
@@ -724,13 +724,13 @@ func (s *AWSCloud) getInstancesByRegex(regex string) ([]string, error) {
// Only return fully-ready instances when listing instances
// (vs a query by name, where we will return it if we find it)
if
orEmpty
(
instance
.
State
.
Name
)
==
"pending"
{
glog
.
V
(
2
)
.
Infof
(
"
s
kipping EC2 instance (pending): %s"
,
*
instance
.
InstanceId
)
glog
.
V
(
2
)
.
Infof
(
"
S
kipping EC2 instance (pending): %s"
,
*
instance
.
InstanceId
)
continue
}
privateDNSName
:=
orEmpty
(
instance
.
PrivateDnsName
)
if
privateDNSName
==
""
{
glog
.
V
(
2
)
.
Infof
(
"
s
kipping EC2 instance (no PrivateDNSName): %s"
,
glog
.
V
(
2
)
.
Infof
(
"
S
kipping EC2 instance (no PrivateDNSName): %s"
,
orEmpty
(
instance
.
InstanceId
))
continue
}
...
...
@@ -1514,7 +1514,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string, vpcID st
}
}
if
!
ignore
{
glog
.
Error
(
"
e
rror creating security group: "
,
err
)
glog
.
Error
(
"
E
rror creating security group: "
,
err
)
return
""
,
err
}
time
.
Sleep
(
1
*
time
.
Second
)
...
...
@@ -1617,7 +1617,7 @@ func (s *AWSCloud) EnsureTCPLoadBalancer(name, region string, publicIP net.IP, p
subnets
,
err
:=
s
.
ec2
.
DescribeSubnets
(
request
)
if
err
!=
nil
{
glog
.
Error
(
"
e
rror describing subnets: "
,
err
)
glog
.
Error
(
"
E
rror describing subnets: "
,
err
)
return
nil
,
err
}
...
...
@@ -1625,7 +1625,7 @@ func (s *AWSCloud) EnsureTCPLoadBalancer(name, region string, publicIP net.IP, p
for
_
,
subnet
:=
range
subnets
{
subnetIDs
=
append
(
subnetIDs
,
orEmpty
(
subnet
.
SubnetId
))
if
!
strings
.
HasPrefix
(
orEmpty
(
subnet
.
AvailabilityZone
),
region
)
{
glog
.
Error
(
"
f
ound AZ that did not match region"
,
orEmpty
(
subnet
.
AvailabilityZone
),
" vs "
,
region
)
glog
.
Error
(
"
F
ound AZ that did not match region"
,
orEmpty
(
subnet
.
AvailabilityZone
),
" vs "
,
region
)
return
nil
,
fmt
.
Errorf
(
"invalid AZ for region"
)
}
// zones = append(zones, subnet.AvailabilityZone)
...
...
@@ -1639,7 +1639,7 @@ func (s *AWSCloud) EnsureTCPLoadBalancer(name, region string, publicIP net.IP, p
sgDescription
:=
"Security group for Kubernetes ELB "
+
name
securityGroupID
,
err
=
s
.
ensureSecurityGroup
(
sgName
,
sgDescription
,
orEmpty
(
vpc
.
VpcId
))
if
err
!=
nil
{
glog
.
Error
(
"
e
rror creating load balancer security group: "
,
err
)
glog
.
Error
(
"
E
rror creating load balancer security group: "
,
err
)
return
nil
,
err
}
...
...
@@ -1814,7 +1814,7 @@ func (s *AWSCloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalan
for
_
,
instance
:=
range
allInstances
{
securityGroupId
:=
findSecurityGroupForInstance
(
instance
)
if
isNilOrEmpty
(
securityGroupId
)
{
glog
.
Warning
(
"
i
gnoring instance without security group: "
,
orEmpty
(
instance
.
InstanceId
))
glog
.
Warning
(
"
I
gnoring instance without security group: "
,
orEmpty
(
instance
.
InstanceId
))
continue
}
...
...
@@ -1824,7 +1824,7 @@ func (s *AWSCloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalan
// Compare to actual groups
for
_
,
actualGroup
:=
range
actualGroups
{
if
isNilOrEmpty
(
actualGroup
.
GroupId
)
{
glog
.
Warning
(
"
i
gnoring group without ID: "
,
actualGroup
)
glog
.
Warning
(
"
I
gnoring group without ID: "
,
actualGroup
)
continue
}
...
...
@@ -1899,7 +1899,7 @@ func (s *AWSCloud) EnsureTCPLoadBalancerDeleted(name, region string) error {
// De-authorize the load balancer security group from the instances security group
err
=
s
.
updateInstanceSecurityGroupsForLoadBalancer
(
lb
,
nil
)
if
err
!=
nil
{
glog
.
Error
(
"
e
rror deregistering load balancer from instance security groups: "
,
err
)
glog
.
Error
(
"
E
rror deregistering load balancer from instance security groups: "
,
err
)
return
err
}
}
...
...
@@ -1912,7 +1912,7 @@ func (s *AWSCloud) EnsureTCPLoadBalancerDeleted(name, region string) error {
_
,
err
=
s
.
elb
.
DeleteLoadBalancer
(
request
)
if
err
!=
nil
{
// TODO: Check if error was because load balancer was concurrently deleted
glog
.
Error
(
"
e
rror deleting load balancer: "
,
err
)
glog
.
Error
(
"
E
rror deleting load balancer: "
,
err
)
return
err
}
}
...
...
pkg/cloudprovider/providers/gce/gce.go
View file @
2a6c7a1e
...
...
@@ -340,7 +340,7 @@ func translateAffinityType(affinityType api.ServiceAffinity) GCEAffinityType {
case
api
.
ServiceAffinityNone
:
return
GCEAffinityTypeNone
default
:
glog
.
Errorf
(
"
u
nexpected affinity type: %v"
,
affinityType
)
glog
.
Errorf
(
"
U
nexpected affinity type: %v"
,
affinityType
)
return
GCEAffinityTypeNone
}
}
...
...
plugin/pkg/scheduler/factory/factory.go
View file @
2a6c7a1e
...
...
@@ -123,7 +123,7 @@ func (f *ConfigFactory) Create() (*scheduler.Config, error) {
// Creates a scheduler from the name of a registered algorithm provider.
func
(
f
*
ConfigFactory
)
CreateFromProvider
(
providerName
string
)
(
*
scheduler
.
Config
,
error
)
{
glog
.
V
(
2
)
.
Infof
(
"
c
reating scheduler from algorithm provider '%v'"
,
providerName
)
glog
.
V
(
2
)
.
Infof
(
"
C
reating scheduler from algorithm provider '%v'"
,
providerName
)
provider
,
err
:=
GetAlgorithmProvider
(
providerName
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -134,7 +134,7 @@ func (f *ConfigFactory) CreateFromProvider(providerName string) (*scheduler.Conf
// Creates a scheduler from the configuration file
func
(
f
*
ConfigFactory
)
CreateFromConfig
(
policy
schedulerapi
.
Policy
)
(
*
scheduler
.
Config
,
error
)
{
glog
.
V
(
2
)
.
Infof
(
"
c
reating scheduler from configuration: %v"
,
policy
)
glog
.
V
(
2
)
.
Infof
(
"
C
reating scheduler from configuration: %v"
,
policy
)
// validate the policy configuration
if
err
:=
validation
.
ValidatePolicy
(
policy
);
err
!=
nil
{
...
...
plugin/pkg/scheduler/factory/plugins.go
View file @
2a6c7a1e
...
...
@@ -271,7 +271,7 @@ var validName = regexp.MustCompile("^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])$")
func
validateAlgorithmNameOrDie
(
name
string
)
{
if
!
validName
.
MatchString
(
name
)
{
glog
.
Fatalf
(
"
a
lgorithm name %v does not match the name validation regexp
\"
%v
\"
."
,
name
,
validName
)
glog
.
Fatalf
(
"
A
lgorithm name %v does not match the name validation regexp
\"
%v
\"
."
,
name
,
validName
)
}
}
...
...
plugin/pkg/scheduler/generic_scheduler.go
View file @
2a6c7a1e
...
...
@@ -44,7 +44,7 @@ func (f *FitError) Error() string {
var
reason
string
// We iterate over all nodes for logging purposes, even though we only return one reason from one node
for
node
,
predicateList
:=
range
f
.
FailedPredicates
{
glog
.
Infof
(
"
f
ailed to find fit for pod %v on node %s: %s"
,
f
.
Pod
.
Name
,
node
,
strings
.
Join
(
predicateList
.
List
(),
","
))
glog
.
Infof
(
"
F
ailed to find fit for pod %v on node %s: %s"
,
f
.
Pod
.
Name
,
node
,
strings
.
Join
(
predicateList
.
List
(),
","
))
if
len
(
reason
)
==
0
{
reason
,
_
=
predicateList
.
PopAny
()
}
...
...
@@ -195,7 +195,7 @@ func getBestHosts(list algorithm.HostPriorityList) []string {
func
EqualPriority
(
_
*
api
.
Pod
,
podLister
algorithm
.
PodLister
,
nodeLister
algorithm
.
NodeLister
)
(
algorithm
.
HostPriorityList
,
error
)
{
nodes
,
err
:=
nodeLister
.
List
()
if
err
!=
nil
{
glog
.
Errorf
(
"
f
ailed to list nodes: %v"
,
err
)
glog
.
Errorf
(
"
F
ailed to list nodes: %v"
,
err
)
return
[]
algorithm
.
HostPriority
{},
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment