components/openstack/swift/patches/recon.patch
changeset 6853 cf1567491b1b
parent 5448 56f4540f741d
equal deleted inserted replaced
6852:bf55de364b19 6853:cf1567491b1b
     1 Move recon's locks to /var/run/swift and caches to /var/lib/swift/recon-cache.
     1 Move recon's locks to /var/run/swift and caches to /var/lib/swift/recon-cache.
     2 Change some of the ways we gather information, since those are normally
     2 Change some of the ways we gather information, since those are normally
     3 Linux-specific.  Make the tests acknowledge these changes.
     3 Linux-specific.  Make the tests acknowledge these changes.
     4 
     4 
     5 --- swift-2.3.0/bin/swift-recon-cron.~1~	2015-04-30 06:57:42.000000000 -0700
     5 --- swift-2.7.0/bin/swift-recon-cron.~1~	2016-03-25 02:42:55.000000000 -0700
     6 +++ swift-2.3.0/bin/swift-recon-cron	2016-02-08 00:58:57.095754838 -0800
     6 +++ swift-2.7.0/bin/swift-recon-cron	2016-08-08 19:54:46.316275905 -0700
     7 @@ -57,8 +57,9 @@ def main():
     7 @@ -58,8 +58,9 @@ def main():
     8          sys.exit(1)
     8          sys.exit(1)
     9      conf = dict(c.items('filter:recon'))
     9      conf = dict(c.items('filter:recon'))
    10      device_dir = conf.get('devices', '/srv/node')
    10      device_dir = conf.get('devices', '/srv/node')
    11 -    recon_cache_path = conf.get('recon_cache_path', '/var/cache/swift')
    11 -    recon_cache_path = conf.get('recon_cache_path', '/var/cache/swift')
    12 -    recon_lock_path = conf.get('recon_lock_path', '/var/lock')
    12 -    recon_lock_path = conf.get('recon_lock_path', '/var/lock')
    14 +                                '/var/lib/swift/recon-cache')
    14 +                                '/var/lib/swift/recon-cache')
    15 +    recon_lock_path = conf.get('recon_lock_path', '/var/run/swift')
    15 +    recon_lock_path = conf.get('recon_lock_path', '/var/run/swift')
    16      cache_file = os.path.join(recon_cache_path, "object.recon")
    16      cache_file = os.path.join(recon_cache_path, "object.recon")
    17      lock_dir = os.path.join(recon_lock_path, "swift-recon-object-cron")
    17      lock_dir = os.path.join(recon_lock_path, "swift-recon-object-cron")
    18      conf['log_name'] = conf.get('log_name', 'recon-cron')
    18      conf['log_name'] = conf.get('log_name', 'recon-cron')
    19 --- swift-2.3.0/etc/account-server.conf-sample.~1~	2015-04-30 06:57:42.000000000 -0700
    19 --- swift-2.7.0/etc/account-server.conf-sample.~1~	2016-03-25 02:42:55.000000000 -0700
    20 +++ swift-2.3.0/etc/account-server.conf-sample	2016-02-08 00:56:36.131898549 -0800
    20 +++ swift-2.7.0/etc/account-server.conf-sample	2016-08-08 19:54:46.322166576 -0700
    21 @@ -81,7 +81,7 @@ use = egg:swift#healthcheck
    21 @@ -81,7 +81,7 @@ use = egg:swift#healthcheck
    22  
    22  
    23  [filter:recon]
    23  [filter:recon]
    24  use = egg:swift#recon
    24  use = egg:swift#recon
    25 -# recon_cache_path = /var/cache/swift
    25 -# recon_cache_path = /var/cache/swift
    26 +# recon_cache_path = /var/lib/swift/recon-cache
    26 +# recon_cache_path = /var/lib/swift/recon-cache
    27  
    27  
    28  [account-replicator]
    28  [account-replicator]
    29  # You can override the default log routing for this app here (don't use set!):
    29  # You can override the default log routing for this app here (don't use set!):
    30 @@ -114,7 +114,7 @@ use = egg:swift#recon
    30 @@ -125,7 +125,7 @@ use = egg:swift#recon
    31  # of run_pause.
    31  # etc/rsyncd.conf-sample for some usage examples.
    32  # run_pause = 30
    32  # rsync_module = {replication_ip}::account
    33  #
    33  #
    34 -# recon_cache_path = /var/cache/swift
    34 -# recon_cache_path = /var/cache/swift
    35 +# recon_cache_path = /var/lib/swift/recon-cache
    35 +# recon_cache_path = /var/lib/swift/recon-cache
    36  
    36  
    37  [account-auditor]
    37  [account-auditor]
    38  # You can override the default log routing for this app here (don't use set!):
    38  # You can override the default log routing for this app here (don't use set!):
    39 @@ -129,7 +129,7 @@ use = egg:swift#recon
    39 @@ -138,7 +138,7 @@ use = egg:swift#recon
    40  # log_facility = LOG_LOCAL0
    40  # interval = 1800
    41  # log_level = INFO
    41  #
    42  # accounts_per_second = 200
    42  # accounts_per_second = 200
    43 -# recon_cache_path = /var/cache/swift
    43 -# recon_cache_path = /var/cache/swift
    44 +# recon_cache_path = /var/lib/swift/recon-cache
    44 +# recon_cache_path = /var/lib/swift/recon-cache
    45  
    45  
    46  [account-reaper]
    46  [account-reaper]
    47  # You can override the default log routing for this app here (don't use set!):
    47  # You can override the default log routing for this app here (don't use set!):
    48 --- swift-2.3.0/etc/container-server.conf-sample.~1~	2015-04-30 06:57:42.000000000 -0700
    48 --- swift-2.7.0/etc/container-server.conf-sample.~1~	2016-03-25 02:42:55.000000000 -0700
    49 +++ swift-2.3.0/etc/container-server.conf-sample	2016-02-08 00:56:36.132407941 -0800
    49 +++ swift-2.7.0/etc/container-server.conf-sample	2016-08-08 19:54:46.323271527 -0700
    50 @@ -90,7 +90,7 @@ use = egg:swift#healthcheck
    50 @@ -90,7 +90,7 @@ use = egg:swift#healthcheck
    51  
    51  
    52  [filter:recon]
    52  [filter:recon]
    53  use = egg:swift#recon
    53  use = egg:swift#recon
    54 -#recon_cache_path = /var/cache/swift
    54 -#recon_cache_path = /var/cache/swift
    55 +#recon_cache_path = /var/lib/swift/recon-cache
    55 +#recon_cache_path = /var/lib/swift/recon-cache
    56  
    56  
    57  [container-replicator]
    57  [container-replicator]
    58  # You can override the default log routing for this app here (don't use set!):
    58  # You can override the default log routing for this app here (don't use set!):
    59 @@ -115,7 +115,7 @@ use = egg:swift#recon
    59 @@ -134,7 +134,7 @@ use = egg:swift#recon
    60  # of run_pause.
    60  # etc/rsyncd.conf-sample for some usage examples.
    61  # run_pause = 30
    61  # rsync_module = {replication_ip}::container
    62  #
    62  #
    63 -# recon_cache_path = /var/cache/swift
    63 -# recon_cache_path = /var/cache/swift
    64 +# recon_cache_path = /var/lib/swift/recon-cache
    64 +# recon_cache_path = /var/lib/swift/recon-cache
    65  
    65  
    66  [container-updater]
    66  [container-updater]
    67  # You can override the default log routing for this app here (don't use set!):
    67  # You can override the default log routing for this app here (don't use set!):
    68 @@ -135,7 +135,7 @@ use = egg:swift#recon
    68 @@ -154,7 +154,7 @@ use = egg:swift#recon
    69  # Seconds to suppress updating an account that has generated an error
    69  # Seconds to suppress updating an account that has generated an error
    70  # account_suppression_time = 60
    70  # account_suppression_time = 60
    71  #
    71  #
    72 -# recon_cache_path = /var/cache/swift
    72 -# recon_cache_path = /var/cache/swift
    73 +# recon_cache_path = /var/lib/swift/recon-cache
    73 +# recon_cache_path = /var/lib/swift/recon-cache
    74  
    74  
    75  [container-auditor]
    75  [container-auditor]
    76  # You can override the default log routing for this app here (don't use set!):
    76  # You can override the default log routing for this app here (don't use set!):
    77 @@ -148,7 +148,7 @@ use = egg:swift#recon
    77 @@ -167,7 +167,7 @@ use = egg:swift#recon
    78  # interval = 1800
    78  # interval = 1800
    79  #
    79  #
    80  # containers_per_second = 200
    80  # containers_per_second = 200
    81 -# recon_cache_path = /var/cache/swift
    81 -# recon_cache_path = /var/cache/swift
    82 +# recon_cache_path = /var/lib/swift/recon-cache
    82 +# recon_cache_path = /var/lib/swift/recon-cache
    83  
    83  
    84  [container-sync]
    84  [container-sync]
    85  # You can override the default log routing for this app here (don't use set!):
    85  # You can override the default log routing for this app here (don't use set!):
    86 --- swift-2.3.0/etc/drive-audit.conf-sample.~1~	2015-04-30 06:57:42.000000000 -0700
    86 --- swift-2.7.0/etc/drive-audit.conf-sample.~1~	2016-03-25 02:42:55.000000000 -0700
    87 +++ swift-2.3.0/etc/drive-audit.conf-sample	2016-02-08 00:56:36.132840827 -0800
    87 +++ swift-2.7.0/etc/drive-audit.conf-sample	2016-08-08 19:54:46.323747514 -0700
    88 @@ -8,7 +8,7 @@
    88 @@ -12,7 +12,7 @@
    89  # log_max_line_length = 0
    89  #
    90  # minutes = 60
    90  # minutes = 60
    91  # error_limit = 1
    91  # error_limit = 1
    92 -# recon_cache_path = /var/cache/swift
    92 -# recon_cache_path = /var/cache/swift
    93 +# recon_cache_path = /var/lib/swift/recon-cache
    93 +# recon_cache_path = /var/lib/swift/recon-cache
    94  # unmount_failed_device = True
    94  # unmount_failed_device = True
    95  #
    95  #
    96  # By default, drive-audit logs only to syslog. Setting this option True
    96  # By default, drive-audit logs only to syslog. Setting this option True
    97 --- swift-2.3.0/etc/object-expirer.conf-sample.~1~	2015-04-30 06:57:42.000000000 -0700
    97 --- swift-2.7.0/etc/object-expirer.conf-sample.~1~	2016-03-25 02:42:55.000000000 -0700
    98 +++ swift-2.3.0/etc/object-expirer.conf-sample	2016-02-08 00:56:36.133283025 -0800
    98 +++ swift-2.7.0/etc/object-expirer.conf-sample	2016-08-08 19:54:46.322631086 -0700
    99 @@ -50,7 +50,7 @@
    99 @@ -50,7 +50,7 @@
   100  # up to reclaim_age seconds before it gives up and deletes the entry in the
   100  # up to reclaim_age seconds before it gives up and deletes the entry in the
   101  # queue.
   101  # queue.
   102  # reclaim_age = 604800
   102  # reclaim_age = 604800
   103 -# recon_cache_path = /var/cache/swift
   103 -# recon_cache_path = /var/cache/swift
   104 +# recon_cache_path = /var/lib/swift/recon-cache
   104 +# recon_cache_path = /var/lib/swift/recon-cache
   105  
   105  
   106  [pipeline:main]
   106  [pipeline:main]
   107  pipeline = catch_errors proxy-logging cache proxy-server
   107  pipeline = catch_errors proxy-logging cache proxy-server
   108 --- swift-2.3.0/etc/object-server.conf-sample.~1~	2015-04-30 06:57:42.000000000 -0700
   108 --- swift-2.7.0/etc/object-server.conf-sample.~1~	2016-03-25 02:42:55.000000000 -0700
   109 +++ swift-2.3.0/etc/object-server.conf-sample	2016-02-08 00:56:36.133858983 -0800
   109 +++ swift-2.7.0/etc/object-server.conf-sample	2016-08-08 19:54:46.324402778 -0700
   110 @@ -143,8 +143,8 @@ use = egg:swift#healthcheck
   110 @@ -158,8 +158,8 @@ use = egg:swift#healthcheck
   111  
   111  
   112  [filter:recon]
   112  [filter:recon]
   113  use = egg:swift#recon
   113  use = egg:swift#recon
   114 -#recon_cache_path = /var/cache/swift
   114 -#recon_cache_path = /var/cache/swift
   115 -#recon_lock_path = /var/lock
   115 -#recon_lock_path = /var/lock
   116 +#recon_cache_path = /var/lib/swift/recon-cache
   116 +#recon_cache_path = /var/lib/swift/recon-cache
   117 +#recon_lock_path = /var/run/swift
   117 +#recon_lock_path = /var/run/swift
   118  
   118  
   119  [object-replicator]
   119  [object-replicator]
   120  # You can override the default log routing for this app here (don't use set!):
   120  # You can override the default log routing for this app here (don't use set!):
   121 @@ -186,7 +186,7 @@ use = egg:swift#recon
   121 @@ -213,7 +213,7 @@ use = egg:swift#recon
   122  # reclaim_age = 604800
   122  # reclaim_age = 604800
   123  #
   123  #
   124  # ring_check_interval = 15
   124  # ring_check_interval = 15
   125 -# recon_cache_path = /var/cache/swift
   125 -# recon_cache_path = /var/cache/swift
   126 +# recon_cache_path = /var/lib/swift/recon-cache
   126 +# recon_cache_path = /var/lib/swift/recon-cache
   127  #
   127  #
   128  # limits how long rsync error log lines are
   128  # limits how long rsync error log lines are
   129  # 0 means to log the entire line
   129  # 0 means to log the entire line
   130 @@ -247,7 +247,7 @@ use = egg:swift#recon
   130 @@ -279,7 +279,7 @@ use = egg:swift#recon
   131  # slowdown will sleep that amount between objects
   131  # slowdown will sleep that amount between objects
   132  # slowdown = 0.01
   132  # slowdown = 0.01
   133  #
   133  #
   134 -# recon_cache_path = /var/cache/swift
   134 -# recon_cache_path = /var/cache/swift
   135 +# recon_cache_path = /var/lib/swift/recon-cache
   135 +# recon_cache_path = /var/lib/swift/recon-cache
   136  
   136  
   137  [object-auditor]
   137  [object-auditor]
   138  # You can override the default log routing for this app here (don't use set!):
   138  # You can override the default log routing for this app here (don't use set!):
   139 @@ -264,7 +264,7 @@ use = egg:swift#recon
   139 @@ -299,7 +299,7 @@ use = egg:swift#recon
   140  # bytes_per_second = 10000000
   140  # bytes_per_second = 10000000
   141  # log_time = 3600
   141  # log_time = 3600
   142  # zero_byte_files_per_second = 50
   142  # zero_byte_files_per_second = 50
   143 -# recon_cache_path = /var/cache/swift
   143 -# recon_cache_path = /var/cache/swift
   144 +# recon_cache_path = /var/lib/swift/recon-cache
   144 +# recon_cache_path = /var/lib/swift/recon-cache
   145  
   145  
   146  # Takes a comma separated list of ints. If set, the object auditor will
   146  # Takes a comma separated list of ints. If set, the object auditor will
   147  # increment a counter for every object whose size is <= to the given break
   147  # increment a counter for every object whose size is <= to the given break
   148 --- swift-2.3.0/swift/account/auditor.py.~1~	2015-04-30 06:57:42.000000000 -0700
   148 --- swift-2.7.0/swift/account/auditor.py.~1~	2016-03-25 02:42:55.000000000 -0700
   149 +++ swift-2.3.0/swift/account/auditor.py	2016-02-08 00:56:36.134366990 -0800
   149 +++ swift-2.7.0/swift/account/auditor.py	2016-08-08 19:54:46.317895668 -0700
   150 @@ -46,7 +46,7 @@ class AccountAuditor(Daemon):
   150 @@ -46,7 +46,7 @@ class AccountAuditor(Daemon):
   151          swift.common.db.DB_PREALLOCATION = \
   151          swift.common.db.DB_PREALLOCATION = \
   152              config_true_value(conf.get('db_preallocation', 'f'))
   152              config_true_value(conf.get('db_preallocation', 'f'))
   153          self.recon_cache_path = conf.get('recon_cache_path',
   153          self.recon_cache_path = conf.get('recon_cache_path',
   154 -                                         '/var/cache/swift')
   154 -                                         '/var/cache/swift')
   155 +                                         '/var/lib/swift/recon-cache')
   155 +                                         '/var/lib/swift/recon-cache')
   156          self.rcache = os.path.join(self.recon_cache_path, "account.recon")
   156          self.rcache = os.path.join(self.recon_cache_path, "account.recon")
   157  
   157  
   158      def _one_audit_pass(self, reported):
   158      def _one_audit_pass(self, reported):
   159 --- swift-2.3.0/swift/common/db_replicator.py.~1~	2015-04-30 06:57:42.000000000 -0700
   159 --- swift-2.7.0/swift/common/db_replicator.py.~1~	2016-03-25 02:42:55.000000000 -0700
   160 +++ swift-2.3.0/swift/common/db_replicator.py	2016-02-08 00:56:36.135027676 -0800
   160 +++ swift-2.7.0/swift/common/db_replicator.py	2016-08-08 19:54:46.321528243 -0700
   161 @@ -172,7 +172,7 @@ class Replicator(Daemon):
   161 @@ -186,7 +186,7 @@ class Replicator(Daemon):
   162              config_true_value(conf.get('db_preallocation', 'f'))
   162              config_true_value(conf.get('db_preallocation', 'f'))
   163          self._zero_stats()
   163          self._zero_stats()
   164          self.recon_cache_path = conf.get('recon_cache_path',
   164          self.recon_cache_path = conf.get('recon_cache_path',
   165 -                                         '/var/cache/swift')
   165 -                                         '/var/cache/swift')
   166 +                                         '/var/lib/swift/recon-cache')
   166 +                                         '/var/lib/swift/recon-cache')
   167          self.recon_replicator = '%s.recon' % self.server_type
   167          self.recon_replicator = '%s.recon' % self.server_type
   168          self.rcache = os.path.join(self.recon_cache_path,
   168          self.rcache = os.path.join(self.recon_cache_path,
   169                                     self.recon_replicator)
   169                                     self.recon_replicator)
   170 --- swift-2.3.0/swift/common/middleware/recon.py.~1~	2015-04-30 06:57:42.000000000 -0700
   170 --- swift-2.7.0/swift/common/middleware/recon.py.~1~	2016-03-25 02:42:55.000000000 -0700
   171 +++ swift-2.3.0/swift/common/middleware/recon.py	2016-02-08 00:59:32.515208787 -0800
   171 +++ swift-2.7.0/swift/common/middleware/recon.py	2016-08-08 19:54:46.320913874 -0700
   172 @@ -15,6 +15,7 @@
   172 @@ -16,6 +16,7 @@
   173  
       
   174  import errno
   173  import errno
       
   174  import json
   175  import os
   175  import os
   176 +import sys
   176 +import sys
       
   177  import time
   177  from swift import gettext_ as _
   178  from swift import gettext_ as _
   178  
   179  
   179  from swift import __version__ as swiftver
   180 @@ -49,7 +50,7 @@ class ReconMiddleware(object):
   180 @@ -46,7 +47,7 @@ class ReconMiddleware(object):
       
   181          swift_dir = conf.get('swift_dir', '/etc/swift')
   181          swift_dir = conf.get('swift_dir', '/etc/swift')
   182          self.logger = get_logger(conf, log_route='recon')
   182          self.logger = get_logger(conf, log_route='recon')
   183          self.recon_cache_path = conf.get('recon_cache_path',
   183          self.recon_cache_path = conf.get('recon_cache_path',
   184 -                                         '/var/cache/swift')
   184 -                                         '/var/cache/swift')
   185 +                                         '/var/lib/swift/recon-cache')
   185 +                                         '/var/lib/swift/recon-cache')
   186          self.object_recon_cache = os.path.join(self.recon_cache_path,
   186          self.object_recon_cache = os.path.join(self.recon_cache_path,
   187                                                 'object.recon')
   187                                                 'object.recon')
   188          self.container_recon_cache = os.path.join(self.recon_cache_path,
   188          self.container_recon_cache = os.path.join(self.recon_cache_path,
   189 @@ -92,28 +93,44 @@ class ReconMiddleware(object):
   189 @@ -97,28 +98,44 @@ class ReconMiddleware(object):
   190      def get_mounted(self, openr=open):
   190      def get_mounted(self, openr=open):
   191          """get ALL mounted fs from /proc/mounts"""
   191          """get ALL mounted fs from /proc/mounts"""
   192          mounts = []
   192          mounts = []
   193 -        with openr('/proc/mounts', 'r') as procmounts:
   193 -        with openr('/proc/mounts', 'r') as procmounts:
   194 +        if sys.platform == 'sunos5':
   194 +        if sys.platform == 'sunos5':
   236 +        if sys.platform == 'sunos5':
   236 +        if sys.platform == 'sunos5':
   237 +            return {}
   237 +            return {}
   238          meminfo = {}
   238          meminfo = {}
   239          with openr('/proc/meminfo', 'r') as memlines:
   239          with openr('/proc/meminfo', 'r') as memlines:
   240              for i in memlines:
   240              for i in memlines:
   241 --- swift-2.3.0/swift/container/auditor.py.~1~	2015-04-30 06:57:42.000000000 -0700
   241 --- swift-2.7.0/swift/container/auditor.py.~1~	2016-03-25 02:42:55.000000000 -0700
   242 +++ swift-2.3.0/swift/container/auditor.py	2016-02-08 00:56:36.136109394 -0800
   242 +++ swift-2.7.0/swift/container/auditor.py	2016-08-08 19:54:46.316858635 -0700
   243 @@ -44,7 +44,7 @@ class ContainerAuditor(Daemon):
   243 @@ -44,7 +44,7 @@ class ContainerAuditor(Daemon):
   244          swift.common.db.DB_PREALLOCATION = \
   244          swift.common.db.DB_PREALLOCATION = \
   245              config_true_value(conf.get('db_preallocation', 'f'))
   245              config_true_value(conf.get('db_preallocation', 'f'))
   246          self.recon_cache_path = conf.get('recon_cache_path',
   246          self.recon_cache_path = conf.get('recon_cache_path',
   247 -                                         '/var/cache/swift')
   247 -                                         '/var/cache/swift')
   248 +                                         '/var/lib/swift/recon-cache')
   248 +                                         '/var/lib/swift/recon-cache')
   249          self.rcache = os.path.join(self.recon_cache_path, "container.recon")
   249          self.rcache = os.path.join(self.recon_cache_path, "container.recon")
   250  
   250  
   251      def _one_audit_pass(self, reported):
   251      def _one_audit_pass(self, reported):
   252 --- swift-2.3.0/swift/container/updater.py.~1~	2015-04-30 06:57:42.000000000 -0700
   252 --- swift-2.7.0/swift/container/updater.py.~1~	2016-03-25 02:42:55.000000000 -0700
   253 +++ swift-2.3.0/swift/container/updater.py	2016-02-08 00:56:36.136593440 -0800
   253 +++ swift-2.7.0/swift/container/updater.py	2016-08-08 19:54:46.317391251 -0700
   254 @@ -60,7 +60,7 @@ class ContainerUpdater(Daemon):
   254 @@ -61,7 +61,7 @@ class ContainerUpdater(Daemon):
   255          swift.common.db.DB_PREALLOCATION = \
   255          swift.common.db.DB_PREALLOCATION = \
   256              config_true_value(conf.get('db_preallocation', 'f'))
   256              config_true_value(conf.get('db_preallocation', 'f'))
   257          self.recon_cache_path = conf.get('recon_cache_path',
   257          self.recon_cache_path = conf.get('recon_cache_path',
   258 -                                         '/var/cache/swift')
   258 -                                         '/var/cache/swift')
   259 +                                         '/var/lib/swift/recon-cache')
   259 +                                         '/var/lib/swift/recon-cache')
   260          self.rcache = os.path.join(self.recon_cache_path, "container.recon")
   260          self.rcache = os.path.join(self.recon_cache_path, "container.recon")
   261          self.user_agent = 'container-updater %s' % os.getpid()
   261          self.user_agent = 'container-updater %s' % os.getpid()
   262  
   262  
   263 --- swift-2.3.0/swift/obj/auditor.py.~1~	2015-04-30 06:57:42.000000000 -0700
   263 --- swift-2.7.0/swift/obj/auditor.py.~1~	2016-03-25 02:42:55.000000000 -0700
   264 +++ swift-2.3.0/swift/obj/auditor.py	2016-02-08 00:56:36.137103648 -0800
   264 +++ swift-2.7.0/swift/obj/auditor.py	2016-08-08 19:54:46.319194261 -0700
   265 @@ -227,7 +227,7 @@ class ObjectAuditor(Daemon):
   265 @@ -279,7 +279,7 @@ class ObjectAuditor(Daemon):
   266          self.conf_zero_byte_fps = int(
   266          self.conf_zero_byte_fps = int(
   267              conf.get('zero_byte_files_per_second', 50))
   267              conf.get('zero_byte_files_per_second', 50))
   268          self.recon_cache_path = conf.get('recon_cache_path',
   268          self.recon_cache_path = conf.get('recon_cache_path',
   269 -                                         '/var/cache/swift')
   269 -                                         '/var/cache/swift')
   270 +                                         '/var/lib/swift/recon-cache')
   270 +                                         '/var/lib/swift/recon-cache')
   271          self.rcache = os.path.join(self.recon_cache_path, "object.recon")
   271          self.rcache = os.path.join(self.recon_cache_path, "object.recon")
   272  
   272          self.interval = int(conf.get('interval', 30))
   273      def _sleep(self):
   273  
   274 --- swift-2.3.0/swift/obj/expirer.py.~1~	2015-04-30 06:57:42.000000000 -0700
   274 --- swift-2.7.0/swift/obj/expirer.py.~1~	2016-03-25 02:42:55.000000000 -0700
   275 +++ swift-2.3.0/swift/obj/expirer.py	2016-02-08 00:56:36.137585778 -0800
   275 +++ swift-2.7.0/swift/obj/expirer.py	2016-08-08 19:54:46.319696124 -0700
   276 @@ -57,7 +57,7 @@ class ObjectExpirer(Daemon):
   276 @@ -58,7 +58,7 @@ class ObjectExpirer(Daemon):
   277          self.report_first_time = self.report_last_time = time()
   277          self.report_first_time = self.report_last_time = time()
   278          self.report_objects = 0
   278          self.report_objects = 0
   279          self.recon_cache_path = conf.get('recon_cache_path',
   279          self.recon_cache_path = conf.get('recon_cache_path',
   280 -                                         '/var/cache/swift')
   280 -                                         '/var/cache/swift')
   281 +                                         '/var/lib/swift/recon-cache')
   281 +                                         '/var/lib/swift/recon-cache')
   282          self.rcache = join(self.recon_cache_path, 'object.recon')
   282          self.rcache = join(self.recon_cache_path, 'object.recon')
   283          self.concurrency = int(conf.get('concurrency', 1))
   283          self.concurrency = int(conf.get('concurrency', 1))
   284          if self.concurrency < 1:
   284          if self.concurrency < 1:
   285 --- swift-2.3.0/swift/obj/replicator.py.~1~	2015-04-30 06:57:42.000000000 -0700
   285 --- swift-2.7.0/swift/obj/replicator.py.~1~	2016-03-25 02:42:55.000000000 -0700
   286 +++ swift-2.3.0/swift/obj/replicator.py	2016-02-08 00:56:36.138119411 -0800
   286 +++ swift-2.7.0/swift/obj/replicator.py	2016-08-08 19:54:46.318623762 -0700
   287 @@ -79,7 +79,7 @@ class ObjectReplicator(Daemon):
   287 @@ -96,7 +96,7 @@ class ObjectReplicator(Daemon):
   288          self.http_timeout = int(conf.get('http_timeout', 60))
   288          self.http_timeout = int(conf.get('http_timeout', 60))
   289          self.lockup_timeout = int(conf.get('lockup_timeout', 1800))
   289          self.lockup_timeout = int(conf.get('lockup_timeout', 1800))
   290          self.recon_cache_path = conf.get('recon_cache_path',
   290          self.recon_cache_path = conf.get('recon_cache_path',
   291 -                                         '/var/cache/swift')
   291 -                                         '/var/cache/swift')
   292 +                                         '/var/lib/swift/recon-cache')
   292 +                                         '/var/lib/swift/recon-cache')
   293          self.rcache = os.path.join(self.recon_cache_path, "object.recon")
   293          self.rcache = os.path.join(self.recon_cache_path, "object.recon")
   294          self.conn_timeout = float(conf.get('conn_timeout', 0.5))
   294          self.conn_timeout = float(conf.get('conn_timeout', 0.5))
   295          self.node_timeout = float(conf.get('node_timeout', 10))
   295          self.node_timeout = float(conf.get('node_timeout', 10))
   296 --- swift-2.3.0/swift/obj/updater.py.~1~	2015-04-30 06:57:42.000000000 -0700
   296 --- swift-2.7.0/swift/obj/updater.py.~1~	2016-03-25 02:42:55.000000000 -0700
   297 +++ swift-2.3.0/swift/obj/updater.py	2016-02-08 00:56:36.138592637 -0800
   297 +++ swift-2.7.0/swift/obj/updater.py	2016-08-08 19:54:46.320189490 -0700
   298 @@ -53,7 +53,7 @@ class ObjectUpdater(Daemon):
   298 @@ -53,7 +53,7 @@ class ObjectUpdater(Daemon):
   299          self.successes = 0
   299          self.successes = 0
   300          self.failures = 0
   300          self.failures = 0
   301          self.recon_cache_path = conf.get('recon_cache_path',
   301          self.recon_cache_path = conf.get('recon_cache_path',
   302 -                                         '/var/cache/swift')
   302 -                                         '/var/cache/swift')
   303 +                                         '/var/lib/swift/recon-cache')
   303 +                                         '/var/lib/swift/recon-cache')
   304          self.rcache = os.path.join(self.recon_cache_path, 'object.recon')
   304          self.rcache = os.path.join(self.recon_cache_path, 'object.recon')
   305  
   305  
   306      def _listdir(self, path):
   306      def _listdir(self, path):
   307 --- swift-2.3.0/test/unit/common/middleware/test_recon.py.~1~	2015-04-30 06:57:42.000000000 -0700
   307 --- swift-2.7.0/test/unit/common/middleware/test_recon.py.~1~	2016-03-25 02:42:55.000000000 -0700
   308 +++ swift-2.3.0/test/unit/common/middleware/test_recon.py	2016-02-08 01:01:12.393031484 -0800
   308 +++ swift-2.7.0/test/unit/common/middleware/test_recon.py	2016-08-08 19:54:46.325993628 -0700
   309 @@ -21,7 +21,9 @@ import array
   309 @@ -17,10 +17,12 @@ import array
   310  from swift.common import ring, utils
   310  from contextlib import contextmanager
   311  from shutil import rmtree
   311  import mock
   312  import os
   312  import os
   313 +import sys
   313 +import sys
   314  import mock
   314  from posix import stat_result, statvfs_result
       
   315  from shutil import rmtree
       
   316  import unittest
       
   317  from unittest import TestCase
   315 +from nose import SkipTest
   318 +from nose import SkipTest
   316  
   319  
   317  from swift import __version__ as swiftver
   320  from swift import __version__ as swiftver
   318  from swift.common.swob import Request
   321  from swift.common import ring, utils
   319 @@ -387,10 +389,12 @@ class TestReconSuccess(TestCase):
   322 @@ -543,10 +545,12 @@ class TestReconSuccess(TestCase):
   320              {'device': 'none', 'path': '/proc/fs/vmblock/mountPoint'}]
   323              {'device': 'none', 'path': '/proc/fs/vmblock/mountPoint'}]
   321          oart = OpenAndReadTester(mounts_content)
   324          oart = OpenAndReadTester(mounts_content)
   322          rv = self.app.get_mounted(openr=oart.open)
   325          rv = self.app.get_mounted(openr=oart.open)
   323 -        self.assertEquals(oart.open_calls, [(('/proc/mounts', 'r'), {})])
   326 -        self.assertEqual(oart.open_calls, [(('/proc/mounts', 'r'), {})])
   324 +        self.assertEquals(oart.open_calls, [(('/etc/mnttab', 'r'), {})])
   327 +        self.assertEqual(oart.open_calls, [(('/etc/mnttab', 'r'), {})])
   325          self.assertEquals(rv, mounted_resp)
   328          self.assertEqual(rv, mounted_resp)
   326  
   329  
   327      def test_get_load(self):
   330      def test_get_load(self):
   328 +        if sys.platform == 'sunos5':
   331 +        if sys.platform == 'sunos5':
   329 +            raise SkipTest
   332 +            raise SkipTest
   330          oart = OpenAndReadTester(['0.03 0.03 0.00 1/220 16306'])
   333          oart = OpenAndReadTester(['0.03 0.03 0.00 1/220 16306'])
   331          rv = self.app.get_load(openr=oart.open)
   334          rv = self.app.get_load(openr=oart.open)
   332          self.assertEquals(oart.read_calls, [((), {})])
   335          self.assertEqual(oart.read_calls, [((), {})])
   333 @@ -400,6 +404,8 @@ class TestReconSuccess(TestCase):
   336 @@ -556,6 +560,8 @@ class TestReconSuccess(TestCase):
   334                                 '1m': 0.029999999999999999})
   337                                '1m': 0.029999999999999999})
   335  
   338  
   336      def test_get_mem(self):
   339      def test_get_mem(self):
   337 +        if sys.platform == 'sunos5':
   340 +        if sys.platform == 'sunos5':
   338 +            raise SkipTest
   341 +            raise SkipTest
   339          meminfo_content = ['MemTotal:         505840 kB',
   342          meminfo_content = ['MemTotal:         505840 kB',
   340                             'MemFree:           26588 kB',
   343                             'MemFree:           26588 kB',
   341                             'Buffers:           44948 kB',
   344                             'Buffers:           44948 kB',
   342 @@ -514,7 +520,8 @@ class TestReconSuccess(TestCase):
   345 @@ -650,7 +656,7 @@ class TestReconSuccess(TestCase):
   343          self.assertEquals(self.fakecache.fakeout_calls,
   346          rv = self.app.get_async_info()
   344                            [((['replication_time', 'replication_stats',
   347          self.assertEqual(self.fakecache.fakeout_calls,
   345                                'replication_last'],
   348                           [((['async_pending'],
   346 -                              '/var/cache/swift/account.recon'), {})])
   349 -                             '/var/cache/swift/object.recon'), {})])
       
   350 +                             '/var/lib/swift/recon-cache/object.recon'), {})])
       
   351          self.assertEqual(rv, {'async_pending': 5})
       
   352  
       
   353      def test_get_replication_info_account(self):
       
   354 @@ -673,7 +679,8 @@ class TestReconSuccess(TestCase):
       
   355          self.assertEqual(self.fakecache.fakeout_calls,
       
   356                           [((['replication_time', 'replication_stats',
       
   357                               'replication_last'],
       
   358 -                             '/var/cache/swift/account.recon'), {})])
   347 +                              '/var/lib/swift/recon-cache/account.recon'),
   359 +                              '/var/lib/swift/recon-cache/account.recon'),
   348 +                              {})])
   360 +                              {})])
   349          self.assertEquals(rv, {
   361          self.assertEqual(rv, {
   350              "replication_stats": {
   362              "replication_stats": {
   351                  "attempted": 1, "diff": 0,
   363                  "attempted": 1, "diff": 0,
   352 @@ -545,7 +552,8 @@ class TestReconSuccess(TestCase):
   364 @@ -710,7 +717,8 @@ class TestReconSuccess(TestCase):
   353          self.assertEquals(self.fakecache.fakeout_calls,
   365          self.assertEqual(self.fakecache.fakeout_calls,
   354                            [((['replication_time', 'replication_stats',
   366                           [((['replication_time', 'replication_stats',
   355                                'replication_last'],
   367                               'replication_last'],
   356 -                              '/var/cache/swift/container.recon'), {})])
       
   357 +                              '/var/lib/swift/recon-cache/container.recon'),
       
   358 +                              {})])
       
   359          self.assertEquals(rv, {
       
   360              "replication_time": 200.0,
       
   361              "replication_stats": {
       
   362 @@ -567,7 +575,7 @@ class TestReconSuccess(TestCase):
       
   363          self.assertEquals(self.fakecache.fakeout_calls,
       
   364                            [((['object_replication_time',
       
   365                                'object_replication_last'],
       
   366 -                              '/var/cache/swift/object.recon'), {})])
       
   367 +                              '/var/lib/swift/recon-cache/object.recon'), {})])
       
   368          self.assertEquals(rv, {'object_replication_time': 200.0,
       
   369                                 'object_replication_last': 1357962809.15})
       
   370  
       
   371 @@ -578,7 +586,8 @@ class TestReconSuccess(TestCase):
       
   372          rv = self.app.get_updater_info('container')
       
   373          self.assertEquals(self.fakecache.fakeout_calls,
       
   374                            [((['container_updater_sweep'],
       
   375 -                             '/var/cache/swift/container.recon'), {})])
   368 -                             '/var/cache/swift/container.recon'), {})])
   376 +                              '/var/lib/swift/recon-cache/container.recon'),
   369 +                              '/var/lib/swift/recon-cache/container.recon'),
   377 +                              {})])
   370 +                              {})])
   378          self.assertEquals(rv, {"container_updater_sweep": 18.476239919662476})
   371          self.assertEqual(rv, {
   379  
   372              "replication_time": 200.0,
   380      def test_get_updater_info_object(self):
   373              "replication_stats": {
   381 @@ -588,7 +597,7 @@ class TestReconSuccess(TestCase):
   374 @@ -747,7 +755,8 @@ class TestReconSuccess(TestCase):
   382          rv = self.app.get_updater_info('object')
   375                           [((['replication_time', 'replication_stats',
   383          self.assertEquals(self.fakecache.fakeout_calls,
   376                               'replication_last', 'object_replication_time',
   384                            [((['object_updater_sweep'],
   377                               'object_replication_last'],
   385 -                             '/var/cache/swift/object.recon'), {})])
   378 -                             '/var/cache/swift/object.recon'), {})])
   386 +                             '/var/lib/swift/recon-cache/object.recon'), {})])
       
   387          self.assertEquals(rv, {"object_updater_sweep": 0.79848217964172363})
       
   388  
       
   389      def test_get_expirer_info_object(self):
       
   390 @@ -615,7 +624,8 @@ class TestReconSuccess(TestCase):
       
   391                                'account_auditor_pass_completed',
       
   392                                'account_audits_since',
       
   393                                'account_audits_failed'],
       
   394 -                              '/var/cache/swift/account.recon'), {})])
       
   395 +                              '/var/lib/swift/recon-cache/account.recon'),
       
   396 +                              {})])
       
   397          self.assertEquals(rv, {"account_auditor_pass_completed": 0.24,
       
   398                                 "account_audits_failed": 0,
       
   399                                 "account_audits_passed": 6,
       
   400 @@ -634,7 +644,8 @@ class TestReconSuccess(TestCase):
       
   401                                'container_auditor_pass_completed',
       
   402                                'container_audits_since',
       
   403                                'container_audits_failed'],
       
   404 -                              '/var/cache/swift/container.recon'), {})])
       
   405 +                              '/var/lib/swift/recon-cache/container.recon'),
   379 +                              '/var/lib/swift/recon-cache/container.recon'),
   406 +                              {})])
   380 +                              {})])
   407          self.assertEquals(rv, {"container_auditor_pass_completed": 0.24,
   381          self.assertEqual(rv, {
   408                                 "container_audits_failed": 0,
   382              "replication_time": 0.2615511417388916,
   409                                 "container_audits_passed": 6,
   383              "replication_stats": {
   410 @@ -662,7 +673,7 @@ class TestReconSuccess(TestCase):
   384 @@ -773,7 +782,8 @@ class TestReconSuccess(TestCase):
   411          self.assertEquals(self.fakecache.fakeout_calls,
   385          rv = self.app.get_updater_info('container')
   412                            [((['object_auditor_stats_ALL',
   386          self.assertEqual(self.fakecache.fakeout_calls,
   413                                'object_auditor_stats_ZBF'],
   387                           [((['container_updater_sweep'],
   414 -                              '/var/cache/swift/object.recon'), {})])
   388 -                            '/var/cache/swift/container.recon'), {})])
   415 +                              '/var/lib/swift/recon-cache/object.recon'), {})])
   389 +                            '/var/lib/swift/recon-cache/container.recon'),
   416          self.assertEquals(rv, {
   390 +                            {})])
       
   391          self.assertEqual(rv, {"container_updater_sweep": 18.476239919662476})
       
   392  
       
   393      def test_get_updater_info_object(self):
       
   394 @@ -783,7 +793,8 @@ class TestReconSuccess(TestCase):
       
   395          rv = self.app.get_updater_info('object')
       
   396          self.assertEqual(self.fakecache.fakeout_calls,
       
   397                           [((['object_updater_sweep'],
       
   398 -                            '/var/cache/swift/object.recon'), {})])
       
   399 +                            '/var/lib/swift/recon-cache/object.recon'),
       
   400 +                            {})])
       
   401          self.assertEqual(rv, {"object_updater_sweep": 0.79848217964172363})
       
   402  
       
   403      def test_get_updater_info_unrecognized(self):
       
   404 @@ -798,7 +809,8 @@ class TestReconSuccess(TestCase):
       
   405          rv = self.app.get_expirer_info('object')
       
   406          self.assertEqual(self.fakecache.fakeout_calls,
       
   407                           [((['object_expiration_pass', 'expired_last_pass'],
       
   408 -                            '/var/cache/swift/object.recon'), {})])
       
   409 +                            '/var/lib/swift/recon-cache/object.recon'),
       
   410 +                            {})])
       
   411          self.assertEqual(rv, from_cache_response)
       
   412  
       
   413      def test_get_auditor_info_account(self):
       
   414 @@ -814,7 +826,8 @@ class TestReconSuccess(TestCase):
       
   415                               'account_auditor_pass_completed',
       
   416                               'account_audits_since',
       
   417                               'account_audits_failed'],
       
   418 -                             '/var/cache/swift/account.recon'), {})])
       
   419 +                             '/var/lib/swift/recon-cache/account.recon'),
       
   420 +                             {})])
       
   421          self.assertEqual(rv, {"account_auditor_pass_completed": 0.24,
       
   422                                "account_audits_failed": 0,
       
   423                                "account_audits_passed": 6,
       
   424 @@ -833,7 +846,8 @@ class TestReconSuccess(TestCase):
       
   425                               'container_auditor_pass_completed',
       
   426                               'container_audits_since',
       
   427                               'container_audits_failed'],
       
   428 -                             '/var/cache/swift/container.recon'), {})])
       
   429 +                             '/var/lib/swift/recon-cache/container.recon'),
       
   430 +                             {})])
       
   431          self.assertEqual(rv, {"container_auditor_pass_completed": 0.24,
       
   432                                "container_audits_failed": 0,
       
   433                                "container_audits_passed": 6,
       
   434 @@ -861,7 +875,8 @@ class TestReconSuccess(TestCase):
       
   435          self.assertEqual(self.fakecache.fakeout_calls,
       
   436                           [((['object_auditor_stats_ALL',
       
   437                               'object_auditor_stats_ZBF'],
       
   438 -                             '/var/cache/swift/object.recon'), {})])
       
   439 +                             '/var/lib/swift/recon-cache/object.recon'),
       
   440 +                             {})])
       
   441          self.assertEqual(rv, {
   417              "object_auditor_stats_ALL": {
   442              "object_auditor_stats_ALL": {
   418                  "audit_time": 115.14418768882751,
   443                  "audit_time": 115.14418768882751,
   419 @@ -709,7 +720,7 @@ class TestReconSuccess(TestCase):
   444 @@ -908,7 +923,8 @@ class TestReconSuccess(TestCase):
   420          self.assertEquals(self.fakecache.fakeout_calls,
   445          self.assertEqual(self.fakecache.fakeout_calls,
   421                            [((['object_auditor_stats_ALL',
   446                           [((['object_auditor_stats_ALL',
   422                                'object_auditor_stats_ZBF'],
   447                               'object_auditor_stats_ZBF'],
   423 -                              '/var/cache/swift/object.recon'), {})])
   448 -                             '/var/cache/swift/object.recon'), {})])
   424 +                              '/var/lib/swift/recon-cache/object.recon'), {})])
   449 +                             '/var/lib/swift/recon-cache/object.recon'),
   425          self.assertEquals(rv, {
   450 +                             {})])
       
   451          self.assertEqual(rv, {
   426              "object_auditor_stats_ALL": {
   452              "object_auditor_stats_ALL": {
   427                  'disk1': {
   453                  'disk1': {
       
   454 @@ -1097,7 +1113,8 @@ class TestReconSuccess(TestCase):
       
   455          rv = self.app.get_driveaudit_error()
       
   456          self.assertEqual(self.fakecache.fakeout_calls,
       
   457                           [((['drive_audit_errors'],
       
   458 -                            '/var/cache/swift/drive.recon'), {})])
       
   459 +                            '/var/lib/swift/recon-cache/drive.recon'),
       
   460 +                            {})])
       
   461          self.assertEqual(rv, {'drive_audit_errors': 7})
       
   462  
       
   463      def test_get_time(self):