uricp 0.0.20 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e77694a18e045d2917d254afcb2db0a2c4cb7d81471d3ccabfe5c232bc340408
4
- data.tar.gz: c063c5315485f25194e2f195c821470f0cc840cc242a0f88c174653a3a3bf167
3
+ metadata.gz: ff143aca9aad2f48ac2948322959e24a421b95cd04cb545a8921f18e601139f0
4
+ data.tar.gz: 719d814583ab1513f10bbc04f6c8487c0fb803a6ab8fb4a307de6c1bf6d7c39a
5
5
  SHA512:
6
- metadata.gz: e8af0949b1de2c8c414d8c60f69390ebc5c722189ff9d86b3c0201c3a30aecded256c8c38be244516834ba97ca7e3ee58c325444304f766cef55b11053d018af
7
- data.tar.gz: db89854277d707b488ef4c86bad899407445ff62bd9815aa60259f636b473e17905a83bd53b120f287eabe60012cb20681015a45ef752d3d98660ed6e4b01f71
6
+ metadata.gz: 78a4cab2edab9ef6ca65a483dc5fe5cad0b221bfd170f891812af0c5883ae11e9b64e60b49be535fc41829d91f21820016c5fcfb94850c83487b0dcb4ba9c36b
7
+ data.tar.gz: 740916783658e36e3346eda72ea799a7a35e58da3cbb40619516c2f788de343c72a976c95229d85beccd5e9a3b5afcc1ebc85b726ed5cc6e85c2a9723877efaf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- uricp (0.0.20)
4
+ uricp (0.0.24)
5
5
  childprocess (~> 1.0)
6
6
  filesize (= 0.0.2)
7
7
  methadone (~> 2.0.2)
data/bin/uricp CHANGED
@@ -4,6 +4,7 @@ require 'optparse'
4
4
  require 'uri'
5
5
  require 'methadone'
6
6
  require 'filesize'
7
+ require 'securerandom'
7
8
  require 'uricp'
8
9
 
9
10
  class App
@@ -121,8 +122,8 @@ class App
121
122
  "Compress output")
122
123
  on("--[no-]dry-run",
123
124
  "Show what would be run,", "but don't run the command")
124
- on("--[no-]dry-cache",
125
- "On dry runs assume the cache is populated")
125
+ on("--dry-cache DRY_CACHE",[:rbd, :partial_rbd],
126
+ "On dry runs assume the cache is populated", "[rbd, partial_rbd]")
126
127
  on("--[no-]force",
127
128
  "Always write sparsely")
128
129
  #Arguments
@@ -32,7 +32,7 @@ Feature: Manipulate file images in ceph
32
32
  """
33
33
  And the output should contain:
34
34
  """
35
- rbd clone --no-progress --id libvirt 'servers/freedos.qcow2@base' 'servers/srv-testy'
35
+ rbd clone --id libvirt 'servers/freedos.qcow2@base' 'servers/srv-testy'
36
36
  """
37
37
 
38
38
  Scenario: HTTP URI from file cache via unpopulated rbd cache
@@ -53,19 +53,31 @@ Feature: Manipulate file images in ceph
53
53
  """
54
54
  And the output should contain:
55
55
  """
56
- rbd clone --no-progress --id libvirt 'servers/freedos.qcow2@base' 'servers/srv-testy'
56
+ rbd clone --id libvirt 'servers/freedos.qcow2@base' 'servers/srv-testy'
57
57
  """
58
58
 
59
- Scenario: HTTP URI to rbd via populated caches
59
+ Scenario: HTTP URI to rbd via partial rbd caches
60
60
  Given a correctly initialised cache at "/tmp/uricp"
61
- When I successfully run `uricp --dry-run --dry-cache --target-format=raw --cache=/tmp/uricp http://orbit.brightbox.com/v1/acc-tqs4c/downloads/freedos.qcow2 rbd:///servers/srv-testy`
61
+ When I successfully run `uricp --dry-run --dry-cache=partial_rbd --target-format=raw --cache=/tmp/uricp http://orbit.brightbox.com/v1/acc-tqs4c/downloads/freedos.qcow2 rbd:///servers/srv-testy`
62
62
  And the output should not contain:
63
63
  """
64
64
  snap create
65
65
  """
66
66
  And the output should contain:
