Skip to content

v2: Reauthenticate failed with context cancelled #2931

@vooon

Description

@vooon

I'm trying to fix reauth in my fleeting plugin, because seems AllowReauth do not work, as i got:

Feb 19 09:38:57 runner-manager.ci.cloud gitlab-runner[882]: 2024-02-19T09:38:57.199Z [ERROR] plugin.fleeting-plugin-openstack: Failed to delete instance: cloud=runner
Feb 19 09:38:57 runner-manager.ci.cloud gitlab-runner[882]:   err=
Feb 19 09:38:57 runner-manager.ci.cloud gitlab-runner[882]:   | Unable to re-authenticate: Expected HTTP response code [202 204] when accessing [DELETE https://ci.cloud/compute/v2.1/servers/6442d29d-af4f-4d53-ae1a-3054e9ff3428], but got 401 instead
Feb 19 09:38:57 runner-manager.ci.cloud gitlab-runner[882]:   | {"error": {"code": 401, "title": "Unauthorized", "message": "The request you have made requires authentication."}}: Post "https://ci.cloud/identity/v3/auth/tokens": context canceled
Feb 19 09:38:57 runner-manager.ci.cloud gitlab-runner[882]:    id=6442d29d-af4f-4d53-ae1a-3054e9ff3428 name=podman-runners timestamp=2024-02-19T09:38:57.199Z

When i tried to do:

cli.Context = nil // ensure there no context!
err := cli.Reauthenticate(cli.TokenID())

The result error:

Re-authenticate failed: err="Post \"https://ci.cloud/identity/v3/auth/tokens\": context canceled"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions