RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1179931 - Variable of init script gets overwritten preventing the startup of swift services when using multiple server configurations
Summary: Variable of init script gets overwritten preventing the startup of swift serv...
Keywords:
Status: CLOSED EOL
Alias: None
Product: RDO
Classification: Community
Component: openstack-swift
Version: Icehouse
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: Juno
Assignee: Pete Zaitcev
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-07 20:38 UTC by Luca 'remix_tj' Lorenzetto
Modified: 2016-05-19 15:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-19 15:35:53 UTC
Embargoed:


Attachments (Terms of Use)
Patch (657 bytes, patch)
2015-01-07 20:38 UTC, Luca 'remix_tj' Lorenzetto
no flags Details | Diff

Description Luca 'remix_tj' Lorenzetto 2015-01-07 20:38:00 UTC
Created attachment 977543 [details]
Patch

Description of problem:

I made a configuration of swift using the guide at http://docs.openstack.org/developer/swift/replication_network.html#for-a-multiple-server-replication that requires to move configuration files from /etc/swift/ to /etc/swift/{object,container,account}-server/

When trying to start the services with e.g.:

service openstack-swift-account start

nothing happens.


Version-Release number of selected component (if applicable):
openstack-swift-1.13.1-1.el6.noarch
openstack-swift-container-1.13.1-1.el6.noarch
openstack-swift-object-1.13.1-1.el6.noarch
openstack-swift-account-1.13.1-1.el6.noarch


How reproducible:

Use /etc/swift/{object,container,account}-server/ for containing configuration files instead of standard /etc/swift/{object,container,account}-server.conf


Steps to Reproduce:
1. mv /etc/swift/object-server.conf /etc/swift/object-server/1.conf
2. service openstack-swift-object start

Actual results:

Service neither start, nor gives failed error.


Expected results:

Start services correctly or advice with failed message.

Additional info:

The issue is due to the reuse of $name variable. In /usr/share/openstack-swift/functions we have, at line 21:

 for name in $( ls "/etc/swift/$server-server/" ); do

This variable is global and not local to function swift_action(). $name is previously defined i.e. at line 20 of /etc/init.d/openstack-swift-object (and all the other openstack-swift-* scripts) and used throughout the startup script. Since the variable is immediately overwritten by the call of rh_status function (invoked before every start/stop operation), script functionality is severely impacted.

Patch provided.

Issue has been verified only on icehouse release of RDO, other version hasn't been checked.

Comment 1 Chandan Kumar 2016-05-19 15:35:53 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.


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