Use the root user to generate ring builder files
In Ubuntu, the swift user does not have write access to the /etc/swift directory, so generating a ring builder file by the swift user fails with Permission Error. This change switches the execution user to root to avoid the error. Closes-Bug: #1980613 Change-Id: Ibad7afb29007109a683e22a1119b5b5fbdb1c130
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
# [*min_part_hours*] Time before a partition can be moved.
|
# [*min_part_hours*] Time before a partition can be moved.
|
||||||
# Optional. Defaults to 24.
|
# Optional. Defaults to 24.
|
||||||
# [*user*] User to run as
|
# [*user*] User to run as
|
||||||
# Optional. Defaults to 'swift'
|
# Optional. Defaults to 'root'
|
||||||
#
|
#
|
||||||
|
|
||||||
# == Examples
|
# == Examples
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# part_power => 19,
|
# part_power => 19,
|
||||||
# replicas => 5,
|
# replicas => 5,
|
||||||
# min_part_hours => 1,
|
# min_part_hours => 1,
|
||||||
# user => 'swift',
|
# user => 'root',
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# == Authors
|
# == Authors
|
||||||
@@ -33,10 +33,10 @@
|
|||||||
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
|
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
|
||||||
#
|
#
|
||||||
define swift::ringbuilder::create(
|
define swift::ringbuilder::create(
|
||||||
$part_power = 18,
|
$part_power = 18,
|
||||||
$replicas = 3,
|
$replicas = 3,
|
||||||
$min_part_hours = 24,
|
$min_part_hours = 24,
|
||||||
$user = 'swift'
|
$user = 'root'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include swift::deps
|
include swift::deps
|
||||||
|
6
releasenotes/notes/bug-1980613-b2e589f74602f11f.yaml
Normal file
6
releasenotes/notes/bug-1980613-b2e589f74602f11f.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Now the ``swift::ringbuilder::create`` defined type generates a ring
|
||||||
|
builder file by root user, instead of swift user, by default. Set the user
|
||||||
|
parameter if a different should be used.
|
@@ -6,7 +6,7 @@ describe 'swift::ringbuilder::create' do
|
|||||||
:part_power => 18,
|
:part_power => 18,
|
||||||
:replicas => 3,
|
:replicas => 3,
|
||||||
:min_part_hours => 24,
|
:min_part_hours => 24,
|
||||||
:user => 'swift'
|
:user => 'root'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ describe 'swift::ringbuilder::create' do
|
|||||||
{:part_power => 19,
|
{:part_power => 19,
|
||||||
:replicas => 6,
|
:replicas => 6,
|
||||||
:min_part_hours => 2,
|
:min_part_hours => 2,
|
||||||
:user => 'root'}].each do |param_set|
|
:user => 'swift'}].each do |param_set|
|
||||||
|
|
||||||
describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
|
describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
|
||||||
let :param_hash do
|
let :param_hash do
|
||||||
|
Reference in New Issue
Block a user