diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index 1140da160e..ba00838e90 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait roles: - { role: "memcached_server", tags: [ "memcached-server" ] } - role: "system_crontab_coordination" diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index 16cf317e41..52b02dc7dd 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -40,7 +40,7 @@ host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" tags: - - ceilometer-ssh-wait + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-cinder-install.yml b/playbooks/os-cinder-install.yml index 262a9992e6..cb865767b8 100644 --- a/playbooks/os-cinder-install.yml +++ b/playbooks/os-cinder-install.yml @@ -80,8 +80,11 @@ search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 tags: - - rabbit-ssh-wait + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 6767ae4fab..32d5fbf703 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -51,7 +51,7 @@ host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" tags: - - glance-ssh-wait + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index ec3f3da5ab..5b1e3ed14d 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index da71cd2276..53326267b2 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index 23925700a9..bddea58c54 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-neutron-install.yml b/playbooks/os-neutron-install.yml index 7b1eb47b78..d81770d10c 100644 --- a/playbooks/os-neutron-install.yml +++ b/playbooks/os-neutron-install.yml @@ -56,7 +56,7 @@ host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" tags: - - neutron-ssh-wait + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 2c21fbea93..d7919cef54 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait - name: Sort the rabbitmq servers dist_sort: value_to_lookup: "{{ container_name }}" diff --git a/playbooks/os-swift-setup.yml b/playbooks/os-swift-setup.yml index 215d4eece7..fd8cece2ca 100644 --- a/playbooks/os-swift-setup.yml +++ b/playbooks/os-swift-setup.yml @@ -29,6 +29,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait - name: Create log dir file: path: "{{ item.path }}" diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index 45adad9701..fd18833bd3 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait roles: - role: "rabbitmq_server" tags: diff --git a/playbooks/repo-server.yml b/playbooks/repo-server.yml index 2903ac0640..50c7d738e7 100644 --- a/playbooks/repo-server.yml +++ b/playbooks/repo-server.yml @@ -51,7 +51,7 @@ host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" tags: - - repo-ssh-wait + - ssh-wait roles: - { role: "repo_server", tags: [ "repo-server" ] } - role: "rsyslog_client" diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index 639f445eb2..404892f015 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -58,8 +58,11 @@ search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 tags: - - rsyslog-ssh-wait + - ssh-wait roles: - { role: "rsyslog_server", tags: [ "rsyslog-server" ] } diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index c160d89435..8a27621b9e 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -27,6 +27,23 @@ when: not is_metal | bool tags: - lxc-aa-profile + - name: Flush net cache + command: /usr/local/bin/lxc-system-manage flush-net-cache + delegate_to: "{{ physical_host }}" + tags: + - flush-net-cache + - name: Wait for container ssh + wait_for: + port: "22" + delay: "{{ ssh_delay }}" + search_regex: "OpenSSH" + host: "{{ ansible_ssh_host }}" + delegate_to: "{{ physical_host }}" + register: ssh_wait_check + until: ssh_wait_check|success + retries: 3 + tags: + - ssh-wait roles: - { role: "galera_client", tags: [ "utility-galera-client" ] } - { role: "pip_lock_down", tags: [ "utility-pip-lock-down" ] } diff --git a/requirements.txt b/requirements.txt index f29cd0ef6c..6242df40f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ cloudlib>=0.3.0 # scripts/os-ansible-role-requirements.py Jinja2>=2.6 # ansible -netaddr>=0.7.12 # playbooks/inventory/dynamic_inventory.py +netaddr>=0.7.12,<0.7.16 # playbooks/inventory/dynamic_inventory.py paramiko>=1.13.0 # ansible pip>=6.0 PrettyTable>=0.7,<0.8 # scripts/inventory-manage.py