Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift: Remove deprecated option allow_versions #1971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
kwu83tw committed Jan 9, 2019
commit 85a30792d5ffed56612a234706a37cfa4ec837e6
Original file line number Diff line number Diff line change
@@ -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]
4 changes: 2 additions & 2 deletions chef/cookbooks/tempest/recipes/config.rb
Original file line number Diff line number Diff line change
@@ -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

11 changes: 11 additions & 0 deletions chef/data_bags/crowbar/migrate/swift/301_update_allow_versions.rb
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions chef/data_bags/crowbar/template-swift.json
Original file line number Diff line number Diff line change
@@ -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" ],
2 changes: 1 addition & 1 deletion chef/data_bags/crowbar/template-swift.schema
Original file line number Diff line number Diff line change
@@ -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 },
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion crowbar_framework/config/locales/swift/en.yml
Original file line number Diff line number Diff line change
@@ -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'