summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorpraveensastry <sastry.praveen@gmail.com>2019-08-22 22:52:43 +1000
committerpraveensastry <sastry.praveen@gmail.com>2019-08-22 22:52:43 +1000
commit7672eaae25eebad650e71ba790e1585736866ccc (patch)
tree02d64a4feb2632575bce465cceb3074fa4555df1
parent73985c6545d887644d8aa4f0e00491cc903501c7 (diff)
Add log prefix for better clarity
-rw-r--r--pkg/refs/refcounter.go4
-rw-r--r--runsc/boot/config.go4
-rw-r--r--runsc/main.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/pkg/refs/refcounter.go b/pkg/refs/refcounter.go
index 7fe42d8ff..8c3e3d5ab 100644
--- a/pkg/refs/refcounter.go
+++ b/pkg/refs/refcounter.go
@@ -237,9 +237,9 @@ func (l LeakMode) String() string {
case NoLeakChecking:
return "disabled"
case LeaksLogWarning:
- return "warning"
+ return "log-names"
case LeaksLogTraces:
- return "traces"
+ return "log-traces"
default:
panic(fmt.Sprintf("Invalid leakmode: %d", l))
}
diff --git a/runsc/boot/config.go b/runsc/boot/config.go
index 3c0f72e9f..6a742f349 100644
--- a/runsc/boot/config.go
+++ b/runsc/boot/config.go
@@ -118,9 +118,9 @@ func MakeRefsLeakMode(s string) (refs.LeakMode, error) {
switch strings.ToLower(s) {
case "disabled":
return refs.NoLeakChecking, nil
- case "warning":
+ case "log-names":
return refs.LeaksLogWarning, nil
- case "traces":
+ case "log-traces":
return refs.LeaksLogTraces, nil
default:
return 0, fmt.Errorf("invalid refs leakmode %q", s)
diff --git a/runsc/main.go b/runsc/main.go
index 1b7c1c4b7..58e7dd8f3 100644
--- a/runsc/main.go
+++ b/runsc/main.go
@@ -73,7 +73,7 @@ var (
netRaw = flag.Bool("net-raw", false, "enable raw sockets. When false, raw sockets are disabled by removing CAP_NET_RAW from containers (`runsc exec` will still be able to utilize raw sockets). Raw sockets allow malicious containers to craft packets and potentially attack the network.")
numNetworkChannels = flag.Int("num-network-channels", 1, "number of underlying channels(FDs) to use for network link endpoints.")
rootless = flag.Bool("rootless", false, "it allows the sandbox to be started with a user that is not root. Sandbox and Gofer processes may run with same privileges as current user.")
- referenceLeakMode = flag.String("ref-leak-mode", "disabled", "sets reference leak check mode: disabled (default), warning, traces.")
+ referenceLeakMode = flag.String("ref-leak-mode", "disabled", "sets reference leak check mode: disabled (default), log-names, log-traces.")
// Test flags, not to be used outside tests, ever.
testOnlyAllowRunAsCurrentUserWithoutChroot = flag.Bool("TESTONLY-unsafe-nonroot", false, "TEST ONLY; do not ever use! This skips many security measures that isolate the host from the sandbox.")