This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1305838 - When adding ceilometer to the pipeline, swift-proxy cannot start
When adding ceilometer to the pipeline, swift-proxy cannot start
Status: CLOSED CURRENTRELEASE
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-swift (Show other bugs)
5.0 (RHEL 7)
Unspecified Unspecified
low Severity low
: ---
: 5.0 (RHEL 7)
Assigned To: Pete Zaitcev
nlevinki
: Automation, AutomationBlocker, ZStream
: 1305840 1305841 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-09 06:31 EST by Arx Cruz
Modified: 2016-07-31 21:04 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-20 12:58:17 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1269473 None None None 2016-02-09 06:31 EST

  None (edit)
Description Arx Cruz 2016-02-09 06:31:18 EST
Description of problem:
When adding ceilometer to the pipeline, swift-proxy cannot start as it cannot read /etc/ceilometer/ceilometer.conf or create the swift-proxy log file in /var/log/ceilometer 


usermod -g ceilometer -G swift swift


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

python-swiftclient-2.1.0-3.el7ost.noarch
openstack-swift-object-1.13.1-8.el7ost.noarch
openstack-swift-container-1.13.1-8.el7ost.noarch
openstack-swift-account-1.13.1-8.el7ost.noarch
openstack-swift-proxy-1.13.1-8.el7ost.noarch
openstack-swift-1.13.1-8.el7ost.noarch
openstack-swift-plugin-swift3-1.7-3.el7ost.noarch

How reproducible:


Steps to Reproduce:
1. Install packstack
2. Configure swift-proxy editing /etc/swift/proxy-server.conf
3. Add ceilometer in the pipeline before proxy-server
4. Add the following filter:

[filter:ceilometer]
use = egg:ceilometer#swift
5. Restart openstack-swift-proxy service

Actual results:
openstack-swift-proxy service fails

Expected results:
openstack-swift-proxy service start successfully

Additional info:
If there's no access to /var/log/ceilometer, this is the error that happens:

Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 23, in <module>
    sys.exit(run_wsgi(conf_file, 'proxy-server', default_port=8080, **options))
  File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 389, in run_wsgi
    loadapp(conf_path, global_conf=global_conf)
  File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 323, in loadapp
    return ctx.create()
  File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 207, in invoke
    app = filter(app)
  File "/usr/lib/python2.7/site-packages/ceilometer/objectstore/swift_middleware.py", line 194, in ceilometer_filter
    return CeilometerMiddleware(app, conf)
  File "/usr/lib/python2.7/site-packages/ceilometer/objectstore/swift_middleware.py", line 79, in __init__
    service.prepare_service([])
  File "/usr/lib/python2.7/site-packages/ceilometer/service.py", line 147, in prepare_service
    log.setup('ceilometer')
  File "/usr/lib/python2.7/site-packages/ceilometer/openstack/common/log.py", line 440, in setup
    _setup_logging_from_conf(product_name, version)
  File "/usr/lib/python2.7/site-packages/ceilometer/openstack/common/log.py", line 504, in _setup_logging_from_conf
    filelog = logging.handlers.WatchedFileHandler(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/ceilometer/swift-proxy-server.log'

Also swift need to have access to /etc/ceilometer/ceilometer.conf

As workaround to make it works, I change the permissions on /var/log/ceilometer  to group rw, /etc/ceilometer to group rwx and add swift user in ceilometer group with the command:

usermod -g ceilometer -G swift swift

After that, the service starts successfully.

Notice that this issue was already fixed upstream, launchpad bug id attached.
Comment 2 Sergey Gotliv 2016-02-09 06:54:14 EST
*** Bug 1305840 has been marked as a duplicate of this bug. ***
Comment 3 Sergey Gotliv 2016-02-09 06:57:11 EST
*** Bug 1305841 has been marked as a duplicate of this bug. ***

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