67
67
  """
68
- rbd clone --no-progress --id libvirt 'servers/freedos.qcow2@base' 'servers/srv-testy'
68
+ rbd import --no-progress --id libvirt - 'servers/srv-testy'
69
+ """
70
+
71
+ Scenario: HTTP URI to rbd via populated cache
72
+ Given a correctly initialised cache at "/tmp/uricp"
73
+ When I successfully run `uricp --dry-run --dry-cache=rbd --target-format=raw --cache=/tmp/uricp http://orbit.brightbox.com/v1/acc-tqs4c/downloads/freedos.qcow2 rbd:///servers/srv-testy`
74
+ And the output should not contain:
75
+ """
76
+ snap create
77
+ """
78
+ And the output should contain:
79
+ """
80
+ rbd clone --id libvirt 'servers/freedos.qcow2@base' 'servers/srv-testy'
69
81
  """
70
82
 
71
83
  Scenario: rbd to rbd - no cache
@@ -79,17 +91,17 @@ Feature: Manipulate file images in ceph
79
91
  """
80
92
  rbd snap protect --id libvirt 'servers/img-testy@uricp_snap'
81
93
  """
82
- And the output should contain:
94
+ And the output should not contain:
83
95
  """
84
96
  rbd snap unprotect --id libvirt 'servers/img-testy@uricp_snap'
85
97
  """
86
- And the output should contain:
98
+ And the output should not contain:
87
99
  """
88
- rbd snap rm --id libvirt 'servers/img-testy@uricp_snap';
100
+ rbd snap rm --id libvirt 'servers/img-testy@uricp_snap'
89
101
  """
90
102
  And the output should contain:
91
103
  """
92
- rbd clone --no-progress --id libvirt 'servers/img-testy@uricp_snap' 'servers/srv-testy'
104
+ rbd clone --id libvirt 'servers/img-testy@uricp_snap' 'servers/srv-testy'
93
105
  """
94
106
 
95
107
  Scenario: rbd to rbd - unpopulated cache
@@ -103,13 +115,13 @@ Feature: Manipulate file images in ceph
103
115
  """
104
116
  rbd snap protect --id libvirt 'servers/srv-testy@uricp_snap'
105
117
  """
106
- And the output should contain:
118
+ And the output should not contain:
107
119
  """
108
120
  rbd snap unprotect --id libvirt 'servers/srv-testy@uricp_snap'
109
121
  """
110
- And the output should contain:
122
+ And the output should not contain:
111
123
  """
112
- rbd snap rm --id libvirt 'servers/srv-testy@uricp_snap';
124
+ rbd snap rm --id libvirt 'servers/srv-testy@uricp_snap'
113
125
  """
114
126
  And the output should not contain:
115
127
  """
@@ -117,7 +129,7 @@ Feature: Manipulate file images in ceph
117
129
  """
118
130
  And the output should contain:
119
131
  """
120
- rbd clone --no-progress --id libvirt 'servers/srv-testy@uricp_snap' 'servers/img-testy'
132
+ rbd clone --id libvirt 'servers/srv-testy@uricp_snap' 'servers/img-testy'
121
133
  """
122
134
  And the output should not contain:
123
135
  """
@@ -131,21 +143,26 @@ Feature: Manipulate file images in ceph
131
143
  """
132
144
  rbd snap protect --id libvirt 'servers/img-testy@base'
133
145
  """
146
+
147
+ Scenario: rbd to rbd - partial cache
148
+ Given a correctly initialised cache at "/tmp/uricp"
149
+ When I run `uricp --dry-run --dry-cache=partial_rbd --cache=/tmp/uricp rbd:///servers/srv-testy rbd:///servers/img-testy`
150
+ Then the exit status should be 70
134
151
  And the output should contain:
135
152
  """
136
- rbd flatten --id libvirt --no-progress 'servers/img-testy'
153
+ Unsupported transfer
137
154
  """
138
155
 
139
156
  Scenario: rbd to rbd - populated cache
140
157
  Given a correctly initialised cache at "/tmp/uricp"
141
- When I successfully run `uricp --dry-run --dry-cache --cache=/tmp/uricp rbd:///servers/img-testy rbd:///servers/srv-testy`
158
+ When I successfully run `uricp --dry-run --dry-cache=rbd --cache=/tmp/uricp rbd:///servers/img-testy rbd:///servers/srv-testy`
142
159
  And the output should not contain:
143
160
  """
