Skip to content

Commit 7c7ead6

Browse files
committed
fix: log messages
Signed-off-by: Hunter Gregory <[email protected]>
1 parent 5acf87e commit 7c7ead6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

npm/pkg/dataplane/policies/chain-management_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func (pMgr *PolicyManager) cleanupOtherIptables() error {
352352
// 1.1. delete the deprecated jump to AZURE-NPM
353353
errCode, err := pMgr.ignoreErrorsAndRunIPTablesCommand(removeDeprecatedJumpIgnoredErrors, util.IptablesDeletionFlag, deprecatedJumpFromForwardToAzureChainArgs...)
354354
if errCode == 0 {
355-
klog.Infof("deleted deprecated jump rule from FORWARD chain to AZURE-NPM chain")
355+
klog.Infof("[cleanup] deleted deprecated jump rule from FORWARD chain to AZURE-NPM chain")
356356
deletedJumpRule = true
357357
} else if err != nil {
358358
metrics.SendErrorLogAndMetric(util.IptmID,
@@ -364,7 +364,7 @@ func (pMgr *PolicyManager) cleanupOtherIptables() error {
364364
errCode, err = pMgr.ignoreErrorsAndRunIPTablesCommand(removeDeprecatedJumpIgnoredErrors, util.IptablesDeletionFlag, jumpFromForwardToAzureChainArgs...)
365365
if errCode == 0 {
366366
deletedJumpRule = true
367-
klog.Infof("deleted deprecated jump rule from FORWARD chain to AZURE-NPM chain")
367+
klog.Infof("[cleanup] deleted jump rule from FORWARD chain to AZURE-NPM chain")
368368
} else if err != nil {
369369
metrics.SendErrorLogAndMetric(util.IptmID,
370370
"[cleanup] failed to delete jump rule from FORWARD chain to AZURE-NPM chain for unexpected reason with exit code %d and error: %s",
@@ -416,7 +416,7 @@ func (pMgr *PolicyManager) cleanupOtherIptables() error {
416416
// then there is risk that there is a jump rule to AZURE-NPM, which in turn has rules which could lead to allowing or dropping a packet.
417417
// We have failed to cleanup the other iptables rules, and there is no guarantee that packets will be processed correctly now.
418418
// So we must crash and retry.
419-
return npmerrors.SimpleErrorWrapper("[cleanup] must crash and retry. failed to delete jump rule and flush chain %s with error", err)
419+
return npmerrors.SimpleErrorWrapper("[cleanup] must crash and retry. failed to delete jump rule and flush AZURE-NPM chain with error", err)
420420
}
421421
}
422422

0 commit comments

Comments
 (0)