CloudyScripts 1.8.33 → 1.8.34
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.
- data/Rakefile +1 -1
- data/lib/help/state_transition_helper.rb +22 -6
- data/lib/scripts/ec2/copy_ami.rb +1 -0
- data/lib/scripts/ec2/copy_snapshot.rb +1 -0
- metadata +4 -4
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ require 'rake/testtask'
|
|
12
12
|
|
13
13
|
spec = Gem::Specification.new do |s|
|
14
14
|
s.name = 'CloudyScripts'
|
15
|
-
s.version = '1.8.
|
15
|
+
s.version = '1.8.34'
|
16
16
|
s.has_rdoc = true
|
17
17
|
s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
|
18
18
|
s.summary = 'Scripts to facilitate programming for infrastructure clouds.'
|
@@ -563,14 +563,30 @@ module StateTransitionHelper
|
|
563
563
|
# Input Parameters:
|
564
564
|
# * mount_point => directory to be unmounted
|
565
565
|
def unmount_fs(mount_point)
|
566
|
-
post_message("
|
566
|
+
post_message("going to unmount #{mount_point}...")
|
567
567
|
@logger.debug "unmount #{mount_point}"
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
568
|
+
|
569
|
+
done = false
|
570
|
+
timeout = 120
|
571
|
+
while timeout > 0
|
572
|
+
res = remote_handler().umount(mount_point)
|
573
|
+
if !remote_handler().drive_mounted?(mount_point)
|
574
|
+
done = true
|
575
|
+
timeout = 0
|
576
|
+
end
|
577
|
+
sleep(5)
|
578
|
+
timeout -= 5
|
579
|
+
end
|
580
|
+
msg = ""
|
581
|
+
if !done
|
582
|
+
msg = "Failed to umount '#{mount_point}'"
|
583
|
+
@logger.error "#{msg}"
|
584
|
+
raise Exception.new("#{mount_point} still mounted")
|
585
|
+
else
|
586
|
+
msg = "#{mount_point} successfully mounted"
|
587
|
+
@logger.info "#{msg}"
|
572
588
|
end
|
573
|
-
post_message("
|
589
|
+
post_message("#{msg}")
|
574
590
|
end
|
575
591
|
|
576
592
|
# Get root partition label
|
data/lib/scripts/ec2/copy_ami.rb
CHANGED
@@ -193,6 +193,7 @@ class CopyAmi < Ec2Script
|
|
193
193
|
#
|
194
194
|
connect(@context[:target_dns_name], @context[:target_ssh_username], nil, @context[:target_ssh_keydata])
|
195
195
|
enable_ssh_tty(@context[:target_dns_name])
|
196
|
+
unmount_fs(dest_dir)
|
196
197
|
disconnect()
|
197
198
|
DataCopiedState.new(@context)
|
198
199
|
end
|
@@ -172,6 +172,7 @@ class CopySnapshot< Ec2Script
|
|
172
172
|
#
|
173
173
|
connect(@context[:target_dns_name], @context[:target_ssh_username], nil, @context[:target_ssh_keydata])
|
174
174
|
enable_ssh_tty(@context[:target_dns_name])
|
175
|
+
unmount_fs(dest_dir)
|
175
176
|
disconnect()
|
176
177
|
DataCopiedState.new(@context)
|
177
178
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CloudyScripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 115
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 1.8.
|
9
|
+
- 34
|
10
|
+
version: 1.8.34
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthias Jung
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-01 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|