Skip to content

SPIRE agent can exceed the RPC timeout when synchronising bundles with many federations #6490

@markgoddard

Description

@markgoddard

SPIRE agent periodically syncs entries, federated bundles and SVIDs from the SPIRE server. This happens every 5 seconds, with a backoff applied on failure. There is a 30 second timeout for the update process (in pkg/agent/client/client.go):

const rpcTimeout = 30 * time.Second

If there are many federations for the entries allowed for the agent, this timeout can be exceeded. If the timeout is exceeded, then the update fails and no entries, bundles or SVIDs are updated. If this happens persistently then SVIDs may expire. This is particularly apparent in resource constrained environments.

Part of the problem here is that federated bundles are fetched sequentially (in fetchBundles()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues with this label are ready to start work but are in need of someone to do itpriority/backlogIssue is approved and in the backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions