1440
This commit is contained in:
@@ -426,6 +426,14 @@
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: VERIFY Debug ppp0 probe result
|
||||
when: debugging | bool
|
||||
delegate_to: localhost
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- 'DEV2 probe ppp0 exists raw={{ (dev2_ppp0_exists.stdout | default("") ) | trim }}'
|
||||
- "DEV2 probe ppp0 exists rc={{ dev2_ppp0_exists.rc | default('n/a') }}"
|
||||
|
||||
- name: VERIFY DEV2 check eth0.4000 exists?
|
||||
delegate_to: localhost
|
||||
ansible.builtin.shell: |
|
||||
@@ -436,6 +444,14 @@
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: VERIFY Debug eth0.4000 link probe result
|
||||
when: debugging | bool
|
||||
delegate_to: localhost
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- 'DEV2 probe eth0.4000 exists raw={{ (dev2_eth04000_exists.stdout | default("") ) | trim }}'
|
||||
- "DEV2 probe eth0.4000 exists rc={{ dev2_eth04000_exists.rc | default('n/a') }}"
|
||||
|
||||
- name: VERIFY DEV2 check eth0.4000 has IPv4?
|
||||
delegate_to: localhost
|
||||
ansible.builtin.shell: |
|
||||
@@ -446,6 +462,14 @@
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: VERIFY Debug eth0.4000 IPv4 probe result
|
||||
when: debugging | bool
|
||||
delegate_to: localhost
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- 'DEV2 probe eth0.4000 has IPv4 raw={{ (dev2_eth04000_has_ipv4.stdout | default("") ) | trim }}'
|
||||
- "DEV2 probe eth0.4000 has IPv4 rc={{ dev2_eth04000_has_ipv4.rc | default('n/a') }}"
|
||||
|
||||
- name: VERIFY Summarize DHCP migration state
|
||||
delegate_to: localhost
|
||||
ansible.builtin.set_fact:
|
||||
@@ -462,25 +486,39 @@
|
||||
}}
|
||||
changed_when: false
|
||||
|
||||
- name: VERIFY Result DHCP migrated (SUCCESS) or not (graceful stop)
|
||||
- name: VERIFY Classify migration state
|
||||
delegate_to: localhost
|
||||
ansible.builtin.set_fact:
|
||||
dhcp_state: >-
|
||||
{% if (dhcp_migrated_ok | bool) %}
|
||||
case_a_dhcp_ok
|
||||
{% elif (ppp0_exists | bool) and (not (eth04000_exists | bool)) %}
|
||||
case_b_pppoe_old
|
||||
{% elif (ppp0_exists | bool) and (eth04000_exists | bool) %}
|
||||
case_c_mixed
|
||||
{% else %}
|
||||
unknown
|
||||
{% endif %}
|
||||
changed_when: false
|
||||
|
||||
- name: VERIFY Report migration state summary
|
||||
delegate_to: localhost
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- "DHCP reacquire check via dev2_conn_final={{ dev2_conn_final }}"
|
||||
- "ppp0_exists={{ ppp0_exists }}"
|
||||
- "eth0.4000_exists={{ eth04000_exists }}"
|
||||
- "eth0.4000_has_ipv4={{ eth04000_has_ipv4 }}"
|
||||
- "dhcp_migrated_ok={{ dhcp_migrated_ok }}"
|
||||
- "DEV2 connectivity via {{ dev2_conn_final }}"
|
||||
- "DEV2 probes ppp0={{ ppp0_exists }} eth0.4000={{ eth04000_exists }} eth0.4000_ipv4={{ eth04000_has_ipv4 }}"
|
||||
- "DEV2 classified state={{ dhcp_state }}"
|
||||
- "DEV2 DHCP migrated ok={{ dhcp_migrated_ok }}"
|
||||
|
||||
- name: VERIFY Graceful stop if DHCP migration state is not confirmed
|
||||
- name: VERIFY Report why migration is not confirmed
|
||||
when: not (dhcp_migrated_ok | bool)
|
||||
delegate_to: localhost
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
- "Graceful stop DHCP state not confirmed"
|
||||
- "ppp0_exists={{ ppp0_exists }}"
|
||||
- "eth0.4000_exists={{ eth04000_exists }}"
|
||||
- "eth0.4000_has_ipv4={{ eth04000_has_ipv4 }}"
|
||||
- "DEV2 is not confirmed as DHCP-migrated"
|
||||
- "DEV2 classified state={{ dhcp_state }}"
|
||||
- "Expected for success case A: ppp0 absent, eth0.4000 present, eth0.4000 has IPv4"
|
||||
- "Observed: ppp0={{ ppp0_exists }}, eth0.4000={{ eth04000_exists }}, eth0.4000_ipv4={{ eth04000_has_ipv4 }}"
|
||||
changed_when: false
|
||||
|
||||
- name: VERIFY End host if DHCP migration state is not confirmed
|
||||
@@ -585,3 +623,4 @@
|
||||
del_ip.rc != 0
|
||||
and ('Cannot assign requested address' not in (del_ip.stdout | default('')))
|
||||
and ('Cannot assign requested address' not in (del_ip.stderr | default('')))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user