[LTCTest][OPAL][OP920] OPAL PRD generated logs is not available in /var/log/opal-prd.log file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu-power-systems project |
Fix Released
|
High
|
Canonical Foundations Team | ||
skiboot (Ubuntu) |
Fix Released
|
High
|
Canonical Foundations Team | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Without this fix we end up creating /var/log/
[Test Case]
- install fixed version of opal-prd package
- stop opal-prd daemon : sudo systemctl stop opal-prd
- force log rotation : sudo /usr/sbin/logrotate -f /etc/logrotate.conf
- check whether opal-prd logs /var/log/
- start opal-prd daemon : sudo systemctl start opal-prd : at that point opal-prd should just re-use the log with the proper mode.
[Regression Potential]
This is just changing owner for /var/log/
Without this fix, file won't be created and prd logs gets dropped.
I do not see any possible regression with this fix.
----------------
Original description follows:
== Comment: #0 - PAVAMAN SUBRAMANIYAM - 2018-06-27 05:00:15 ==
Install a P9 Open Power Hardware with the latest OP920 Firmware images provided in the following link:
http://
root@witherspoon:~# cat /etc/os-release
ID="openbmc-
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="ibm-v2.1"
VERSION_
PRETTY_
BUILD_ID=
root@witherspoon:~# cat /var/lib/
IBM-witherspoon
occ-90208bb
sbe-0b006e7
Then check if the OPAL prd generated logs are captured in /var/log/
root@ltc-
root@ltc-
0
== Comment: #4 - VASANT HEGDE - 2018-06-27 09:12:48 ==
root@ltc-
Jun 27 08:00:44 ltc-wspoon11 rsyslogd: file '/var/log/
root@ltc-
total 83332
-rw-r--r-- 1 root root 11833 Jun 15 03:15 alternatives.log
....
-rw-r--r-- 1 root root 0 May 1 06:25 opal-prd.log
-rw-r----- 1 syslog adm 5084615 May 1 02:12 opal-prd.log.1
Notice that opal-prd.log file is owned by root user while opal-prd.log.1 is owned by syslog.
That means someone has manually created that log file?
I deleted opal-prd.log file and restart opal-prd daemon.
rm /var/log/
systemctl restart opal-prd
head /var/log/
Jun 27 08:02:41 ltc-wspoon11 opal-prd: CTRL: Starting PRD daemon
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000000 engine 3 port 0
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000000 engine 1 port 2
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000008 engine 3 port 1
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000008 engine 1 port 2
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000000 engine 3 port 1
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000000 engine 2 port 0
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000000 engine 1 port 0
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000008 engine 3 port 0
Jun 27 08:02:41 ltc-wspoon11 opal-prd: I2C: Found Chip: 00000008 engine 1 port 0
root@ltc-
...
-rw-r----- 1 syslog syslog 80804 Jun 27 08:02 opal-prd.log
...
So looks like its user error.
-Vasant
== Comment: #6 - VASANT HEGDE - 2018-07-30 23:16:39 ==
Looks like logrorate stuff is creating new file with root user. Below change should fix this.
:/etc/logrotate.d# diff -Naurp opal-prd.org opal-prd
--- opal-prd.org 2018-07-30 13:04:08.814168026 -0400
+++ opal-prd 2018-07-31 00:09:04.145154122 -0400
@@ -5,5 +5,5 @@
delaycompress
missingok
notifempty
- create 644 root root
+ create 644 syslog adm
}
-Vasant
== Comment: #7 - VASANT HEGDE - 2018-07-30 23:17:38 ==
Fred,
Can you look into the proposed change?
-Vasant
== Comment: #8 - Frederic Bonnard <email address hidden> - 2018-07-31 01:18:28 ==
Hi all,
thanks Vasant for the investigation. The fix looks good,
I'm just going to check that on Debian as well.
I'll let you know asap,
F.
tags: | added: architecture-ppc64le bugnameltc-169279 severity-high targetmilestone-inin1804 |
Changed in ubuntu: | |
assignee: | nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) |
affects: | ubuntu → opal (Ubuntu) |
Changed in ubuntu-power-systems: | |
importance: | Undecided → High |
tags: | added: triage-g |
Changed in ubuntu-power-systems: | |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
tags: | added: id-5b63304d24c8d673190c285b |
Changed in opal (Ubuntu): | |
importance: | Undecided → High |
assignee: | Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Foundations Team (canonical-foundations) |
Changed in ubuntu-power-systems: | |
status: | New → Triaged |
tags: | added: p9 |
tags: |
added: triage-a removed: triage-g |
description: | updated |
affects: | opal (Ubuntu) → skiboot (Ubuntu) |
Changed in skiboot (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in ubuntu-power-systems: | |
status: | Triaged → Fix Committed |
description: | updated |
Changed in ubuntu-power-systems: | |
status: | Fix Committed → Fix Released |
Fixed in skiboot-6.1-2 (Debian/Unstable). /salsa. debian. org/debian/ skiboot/ commit/ 0e6ac150e51a0e7 b3701acf78c3117 09b6336d58
You may use the same fix for 18.04 there :
https:/
F.