[Bug 1785026] Comment bridged from LTC Bugzilla
bugproxy
bugproxy at us.ibm.com
Wed Mar 13 09:49:32 UTC 2019
------- Comment From pavsubra at in.ibm.com 2019-03-13 05:48 EDT-------
I have installed Ubuntu 18.04.2 OS on a P9 8335-GTH Hardware.
root at ltc-wspoon11:~# uname -a
Linux ltc-wspoon11 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:32:48 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux
root at ltc-wspoon11:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root at ltc-wspoon11:~# cat /proc/cpuinfo | tail
cpu : POWER9, altivec supported
clock : 2300.000000MHz
revision : 2.3 (pvr 004e 1203)
timebase : 512000000
platform : PowerNV
model : 8335-GTH
machine : PowerNV 8335-GTH
firmware : OPAL
MMU : Radix
root at ltc-wspoon11:~# service opal-prd status
? opal-prd.service - OPAL PRD daemon
Loaded: loaded (/lib/systemd/system/opal-prd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-03-13 04:05:10 CDT; 37min ago
Docs: man:opal-prd(8)
Main PID: 5284 (opal-prd)
Tasks: 1 (limit: 22118)
CGroup: /system.slice/opal-prd.service
??5284 /usr/sbin/opal-prd
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: PRDF:<<PRDF::initialize()
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: ATTN_SLOW:I>Service::enableAttns() enter
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: ATTN_SLOW:I>Service::enableAttns() exit
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: ATTN_SLOW:I><<ATTN_RT::enableAttns rc: 0
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: HBRT:<< enable_attns: rc=0x0
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: calling get_ipoll_events
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: HBRT:>> get_ipoll_events
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: HBRT:<< get_ipoll_events: rc=0x0
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: HBRT: enabling IPOLL events 0x5b90000000000000
Mar 13 04:05:12 ltc-wspoon11 opal-prd[5284]: FW: writing init message
root at ltc-wspoon11:~# ps -ef | grep opal
root 880 2 0 04:04 ? 00:00:01 [kopald]
root 5284 1 0 04:05 ? 00:00:00 /usr/sbin/opal-prd
root 6583 6005 0 04:42 pts/0 00:00:00 grep --color=auto opal
root at ltc-wspoon11:~# ls -l /var/log/opal-prd.log
-rw-r----- 1 syslog adm 105414 Mar 13 04:05 /var/log/opal-prd.log
root at ltc-wspoon11:~# cat /etc/rsyslog.d/10-opal-prd.conf
if $programname == 'opal-prd' then /var/log/opal-prd.log
if $programname == 'opal-prd' and $syslogseverity <= 4 then /var/log/syslog
if $programname == 'opal-prd' then ~
As can be seen the file is getting created
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to skiboot in Ubuntu.
Matching subscriptions: foundations-bugs-skiboot
https://bugs.launchpad.net/bugs/1785026
Title:
[LTCTest][OPAL][OP920] OPAL PRD generated logs is not available in
/var/log/opal-prd.log file
Status in The Ubuntu-power-systems project:
Fix Released
Status in skiboot package in Ubuntu:
Fix Released
Status in skiboot source package in Bionic:
Fix Released
Bug description:
[Impact]
Without this fix we end up creating /var/log/opal-prd.log file with root user. Hence rsyslogd will not be able to write data to this file. Hence we will not have enough opal-prd logs for debugging.
[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/opal-prd.log file has 644 mode and non root owner.
- 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/opal-prd.log file.
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://pfd.austin.ibm.com/releasenotes/openpower9/OP920/OP920_1824A/OP920_1824A_RelNote_Main.html
root at witherspoon:~# cat /etc/os-release
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="ibm-v2.1"
VERSION_ID="ibm-v2.1-438-g0030304-r15-0-g19832d3"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) ibm-v2.1"
BUILD_ID="ibm-v2.1-438-g0030304-r15"
root at witherspoon:~# cat /var/lib/phosphor-software-manager/pnor/ro/VERSION
IBM-witherspoon-ibm-OP9-v2.0.3-2.17
op-build-v2.0.3-2-g6279a04-dirty
buildroot-2018.02.1-6-ga8d1126
skiboot-v6.0.4
hostboot-9df0950-p378630b
occ-90208bb
linux-4.16.13-openpower1-pc10362e
petitboot-v1.7.1-pcc0e2c7
machine-xml-7cd20a6
hostboot-binaries-8097b96
capp-ucode-p9-dd2-v4
sbe-0b006e7
hcode-fbe2c7c
Then check if the OPAL prd generated logs are captured in /var/log
/opal-prd.log file.
root at ltc-wspoon11:/var/log# cat opal-prd.log
root at ltc-wspoon11:/var/log# echo $?
0
== Comment: #4 - VASANT HEGDE - 2018-06-27 09:12:48 ==
root at ltc-wspoon11:~# grep prd /var/log/syslog
Jun 27 08:00:44 ltc-wspoon11 rsyslogd: file '/var/log/opal-prd.log': open error: Permission denied [v8.32.0 try http://www.rsyslog.com/e/2433 ]
root at ltc-wspoon11:~# ls -l /var/log
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/opal-prd.log
systemctl restart opal-prd
head /var/log/opal-prd.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 at ltc-wspoon11:~# ls -l /var/log
...
-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 <FREDERIC at fr.ibm.com> - 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1785026/+subscriptions
More information about the foundations-bugs
mailing list