mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 10:00:01 +08:00 
			
		
		
		
	Use HTTPProxy settings from containers.conf
This PR takes the settings from containers.conf and uses them. This works on the podman local but does not fix the issue for podman remote or for APIv2. We need a way to specify optionalbooleans when creating containers. Fixes: https://github.com/containers/podman/issues/8843 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
		
							
								
								
									
										12
									
								
								vendor/github.com/containers/common/pkg/retry/retry.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/github.com/containers/common/pkg/retry/retry.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -30,7 +30,7 @@ func RetryIfNecessary(ctx context.Context, operation func() error, retryOptions | ||||
| 		if retryOptions.Delay != 0 { | ||||
| 			delay = retryOptions.Delay | ||||
| 		} | ||||
| 		logrus.Infof("Warning: failed, retrying in %s ... (%d/%d). Error: %v", delay, attempt+1, retryOptions.MaxRetry, err) | ||||
| 		logrus.Warnf("failed, retrying in %s ... (%d/%d). Error: %v", delay, attempt+1, retryOptions.MaxRetry, err) | ||||
| 		select { | ||||
| 		case <-time.After(delay): | ||||
| 			break | ||||
| @ -69,7 +69,7 @@ func isRetryable(err error) bool { | ||||
| 		} | ||||
| 		return isRetryable(e.Err) | ||||
| 	case syscall.Errno: | ||||
| 		return e != syscall.ECONNREFUSED | ||||
| 		return shouldRestart(e) | ||||
| 	case errcode.Errors: | ||||
| 		// if this error is a group of errors, process them all in turn | ||||
| 		for i := range e { | ||||
| @ -93,3 +93,11 @@ func isRetryable(err error) bool { | ||||
|  | ||||
| 	return false | ||||
| } | ||||
|  | ||||
| func shouldRestart(e error) bool { | ||||
| 	switch e { | ||||
| 	case syscall.ECONNREFUSED, syscall.EINTR, syscall.EAGAIN, syscall.EBUSY, syscall.ENETDOWN, syscall.ENETUNREACH, syscall.ENETRESET, syscall.ECONNABORTED, syscall.ECONNRESET, syscall.ETIMEDOUT, syscall.EHOSTDOWN, syscall.EHOSTUNREACH: | ||||
| 		return true | ||||
| 	} | ||||
| 	return shouldRestartPlatform(e) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Daniel J Walsh
					Daniel J Walsh