Skip to content

Commit 85a3079

Browse files
committed
swift: Remove deprecated option allow_versions
Start to log deprecation warning since Queens[1]. swift-c: Option allow_versions is deprecated. Configure the versioned_writes middleware in the proxy-server instead. This option will be ignored in a future release. Please refer the object versioning documentation for more information[2]. [1] https://docs.openstack.org/releasenotes/swift/queens.html#relnotes-2-16-0-stable-queens [2] https://docs.openstack.org/swift/latest/overview_object_versioning.html
1 parent 7a70262 commit 85a3079

File tree

7 files changed

+18
-8
lines changed

7 files changed

+18
-8
lines changed

chef/cookbooks/swift/templates/default/container-server.conf.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ pipeline = healthcheck recon container-server
1010
[app:container-server]
1111
use = egg:swift#container
1212
log_requests = true
13-
allow_versions = <%= node[:swift][:allow_versions] %>
1413
[filter:healthcheck]
1514
use = egg:swift#healthcheck
1615
[filter:recon]

chef/cookbooks/tempest/recipes/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,11 @@
383383
swifts = search(:node, "roles:swift-proxy") || []
384384
use_swift = !swifts.empty?
385385
if use_swift
386-
swift_allow_versions = swifts[0][:swift][:allow_versions]
386+
swift_allow_versions = swifts[0][:swift][:allow_versioned_writes]
387387
swift_proposal_name = swifts[0][:swift][:config][:environment].gsub(/^swift-config-/, "")
388388
swift_cluster_name = "#{node[:domain]}_#{swift_proposal_name}"
389389
else
390-
swift_allow_versions = false
390+
swift_allow_versions = true
391391
swift_cluster_name = nil
392392
end
393393

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def upgrade(template_attrs, template_deployment, attrs, deployment)
2+
attrs["allow_versioned_writes"] = attrs["allow_versions"]
3+
attrs.delete("allow_versions")
4+
return attrs, deployment
5+
end
6+
7+
def downgrade(template_attrs, template_deployment, attrs, deployment)
8+
attrs.delete("allow_versioned_writes")
9+
attrs["allow_versions"] = template_attrs["allow_versions"]
10+
return attrs, deployment
11+
end

chef/data_bags/crowbar/template-swift.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"service_user": "swift",
8383
"service_password": "",
8484
"keystone_delay_auth_decision": false,
85-
"allow_versions": false,
85+
"allow_versioned_writes": true,
8686
"reseller_prefix" : "AUTH_",
8787
"debug": false,
8888
"admin_ip_expr": "Chef::Recipe::Barclamp::Inventory.get_network_by_type(node, \"admin\").address",
@@ -96,7 +96,7 @@
9696
"swift": {
9797
"crowbar-revision": 0,
9898
"crowbar-applied": false,
99-
"schema-revision": 300,
99+
"schema-revision": 301,
100100
"element_states": {
101101
"swift-dispersion": [ "ready", "applying" ],
102102
"swift-storage": [ "readying", "ready", "applying" ],

chef/data_bags/crowbar/template-swift.schema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"service_user": { "type": "str", "required": true },
135135
"service_password": { "type": "str" },
136136
"keystone_delay_auth_decision": { "type": "bool", "required": false },
137-
"allow_versions": { "type": "bool", "required": false },
137+
"allow_versioned_writes": { "type": "bool", "required": false },
138138
"reseller_prefix": { "type": "str", "required": false },
139139
"user": { "type": "str", "required": false },
140140
"group": { "type": "str", "required": false },

crowbar_framework/app/views/barclamp/swift/_edit_attributes.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.panel-body
66
= instance_field :keystone
77
= boolean_field :keystone_delay_auth_decision
8-
= boolean_field :allow_versions
8+
= boolean_field :allow_versioned_writes
99
= integer_field :zones
1010
= integer_field :partitions
1111
= integer_field :min_part_hours

crowbar_framework/config/locales/swift/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ en:
7171
edit_attributes:
7272
keystone_instance: 'Keystone instance'
7373
keystone_delay_auth_decision: 'Allow Public Containers (Anonymous access, performance penalty)'
74-
allow_versions: 'Enable Object Versioning'
74+
allow_versioned_writes: 'Enables using versioned writes middleware'
7575
zones: 'Zones'
7676
partitions: 'Create 2^X Logical Partitions'
7777
min_part_hours: 'Minimum Hours before Partition is reassigned'

0 commit comments

Comments
 (0)