Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions ansible/roles/test/tasks/advanced-reboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,26 @@
- include: ptf_runner_reboot.yml
with_items: "{{ preboot_list }}"

# When new image is defined, test removed /host/config_db.json
# before warm rebooting. So after the device boots up, it will
# miss /etc/sonic/config_db.json. It is not an issue for the
# device to stay up. But it will be an issue when device reboot
# again (cold or fast).
- name: Save configuration after warm rebooting into new image
shell: config save -y
become: yes
when:
- new_sonic_image is defined
- reboot_type == "warm-reboot"

- name: check /etc/sonic/config_db.json existence
stat:
path: /etc/sonic/config_db.json
register: stat_result

- fail: msg="/etc/sonic/config_db.json is missing"
when: not stat_result.stat.exists

always:
- name: Remove existing ip from ptf host
script: roles/test/files/helpers/remove_ip.sh
Expand Down