Commit Graph

8 Commits

Author SHA1 Message Date
Tomoyuki Sakurai 35d3be865f Atomically apply new hostname.if(5)
This fixes an issue when the interface being configured is the
interface through which ssh traffic is forwarded.

In a complex scenario, one needs to disable the default interface for
NAT, and use other interface for ssh. In this case, when vagrant run
`ifconfig #{ifname} inet delete`, the second ifconfig that is supposed
to restore interface settings will never be called. This might be a rare
need, but it is also strongly recommended to use `netstart` when
reconfiguring interfaces after updating `hostname.if(5)`.

The issue can be triggered when ssh connection has issues between two
`ifconfig` commands.
2017-12-13 18:34:17 +09:00
Seth Vargo 49ce775b53
Prefix tempfiles with vagrant- 2016-05-31 00:18:16 -04:00
Seth Vargo 7014aa3bab
Remove custom tempfile class
This is not actually providing any additional utility and also causes
namespace conflicts with people trying to use the real Tempfile class.
2016-05-30 23:21:47 -04:00
Seth Vargo 5a4f345363
Use Util::Tempfile when configuring networks
This fixes a fairly large tempfile leak. Vagrant uses a template
renderer to write network configuration files locally to disk. Then,
that temporarily file is uploaded to the remote host and moved into
place. Since Vagrant is such a short-lived process, GC never came along
and cleaned up those tempfiles, resulting in many temporary files being
created through regular Vagrant usage.

The Util::Tempfile class uses a block to ensure the temporary file is
deleted when the block finishes. This API required small tweaks to the
usage, but provides more safety to ensure the files are deleted.
2016-05-28 23:22:34 -04:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto 2057d513cb Update CHANGELOG 2014-04-21 13:53:44 -07:00
Maximilian Fischer a7b70dcf70 OpenBSD support for virtio interfaces
- When using KVM as provider you were not able to configure network
  interfaces that use virtio, because the interface name was strictly
  set to 'em'
2014-04-21 13:53:42 -07:00
Tomoyuki Sahara 91db685295 more capabilities for OpenBSD guest 2013-08-28 13:12:09 +09:00