Thanks for reviewing this patch set and the advice!
On Wed, Mar 24, 2021 at 03:22:43PM +0800, Kairui Song wrote:
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  .
> 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
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.
This issue is related to the third one.
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.
I'll keep the old ifcfg compatibility in next version. Thanks for the
Another concern is that `nmcli` is about 20x times slower than `ip`,
can you help measure the performance impact of this change?
Although `nmcli` is much slower than `ip`, this patch set actually
improves the performance compared with "source ifcfg-script".
There are two data sets comparing the execution time (second) of
kdump_install_net obtained on ibm-z-110.rhts.eng.bos.redhat.com
for the following approaches,
- a: source ifcfg scripts
- b: get nmcli output once and extract the values if needed
- c: use "nmclig -g <field>"
a b c
ibm 0.20 0.11 0.14
hpe 0.31 0.25 0.24
So the results are determined by the times of "nmcli -g" being called
but the nmcli approaches should be always faster than the old approach.
Btw "time kdumpctl rebuild" shows 24.062s on
. So kdump_install_net only takes 1% of
the building the kdump initramfs. So I'll take your "nmcli -g" approach
in the next version.
Here's the script to measure the execution time of kdump_install_net,
# kdump_setup_netdev enc8000
DIFF=$(echo "$END - $START" | bc)
And also, please also add [PATCH] prefix for the cover letter.
Sorry, "git format-patch" have added the prefix automatically but I
removed it when editing the subject of the cover letter.
>  https://bugzilla.redhat.com/show_bug.cgi?id=1919052
>  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(-)
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure