1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

M #-: Rename last NIC on vultr to eth_one (#1294)

This commit is contained in:
Jan Orel 2021-06-11 11:22:24 +02:00 committed by GitHub
parent 7011820d98
commit ebcef1dd05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 5 deletions

View File

@ -3,7 +3,7 @@
################################################################################
# The network device to configure
networking_iface: 'ens7'
networking_iface: 'eth_one'
# Netmask of the interface
networking_prefix: 20

View File

@ -23,6 +23,6 @@
- { protocol: 'udp', port: 8472 }
- update-replica
- role: frr
frr_iface: 'ens7'
frr_iface: 'eth_one'
# Use /20 for the internal management network address
frr_prefix_length: 20

View File

@ -32,7 +32,7 @@ networks:
# vntemplates:
# - name: "${provision}-private"
# vn_mad: 'vxlan'
# phydev: 'ens7'
# phydev: 'eth_one'
# automatic_vlan_id: 'yes'
# netrole: 'private'
# vxlan_mode: 'evpn'

View File

@ -32,7 +32,7 @@ networks:
vntemplates:
- name: "${provision}-private"
vn_mad: 'vxlan'
phydev: 'ens7'
phydev: 'eth_one'
automatic_vlan_id: 'yes'
netrole: 'private'
vxlan_mode: 'evpn'

View File

@ -59,7 +59,13 @@ module OneProvision
end
user_data << "chmod 700 ~/.ssh\n"
user_data << 'chmod 644 ~/.ssh/authorized_keys'
user_data << "chmod 644 ~/.ssh/authorized_keys\n"
# Rename last NIC to eth_one
user_data << "NIC=$(ip --brief link show | tail -1 | awk '{print $1}')\n"
user_data << "ip link set down $NIC\n"
user_data << "ip link set $NIC name eth_one\n"
user_data << 'ip link set up $NIC'
Base64.strict_encode64(user_data)
end