mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-04 10:31:27 +08:00
openqa: allow specifying asset size limit
this is a database value and there's no openQA API function to set it, so we have to do it directly in the database...this *should* work. I think. I should add equivalent functionality for sqlite use as well, really...
This commit is contained in:
@@ -24,6 +24,7 @@ openqa_dbname: openqa-stg
|
||||
openqa_dbhost: db-qa01.qa.fedoraproject.org
|
||||
openqa_dbuser: openqastg
|
||||
openqa_dbpassword: "{{ stg_openqa_dbpassword }}"
|
||||
openqa_assetsize: 300
|
||||
|
||||
openqa_workers: 3
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
## string - The database username
|
||||
# - openqa_dbpassword
|
||||
## string - The database password
|
||||
# - openqa_assetsize
|
||||
## int - the asset size limit to set in GB (upstream default is 100GB)
|
||||
## higher is recommended for normal Fedora testing, 300GB is good
|
||||
#
|
||||
# If openqa_dbhost is set, the others must be too, and the server will be
|
||||
# configured to use a pgsql database accordingly. If openqa_dbhost is not
|
||||
@@ -224,3 +227,12 @@
|
||||
register: testsdiff
|
||||
changed_when: "testsdiff.rc > 0"
|
||||
failed_when: "1 != 1"
|
||||
|
||||
- name: Set asset size limit (if specified) (pgsql)
|
||||
delegate_to: "{{ openqa_dbhost }}"
|
||||
become_user: postgres
|
||||
become: true
|
||||
command: "psql -d {{ openqa_dbname }} -c \"UPDATE job_groups SET size_limit_gb = {{ openqa_assetsize }} WHERE size_limit_gb != {{ openqa_assetsize }};\"
|
||||
when: "openqa_dbhost is defined and openqa_assetsize is defined"
|
||||
register: pgsqlsize
|
||||
changed_when: "pgsqlsize.stdout.find('UPDATE 1') != -1"
|
||||
|
||||
Reference in New Issue
Block a user