beaker 1.17.2 → 1.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/HISTORY.md +37 -2
- data/lib/beaker/hypervisor/aws_sdk.rb +14 -2
- data/lib/beaker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDBiYjkxMWM4Mzg3ODE1ZTI1Njk1YWVjY2JiN2MwMjhhZTU4ZDljOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWQwNmUyODFlNDdkZWQ0N2UzZmQ1ZGFiMDY0MDAyMTc2NjcyYTIxZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWNjYjVjYmE3MWUwY2FlODJhOTI0NGVlY2ZkMzBlZDg2ZDEwOWQwYmUzYWVi
|
10
|
+
ODQxYTY1MDU0ODEwYWZkZDIxOTcyNWM3YTVmYzRhNGZjYjJjOWQ2MzUxODk0
|
11
|
+
M2I0N2QzMTc4MWM4MTViZmY4NTc1YTdjMDczMzhmOTM3OTViNDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWU2MGU5YWMzOGFmZDMwMDdjMDQwMGIxMWQ3NzM2NDFkYzE2OWY5OTc3YjA1
|
14
|
+
MTgxNTI1YjE0NmZiY2I5MTc5MjE2YzRjZTlmODM4ZDRmMTgzNGI0ZTg1ZTU1
|
15
|
+
YzdjNDIyMjI0Mzg0YjFkNzAwMWM1NjMwMjI0YWRjMjcyNjRkY2U=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# beaker - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 20 Aug, 2014 (92584d1e)](#LATEST)
|
4
|
+
* [beaker1.17.2 - 15 Aug, 2014 (c6f1f64a)](#beaker1.17.2)
|
4
5
|
* [beaker1.17.1 - 12 Aug, 2014 (72e60299)](#beaker1.17.1)
|
5
6
|
* [beaker1.17.0 - 12 Aug, 2014 (fb482b56)](#beaker1.17.0)
|
6
7
|
* [beaker1.16.0 - 17 Jul, 2014 (c1267696)](#beaker1.16.0)
|
@@ -54,7 +55,41 @@
|
|
54
55
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
55
56
|
|
56
57
|
## Details
|
57
|
-
### <a name = "LATEST">LATEST -
|
58
|
+
### <a name = "LATEST">LATEST - 20 Aug, 2014 (92584d1e)
|
59
|
+
|
60
|
+
* (GEM) version bump for 1.17.3 gem (92584d1e)
|
61
|
+
|
62
|
+
* Merge pull request #408 from anodelman/ec2 (5c8b14c0)
|
63
|
+
|
64
|
+
|
65
|
+
```
|
66
|
+
Merge pull request #408 from anodelman/ec2
|
67
|
+
|
68
|
+
(MAINT) nits in beaker ec2 support
|
69
|
+
```
|
70
|
+
* (MAINT) nits in beaker ec2 support (3d823291)
|
71
|
+
|
72
|
+
|
73
|
+
```
|
74
|
+
(MAINT) nits in beaker ec2 support
|
75
|
+
|
76
|
+
- correctly identify zombies that are over X hours old
|
77
|
+
- better notification of what instances are being examinged for possible
|
78
|
+
termination
|
79
|
+
- properly notify user of missing aws_access_key_id and
|
80
|
+
aws_secret_access_key during initialization
|
81
|
+
```
|
82
|
+
### <a name = "beaker1.17.2">beaker1.17.2 - 15 Aug, 2014 (c6f1f64a)
|
83
|
+
|
84
|
+
* Merge pull request #407 from anodelman/make-gem (c6f1f64a)
|
85
|
+
|
86
|
+
|
87
|
+
```
|
88
|
+
Merge pull request #407 from anodelman/make-gem
|
89
|
+
|
90
|
+
create beaker 1.17.2 gem
|
91
|
+
```
|
92
|
+
* (HISTORY) update history for 1.17.2 gem (d15db7e4)
|
58
93
|
|
59
94
|
* (GEM) update version number for 1.17.2 (f6227484)
|
60
95
|
|
@@ -92,15 +92,22 @@ module Beaker
|
|
92
92
|
#@param [Integer] max_age The age in hours that a machine needs to be older than to be considered a zombie
|
93
93
|
#@param [String] key The key_name to match for
|
94
94
|
def kill_zombies(max_age = ZOMBIE, key = key_name)
|
95
|
-
@logger.notify("aws-sdk: Kill Zombies!")
|
95
|
+
@logger.notify("aws-sdk: Kill Zombies! (keyname: #{key}, age: #{max_age} hrs)")
|
96
96
|
#examine all available regions
|
97
|
+
kill_count = 0
|
98
|
+
volume_count = 0
|
99
|
+
time_now = Time.now.getgm #ec2 uses GM time
|
97
100
|
@ec2.regions.each do |region|
|
98
101
|
@logger.debug "Reviewing: #{region.name}"
|
99
102
|
@ec2.regions[region.name].instances.each do |instance|
|
100
|
-
if (instance.key_name =~ /#{key}/)
|
103
|
+
if (instance.key_name =~ /#{key}/)
|
104
|
+
@logger.debug "Examining #{instance.id} (keyname: #{key}, launch time: #{instance.launch_time}, status: #{instance.status})"
|
105
|
+
end
|
106
|
+
if (instance.key_name =~ /#{key}/) and ((time_now - instance.launch_time) > ZOMBIE*60*60) and instance.status.to_s !~ /terminated/
|
101
107
|
@logger.debug "Kill! #{instance.id}: #{instance.key_name} (Current status: #{instance.status})"
|
102
108
|
begin
|
103
109
|
instance.terminate()
|
110
|
+
kill_count += 1
|
104
111
|
rescue AWS::EC2::Errors => e
|
105
112
|
@logger.debug "Failed to remove instance: #{instance.id}, #{e}"
|
106
113
|
end
|
@@ -116,12 +123,14 @@ module Beaker
|
|
116
123
|
if ( vol.status.to_s =~ /available/ )
|
117
124
|
@logger.debug "Tear down available volume: #{vol.id}"
|
118
125
|
vol.delete()
|
126
|
+
volume_count += 1
|
119
127
|
end
|
120
128
|
rescue AWS::EC2::Errors::InvalidVolume::NotFound => e
|
121
129
|
@logger.debug "Failed to remove volume: #{vol.id}, #{e}"
|
122
130
|
end
|
123
131
|
end
|
124
132
|
end
|
133
|
+
@logger.notify "#{key}: Killed #{kill_count} instance(s), freed #{volume_count} volume(s)"
|
125
134
|
|
126
135
|
end
|
127
136
|
|
@@ -451,6 +460,9 @@ module Beaker
|
|
451
460
|
creds = {}
|
452
461
|
creds[:access_key] = default[:aws_access_key_id]
|
453
462
|
creds[:secret_key] = default[:aws_secret_access_key]
|
463
|
+
raise "You must specify an aws_access_key_id in your .fog file (#{dot_fog}) for ec2 instances!" unless creds[:access_key]
|
464
|
+
raise "You must specify an aws_secret_access_key in your .fog file (#{dot_fog}) for ec2 instances!" unless creds[:secret_key]
|
465
|
+
|
454
466
|
creds
|
455
467
|
end
|
456
468
|
end
|
data/lib/beaker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|