mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Revert "Check for hostError and automaticRestart when test finishes."
This commit is contained in:
		@@ -429,30 +429,6 @@ function dump_nodes_with_logexporter() {
 | 
				
			|||||||
  fi
 | 
					  fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function detect_node_failures() {
 | 
					 | 
				
			||||||
  if ! [[ "${gcloud_supported_providers}" =~ "${KUBERNETES_PROVIDER}" ]]; then
 | 
					 | 
				
			||||||
    return
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  detect-node-names
 | 
					 | 
				
			||||||
  for group in "${INSTANCE_GROUPS[@]}"; do
 | 
					 | 
				
			||||||
    local creation_timestamp=$(gcloud compute instance-groups managed describe \
 | 
					 | 
				
			||||||
                              "${group}" \
 | 
					 | 
				
			||||||
                              --project "${PROJECT}" \
 | 
					 | 
				
			||||||
                              --zone "${ZONE}" \
 | 
					 | 
				
			||||||
                              --format='value(creationTimestamp)')
 | 
					 | 
				
			||||||
    echo "Failures for ${group}"
 | 
					 | 
				
			||||||
    gcloud logging read --order=asc \
 | 
					 | 
				
			||||||
          --format='table(timestamp,jsonPayload.resource.name,jsonPayload.event_subtype)' \
 | 
					 | 
				
			||||||
          --project "${PROJECT}" \
 | 
					 | 
				
			||||||
          "resource.type=\"gce_instance\"
 | 
					 | 
				
			||||||
           logName=\"projects/${PROJECT}/logs/compute.googleapis.com%2Factivity_log\"
 | 
					 | 
				
			||||||
           (jsonPayload.event_subtype=\"compute.instances.hostError\" OR jsonPayload.event_subtype=\"compute.instances.automaticRestart\")
 | 
					 | 
				
			||||||
           jsonPayload.resource.name:\"${group}\"
 | 
					 | 
				
			||||||
           timestamp >= \"${creation_timestamp}\""
 | 
					 | 
				
			||||||
  done
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function main() {
 | 
					function main() {
 | 
				
			||||||
  setup
 | 
					  setup
 | 
				
			||||||
  # Copy master logs to artifacts dir locally (through SSH).
 | 
					  # Copy master logs to artifacts dir locally (through SSH).
 | 
				
			||||||
@@ -471,8 +447,6 @@ function main() {
 | 
				
			|||||||
    echo "Dumping logs from nodes locally to '${report_dir}'"
 | 
					    echo "Dumping logs from nodes locally to '${report_dir}'"
 | 
				
			||||||
    dump_nodes
 | 
					    dump_nodes
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					 | 
				
			||||||
  detect_node_failures
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main
 | 
					main
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user