Description of problem: Start one virtual machine on local machine, and config the proper repo file. then install beaker-server. It will show : Installing : beaker-server-0.14.0-1.git.12.daa174f.el6eng.noarch 69/69 chown: cannot access `/var/log/beaker/*.log': No such file or directory chmod: cannot access `/var/log/beaker/*.log': No such file or directory Version-Release number of selected component (if applicable): 0.14 How reproducible: Always Steps to Reproduce: 1. Config the proper repo 2. ll /var/log/beaker 3. yum install beaker-server 4. ll /var/log/beaker Actual results: 2. [root@test-xjia ~]# ll /var/log/beaker ls: cannot access /var/log/beaker: No such file or directory 3. [root@test-xjia ~]# yum install beaker-server Loaded plugins: product-id, rhnplugin, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. There was an error communicating with RHN. <--snip--> Installing : beaker-server-0.14.0-1.git.12.daa174f.el6eng.noarch 69/69 chown: cannot access `/var/log/beaker/*.log': No such file or directory chmod: cannot access `/var/log/beaker/*.log': No such file or directory cdn/productid | 1.7 kB 00:00 Verifying : 1:python-lockfile-0.9.1-2.el6eng.noarch 1/69 <--snip--> Installed: beaker-server.noarch 0:0.14.0-1.git.12.daa174f.el6eng 4.[root@test-xjia ~]# ll /var/log/beaker total 0 -rw-------. 1 root root 0 Aug 5 23:41 beakerd.log -rw-------. 1 root root 0 Aug 5 23:41 server-debug.log -rw-------. 1 root root 0 Aug 5 23:41 server-errors.log Expected results: 4. [root@test-xjia ~]# ll /var/log/beaker total 0 -rw-r--r--. 1 root root 0 Aug 5 23:41 beakerd.log -rw-r--r--. 1 root root 0 Aug 5 23:41 server-debug.log -rw-r--r--. 1 root root 0 Aug 5 23:41 server-errors.log Additional info:
[root@test-xjia ~]# rpm -q --scripts beaker-server-0.14.0-1.git.12.daa174f.el6eng.noarch postinstall scriptlet (using /bin/sh): /sbin/chkconfig --add beakerd # Migrate ConcurrentLogHandler -> syslog rm -f /var/log/beaker/*.lock 2>&1 || : chown root:root /var/log/beaker/*.log 2>&1 || : chmod go-w /var/log/beaker/*.log 2>&1 || : <--snip--> That means when executing "chown root:root /var/log/beaker/*.log 2>&1 || :" the directory /var/log/beaker doesn't exist.
(In reply to xjia from comment #0) > Installing : beaker-server-0.14.0-1.git.12.daa174f.el6eng.noarch > 69/69 > chown: cannot access `/var/log/beaker/*.log': No such file or directory > chmod: cannot access `/var/log/beaker/*.log': No such file or directory This is indeed a bug, but not a serious one. Those commands are supposed to fail silently if the logs are missing, but we forgot to redirect the output to /dev/null. > 4.[root@test-xjia ~]# ll /var/log/beaker > total 0 > -rw-------. 1 root root 0 Aug 5 23:41 beakerd.log > -rw-------. 1 root root 0 Aug 5 23:41 server-debug.log > -rw-------. 1 root root 0 Aug 5 23:41 server-errors.log > > Expected results: > > 4. [root@test-xjia ~]# ll /var/log/beaker > total 0 > -rw-r--r--. 1 root root 0 Aug 5 23:41 beakerd.log > -rw-r--r--. 1 root root 0 Aug 5 23:41 server-debug.log > -rw-r--r--. 1 root root 0 Aug 5 23:41 server-errors.log I don't see anything wrong here. The beaker-server package owns the /var/log/beaker directory, which should be 0755. But the log files themselves are written by rsyslog, Beaker has nothing to do with them. The permissions on those files will depend on the rsyslog config. The default RHEL6 rsyslog config writes its logs as 0600 so that is what I would expect. Note that the admin can always chmod the log files if desired, and rsyslog and logrotate will preserve the permissions.
On Gerrit: http://gerrit.beaker-project.org/2150
This fix is included in beaker-0.14.1-1.git.19.d4aace1.el6eng, which is available for download here: http://beaker-project.org/nightlies/
[root@test-xjia ~]# rm -rf /var/log/beaker [root@test-xjia ~]# yum install beaker-server Loaded plugins: product-id, rhnplugin, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. There was an error communicating with RHN. RHN Satellite or RHN Classic support will be disabled. Error Message: Please run rhn_register as root on this client Error Class Code: 9 Error Class Info: Invalid System Credentials. Explanation: An error has occurred while processing your request. If this problem persists please enter a bug report at bugzilla.redhat.com. If you choose to submit the bug report, please be sure to include details of what you were trying to do when this error occurred and details on how to reproduce this problem. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package beaker-server.noarch 0:0.14.1-1.git.19.d4aace1.el6eng will be installed --> Processing Dependency: beaker = 0.14.1-1.git.19.d4aace1.el6eng for package: beaker-server-0.14.1-1.git.19.d4aace1.el6eng.noarch --> Running transaction check ---> Package beaker.noarch 0:0.14.0-1.git.12.daa174f.el6eng will be updated ---> Package beaker.noarch 0:0.14.1-1.git.19.d4aace1.el6eng will be an update --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================== Package Arch Version Repository Size ====================================================================================================================== Installing: beaker-server noarch 0.14.1-1.git.19.d4aace1.el6eng beaker-client 1.1 M Updating for dependencies: beaker noarch 0.14.1-1.git.19.d4aace1.el6eng beaker-client 164 k Transaction Summary ====================================================================================================================== Install 1 Package(s) Upgrade 1 Package(s) Total download size: 1.3 M Is this ok [y/N]: y Downloading Packages: (1/2): beaker-0.14.1-1.git.19.d4aace1.el6eng.noarch.rpm | 164 kB 00:00 (2/2): beaker-server-0.14.1-1.git.19.d4aace1.el6eng.noarch.rpm | 1.1 MB 00:00 ---------------------------------------------------------------------------------------------------------------------- Total 1.4 MB/s | 1.3 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : beaker-0.14.1-1.git.19.d4aace1.el6eng.noarch 1/3 Installing : beaker-server-0.14.1-1.git.19.d4aace1.el6eng.noarch 2/3 Cleanup : beaker-0.14.0-1.git.12.daa174f.el6eng.noarch 3/3 Verifying : beaker-server-0.14.1-1.git.19.d4aace1.el6eng.noarch 1/3 Verifying : beaker-0.14.1-1.git.19.d4aace1.el6eng.noarch 2/3 Verifying : beaker-0.14.0-1.git.12.daa174f.el6eng.noarch 3/3 Installed: beaker-server.noarch 0:0.14.1-1.git.19.d4aace1.el6eng Dependency Updated: beaker.noarch 0:0.14.1-1.git.19.d4aace1.el6eng Complete! [root@test-xjia ~]# ll /var/log/beaker/ beakerd.log server-debug.log server-errors.log [root@test-xjia ~]# ll /var/log/beaker/ beakerd.log server-debug.log server-errors.log [root@test-xjia ~]# ll /var/log/beaker/* -rw-------. 1 root root 0 Aug 7 19:32 /var/log/beaker/beakerd.log -rw-------. 1 root root 0 Aug 7 19:32 /var/log/beaker/server-debug.log -rw-------. 1 root root 0 Aug 7 19:32 /var/log/beaker/server-errors.log
Beaker 0.15 has been released.