vagrant-lxd 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ae29284d2a4a870ad54f62da227bfa06e1a879d
4
- data.tar.gz: 1a7977adf19891632b59233f7de7bad527ed93b4
3
+ metadata.gz: 61672c78ba393c4f34973d8d0f56a76568dcb3be
4
+ data.tar.gz: b0c08820b88572b7fc94fa67559d4c129f06f647
5
5
  SHA512:
6
- metadata.gz: 94b0882c41cd75aa6caf9f672b7f7353cfb56b9e60762f785f6b9fc23774ee8b2bb4443da86b35f957a52588cffb564a9e4130798498e3f1ab07fe037287fc0b
7
- data.tar.gz: 9b1344147ebd312227be8186571ed421bfdc1dc4421a45c09f17bb0008759b2682b23b78c19228ed2901aa58f63f3782edaf78cb364564bf9e7982df6c9b12c1
6
+ metadata.gz: 4b0cca7c0d4fa3c8c9c6f5931a6db8e5ed1988fada9085461a1c2eedfcd2785e729f2812c0aa7c210f2916d277018c57883f52f6457f6aaea42c4285bf876cf4
7
+ data.tar.gz: dc7da8f906ccf8ca2e81ca3d2b43c6c3cde6cf4cd9b3b58e0c2c6420c2d4dc45b68a5335602bb7a3d3a339654ef1015fe0dc0f42b026ac3fa25bb1d8507ee29b
data/Gemfile.lock CHANGED
@@ -23,7 +23,7 @@ GIT
23
23
  PATH
24
24
  remote: .
25
25
  specs:
26
- vagrant-lxd (0.1.1)
26
+ vagrant-lxd (0.1.2)
27
27
  hyperkit (~> 1.1.0)
28
28
 
29
29
  GEM
@@ -110,6 +110,7 @@ module VagrantLXD
110
110
  c.use HandleBox
111
111
  c.use LXD.action(:create)
112
112
  c.use LXD.action(:resume)
113
+ c.use SetHostname
113
114
  c.use SyncedFolders
114
115
  c.use WaitForCommunicator
115
116
  c.use Provision
@@ -191,6 +192,7 @@ module VagrantLXD
191
192
  when :frozen, :stopped
192
193
  c.use Message, :info, 'Resuming machine...'
193
194
  c.use LXD.action(:resume)
195
+ c.use SetHostname
194
196
  c.use SyncedFolders
195
197
  c.use WaitForCommunicator
196
198
  c.use Provision
@@ -241,13 +241,17 @@ module VagrantLXD
241
241
  fail OperationTimeout, time_limit: timeout, operation: 'start', machine_id: machine_id
242
242
  end
243
243
 
244
- def halt
244
+ def halt(force = false)
245
245
  if in_state? :running, :frozen
246
- @lxd.stop_container(machine_id, timeout: timeout)
246
+ @lxd.stop_container(machine_id, timeout: timeout, force: force)
247
247
  end
248
248
  rescue Hyperkit::BadRequest
249
- @machine.ui.warn "Container failed to stop within #{timeout} seconds, forcing shutdown..."
250
- @lxd.stop_container(machine_id, timeout: timeout, force: true)
249
+ if force
250
+ fail OperationTimeout, time_limit: timeout, operation: 'stop', machine_id: machine_id
251
+ else
252
+ @machine.ui.warn "Container failed to stop within #{timeout} seconds, forcing shutdown..."
253
+ halt(true)
254
+ end
251
255
  end
252
256
 
253
257
  def suspend
@@ -20,7 +20,7 @@
20
20
  module VagrantLXD
21
21
  module Version
22
22
  NAME = 'vagrant-lxd'
23
- VERSION = '0.1.1'
23
+ VERSION = '0.1.2'
24
24
  DESCRIPTION = 'Vagrant LXD provider'
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-lxd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Hanson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hyperkit