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 1920838 - [RHEL-8.4] nm-cloud-setup cannot remove unassigned ip from interface
Summary: [RHEL-8.4] nm-cloud-setup cannot remove unassigned ip from interface
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.4
Assignee: Thomas Haller
QA Contact: Vladimir Benes
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-27 06:18 UTC by Frank Liang
Modified: 2021-05-18 13:34 UTC (History)
16 users (show)

Fixed In Version: NetworkManager-1.30.0-0.10.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 13:32:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
20210128_nm_debug.log (802.10 KB, text/plain)
2021-01-28 13:24 UTC, Frank Liang
no flags Details

Description Frank Liang 2021-01-27 06:18:39 UTC
Description of problem:
In aws, after removed 2nd ip from network interface, nm-cloud-setup cannot removed it from eth0 automatically.
Below is an example:
# curl http://169.254.169.254/latest/meta-data/local-ipv4
10.116.1.150
# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    link/ether 0a:ec:69:92:1d:af brd ff:ff:ff:ff:ff:ff
    inet 10.116.1.150/24 brd 10.116.1.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet 10.116.1.226/24 brd 10.116.1.255 scope global secondary noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 2600:1f14:5b3:ec11:aae8:fb07:7d14:6096/128 scope global dynamic noprefixroute
       valid_lft 445sec preferred_lft 145sec
    inet6 fe80::8ec:69ff:fe92:1daf/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
# systemctl status nm-cloud-setup
● nm-cloud-setup.service - Automatically configure NetworkManager in cloud
   Loaded: loaded (/usr/lib/systemd/system/nm-cloud-setup.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2021-01-27 06:07:49 UTC; 3min 9s ago
  Process: 5312 ExecStart=/usr/libexec/nm-cloud-setup (code=exited, status=0/SUCCESS)
 Main PID: 5312 (code=exited, status=0/SUCCESS)

Jan 27 06:07:48 ip-10-116-1-150.us-west-2.compute.internal systemd[1]: Starting Automatically configure NetworkManager in cloud...
Jan 27 06:07:49 ip-10-116-1-150.us-west-2.compute.internal systemd[1]: nm-cloud-setup.service: Succeeded.
Jan 27 06:07:49 ip-10-116-1-150.us-west-2.compute.internal systemd[1]: Started Automatically configure NetworkManager in cloud.
# systemctl status nm-cloud-setup.timer
● nm-cloud-setup.timer - Periodically run nm-cloud-setup
   Loaded: loaded (/usr/lib/systemd/system/nm-cloud-setup.timer; enabled; vendor preset: disabled)
   Active: active (waiting) since Wed 2021-01-27 03:37:46 UTC; 2h 33min ago
  Trigger: Wed 2021-01-27 06:12:48 UTC; 1min 45s left

Jan 27 03:37:46 ip-10-116-1-150.us-west-2.compute.internal systemd[1]: Started Periodically run nm-cloud-setup.
# rpm -q NetworkManager-cloud-setup
NetworkManager-cloud-setup-1.30.0-0.7.el8.x86_64
Version-Release number of selected components (if applicable):

RHEL Version:
RHEL8.4(4.18.0-277.el8.x86_64 )

How reproducible:
100%

Steps to Reproduce:
1. Start a RHEL-8.4 with nm-cloud-setup installed.
2. Check addr in eth0

Actual results:
The unassigned ip is not removed as expected.

Expected results:
Auto remove unassigned ip.

Additional info:
- ip addr can be set automatically if add new ip
- Amazon Linux2 can do it automatically in adding and removing ips.

Comment 1 Thomas Haller 2021-01-27 07:27:23 UTC
Could you please provide a complete debug log of NetworkManager and nm-cloud-setup?

For NetworkManager, see https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/contrib/fedora/rpm/NetworkManager.conf#n28 for how to enable level=TRACE logging.

For nm-cloud-setup, see `systemctl cat nm-cloud-setup.service` for how to set "Environment=NM_CLOUD_SETUP_LOG=TRACE": by doing `systemctl edit nm-cloud-setup.service` and edit the Environment.

Afterwards, restart both services (or maybe reboot, to get a clean, complete log).


Finally, please provide the complete journal and not separate. Either `journalctl -b 0 -u NetworkManager -u nm-cloud-setup` or just the entire `journalctl -b 0`.


Thank you!

Comment 2 Frank Liang 2021-01-28 13:24:13 UTC
Created attachment 1751683 [details]
20210128_nm_debug.log

Please check '20210128_nm_debug.log' for details, '10.116.1.65' is the 2nd ip which was unassigned already.

# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    link/ether 0a:72:d9:f2:0f:43 brd ff:ff:ff:ff:ff:ff
    inet 10.116.1.130/24 brd 10.116.1.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet 10.116.1.65/24 brd 10.116.1.255 scope global secondary noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 2600:1f14:5b3:ec11:cbaf:4415:b045:d84f/128 scope global dynamic noprefixroute 
       valid_lft 433sec preferred_lft 133sec
    inet6 fe80::872:d9ff:fef2:f43/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Comment 10 Vladimir Benes 2021-02-17 10:53:18 UTC
I cannot now add NMCI test, as I don't have accounts in AWS, but manual testing was done:

[root@ip-10-0-0-125 ~]# date; ip a s eth0 ; ip r
Wed Feb 17 10:40:28 UTC 2021
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    link/ether 02:4c:ed:6e:cb:a7 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.125/24 brd 10.0.0.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
default via 10.0.0.1 dev eth0 proto dhcp metric 100 
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.125 metric 100 

Successfully assigned the following IP address to network interface eni-0783f12ceb704d303: 10.0.0.120

after 5 minutes:
[root@ip-10-0-0-125 ~]# date; ip a s eth0 ; ip r
Wed Feb 17 10:44:52 UTC 2021
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    link/ether 02:4c:ed:6e:cb:a7 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.125/24 brd 10.0.0.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet 10.0.0.120/24 brd 10.0.0.255 scope global secondary noprefixroute eth0
       valid_lft forever preferred_lft forever
default via 10.0.0.1 dev eth0 proto dhcp metric 100 
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.125 metric 100 
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.120 metric 100 

Successfully unassigned the following IP address from network interface eni-0783f12ceb704d303: 10.0.0.120

and after 5 more minutes:
Wed Feb 17 10:50:15 UTC 2021
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
    link/ether 02:4c:ed:6e:cb:a7 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.125/24 brd 10.0.0.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
default via 10.0.0.1 dev eth0 proto dhcp metric 100 
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.125 metric 100

Comment 13 errata-xmlrpc 2021-05-18 13:32:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: NetworkManager and libnma security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:1574


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