mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	When plugin enable fails, unmount PropagatedMount.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit cef443bddf)
Signed-off-by: Victor Vieux <vieux@docker.com>
			
			
This commit is contained in:
		
							parent
							
								
									80c3ed1c0c
								
							
						
					
					
						commit
						1a86cbb031
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -41,6 +41,11 @@ func (pm *Manager) enable(p *v2.Plugin, c *controller, force bool) error {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if err := pm.containerdClient.Create(p.GetID(), "", "", specs.Spec(*spec), attachToLog(p.GetID())); err != nil {
 | 
			
		||||
		if p.PropagatedMount != "" {
 | 
			
		||||
			if err := mount.Unmount(p.PropagatedMount); err != nil {
 | 
			
		||||
				logrus.Warnf("Could not unmount %s: %v", p.PropagatedMount, err)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue