Skip to content

Commit

Permalink
Merge pull request #404 from Akrog/fix-api-logfile
Browse files Browse the repository at this point in the history
Fix api log file increases indefinitely
  • Loading branch information
openshift-merge-bot[bot] authored Jun 26, 2024
2 parents e61187e + 07b9e7d commit 1331701
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
7 changes: 3 additions & 4 deletions pkg/cinderapi/statefuleset.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ func StatefulSet(
Args: []string{
"--single-child",
"--",
"/usr/bin/tail",
"-n+1",
"-F",
LogFile,
"/bin/sh",
"-c",
"/usr/bin/tail -n+1 -F " + LogFile + " 2>/dev/null",
},
Image: instance.Spec.ContainerImage,
SecurityContext: &corev1.SecurityContext{
Expand Down
3 changes: 3 additions & 0 deletions templates/cinderapi/config/01-service-defaults.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[DEFAULT]
log_file = {{ .LogFile }}
log_rotation_type = size
max_logfile_count = 1
max_logfile_size_mb = 20

[oslo_policy]
enforce_scope = true
Expand Down
7 changes: 3 additions & 4 deletions test/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ spec:
- args:
- --single-child
- --
- /usr/bin/tail
- -n+1
- -F
- /var/log/cinder/cinder-api.log
- /bin/sh
- -c
- /usr/bin/tail -n+1 -F /var/log/cinder/cinder-api.log 2>/dev/null
command:
- /usr/bin/dumb-init
imagePullPolicy: IfNotPresent
Expand Down
7 changes: 3 additions & 4 deletions test/kuttl/common/assert_tls_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ spec:
- args:
- --single-child
- --
- /usr/bin/tail
- -n+1
- -F
- /var/log/cinder/cinder-api.log
- /bin/sh
- -c
- /usr/bin/tail -n+1 -F /var/log/cinder/cinder-api.log 2>/dev/null
volumeMounts:
- mountPath: /var/log/cinder
name: logs
Expand Down

0 comments on commit 1331701

Please sign in to comment.