Bug 1248975
| Summary: | cloud-init network interface alias not allowed | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | enax |
| Component: | Frontend.WebAdmin | Assignee: | Martin Betak <mbetak> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Israel Pinto <ipinto> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | --- | CC: | bugs, gklein, jbelka, lsurette, mbetak, mgoldboi, michal.skrivanek, rbalakri, yeylon, ykaul |
| Target Milestone: | ovirt-3.6.0-rc | Flags: | rule-engine:
ovirt-3.6.0+
ylavi: planning_ack+ rule-engine: devel_ack+ mavital: testing_ack+ |
| Target Release: | 3.6.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-02-23 09:01:36 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1288819 | ||
| Bug Blocks: | |||
|
Description
enax
2015-07-31 09:01:50 UTC
UI looks ok, test inside guest OS in progress.
# ps aux | grep 'qemu.*vdcadmin' | grep --color -o -E '/var/run.*payload.*\.img'
/var/run/vdsm/payload/ac1cd7cc-4e21-419a-ac0a-bd46605a1e2e.c38ceb5f394eec348b871861d71063da.img
# losetup -a | tail -n1
/dev/loop1: [0018]:49456062 (/run/vdsm/payload/ac1cd7cc-4e21-419a-ac0a-bd46605a1e2e.c38ceb5f394eec348b871861d71063da.img)
# mount | grep loop1
/dev/loop1 on /mnt type iso9660 (ro,relatime)
# cat /mnt/openstack/latest/meta_data.json
{
"network-interfaces" : "iface inet none\n dns-nameservers 10.34.63.228\n dns-search example.com\niface eth0 inet dhcp\n dns-nameservers 10.34.63.228\n dns-search example.com\nauto eth0:1\niface eth0:1 inet static\n address 172.16.0.1\n netmask 255.255.255.0\n dns-nameservers 10.34.63.228\n dns-search example.com\n",
"availability_zone" : "nova",
"hostname" : "foobar",
"launch_index" : "0",
"meta" : {
"role" : "server",
"dsmode" : "local",
"essential" : "false"
},
"name" : "foobar",
"network_config" : {
"path" : "/etc/network/interfaces",
"content_path" : "/content/0000"
},
"uuid" : "d4e6920a-9a1e-4b64-b813-f23d2fd820e1"
}
Verify the fix, Scenario: 1. Create VM from rhel guest image template (includes cloud init rpm) 2. Edit cloud init Network: Add new Nic named: eth1:1, static protocol. 2. Add 2 nics to VM: First for the template and second for the additional nic named eth1 3. Start VM Results: On VM guest running the command 'ip a' / 'ifconfig' i see that the alias is not set, but the nic file under /etc/sysconfig/network-scripts/ is ifcg-eth1:1 Is this the expect results? I think it should also appear in command 'ip a' / 'ifconfig' The payload is:
[root@virt-nested-vm13 latest]# cat meta_data.json
{
"network-interfaces" : "auto eth1:1\niface eth1:1 inet static\n address 192.168.1.11\n netmask 255.255.255.0\n gateway 192.168.1.1\n",
"availability_zone" : "nova",
"hostname" : "test1",
"launch_index" : "0",
"meta" : {
"role" : "server",
"dsmode" : "local",
"essential" : "false"
},
"name" : "test1",
"network_config" : {
"path" : "/etc/network/interfaces",
"content_path" : "/content/0000"
},
"uuid" : "c92c9baf-f2cc-4684-9d2c-088620782cd5"
}[root@virt-nested-vm13 latest]#
(In reply to Israel Pinto from comment #2) > Verify the fix, > > Scenario: > 1. Create VM from rhel guest image template (includes cloud init rpm) > 2. Edit cloud init Network: > Add new Nic named: eth1:1, static protocol. > 2. Add 2 nics to VM: First for the template and second for the additional > nic > named eth1 > 3. Start VM > > Results: > On VM guest running the command 'ip a' / 'ifconfig' i see that the alias is > not set, but the nic file under /etc/sysconfig/network-scripts/ is > ifcg-eth1:1 > > > Is this the expect results? > I think it should also appear in command 'ip a' / 'ifconfig' Yes, check on OS if ip alias is present. (ifconfig uses old naming - $iface:X, while ip command will show ip aliases in same device). Example: [root@str-02 3.6]# ifconfig bond0 bond0 Link encap:Ethernet HWaddr E4:1F:13:69:12:B0 inet addr:10.34.63.204 Bcast:10.34.63.255 Mask:255.255.252.0 inet6 addr: fe80::e61f:13ff:fe69:12b0/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:6350912254 errors:0 dropped:0 overruns:0 frame:0 TX packets:24009765702 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2471444466525 (2.2 TiB) TX bytes:35225722299944 (32.0 TiB) [root@str-02 3.6]# ifconfig bond0:0 bond0:0 Link encap:Ethernet HWaddr E4:1F:13:69:12:B0 inet addr:10.34.63.228 Bcast:10.34.63.255 Mask:255.255.252.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 [root@str-02 3.6]# ip a s dev bond0 5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether e4:1f:13:69:12:b0 brd ff:ff:ff:ff:ff:ff inet 10.34.63.204/22 brd 10.34.63.255 scope global bond0 inet 10.34.63.228/22 brd 10.34.63.255 scope global secondary bond0:0 inet6 fe80::e61f:13ff:fe69:12b0/64 scope link tentative dadfailed valid_lft forever preferred_lft forever Verify the fix,
Scenario:
1. Create VM from rhel guest image template (includes cloud init rpm)
2. Edit cloud init Network:
Add new Nic named: eth1:1, static protocol.
2. Add 2 nics to VM: First for the template and second for the additional nic
named eth1
3. Start VM
Results:
I can see the new Nic with alias.
Output:
# ifconfig eth1:0
eth1:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:1a:4a:16:01:59 txqueuelen 1000 (Ethernet)
# ll /etc/sysconfig/network-scripts/ifcfg-eth1\:0
-rw-r--r--. 1 root root 173 Feb 22 08:48 /etc/sysconfig/network-scripts/ifcfg-eth1:0
# cat /etc/sysconfig/network-scripts/ifcfg-eth1\:0
# Created by cloud-init v. 0.7.6 on Mon, 22 Feb 2016 13:48:50 +0000
NETMASK=255.255.255.0
BOOTPROTO=static
DEVICE=eth1:0
IPADDR=192.168.1.1
GATEWAY=192.168.1.254
ONBOOT=yes
|