Skip to content

Commit 25f8427

Browse files
committed
swift: Fix the empty gid option in rsyncd.conf
This change fixes the empty value set to the gid option in rsyncd.conf, which was caused by reference to the invalid USER_GROUP variable, and ensures the option is set to the group which STACK_USER belongs to. This also fixes duplicate declaration of the local user_group variable. Closes-Bug: #1940742 Change-Id: Ifd0a5ef0bc5f3647f43b169df1f7176393971853
1 parent ebc7b0e commit 25f8427

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ function configure_swift {
335335
local node_number
336336
local swift_node_config
337337
local swift_log_dir
338-
local user_group
339338

340339
# Make sure to kill all swift processes first
341340
$SWIFT_BIN_DIR/swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
@@ -353,7 +352,7 @@ function configure_swift {
353352
# partitions (which make more sense when you have a multi-node
354353
# setup) we configure it with our version of rsync.
355354
sed -e "
356-
s/%GROUP%/${USER_GROUP}/;
355+
s/%GROUP%/$(id -g -n ${STACK_USER})/;
357356
s/%USER%/${STACK_USER}/;
358357
s,%SWIFT_DATA_DIR%,$SWIFT_DATA_DIR,;
359358
" $FILES/swift/rsyncd.conf | sudo tee /etc/rsyncd.conf

0 commit comments

Comments
 (0)