144
161
  snap create
145
162
  """
146
163
  And the output should contain:
147
164
  """
148
- rbd clone --no-progress --id libvirt 'servers/img-testy@base' 'servers/srv-testy'
165
+ rbd clone --id libvirt 'servers/img-testy@base' 'servers/srv-testy'
149
166
  """
150
167
 
151
168
  Scenario: RBD export.
@@ -165,7 +182,7 @@ Feature: Manipulate file images in ceph
165
182
  """
166
183
  And the output should contain:
167
184
  """
168
- rbd snap rm --id libvirt 'servers/srv-testy@uricp_snap';
185
+ rbd snap rm --id libvirt 'servers/srv-testy@uricp_snap'
169
186
  """
170
187
  And the output should contain:
171
188
  """
@@ -174,7 +191,16 @@ Feature: Manipulate file images in ceph
174
191
 
175
192
  Scenario: RBD export with cacheing - populated cache
176
193
  Given a correctly initialised cache at "/tmp/uricp"
177
- When I run `uricp --dry-run --dry-cache --compress --cache=/tmp/uricp rbd:///servers/srv-testy file:///tmp/img-testy`
194
+ When I run `uricp --dry-run --dry-cache=rbd --compress --cache=/tmp/uricp rbd:///servers/srv-testy file:///tmp/img-testy`
195
+ Then the exit status should be 70
196
+ And the output should contain:
197
+ """
198
+ Unsupported transfer
199
+ """
200
+
201
+ Scenario: RBD export with cacheing - partial cache
202
+ Given a correctly initialised cache at "/tmp/uricp"
203
+ When I run `uricp --dry-run --dry-cache=partial_rbd --compress --cache=/tmp/uricp rbd:///servers/srv-testy file:///tmp/img-testy`
178
204
  Then the exit status should be 70
179
205
  And the output should contain:
180
206
  """
@@ -192,13 +218,13 @@ Feature: Manipulate file images in ceph
192
218
  """
193
219
  rbd snap protect --id libvirt 'servers/srv-testy@uricp_snap'
194
220
  """
195
- And the output should contain:
221
+ And the output should not contain:
196
222
  """
197
223
  rbd snap unprotect --id libvirt 'servers/srv-testy@uricp_snap'
198
224
  """
199
- And the output should contain:
225
+ And the output should not contain:
200
226
  """
201
- rbd snap rm --id libvirt 'servers/srv-testy@uricp_snap';
227
+ rbd snap rm --id libvirt 'servers/srv-testy@uricp_snap'
202
228
  """
203
229
  And the output should not contain:
204
230
  """
@@ -206,7 +232,7 @@ Feature: Manipulate file images in ceph
206
232
  """
207
233
  And the output should contain:
208
234
  """
209
- rbd clone --no-progress --id libvirt 'servers/srv-testy@uricp_snap' 'servers/img-testy'
235
+ rbd clone --id libvirt 'servers/srv-testy@uricp_snap' 'servers/img-testy'
210
236
  """
211
237
  And the output should contain:
212
238
  """
@@ -220,7 +246,3 @@ Feature: Manipulate file images in ceph
220
246
  """
221
247
  rbd snap protect --id libvirt 'servers/img-testy@base'
