Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1114262

Summary: swift proxy server failed to install due to error in configuration file /etc/swift/proxy-server.conf
Product: Red Hat OpenStack Reporter: bkopilov <bkopilov>
Component: openstack-packstackAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 7)CC: acathrow, adahms, aortega, derekh, nlevinki, pematous, psedlak, sclewis, yeylon
Target Milestone: rc   
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2014.1.1-0.29.dev1196.el7ost Doc Type: Bug Fix
Doc Text:
Previously, the Swift proxy service would fail to start in Red Hat OpenStack environments installed using the PackStack all-in-one installation process. This was caused by the Swift proxy service attempting to read filters in the proxy-server.conf using names different to those actually written to that file. Now, the names of those filters have been standardized so that the Swift proxy service starts successfully under these conditions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-08 15:39:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1109087    

Description bkopilov 2014-06-29 09:40:34 UTC
Description of problem:
After installing openstack with packstack, swift proxy service fails to start.
the root cause is configuration error in /etc/swift/proxy-server.conf

vim /etc/swift/proxy-server.conf
# problem : account_* instead account-
[filter:account-quotas]
use = egg:swift#account-quotas



Jun 29 04:50:03 test1392 systemd: Started OpenStack Object Storage (swift) - Proxy Server.
Jun 29 04:50:03 test1392 systemd: Failed to reset devices.list on /system.slice/system-epmd.slice: Invalid argument
Jun 29 04:50:03 test1392 systemd: Reloading.
Jun 29 04:50:04 test1392 swift-proxy-server: Traceback (most recent call last):
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/bin/swift-proxy-server", line 23, in <module>
Jun 29 04:50:04 test1392 swift-proxy-server: sys.exit(run_wsgi(conf_file, 'proxy-server', default_port=8080, **options))
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 389, in run_wsgi
Jun 29 04:50:04 test1392 swift-proxy-server: loadapp(conf_path, global_conf=global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 316, in loadapp
Jun 29 04:50:04 test1392 swift-proxy-server: ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 307, in loadcontext
Jun 29 04:50:04 test1392 swift-proxy-server: global_conf=global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
Jun 29 04:50:04 test1392 swift-proxy-server: global_conf=global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
Jun 29 04:50:04 test1392 swift-proxy-server: return loader.get_context(object_type, name, global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 59, in get_context
Jun 29 04:50:04 test1392 swift-proxy-server: object_type, name=name, global_conf=global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 450, in get_context
Jun 29 04:50:04 test1392 swift-proxy-server: global_additions=global_additions)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 562, in _pipeline_app_context
Jun 29 04:50:04 test1392 swift-proxy-server: for name in pipeline[:-1]]
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/swift/common/wsgi.py", line 59, in get_context
Jun 29 04:50:04 test1392 swift-proxy-server: object_type, name=name, global_conf=global_conf)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 408, in get_context
Jun 29 04:50:04 test1392 swift-proxy-server: object_type, name=name)
Jun 29 04:50:04 test1392 swift-proxy-server: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 587, in find_config_section
Jun 29 04:50:04 test1392 swift-proxy-server: self.filename))
Jun 29 04:50:04 test1392 swift-proxy-server: LookupError: No section 'account-quotas' (prefixed by 'filter') found in config /etc/swift/proxy-server.conf

