have the run and logs files in $SWIFT_DATA_DIR

- Set all the run lock and logs files to go to $SWIFT_DATA_DIR.

Change-Id: I42b72572e9700457475398043057d37d0dbc65ac
This commit is contained in:
Chmouel Boudjnah 2013-01-10 15:40:01 +01:00
parent f10696fffc
commit ad8b27626e
2 changed files with 22 additions and 22 deletions

View File

@ -1,79 +1,79 @@
uid = %USER% uid = %USER%
gid = %GROUP% gid = %GROUP%
log file = /var/log/rsyncd.log log file = %SWIFT_DATA_DIR%/logs/rsyncd.log
pid file = /var/run/rsyncd.pid pid file = %SWIFT_DATA_DIR%/run/rsyncd.pid
address = 127.0.0.1 address = 127.0.0.1
[account6012] [account6012]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/1/node/ path = %SWIFT_DATA_DIR%/1/node/
read only = false read only = false
lock file = /var/lock/account6012.lock lock file = %SWIFT_DATA_DIR%/run/account6012.lock
[account6022] [account6022]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/2/node/ path = %SWIFT_DATA_DIR%/2/node/
read only = false read only = false
lock file = /var/lock/account6022.lock lock file = %SWIFT_DATA_DIR%/run/account6022.lock
[account6032] [account6032]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/3/node/ path = %SWIFT_DATA_DIR%/3/node/
read only = false read only = false
lock file = /var/lock/account6032.lock lock file = %SWIFT_DATA_DIR%/run/account6032.lock
[account6042] [account6042]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/4/node/ path = %SWIFT_DATA_DIR%/4/node/
read only = false read only = false
lock file = /var/lock/account6042.lock lock file = %SWIFT_DATA_DIR%/run/account6042.lock
[container6011] [container6011]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/1/node/ path = %SWIFT_DATA_DIR%/1/node/
read only = false read only = false
lock file = /var/lock/container6011.lock lock file = %SWIFT_DATA_DIR%/run/container6011.lock
[container6021] [container6021]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/2/node/ path = %SWIFT_DATA_DIR%/2/node/
read only = false read only = false
lock file = /var/lock/container6021.lock lock file = %SWIFT_DATA_DIR%/run/container6021.lock
[container6031] [container6031]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/3/node/ path = %SWIFT_DATA_DIR%/3/node/
read only = false read only = false
lock file = /var/lock/container6031.lock lock file = %SWIFT_DATA_DIR%/run/container6031.lock
[container6041] [container6041]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/4/node/ path = %SWIFT_DATA_DIR%/4/node/
read only = false read only = false
lock file = /var/lock/container6041.lock lock file = %SWIFT_DATA_DIR%/run/container6041.lock
[object6010] [object6010]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/1/node/ path = %SWIFT_DATA_DIR%/1/node/
read only = false read only = false
lock file = /var/lock/object6010.lock lock file = %SWIFT_DATA_DIR%/run/object6010.lock
[object6020] [object6020]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/2/node/ path = %SWIFT_DATA_DIR%/2/node/
read only = false read only = false
lock file = /var/lock/object6020.lock lock file = %SWIFT_DATA_DIR%/run/object6020.lock
[object6030] [object6030]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/3/node/ path = %SWIFT_DATA_DIR%/3/node/
read only = false read only = false
lock file = /var/lock/object6030.lock lock file = %SWIFT_DATA_DIR%/run/object6030.lock
[object6040] [object6040]
max connections = 25 max connections = 25
path = %SWIFT_DATA_DIR%/4/node/ path = %SWIFT_DATA_DIR%/4/node/
read only = false read only = false
lock file = /var/lock/object6040.lock lock file = %SWIFT_DATA_DIR%/run/object6040.lock

View File

@ -95,13 +95,13 @@ function configure_swift() {
setup_develop $SWIFT_DIR setup_develop $SWIFT_DIR
# Make sure to kill all swift processes first # Make sure to kill all swift processes first
swift-init all stop || true swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
# First do a bit of setup by creating the directories and # First do a bit of setup by creating the directories and
# changing the permissions so we can run it as our user. # changing the permissions so we can run it as our user.
USER_GROUP=$(id -g) USER_GROUP=$(id -g)
sudo mkdir -p ${SWIFT_DATA_DIR}/{drives,cache} sudo mkdir -p ${SWIFT_DATA_DIR}/{drives,cache,run,logs}
sudo chown -R $USER:${USER_GROUP} ${SWIFT_DATA_DIR} sudo chown -R $USER:${USER_GROUP} ${SWIFT_DATA_DIR}
# Create a loopback disk and format it to XFS. # Create a loopback disk and format it to XFS.
@ -143,8 +143,8 @@ function configure_swift() {
sudo chown -R $USER: ${node} sudo chown -R $USER: ${node}
done done
sudo mkdir -p ${SWIFT_CONFIG_DIR}/{object,container,account}-server /var/run/swift sudo mkdir -p ${SWIFT_CONFIG_DIR}/{object,container,account}-server
sudo chown -R $USER: ${SWIFT_CONFIG_DIR} /var/run/swift sudo chown -R $USER: ${SWIFT_CONFIG_DIR}
if [[ "$SWIFT_CONFIG_DIR" != "/etc/swift" ]]; then if [[ "$SWIFT_CONFIG_DIR" != "/etc/swift" ]]; then
# Some swift tools are hard-coded to use ``/etc/swift`` and are apparently not going to be fixed. # Some swift tools are hard-coded to use ``/etc/swift`` and are apparently not going to be fixed.
@ -311,7 +311,7 @@ function configure_swiftclient() {
function init_swift() { function init_swift() {
local node_number local node_number
# Make sure to kill all swift processes first # Make sure to kill all swift processes first
swift-init all stop || true swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
# This is where we create three different rings for swift with # This is where we create three different rings for swift with
# different object servers binding on different ports. # different object servers binding on different ports.
@ -363,15 +363,15 @@ function start_swift() {
# proxy service so we can run it in foreground in screen. # proxy service so we can run it in foreground in screen.
# ``swift-init ... {stop|restart}`` exits with '1' if no servers are running, # ``swift-init ... {stop|restart}`` exits with '1' if no servers are running,
# ignore it just in case # ignore it just in case
swift-init all restart || true swift-init --run-dir=${SWIFT_DATA_DIR}/run all restart || true
swift-init proxy stop || true swift-init --run-dir=${SWIFT_DATA_DIR}/run proxy stop || true
screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONFIG_DIR}/proxy-server.conf -v" screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONFIG_DIR}/proxy-server.conf -v"
} }
# stop_swift() - Stop running processes (non-screen) # stop_swift() - Stop running processes (non-screen)
function stop_swift() { function stop_swift() {
# screen normally killed by unstack.sh # screen normally killed by unstack.sh
swift-init all stop || true swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
} }
# Restore xtrace # Restore xtrace