Commit Graph

668 Commits

Author SHA1 Message Date
Chris Roberts 1df852c88a Reduce commands. Allow nm reload/restart to bring interfaces up.
Reduce the total number of commands run to configure interfaces. If
a service reload/restart is required, only execute it once instead
of once per device. When nm is managing a device, the explicit up
is not required.
2017-05-01 13:17:17 -07:00
Chris Roberts 414184b76b guests/rhel: Update network configuration
Properly detects NetworkManager on guest as well as devices controlled
by NetworkManager. Provides configuration option to enable/disbale
NetworkManager control on devices.
2017-04-26 13:15:33 -07:00
Chris Roberts e62d71b645 Remove comment removal from /etc/hosts file on guests
Fixes: #7794
2017-04-20 17:07:56 -07:00
Chris Roberts e52821364a Merge pull request #8407 from gh2k/gentoo-systemd
Add support for gentoo guests that use systemd
2017-04-16 14:17:19 -07:00
Chris Roberts 1a17d829f5 Merge pull request #8472 from derks/elementary-guest
Support for Elementary OS 0.4 - Issue #8471
2017-04-16 08:16:06 -07:00
Chris Roberts 38a5f7c873 Merge pull request #8310 from tsmolka/patch-guest-esxi
guests/esxi: Added public_key capability
2017-04-16 08:13:26 -07:00
BJ Dierkes 55da086f5f Support for Elementary OS 0.4 - Issue #8471 2017-04-12 02:36:47 -05:00
Chris Roberts 21e195c75a Merge pull request #7425 from tjuerge/6220-mount_shared_folder-via-ssh
Add support for mounting synched folders on windows guest via ssh
2017-04-05 15:11:32 -07:00
Chris Roberts 98b0ad1464 Fix linux guest mount smb capability 2017-03-24 13:42:51 -07:00
Simon Detheridge 3a3216ae0c gentoo/guest: #8406 support systemd when configuring net 2017-03-24 16:11:16 +00:00
Simon Detheridge e06848a649 gentoo/guest: #8406 support systemd when changing hostname 2017-03-24 16:10:52 +00:00
Chris Roberts dbf01572ef Merge pull request #8122 from chrisroberts/virtualbox/uid-gid
Use uid/gid from mount_options if provided for synced folders.
2017-03-06 14:21:11 -08:00
Tobias e3e7484e16 Merge tag 'tags/v1.9.1' into patch-guest-esxi 2017-02-28 06:30:34 -08:00
Tobias cdeac10b36 guests/esxi: Added public_key capability 2017-02-28 02:35:00 -08:00
Chris Roberts 0c307476fa Merge pull request #8165 from kaorimatz/fix-arch-multiple-networks
guests/arch: fix configuring multiple network interfaces fails
2017-02-09 17:41:09 -08:00
Chris Roberts 5004f37a36 Merge pull request #8148 from mikefaille/netfixRHEL
Revert "Fix `service network restart` on RHEL-7 / Fedora"
2017-01-05 15:07:17 -08:00
Satoshi Matsumoto 829b995225
guests/arch: fix configuring multiple network interfaces fails 2017-01-02 15:32:23 +09:00
Michaël Faille 96611341a9 Revert "Fix `service network restart` on RHEL-7 / Fedora"
`/etc/init.d/network restart` already restart NM and shutdown interfaces.

In start() :
```
        if [ "$(LANG=C nmcli -t --fields running general status 2>/dev/null)" = "running" ]; then
                nmcli connection reload
        fi

```

In stop() :

```
       for i in $vpninterfaces $xdslinterfaces $bridgeinterfaces $vlaninterfaces $remaining; do
                unset DEVICE TYPE
                (. ./ifcfg-$i
                if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi

                if ! check_device_down $DEVICE; then
                   action $"Shutting down interface $i: " ./ifdown $i boot
                   [ $? -ne 0 ] && rc=1
                fi
                )
        done
```
Where $remaining include all "others" interfaces including eth*