222
248
  """
223
- And the output should contain:
224
- """
225
- rbd flatten --id libvirt --no-progress 'servers/img-testy'
226
- """
@@ -34,7 +34,7 @@ module Uricp::Strategy
34
34
  end
35
35
 
36
36
  def in_cache?
37
- File.readable?(cache_file) || options['dry-cache']
37
+ File.readable?(cache_file) || options['dry-cache'] == :rbd
38
38
  end
39
39
 
40
40
  def cache_root
@@ -2,6 +2,7 @@ module Uricp::Strategy
2
2
  module Common
3
3
  include Methadone::CLILogging
4
4
  include Uricp::CurlPrimitives
5
+ include Methadone::SH
5
6
 
6
7
  def initialize(options)
7
8
  @options = options
@@ -91,12 +92,14 @@ module Uricp::Strategy
91
92
  end
92
93
 
93
94
  PIPE_URI = URI('pipe:/')
95
+ DRY_SNAP = 'uricp_snap'.freeze
96
+
94
97
  def rbd_base_name
95
98
  'base'.freeze
96
99
  end
97
100
 
98
101
  def rbd_snapshot_name
99
- 'uricp_snap'.freeze
102
+ @rbd_snapshot_name ||= dry_run? ? DRY_SNAP : SecureRandom.uuid
100
103
  end
101
104
 
102
105
  def get_temp_filename(base_dir)
@@ -156,12 +159,31 @@ module Uricp::Strategy
156
159
  uri.scheme == 'rbd' && uri.path.include?('@')
157
160
  end
158
161
 
162
+ def rbd_cache_upload_available?
163
+ rbd_cache_name && !rbd_cache_image_exists?(rbd_cache_name)
164
+ end
165
+
166
+ def rbd_cache_image_exists?(target)
167
+ command = "rbd status --id #{rbd_id} --format json #{target} 2>/dev/null"
168
+ if dry_run?
169
+ if options['dry-cache'] == :partial_rbd && options['cache_name'] !~ /srv-...../
170
+ command = "exit 0"
171
+ else
172
+ command = "exit 2"
173
+ end
174
+ end
175
+ sh!(command)
176
+ true
177
+ rescue Methadone::FailedCommandError
178
+ false
179
+ end
180
+
159
181
  def in_rbd_cache(target)
160
182
  result = false
161
183
  if dry_run?
162
- result = options['dry-cache'] && options['cache_name'] !~ /srv-...../
184
+ result = options['dry-cache'] == :rbd && options['cache_name'] !~ /srv-...../
163
185
  else
164
- sh "rbd snap ls --id #{rbd_id} --format json #{target}" do |stdout|
186
+ sh "rbd snap ls --id #{rbd_id} --format json #{target} 2>/dev/null" do |stdout|
165
187
  result = JSON.parse(stdout).any? { |x| x['name'] == rbd_base_name }
166
188
  end
167
189
  end
@@ -24,8 +24,9 @@ module Uricp::Strategy
24
24
  def proposal
25
25
  @proposed_options = options.dup
26
26
  @proposed_options['sweep'] = [temp_cache_file, cache_file]
27
+ image_spec_to_check = rbd_cache_image_spec(to)
27
28
  if to.scheme == 'rbd'
28
- @proposed_options['rbd_cache_name'] = rbd_cache_image_spec(to)
29
+ @proposed_options['rbd_cache_name'] = image_spec_to_check
29
30
  end
30
31
  @proposed_options.delete('cache')
31
32
  @proposed_options.delete('cache_name')
@@ -3,7 +3,6 @@ module Uricp::Strategy
3
3
  class PipedRbdGet
4
4
  include Uricp::Strategy::Common
5
5
  include Uricp::Strategy::CacheCommon
6
- include Methadone::SH
7
6
 
8
7
  def appropriate?
9
8
  without_active_cache do
@@ -1,7 +1,6 @@
1
1
  module Uricp::Strategy
2
2
  class RbdCacheBaseSnap
3
3
  include Uricp::Strategy::Common
4
- include Methadone::SH
5
4
 
6
5
  def appropriate?
7
6
  if rbd_cache_name &&
@@ -13,7 +12,7 @@ module Uricp::Strategy
13
12
  end
14
13
 
15
14
  def command
16
- "rbd snap create --id #{rbd_id} '#{rbd_clone_snapshot(rbd_cache_name)}' && "\
15
+ "rbd snap create --id #{rbd_id} '#{rbd_clone_snapshot(rbd_cache_name)}';"\
17
16
  "rbd snap protect --id #{rbd_id} '#{rbd_clone_snapshot(rbd_cache_name)}';"
18
17
  end
19
18
 
@@ -4,7 +4,6 @@ module Uricp::Strategy
4
4
  class RbdCacheCheck
5
5
  include Uricp::Strategy::Common
6
6
  include Uricp::Strategy::CacheCommon
7
- include Methadone::SH
8
7
 
9
8
  def appropriate?
10
9
  unless (from.scheme == 'rbd') != (to.scheme == 'rbd')
@@ -4,7 +4,6 @@ module Uricp::Strategy
4
4
  class RbdCacheClone
5
5
  include Uricp::Strategy::Common
6
6
  include Uricp::Strategy::CacheCommon
7
- include Methadone::SH
8
7
 
9
8
  def appropriate?
10
9
  unless from.scheme == 'rbd'
@@ -15,8 +14,7 @@ module Uricp::Strategy
15
14
  with_active_cache do
16
15
  options['cache_name'] = File.basename(options['to_uri'].path)
17
16
  cache_target = rbd_cache_image_spec(from)
18
- cache_check = in_rbd_cache(rbd_cache_image_spec(from))
19
- if cache_check
17
+ if rbd_cache_image_exists?(cache_target) || in_rbd_cache(cache_target)
20
18
  debug "#{self.class.name}: Unexpected existing cache entry for #{options['to_uri']}"
21
19
  unsupported_transfer
22
20
  end
@@ -1,14 +1,13 @@
1
1
  module Uricp::Strategy
2
2
  class RbdCacheUpload
3
3
  include Uricp::Strategy::Common
4
- include Methadone::SH
5
4
 
6
5
  def appropriate?
7
6
  if compression_required? || conversion_required?
8
7
  debug "#{self.class.name}: not ready to upload"
9
8
  return false
10
9
  end
11
- if rbd_cache_name
10
+ if rbd_cache_upload_available?
12
11
  case from.scheme
13
12
  when 'pipe', 'file'
14
13
  return proposal if to.scheme == 'rbd'
@@ -19,7 +18,7 @@ module Uricp::Strategy
19
18
  end
20
19
 
21
20
  def command
22
- "rbd import --no-progress --id #{rbd_id} #{data_source} '#{rbd_cache_name}' && "
21
+ "rbd import --no-progress --id #{rbd_id} #{data_source} '#{rbd_cache_name}';"
23
22
  end
24
23
 
25
24
  def proposal
@@ -4,7 +4,6 @@ module Uricp::Strategy
4
4
  class RbdCachedGet
5
5
  include Uricp::Strategy::Common
6
6
  include Uricp::Strategy::CacheCommon
7
- include Methadone::SH
8
7
 
9
8
  def appropriate?
10
9
  if from.scheme != 'rbd' || rbd_snapshot_spec?(from)
@@ -14,7 +14,7 @@ module Uricp::Strategy
14
14
  end
15
15
 
16
16
  def command
17
- "rbd clone --no-progress --id #{rbd_id} '#{rbd_image_spec(from)}' '#{rbd_image_spec(to)}';"
17
+ "rbd clone --id #{rbd_id} '#{rbd_image_spec(from)}' '#{rbd_image_spec(to)}';"
18
18
  end
19
19
 
20
20
  def proposal
@@ -23,7 +23,6 @@ module Uricp::Strategy
23
23
  if options['rbd_cache_target']
24
24
  @proposed_options['to_uri'] = options['rbd_cache_target']
25
25
  @proposed_options['rbd_cache_name'] = rbd_image_spec(to)
26
- @proposed_options['rbd_flatten'] ||= @proposed_options['rbd_cache_name']
27
26
  @proposed_options.delete('rbd_cache_target')
28
27
  end
29
28
  self
@@ -7,11 +7,13 @@ module Uricp::Strategy
7
7
  debug "#{self.class.name}: not ready to upload"
8
8
  return false
9
9
  end
10
- unless rbd_cache_name
11
- case from.scheme
12
- when 'pipe', 'file'
13
- return proposal if to.scheme == 'rbd'
14
- end
10
+ if rbd_cache_upload_available?
11
+ debug "#{self.class.name}: cacheing in RBD instead"
12
+ return false
13
+ end
14
+ case from.scheme
15
+ when 'pipe', 'file'
16
+ return proposal if to.scheme == 'rbd'
15
17
  end
16
18
  debug "#{self.class.name}: not appropriate"
17
19
  false
@@ -3,7 +3,6 @@ module Uricp::Strategy
3
3
  class RbdSnap
4
4
  include Uricp::Strategy::Common
5
5
  include Uricp::Strategy::CacheCommon
6
- include Methadone::SH
7
6
 
8
7
  def appropriate?
9
8
  without_active_cache do
@@ -24,17 +23,18 @@ module Uricp::Strategy
24
23
  end
25
24
 
26
25
  def command
27
- "rbd snap create --id #{rbd_id} '#{rbd_upload_snapshot(from)}' && " \
28
- "rbd snap protect --id #{rbd_id} '#{rbd_upload_snapshot(from)}' && " \
26
+ "rbd snap create --id #{rbd_id} '#{rbd_upload_snapshot(from)}';" \
27
+ "rbd snap protect --id #{rbd_id} '#{rbd_upload_snapshot(from)}';" \
29
28
  end
30
29
 
31
30
  def proposal
32
31
  @proposed_options = options.dup
33
- @proposed_options['rbd_snapshot'] = rbd_upload_snapshot(from)
34
- @proposed_options['from_uri'] = rbd_uri(@proposed_options['rbd_snapshot'])
32
+ @proposed_options['from_uri'] = rbd_uri(rbd_upload_snapshot(from))
35
33
  if options['rbd_cache_target']
36
34
  @proposed_options['to_uri'] = options['rbd_cache_target']
37
35
  @proposed_options['rbd_cache_target'] = to
36
+ else
37
+ @proposed_options['rbd_snapshot'] = rbd_upload_snapshot(from) unless to.scheme == 'rbd'
38
38
  end
39
39
  self
40
40
  end
@@ -47,7 +47,7 @@ module Uricp::Strategy
47
47
  return false if dry_run?
48
48
 
49
49
  result = false
50
- sh "rbd snap ls --id #{rbd_id} --format json #{rbd_image_spec(from)}" do |stdout|
50
+ sh "rbd snap ls --id #{rbd_id} --format json #{rbd_image_spec(from)} 2>/dev/null" do |stdout|
51
51
  result = JSON.parse(stdout).any? { |x| x['name'] == rbd_snapshot_name }
52
52
  end
53
53
  result
@@ -10,7 +10,7 @@ module Uricp::Strategy
10
10
  end
11
11
 
12
12
  def command
13
- "rbd snap unprotect --id #{rbd_id} '#{options['rbd_snapshot']}' && " \
13
+ "rbd snap unprotect --id #{rbd_id} '#{options['rbd_snapshot']}';" \
14
14
  "rbd snap rm --id #{rbd_id} '#{options['rbd_snapshot']}';"
15
15
  end
16
16
 
@@ -49,7 +49,6 @@ module Uricp
49
49
  Strategy::PipedLocalGet,
50
50
  Strategy::PipedLocalPut,
51
51
  Strategy::Cleaner,
52
- Strategy::RbdFlattener,
53
52
  Strategy::RbdSweeper,
54
53
  Strategy::Sweeper
55
54
  ].freeze
data/lib/uricp/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uricp
4
- VERSION = '0.0.20'
4
+ VERSION = '0.0.24'
5
5
  DEFAULT_SEGMENT_SIZE = '5 GiB'
6
6
  end
data/lib/uricp.rb CHANGED
@@ -29,7 +29,6 @@ require 'uricp/strategy/rbd_cache_clone'
29
29
  require 'uricp/strategy/rbd_cached_get'
30
30
  require 'uricp/strategy/rbd_cached_put'
31
31
  require 'uricp/strategy/rbd_cache_upload'
32
- require 'uricp/strategy/rbd_flattener'
33
32
  require 'uricp/strategy/rbd_put'
34
33
  require 'uricp/strategy/rbd_snap'
35
34
  require 'uricp/strategy/rbd_sweeper'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uricp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil Wilson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-14 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -229,7 +229,6 @@ files:
229
229
  - lib/uricp/strategy/rbd_cache_upload.rb
230
230
  - lib/uricp/strategy/rbd_cached_get.rb
231
231
  - lib/uricp/strategy/rbd_cached_put.rb
232
- - lib/uricp/strategy/rbd_flattener.rb
233
232
  - lib/uricp/strategy/rbd_put.rb
234
233
  - lib/uricp/strategy/rbd_snap.rb
235
234
  - lib/uricp/strategy/rbd_sweeper.rb
@@ -1,23 +0,0 @@
1
- module Uricp::Strategy
2
- class RbdFlattener
3
- include Uricp::Strategy::Common
4
-
5
- def appropriate?
6
- return proposal if options['rbd_flatten'] &&
7
- rbd_sequence_complete?
8
-
9
- debug "#{self.class.name}: not appropriate"
10
- false
11
- end
12
-
13
- def command
14
- "rbd flatten --id #{rbd_id} --no-progress '#{options['rbd_flatten']}' && "
15
- end
16
-
17
- def proposal
18
- @proposed_options = options.dup
19
- @proposed_options.delete('rbd_flatten')
20
- self
21
- end
22
- end
23
- end