From 675145ef4a131d548cc1122689732b9b65e5def4 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 25 May 2017 09:35:16 -0700 Subject: [PATCH] Remove deprecated vm_test_mode option This was deprecated in the 2.5.0 release (i.e. Liberty cycle), and we've been warning about it ever since. A year and a half seems like a long enough time. Change-Id: I5688e8f7dedb534071e67d799252bf0b2ccdd9b6 Related-Change: Iad91df50dadbe96c921181797799b4444323ce2e --- etc/rsyncd.conf-sample | 2 +- swift/common/db_replicator.py | 8 -------- swift/obj/replicator.py | 7 ------- test/probe/common.py | 5 +---- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/etc/rsyncd.conf-sample b/etc/rsyncd.conf-sample index 103a85a57b..cdf666bde9 100644 --- a/etc/rsyncd.conf-sample +++ b/etc/rsyncd.conf-sample @@ -48,7 +48,7 @@ lock file = /var/lock/object.lock #lock file = /var/lock/object_sdc.lock -# To emulate the deprecated option vm_test_mode = yes, set: +# On a swift-all-in-one VM, you might tune rsync by replication port instead: # rsync_module = {replication_ip}::object{replication_port} # # So, on your SAIO, you have to set the following rsyncd configuration: diff --git a/swift/common/db_replicator.py b/swift/common/db_replicator.py index 30c6a35c12..fd5b3796d9 100644 --- a/swift/common/db_replicator.py +++ b/swift/common/db_replicator.py @@ -182,14 +182,6 @@ class Replicator(Daemon): self.rsync_module = conf.get('rsync_module', '').rstrip('/') if not self.rsync_module: self.rsync_module = '{replication_ip}::%s' % self.server_type - if config_true_value(conf.get('vm_test_mode', 'no')): - self.logger.warning('Option %(type)s-replicator/vm_test_mode ' - 'is deprecated and will be removed in a ' - 'future version. Update your configuration' - ' to use option %(type)s-replicator/' - 'rsync_module.' - % {'type': self.server_type}) - self.rsync_module += '{replication_port}' self.reclaim_age = float(conf.get('reclaim_age', 86400 * 7)) swift.common.db.DB_PREALLOCATION = \ config_true_value(conf.get('db_preallocation', 'f')) diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index 4f1d43c602..45fdf19d7c 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -90,13 +90,6 @@ class ObjectReplicator(Daemon): self.rsync_module = conf.get('rsync_module', '').rstrip('/') if not self.rsync_module: self.rsync_module = '{replication_ip}::object' - if config_true_value(conf.get('vm_test_mode', 'no')): - self.logger.warning('Option object-replicator/vm_test_mode ' - 'is deprecated and will be removed in a ' - 'future version. Update your ' - 'configuration to use option ' - 'object-replicator/rsync_module.') - self.rsync_module += '{replication_port}' self.http_timeout = int(conf.get('http_timeout', 60)) self.lockup_timeout = int(conf.get('lockup_timeout', 1800)) self.recon_cache_path = conf.get('recon_cache_path', diff --git a/test/probe/common.py b/test/probe/common.py index b600b72ee0..d9a0a31692 100644 --- a/test/probe/common.py +++ b/test/probe/common.py @@ -33,8 +33,7 @@ from swiftclient import get_auth, head_account from swift.common import internal_client from swift.obj.diskfile import get_data_dir from swift.common.ring import Ring -from swift.common.utils import readconf, renamer, \ - config_true_value, rsync_module_interpolation +from swift.common.utils import readconf, renamer, rsync_module_interpolation from swift.common.manager import Manager from swift.common.storage_policy import POLICIES, EC_POLICY, REPL_POLICY @@ -234,8 +233,6 @@ def get_ring(ring_name, required_replicas, required_devices, rsync_export = conf.get('rsync_module', '').rstrip('/') if not rsync_export: rsync_export = '{replication_ip}::%s' % server - if config_true_value(conf.get('vm_test_mode', 'no')): - rsync_export += '{replication_port}' cmd = "rsync %s" % rsync_module_interpolation(rsync_export, dev) p = Popen(cmd, shell=True, stdout=PIPE) stdout, _stderr = p.communicate()