Set force_imageurl to True by default. And added instructions
on using disposable clients (via --libvirt) to the readme.
File-name convetions for base images in imagesdir are described
both in config, and code.
kparal | |
tflink |
libtaskotron |
Set force_imageurl to True by default. And added instructions
on using disposable clients (via --libvirt) to the readme.
File-name convetions for base images in imagesdir are described
both in config, and code.
Unit tests run OK
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
I just found out that the original code from 3ba67bd98ce didn't work at all, it crashed like this:
[libtaskotron] 11:39:02 ERROR Was expecting to find instance taskotron-20160314_113902_585744 but it does not already exist Traceback (most recent call last): File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/minion.py", line 213, in execute task_vm.teardown() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 187, in teardown tc_instance = self._check_existing_instance(should_exist=True) File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 109, in _check_existing_instance " already exist".format(self.instancename)) TaskotronRemoteError: Was expecting to find instance taskotron-20160314_113902_585744 but it does not already exist [libtaskotron] 11:39:02 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.4', '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 93, in start runner.execute() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/minion.py", line 186, in execute task_vm.prepare() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 123, in prepare tc_image = self._prepare_image() File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 70, in _prepare_image arch=config.get_config().disposable_arch File "/home/kparal/devel/taskotron/libtaskotron/libtaskotron/ext/disposable/vm.py", line 234, in get_latest return "file://" + os.path.join(imagesdir, latest_metadata['filename']) File "/home/kparal/devel/taskotron/env_taskotron/lib64/python2.7/posixpath.py", line 70, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith'
It no longer crashes now, but can you please check the problem has really been fixed and will not appear at some other time? (include unit tests if possible, thanks)
conf/taskotron.yaml.example | ||
---|---|---|
120 | Could we please go back to YYYYMMDD, unless there's a strong opposition? I listed the reasons in https://phab.qadevel.cloud.fedoraproject.org/rLTRN3ba67bd98cec29303bb10d2ea873ce044318f962 . | |
libtaskotron/ext/disposable/vm.py | ||
54–55 | This debug printout is confusing, because it claims it will download an image even if we later decide we will not download it, but use ImageFinder instead. Move it into the if clause? | |
66 | Another debug printout here would also be nice, so that we know which image got picked. | |
readme.rst | ||
160–161 | Maybe also add this? If you store these images in ``/var/lib/taskotron/images``, adhere to their naming conventions and set ``force_imageurl=False`` in ``taskotron.yaml``, we will find the latest one available automatically for you and you don't need to update the ``imageurl`` option regularly. |
conf/taskotron.yaml.example | ||
---|---|---|
120 | Nope, sorry, too much hassle, especially during freeze, as this also needs changes in the scripts around imagefactory. I'll create a ticket for it though | |
libtaskotron/ext/disposable/vm.py | ||
66 | I'll just move the first one, it will then work as expected | |
readme.rst | ||
160–161 | Sounds good. |
Looks good, just the one variable needs correcting.
libtaskotron/ext/disposable/vm.py | ||
---|---|---|
71 | Doesn't work, because you're using img_url, but printing self.imageurl. The latter one doesn't seem to be used anywhere else, just erase it into oblivion? | |
readme.rst | ||
150 | `Setting up Testcloud`_ section will make a hyperlink and nicely format it |
overall, LGTM. minor nits in the docs
readme.rst | ||
---|---|---|
178 | Would it be worth noting that that settings.py would only be found by the user running testcloud or is that obvious enough? Also, the user will need to be added to the testcloud group. |
readme.rst | ||
---|---|---|
178 |
I have a slow morning - just to be sure, you mean that the configuration will only be valid for the user, which sets the config file - i.e. that other users, or system services, won't be able to get to the config, and will most probably fail to use --libvirt, as the ssh-authorized-keys needs to be set in order for it to work?
Are you sure? I'm not in the group, and it works fine. |
readme.rst | ||
---|---|---|
178 | I think let's just say "~/.config/testcloud/settings.py or /etc/testcloud/settings.py" and it's obvious enough.
Yes, the same situation here. However, I'm in the libvirt group, which might grant needed privileges. |
readme.rst | ||
---|---|---|
178 | I'm in qemu, mock, docker, FWIW |
Could we please go back to YYYYMMDD, unless there's a strong opposition? I listed the reasons in https://phab.qadevel.cloud.fedoraproject.org/rLTRN3ba67bd98cec29303bb10d2ea873ce044318f962 .