Skip to content

Commit 8bf1a24

Browse files
authored
fix: add addtl log context when cns mutates cni statefile (#935)
1 parent e330355 commit 8bf1a24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cns/cnireconciler/statefile.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func writeObjectToFile(filename string) error {
2626
fi, err := os.Stat(filename)
2727
if err != nil {
2828
if errors.Is(err, os.ErrNotExist) {
29+
logger.Printf("CNI statefile %s does not exist", filename)
2930
return nil
3031
}
3132
return err
@@ -35,7 +36,7 @@ func writeObjectToFile(filename string) error {
3536
return nil
3637
}
3738

38-
logger.Printf("Writing {} to CNI statefile")
39+
logger.Printf("Writing {} to CNI statefile %s", filename)
3940
b, _ := json.Marshal(map[string]string{})
4041
return os.WriteFile(filename, b, os.FileMode(0666))
4142
}

0 commit comments

Comments
 (0)