Skip to content

e2e: backup access preflight drops the port-forward log when the S3 client cannot be configured #4243

Description

Describe the bug

hack/e2e-chainsaw/_lib/backup-access-preflight.sh drops the port-forward capture when mc alias set fails. The other two failure paths in the helper print it: the readiness check at line 88 does, and the retry timeout does as of #4242. This one is the exit that still throws it away.

mc alias set reaches the endpoint, so a tunnel that came up and then went sideways is a plausible cause of a failure here, and port-forward.log is the only place that shows it.

Environment

  • Cozystack: main at 79602e9ca
  • In-tree e2e lane

To Reproduce

Make mc alias set fail inside the preflight, for example by pointing COZY_E2E_S3_PREFLIGHT_PORT at a port where something answers but is not the S3 gateway.

Expected behaviour

The failure prints port-forward.log the way the readiness and timeout paths do.

Actual behaviour

Lines 93-97 at 79602e9ca:

  if ! mc alias set backup-preflight "https://127.0.0.1:${local_port}" \
      "${access_key}" "${secret_key}" --insecure >/dev/null; then
    echo "failed to configure S3 client for BucketAccess ${namespace}/${access_name}" >&2
    return 1
  fi

One correction worth recording, because it makes the gap smaller than it looks: only stdout goes to /dev/null here, so mc's own error message does reach the job log. What is missing is the port-forward capture, not everything.

Additional context

Lower priority than the timeout path, which fires on the S3 round trip itself and is far more common. A fix wants its own case in hack/backup-access-preflight.bats.

Checklist

  • I have checked the documentation
  • I have searched for similar issues
  • I have included all required information
  • I have provided clear steps to reproduce
  • I have included relevant logs

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    triage/needs-triageIndicates an issue needs triage by a maintainer
    area/testingIssues or PRs related to testing (e2e, bats, unit tests)
    on Sep 14, 2026
  2. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
  3. added a commit that references this issue on Oct 1, 2026
    a66907f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/testingIssues or PRs related to testing (e2e, bats, unit tests)kind/bugCategorizes issue or PR as related to a bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions