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 2022418 - Misleading behavior about ifup/ifdown
Summary: Misleading behavior about ifup/ifdown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: NetworkManager
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Thomas Haller
QA Contact: Matej Berezny
URL:
Whiteboard:
: 2041764 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-11 15:31 UTC by Timothy Redaelli
Modified: 2022-05-17 16:07 UTC (History)
16 users (show)

Fixed In Version: NetworkManager-1.36.0-0.7.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 15:48:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-102532 0 None None None 2021-11-11 15:37:28 UTC
Red Hat Product Errata RHBA-2022:3915 0 None None None 2022-05-17 15:48:28 UTC
freedesktop.org Gitlab NetworkManager NetworkManager merge_requests 1061 0 None opened [th/nm-updown-split] contrib/rpm: split ifup/ifdown compat scripts to new package NetworkManager-initscripts-updown 2022-01-11 20:59:47 UTC

Description Timothy Redaelli 2021-11-11 15:31:50 UTC
Description of problem:

Since RHEL9 doesn't have initscripts installed by default, ifup and ifdown wrappers are not installed, but they are listed in the package.

So if a user try to use it, bash-completion tell him to install NetworkManager, but it's already installed:

[root@wsfd-netdev27 ~]# ifup
bash: ifup: command not found...
Install package 'NetworkManager' to provide command 'ifup'? [N/y] y

 * Waiting in queue... Failed to install packages: NetworkManager-1:1.34.0-0.1.el9.x86_64 is already installed


Another thing is that if you install initscripts and then you remove it, the symlinks for ifup and ifdown are not deleted (by design?)


Version-Release number of selected component (if applicable):
NetworkManager-1.34.0-0.1.el9.x86_64


How reproducible:
Always


Steps to Reproduce:
1. Install a snapshot of RHEL9
2. Try to use ifup or ifdown

Actual results:

ifup/ifdown is not found and the system tell you to install NetworkManager to use it


Expected results:

ifup/ifdown is available OR the system should not tell you to install NetworkManager


Additional info:

Comment 1 Gris Ge 2021-12-03 08:30:52 UTC
Confirmed, in latest CentOS stream 9 new installation, the NetworkManager-1.34.0-0.1.el9 is not providing `ifup` command.


Considering a lot customers(according to PM Anita) are using ifup/ifdown, raise bug priority to high.

Comment 2 Till Maas 2021-12-08 09:43:58 UTC
(In reply to Timothy Redaelli from comment #0)
> Description of problem:
> 
> Since RHEL9 doesn't have initscripts installed by default, ifup and ifdown
> wrappers are not installed, but they are listed in the package.
> 
> So if a user try to use it, bash-completion tell him to install
> NetworkManager, but it's already installed:

just for the record, this is not bash-completion but PackageKit-command-not-found AFAIK.

> 
> [root@wsfd-netdev27 ~]# ifup
> bash: ifup: command not found...
> Install package 'NetworkManager' to provide command 'ifup'? [N/y] y
> 
>  * Waiting in queue... Failed to install packages:
> NetworkManager-1:1.34.0-0.1.el9.x86_64 is already installed
> 
> 
> Another thing is that if you install initscripts and then you remove it, the
> symlinks for ifup and ifdown are not deleted (by design?)

Yes, this is by design.

> Steps to Reproduce:
> 1. Install a snapshot of RHEL9
> 2. Try to use ifup or ifdown
> 
> Actual results:
> 
> ifup/ifdown is not found and the system tell you to install NetworkManager
> to use it
> 
> 
> Expected results:
> 
> ifup/ifdown is available OR the system should not tell you to install
> NetworkManager

Proposed acceptance criteria:
Given a fresh Linux installation without initscripts, when a user runs `ifup`, then bash will print `bash: ifup: command not found`.
Given a Linux installation that provides /usr/bin/ifup, when I run rpm -qf /usr/sbin/ifup, it will report a package that owns it.
Given a Linux installation with initscripts and NetworkManager, when a user runs `ifup`, then it will call the NetworkManager ifup wrapper.
Given a Linux installation with initscripts and NetworkManager, when a user uninstalls initscripts and run `ifup`, then it will call the NetworkManager ifup wrapper.
Given a Linux installation with initscripts and NetworkManager and without network-scripts, when a user uninstalls NetworkManager, then /usr/sbin/ifup will be removed.

[and the same for ifdown instead of ifup]


AFAICS, the fix might be to remove these lines from the NM spec file:
%ghost %attr(755, root, root) %{_sbindir}/ifup
%ghost %attr(755, root, root) %{_sbindir}/ifdown
touch %{buildroot}%{_sbindir}/ifup %{buildroot}%{_sbindir}/ifdown

Maybe, also initscripts should be changed to %ghost the files instead, since with this solutions, no package will own /usr/sbin/ifup|ifdown, which is also bad. But then it will break if NetworkManager is not installed but only initscripts (maybe this is an edge scenario that we can accept?). Maybe the acceptance criteria are not possible to meet without complex changes to PackageKit-command-not-found which don't seem worth the effort. What do you think? An alternative might be to change the first acceptance criteria to allow it to suggest installing a package that will actually make ifup/ifdown available but since we want to be on a path to remove these legacy commands, it does not seem to be good idea.

Comment 6 Till Maas 2021-12-14 08:25:35 UTC
New acceptance criteria from discussion at backlog refinement on 2021-12-14:

Given a fresh Linux installation without initscripts, when a user runs `ifup`, then PackageKit-command-not-found will suggest a package and after installing it, ´ifup´ will be the NetworkManager wrapper.
Given a Linux installation that provides /usr/bin/ifup, when I run rpm -qf /usr/sbin/ifup, it will report a package that owns it.
Given a Linux installation with initscripts and NetworkManager, when a user runs `ifup`, then it will call the NetworkManager ifup wrapper.
Given a Linux installation with initscripts and NetworkManager, when a user uninstalls initscripts and run `ifup`, then it will call the NetworkManager ifup wrapper.
Given a Linux installation with initscripts and NetworkManager and without network-scripts, when a user uninstalls NetworkManager, then /usr/sbin/ifup will be removed.

[and the same for ifdown instead of ifup]

Comment 8 Thomas Haller 2022-01-18 09:09:49 UTC
*** Bug 2041764 has been marked as a duplicate of this bug. ***

Comment 11 Matej Berezny 2022-02-20 23:32:08 UTC
I've tested the individual points in acceptance criteria, and they seem to be met, so I am moving it to verified.

Comment 18 errata-xmlrpc 2022-05-17 15:48:15 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 (new packages: NetworkManager), 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/RHBA-2022:3915


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