Merge lp:~fo0bar/turku/turku-storage-remove-attic into lp:turku

Proposed by Ryan Finnie
Status: Merged
Approved by: Haw Loeung
Approved revision: 37
Merged at revision: 37
Proposed branch: lp:~fo0bar/turku/turku-storage-remove-attic
Merge into: lp:turku
Diff against target: 39 lines (+2/-20)
1 file modified
turku_storage/ping.py (+2/-20)
To merge this branch: bzr merge lp:~fo0bar/turku/turku-storage-remove-attic
Reviewer Review Type Date Requested Status
Haw Loeung Approve
Canonical IS Reviewers Pending
Review via email: mp+381138@code.launchpad.net

Commit message

Remove attic support

Description of the change

attic was removed as of xenial, had severe performance limitations at scale, and isn't used anymore. Default in the API server has been link-dest for awhile now.

To post a comment you must log in.
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

Change successfully merged at revision 37

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'turku_storage/ping.py'
2--- turku_storage/ping.py 2019-10-29 09:47:32 +0000
3+++ turku_storage/ping.py 2020-03-24 23:46:26 +0000
4@@ -190,9 +190,7 @@
5 dest_dir = os.path.join(machine_dir, source_name)
6 if not os.path.exists(dest_dir):
7 os.makedirs(dest_dir)
8- if snapshot_mode == 'attic':
9- rsync_args.append('--inplace')
10- elif snapshot_mode == 'link-dest':
11+ if snapshot_mode == 'link-dest':
12 snapshot_dir = os.path.join(machine_dir, '%s.snapshots' % source_name)
13 if not os.path.exists(snapshot_dir):
14 os.makedirs(snapshot_dir)
15@@ -243,23 +241,7 @@
16 snapshot_name = None
17 summary_output = None
18 if success:
19- if snapshot_mode == 'attic':
20- snapshot_name = datetime.datetime.now().isoformat()
21- attic_dir = '%s.attic' % dest_dir
22- if not os.path.exists(attic_dir):
23- attic_args = ['attic', 'init', attic_dir]
24- self.run_logging(attic_args)
25- attic_args = ['attic', 'create', '--numeric-owner', '%s::%s' % (attic_dir, snapshot_name), '.']
26- self.run_logging(attic_args, cwd=dest_dir)
27- if 'retention' in s:
28- attic_snapshots = re.findall('^([\w\.\-\:]+)', subprocess.check_output(['attic', 'list', attic_dir]), re.M)
29- to_delete = get_snapshots_to_delete(s['retention'], attic_snapshots)
30- for snapshot in to_delete:
31- attic_args = ['attic', 'delete', '%s::%s' % (attic_dir, snapshot)]
32- self.run_logging(attic_args)
33- attic_args = ['attic', 'info', '%s::%s' % (attic_dir, snapshot_name)]
34- (ret, summary_output) = self.run_logging(attic_args, return_output=True)
35- elif snapshot_mode == 'link-dest':
36+ if snapshot_mode == 'link-dest':
37 summary_output = ''
38 if base_snapshot:
39 summary_output = summary_output + 'Base snapshot: %s\n' % base_snapshot

Subscribers

People subscribed via source and target branches

to all changes: