Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-102048

Make OIDC GCP end-to-end test more tolerant of connection failures

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • Security 2025-03-17
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      oidc_e2e_gcp_machine.js tests that MONGODB-OIDC can work correctly with ID tokens issued for GCP service accounts. In order to do this, the test launches a setup script that spawns a GCP VM and writes the SSH key and host information to separate files. The test then reads that information, SSHs into the VM, and runs a cURL command inside the VM to the GCP token service to receive an ID token for the VM's service account. A teardown script then reaps the GCP VM.

      There have been a slew of recent failures in this test due to "connection refused" errors that appear when attempting to SSH to the VM. The setup script's task logs indicate that the VM is successfully created, and the IP address of the VM created matches the one that the test fails to SSH to.

      For now, we should try making the test more robust to these issues. Specifically:

      1. Add retry logic to the test's SSH attempts.
      2. Add an SSH attempt to the setup script, ideally also with retries. This will ensure that setup script doesn't terminate until the VM is up and available.
      3. Try adding additional verbosity to SSH logs and error parsing if possible.

            Assignee:
            erwin.pe@mongodb.com Erwin Pe
            Reporter:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: