cloudflock 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ $0 = 'cloudflock-profile'
4
+
3
5
  require 'cloudflock/interface/cli/app/servers/profile'
4
6
  CLI = CloudFlock::Interface::CLI::Console
5
7
  Opts = CloudFlock::Interface::CLI::Opts
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ $0 = 'cloudflock-servers'
4
+
3
5
  require 'cloudflock/interface/cli/app/servers/migrate'
4
6
  CLI = CloudFlock::Interface::CLI::Console
5
7
  Opts = CloudFlock::Interface::CLI::Opts
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ $0 = 'cloudflock-servers'
4
+
3
5
  require 'cloudflock/interface/cli/app/servers/migrate'
4
6
  CLI = CloudFlock::Interface::CLI::Console
5
7
  Opts = CloudFlock::Interface::CLI::Opts
@@ -293,8 +293,9 @@ class CloudFlock::Interface::CLI::App::Servers::Migrate
293
293
  destination_host_def[:target_addr] = destination_host_def[:host]
294
294
  end
295
295
 
296
- # Define no timeout for the migration rsync
296
+ # Set rsync path and no timeout for the migration rsync
297
297
  destination_host_def[:timeout] = -1
298
+ destination_host_def[:rsync] = source_profile[:rsync]
298
299
 
299
300
  # Kick off the migration proper
300
301
  if opts[:verbose]
@@ -69,7 +69,7 @@ module CloudFlock::Target::Servers::Migrate extend self
69
69
  preserve_files = ["passwd", "shadow", "group"]
70
70
  path = "/mnt/migration_target/etc"
71
71
  preserve_files.each do |file|
72
- copy_command = "[ -f #{path}migration.#{file} ] || cp -af " +
72
+ copy_command = "[ -f #{path}/migration.#{file} ] || /bin/cp -an " +
73
73
  "#{path}/#{file} #{path}/migration.#{file}"
74
74
  host.puts(copy_command)
75
75
  host.prompt
@@ -164,7 +164,7 @@ module CloudFlock::Target::Servers::Migrate extend self
164
164
  # (default: {}):
165
165
  # :target_addr - String containing the address to use when
166
166
  # communicating with the destination host.
167
- # :rsync_path - String containing path to rsync binary on
167
+ # :rsync - String containing path to rsync binary on
168
168
  # the source machine. If this is nil, copy
169
169
  # rsync from the destination machine to
170
170
  # /root/.rackspace/ for the purposes of
@@ -179,7 +179,7 @@ module CloudFlock::Target::Servers::Migrate extend self
179
179
  end
180
180
 
181
181
  # If we lack rsync, fetch it from the destination server
182
- if args[:rsync_path].nil?
182
+ if args[:rsync].nil?
183
183
  source_host.puts("mkdir /root/.rackspace")
184
184
  source_host.prompt
185
185
 
@@ -189,7 +189,7 @@ module CloudFlock::Target::Servers::Migrate extend self
189
189
  "/root/.rackspace/rsync"
190
190
  source_host.puts(rsync_install)
191
191
  source_host.prompt
192
- args[:rsync_path] = "/root/.rackspace/rsync"
192
+ args[:rsync] = "/root/.rackspace/rsync"
193
193
  end
194
194
 
195
195
  2.times do
@@ -218,7 +218,7 @@ module CloudFlock::Target::Servers::Migrate extend self
218
218
  # Expected parameters are:
219
219
  # :target_addr - String containing the address to use when
220
220
  # communicating with the destination host.
221
- # :rsync_path - String containing path to rsync binary on
221
+ # :rsync - String containing path to rsync binary on
222
222
  # the source machine. If this is nil, copy
223
223
  # rsync from the destination machine to
224
224
  # /root/.rackspace/ for the purposes of
@@ -234,7 +234,7 @@ module CloudFlock::Target::Servers::Migrate extend self
234
234
  # Returns true if rsync finishes.
235
235
  # Returns false if rsync does not complete within timeout.
236
236
  def migration_watcher(source_host, args)
237
- rsync_command = "#{args[:rsync_path]} -azP -e 'ssh " +
237
+ rsync_command = "#{args[:rsync]} -azP -e 'ssh " +
238
238
  "#{CloudFlock::Remote::SSH::SSH_ARGUMENTS} -i " +
239
239
  "/tmp/RACKSPACE_MIGRATION/migration_id_rsa' " +
240
240
  "--exclude-from='/root/.rackspace/" +
@@ -1,3 +1,3 @@
1
1
  module CloudFlock
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudflock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-09 00:00:00.000000000 Z
12
+ date: 2013-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
@@ -126,3 +126,4 @@ signing_key:
126
126
  specification_version: 3
127
127
  summary: Server migration automation
128
128
  test_files: []
129
+ has_rdoc: