mirror of
				https://github.com/containers/podman.git
				synced 2025-11-01 02:42:11 +08:00 
			
		
		
		
	Bump github.com/containers/storage from 1.19.1 to 1.19.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.19.1 to 1.19.2. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.19.1...v1.19.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
		![27856297+dependabot-preview[bot]@users.noreply.github.com](/assets/img/avatar_default.png) dependabot-preview[bot]
					dependabot-preview[bot]
				
			
				
					committed by
					
						 Daniel J Walsh
						Daniel J Walsh
					
				
			
			
				
	
			
			
			 Daniel J Walsh
						Daniel J Walsh
					
				
			
						parent
						
							150679d7b1
						
					
				
				
					commit
					1f0cc866d4
				
			
							
								
								
									
										50
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/github.com/Microsoft/hcsshim/internal/hcs/system.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -4,12 +4,9 @@ import ( | ||||
| 	"context" | ||||
| 	"encoding/json" | ||||
| 	"errors" | ||||
| 	"os" | ||||
| 	"strconv" | ||||
| 	"strings" | ||||
| 	"sync" | ||||
| 	"syscall" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/Microsoft/hcsshim/internal/cow" | ||||
| 	"github.com/Microsoft/hcsshim/internal/log" | ||||
| @ -21,27 +18,6 @@ import ( | ||||
| 	"go.opencensus.io/trace" | ||||
| ) | ||||
|  | ||||
| // currentContainerStarts is used to limit the number of concurrent container | ||||
| // starts. | ||||
| var currentContainerStarts containerStarts | ||||
|  | ||||
| type containerStarts struct { | ||||
| 	maxParallel int | ||||
| 	inProgress  int | ||||
| 	sync.Mutex | ||||
| } | ||||
|  | ||||
| func init() { | ||||
| 	mpsS := os.Getenv("HCSSHIM_MAX_PARALLEL_START") | ||||
| 	if len(mpsS) > 0 { | ||||
| 		mpsI, err := strconv.Atoi(mpsS) | ||||
| 		if err != nil || mpsI < 0 { | ||||
| 			return | ||||
| 		} | ||||
| 		currentContainerStarts.maxParallel = mpsI | ||||
| 	} | ||||
| } | ||||
|  | ||||
| type System struct { | ||||
| 	handleLock     sync.RWMutex | ||||
| 	handle         vmcompute.HcsSystem | ||||
| @ -215,32 +191,6 @@ func (computeSystem *System) Start(ctx context.Context) (err error) { | ||||
| 		return makeSystemError(computeSystem, operation, "", ErrAlreadyClosed, nil) | ||||
| 	} | ||||
|  | ||||
| 	// This is a very simple backoff-retry loop to limit the number | ||||
| 	// of parallel container starts if environment variable | ||||
| 	// HCSSHIM_MAX_PARALLEL_START is set to a positive integer. | ||||
| 	// It should generally only be used as a workaround to various | ||||
| 	// platform issues that exist between RS1 and RS4 as of Aug 2018 | ||||
| 	if currentContainerStarts.maxParallel > 0 { | ||||
| 		for { | ||||
| 			currentContainerStarts.Lock() | ||||
| 			if currentContainerStarts.inProgress < currentContainerStarts.maxParallel { | ||||
| 				currentContainerStarts.inProgress++ | ||||
| 				currentContainerStarts.Unlock() | ||||
| 				break | ||||
| 			} | ||||
| 			if currentContainerStarts.inProgress == currentContainerStarts.maxParallel { | ||||
| 				currentContainerStarts.Unlock() | ||||
| 				time.Sleep(100 * time.Millisecond) | ||||
| 			} | ||||
| 		} | ||||
| 		// Make sure we decrement the count when we are done. | ||||
| 		defer func() { | ||||
| 			currentContainerStarts.Lock() | ||||
| 			currentContainerStarts.inProgress-- | ||||
| 			currentContainerStarts.Unlock() | ||||
| 		}() | ||||
| 	} | ||||
|  | ||||
| 	resultJSON, err := vmcompute.HcsStartComputeSystem(ctx, computeSystem.handle, "") | ||||
| 	events, err := processAsyncHcsResult(ctx, err, resultJSON, computeSystem.callbackNumber, hcsNotificationSystemStartCompleted, &timeout.SystemStart) | ||||
| 	if err != nil { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user