Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b2e2c4021 | ||
|
|
dbcbf3b02d | ||
|
|
40d5c49e33 |
No files matched your search
@@ -110,7 +110,7 @@ issue.
|
|||||||
concurrency group of its own.** Runs may overlap on the runner's Docker daemon: every container
|
concurrency group of its own.** Runs may overlap on the runner's Docker daemon: every container
|
||||||
is named and labelled by its run (`KAMINO_RUN_ID`). The job first removes labelled containers
|
is named and labelled by its run (`KAMINO_RUN_ID`). The job first removes labelled containers
|
||||||
older than its timeout, which a cancelled run left, and finally its own. The scenarios of one
|
older than its timeout, which a cancelled run left, and finally its own. The scenarios of one
|
||||||
run overlap (`scripts/run_molecule_scenarios.sh`, `MOLECULE_LANES` at a time, 4 unless a manual
|
run overlap (`scripts/run_molecule_scenarios.sh`, `MOLECULE_LANES` at a time, 2 unless a manual
|
||||||
dispatch sets its `lanes` input), so no two scenarios may share a platform name. They start
|
dispatch sets its `lanes` input), so no two scenarios may share a platform name. They start
|
||||||
longest first by the script's list of last full-run times, an unlisted one first; the logs stay
|
longest first by the script's list of last full-run times, an unlisted one first; the logs stay
|
||||||
in selection order. *Why:* a cancelled run is killed before it can remove its instances, a
|
in selection order. *Why:* a cancelled run is killed before it can remove its instances, a
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
trivial:
|
|
||||||
- >-
|
|
||||||
system_baseline - The registered results of the unattended-upgrades check and the reboot-required
|
|
||||||
check carry the internal ``__system_baseline_`` prefix.
|
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
- name: Check if reboot is required (Debian)
|
- name: Check if reboot is required (Debian)
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /var/run/reboot-required
|
path: /var/run/reboot-required
|
||||||
register: __system_baseline_reboot_required_file
|
register: system_baseline_reboot_required_file
|
||||||
|
|
||||||
- name: Set system_baseline_reboot_required fact
|
- name: Set system_baseline_reboot_required fact
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
system_baseline_reboot_required: "{{ __system_baseline_reboot_required_file.stat.exists }}"
|
system_baseline_reboot_required: "{{ system_baseline_reboot_required_file.stat.exists }}"
|
||||||
|
|
||||||
- name: Reboot the server if required
|
- name: Reboot the server if required
|
||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
|
|||||||
@@ -60,6 +60,6 @@
|
|||||||
- name: Validate unattended-upgrades config
|
- name: Validate unattended-upgrades config
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.command: unattended-upgrades --dry-run --debug
|
ansible.builtin.command: unattended-upgrades --dry-run --debug
|
||||||
register: __system_baseline_unattended_check
|
register: system_baseline_unattended_check
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: __system_baseline_unattended_check.rc != 0
|
failed_when: system_baseline_unattended_check.rc != 0
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# The Molecule workflow's "Run the scenarios" step: `molecule test` for each scenario directory on
|
# The Molecule workflow's "Run the scenarios" step: `molecule test` for each scenario directory on
|
||||||
# stdin, MOLECULE_LANES (default 4, also when empty) at a time, longest first, each with its own
|
# stdin, MOLECULE_LANES (default 2, also when empty) at a time, longest first, each with its own
|
||||||
# log and ANSIBLE_HOME under <work-dir>/<n>/ (no collection is installed there:
|
# log and ANSIBLE_HOME under <work-dir>/<n>/ (no collection is installed there:
|
||||||
# .config/molecule/config.yml sets prerun false).
|
# .config/molecule/config.yml sets prerun false).
|
||||||
# Exit 1 on a failure.
|
# Exit 1 on a failure.
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
# scripts/run_molecule_scenarios.sh <work-dir> < scenario-dirs
|
# scripts/run_molecule_scenarios.sh <work-dir> < scenario-dirs
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
lanes="${MOLECULE_LANES:-4}"
|
# 2: a full run took 34 min at 2 lanes and 35 at 4, so more lanes only slow each scenario.
|
||||||
|
lanes="${MOLECULE_LANES:-2}"
|
||||||
if ! [[ "$lanes" =~ ^[1-9][0-9]*$ ]]; then
|
if ! [[ "$lanes" =~ ^[1-9][0-9]*$ ]]; then
|
||||||
echo "MOLECULE_LANES must be a positive integer, not '$lanes'" >&2
|
echo "MOLECULE_LANES must be a positive integer, not '$lanes'" >&2
|
||||||
exit 2
|
exit 2
|
||||||
@@ -78,30 +79,31 @@ while IFS= read -r dir; do
|
|||||||
done
|
done
|
||||||
mkdir -p "$work"
|
mkdir -p "$work"
|
||||||
|
|
||||||
# Seconds each scenario took in the last full run, so the longest start first and none started
|
# Seconds each scenario took in the last full run at the default lane count, so the longest start
|
||||||
# late sets the end of the run. Keyed by scenario directory, not label: refresh from a full run's
|
# first and none started late sets the end of the run. Keyed by scenario directory, not label:
|
||||||
# `finished <label>: exit 0 after S s` lines, each label mapped back to its directory. A scenario
|
# refresh from a full run's `finished <label>: exit 0 after S s` lines, each label mapped back to
|
||||||
# missing here is assumed long and starts first.
|
# its directory. A scenario missing here is assumed long and starts first.
|
||||||
declare -A last_seconds=(
|
declare -A last_seconds=(
|
||||||
[roles/system_baseline/molecule/default]=1127
|
[roles/system_baseline/molecule/default]=568
|
||||||
[roles/ufw/molecule/default]=907
|
[roles/ufw/molecule/default]=525
|
||||||
[roles/traefik/molecule/default]=886
|
[roles/traefik/molecule/default]=484
|
||||||
[roles/gitea_runner/molecule/default]=762
|
[roles/gitea_runner/molecule/default]=398
|
||||||
[roles/cloudflared/molecule/default]=673
|
[roles/docker/molecule/default]=352
|
||||||
[roles/docker/molecule/default]=612
|
[roles/cloudflared/molecule/default]=305
|
||||||
[roles/tailscale/molecule/default]=509
|
[roles/tailscale/molecule/default]=220
|
||||||
[roles/fail2ban/molecule/default]=337
|
[roles/fail2ban/molecule/default]=161
|
||||||
[roles/systemd_hardening/molecule/default]=335
|
[roles/gitea/molecule/default]=137
|
||||||
[roles/gitea/molecule/default]=301
|
[roles/systemd_hardening/molecule/default]=134
|
||||||
[roles/user_management/molecule/default]=270
|
[roles/_binary_update/molecule/default]=132
|
||||||
[roles/_binary_update/molecule/default]=248
|
[roles/nfs_client/molecule/default]=126
|
||||||
[roles/pihole/molecule/default]=228
|
[roles/user_management/molecule/default]=115
|
||||||
[roles/sshd/molecule/default]=163
|
[roles/pihole/molecule/default]=112
|
||||||
[roles/pve_lxc/molecule/default]=157
|
[roles/sshd/molecule/default]=65
|
||||||
[roles/network_interfaces/molecule/default]=129
|
[roles/pve_lxc/molecule/default]=44
|
||||||
[roles/_binary_update/molecule/check_mode]=81
|
[roles/_binary_update/molecule/check_mode]=42
|
||||||
[extensions/molecule/image-smoke]=47
|
[roles/network_interfaces/molecule/default]=36
|
||||||
[extensions/molecule/image-smoke-2604]=46
|
[extensions/molecule/image-smoke]=25
|
||||||
|
[extensions/molecule/image-smoke-2604]=21
|
||||||
)
|
)
|
||||||
# The indices of dirs in start order; ties keep the selection order (a stable sort).
|
# The indices of dirs in start order; ties keep the selection order (a stable sort).
|
||||||
mapfile -t start_order < <(
|
mapfile -t start_order < <(
|
||||||
|
|||||||
Reference in new issue
Block a user