From d01411c3c4af6c724a3800c621804ea979818d6d Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Thu, 10 Oct 2019 15:31:28 +0000 Subject: Cleanup via Ansible + Remove dependency on topo_ scripts that depends on custom SSH() that depends on framework itself. This way the cleanup is independent of failure in our SSH libs. + Simple ansible command can do cleanup of a machine: ansible-playbook --inventory inventories/lf_inventory/hosts site.yaml \ --limit '10.32.8.18' --tags 'cleanup' + Add vpp_device reset and cleanup. + Remove historical scripts. - Still in testing beta phase. - Need to add SRIOV cleanup. Signed-off-by: Peter Mikus Change-Id: I68e23304c7ad01041f51263c328c6e8d9b555cb7 --- .../ansible/roles/cleanup/tasks/sut.yaml | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml (limited to 'resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml') diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml new file mode 100644 index 0000000000..5083a96a29 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml @@ -0,0 +1,52 @@ +--- +# file: roles/cleanup/tasks/sut.yaml + +- name: Kill processes - qemu + import_tasks: kill_process.yaml + vars: + process: "qemu" + tags: kill-process + +- name: Kill processes - l3fwd + import_tasks: kill_process.yaml + vars: + process: "l3fwd" + tags: kill-process + +- name: Kill processes - testpmd + import_tasks: kill_process.yaml + vars: + process: "testpmd" + tags: kill-process + +- name: Remove file or dir - HoneyComb logs + file: + state: absent + path: "/var/log/honeycomb" + tags: remove-file-dir + +- name: Remove file or dir - Core zip file + file: + state: absent + path: "/tmp/*tar.lzo.lrz.xz*" + tags: remove-file-dir + +- name: Remove file or dir - Core dump file + file: + state: absent + path: "/tmp/*core*" + tags: remove-file-dir + +- name: Kill containers - Remove all containers + import_tasks: kill_containers.yaml + tags: kill-containers + +- name: Kubernetes - Reset + raw: 'kubeadm reset --force' + tags: kill-kubernetes + +- name: Remove packages - Remove VPP + import_tasks: remove_package.yaml + vars: + package: "*vpp*" + tags: remove-package -- cgit 1.2.3-korg