forked from projectatomic/atomic-host-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
system-containers: use continue-on-failure model (projectatomic#400)
This updates the `system-containers` suite to use the 'continue-on-failure` model that has been used for other test suites.
- Loading branch information
1 parent
c0f37d5
commit b834477
Showing
11 changed files
with
668 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
# vim: set ft=ansible: | ||
# | ||
- import_role: | ||
name: atomic_images_delete_all | ||
tags: | ||
- atomic_images_delete_all | ||
|
||
- when: ansible_distribution == 'RedHat' | ||
import_role: | ||
name: redhat_unsubscribe | ||
tags: | ||
- redhat_unsubscribe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
# vim: set ft=ansible: | ||
# | ||
|
||
- name: Check for etcd rpm | ||
command: rpm -q etcd | ||
register: rpm_etcd | ||
ignore_errors: true | ||
|
||
- name: Check for flannel rpm | ||
command: rpm -q flannel | ||
register: rpm_flannel | ||
ignore_errors: true | ||
|
||
- name: Stop flanneld server if flannel rpm present | ||
when: rpm_flannel.rc == 0 | ||
service: | ||
name: flanneld | ||
state: stopped | ||
enabled: false | ||
|
||
- name: Stop etcd service if etcd rpm present | ||
when: rpm_etcd.rc == 0 | ||
service: | ||
name: etcd | ||
state: stopped | ||
enabled: false | ||
|
||
- name: Install etcd | ||
command: > | ||
atomic install --system | ||
--name=etcd | ||
{{ etcd_image }} | ||
register: ai_etcd | ||
retries: 5 | ||
delay: 60 | ||
until: ai_etcd|success | ||
|
||
- name: Start etcd | ||
command: systemctl start etcd | ||
|
||
- name: Verify etcd is active | ||
command: systemctl is-active etcd | ||
register: etcd_output | ||
failed_when: "'active' not in etcd_output.stdout" | ||
|
||
- name: Wait for etcd port to open | ||
wait_for: | ||
port: 2379 | ||
timeout: 30 | ||
|
||
- name: Configure etcd | ||
command: > | ||
runc exec etcd etcdctl | ||
set /atomic.io/network/config '{"Network":"172.17.0.0/16"}' | ||
- name: Install flannel | ||
command: > | ||
atomic install --system | ||
--name=flannel | ||
{{ flannel_image }} | ||
register: ai_flannel | ||
retries: 5 | ||
delay: 60 | ||
until: ai_flannel|success | ||
|
||
- name: Start flannel | ||
command: systemctl start flannel | ||
|
||
- name: Verify flannel service is active | ||
command: systemctl is-active flannel | ||
register: flannel_output | ||
failed_when: "'active' not in flannel_output.stdout" | ||
|
||
- import_role: | ||
name: atomic_system_uninstall | ||
vars: | ||
asu_name: "{{ etcd_name }}" | ||
|
||
- import_role: | ||
name: atomic_system_uninstall | ||
vars: | ||
asu_name: "{{ flannel_name }}" | ||
|
||
# Upstream issue with flannel container installation stopping docker | ||
# https://github.com/projectatomic/atomic-system-containers/issues/23 | ||
- name: Start docker | ||
when: "'gscrivano' in etcd_image" | ||
command: systemctl start docker | ||
|
||
- import_role: | ||
name: atomic_system_uninstall_verify | ||
vars: | ||
asuv_image: "{{ etcd_image }}" | ||
|
||
- import_role: | ||
name: atomic_system_uninstall_verify | ||
vars: | ||
asuv_image: "{{ flannel_image }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# vim: set ft=ansible: | ||
# | ||
# - Verify system containers can be installed through atomic command | ||
# - Verify system containers can be uninstalled through the atomic command | ||
# - Verify user can specify name for system containers | ||
# - Verify system containers can be listed | ||
|
||
- import_role: | ||
name: atomic_system_install | ||
vars: | ||
asi_image: "{{ g_hw_image }}" | ||
|
||
- import_role: | ||
name: atomic_system_install_verify | ||
vars: | ||
asiv_image: "{{ g_hw_image }}" | ||
|
||
- import_role: | ||
name: atomic_system_uninstall | ||
vars: | ||
asu_name: "{{ g_hw_name }}" | ||
|
||
# uninstall can only be done by name because multiple system containers can | ||
# use the same image https://github.com/projectatomic/atomic/issues/705 | ||
- import_role: | ||
name: atomic_system_uninstall_verify | ||
vars: | ||
asuv_image: "{{ g_hw_image }}" |
Oops, something went wrong.