| |
@@ -13,6 +13,9 @@
|
| |
- name: copy oz.cfg config file
|
| |
copy: src=oz.cfg dest=/etc/oz/oz.cfg owner=root group=root mode=0644
|
| |
|
| |
+ - name: copy script to kill zombie ImageFactory VMs
|
| |
+ copy: src=imagefactory-kill-zombie dest=/usr/local/bin owner=root group=root mode=0744
|
| |
+
|
| |
- name: hotfix imagefactory's REST api to allow file download
|
| |
copy: src=hotfix_imgfac_RESTv2.py dest=/usr/lib/python2.7/site-packages/imgfac/rest/RESTv2.py owner=root group=root mode=0644
|
| |
|
| |
@@ -72,3 +75,9 @@
|
| |
name: "Prune old builds in ImageFactory"
|
| |
special_time: daily
|
| |
job: '/var/lib/fedoraqa/base_images/prune_images/prune_images.py imgfac-old --config /etc/taskotron_base_images/config_server.ini --keep 3 > /dev/null'
|
| |
+
|
| |
+ - name: Create cronjob to kill zombie VMs from ImageFactory
|
| |
+ cron:
|
| |
+ name: "kill zombie VMs from ImageFactory"
|
| |
+ special_time: daily
|
| |
+ job: 'imagefactory-kill-zombie'
|
| |
Fixes https://pagure.io/taskotron/issue/233 .
Script will iterate through all QEMU processes by imagefactory till there is no one running longer than three hours. It iterates from oldest to newest processes (if there is more than one). The script exits if the oldest QEMU processes by imagefactory is younger than 3 hours.
TODO:
- Argument to specify maximum factory run time in minutes - DONE
- Use a variable instead of duplicating the same very long argument three times - DONE