action/fetch_ip_with_lxc_attach: Attach to the MOUNT namespace in order to fix GH-300
This commit is contained in:
parent
95b18a5d5c
commit
752fa9b4e5
2 changed files with 4 additions and 1 deletions
|
@ -8,10 +8,13 @@ IMPROVEMENTS:
|
|||
|
||||
BUG FIXES:
|
||||
|
||||
- Attach to containers using the `MOUNT` namespace when attempting to fetch
|
||||
container's IP [[GH-300]]
|
||||
- Escape space characters for synced folders [[GH-291]]
|
||||
- Use Vagrant's ruby on the sudoers file so that it works on systems that don't
|
||||
have a global ruby installation [[GH-289]]
|
||||
|
||||
[GH-300]: https://github.com/fgrehm/vagrant-lxc/issues/300
|
||||
[GH-291]: https://github.com/fgrehm/vagrant-lxc/issues/291
|
||||
[GH-289]: https://github.com/fgrehm/vagrant-lxc/issues/289
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ module Vagrant
|
|||
|
||||
# From: https://github.com/lxc/lxc/blob/staging/src/python-lxc/lxc/__init__.py#L371-L385
|
||||
def get_container_ip_from_ip_addr(driver)
|
||||
output = driver.attach '/sbin/ip', '-4', 'addr', 'show', 'scope', 'global', 'eth0', namespaces: 'network'
|
||||
output = driver.attach '/sbin/ip', '-4', 'addr', 'show', 'scope', 'global', 'eth0', namespaces: ['network', 'mount']
|
||||
if output =~ /^\s+inet ([0-9.]+)\/[0-9]+\s+/
|
||||
return $1.to_s
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue