Closed ybznek closed 8 years ago
I have tried to add some synchronization lock to search_containers method which allows only 1 run at time and problem doesn't occur during my testing.
But I have created simple python script to ensure that there is some race-condition problem with atomic mount. The script run simultaneously several mount/unmount but problem doesn't occur.
self.DM = DockerMount("/tmp", mnt_mkdir=True)
self.path = self.DM.mount(self.id)
I don't know what can cause the problem. It is hard to test some problem which sometimes occurs sometime not.
There is a race condition.
This is only happening because of _get_cid_from_mountpoint
. Basically when mounting the image, we ask for all the containers, and then ask whether some of these containers haven't been already mounted to the location. I think we can avoid that race condition, simply by not asking this question.
This was introduced by @rhatdan, when working on docker-1.10 atomic unmount
. See https://github.com/projectatomic/atomic/commit/68ae3bcc6f2e622283db9fbdbe1a896e477f2113.
We didn't need this function call during the atomic mount
before. It is perhaps needed only for the atomic unmount
. I think @jan-cerny has been testing atomic with this reverted hunk with docker-1.10, but it fails on som many other things.
@rhatdan @baude, do you think we can revert that single hunk starting at https://github.com/projectatomic/atomic/commit/68ae3bcc6f2e622283db9fbdbe1a896e477f2113#diff-ce5473cd96a720a53d0834698c9b2eaaL302 ?
Thanks!
We have merged workaround with synchronization lock for mount/unmount, until we don't have better solution. https://github.com/OpenSCAP/openscap-daemon/pull/60
Should we close this issue because has been fixed in https://github.com/OpenSCAP/openscap-daemon/pull/60 ? Or do we want to keep this open as a reminder of the workaround? I suggest closing this issue and opening a new issue with title eg. "Remove workaround locks".
+1 for new opened issue
Agreed, feel free to do that. You should have necessary rights, ping me otherwise.
OK. opened new issue https://github.com/OpenSCAP/openscap-daemon/issues/78. Closing this.
I have created ticket from pull request https://github.com/OpenSCAP/openscap-daemon/pull/57 (some comments are there) " Deamon should not die on an exception in docker client.
This exception was observed during atomic scan --images on Fedora23.
Addressing:
"