Merge pull request #1433 from crawford/onmetal

coreos-base/oem-rackspace-onmetal: fix race
This commit is contained in:
Alex Crawford 2015-08-12 14:12:42 -07:00
commit d324d05227
5 changed files with 2 additions and 40 deletions

View File

@ -1,19 +1,5 @@
#cloud-config
write_files:
- path: /run/udev/rules.d/79-netname.rules
permissions: 444
content: |
SUBSYSTEM!="net", GOTO="netname_end"
ACTION!="add", GOTO="netname_end"
ENV{ID_BUS}!="pci", GOTO="netname_end"
IMPORT{program}="/usr/share/oem/bin/netname.sh $env{IFINDEX}"
NAME=="", ENV{ID_NET_NAME_SIMPLE}!="", NAME="$env{ID_NET_NAME_SIMPLE}"
LABEL="netname_end"
coreos:
units:
- name: user-configdrive.service.d/netconf.conf
@ -36,19 +22,6 @@ coreos:
[Install]
WantedBy=user-config.target
- name: rename-network-interfaces.service
command: start
runtime: yes
content: |
[Unit]
Before=user-config.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/systemctl stop systemd-networkd
ExecStart=/usr/share/oem/bin/rename-interfaces.sh
ExecStart=/usr/bin/systemctl start systemd-networkd
- name: media-configdrive.mount
command: start
runtime: yes
@ -63,7 +36,7 @@ coreos:
Options=ro
oem:
id: onmetal
name: Rackspace Teeth
name: Rackspace OnMetal
version-id: @@OEM_VERSION_ID@@
home-url: http://www.rackspace.com/
bug-report-url: https://github.com/coreos/bugs/issues

View File

@ -8,4 +8,4 @@ set timeout=15
set linux_console="console=ttyS4,115200n8 8250.nr_uarts=5"
# Blacklist MEI, the firmware is just plain broken.
set linux_append="modprobe.blacklist=mei_me"
set linux_append="modprobe.blacklist=mei_me net.ifnames=0"

View File

@ -1,4 +0,0 @@
#! /bin/bash
IFINDEX=$1
echo "ID_NET_NAME_SIMPLE=eth$((${IFINDEX} - 2))"

View File

@ -1,7 +0,0 @@
#! /bin/bash
INTERFACES=$(ip link show | gawk -F ':' '/^[0-9]+/ { print $2 }' | tr -d ' ' | sed 's/lo//')
for iface in ${INTERFACES}; do
ip link set ${iface} down
udevadm test /sys/class/net/${iface}
done