Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1934063
Summary: | Service for kvm_stat logging not available | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Thomas Huth <thuth> |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | acaringi, adscvr, airlied, alciregi, bfu, bskeggs, bugproxy, cohuck, dhorak, hdegoede, jarodwilson, jbenc, jeremy, jglisse, jinzhao, jonathan, josef, juzhang, kernel-maint, knoel, lgoncalv, linville, masami256, mchehab, ngu, pbonzini, ptalbert, qzhang, ribarry, smitterl, steved, thuth, virt-qe-z, yiwei |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | 1934042 | Environment: | |
Last Closed: | 2021-07-01 07:47:21 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 467765, 1071880 |
Description
Thomas Huth
2021-03-02 12:25:20 UTC
Beside the missing kvm_stat.service file (which can be found in the tools/kvm/kvm_stat/ folder of the kernel sources), we'd also need a matching logrotate config file like this: /var/log/kvm_stat.csv { size 10M missingok compress maxage 30 rotate 5 nodateext postrotate /usr/bin/systemctl try-restart kvm_stat.service endscript } FWIW, this were the changes that I did for the RHEL8 kernel spec file (for BZ 1919930): diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index 32dac629b11c..78922902c1f3 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -540,6 +540,7 @@ Source400: mod-kvm.list # Sources for kernel-tools Source2000: cpupower.service Source2001: cpupower.config +Source2002: kvm_stat.logrotate ## Patches needed for building this package @@ -2086,9 +2087,11 @@ popd pushd tools/gpio %{tools_make} DESTDIR=%{buildroot} install popd +install -m644 -D %{SOURCE2002} %{buildroot}%{_sysconfdir}/logrotate.d/kvm_stat pushd tools/kvm/kvm_stat make INSTALL_ROOT=%{buildroot} install-tools make INSTALL_ROOT=%{buildroot} install-man +install -m644 -D kvm_stat.service %{buildroot}%{_unitdir}/kvm_stat.service popd # install VM tools pushd tools/vm/ @@ -2448,6 +2451,8 @@ fi %{_bindir}/gpio-event-mon %{_mandir}/man1/kvm_stat* %{_bindir}/kvm_stat +%{_unitdir}/kvm_stat.service +%config(noreplace) %{_sysconfdir}/logrotate.d/kvm_stat %{_bindir}/page_owner_sort %{_bindir}/slabinfo diff --git a/redhat/kvm_stat.logrotate b/redhat/kvm_stat.logrotate new file mode 100644 index 000000000000..105e15e651f0 --- /dev/null +++ b/redhat/kvm_stat.logrotate @@ -0,0 +1,11 @@ +/var/log/kvm_stat.csv { + size 10M + missingok + compress + maxage 30 + rotate 5 + nodateext + postrotate + /usr/bin/systemctl try-restart kvm_stat.service + endscript +} ... I assume the spec file for the Fedora kernel could be adjusted in a similar way? Seems like this has been fixed in commit 4f81869d2aa7 by Jiri Benc - Thank you very much, Jiri! |