elecksee 1.1.4 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/elecksee/lxc.rb +11 -3
- data/lib/elecksee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c1305ff88885a4952fe11862869d5210c9e65c6
|
4
|
+
data.tar.gz: 8dc64365cd539111bf4f036a3da3db89fe2ab7cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1de3c3e177d1f8854bb7e76f7d93c082d4b0e0c54e080539c780ad07e4a21945c769c94f38ebf8a310425db403323f677ebb5827efae95c1e8f44ac96f78e82f
|
7
|
+
data.tar.gz: ab2b5173ac803beb5a62f9d4e7469c5a56b15c2af2e76dfb5d991e0c123bf506f1af5165444fec683bf525fc7f6f5d9fc8c6bc00f61da81680852bb4bf6b00e5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## v1.1.6
|
2
|
+
* Check for unknown state when stopping (ephemerals final state is :unknown)
|
3
|
+
* Force Rye to proxy method_missing correctly on free form commands
|
4
|
+
|
1
5
|
## v1.1.4
|
2
6
|
* Only stop container on cleanup if container is running
|
3
7
|
* Add flag for selection of using ssh or attach to run commands
|
data/lib/elecksee/lxc.rb
CHANGED
@@ -380,7 +380,7 @@ class Lxc
|
|
380
380
|
# @return [self]
|
381
381
|
def stop
|
382
382
|
run_command("lxc-stop -n #{name}", :allow_failure_retry => 3, :sudo => true)
|
383
|
-
wait_for_state(:stopped)
|
383
|
+
wait_for_state([:stopped, :unknown])
|
384
384
|
self
|
385
385
|
end
|
386
386
|
|
@@ -506,7 +506,7 @@ class Lxc
|
|
506
506
|
|
507
507
|
# Wait for container to reach given state
|
508
508
|
#
|
509
|
-
# @param desired_state [Symbol]
|
509
|
+
# @param desired_state [Symbol, Array<Symbol>]
|
510
510
|
# @param args [Hash]
|
511
511
|
# @option args [Integer] :timeout
|
512
512
|
# @option args [Numeric] :sleep_interval
|
@@ -514,7 +514,8 @@ class Lxc
|
|
514
514
|
def wait_for_state(desired_state, args={})
|
515
515
|
args[:sleep_interval] ||= 1.0
|
516
516
|
wait_total = 0.0
|
517
|
-
|
517
|
+
desired_state = [desired_state].flatten.compact.map(&:to_sym)
|
518
|
+
until(desired_state.include?(state) || (args[:timeout].to_i > 0 && wait_total.to_i > args[:timeout].to_i))
|
518
519
|
sleep(args[:sleep_interval])
|
519
520
|
wait_total += args[:sleep_interval]
|
520
521
|
end
|
@@ -591,3 +592,10 @@ Lxc.default_ssh_key = [
|
|
591
592
|
].detect{|key| File.exists?(key) }
|
592
593
|
Lxc.default_ssh_user = 'root'
|
593
594
|
Lxc.container_command_via = :ssh
|
595
|
+
|
596
|
+
# Monkey
|
597
|
+
class Rye::Box
|
598
|
+
def execute(*args, &block)
|
599
|
+
method_missing(*args, &block)
|
600
|
+
end
|
601
|
+
end
|
data/lib/elecksee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elecksee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|