elecksee 1.0.4 → 1.0.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.1.6
2
+ * Fix `sudo` issue on ephemeral creation (tmpdir)
3
+ * Allow multi-retry on info since false error can be encountered if container is in shutdown phase
4
+
1
5
  ## v0.1.4
2
6
  * Removes vendored lxc cookbook
3
7
  * Adds proper implementations for lxc and ephemerals
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2013 Chris Roberts <code@chrisroberts.org>
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
Binary file
@@ -62,7 +62,7 @@ class Lxc
62
62
  def initialize(args={})
63
63
  configure!(args)
64
64
  @cli = args[:cli]
65
- @path = Dir.mktmpdir(File.join(lxc_dir, original))
65
+ @path = command("mktemp -d -p #{lxc_dir} #{original}-XXXXXXXXXXXX", :sudo => true).stdout.strip
66
66
  @name = File.basename(@path)
67
67
  @hostname = @name.gsub(%r{[^A-Za-z0-9\-]}, '')
68
68
  @ephemeral_binds = []
data/lib/elecksee/lxc.rb CHANGED
@@ -72,7 +72,7 @@ class Lxc
72
72
  # Returns information about given container
73
73
  def info(name)
74
74
  res = {:state => nil, :pid => nil}
75
- info = run_command("#{sudo}lxc-info -n #{name}").stdout.split("\n")
75
+ info = run_command("#{sudo}lxc-info -n #{name}", :allow_failure_retry => 3).stdout.split("\n")
76
76
  if(info.first)
77
77
  parts = info.first.split(' ')
78
78
  res[:state] = parts.last.downcase.to_sym
@@ -2,5 +2,5 @@ module Elecksee
2
2
  class Version < Gem::Version
3
3
  end
4
4
 
5
- VERSION = Version.new('1.0.4')
5
+ VERSION = Version.new('1.0.6')
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elecksee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
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-06-17 00:00:00.000000000 Z
12
+ date: 2013-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mixlib-shellout
@@ -63,7 +63,9 @@ files:
63
63
  - lib/elecksee.rb
64
64
  - Gemfile
65
65
  - README.md
66
+ - LICENSE
66
67
  - bin/lxc-awesome-ephemeral
68
+ - elecksee-1.0.4.gem
67
69
  - CHANGELOG.md
68
70
  homepage: http://github.com/chrisroberts/elecksee
69
71
  licenses: []