Images with file:// url are not copied to /var/lib/testcloud/backingstores/,
instead symlink is created, changing selinux context is set to not follow
symlinks.
Details
Details
- Reviewers
kparal tflink - Maniphest Tasks
- T829: testcloud race condition when populating backingstores
- Commits
- rTCLOUDe3c14d483184: use symlinks for file:// urls
manually run testcloud
Diff Detail
Diff Detail
- Repository
- rTCLOUD testcloud
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Hit a race condition when I executed two processes simultaneously:
Traceback (most recent call last): File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/minion.py", line 244, in execute task_vm.teardown() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 174, in teardown tc_instance = self._check_existing_instance(should_exist=True) File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 118, in _check_existing_instance " already exist".format(self.instancename)) TaskotronRemoteError: Was expecting to find instance taskotron-20160812_121309_083416 but it does not already exist [libtaskotron] 12:13:09 CRITICAL Traceback (most recent call last): File "/home/kparal/devel/taskotron/env_taskotron/bin/runtask", line 9, in <module> load_entry_point('libtaskotron==0.4.14', 'console_scripts', 'runtask')() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/main.py", line 163, in main overlord.start() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/overlord.py", line 92, in start runner.execute() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/minion.py", line 203, in execute task_vm.prepare(**env) File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 136, in prepare tc_image = self._prepare_image(distro, release, flavor, arch) File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 87, in _prepare_image tc_image.prepare(copy=False) File "/home/kparal/devel/testcloud/testcloud/image.py", line 202, in prepare self._handle_file_url(self.remote_path, self.local_path, copy=copy) File "/home/kparal/devel/testcloud/testcloud/image.py", line 165, in _handle_file_url os.symlink(source_path, dest_path) OSError: [Errno 17] File exists
We either need to overwrite the symlink when creating it or move it (and overwrite) from a tmp dir.
testcloud/image.py | ||
---|---|---|
160 | It would be nice to document what copy=False means (not obvious). | |
193 | Same as above. |
It would be nice to document what copy=False means (not obvious).