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

refactor(pfcp): Improve logging and error handling during session create/modify/delete #592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pespin
Copy link
Contributor

@pespin pespin commented Feb 4, 2025

Before this patch, eupf would silently (info log level) skip PDR creation failures due to map sizes being too small, accepting the the PFCP session creation request.
This patch makes sure:

  • The issue is reported at a meaningful log level (warn or error)
  • The PFCP session creation request is rejectedt

cmd/core/pdr.go Outdated
if spdrInfo.Ipv4 != nil {
if err := mapOperations.PutPdrDownlink(spdrInfo.Ipv4, spdrInfo.PdrInfo); err != nil {
log.Info().Msgf("Can't apply IPv4 PDR: %s", err.Error())
log.Error().Msgf("Can't apply IPv4 PDR: %s", err.Error())
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to use zerolog feature to trace errors:

log.Error().Err(err).Msg("Can't apply IPv4 PDR")

@pirog-spb pirog-spb changed the title pfcp: Improve logging and error handling during session create/modify/delete refactor(pfcp): Improve logging and error handling during session create/modify/delete Feb 8, 2025
@pespin pespin force-pushed the pespin/pr-log branch 2 times, most recently from 55c7376 to 4bed3ab Compare February 10, 2025 13:28
…ate/modify/delete

Before this patch, eupf would silently (info log level) skip PDR
creation failures due to map sizes being too small, accepting the the
PFCP session creation request.
This patch makes sure:
* The issue is reported at a meaningful log level (warn or error)
* The PFCP session creation request is rejectedt
@pespin
Copy link
Contributor Author

pespin commented Feb 10, 2025

@pirog-spb Let me know if this one is fine now too and can be merged.

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.

2 participants