Change-Id: Ice975127f8ecdd4cead418151cf37d61dfb218a0
Signed-off-by: Peter Mikus <pmikus@cisco.com>
# Kill docker containers.
docker rm --force "${DCR_UUIDS[@]}" || die "Cleanup containers failed!"
# Kill docker containers.
docker rm --force "${DCR_UUIDS[@]}" || die "Cleanup containers failed!"
- # Remove DUT1 /tmp volume
- docker volume rm "${DCR_VOLUMES[dut1]}" || {
- die "Failed to remove DUT1 /tmp volume!"
+ # Check if some container is using volume and remove all the hanged
+ # containers before removing volume. Command will not fail in case there
+ # are no containers to remove.
+ docker rm --force $(docker ps -q --filter volume=${DCR_VOLUMES[dut1]}) || {
+ warn "Failed to remove hanged containers or nothing to remove!"
+ }
+
+ # Remove DUT1 volume.
+ docker volume rm --force "${DCR_VOLUMES[dut1]}" || {
+ die "Failed to remove DUT1 volume!"
}
# Rebind interfaces back to kernel drivers.
}
# Rebind interfaces back to kernel drivers.
command: systemctl enable csit-initialize-vfs.service
tags: enable-vf-service
command: systemctl enable csit-initialize-vfs.service
tags: enable-vf-service
+- name: Update GRUB
+ command: update-grub
+ tags: update-grub
+
mode: '644'
notify: ['Enable csit-initialize-vfs.service']
tags: copy-vf-service
mode: '644'
notify: ['Enable csit-initialize-vfs.service']
tags: copy-vf-service
+
+- name: Set isolcpus and pstate parameter
+ lineinfile:
+ path: '/etc/default/grub'
+ state: 'present'
+ regexp: '^GRUB_CMDLINE_LINUX='
+ line: 'GRUB_CMDLINE_LINUX="hugepagesz=2M hugepages=65536"'
+ notify: ['Update GRUB']
+