Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRU subscribers failed to start when no selector was provided #4852

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

MarcosDY
Copy link
Collaborator

LRU was failing into no returning notifications when no selector was found on attestation process,
this caused regular healthchecks to fail.
Used this opportunity to no longer add debug logs when no SVID was updated on LRU

Which issue this PR fixes
fixes #4827

Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Copy link
Member

@amartinezfayo amartinezfayo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @MarcosDY for this fix! I tested it in my environment and fixed the issue.
It's also good that you removed the debug messages "Updating SVIDs..." that were being logged every 5 seconds and now is logged when it's needed only.

I have only very small suggestions.

subErrCh <- nil
}()

// Wait until subscribe is created and got a notification
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Wait until subscribe is created and got a notification
// Wait until subscriber is created and got a notification

}

if len(u1.Bundle.X509Authorities()) != 1 {
subErrCh <- fmt.Errorf("a single bundle is expected")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
subErrCh <- fmt.Errorf("a single bundle is expected")
subErrCh <- fmt.Errorf("a single bundle is expected but got %d", len(u1.Bundle.X509Authorities()))

Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
@rturner3 rturner3 merged commit 467eeac into spiffe:main Feb 1, 2024
32 checks passed
faisal-memon pushed a commit to faisal-memon/spire that referenced this pull request Feb 7, 2024
…#4852)

* LRU subscribers failed to start when no selector was provided

Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Signed-off-by: Faisal Memon <fymemon@yahoo.com>
@amartinezfayo amartinezfayo added this to the 1.9.0 milestone Feb 8, 2024
sriyer pushed a commit to spire-vault/spire that referenced this pull request Feb 23, 2024
…#4852)

* LRU subscribers failed to start when no selector was provided

Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
rushi47 pushed a commit to rushi47/spire that referenced this pull request Apr 11, 2024
…#4852)

* LRU subscribers failed to start when no selector was provided

Signed-off-by: Marcos Yacob <marcos.yacob@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LRU cache enabled agent, healthcheck API does not respond the status if the attestor plugin returns error
3 participants