Bug 1488517
| Summary: | Manual reboot needed to apply tuned kernel arguments | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Ofer Blaut <oblaut> |
| Component: | openstack-tripleo-heat-templates | Assignee: | Saravanan KR <skramaja> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Yariv <yrachman> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 10.0 (Newton) | CC: | atelang, cfontain, emacchi, fbaudin, itbrown, jskarvad, ksundara, mbabushk, mburns, oblaut, olysonek, rhel-osp-director-maint, skramaja, supadhya, vchundur, yrachman, zgreenbe |
| Target Milestone: | z9 | Keywords: | Regression, TestOnly, Triaged, ZStream |
| Target Release: | 10.0 (Newton) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Known Issue | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1488369 | Environment: | |
| Last Closed: | 2018-09-05 06:44:37 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: | 1488369 | ||
| Bug Blocks: | 1563386, 1563743 | ||
|
Description
Ofer Blaut
2017-09-05 14:57:07 UTC
flag added requires_doc_text ? as a known issue with w/a The issue is caused in tuned-2.8 because of the patch [1]. Tuned is trying to identify its daemon is down because of system reboot or service stopped explicitly by user. Former does not require a roll-back, where as the later requires roll-back of tuned changes. So the problem is tuned changes are rolled back during the reboot from the cloud-init (first-boot). The system state is identified via "systemctl is-system-running" command. The expected value incase of reboot is "stopping" but when the reboot is called during the cloud-init (first-boot) scripts, the system state is still in "starting" and not changed to "stopping" even on reboot. I am not sure if it is expected behavior of systemd or a bug in systemd [2]. As of now, I don't have a workaround for this. [1] https://github.com/redhat-performance/tuned/commit/df9aa2f5c46e4db08a077081ca15b6da541b4514?diff=split#diff-ea63e0c5d4daa711fe01bc50e4db0145R151 [2] https://github.com/systemd/systemd/blob/d9ada1e4e122bbabd167589478e1e0735ca8b028/src/core/manager.c#L3448 I have tried to find a workaround to overcome this issue. It looks like if the reboot is done outside the cloud-init module, the flow works fine (not sure why). And tuned settings are retained.
cat >/usr/lib/systemd/system/tripleo-reboot-epa.service<<EOF_CAT
[Unit]
Description=Reboot after system start-up
[Service]
Type=forking
ExecStart=/root/test.sh
EOF_CAT
cat >/root/test.sh<<EOF_CAT
#!/bin/bash
set -x
echo "EPA restart service, wait for system starting.."
start() {
set -x
if [ ! -f /root/reboot_epa ]; then
touch /root/reboot_epa;
echo 'Restarting system';
systemctl reboot;
fi
}
start&
EOF_CAT
chmod +x /root/test.sh
systemctl daemon-reload
systemctl start tripleo-reboot-epa
complete first-boot.yaml - http://chunk.io/krsacme/d4ff9b2a55f144799b4ed98681fbca81
I prefer this to be validated by QE before we conclude whether it could be used or not.
This is indeed a regression in Tuned. The fix is available here: https://github.com/redhat-performance/tuned/pull/66 (In reply to Saravanan KR from comment #5) > I have tried to find a workaround to overcome this issue. It looks like if > the reboot is done outside the cloud-init module, the flow works fine (not > sure why). I'm not familiar with cloud-init, so just a wild guess: is cloud-init run as a system service on bootup? If so, and systemd doesn't recognize it as started up before cloud-init run's 'reboot', then 'systemctl is-system-running' will keep reporting the system state as 'starting', which will trigger the Tuned bug. (In reply to Ondřej Lysoněk from comment #6) > This is indeed a regression in Tuned. The fix is available here: > https://github.com/redhat-performance/tuned/pull/66 > > (In reply to Saravanan KR from comment #5) > > I have tried to find a workaround to overcome this issue. It looks like if > > the reboot is done outside the cloud-init module, the flow works fine (not > > sure why). > > I'm not familiar with cloud-init, so just a wild guess: is cloud-init run as > a system service on bootup? If so, and systemd doesn't recognize it as > started up before cloud-init run's 'reboot', then 'systemctl > is-system-running' will keep reporting the system state as 'starting', which > will trigger the Tuned bug. Yes, this is the case, detailed in comment #4 Marking as POST based on Ondrej comment above: https://bugzilla.redhat.com/show_bug.cgi?id=1488517#c6 Waiting for Downstream Package Automation is Ready https://github.com/redhat-openstack/tempest-nfv-plugin/blob/devel/tempest_plugin/tests/scenario/test_nfv_epa.py#L205 The tuned build with the fix is in 7.4.z now. This can be tested with the latest puddles on OSP 10 After 10zAsync Fresh install Tuned looks good, no reboot needed BOOT_IMAGE=/boot/vmlinuz-3.10.0-862.3.3.el7.x86_64 root=UUID=68da77cc-ba27-41f2-ba68-fb165a0d503f ro console=tty0 console=ttyS0,115200n8 crashkernel=auto rhgb quiet default_hugepagesz=1GB hugepagesz=1G hugepages=32 iommu=pt intel_iommu=on isolcpus=1,2,3,4,5,6,7,9,10,17,18,19,20,21,22,23,11,12,13,14,15,25,26,27,28,29,30,31 skew_tick=1 nohz=on nohz_full=1,2,3,4,5,6,7,9,10,17,18,19,20,21,22,23,11,12,13,14,15,25,26,27,28,29,30,31 rcu_nocbs=1,2,3,4,5,6,7,9,10,17,18,19,20,21,22,23,11,12,13,14,15,25,26,27,28,29,30,31 tuned.non_isolcpus=01010101 intel_pstate=disable nosoftlockup [heat-admin@compute-0 ~]$ sudo tuned-adm active In /var/log/tuned.log Current active profile: cpu-partitioning 2018-06-20 23:40:36,063 INFO tuned.daemon.daemon: static tuning from profile 'cpu-partitioning' applied As confirmed on comment #20, no manaual reboot is required. |