Description of problem: When booting a CentOS 7 vm with cloud-init configured network cloud-init-local.service hangs when bringing up the configured interface and never finishes the rest of the user-data script. Version-Release number of selected component (if applicable): 0.7.x How reproducible: always Steps to Reproduce: 1. Create a vm, install CentOS 7 add EPEL 7 beta repo. Install cloud-init. 2. Boot vm with static network configuration for eth0 and some random user-data script. 3. Log in to vm and run: systemctl status cloud-init-local.service Actual results: [root@localhost xxxxx]# systemctl status cloud-init-local.service cloud-init-local.service - Initial cloud-init job (pre-networking) Loaded: loaded (/usr/lib/systemd/system/cloud-init-local.service; enabled) Active: activating (start) since fre 2014-08-01 22:50:34 CEST; 1min 2s ago Main PID: 897 (cloud-init) CGroup: /system.slice/cloud-init-local.service ├─ 897 /usr/bin/python /usr/bin/cloud-init init --local ├─1304 /bin/bash /etc/sysconfig/network-scripts/ifup-eth ifcfg-eth0 └─2624 /usr/bin/python -Es /usr/bin/firewall-cmd --zone= --change-interface=eth0 aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Writing to /etc/resolv.conf - wb: [420] 247 bytes aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Restoring selinux mode for /etc/resolv.conf (recursive=False) aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Restoring selinux mode for /etc/resolv.conf (recursive=False) aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Reading from /etc/sysconfig/network (quiet=False) aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Read 66 bytes from /etc/sysconfig/network aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Writing to /etc/sysconfig/network - wb: [420] 66 bytes aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Restoring selinux mode for /etc/sysconfig/network (recursive=False) aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Restoring selinux mode for /etc/sysconfig/network (recursive=False) aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] __init__.py[DEBUG]: Attempting to run bring up interface eth0 using command ['ifup', 'eth0'] aug 01 22:50:38 localhost.localdomain cloud-init[897]: [CLOUDINIT] util.py[DEBUG]: Running command ['ifup', 'eth0'] with allowed return codes [0] (shell=False, capture=True) Expected results: Something like this cloud-init-local.service - Initial cloud-init job (pre-networking) Loaded: loaded (/usr/lib/systemd/system/cloud-init-local.service; disabled) Active: active (exited) since fre 2014-08-01 23:00:32 CEST; 6s ago Main PID: 897 (code=exited, status=0/SUCCESS) CGroup: /system.slice/cloud-init-local.service And vm booted with network interface configured and up, user-data script finished running. Additional info: With this SELinux policy loaded the vm boots as expected. --- module local 1.0; require { type NetworkManager_t; type cloud_init_t; type firewalld_t; class dbus send_msg; } #============= NetworkManager_t ============== allow NetworkManager_t cloud_init_t:dbus send_msg; #============= firewalld_t ============== allow firewalld_t cloud_init_t:dbus send_msg; ---
I am experiencing this problem too when trying to build a CentOS 7 image. It seems weird that there aren't many other Google search results; almost as if no one else is having experiencing this or every just turns off SELINUX or something?
This package is no longer included in epel7. https://src.fedoraproject.org/rpms/cloud-init/c/aeebc66ebb93afe224cc4752a58955dad03a5dde?branch=epel7