mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	dump docker image list
This commit is contained in:
		@@ -218,6 +218,25 @@ function export-windows-docker-event-log() {
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Saves prepulled Windows Docker images list to ${WINDOWS_LOGS_DIR}\docker_images.log
 | 
			
		||||
# on node $1.
 | 
			
		||||
function export-windows-docker-images-list() {
 | 
			
		||||
    local -r node="${1}"
 | 
			
		||||
 | 
			
		||||
    local -r powershell_cmd="powershell.exe -Command \"\$logs=\$(docker image list); \$logs | Out-File -FilePath '${WINDOWS_LOGS_DIR}\\docker_images.log'\""
 | 
			
		||||
 | 
			
		||||
    # Retry up to 3 times to allow ssh keys to be properly propagated and
 | 
			
		||||
    # stored.
 | 
			
		||||
    for retry in {1..3}; do
 | 
			
		||||
      if gcloud compute ssh --project "${PROJECT}" --zone "${ZONE}" "${node}" \
 | 
			
		||||
        --command "$powershell_cmd"; then
 | 
			
		||||
        break
 | 
			
		||||
      else
 | 
			
		||||
        sleep 10
 | 
			
		||||
      fi
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Saves log files from diagnostics tool.(https://github.com/GoogleCloudPlatform/compute-image-tools/tree/master/cli_tools/diagnostics)
 | 
			
		||||
function save-windows-logs-via-diagnostics-tool() {
 | 
			
		||||
    local node="${1}"
 | 
			
		||||
@@ -247,6 +266,7 @@ function save-windows-logs-via-ssh() {
 | 
			
		||||
    local dest_dir="${2}"
 | 
			
		||||
 | 
			
		||||
    export-windows-docker-event-log "${node}"
 | 
			
		||||
    export-windows-docker-images-list "${node}"
 | 
			
		||||
    
 | 
			
		||||
    local remote_files=()
 | 
			
		||||
    for file in ${windows_node_logfiles[@]}; do
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user