mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 10:18:13 +00:00 
			
		
		
		
	vendor: update google/cadvisor and opencontainers/runc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
		
							
								
								
									
										41
									
								
								vendor/github.com/opencontainers/runc/libcontainer/state_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										41
									
								
								vendor/github.com/opencontainers/runc/libcontainer/state_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -61,17 +61,21 @@ func destroy(c *linuxContainer) error { | ||||
| } | ||||
|  | ||||
| func runPoststopHooks(c *linuxContainer) error { | ||||
| 	if c.config.Hooks != nil { | ||||
| 		s, err := c.currentOCIState() | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		for _, hook := range c.config.Hooks.Poststop { | ||||
| 			if err := hook.Run(s); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 		} | ||||
| 	hooks := c.config.Hooks | ||||
| 	if hooks == nil { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	s, err := c.currentOCIState() | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	s.Status = configs.Stopped | ||||
|  | ||||
| 	if err := hooks[configs.Poststop].RunHooks(s); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| @@ -111,11 +115,7 @@ func (r *runningState) status() Status { | ||||
| func (r *runningState) transition(s containerState) error { | ||||
| 	switch s.(type) { | ||||
| 	case *stoppedState: | ||||
| 		t, err := r.c.runType() | ||||
| 		if err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 		if t == Running { | ||||
| 		if r.c.runType() == Running { | ||||
| 			return newGenericError(fmt.Errorf("container still running"), ContainerNotStopped) | ||||
| 		} | ||||
| 		r.c.state = s | ||||
| @@ -130,11 +130,7 @@ func (r *runningState) transition(s containerState) error { | ||||
| } | ||||
|  | ||||
| func (r *runningState) destroy() error { | ||||
| 	t, err := r.c.runType() | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	if t == Running { | ||||
| 	if r.c.runType() == Running { | ||||
| 		return newGenericError(fmt.Errorf("container is not destroyed"), ContainerNotStopped) | ||||
| 	} | ||||
| 	return destroy(r.c) | ||||
| @@ -186,10 +182,7 @@ func (p *pausedState) transition(s containerState) error { | ||||
| } | ||||
|  | ||||
| func (p *pausedState) destroy() error { | ||||
| 	t, err := p.c.runType() | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	t := p.c.runType() | ||||
| 	if t != Running && t != Created { | ||||
| 		if err := p.c.cgroupManager.Freeze(configs.Thawed); err != nil { | ||||
| 			return err | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Giuseppe Scrivano
					Giuseppe Scrivano