Skip to content

Commit

Permalink
Failure to unload the apparmor profile isn't fatal
Browse files Browse the repository at this point in the history
If it was unloaded already somehow, then that's fine, if it can't be
unloaded, then keep it loaded and we'll just replace it on next startup.

Closes #1834

Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Mar 31, 2016
1 parent b08868e commit 325f559
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lxd/container_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1425,11 +1425,8 @@ func (c *containerLXC) OnStop(target string) error {
return err
}

// Unlock the apparmor profile
err = AAUnloadProfile(c)
if err != nil {
return err
}
// Unload the apparmor profile
AAUnloadProfile(c)

// FIXME: The go routine can go away once we can rely on LXC_TARGET
go func(c *containerLXC, target string, wg *sync.WaitGroup) {
Expand Down

0 comments on commit 325f559

Please sign in to comment.