This reverts commit 166d10d4e1.
2016-12-21 20:33:57 -05:00
Chris Roberts 9f393fc1e0 Use uid/gid from mount_options if provided for synced folders.
This also extracts the gid/uid detection and upstart actions into
reusable module to provide consistent behavior.
2016-12-14 12:12:17 -08:00
ephemeralsnow 556b82da1c Fix quotes 2016-12-07 18:04:33 +09:00
Chris Roberts 0587707044 Merge pull request #8051 from jklippel/vagrant-issue-7368
redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability
2016-12-05 15:21:04 -08:00
Latchezar Tzvetkoff 166d10d4e1 Fix `service network restart` on RHEL-7 / Fedora
RHEL-7 / Current Fedora versions tend to use NetworkManager for
configuring the networks, and `service network restart` might fail.
If the `NetworkManager` service is running, we should restart it,
otherwise we try restarting `network`.
2016-11-29 15:40:48 +02:00
jklippel b10bc2e8c2 Vagrant-Issue: 7368: redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability 2016-11-29 08:10:25 +01:00
Chris Roberts 5482692127 guests/linux: Only match interfaces without special characters 2016-11-10 07:19:26 -08:00
Chris Roberts eb7568b2ed Merge pull request #7922 from chrisroberts/netbsd/rsync
guests/netbsd: Use full path to pkg_add command
2016-10-25 18:51:42 -07:00
Chris Roberts be3fa85853 Merge pull request #7921 from chrisroberts/fix/key-fixups
Remove `set -e` usage for better shell compatibility
2016-10-25 14:43:04 -07:00
Chris Roberts 365b98fee6 Merge pull request #7926 from chrisroberts/networking/rhel
guests/redhat: Force NetworkManager to reload device configurations
2016-10-25 14:41:07 -07:00
Chris Roberts fc6824e79c guests/netbsd: Include /usr/sbin in PATH for pkg_add command 2016-10-25 14:22:38 -07:00
Chris Roberts c39b3fbb76 guests/openbsd: Check package installation after installing package
The `pkg_add` command will return `0` when a package requested for
installation is not found. This adds a validation check to ensure
the rsync package is actually installed on the guest.
2016-10-25 12:16:52 -07:00
Chris Roberts 67f3c8b48c guests/redhat: Force NetworkManager to reload device configurations
When configuring network devices force NetworkManager to reload new
configuration files as they appear. This prevents NetworkManager from
attempting to continue managing devices on initial start up.
2016-10-25 07:45:38 -07:00
Chris Roberts fb4e4320b2 Remove `set -e` usage for better shell compatibility 2016-10-24 10:30:08 -07:00
Chris Roberts b9ea9a2ac2 Merge pull request #7887 from chrisroberts/guests/linux-detection
Guests/linux detection
2016-10-11 12:55:52 -07:00
Chris Roberts 9d61d7c61b Merge pull request #7818 from rswarts/vz7flavor
Add Virtuozzo Linux 7 to list of RHEL flavors
2016-10-11 10:35:20 -07:00
Chris Roberts d0549d6e11 guests/linux: Provide common linux detection style
Defines a common and generic linux detection strategy which can be
subclassed and easily reused by providing a custom detection constant.
2016-10-11 07:50:34 -07:00
Reto Gantenbein 6050b13f43 Make Debian guest detection more reliable
/etc/issue is far from being a reliable source for OS detection as it
can be changed by a user without affecting any OS functionality. As
newer Debian systems run systemd by default, check for /etc/os-release
and fallback to lsb_release for older Debian versions. Check #7625 for
a similar issue. Even lsb_release is not manatory, therefore keep the
current code of parsing /etc/issue to avoid regressions.
2016-10-11 07:49:35 -07:00
Chris Roberts 07ce1c6930 Merge pull request #7866 from chrisroberts/guest-linux/network-interfaces-sorting
guests/linux: Update network interface sorting implementation
2016-10-10 10:59:52 -07:00
Chris Roberts a8970281ce guests/linux: Properly sort interface name types
Add failing networking interface list sorting test with example
provided by #7883. Update sorting logic to properly handle different
types and differing array lengths.

Fixes #7883
2016-10-10 10:22:19 -07:00
Chris Roberts d178631ff9 Generic white space strip from command strings 2016-10-07 17:30:27 -07:00
Chris Roberts 33b13dffbe Merge pull request #7873 from markpeek/markpeek-photon-netmask
Fix typo (netmast => netmask) for Photon guest #7808
2016-10-07 15:15:26 -07:00
Mark Peek 4bf32e3f6d Fix typo (netmast => netmask) for Photon guest #7808 2016-10-07 12:32:21 -07:00
Chris Roberts b738aaac0f Merge pull request #7813 from rudineirk/fix-non-upstart-linux
Fix non upstart linux nfs mounts
2016-10-06 12:59:23 -07:00
Chris Roberts a384276431 Merge pull request #7751 from wakeful/fix-centos7-do-not-prompt-before-overwriting
Fix CentOS7 network config - do not prompt before overwriting
2016-10-04 17:31:42 -07:00
Chris Roberts e2b18fc65d guests/linux: Update network interface sorting implementation
Always pull ordered ethernet devices to the head of the list. Ensure
aliases are not included.
2016-10-04 17:25:00 -07:00
Chris Roberts 0300df09fb guests/linux: Update constant name, freeze constant values 2016-09-30 12:11:54 -07:00
Chris Roberts 9f468d2626 guests/linux: Place ethernet devices at start of device list 2016-09-29 15:33:29 -07:00
Rutger Swarts 2ecbc241c3 Add Virtuozzo Linux 7 to list of RHEL flavors 2016-09-23 10:45:16 +02:00
Rudinei Goi Roecker 8b8c961935 Fix non upstart linux nfs mounts 2016-09-20 17:57:54 -03:00
AJ 2e723ea308 added general restart for network - to prevent IP address dropping on interfaces 2016-08-23 21:02:11 +01:00
AJ 1c4e7ee068 assuming a scenario - vagrant up -> power off -> vagrant up
vagrant will stuck on the network configuration

DEBUG ssh: stdout: mv: overwrite '/etc/sysconfig/network-scripts/ifcfg-eth0'?
DEBUG ssh: Sending SSH keep-alive...
2016-08-23 20:58:15 +01:00
Chris Roberts a7537a6be0 Merge pull request #7726 from chrisroberts/fix/rsync-exclude
Ignore files excluded from sync on chown
2016-08-19 09:58:31 -07:00