vagrant-lxc 1.3.0 → 1.3.1

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: 736cfddbd6bdf4b0fb8d6bbb5291e3dd30722835
4
- data.tar.gz: 25d7fba64da0b3f42ae5b537b13db95b55db69ae
3
+ metadata.gz: a7961d3375120bd894e83e2a4f20ec8b5d3593fb
4
+ data.tar.gz: 7cf67804b6cf65040e2135b595614fdfaf9e6c42
5
5
  SHA512:
6
- metadata.gz: 085fa926c3d0a3737487d7589b85ab833547bdf19134f544209915742640e5709bcbacef7aaccc76203cdf30068008dabbe509823625072afeb0bfe6d1a04937
7
- data.tar.gz: 26cfe6cb8982ed036ed70d4b1aac50ff9c5720d87e3aef3cc87696a1c1cfa3697c31018de546c817aa482ac73f61a1f15f8ac678a0b8d0cabdde520691a4c618
6
+ metadata.gz: a21551ff2fd67807a8b2873921f594f48702bb624654bafab005691161d6b64a1b3bef8e358be92cd902eeb57ef6e9e3e145c529cf5d6fe0bb2f7f33f26189e5
7
+ data.tar.gz: 9e38552fa5bc9b20c51161d816465268c9d1efc52d47f9be84b39dd1775c9e2d6629dc7b9a8eeff35e185a11a9f97dd72e6cb9e1ca75bd217dbcb25493e286aa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.3.1](https://github.com/fgrehm/vagrant-lxc/compare/v1.3.0...v1.3.1) (Fev 06, 2018)
2
+
3
+ FIXES:
4
+ - Fix problems with `tmpfs` fiddling in v1.3.0. [[GH-455]]
5
+
6
+ [GH-455]: https://github.com/fgrehm/vagrant-lxc/pull/455
7
+
1
8
  ## [1.3.0](https://github.com/fgrehm/vagrant-lxc/compare/v1.2.4...v1.3.0) (Jan 20, 2018)
2
9
 
3
10
  FEATURES:
@@ -26,6 +26,11 @@ module Vagrant
26
26
  config.customize 'mount.entry', '/sys/fs/selinux sys/fs/selinux none bind,ro 0 0'
27
27
  end
28
28
 
29
+ if config.tmpfs_mount_size && !config.tmpfs_mount_size.empty?
30
+ # Make /tmp a tmpfs to prevent init scripts from nuking synced folders mounted in here
31
+ config.customize 'mount.entry', "tmpfs tmp tmpfs nodev,nosuid,size=#{config.tmpfs_mount_size} 0 0"
32
+ end
33
+
29
34
  env[:ui].info I18n.t("vagrant_lxc.messages.starting")
30
35
  env[:machine].provider.driver.start(config.customizations)
31
36
 
@@ -12,7 +12,6 @@ require 'vagrant-lxc/action/handle_box_metadata'
12
12
  require 'vagrant-lxc/action/prepare_nfs_settings'
13
13
  require 'vagrant-lxc/action/prepare_nfs_valid_ids'
14
14
  require 'vagrant-lxc/action/private_networks'
15
- require 'vagrant-lxc/action/remove_temporary_files'
16
15
  require 'vagrant-lxc/action/setup_package_files'
17
16
  require 'vagrant-lxc/action/warn_networks'
18
17
 
@@ -125,7 +124,6 @@ module Vagrant
125
124
  end
126
125
 
127
126
  b2.use ClearForwardedPorts
128
- b2.use RemoveTemporaryFiles
129
127
  b2.use GcPrivateNetworkBridges
130
128
  b2.use Builtin::Call, Builtin::GracefulHalt, :stopped, :running do |env2, b3|
131
129
  if !env2[:result]
@@ -18,6 +18,10 @@ module Vagrant
18
18
  # machine name, set this to :machine
19
19
  attr_accessor :container_name
20
20
 
21
+ # Size (as a string like '400M') of the tmpfs to mount at /tmp on boot.
22
+ # Set to false or nil to disable the tmpfs mount altogether. Defaults to '2G'.
23
+ attr_accessor :tmpfs_mount_size
24
+
21
25
  attr_accessor :fetch_ip_tries
22
26
 
23
27
  def initialize
@@ -25,6 +29,7 @@ module Vagrant
25
29
  @backingstore = UNSET_VALUE
26
30
  @backingstore_options = []
27
31
  @container_name = UNSET_VALUE
32
+ @tmpfs_mount_size = UNSET_VALUE
28
33
  @fetch_ip_tries = UNSET_VALUE
29
34
  end
30
35
 
@@ -52,6 +57,7 @@ module Vagrant
52
57
  @container_name = nil if @container_name == UNSET_VALUE
53
58
  @backingstore = "best" if @backingstore == UNSET_VALUE
54
59
  @existing_container_name = nil if @existing_container_name == UNSET_VALUE
60
+ @tmpfs_mount_size = '2G' if @tmpfs_mount_size == UNSET_VALUE
55
61
  @fetch_ip_tries = 10 if @fetch_ip_tries == UNSET_VALUE
56
62
  end
57
63
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module LXC
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-20 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Linux Containers provider for Vagrant
14
14
  email:
@@ -45,7 +45,6 @@ files:
45
45
  - lib/vagrant-lxc/action/prepare_nfs_settings.rb
46
46
  - lib/vagrant-lxc/action/prepare_nfs_valid_ids.rb
47
47
  - lib/vagrant-lxc/action/private_networks.rb
48
- - lib/vagrant-lxc/action/remove_temporary_files.rb
49
48
  - lib/vagrant-lxc/action/setup_package_files.rb
50
49
  - lib/vagrant-lxc/action/warn_networks.rb
51
50
  - lib/vagrant-lxc/command/root.rb
@@ -1,23 +0,0 @@
1
- module Vagrant
2
- module LXC
3
- module Action
4
- class RemoveTemporaryFiles
5
- def initialize(app, env)
6
- @app = app
7
- @logger = Log4r::Logger.new("vagrant::lxc::action::remove_tmp_files")
8
- end
9
-
10
- def call(env)
11
- @logger.debug 'Removing temporary files'
12
- driver = env[:machine].provider.driver
13
- # To prevent host-side data loss, it's important that all mounts under /tmp are unmounted
14
- # before we proceed with the `rm -rf` operation. See #68 and #360.
15
- driver.attach("findmnt -R /tmp -o TARGET --list --noheadings | xargs -L 1 --no-run-if-empty umount")
16
- driver.attach("rm -rf /tmp/*")
17
-
18
- @app.call env
19
- end
20
- end
21
- end
22
- end
23
- end