RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1575534 - ETH1 isn't configured when trying to boot VM with 2 interfaces
Summary: ETH1 isn't configured when trying to boot VM with 2 interfaces
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cloud-init
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: pre-dev-freeze
: ---
Assignee: Eduardo Otubo
QA Contact: xiachen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-07 08:27 UTC by Eran Kuris
Modified: 2023-03-24 14:04 UTC (History)
28 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-31 08:56:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eran Kuris 2018-05-07 08:27:03 UTC
Description of problem:
I tried to boot instance with 2 interfaces (Tried with Cirros& Rhel images)
and it looks like ETH1 in not configured in the VM.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.openstack network create net-64-2
2.openstack subnet create --subnet-range 10.0.2.0/24  --network net-64-2 --dhcp subnet_4_2
3.openstack subnet create --subnet-range 2002::/64 --network net-64-2  --ipv6-address-mode slaac  --ipv6-ra-mode slaac --ip-version 6 subnet_6_2
4.openstack network create net-64-1
5.openstack subnet create --subnet-range 10.0.1.0/24  --network net-64-1 --dhcp subnet_4_1
6.openstack subnet create --subnet-range 2001::/64 --network net-64-1  --ipv6-address-mode slaac  --ipv6-ra-mode slaac --ip-version 6 subnet_6_1
7.openstack router create Router_eNet
8.openstack router add subnet Router_eNet subnet_4_2
9.openstack router add subnet Router_eNet subnet_4_1
10.openstack router add subnet Router_eNet subnet_6_1
11.openstack router add subnet Router_eNet subnet_6_2
12.openstack router set --external-gateway nova Router_eNet
13.openstack server create --flavor 2 --image cirros --nic net-id=net-64-2 --nic net-id=net-64-1 VM_2_interfaces
Actual results:
only 1 interface was configured
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast qlen 1000
    link/ether fa:16:3e:a7:c6:13 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.14/24 brd 10.0.2.255 scope global eth0
    inet6 2002::f816:3eff:fea7:c613/64 scope global dynamic 
       valid_lft 86373sec preferred_lft 14373sec
    inet6 fe80::f816:3eff:fea7:c613/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether fa:16:3e:33:98:9d brd ff:ff:ff:ff:ff:ff

Expected results:


Additional info:

Comment 2 Assaf Muller 2018-05-07 14:36:27 UTC
This has been the case since OSP 4 (and possibly earlier). As far as I know there is no code that (by default) scans the number of Neutron ports assigned to a VM and sets up the networking in it to match the Neutron ports, this functionality is just missing (in that sense, this RHBZ could be considered an RFE). It may be possible to implement this using cloud-init/metadata. I'll flip this to the Compute DFG and see what they have to say.

Comment 3 Matthew Booth 2018-05-11 13:14:10 UTC
Just trying to work out what you're reporting here. Are you saying that DHCP doesn't work on eth1? Or are you saying that the guest OS doesn't bring up eth1 by default?

i.e. if you do this in the guest:

# dhclient eth1

do you get an IP address?

