Hi Coiby, thanks for the patch.
On Thu, Mar 18, 2021 at 10:33 AM Coiby Xu <coxu(a)redhat.com> wrote:
ifcfg scripts are deprecated. kexec-tools still set up network
based on ifcfg scripts which lead to the issues like [1] [2].
We can get network configuration including dns, bond and znet by
parsing nmcli output instead. Another benefit is we could potentially
avoid subtle bugs caused by namespace pollution because of sourcing
ifcfg scripts.
After checking nmcli doc, it has some params just for using withing
scripts, like:
nmcli -g GENERAL.DEVICE -c no device show enp0s31f6
`-g` can help extract specified value, so maybe we can avoid the awk/sed calls
`-c no` disables the coloring of output, which should improve the performance.
Also, like `-t` can remove these redundant spacing and make it easier to parse.
Maybe we can improve this patch series with these params.
And also we can keep the old ifcfg compatibility for now, and drop it
later, in case of any user sticking with old-style configurations.
Another concern is that `nmcli` is about 20x times slower than `ip`,
can you help measure the performance impact of this change?
And also, please also add [PATCH] prefix for the cover letter.
[1]
https://bugzilla.redhat.com/show_bug.cgi?id=1919052
[2]
https://bugzilla.redhat.com/show_bug.cgi?id=1933679
Coiby Xu (8):
Parse option value from nmcli output
Get nmcli connection id by ifname
get nmcli connection show output by ifname
setup s390 znet cmdline by parsing nmcli connection show output
setup dns by parsing nmcli connection show output
setup bond by parsing nmcli connection show output
clean up codes related to ifcfg scripts
clean up unused is_nm_* functions
dracut-module-setup.sh | 72 +++++++++++++---------------
kdump-lib.sh | 106 ++++++++++++-----------------------------
2 files changed, 65 insertions(+), 113 deletions(-)
--
2.30.1
_______________________________________________
kexec mailing list -- kexec(a)lists.fedoraproject.org
To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure
--
Best Regards,
Kairui Song