Version-Release number of selected component (if applicable):
10:40:46 10.35.167.25|<<<--|Installed:
10:40:46 10.35.167.25|<<<--|  openstack-packstack.noarch 0:2014.1.1-0.28.dev1194.el7ost                     
10:40:46 10.35.167.25|<<<--|
10:40:46 10.35.167.25|<<<--|Dependency Installed:
10:40:46 10.35.167.25|<<<--|  openstack-packstack-puppet.noarch 0:2014.1.1-0.28.dev1194.el7ost              
10:40:46 10.35.167.25|<<<--|  openstack-puppet-modules.noarch 0:2014.1-18.el7ost                            
10:40:46 10.35.167.25|<<<--|  perl.x86_64 4:5.16.3-283.el7                                                  
10:40:46 10.35.167.25|<<<--|  perl-Carp.noarch 0:1.26-244.el7                                               
10:40:46 10.35.167.25|<<<--|  perl-Encode.x86_64 0:2.51-7.el7                                               
10:40:46 10.35.167.25|<<<--|  perl-Exporter.noarch 0:5.68-3.el7                                             
10:40:46 10.35.167.25|<<<--|  perl-File-Path.noarch 0:2.09-2.el7                                            
10:40:46 10.35.167.25|<<<--|  perl-File-Temp.noarch 0:0.23.01-3.el7                                         
10:40:46 10.35.167.25|<<<--|  perl-Filter.x86_64 0:1.49-3.el7                                               
10:40:46 10.35.167.25|<<<--|  perl-Getopt-Long.noarch 0:2.40-2.el7                                          
10:40:46 10.35.167.25|<<<--|  perl-HTTP-Tiny.noarch 0:0.033-3.el7                                           
10:40:46 10.35.167.25|<<<--|  perl-PathTools.x86_64 0:3.40-5.el7                                            
10:40:46 10.35.167.25|<<<--|  perl-Pod-Escapes.noarch 1:1.04-283.el7                                        
10:40:46 10.35.167.25|<<<--|  perl-Pod-Perldoc.noarch 0:3.20-4.el7                                          
10:40:46 10.35.167.25|<<<--|  perl-Pod-Simple.noarch 1:3.28-4.el7                                           
10:40:46 10.35.167.25|<<<--|  perl-Pod-Usage.noarch 0:1.63-3.el7                                            
10:40:46 10.35.167.25|<<<--|  perl-Scalar-List-Utils.x86_64 0:1.27-248.el7                                  
10:40:46 10.35.167.25|<<<--|  perl-Socket.x86_64 0:2.010-3.el7                                              
10:40:46 10.35.167.25|<<<--|  perl-Storable.x86_64 0:2.45-3.el7                                             
10:40:46 10.35.167.25|<<<--|  perl-Text-ParseWords.noarch 0:3.29-4.el7                                      
10:40:46 10.35.167.25|<<<--|  perl-Time-Local.noarch 0:1.2300-2.el7                                         
10:40:46 10.35.167.25|<<<--|  perl-constant.noarch 0:1.27-2.el7                                             
10:40:46 10.35.167.25|<<<--|  perl-libs.x86_64 4:5.16.3-283.el7                                             
10:40:46 10.35.167.25|<<<--|  perl-macros.x86_64 4:5.16.3-283.el7                                           
10:40:46 10.35.167.25|<<<--|  perl-parent.noarch 1:0.225-244.el7                                            
10:40:46 10.35.167.25|<<<--|  perl-podlators.noarch 0:2.5.1-3.el7                                           
10:40:46 10.35.167.25|<<<--|  perl-threads.x86_64 0:1.87-4.el7                                              
10:40:46 10.35.167.25|<<<--|  perl-threads-shared.x86_64 0:1.43-6.el7                                       
10:40:46 10.35.167.25|<<<--|  python-netaddr.noarch 0:0.7.5-7.el7                                           
10:40:46 10.35.167.25|<<<--|  ruby.x86_64 0:2.0.0.353-20.el7                                                
10:40:46 10.35.167.25|<<<--|  ruby-irb.noarch 0:2.0.0.353-20.el7                                            
10:40:46 10.35.167.25|<<<--|  ruby-libs.x86_64 0:2.0.0.353-20.el7                                           
10:40:46 10.35.167.25|<<<--|  rubygem-bigdecimal.x86_64 0:1.2.0-20.el7                                      
10:40:46 10.35.167.25|<<<--|  rubygem-io-console.x86_64 0:0.4.2-20.el7                                      
10:40:46 10.35.167.25|<<<--|  rubygem-json.x86_64 0:1.7.7-20.el7                                            
10:40:46 10.35.167.25|<<<--|  rubygem-psych.x86_64 0:2.0.0-20.el7                                           
10:40:46 10.35.167.25|<<<--|  rubygem-rdoc.noarch 0:4.0.0-20.el7                                            
10:40:46 10.35.167.25|<<<--|  rubygems.noarch 0:2.0.14-20.el7                           

