[MERGED] osmo-ci[master]: osmocom-jenkins-slave: call fstrim periodically

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Apr 11 21:28:47 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: osmocom-jenkins-slave: call fstrim periodically
......................................................................


osmocom-jenkins-slave: call fstrim periodically

Change-Id: I82c497f476abf43148e8d7c027f53b87b5a738fb
---
M ansible/hosts
M ansible/roles/osmocom-jenkins-slave/defaults/main.yml
M ansible/roles/osmocom-jenkins-slave/tasks/main.yml
3 files changed, 13 insertions(+), 3 deletions(-)

Approvals:
  lynxis lazus: Verified
  Harald Welte: Looks good to me, approved



diff --git a/ansible/hosts b/ansible/hosts
index 6964a71..4767b0c 100644
--- a/ansible/hosts
+++ b/ansible/hosts
@@ -9,8 +9,8 @@
 
 [jenkins-slaves]
 admin2-deb8build ansible_host=2a01:4f8:13b:828::1:400
-admin2-deb9build ansible_host=2a01:4f8:13b:828::1:300
+admin2-deb9build ansible_host=2a01:4f8:13b:828::1:300 osmocom_jenkins_slave_fstrim=True
 build2-deb8build-ansible ansible_host=2a01:4f8:10b:2ad9::1:7
-build2-deb9build-ansible ansible_host=2a01:4f8:10b:2ad9::1:6
+build2-deb9build-ansible ansible_host=2a01:4f8:10b:2ad9::1:6 osmocom_jenkins_slave_fstrim=True
 host2-deb8build-ansible ansible_host=2a01:4f8:120:8470::1:2
-host2-deb9build-ansible ansible_host=2a01:4f8:120:8470::1:3
+host2-deb9build-ansible ansible_host=2a01:4f8:120:8470::1:3 osmocom_jenkins_slave_fstrim=True
diff --git a/ansible/roles/osmocom-jenkins-slave/defaults/main.yml b/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
index 3f2fa8a..e32b5a0 100644
--- a/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
+++ b/ansible/roles/osmocom-jenkins-slave/defaults/main.yml
@@ -9,3 +9,6 @@
 
 # Setup the ttcn3 requirements
 ttcn3_slave: true
+
+# call fstrim peridically
+osmocom_jenkins_slave_fstrim: false
diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
index 4d7b963..f8b29d8 100644
--- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
+++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml
@@ -109,3 +109,10 @@
   copy:
     src: gitconfig
     dest: "/home/{{ jenkins_user }}/.gitconfig"
+
+- name: call fstrim periodically
+  cron:
+    name: "fstrim"
+    hour: "*/12"
+    job: "fstrim / >/dev/null 2>/dev/null || true"
+  when: osmocom_jenkins_slave_fstrim

-- 
To view, visit https://gerrit.osmocom.org/7724
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I82c497f476abf43148e8d7c027f53b87b5a738fb
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list