{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/5590","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5590/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5590/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5590/events","html_url":"https://github.com/mitchellh/vagrant/issues/5590","id":68130685,"number":5590,"title":"private_network race condition with NetworkManager on Centos 7.1 with Vagrant 1.7.2","user":{"login":"bcc","id":633882,"avatar_url":"https://avatars.githubusercontent.com/u/633882?v=3","gravatar_id":"","url":"https://api.github.com/users/bcc","html_url":"https://github.com/bcc","followers_url":"https://api.github.com/users/bcc/followers","following_url":"https://api.github.com/users/bcc/following{/other_user}","gists_url":"https://api.github.com/users/bcc/gists{/gist_id}","starred_url":"https://api.github.com/users/bcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcc/subscriptions","organizations_url":"https://api.github.com/users/bcc/orgs","repos_url":"https://api.github.com/users/bcc/repos","events_url":"https://api.github.com/users/bcc/events{/privacy}","received_events_url":"https://api.github.com/users/bcc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-13T15:46:50Z","updated_at":"2015-04-14T07:49:36Z","closed_at":null,"body":"Vagrant 1.7.2\r\nCentOS 7.1\r\nVirtualbox 4.3.22\r\n\r\nIt seems that NetworkManager on CentOS 7.1 is more aggressive about handling unconfigured interfaces on start than it was in with CentOS 7, and the way that Vagrant handles the configuration of the interfaces doesn't seem to be compatible with this.\r\n\r\nI've updated a base box from Centos 7 to 7.1 (both built with the same packer configuration), and the 7.1 box fails to retain the private ip address. Looking at debug output (and adding some additional debug commands), the configuration does get set correctly during provisioning, but is undone shortly after the machine boots. It seems that this is due to NetworkManager waiting for DHCP to fail (as there's no dhcp configured on that private network), then unconfiguring the interface. \r\n\r\nAs the /etc/sysconfig/network-scripts/ifcfg-enp0s8 file (in my case) which is generated (and indeed created) by Vagrant, has NM_CONTROLLED=no, NM doesn't handle the ifdown from configure_networks.rb, and the ifup happens while NM is still waiting for DHCP to finish.\r\n\r\n```\r\n[root@puppet vagrant]# nmcli dev\r\nDEVICE  TYPE      STATE                                  CONNECTION         \r\nenp0s3  ethernet  connected                              enp0s3             \r\nenp0s8  ethernet  connecting (getting IP configuration)  Wired connection 1 \r\nlo      loopback  unmanaged                              --                 \r\n[root@puppet vagrant]# ip addr sh enp0s8\r\n3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:6f:44:44 brd ff:ff:ff:ff:ff:ff\r\n    inet6 fe80::a00:27ff:fe6f:4444/64 scope link \r\n       valid_lft forever preferred_lft forever\r\n```\r\n\r\nAs a workaround, I've found that enabling DHCP makes the problem go away (you end up with both IPs on the interface), or restarting NetworkManager so it gives up on the private interface also works, but it's a bit of a bodge. \r\n\r\nSimilarly, forcing NetworkManager to give up on the interface in configure_networks.rb by inserting:\r\n \r\n    machine.communicate.sudo(\"nmcli dev disconnect #{interface}\")\r\n\r\nBetween the ifup and ifdown commands also seems to resolve the issue, although not especially cleanly.\r\n\r\n```\r\n[vagrant@puppet ~]$  nmcli dev\r\nDEVICE  TYPE      STATE      CONNECTION \r\nenp0s3  ethernet  connected  enp0s3     \r\nenp0s8  ethernet  connected  enp0s8     \r\nlo      loopback  unmanaged  --         \r\n[vagrant@puppet ~]$ ip addr sh enp0s8\r\n3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:70:d7:dc brd ff:ff:ff:ff:ff:ff\r\n    inet 192.168.60.101/24 brd 192.168.60.255 scope global enp0s8\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::a00:27ff:fe70:d7dc/64 scope link \r\n       valid_lft forever preferred_lft forever\r\n```"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/92680003","html_url":"https://github.com/mitchellh/vagrant/issues/5590#issuecomment-92680003","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/5590","id":92680003,"user":{"login":"olivernaaris","id":5196966,"avatar_url":"https://avatars.githubusercontent.com/u/5196966?v=3","gravatar_id":"","url":"https://api.github.com/users/olivernaaris","html_url":"https://github.com/olivernaaris","followers_url":"https://api.github.com/users/olivernaaris/followers","following_url":"https://api.github.com/users/olivernaaris/following{/other_user}","gists_url":"https://api.github.com/users/olivernaaris/gists{/gist_id}","starred_url":"https://api.github.com/users/olivernaaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivernaaris/subscriptions","organizations_url":"https://api.github.com/users/olivernaaris/orgs","repos_url":"https://api.github.com/users/olivernaaris/repos","events_url":"https://api.github.com/users/olivernaaris/events{/privacy}","received_events_url":"https://api.github.com/users/olivernaaris/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T07:49:36Z","updated_at":"2015-04-14T07:49:36Z","body":"+1. I had the same problem"}}