diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample index a78a7b043e..06f10c846c 100644 --- a/etc/object-server.conf-sample +++ b/etc/object-server.conf-sample @@ -380,6 +380,16 @@ use = egg:swift#recon # Work only with ionice_class. # ionice_class = # ionice_priority = +# +# When upgrading from liberasurecode<=1.5.0, you may want to continue writing +# legacy CRCs until all nodes are upgraded and capabale of reading fragments +# with zlib CRCs. liberasurecode>=1.6.2 checks for the environment variable +# LIBERASURECODE_WRITE_LEGACY_CRC; if set (value doesn't matter), it will use +# its legacy CRC. Set this option to true or false to ensure the environment +# variable is or is not set. Leave the option blank or absent to not touch +# the environment (default). For more information, see +# https://bugs.launchpad.net/liberasurecode/+bug/1886088 +# write_legacy_ec_crc = [object-updater] # You can override the default log routing for this app here (don't use set!): diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index 147a3c50e3..ce266a5ad9 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -300,6 +300,16 @@ use = egg:swift#proxy # Work only with ionice_class. # ionice_class = # ionice_priority = +# +# When upgrading from liberasurecode<=1.5.0, you may want to continue writing +# legacy CRCs until all nodes are upgraded and capabale of reading fragments +# with zlib CRCs. liberasurecode>=1.6.2 checks for the environment variable +# LIBERASURECODE_WRITE_LEGACY_CRC; if set (value doesn't matter), it will use +# its legacy CRC. Set this option to true or false to ensure the environment +# variable is or is not set. Leave the option blank or absent to not touch +# the environment (default). For more information, see +# https://bugs.launchpad.net/liberasurecode/+bug/1886088 +# write_legacy_ec_crc = # Some proxy-server configuration options may be overridden on a per-policy # basis by including per-policy config section(s). The value of any option diff --git a/swift/obj/reconstructor.py b/swift/obj/reconstructor.py index 135f9d5f9f..1c227a12bc 100644 --- a/swift/obj/reconstructor.py +++ b/swift/obj/reconstructor.py @@ -208,6 +208,17 @@ class ObjectReconstructor(Daemon): 'of handoffs_only.') self.rebuild_handoff_node_count = int(conf.get( 'rebuild_handoff_node_count', 2)) + + # When upgrading from liberasurecode<=1.5.0, you may want to continue + # writing legacy CRCs until all nodes are upgraded and capabale of + # reading fragments with zlib CRCs. + # See https://bugs.launchpad.net/liberasurecode/+bug/1886088 for more + # information. + if 'write_legacy_ec_crc' in conf: + os.environ['LIBERASURECODE_WRITE_LEGACY_CRC'] = \ + '1' if config_true_value(conf['write_legacy_ec_crc']) else '0' + # else, assume operators know what they're doing and leave env alone + self._df_router = DiskFileRouter(conf, self.logger) self.all_local_devices = self.get_local_devices() self.rings_mtime = None diff --git a/swift/proxy/server.py b/swift/proxy/server.py index bdf985e041..46afe49b5c 100644 --- a/swift/proxy/server.py +++ b/swift/proxy/server.py @@ -299,6 +299,17 @@ class Application(object): self.swift_owner_headers = [ name.strip().title() for name in swift_owner_headers.split(',') if name.strip()] + + # When upgrading from liberasurecode<=1.5.0, you may want to continue + # writing legacy CRCs until all nodes are upgraded and capabale of + # reading fragments with zlib CRCs. + # See https://bugs.launchpad.net/liberasurecode/+bug/1886088 for more + # information. + if 'write_legacy_ec_crc' in conf: + os.environ['LIBERASURECODE_WRITE_LEGACY_CRC'] = \ + '1' if config_true_value(conf['write_legacy_ec_crc']) else '0' + # else, assume operators know what they're doing and leave env alone + # Initialization was successful, so now apply the client chunk size # parameter as the default read / write buffer size for the network # sockets.

AltStyle によって変換されたページ (->オリジナル) /