signalfx / maestro-ng

Orchestration of Docker-based, multi-host environments
https://signalfx.com
Apache License 2.0
685 stars 83 forks source link

Can't mount over existing file with volume declaration - "can't create volume there" #129

Closed bradjones1 closed 9 years ago

bradjones1 commented 9 years ago

I think this is similar to https://github.com/docker/compose/issues/1326 over on the compose project... Attempting to use a volume definition to mount a file inside the container yields:

...
  File "/usr/local/lib/python2.7/dist-packages/maestro/plays/tasks.py", line 202, in _create_and_start_container
    command=self.container.command)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 484, in create_container
    return self.create_container_from_config(config, name)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 492, in create_container_from_config
    return self._result(res, True)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 126, in _result
    self._raise_for_status(response)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 122, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 500 Server Error: Internal Server Error ("file exists at /var/lib/docker/aufs/mnt/16121b6ecd2f372970a9714bf555cb19318fd533b11f21b089559ac44fe40cc5/var/www/public/app/protected/config/debug.php, can't create volume there")
bradjones1 commented 9 years ago

See https://github.com/docker/docker-py/issues/546

mpetazzoni commented 9 years ago

@bradjones1 Is this still an issue with the latest docker-py?

bradjones1 commented 9 years ago

Upgraded docker-py and this seems to be fixed upstream.

mpetazzoni commented 9 years ago

Thanks for following up!