lxd-common 0.9.4 → 0.9.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9a1b61591052ea4dc36d429d4eb0c64e175d82eabaa1336d39e426ffb507d99
4
- data.tar.gz: 66f077a04f62b447fc2d01ec07dc922fd3f64c7c37f8884d92117cf12863f627
3
+ metadata.gz: 207168d0b580adc1cbba2bfb17dc584e062fca8bf6d761d1cbf740280a3bcc32
4
+ data.tar.gz: f42c295d6c2160db9f5a86bff3c124cca335036366d5c9e94e5a21e862beb323
5
5
  SHA512:
6
- metadata.gz: 6c3e7edbda05c5b20b6be7220622fb69b9b37616a8554d40af9b60a0232742b6cebe3b4eafd1d65c8083197de60281b5794fb5290ef8788776e2774c013bbfc7
7
- data.tar.gz: fca27772aa6a1f05cfc9327dc119ea0e7425656c7549047b49059b23cdf95dc7b100d521500b1ac642d1df854f85297779441e9775032ec6cc4098f3ab839587
6
+ metadata.gz: 118d3c3463d6db8c3546957b2d7e023e1280533fea23a5f3892bba8d101c2ce7ffa9d18c920d95c3b2b9036e4e9e7b3efd06783d314f92d54c4a1329ae4c4403
7
+ data.tar.gz: 66f906f901831fcf66cee1de6eb97c6035395dae65662cf54b4b282a3365bf0a43fd5671f0c1aaff234c4ecd135dafed3558062b5c958f5ee2dde0b21a8ccd04
@@ -50,6 +50,10 @@ module NexusSW
50
50
  return ENV['TMPDIR'] unless !ENV['TMPDIR'] || ENV['TMPDIR'].empty?
51
51
  '/tmp'
52
52
  end
53
+
54
+ def self.chdir_mutex
55
+ @chdir_mutex ||= Mutex.new
56
+ end
53
57
  end
54
58
  end
55
59
  end
@@ -27,7 +27,7 @@ module NexusSW
27
27
  subcommand = options[:subcommand]
28
28
  unless subcommand
29
29
  subcommand = "exec #{container_name} --"
30
- command = ['bash', '-c', command].shelljoin
30
+ # command = ['bash', '-c', command].shelljoin
31
31
  end
32
32
  command = "lxc #{subcommand} #{command}"
33
33
 
@@ -79,8 +79,7 @@ module NexusSW
79
79
  def upload_folder(local_path, path, options = {})
80
80
  return super unless config[:info] && config[:info]['api_extensions'] && config[:info]['api_extensions'].include?('directory_manipulation')
81
81
 
82
- perms = file_perms(options)
83
- execute("-r #{local_path} #{container_name}#{path}", subcommand: "file push#{perms}", capture: false).error!
82
+ execute("-r #{local_path} #{container_name}#{path}", subcommand: "file push", capture: false).error!
84
83
  end
85
84
 
86
85
  def download_folder(path, local_path, options = {})
@@ -63,8 +63,10 @@ module NexusSW
63
63
  begin
64
64
  tfile = Tempfile.new(container_name)
65
65
  tfile.close
66
- Dir.chdir File.dirname(local_path) do
67
- Archive::Tar::Minitar.pack File.basename(local_path), Zlib::GzipWriter.new(File.open(tfile.path, 'wb'))
66
+ Transport.chdir_mutex.synchronize do
67
+ Dir.chdir File.dirname(local_path) do
68
+ Archive::Tar::Minitar.pack File.basename(local_path), Zlib::GzipWriter.new(File.open(tfile.path, 'wb'))
69
+ end
68
70
  end
69
71
  # `tar -c#{flag}f #{tfile.path} -C #{File.dirname local_path} ./#{File.basename local_path}`
70
72
  fname = '/tmp/' + File.basename(tfile.path) + '.tgz'
@@ -1,5 +1,5 @@
1
1
  module NexusSW
2
2
  module LXD
3
- VERSION = '0.9.4'.freeze
3
+ VERSION = '0.9.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lxd-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Zachariasen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-06 00:00:00.000000000 Z
11
+ date: 2018-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.7.4
170
+ rubygems_version: 2.7.5
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: Shared LXD Container Access Library