issue #202: ansible: forget all dependent contexts on Stream disconnect
This is a partial fix, there are still at least 2 cases needing covered: - In-progress connections must have CallError or similar sent to any waiters - Once connection delegation exists, it is possible for other worker processes to be active (and in any step in the process), trying to communicate with a context that we know can no longer be communicated with. The solution to that isn't clear yet. Additionally ensure root has /bin/bash shell in both Docker images.pull/203/head
parent
c5fe817db2
commit
dc4433ace6
@ -1 +1,2 @@
|
|||||||
- import_playbook: lru_one_target.yml
|
- import_playbook: lru_one_target.yml
|
||||||
|
- import_playbook: reconnection.yml
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
# Test ContextService ability to handle disconnections, including handling
|
||||||
|
# cleanup of dependent (via=) contexts.
|
||||||
|
|
||||||
|
- name: integration/context_service/reconnection.yml
|
||||||
|
hosts: all
|
||||||
|
any_errors_fatal: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- become: true
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: old_become_env
|
||||||
|
|
||||||
|
- become: true
|
||||||
|
# This must be >1 for vanilla Ansible.
|
||||||
|
shell: |
|
||||||
|
bash -c "( sleep 3; pkill -f sshd:; ) & disown"
|
||||||
|
|
||||||
|
- connection: local
|
||||||
|
shell: sleep 3
|
||||||
|
|
||||||
|
- wait_for_connection:
|
||||||
|
|
||||||
|
- become: true
|
||||||
|
custom_python_detect_environment:
|
||||||
|
register: new_become_env
|
||||||
|
|
||||||
|
# Verify the PIDs really changed (i.e. disconnection happened)
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- old_become_env.pid != new_become_env.pid
|
||||||
Loading…
Reference in New Issue