Add Garbage Cleanning to VIRL 18/6718/2
authorPeter Mikus <pmikus@cisco.com>
Tue, 16 May 2017 09:48:43 +0000 (11:48 +0200)
committerPeter Mikus <pmikus@cisco.com>
Tue, 16 May 2017 09:55:12 +0000 (09:55 +0000)
- add cleaning of old VPP builds (deb|rpm)
- add cleaning of old session dirs
- add cleaning of old QEMU logs

Change-Id: Ib2849cc3969de75525f13d80dc87b32fb82865af
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/tools/testbed-setup/playbooks/01-host-setup.yaml

index 07bbe4a..93b2246 100644 (file)
     copy: src=files/sudoers_virl dest=/etc/sudoers.d/virl owner=root group=root mode=660
   - name: Set VIRL user authorized key
     authorized_key: user=virl key="{{ lookup('file', '/home/testuser/.ssh/id_rsa.pub') }}"
+  - cron:
+    name: QEMU log garbage collector
+    minute: 0
+    hour: 0
+    job: "find /var/log/libvirt/qemu -type f -mtime +14 -name 'instance*.log' -delete"
+  - cron:
+    name: VPP deb package garbage collector
+    minute: 0
+    hour: 0
+    job: "find /tmp -type f -atime +14 -name '*.deb' -delete"
+  - cron:
+    name: VPP rpm package garbage collector
+    minute: 0
+    hour: 0
+    job: "find /tmp -type f -atime +14 -name '*.rpm' -delete"
+  - cron:
+    name: NFS scratch dir garbage collector
+    minute: 0
+    hour: 0
+    job: "find /nfs/scratch/ -type d -mtime +14 -name 'session-*' -delete"
 - hosts: tg:sut
   remote_user: testuser
   sudo: yes

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.