mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Kubelet server was not returning a 500 on errors writing logs
Writing 200 first masks the second error. 200 is defaulted by the Go http stack automatically.
This commit is contained in:
		@@ -440,7 +440,6 @@ func (s *Server) getContainerLogs(request *restful.Request, response *restful.Re
 | 
			
		||||
		fw = limitwriter.New(fw, *logOptions.LimitBytes)
 | 
			
		||||
	}
 | 
			
		||||
	response.Header().Set("Transfer-Encoding", "chunked")
 | 
			
		||||
	response.WriteHeader(http.StatusOK)
 | 
			
		||||
	if err := s.host.GetKubeletContainerLogs(kubecontainer.GetPodFullName(pod), containerName, logOptions, fw, fw); err != nil {
 | 
			
		||||
		if err != limitwriter.ErrMaximumWrite {
 | 
			
		||||
			response.WriteError(http.StatusInternalServerError, err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user