Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster-autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ifndef REGISTRY
$(ERR)
endif
docker build --pull -t ${REGISTRY}/cluster-autoscaler:${TAG} .
gcloud docker push ${REGISTRY}/cluster-autoscaler:${TAG}
gcloud docker -- push ${REGISTRY}/cluster-autoscaler:${TAG}

clean:
rm -f cluster-autoscaler
Expand Down
12 changes: 11 additions & 1 deletion cluster-autoscaler/clusterstate/clusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (

// MaxStatusSettingDelayAfterCreation is the maximum time for node to set its initial status after the
// node is registered.
MaxStatusSettingDelayAfterCreation = time.Minute
MaxStatusSettingDelayAfterCreation = 2 * time.Minute
)

// ScaleUpRequest contains information about the requested node group scale up.
Expand Down Expand Up @@ -615,6 +615,16 @@ func isNodeNotStarted(node *apiv1.Node) bool {
condition.LastTransitionTime.Time.Sub(node.CreationTimestamp.Time) < MaxStatusSettingDelayAfterCreation {
return true
}
if condition.Type == apiv1.NodeOutOfDisk &&
condition.Status == apiv1.ConditionTrue &&
condition.LastTransitionTime.Time.Sub(node.CreationTimestamp.Time) < MaxStatusSettingDelayAfterCreation {
return true
}
if condition.Type == apiv1.NodeNetworkUnavailable &&
condition.Status == apiv1.ConditionTrue &&
condition.LastTransitionTime.Time.Sub(node.CreationTimestamp.Time) < MaxStatusSettingDelayAfterCreation {
return true
}
}
return false
}
Expand Down
7 changes: 6 additions & 1 deletion cluster-autoscaler/core/scale_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func ScaleUp(context *AutoscalingContext, unschedulablePods []*apiv1.Pod, nodes
upcomingNodes = append(upcomingNodes, nodeTemplate)
}
}
glog.V(4).Infof("Upcoming %d nodes", len(upcomingNodes))

podsRemainUnschedulable := make(map[*apiv1.Pod]bool)
expansionOptions := make([]expander.Option, 0)
Expand Down Expand Up @@ -119,12 +120,16 @@ func ScaleUp(context *AutoscalingContext, unschedulablePods []*apiv1.Pod, nodes
}
if option.NodeCount > 0 {
expansionOptions = append(expansionOptions, option)
} else {
glog.V(2).Infof("No need for any nodes in %s", nodeGroup.Id())
}
} else {
glog.V(4).Info("No pod can fit to %s", nodeGroup.Id())
}
}

if len(expansionOptions) == 0 {
glog.V(1).Info("No node group can help with pending pods.")
glog.V(1).Info("No expansion options")
for pod, unschedulable := range podsRemainUnschedulable {
if unschedulable {
context.Recorder.Event(pod, apiv1.EventTypeNormal, "NotTriggerScaleUp",
Expand Down
4 changes: 4 additions & 0 deletions cluster-autoscaler/core/static_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,16 @@ func (a *StaticAutoscaler) RunOnce(currentTime time.Time) {
// in the describe situation.
schedulablePodsPresent := false
if a.VerifyUnschedulablePods {

glog.V(4).Infof("Filtering out schedulables")
newUnschedulablePodsToHelp := FilterOutSchedulable(unschedulablePodsToHelp, readyNodes, allScheduled,
a.PredicateChecker)

if len(newUnschedulablePodsToHelp) != len(unschedulablePodsToHelp) {
glog.V(2).Info("Schedulable pods present")
schedulablePodsPresent = true
} else {
glog.V(4).Info("No schedulable pods")
}
unschedulablePodsToHelp = newUnschedulablePodsToHelp
}
Expand Down