This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1267284 - tuned-profiles-nfv: find-lapictscdeadline-optimal.sh is failing
tuned-profiles-nfv: find-lapictscdeadline-optimal.sh is failing
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned (Show other bugs)
7.3
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Jaroslav Škarvada
Tereza Cerna
: ZStream
Depends On:
Blocks: kvm-rt-tuned 1282592 1273048
  Show dependency treegraph
 
Reported: 2015-09-29 10:22 EDT by Luiz Capitulino
Modified: 2016-11-04 03:25 EDT (History)
11 users (show)

See Also:
Fixed In Version: tuned-2.5.1-5.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1282592 (view as bug list)
Environment:
Last Closed: 2016-11-04 03:25:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
lat.out that reproduces the issue (150 bytes, text/plain)
2015-09-29 10:22 EDT, Luiz Capitulino
no flags Details

  None (edit)
Description Luiz Capitulino 2015-09-29 10:22:32 EDT
Created attachment 1078384 [details]
lat.out that reproduces the issue

Description of problem:

We've been seeing that in some systems the files lapic_timer_adv_ns and lapic_timer_adv_ns.cpumodel are not being created in /usr/lib/tuned/realtime-virtual-host/.

I've debugged this issue down to find-lapictscdeadline-optimal.sh (silently) failing when run by tuned.

I'm attaching the lat.out file that reproduces the issue:

[root@virtlab401 realtime-virtual-host]# ./find-lapictscdeadline-optimal.sh /tmp/tmp.ZjZlVhDqe8/lat.out 
optimal not found
[root@virtlab401 realtime-virtual-host]# 

Btw, in those systems we ended up with 7000 written to /sys/module/kvm/parameters/lapic_timer_advance_ns, just because that's the last value tried by run-tscdeadline-latency.sh.


Version-Release number of selected component (if applicable): tuned-2.5.1-4.el7.noarch


How reproducible:


Steps to Reproduce:
1. Setup a KVM-RT host
2. The following files don't exist:
  * /usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns
  * /usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns.cpumodel
3. /sys/module/kvm/parameters/lapic_timer_advance_ns is 7000
Comment 1 Jaroslav Škarvada 2015-10-02 06:11:47 EDT
Upstream commit:
https://git.fedorahosted.org/cgit/tuned.git/commit/?id=874762b4c06e3bc7862e119ee12a23a16352f649

Also I am going to move:
/usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns
/usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns.cpumodel

to /var/lib/tuned/...

This is according to FHS and should also help with SELinux (if enabled).
Comment 7 Jaroslav Škarvada 2015-11-16 12:32:07 EST
(In reply to Jaroslav Škarvada from comment #1)
> Upstream commit:
> https://git.fedorahosted.org/cgit/tuned.git/commit/
> ?id=874762b4c06e3bc7862e119ee12a23a16352f649
>
Using this commit as the fix for this bugzilla.

> Also I am going to move:
> /usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns
> /usr/lib/tuned/realtime-virtual-host/lapic_timer_adv_ns.cpumodel
> 
> to /var/lib/tuned/...
> 
> This is according to FHS and should also help with SELinux (if enabled).
>
Postponing this specific change to later 7.3 rebase.
Comment 10 Tereza Cerna 2016-09-09 05:16:10 EDT
Hi,

I'm confused from this bug and I don't know what is really expected result. What everything should be set and work? What all should I do for testing this bug?

# tuned-adm profile realtime-virtual-host

# ./find-lapictscdeadline-optimal.sh lat.out 
./find-lapictscdeadline-optimal.sh: line 10: *100/ 3429: syntax error: operand expected (error token is "*100/ 3429")
optimal value for lapic_timer_advance_ns is: 7000

>> Optimal value seems well - 7000 - like in description.
>> There is syntax error, should I create a bug?

# cat /sys/module/kvm/parameters/lapic_timer_advance_ns
1000

>> Why there is 1000 and not 7000?

# ls /usr/lib/tuned/realtime-virtual-host
find-lapictscdeadline-optimal.sh  lat.out  run-tscdeadline-latency.sh  script.sh  tuned.conf
# ls /var/lib/tuned
ls: cannot access /var/lib/tuned: No such file or directory

>> Files lapic_timer_adv_ns and lapic_timer_adv_ns.cpumodel are missing in /usr/lib/tuned/realtime-virtual-host and /var/lib/tuned. Where is it? Are these files necessary?

# rpm -q tuned
tuned-2.7.1-2.el7.noarch
Comment 11 Tereza Cerna 2016-09-09 05:21:16 EDT
There is behavior on old tuned package:

# tuned-adm profile realtime-virtual-host

# ./find-lapictscdeadline-optimal.sh lat.out 
optimal value for lapic_timer_advance_ns is: 6500

# cat /sys/module/kvm/parameters/lapic_timer_advance_ns 
1000

# ls /usr/lib/tuned/realtime-virtual-host/
find-lapictscdeadline-optimal.sh  lat.out  run-tscdeadline-latency.sh  script.sh  tuned.conf
# ls /var/lib/tuned
ls: cannot access /var/lib/tuned: No such file or directory

# rpm -q tuned
tuned-2.5.1-4.el7_2.3.noarch
Comment 12 Luiz Capitulino 2016-09-09 09:01:22 EDT
Is lat.out the one attached in this BZ? If it is, then I can't explain why it is working for you. But at the same time, this was a minor bug and I don't think it's worth it to spend time trying to figure out how an old version of tuned used to work.

In this case, I'd recommend skipping verification for this one.
Comment 15 errata-xmlrpc 2016-11-04 03:25:35 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2479.html

Note You need to log in before you can comment on or make changes to this bug.