Don't recreate pre-existing volumes.
During the initialize_volumes phase, if a volume using the non-namespaced name already exists, don't create the namespaced equivalent. Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
ad8faad296
commit
05935b5e54
4 changed files with 51 additions and 2 deletions
|
|
@ -235,6 +235,12 @@ class Project(object):
|
|||
def initialize_volumes(self):
|
||||
try:
|
||||
for volume in self.volumes:
|
||||
if volume.is_user_created:
|
||||
log.info(
|
||||
'Found user-created volume "{0}". No new namespaced '
|
||||
'volume will be created.'.format(volume.name)
|
||||
)
|
||||
continue
|
||||
volume.create()
|
||||
except NotFound:
|
||||
raise ConfigurationError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue