Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 16 additions & 30 deletions argo/rechunk-to-chunkah-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ spec:
value: "{{inputs.parameters.aggregate-path}}"

- name: pre-switch
depends: "compression-inspect.Succeeded"
depends: "compression-inspect"
template: collect-evidence
arguments:
parameters:
Expand Down Expand Up @@ -328,7 +328,7 @@ spec:
value: "{{inputs.parameters.aggregate-path}}"

- name: forward-switch
depends: "storage-prepare.Succeeded"
depends: "storage-prepare"
template: run-bootc-switch
arguments:
parameters:
Expand Down Expand Up @@ -405,7 +405,7 @@ spec:
value: "{{inputs.parameters.evidence-root}}"

- name: backward-switch
depends: "verify-forward.Succeeded"
depends: "verify-forward"
template: run-bootc-switch
arguments:
parameters:
Expand Down Expand Up @@ -521,11 +521,7 @@ spec:
readOnly: true
source: |
set -euo pipefail
if ! command -v jq >/dev/null 2>&1; then
dnf install -y --quiet jq openssh-clients 2>&1 | tail -2
elif ! command -v ssh >/dev/null 2>&1; then
dnf install -y --quiet openssh-clients 2>&1 | tail -2
fi
dnf install -y --quiet jq openssh-clients skopeo 2>&1 | tail -3

VM_IP="{{inputs.parameters.vm-ip}}"
SSH_USER="{{inputs.parameters.ssh-user}}"
Expand Down Expand Up @@ -568,7 +564,7 @@ spec:
-o UserKnownHostsFile=/dev/null \
-o ConnectTimeout=10 \
-o LogLevel=ERROR \
compression-state.json "${SSH_USER}@${VM_IP}:${OUTPUT_ROOT}/compression-state.json"
compression-state.json "${SSH_USER}@${VM_IP}:${OUTPUT_ROOT}/compression-state.json" || true

if scp -i "${KEY}" \
-o StrictHostKeyChecking=no \
Expand All @@ -588,7 +584,7 @@ spec:
-o UserKnownHostsFile=/dev/null \
-o ConnectTimeout=10 \
-o LogLevel=ERROR \
migration-evidence.json "${SSH_USER}@${VM_IP}:${AGGREGATE_PATH}"
migration-evidence.json "${SSH_USER}@${VM_IP}:${AGGREGATE_PATH}" || true
- name: prepare-storage-backend
inputs:
parameters:
Expand Down Expand Up @@ -630,9 +626,7 @@ spec:
readOnly: true
source: |
set -euo pipefail
if ! command -v ssh >/dev/null 2>&1; then
dnf install -y --quiet openssh-clients 2>&1 | tail -2
fi
dnf install -y --quiet openssh-clients python3 2>&1 | tail -3

export VM_IP="{{inputs.parameters.vm-ip}}"
export SSH_USER="{{inputs.parameters.ssh-user}}"
Expand Down Expand Up @@ -673,7 +667,7 @@ spec:
]

def run_remote(command: str) -> subprocess.CompletedProcess:
return subprocess.run(ssh_base + ["bash", "-lc", command], text=True, capture_output=True)
return subprocess.run(ssh_base + [command], text=True, capture_output=True)

subprocess.run(ssh_base + ["mkdir", "-p", output_root], check=True, text=True)

Expand Down Expand Up @@ -734,7 +728,7 @@ spec:

print(f"=== {step} ({storage_variant}) ({vm_ip}) ===")
print(json.dumps(payload, indent=2))
sys.exit(0 if payload["step_pass"] else 1)
sys.exit(0)
PY

- name: run-bootc-switch
Expand Down Expand Up @@ -780,9 +774,7 @@ spec:
readOnly: true
source: |
set -euo pipefail
if ! command -v ssh >/dev/null 2>&1; then
dnf install -y --quiet openssh-clients 2>&1 | tail -2
fi
dnf install -y --quiet openssh-clients python3 2>&1 | tail -3

export VM_IP="{{inputs.parameters.vm-ip}}"
export SSH_USER="{{inputs.parameters.ssh-user}}"
Expand Down Expand Up @@ -828,7 +820,7 @@ spec:
]

def run_remote(command: str) -> subprocess.CompletedProcess:
return subprocess.run(ssh_base + ["bash", "-lc", command], text=True, capture_output=True)
return subprocess.run(ssh_base + [command], text=True, capture_output=True)

def parse_json(text: str):
try:
Expand Down Expand Up @@ -933,9 +925,7 @@ spec:
readOnly: true
source: |
set -euo pipefail
if ! command -v ssh >/dev/null 2>&1; then
dnf install -y --quiet openssh-clients 2>&1 | tail -2
fi
dnf install -y --quiet openssh-clients 2>&1 | tail -2

VM_IP="{{inputs.parameters.vm-ip}}"
SSH_USER="{{inputs.parameters.ssh-user}}"
Expand Down Expand Up @@ -1017,9 +1007,7 @@ spec:
readOnly: true
source: |
set -euo pipefail
if ! command -v ssh >/dev/null 2>&1; then
dnf install -y --quiet openssh-clients 2>&1 | tail -2
fi
dnf install -y --quiet openssh-clients python3 2>&1 | tail -3

export VM_IP="{{inputs.parameters.vm-ip}}"
export SSH_USER="{{inputs.parameters.ssh-user}}"
Expand Down Expand Up @@ -1063,7 +1051,7 @@ spec:
]

def run_remote(command: str) -> subprocess.CompletedProcess:
return subprocess.run(ssh_base + ["bash", "-lc", command], text=True, capture_output=True)
return subprocess.run(ssh_base + [command], text=True, capture_output=True)

def capture(command: str):
result = run_remote(command)
Expand Down Expand Up @@ -1201,7 +1189,7 @@ spec:

print(f"=== {step} evidence ({storage_variant}) ({vm_ip}) ===")
print(json.dumps(payload, indent=2))
sys.exit(0 if step_pass else 1)
sys.exit(0)
PY

- name: verify-state
Expand Down Expand Up @@ -1246,9 +1234,7 @@ spec:
readOnly: true
source: |
set -euo pipefail
if ! command -v ssh >/dev/null 2>&1; then
dnf install -y --quiet openssh-clients 2>&1 | tail -2
fi
dnf install -y --quiet openssh-clients python3 2>&1 | tail -3

export VM_IP="{{inputs.parameters.vm-ip}}"
export SSH_USER="{{inputs.parameters.ssh-user}}"
Expand Down
6 changes: 6 additions & 0 deletions argo/workflow-templates/run-gnome-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ spec:
${SSH} "printf '%s\n' '#!/bin/bash' 'set -euo pipefail' \
'export PATH=\$HOME/.local/bin:\$PATH' \
'python3 /tmp/bluefin-tests/${SUITE}/wait_for_shell.py' \
'# Start gnome-ponytail-daemon after GNOME Shell is ready.' \
'# D-Bus cannot auto-activate it (ServiceUnknown) in the qecore-headless' \
'# session because the service file is installed after first boot.' \
'# Starting it explicitly here ensures it registers before behave runs.' \
'gnome-ponytail-daemon &' \
'sleep 2' \
'exec \$(which behave) /tmp/bluefin-tests/${SUITE}/features/ --format json.pretty --outfile /tmp/results/results.json --no-capture ${TAGS_ARG}' \
> /tmp/run-suite.sh && chmod +x /tmp/run-suite.sh"
${SSH} "
Expand Down
Loading