This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1305486 - Can't start httpd, horizon can't write to the log file (permission denied)
Can't start httpd, horizon can't write to the log file (permission denied)
Status: CLOSED DUPLICATE of bug 1293942
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
unspecified Severity urgent
: ---
: 8.0 (Liberty)
Assigned To: Matthias Runge
Ido Ovadia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-08 06:58 EST by Udi
Modified: 2016-02-09 04:09 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-09 04:09:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Udi 2016-02-08 06:58:03 EST
Description of problem:
After a power outage, httpd doesn't come back up on the overcloud. This is the output of "systemctl status" and the output from the failed command when you run it manually:


[heat-admin@overcloud-controller-0 ~]$ systemctl status httpd.service -l
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: failed (Result: exit-code) since Mon 2016-02-08 03:17:45 EST; 1h 32min ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 2775 ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=exited, status=1/FAILURE)

[heat-admin@overcloud-controller-0 ~]$ /usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear 
WARNING:root:"dashboards" and "default_dashboard" in (local_)settings is DEPRECATED now and may be unsupported in some future release. The preferred way to specify the order of dashboards and the default dashboard is the pluggable dashboard mechanism (in /usr/share/openstack-dashboard/openstack_dashboard/enabled, /usr/share/openstack-dashboard/openstack_dashboard/local/enabled).
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
    django.setup()
  File "/usr/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/lib/python2.7/site-packages/django/utils/log.py", line 86, in configure_logging
    logging_config_func(logging_settings)
  File "/usr/lib64/python2.7/logging/config.py", line 803, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib64/python2.7/logging/config.py", line 585, in configure
    '%r: %s' % (name, e))
ValueError: Unable to configure handler 'file': [Errno 13] Permission denied: '/var/log/horizon/horizon.log'


The file and the directory are owned by user apache so it should have permissions to there.


Version-Release number of selected component (if applicable):
python-django-horizon-8.0.0-8.el7ost.noarch


How reproducible:
50%. After rebooting the controller twice the problem finally was resolved, so there is a bit of randomness here.


Steps to Reproduce:
1. Reboot the overcloud


Actual results:
Apache doesn't come back up


Expected results:
The overcloud should come up immediately after a reboot
Comment 2 Udi 2016-02-08 08:24:39 EST
This seems to be 100% re-creatable when selinux is enforcing. The only success I had was when I set selinux to permissive and rebooted the controller.
Comment 3 Michele Baldessari 2016-02-08 08:35:38 EST
Should be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1293942
Comment 4 Udi 2016-02-08 08:38:59 EST
All other services also seem down:

[heat-admin@overcloud-controller-0 ~]$ openstack-service status
MainPID=0 Id=openstack-swift-account-auditor.service ActiveState=failed
MainPID=0 Id=openstack-swift-account-reaper.service ActiveState=failed
MainPID=0 Id=openstack-swift-account-replicator.service ActiveState=failed
MainPID=0 Id=openstack-swift-account.service ActiveState=failed
MainPID=0 Id=openstack-swift-container-auditor.service ActiveState=failed
MainPID=0 Id=openstack-swift-container-replicator.service ActiveState=failed
MainPID=0 Id=openstack-swift-container-updater.service ActiveState=failed
MainPID=0 Id=openstack-swift-container.service ActiveState=failed
MainPID=0 Id=openstack-swift-object-auditor.service ActiveState=failed
MainPID=0 Id=openstack-swift-object-replicator.service ActiveState=failed
MainPID=0 Id=openstack-swift-object-updater.service ActiveState=failed
MainPID=0 Id=openstack-swift-object.service ActiveState=failed
MainPID=0 Id=openstack-swift-proxy.service ActiveState=failed
Comment 5 Udi 2016-02-09 01:52:28 EST
I redeployed and made sure all services are up, and then rebooted the controller and this issue was recreated. Why does it happen only after a reboot ?
Comment 6 Matthias Runge 2016-02-09 04:09:19 EST
For Horizon, nothing has changed since 7.0 regarding SELinux.

*** This bug has been marked as a duplicate of bug 1293942 ***

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