How reproducible:
Install openstack   , swift configuration error. 

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Pavel Sedlák 2014-06-29 11:00:37 UTC
diff of config bellow, versions used 
both swift-broken and swift-working has
 openstack-swift.noarch                1.13.1-2.el7ost
 openstack-swift-account.noarch        1.13.1-2.el7ost
 openstack-swift-container.noarch      1.13.1-2.el7ost
 openstack-swift-object.noarch         1.13.1-2.el7ost
 openstack-swift-plugin-swift3.noarch  1.7-3.el7ost
 openstack-swift-proxy.noarch          1.13.1-2.el7ost


swift-working:
openstack-puppet-modules.noarch       2014.1-17.1.el7ost
openstack-packstack.noarch            2014.1.1-0.27.dev1184.el7ost
openstack-packstack-puppet.noarch     2014.1.1-0.27.dev1184.el7ost

swift-broken:
openstack-puppet-modules.noarch       2014.1-18.el7ost
openstack-packstack.noarch            2014.1.1-0.28.dev1194.el7ost
openstack-packstack-puppet.noarch     2014.1.1-0.28.dev1194.el7ost

> $ diff swift-broken/node1/etc/swift/proxy-server.conf swift-working/node1/etc/swift/proxy-server.conf 
> 6c6
> < bind_ip = 172.16.32.79
> ---
> > bind_ip = 172.16.32.12
> 19c19
> < pipeline = catch_errors bulk healthcheck cache crossdomain ratelimit authtoken keystone staticweb tempurl slo formpost account-quotas container-quotas proxy-server
> ---
> > pipeline = catch_errors bulk healthcheck cache ratelimit authtoken keystone staticweb tempurl slo formpost account-quotas container-quotas proxy-server
> 31,33d30
> < 
> < 
> < 
> 45c42
> < auth_host = 172.16.32.79
> ---
> > auth_host = 172.16.32.12
> 48c45
> < auth_uri = http://172.16.32.79:5000
> ---
> > auth_uri = http://172.16.32.12:5000
> 52c49
> < admin_password = 5621ab0e99ca4837
> ---
> > admin_password = a21e47ca02904001
> 86,89d82
> < [filter:crossdomain]
> < use = egg:swift#crossdomain
> < cross_domain_policy = <allow-access-from domain="*" secure="false" />
> < 
> 104c97
> < [filter:account_quotas]
> ---
> > [filter:account-quotas]
> 108c101
> < [filter:container_quotas]
> ---
> > [filter:container-quotas]

So based on that in pipeline both account-quotas and container-quotas are with dash, not underscore, both changes visible at the end of diff are invalid.

in https://github.com/stackforge/packstack/blob/master/packstack/puppet/templates/swift_proxy.pp list for pipeline has dashes, template in https://github.com/stackforge/puppet-swift/blob/master/templates/proxy/account_quotas.conf.erb contains underscore

Comment 3 Pavel Sedlák 2014-06-29 11:03:25 UTC
lp bug was reason for the change of pipeline name in swift puppets https://bugs.launchpad.net/openstack-cisco/+bug/1323761

Comment 6 Pavel Sedlák 2014-07-01 09:49:14 UTC
Noting one of possible workarounds:
on aio node, or all nodes where
> systemctl is-enabled openstack-swift-proxy
do
> sed -ri "s/(account|container)-quotas/\1_quotas/g" /etc/swift/proxy-server.conf && openstack-service restart swift-proxy
then you can check with
> openstack-service status swift
that all services are running there as expected

Comment 7 nlevinki 2014-07-02 08:38:10 UTC
Tested on 
Puddle Root Directory:
http://download.lab.bos.redhat.com/rel-eng/OpenStack/5.0-RHEL-7/2014-07-01.2
== Swift services ==                                                
openstack-swift-proxy:                  active                      
openstack-swift-account:                active                      
openstack-swift-container:              active                      
openstack-swift-object:                 active                
[root@dhcp163-70 ~(keystone_admin)]# rpm -qa | grep swift
openstack-swift-account-1.13.1-2.el7ost.noarch
openstack-swift-plugin-swift3-1.7-3.el7ost.noarch
openstack-swift-object-1.13.1-2.el7ost.noarch
openstack-swift-container-1.13.1-2.el7ost.noarch
python-swiftclient-2.0.2-1.el7ost.noarch
openstack-swift-proxy-1.13.1-2.el7ost.noarch
openstack-swift-1.13.1-2.el7ost.noarch

Comment 9 errata-xmlrpc 2014-07-08 15:39:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-0846.html