xcat-core icon indicating copy to clipboard operation
xcat-core copied to clipboard

xcatprobe xcatmn does not work for netplan based hosts such as ubuntu 20/22

Open karcaw opened this issue 3 years ago • 0 comments

The is_static_ip function here: https://github.com/xcat2/xcat-core/blob/master/xCAT-probe/lib/perl/probe_utils.pm#L175

Does not properly detect if a node is using netplan and as such the ubuntu section fails to detect the status of how the interface is configured. if you add this snippet at line 199, it works properly:

`which netplan > /dev/null 2>&1`;
    unless ($?) {
        my $dhcp_status = `netplan get ethernets.$nic.dhcp4 2>&1`;
        unless ($?) {
            $rst = 1 if ( $dhcp_status =~ /false/);
            return $rst;
        }
    }

karcaw avatar Aug 04 '22 16:08 karcaw