quattor / configuration-modules-core

Node Configuration Manager Components for Everyone
www.quattor.org
Other
6 stars 54 forks source link

ncm-network: nmstate support for alias ip addresses #1688

Closed aka7 closed 2 months ago

aka7 commented 2 months ago

Add support for ipv4 alias addresses.

I'm not sure if this was ever in upstream before but we had this in our previous forked ncm-network. We need to pull this into nmstate. Path is what we used, so again not sure if this was Morgan specific so open to discussion. Fixes #1686

aka7 commented 2 months ago

This will conflict with https://github.com/quattor/configuration-modules-core/pull/1687 but we can rebase whichever is merged first.

aka7 commented 2 months ago

tests failures appears to be something unrelated to this change?

2024-06-19T19:00:51.3543291Z [ERROR] /sbin/sysctl not found
2024-06-19T19:00:51.3543719Z not ok 1 - Configure succeeds
2024-06-19T19:00:51.3544065Z not ok 2 - A file was actually created
2024-06-19T19:00:51.3544642Z not ok 3 - undef isa 'CAF::FileWriter'
2024-06-19T19:00:51.3545384Z not ok 4 - Perl warning: Use of uninitialized value $fh in string at src/test/perl/configure.t line 33.
2024-06-19T19:00:51.3545969Z # 
2024-06-19T19:00:51.3546309Z not ok 5 - Found kernel.sysrq variable
2024-06-19T19:00:51.3546960Z not ok 6 - /sbin/sysctl -e -p /etc/sysctl.d/50-quattor.conf was run after file change
2024-06-19T19:00:51.3547447Z 1..6
2024-06-19T19:00:51.3547769Z Dubious, test returned 6 (wstat 1536, 0x600)
2024-06-19T19:00:51.3548112Z Failed 6/6 subtests 
2024-06-19T19:00:51.4153893Z src/test/perl/pod-syntax.t .. 
2024-06-19T19:00:51.4156677Z 1..2
2024-06-19T19:00:51.4157404Z ok 1 - POD test for target/lib/perl/NCM/Component/sysctl.pm (no pod)
2024-06-19T19:00:51.4159642Z ok 2 - POD test for target/doc/pod/NCM/Component/sysctl.pod
2024-06-19T19:00:51.4160303Z ok
2024-06-19T19:00:51.4160489Z 
2024-06-19T19:00:51.4160648Z Test Summary Report
2024-06-19T19:00:51.4161074Z -------------------
2024-06-19T19:00:51.4161641Z src/test/perl/configure.t (Wstat: 1536 Tests: 6 Failed: 6)
2024-06-19T19:00:51.4162355Z   Failed tests:  1-6
2024-06-19T19:00:51.4162823Z   Non-zero exit status: 6
2024-06-19T19:00:51.4163687Z Files=3, Tests=9,  2 wallclock secs ( 0.02 usr  0.00 sys +  3.20 cusr  0.24 csys =  3.46 CPU)
2024-06-19T19:00:51.4164270Z Result: FAIL
2024-06-19T19:00:51.4838151Z [INFO] --------
jrha commented 2 months ago

I've now tested this on hosts at RAL and it looks good. It's a shame nmstate appears to have no way to set labels on addresses though :disappointed:

jrha commented 2 months ago

I've also verified that the test failures are definitely not related to this change.

aka7 commented 2 months ago

I've now tested this on hosts at RAL and it looks good. It's a shame nmstate appears to have no way to set labels on addresses though 😞

@jrha if you provide exactly what you mean by adding labels, and long as network manager supports it, I can put a RFE for nmstate.

jrha commented 2 months ago

For example eth0:aquilon, like this:

6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 98:03:9b:b8:e8:da brd ff:ff:ff:ff:ff:ff
    inet 198.51.80.11/22 brd 198.51.83.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 198.51.80.13/22 brd 198.51.83.255 scope global secondary eth0:aquilon

But I don't think Network Manager supports them either.

They can be added via

ip address add … label foo