0815
This commit is contained in:
@@ -50,6 +50,12 @@
|
|||||||
control_queue: "{{ lookup('env','CONTROLQUEUE') | default('queue_controls', true) }}"
|
control_queue: "{{ lookup('env','CONTROLQUEUE') | default('queue_controls', true) }}"
|
||||||
afterupgrade_routing_key: "{{ lookup('env','AFTERUP_ROUTING_KEY') | default('deviceconfig', true) }}"
|
afterupgrade_routing_key: "{{ lookup('env','AFTERUP_ROUTING_KEY') | default('deviceconfig', true) }}"
|
||||||
|
|
||||||
|
# --- TEMP: stall-test knobs (remove later) ---
|
||||||
|
aic_stall_test: true # enable/disable the simulated stall on DEV2
|
||||||
|
aic_stall_sleep: 1000 # seconds to sleep on DEV2 (simulate hang)
|
||||||
|
aic_stall_async: 10 # async timeout (seconds) for the sleep job on DEV2
|
||||||
|
aic_stall_poll: 2 # poll interval (seconds) while watching the job
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
# ------------------------------- Hostname sanity DEV1 -------------------------------
|
# ------------------------------- Hostname sanity DEV1 -------------------------------
|
||||||
- name: Read DEV1 hostname (busybox-safe)
|
- name: Read DEV1 hostname (busybox-safe)
|
||||||
@@ -455,6 +461,63 @@
|
|||||||
_blocked: true
|
_blocked: true
|
||||||
_journal: "{{ _journal + [ 'Preparation markers already present on DEV2 (count=' ~ (dev2_prep_count.stdout | trim) ~ '). Skipping staging/write' ] }}"
|
_journal: "{{ _journal + [ 'Preparation markers already present on DEV2 (count=' ~ (dev2_prep_count.stdout | trim) ~ '). Skipping staging/write' ] }}"
|
||||||
|
|
||||||
|
# test test test
|
||||||
|
|
||||||
|
# === TEMP: STALL TEST ON DEV2 (BEGIN) ========================================
|
||||||
|
# Enable with: -e aic_stall_test=true
|
||||||
|
# Optional knobs: -e aic_stall_sleep=1000 -e aic_stall_async=10 -e aic_stall_poll=2
|
||||||
|
|
||||||
|
- name: TEMP | Set stall test toggles from env/defaults
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
aic_stall_test: "{{ (aic_stall_test | default(lookup('env','AIC_STALL_TEST') | default('false', true))) | bool }}"
|
||||||
|
aic_stall_sleep: "{{ (aic_stall_sleep | default(lookup('env','AIC_STALL_SLEEP') | default(1000, true))) | int }}"
|
||||||
|
aic_stall_async: "{{ (aic_stall_async | default(lookup('env','AIC_STALL_ASYNC') | default(10, true))) | int }}"
|
||||||
|
aic_stall_poll: "{{ (aic_stall_poll | default(lookup('env','AIC_STALL_POLL') | default(2, true))) | int }}"
|
||||||
|
|
||||||
|
- name: TEMP | Announce stall test settings
|
||||||
|
when: aic_stall_test
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg:
|
||||||
|
- "STALL TEST ENABLED"
|
||||||
|
- "sleep={{ aic_stall_sleep }}s async_cap={{ aic_stall_async }}s poll={{ aic_stall_poll }}s"
|
||||||
|
|
||||||
|
- name: TEMP | Simulate a stuck operation on DEV2 via tunnel (async-capped)
|
||||||
|
when: aic_stall_test
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.shell: |
|
||||||
|
set -e
|
||||||
|
PORT="{{ _local_port }}"
|
||||||
|
sshpass -f "{{ dev2_passfile_used }}" ssh \
|
||||||
|
-o AddressFamily=inet \
|
||||||
|
-o StrictHostKeyChecking=no -o PubkeyAuthentication=no \
|
||||||
|
-o PreferredAuthentications=password -o NumberOfPasswordPrompts=1 \
|
||||||
|
-o ConnectTimeout=10 \
|
||||||
|
-p "$PORT" "{{ dev2_ssh_user }}@127.0.0.1" \
|
||||||
|
"sh -c 'date; echo STALL-TEST-START; sleep {{ aic_stall_sleep }}; echo STALL-TEST-END; date'"
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
async: "{{ aic_stall_async }}"
|
||||||
|
poll: "{{ aic_stall_poll }}"
|
||||||
|
register: stall_test_result
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false # capture outcome; don't fail the whole play
|
||||||
|
|
||||||
|
- name: TEMP | Show stall test result (expect timeout-ish when sleep > async)
|
||||||
|
when: aic_stall_test
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.debug:
|
||||||
|
var: stall_test_result
|
||||||
|
|
||||||
|
- name: TEMP | Exit early after stall test (no device actions beyond this point)
|
||||||
|
when: aic_stall_test
|
||||||
|
ansible.builtin.meta: end_play
|
||||||
|
# === TEMP: STALL TEST ON DEV2 (END) ==========================================
|
||||||
|
|
||||||
|
|
||||||
|
# test test test
|
||||||
|
|
||||||
# ---------------------------- DEV2 version firmux primary check ----------------------------
|
# ---------------------------- DEV2 version firmux primary check ----------------------------
|
||||||
- name: Read DEV2 /usr/lib/release/firmux (if present)
|
- name: Read DEV2 /usr/lib/release/firmux (if present)
|
||||||
when: dev2_passfile_used != "NONE"
|
when: dev2_passfile_used != "NONE"
|
||||||
|
|||||||
Reference in New Issue
Block a user