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

remove unnecessary log info #2723

Closed
wants to merge 1 commit into from
Closed

remove unnecessary log info #2723

wants to merge 1 commit into from

Conversation

paulyufan2
Copy link
Contributor

Reason for Change:

This PR is to remove some unnecessary logs from CNI

Issue Fixed:

Requirements:

Notes:

@paulyufan2 paulyufan2 requested a review from a team as a code owner May 1, 2024 19:53
@paulyufan2 paulyufan2 added the cni Related to CNI. label May 1, 2024
@@ -526,7 +526,7 @@ func (ap *addressPool) releaseAddress(address string, options map[string]string)
var err error

logger.Info("Releasing address with", zap.String("address", address), zap.Any("options", options))
defer func() { logger.Error("Address release completed with", zap.String("address", address), zap.Error(err)) }()
defer func() { logger.Error("Address release completed with", zap.Error(err)) }()
Copy link
Member

Choose a reason for hiding this comment

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

why are we removing address field.. this helps in debugging

}
}()

// Look up the endpoint.
ep, err := nw.getEndpoint(endpointID)
if err != nil {
logger.Error("Endpoint not found. Not Returning error", zap.String("endpointID", endpointID), zap.Error(err))
logger.Error("Endpoint not found. Not Returning error", zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

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

can we log endpoint id in different way instead of removing it?

@@ -293,7 +293,7 @@ func (as *addressSpace) requestPool(poolId string, subPoolId string, options map
var ap *addressPool
var err error

logger.Info("Requesting pool with", zap.String("poolId", poolId), zap.Any("options", options), zap.Any("v6", v6))
logger.Info("Requesting a new address pool")
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you are removing details about the request, is this line needed at all? I'm asking because without any info, the log line cannot be correlated to other things. It mostly indicates that the function was invoked, but you also have a log line below that accomplishes the same thing (I don't see a code path where the other line does not get called).

} else {
logger.Info("Releasing pool as there are no allocations", zap.String("poolId", poolId))
logger.Info("Releasing pool as there are no allocations")
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove pool id?

Copy link

github-actions bot commented Jun 1, 2024

This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale due to inactivity. label Jun 1, 2024
Copy link

github-actions bot commented Jun 8, 2024

Pull request closed due to inactivity.

@github-actions github-actions bot closed this Jun 8, 2024
auto-merge was automatically disabled June 8, 2024 00:01

Pull request was closed

@github-actions github-actions bot deleted the logfix branch June 8, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cni Related to CNI. stale Stale due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants