Skip to content

Commit

Permalink
Merge pull request #288 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 27, 2024
2 parents 5b0101e + fc1f9c0 commit fa69b45
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 3 additions & 4 deletions pkg/manilaapi/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,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/manilaapi/config/01-config.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[DEFAULT]
log_file = {{ .LogFile }}
log_rotation_type = size
max_logfile_count = 1
max_logfile_size_mb = 20
7 changes: 3 additions & 4 deletions test/kuttl/tests/manila-tls/03-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ spec:
- args:
- --single-child
- --
- /usr/bin/tail
- -n+1
- -F
- /var/log/manila/manila-api.log
- /bin/sh
- -c
- /usr/bin/tail -n+1 -F /var/log/manila/manila-api.log 2>/dev/null
volumeMounts:
- name: logs
mountPath: /var/log/manila
Expand Down

0 comments on commit fa69b45

Please sign in to comment.