porcupie / rbd-docker-plugin

Ceph RBD docker volume driver plugin.
MIT License
9 stars 13 forks source link

Images being created when docker fails to start #3

Closed tsaridas closed 7 years ago

tsaridas commented 8 years ago

Images being created when docker fails to start and image does not exist. I'll try to get more logs.

# rbd ls -l
NAME                                                               SIZE PARENT FMT PROT LOCK
049805c91435cb0aa5001d3337aac4231a5ad15577f8cf79de2d3e981c1c3272 20480M          2
0b3aa1569c573a7c585dfd67238fcb36fb3d4f445005872c35502405f627d31e 20480M          2
28640d044dc6fe502c219faf8f955f7933bb81360495263d58519d32663dae26 20480M          2
361a93abdeb97c37944f2a4704becc51ecfc8222fafb5305f11bea0c55f9084d 20480M          2
3a28ce54a9abd647a9b3db833262880a27ffd7d95f7104572adc9cb56b00ee51 20480M          2
433246656dcd455e4a6e41073b81a46d2d1160944ee73c0c03f48fa7c8385b65 20480M          2
49187f94c60017167c6eb8b8a877fc3d24324cece1cf99063fa521e7b0b31964 20480M          2
62fbf4b452c48235366d6c45bbf7164997b1eedbd4632446eeb2e212a0026a66 20480M          2
635e7b5b0525580fd8e237a58d4028398fad68c4c2bcd62d25e3255d56f4d465 20480M          2
6724533589fd3a63361f63b50ca546730399693b5fdb01787d9dd938032f2d11 20480M          2
67dc5308f084494a39717a3139aac274b4e69fb192066b20a6eb0b75db4c140a 20480M          2      excl
6f851bf9ebd53407b5a94254e0b9b57897061ec3f0393245093029fc4854e602 20480M          2
791a4e7aa3af6504b4555ba6ec6a9f272a265e5ccf36f2078f34de8986158d52 20480M          2
7fedbaf7250eff36800fba013f9f177e17d46cf9d35dce73f500162c13e6bd33 20480M          2
9eb5482b0b255d435e3b509d0ec38b46ff98ee6214aeb2671a60fc428dacfb5b 20480M          2
b9991e69f0627445a42daa2ead02b538f5df0a7b36e0bb24a61c0c599f642e4f 20480M          2
bca2882dcf9b511c080d4d373972530d7a5629043cf57947f2a4b9bee5d5263b 20480M          2
d14c93dabc42f04ddc550833b392067013a58ea3017c8721631107f8f0444b21 20480M          2
porcupie commented 8 years ago

Are you creating a random named RBD each time? The plugin API afaik does not support any feedback mechanism about whether the container actually successfully started or not, so if plugin gets a request for a volume, it will create it. API is very simple/dumb in that way.

tsaridas commented 8 years ago

@porcupie no, its the same docker image with the same rbd image that I'm trying to create.

the plugin is set to create the images automatically and as I said it only does it when the image is not there hence not ran successfully at least once.

Not sure if it has something to do with marathon that I'm using to spawn the containers.

vincepii commented 8 years ago

That is actually a "problem" with docker: if the dockerfile defines a volume and you specify that you want to use the rbd driver in the marathon json file, then, if you don't explicitly provide a mountpoint for the docker volume, docker will create one with a "random" name.

I had this problem with a docker image that defined a volume on path1, which I ignored completely and defined another one for path2. This was leading to the creation of these random images.

Once changed, the problem went away.