mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 10:00:01 +08:00 
			
		
		
		
	vendor c/common
Update the recent events-log changes to fix the build error. [NO NEW TESTS NEEDED] since there's no functional change. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
		
							
								
								
									
										15
									
								
								vendor/github.com/containers/common/pkg/config/default.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/github.com/containers/common/pkg/config/default.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -109,7 +109,6 @@ func parseSubnetPool(subnet string, size int) SubnetPool { | ||||
| 		Base: &nettypes.IPNet{IPNet: *n}, | ||||
| 		Size: size, | ||||
| 	} | ||||
|  | ||||
| } | ||||
|  | ||||
| const ( | ||||
| @ -128,6 +127,9 @@ const ( | ||||
| 	// DefaultLogSizeMax is the default value for the maximum log size | ||||
| 	// allowed for a container. Negative values mean that no limit is imposed. | ||||
| 	DefaultLogSizeMax = -1 | ||||
| 	// DefaultEventsLogSize is the default value for the maximum events log size | ||||
| 	// before rotation. | ||||
| 	DefaultEventsLogSizeMax = uint64(1000000) | ||||
| 	// DefaultPidsLimit is the default value for maximum number of processes | ||||
| 	// allowed inside a container | ||||
| 	DefaultPidsLimit = 2048 | ||||
| @ -156,7 +158,6 @@ const ( | ||||
|  | ||||
| // DefaultConfig defines the default values from containers.conf | ||||
| func DefaultConfig() (*Config, error) { | ||||
|  | ||||
| 	defaultEngineConfig, err := defaultConfigFromMemory() | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| @ -263,6 +264,8 @@ func defaultConfigFromMemory() (*EngineConfig, error) { | ||||
|  | ||||
| 	c.EventsLogFilePath = filepath.Join(c.TmpDir, "events", "events.log") | ||||
|  | ||||
| 	c.EventsLogFileMaxSize = eventsLogMaxSize(DefaultEventsLogSizeMax) | ||||
|  | ||||
| 	c.CompatAPIEnforceDockerHub = true | ||||
|  | ||||
| 	if path, ok := os.LookupEnv("CONTAINERS_STORAGE_CONF"); ok { | ||||
| @ -399,10 +402,10 @@ func defaultTmpDir() (string, error) { | ||||
| 	} | ||||
| 	libpodRuntimeDir := filepath.Join(runtimeDir, "libpod") | ||||
|  | ||||
| 	if err := os.Mkdir(libpodRuntimeDir, 0700|os.ModeSticky); err != nil { | ||||
| 	if err := os.Mkdir(libpodRuntimeDir, 0o700|os.ModeSticky); err != nil { | ||||
| 		if !os.IsExist(err) { | ||||
| 			return "", err | ||||
| 		} else if err := os.Chmod(libpodRuntimeDir, 0700|os.ModeSticky); err != nil { | ||||
| 		} else if err := os.Chmod(libpodRuntimeDir, 0o700|os.ModeSticky); err != nil { | ||||
| 			// The directory already exist, just set the sticky bit | ||||
| 			return "", errors.Wrap(err, "set sticky bit on") | ||||
| 		} | ||||
| @ -466,6 +469,10 @@ func (c *Config) NetNS() string { | ||||
| 	return c.Containers.NetNS | ||||
| } | ||||
|  | ||||
| func (c EngineConfig) EventsLogMaxSize() uint64 { | ||||
| 	return uint64(c.EventsLogFileMaxSize) | ||||
| } | ||||
|  | ||||
| // SecurityOptions returns the default security options | ||||
| func (c *Config) SecurityOptions() []string { | ||||
| 	securityOpts := []string{} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Valentin Rothberg
					Valentin Rothberg