Comment 4 Eran Kuris 2018-05-13 06:00:03 UTC
(In reply to Matthew Booth from comment #3)
> Just trying to work out what you're reporting here. Are you saying that DHCP
> doesn't work on eth1? Or are you saying that the guest OS doesn't bring up
> eth1 by default?
> 
> i.e. if you do this in the guest:
> 
> # dhclient eth1
> 
> do you get an IP address?

I am saying that the guest OS doesn't bring up eth1 by default.

When I type "ip a" command I can see eth1 but in /etc/sysconfig/network-script/ 
there is no ifcfg file that created for eth1.


I don't get IP address when I do dhclient eth1.

Comment 6 Dan Smith 2018-05-31 13:55:20 UTC
Is the second port configured with an IP? Is the network it's on configured for DHCP? 

AFAIK, cloud-init should be able to look at the interfaces piece of metadata to configure the second interface as either DHCP or static if assigned an address, but I'm not sure if this is expected to happen or not. Since Assaf says it's expected, I believe him.

I assume you're not reporting this as a regression right? Maybe we should ask a cloud-init person?

Comment 8 Sahid Ferdjaoui 2018-06-01 14:23:09 UTC
I think that would be helpful to get the console logs of the guest so we can see whether couldinit is doing its work correctly.

Comment 9 Ollie Walsh 2018-06-01 15:00:06 UTC
Possibly a dup of https://bugzilla.redhat.com/show_bug.cgi?id=1236219

Comment 10 Ollie Walsh 2018-06-01 15:01:44 UTC
Relevant code in cloud init AFAICT - https://github.com/openstack/cloud-init/blob/0.7.x/cloudinit/distros/rhel.py#L66

Comment 11 Kashyap Chamarthy 2018-06-08 14:22:56 UTC
(In reply to Ollie Walsh from comment #9)
> Possibly a dup of https://bugzilla.redhat.com/show_bug.cgi?id=1236219

Yeah, it does seem  like duplicate of the above bug (which is not yet resolved).

Talking to Lars on IRC, he mentioned Eduardo Otubo (otubto) is the maintainer.  Eduardo, do you have time to look at this?

Comment 12 Eduardo Otubo 2018-06-11 11:49:53 UTC
(In reply to Kashyap Chamarthy from comment #11)
> (In reply to Ollie Walsh from comment #9)
> > Possibly a dup of https://bugzilla.redhat.com/show_bug.cgi?id=1236219
> 
> Yeah, it does seem  like duplicate of the above bug (which is not yet
> resolved).
> 
> Talking to Lars on IRC, he mentioned Eduardo Otubo (otubto) is
> the maintainer.  Eduardo, do you have time to look at this?

I'm not the maintainer, but I can look at that.

Comment 26 Uemit Seren 2019-03-15 15:00:53 UTC
We are running into the same issue. With config-drive both interfaces are configured but without config-drive only the first interface is configured

Comment 30 Huijuan Zhao 2020-02-06 03:23:37 UTC
According to comment 25, give qa_ack+.
We only have openstack PSI testing ENV which only have 1 interface, and we have no permission to setup 2 interfaces. So we will try to test this on Azure later.

Comment 40 xiachen 2020-08-31 08:56:19 UTC
Tested cloud-init-19.4-7.el7.x86_64 with RHEL7.9 latest version on openstack, the issue has gone. 
cloud-init created ifcfg file for both eth0 and eth1, so the problem described in this bug report should be resolved.
Close it as fixed in currentrelease.
If the solution does not work for you, open a new bug report.

Comment 41 gaurav.mittal 2022-01-25 03:59:39 UTC
We are seeing the same issue in AWS - EC2 instances.

below is the configuration.

$ rpm -q cloud-init
cloud-init-19.4-7.el7.centos.5.x86_64
$
$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
$

Comment 42 gaurav.mittal 2022-01-27 07:34:49 UTC
(In reply to gaurav.mittal from comment #41)
> We are seeing the same issue in AWS - EC2 instances.
> 
> below is the configuration.
> 
> $ rpm -q cloud-init
> cloud-init-19.4-7.el7.centos.5.x86_64
> $
> $ cat /etc/redhat-release
> CentOS Linux release 7.9.2009 (Core)
> $

Got the solution for this issue. Below are the steps to compile and install the net-utils in the CenOS7

# yum -y install git make systemd systemd-units rpm-build
# git clone --branch=1.x --single-branch --depth 1 https://github.com/aws/amazon-ec2-net-utils.git
# cd amazon-ec2-net-utils/
# curl -LO 'https://github.com/aws/amazon-ec2-net-utils/archive/1.5.tar.gz'
# rpmbuild --define "_sourcedir $PWD" -bb amazon-ec2-net-utils.spec
# ls ~/rpmbuild/RPMS/noarch/
# yum localinstall ls ~/rpmbuild/RPMS/noarch/amazon-ec2-net-utils-1.5-1.el7.noarch.rpm


Note You need to log in before you can comment on or make changes to this bug.