Bug 1289761 - PackStack installs Nova crontab that nova user can't run
Summary: PackStack installs Nova crontab that nova user can't run
Status: NEW
Alias: None
Product: RDO
Classification: Community
Component: openstack-packstack (Show other bugs)
(Show other bugs)
Version: Liberty
Hardware: Unspecified Unspecified
Target Milestone: ---
: Liberty
Assignee: Javier Peña
QA Contact: Shai Revivo
Keywords: Triaged
Depends On:
TreeView+ depends on / blocked
Reported: 2015-12-08 22:00 UTC by Stephen Gordon
Modified: 2018-07-17 12:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1412064 None None None Never
Red Hat Bugzilla 1428572 None None None Never

Description Stephen Gordon 2015-12-08 22:00:33 UTC
Description of problem:

After running packstack --allinone the Nova user has this crontab entry:

PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh
1 */12 * * * nova-manage db archive_deleted_rows --max_rows 100 >>/dev/null 2>&1

It appears when this eventually runs it aborts because the nova user can't write to the nova-manage log file, eventually when I came back to the system I was informed I had this abrt message:

# abrt-cli list --since 1449577736
id 7e9fa7d04dc7e01e909362ac5454ac22a807339c
reason:         __init__.py:925:_open:IOError: [Errno 13] Permission denied: '/var/log/nova/nova-manage.log'
time:           Tue 08 Dec 2015 12:01:05 PM EST
cmdline:        /usr/bin/python2 /bin/nova-manage db archive_deleted_rows --max_rows 100
package:        openstack-nova-common-12.0.0-1.el7
uid:            162 (nova)
count:          1
Directory:      /var/spool/abrt/Python-2015-12-08-12:01:05-14343
Run 'abrt-cli report /var/spool/abrt/Python-2015-12-08-12:01:05-14343' for creating a case in Red Hat Customer Portal

The Autoreporting feature is disabled. Please consider enabling it by issuing
'abrt-auto-reporting enabled' as a user with root privileges

Version-Release number of selected component (if applicable):

RDO Liberty

Comment 2 Ivan Chavero 2016-05-25 21:26:52 UTC
This task is added by the puppet nova module, changing component to OPM

Comment 4 Diana Clarke 2016-08-29 19:43:42 UTC
*** Bug 1368588 has been marked as a duplicate of this bug. ***

Comment 5 Chris Paquin 2017-02-16 20:28:06 UTC
Seeing this in OSP 10 as well.

abrt-cli list
id 07381fb67f636f87949445bc7dc8e47004a7f265
reason:         __init__.py:925:_open:IOError: [Errno 13] Permission denied: '/var/log/nova/nova-manage.log'
time:           Tue 17 Jan 2017 12:01:05 AM EST
cmdline:        /usr/bin/python2 /bin/nova-manage db archive_deleted_rows --max_rows 100
package:        openstack-nova-common-14.0.2-7.el7ost
uid:            162 (nova)
count:          31

Comment 6 Philip Sweany 2017-07-28 04:36:04 UTC
Continuing to see this in OSP 10.  Possibly, this could be one factor for the the slow start of nova on our Red Hat Training OSP10 systems.  Yes, this appears to be the exact same issue as on the RDO bugzilla 1289761.

reason:         __init__.py:925:_open:IOError: [Errno 13] Permission denied: '/var/log/nova/nova-manage.log'
cmdline:        /usr/bin/python2 /bin/nova-manage db archive_deleted_rows --max_rows 100
executable:     /bin/nova-manage
package:        openstack-nova-common-14.0.3-8.el7ost
component:      openstack-nova
pid:            21612
hostname:       director.lab.example.com
count:          1
abrt_version:   2.1.11
analyzer:       Python
architecture:   x86_64
duphash:        ca12725b99d5613e6637c487ba6a97cb23670423
kernel:         3.10.0-514.el7.x86_64
last_occurrence: 1498881664
os_release:     Red Hat Enterprise Linux Server release 7.3 (Maipo)
pkg_arch:       noarch
pkg_epoch:      1
pkg_fingerprint: 199E 2F91 FD43 1D51
pkg_name:       openstack-nova-common
pkg_release:    8.el7ost
pkg_vendor:     Red Hat, Inc.
pkg_version:    14.0.3
runlevel:       N 3
time:           Sat 01 Jul 2017 12:01:04 AM EDT
type:           Python
uid:            162
username:       nova
uuid:           ca12725b99d5613e6637c487ba6a97cb23670423

:__init__.py:925:_open:IOError: [Errno 13] Permission denied: '/var/log/nova/nova-manage.log'
:Traceback (most recent call last):
:  File "/bin/nova-manage", line 10, in <module>
:    sys.exit(main())
:  File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1560, in main
:    logging.setup(CONF, "nova")
:  File "/usr/lib/python2.7/site-packages/oslo_log/log.py", line 269, in setup
:    _setup_logging_from_conf(conf, product_name, version)
:  File "/usr/lib/python2.7/site-packages/oslo_log/log.py", line 366, in _setup_logging_from_conf
:    filelog = file_handler(logpath)
:  File "/usr/lib64/python2.7/logging/handlers.py", line 392, in __init__
:    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
:  File "/usr/lib64/python2.7/logging/__init__.py", line 902, in __init__
:    StreamHandler.__init__(self, self._open())
:  File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
:    stream = open(self.baseFilename, self.mode)
:IOError: [Errno 13] Permission denied: '/var/log/nova/nova-manage.log'

Comment 7 Philip Sweany 2017-07-28 04:37:43 UTC
Ignore last comment.  Posted on the wrong bugzilla.

Comment 9 Martin Magr 2018-07-17 12:22:06 UTC
I'm not working on Packstack any more. Reassigning to more appropriate engineer.

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