mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #5713/1f492414 backport][stable-6] CI: add extra VMs for certain tests (#5717)
CI: add extra VMs for certain tests (#5713) * Remove superfluous VM. * Add extra VM group. * More platforms, add scripts. * [REVERT THIS] Shrink matrix to only the tests we are interested in. * Fix some tests. * Skip snap tests on Ubuntu VMs for now. * Skip xfs_quota tests on Alpine VMs due to ansible.posix.mount failing. * Revert "[REVERT THIS] Shrink matrix to only the tests we are interested in." This reverts commit2e98e163db
. * Stick to Alpine and Ubuntu 22.04 for now. (cherry picked from commit1f49241481
) Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
bc50b48205
commit
a70d9773dd
20 changed files with 83 additions and 42 deletions
|
@ -189,6 +189,24 @@ stages:
|
|||
- test: 3.5
|
||||
|
||||
## Remote
|
||||
- stage: Remote_devel_extra_vms
|
||||
displayName: Remote devel extra VMs
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: devel/{0}
|
||||
targets:
|
||||
- name: Alpine 3.16
|
||||
test: alpine/3.16
|
||||
# - name: Fedora 36
|
||||
# test: fedora/36
|
||||
# - name: Ubuntu 20.04
|
||||
# test: ubuntu/20.04
|
||||
- name: Ubuntu 22.04
|
||||
test: ubuntu/22.04
|
||||
groups:
|
||||
- vm
|
||||
- stage: Remote_devel
|
||||
displayName: Remote devel
|
||||
dependsOn: []
|
||||
|
@ -203,8 +221,6 @@ stages:
|
|||
test: rhel/7.9
|
||||
- name: RHEL 9.0
|
||||
test: rhel/9.0
|
||||
- name: FreeBSD 12.3
|
||||
test: freebsd/12.3
|
||||
- name: FreeBSD 13.1
|
||||
test: freebsd/13.1
|
||||
groups:
|
||||
|
@ -221,8 +237,8 @@ stages:
|
|||
targets:
|
||||
- name: RHEL 9.0
|
||||
test: rhel/9.0
|
||||
- name: FreeBSD 13.1
|
||||
test: freebsd/13.1
|
||||
- name: FreeBSD 12.3
|
||||
test: freebsd/12.3
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
|
@ -459,6 +475,7 @@ stages:
|
|||
- Units_2_12
|
||||
- Units_2_13
|
||||
- Units_2_14
|
||||
- Remote_devel_extra_vms
|
||||
- Remote_devel
|
||||
- Remote_2_11
|
||||
- Remote_2_12
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
destructive
|
||||
skip/aix
|
||||
skip/osx
|
||||
|
|
|
@ -14,10 +14,14 @@
|
|||
block:
|
||||
- when: fstype == 'lvm'
|
||||
block:
|
||||
- name: 'Show next free loop device'
|
||||
ansible.builtin.command:
|
||||
cmd: 'losetup -f'
|
||||
register: loop_device_cmd
|
||||
|
||||
- name: 'Create a loop device for LVM'
|
||||
ansible.builtin.command:
|
||||
cmd: 'losetup --show -f {{ dev }}'
|
||||
register: loop_device_cmd
|
||||
cmd: 'losetup -f {{ dev }}'
|
||||
|
||||
- name: 'Switch to loop device target for further tasks'
|
||||
ansible.builtin.set_fact:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
destructive
|
||||
skip/docker # kernel modules not loadable
|
||||
skip/freebsd # no iptables/netfilter (Linux specific)
|
||||
|
|
|
@ -167,13 +167,12 @@
|
|||
|
||||
|
||||
|
||||
- name: "get security, raw and mangle tables states"
|
||||
- name: "get raw and mangle tables states"
|
||||
iptables_state:
|
||||
path: "{{ iptables_saved }}"
|
||||
state: saved
|
||||
table: "{{ item }}"
|
||||
loop:
|
||||
- security
|
||||
- raw
|
||||
- mangle
|
||||
changed_when: false
|
||||
|
@ -198,8 +197,6 @@
|
|||
- "'*nat' in iptables_state.saved"
|
||||
- "'raw' in iptables_state.tables"
|
||||
- "'*raw' in iptables_state.saved"
|
||||
- "'security' in iptables_state.tables"
|
||||
- "'*security' in iptables_state.saved"
|
||||
quiet: yes
|
||||
|
||||
|
||||
|
@ -233,17 +230,14 @@
|
|||
- "'*mangle' in iptables_state.initial_state"
|
||||
- "'*nat' in iptables_state.initial_state"
|
||||
- "'*raw' in iptables_state.initial_state"
|
||||
- "'*security' in iptables_state.initial_state"
|
||||
- "'filter' in iptables_state.tables"
|
||||
- "'mangle' not in iptables_state.tables"
|
||||
- "'nat' not in iptables_state.tables"
|
||||
- "'raw' not in iptables_state.tables"
|
||||
- "'security' not in iptables_state.tables"
|
||||
- "'*filter' in iptables_state.restored"
|
||||
- "'*mangle' not in iptables_state.restored"
|
||||
- "'*nat' not in iptables_state.restored"
|
||||
- "'*raw' not in iptables_state.restored"
|
||||
- "'*security' not in iptables_state.restored"
|
||||
- iptables_state is not changed
|
||||
quiet: yes
|
||||
|
||||
|
@ -264,17 +258,14 @@
|
|||
- "'*mangle' in iptables_state.initial_state"
|
||||
- "'*nat' in iptables_state.initial_state"
|
||||
- "'*raw' in iptables_state.initial_state"
|
||||
- "'*security' in iptables_state.initial_state"
|
||||
- "'filter' in iptables_state.tables"
|
||||
- "'mangle' in iptables_state.tables"
|
||||
- "'nat' in iptables_state.tables"
|
||||
- "'raw' in iptables_state.tables"
|
||||
- "'security' in iptables_state.tables"
|
||||
- "'*filter' in iptables_state.restored"
|
||||
- "'*mangle' in iptables_state.restored"
|
||||
- "'*nat' in iptables_state.restored"
|
||||
- "'*raw' in iptables_state.restored"
|
||||
- "'*security' in iptables_state.restored"
|
||||
- iptables_state is not changed
|
||||
quiet: yes
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
destructive
|
||||
needs/privileged
|
||||
skip/aix
|
||||
|
|
|
@ -7,12 +7,21 @@
|
|||
command: "dd if=/dev/zero of={{ remote_tmp_dir }}/img{{ item }} bs=1M count=10"
|
||||
with_sequence: 'count=2'
|
||||
|
||||
- name: "Show next free loop device"
|
||||
command: "losetup -f"
|
||||
register: loop_device1
|
||||
|
||||
- name: "Create loop device for file"
|
||||
command: "losetup --show -f {{ remote_tmp_dir }}/img{{ item }}"
|
||||
with_sequence: 'count=2'
|
||||
register: loop_devices
|
||||
command: "losetup -f {{ remote_tmp_dir }}/img1"
|
||||
|
||||
- name: "Show next free loop device"
|
||||
command: "losetup -f"
|
||||
register: loop_device2
|
||||
|
||||
- name: "Create loop device for file"
|
||||
command: "losetup -f {{ remote_tmp_dir }}/img2"
|
||||
|
||||
- name: "Affect name on disk to work on"
|
||||
set_fact:
|
||||
loop_device1: "{{ loop_devices.results[0] }}"
|
||||
loop_device2: "{{ loop_devices.results[1] }}"
|
||||
loop_device1: "{{ loop_device1.stdout }}"
|
||||
loop_device2: "{{ loop_device2.stdout }}"
|
||||
|
|
|
@ -8,15 +8,16 @@
|
|||
vg: testvg
|
||||
state: absent
|
||||
|
||||
- name: Detach loop device
|
||||
command: "losetup -d {{ item.stdout }}"
|
||||
loop: "{{ loop_devices.results|default([]) }}"
|
||||
- name: Detach loop devices
|
||||
command: "losetup -d {{ item }}"
|
||||
loop:
|
||||
- "{{ loop_device1 | default('') }}"
|
||||
- "{{ loop_device2 | default('') }}"
|
||||
when:
|
||||
- item.stdout is defined
|
||||
- item.stdout is match("/dev/.*")
|
||||
- item != ''
|
||||
|
||||
- name: Remove device files
|
||||
file:
|
||||
path: "{{ remote_tmp_dir }}/img{{ item }}"
|
||||
state: absent
|
||||
with_sequence: 'count={{ loop_devices.results|length }}'
|
||||
with_sequence: 'count=2'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: "Create volume group on first disk"
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
|
||||
- name: "get lvm facts"
|
||||
setup:
|
||||
|
@ -16,14 +16,14 @@
|
|||
- name: "Assert the testvg span only on first disk"
|
||||
assert:
|
||||
that:
|
||||
- ansible_lvm.pvs[loop_device1.stdout].vg == "testvg"
|
||||
- 'loop_device2.stdout not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device2.stdout].vg == ""'
|
||||
- ansible_lvm.pvs[loop_device1].vg == "testvg"
|
||||
- 'loop_device2 not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device2].vg == ""'
|
||||
|
||||
- name: "Extend to second disk AND reduce from the first disk"
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device2.stdout }}"
|
||||
pvs: "{{ loop_device2 }}"
|
||||
|
||||
- name: "get lvm facts"
|
||||
setup:
|
||||
|
@ -33,6 +33,6 @@
|
|||
- name: "Assert the testvg span only on first disk"
|
||||
assert:
|
||||
that:
|
||||
- 'loop_device1.stdout not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device1.stdout].vg == ""'
|
||||
- ansible_lvm.pvs[loop_device2.stdout].vg == "testvg"
|
||||
- 'loop_device1 not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device1].vg == ""'
|
||||
- ansible_lvm.pvs[loop_device2].vg == "testvg"
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
- name: Create volume group on disk device
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
|
||||
- name: Create the volume group again to verify idempotence
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
register: repeat_vg_create
|
||||
|
||||
- name: Do all assertions to verify expected results
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: "Create volume group on first disk"
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
|
||||
- name: Gets current vg size
|
||||
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
|
||||
|
@ -21,12 +21,12 @@
|
|||
command: "dd if=/dev/zero bs=8MiB count=1 of={{ remote_tmp_dir }}/img1 conv=notrunc oflag=append"
|
||||
|
||||
- name: "Reread size of file associated with loop_device1"
|
||||
command: "losetup -c {{ loop_device1.stdout }}"
|
||||
command: "losetup -c {{ loop_device1 }}"
|
||||
|
||||
- name: "Reruns lvg with pvresize:no"
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
pvresize: no
|
||||
register: cmd_result
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
- name: "Reruns lvg with pvresize:yes and check_mode:yes"
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
pvresize: yes
|
||||
check_mode: yes
|
||||
register: cmd_result
|
||||
|
@ -68,7 +68,7 @@
|
|||
- name: "Reruns lvg with pvresize:yes"
|
||||
lvg:
|
||||
vg: testvg
|
||||
pvs: "{{ loop_device1.stdout }}"
|
||||
pvs: "{{ loop_device1 }}"
|
||||
pvresize: yes
|
||||
|
||||
- name: Gets current vg size
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
skip/aix
|
||||
skip/alpine
|
||||
skip/fedora
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/docker
|
||||
skip/ubuntu # FIXME!
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
skip/aix
|
||||
skip/alpine
|
||||
skip/fedora
|
||||
skip/freebsd
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/docker
|
||||
skip/ubuntu # FIXME!
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/2
|
||||
azp/posix/vm
|
||||
skip/aix
|
||||
skip/osx
|
||||
skip/macos
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/2
|
||||
azp/posix/vm
|
||||
skip/aix
|
||||
skip/docker
|
||||
skip/freebsd
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
azp/posix/1
|
||||
azp/posix/vm
|
||||
needs/privileged
|
||||
needs/root
|
||||
skip/aix
|
||||
skip/alpine # FIXME
|
||||
skip/osx
|
||||
skip/macos
|
||||
skip/freebsd
|
||||
|
|
1
tests/utils/shippable/alpine.sh
Symbolic link
1
tests/utils/shippable/alpine.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
remote.sh
|
1
tests/utils/shippable/fedora.sh
Symbolic link
1
tests/utils/shippable/fedora.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
remote.sh
|
1
tests/utils/shippable/ubuntu.sh
Symbolic link
1
tests/utils/shippable/ubuntu.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
remote.sh
|
Loading…
Reference in a new issue