diff --git a/chef/cookbooks/swift/templates/default/container-server.conf.erb b/chef/cookbooks/swift/templates/default/container-server.conf.erb index 1d2ce02bfd..9de8688598 100644 --- a/chef/cookbooks/swift/templates/default/container-server.conf.erb +++ b/chef/cookbooks/swift/templates/default/container-server.conf.erb @@ -10,7 +10,6 @@ pipeline = healthcheck recon container-server [app:container-server] use = egg:swift#container log_requests = true -allow_versions = <%= node[:swift][:allow_versions] %> [filter:healthcheck] use = egg:swift#healthcheck [filter:recon] diff --git a/chef/cookbooks/tempest/recipes/config.rb b/chef/cookbooks/tempest/recipes/config.rb index b341deb0fc..5d6da36200 100644 --- a/chef/cookbooks/tempest/recipes/config.rb +++ b/chef/cookbooks/tempest/recipes/config.rb @@ -383,11 +383,11 @@ swifts = search(:node, "roles:swift-proxy") || [] use_swift = !swifts.empty? if use_swift - swift_allow_versions = swifts[0][:swift][:allow_versions] + swift_allow_versions = swifts[0][:swift][:allow_versioned_writes] swift_proposal_name = swifts[0][:swift][:config][:environment].gsub(/^swift-config-/, "") swift_cluster_name = "#{node[:domain]}_#{swift_proposal_name}" else - swift_allow_versions = false + swift_allow_versions = true swift_cluster_name = nil end diff --git a/chef/data_bags/crowbar/migrate/swift/301_update_allow_versions.rb b/chef/data_bags/crowbar/migrate/swift/301_update_allow_versions.rb new file mode 100644 index 0000000000..2f43675b71 --- /dev/null +++ b/chef/data_bags/crowbar/migrate/swift/301_update_allow_versions.rb @@ -0,0 +1,11 @@ +def upgrade(template_attrs, template_deployment, attrs, deployment) + attrs["allow_versioned_writes"] = attrs["allow_versions"] + attrs.delete("allow_versions") + return attrs, deployment +end + +def downgrade(template_attrs, template_deployment, attrs, deployment) + attrs.delete("allow_versioned_writes") + attrs["allow_versions"] = template_attrs["allow_versions"] + return attrs, deployment +end diff --git a/chef/data_bags/crowbar/template-swift.json b/chef/data_bags/crowbar/template-swift.json index 1ccc13906e..1646698f85 100644 --- a/chef/data_bags/crowbar/template-swift.json +++ b/chef/data_bags/crowbar/template-swift.json @@ -82,7 +82,7 @@ "service_user": "swift", "service_password": "", "keystone_delay_auth_decision": false, - "allow_versions": false, + "allow_versioned_writes": true, "reseller_prefix" : "AUTH_", "debug": false, "admin_ip_expr": "Chef::Recipe::Barclamp::Inventory.get_network_by_type(node, \"admin\").address", @@ -96,7 +96,7 @@ "swift": { "crowbar-revision": 0, "crowbar-applied": false, - "schema-revision": 300, + "schema-revision": 301, "element_states": { "swift-dispersion": [ "ready", "applying" ], "swift-storage": [ "readying", "ready", "applying" ], diff --git a/chef/data_bags/crowbar/template-swift.schema b/chef/data_bags/crowbar/template-swift.schema index 815b02ed1e..e3d084bd19 100644 --- a/chef/data_bags/crowbar/template-swift.schema +++ b/chef/data_bags/crowbar/template-swift.schema @@ -134,7 +134,7 @@ "service_user": { "type": "str", "required": true }, "service_password": { "type": "str" }, "keystone_delay_auth_decision": { "type": "bool", "required": false }, - "allow_versions": { "type": "bool", "required": false }, + "allow_versioned_writes": { "type": "bool", "required": false }, "reseller_prefix": { "type": "str", "required": false }, "user": { "type": "str", "required": false }, "group": { "type": "str", "required": false }, diff --git a/crowbar_framework/app/views/barclamp/swift/_edit_attributes.html.haml b/crowbar_framework/app/views/barclamp/swift/_edit_attributes.html.haml index d7aeb37a49..8ac0d29ec0 100644 --- a/crowbar_framework/app/views/barclamp/swift/_edit_attributes.html.haml +++ b/crowbar_framework/app/views/barclamp/swift/_edit_attributes.html.haml @@ -5,7 +5,7 @@ .panel-body = instance_field :keystone = boolean_field :keystone_delay_auth_decision - = boolean_field :allow_versions + = boolean_field :allow_versioned_writes = integer_field :zones = integer_field :partitions = integer_field :min_part_hours diff --git a/crowbar_framework/config/locales/swift/en.yml b/crowbar_framework/config/locales/swift/en.yml index abd96aef4e..eab45ead03 100644 --- a/crowbar_framework/config/locales/swift/en.yml +++ b/crowbar_framework/config/locales/swift/en.yml @@ -71,7 +71,7 @@ en: edit_attributes: keystone_instance: 'Keystone instance' keystone_delay_auth_decision: 'Allow Public Containers (Anonymous access, performance penalty)' - allow_versions: 'Enable Object Versioning' + allow_versioned_writes: 'Enables using versioned writes middleware' zones: 'Zones' partitions: 'Create 2^X Logical Partitions' min_part_hours: 'Minimum Hours before Partition is reassigned'