Make down idempotent, continue to remove resources if one is missing.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
e5cd869c61
commit
e5529a89e1
3 changed files with 30 additions and 2 deletions
|
|
@ -149,7 +149,10 @@ class ProjectNetworks(object):
|
|||
if not self.use_networking:
|
||||
return
|
||||
for network in self.networks.values():
|
||||
network.remove()
|
||||
try:
|
||||
network.remove()
|
||||
except NotFound:
|
||||
log.warn("Network %s not found.", network.full_name)
|
||||
|
||||
def initialize(self):
|
||||
if not self.use_networking:
|
||||
|
|
|
|||
|
|
@ -76,7 +76,10 @@ class ProjectVolumes(object):
|
|||
|
||||
def remove(self):
|
||||
for volume in self.volumes.values():
|
||||
volume.remove()
|
||||
try:
|
||||
volume.remove()
|
||||
except NotFound:
|
||||
log.warn("Volume %s not found.", volume.full_name)
|
||||
|
||||
def initialize(self):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue