20433: Document that LimitLogBytesPerJob=0 disables live logging 20433-crunch-log-zero-bytes-job
authorBrett Smith <brett.smith@curii.com>
Wed, 31 May 2023 20:46:36 +0000 (16:46 -0400)
committerBrett Smith <brett.smith@curii.com>
Wed, 31 May 2023 20:46:36 +0000 (16:46 -0400)
Except for the throttle message, which is a nice user affordance.

Add a test for this specific case.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

lib/config/config.default.yml
lib/crunchrun/logging_test.go

index 06f4fb55ed6455121247b2b3478433db740744ee..00903ce2ad13d1ae9e296d4b8e4ae4b797dffb04 100644 (file)
@@ -1155,6 +1155,8 @@ Clusters:
 
         # Maximum bytes that may be logged by a single job.  Log bytes that are
         # silenced by throttling are not counted against this total.
+        # If you set this to zero, each container will only create a single
+        # log on the API server, noting for users that logging is throttled.
         LimitLogBytesPerJob: 67108864
 
         LogPartialLineThrottlePeriod: 5s
index fdd4f27b7f9af5463517e3658020795c75ceb8d5..42f165fd756b8027e7a9df880ac910db9fa0b2b5 100644 (file)
@@ -191,6 +191,10 @@ func (s *LoggingTestSuite) TestWriteLogsWithRateLimitThrottleBytesPerEvent(c *C)
        s.testWriteLogsWithRateLimit(c, "crunchLimitLogBytesPerJob", 50, 67108864, "Exceeded log limit 50 bytes (crunch_limit_log_bytes_per_job)")
 }
 
+func (s *LoggingTestSuite) TestWriteLogsWithZeroBytesPerJob(c *C) {
+       s.testWriteLogsWithRateLimit(c, "crunchLimitLogBytesPerJob", 0, 67108864, "Exceeded log limit 0 bytes (crunch_limit_log_bytes_per_job)")
+}
+
 func (s *LoggingTestSuite) testWriteLogsWithRateLimit(c *C, throttleParam string, throttleValue int, throttleDefault int, expected string) {
        discoveryMap[throttleParam] = float64(throttleValue)
        defer func() {