mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	deps: Bump to cAdvisor v0.47.2
Signed-off-by: Harshal Patil <harpatil@redhat.com>
This commit is contained in:
		
							
								
								
									
										20
									
								
								vendor/github.com/google/cadvisor/container/crio/handler.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/github.com/google/cadvisor/container/crio/handler.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -305,14 +305,20 @@ func (h *crioContainerHandler) GetStats() (*info.ContainerStats, error) {
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return stats, err
 | 
			
		||||
	}
 | 
			
		||||
	// Clean up stats for containers that don't have their own network - this
 | 
			
		||||
	// includes containers running in Kubernetes pods that use the network of the
 | 
			
		||||
	// infrastructure container. This stops metrics being reported multiple times
 | 
			
		||||
	// for each container in a pod.
 | 
			
		||||
	if !h.needNet() {
 | 
			
		||||
		stats.Network = info.NetworkStats{}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if !h.needNet() {
 | 
			
		||||
		// Clean up stats for containers that don't have their own network - this
 | 
			
		||||
		// includes containers running in Kubernetes pods that use the network of the
 | 
			
		||||
		// infrastructure container. This stops metrics being reported multiple times
 | 
			
		||||
		// for each container in a pod.
 | 
			
		||||
		stats.Network = info.NetworkStats{}
 | 
			
		||||
	} else if len(stats.Network.Interfaces) == 0 {
 | 
			
		||||
		// No network related information indicates that the pid of the
 | 
			
		||||
		// container is not longer valid and we need to ask crio to
 | 
			
		||||
		// provide the pid of another container from that pod
 | 
			
		||||
		h.pidKnown = false
 | 
			
		||||
		return stats, nil
 | 
			
		||||
	}
 | 
			
		||||
	// Get filesystem stats.
 | 
			
		||||
	err = h.getFsStats(stats)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user