Просмотр исходного кода

Merge pull request #372 from kubecost/AjayTripathy-api-patch

Ajay tripathy api patch
Ajay Tripathy 6 лет назад
Родитель
Сommit
fc83a2d8e5
2 измененных файлов с 4 добавлено и 4 удалено
  1. 3 3
      pkg/cloud/awsprovider.go
  2. 1 1
      pkg/costmodel/costmodel.go

+ 3 - 3
pkg/cloud/awsprovider.go

@@ -1130,7 +1130,7 @@ func (a *AWS) QueryAthenaBillingData(query string) (*athena.GetQueryResultsOutpu
 		if err != nil {
 			return nil, err
 		}
-		if *qrop.QueryExecution.Status.State != "RUNNING" {
+		if *qrop.QueryExecution.Status.State != "RUNNING" && *qrop.QueryExecution.Status.State != "QUEUED" {
 			break
 		}
 		time.Sleep(duration)
@@ -1313,7 +1313,7 @@ func (a *AWS) ExternalAllocations(start string, end string, aggregators []string
 		if err != nil {
 			return nil, err
 		}
-		if *qrop.QueryExecution.Status.State != "RUNNING" {
+		if *qrop.QueryExecution.Status.State != "RUNNING" && *qrop.QueryExecution.Status.State != "QUEUED" {
 			break
 		}
 		time.Sleep(duration)
@@ -1439,7 +1439,7 @@ func (a *AWS) QuerySQL(query string) ([]byte, error) {
 		if err != nil {
 			return nil, err
 		}
-		if *qrop.QueryExecution.Status.State != "RUNNING" {
+		if *qrop.QueryExecution.Status.State != "RUNNING" && *qrop.QueryExecution.Status.State != "QUEUED" {
 			break
 		}
 		time.Sleep(duration)

+ 1 - 1
pkg/costmodel/costmodel.go

@@ -793,7 +793,7 @@ func (cm *CostModel) ComputeCostData(cli prometheusClient.Client, clientset kube
 	// to pass along the cost data
 	unmounted := findUnmountedPVCostData(unmountedPVs, namespaceLabelsMapping)
 	for k, costs := range unmounted {
-		klog.V(3).Infof("Unmounted PVs in Namespace/ClusterID: %s/%s", costs.Namespace, costs.ClusterID)
+		klog.V(4).Infof("Unmounted PVs in Namespace/ClusterID: %s/%s", costs.Namespace, costs.ClusterID)
 
 		if filterNamespace == "" {
 			containerNameCost[k] = costs