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

Check for netplan, use it to detect static ips if possible

Open karcaw opened this issue 3 years ago • 9 comments

The PR is to fix issue #7226

The modification include

add check for netplan, and use it to check for static ips

karcaw avatar Aug 04 '22 17:08 karcaw

@karcaw Are you running on Ubuntu 20? When I try this on my Ubuntu 18, I get:

root@c910f04x12v05:~# netplan get ethernets.ens3.dhcp4
usage: /usr/sbin/netplan  [-h] [--debug]  ...
/usr/sbin/netplan : error: argument : invalid choice: 'get' (choose from 'help', 'apply', 'generate', 'ip', 'try')
root@c910f04x12v05:~#

yes i have been running ubuntu 20.04 and 22.04 for this issue.

karcaw avatar Aug 29 '22 21:08 karcaw

Since xCAT still needs to support UB 16, 18, is there a version of this command that would run on all of them ?

gurevichmark avatar Aug 29 '22 22:08 gurevichmark

@karcaw Can you show the output you are getting from netplan get command ? I still get /usr/sbin/netplan : error: argument : invalid choice: 'get', even when running on Ubuntu 20.04

gurevichmark avatar Sep 16 '22 14:09 gurevichmark

I just get a false or true result:

--> netplan get ethernets.enp0s25.dhcp4 
false

karcaw avatar Sep 19 '22 22:09 karcaw

What version of netplan do you have installed ? I have:

root@c910f04x35v07:~# apt list --installed | grep "netplan"
libnetplan0/now 0.99-0ubuntu3~20.04.2 amd64 [installed,local]
netplan.io/now 0.99-0ubuntu3~20.04.2 amd64 [installed,local]
root@c910f04x35v07:~#

gurevichmark avatar Sep 20 '22 18:09 gurevichmark

libnetplan0/jammy-updates,now 0.104-0ubuntu2.1 amd64 [installed,automatic] netplan.io/jammy-updates,now 0.104-0ubuntu2.1 amd64 [installed,automatic]

On Tue, Sep 20, 2022 at 11:04 AM Mark Gurevich @.***> wrote:

What version of netplan do you have installed ? I have:

@.:~# apt list --installed | grep "netplan" libnetplan0/now 0.99-0ubuntu3~20.04.2 amd64 [installed,local]netplan.io/now 0.99-0ubuntu3~20.04.2 amd64 [installed,local] @.:~#

— Reply to this email directly, view it on GitHub https://github.com/xcat2/xcat-core/pull/7227#issuecomment-1252719760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFB354EQQPDJM5UPC476HLV7H4DNANCNFSM55TJH3OQ . You are receiving this because you were mentioned.Message ID: @.***>

karcaw avatar Sep 20 '22 18:09 karcaw

@gurevichmark What needs to happen to move this merge request forward?

khm avatar Feb 17 '23 21:02 khm

Need a set of flags or something, so that netplan get works on UB16, UB18 and UB20. Currently I get /usr/sbin/netplan : error: argument : invalid choice: 'get', when running on those versions of OS. Seems like netplan get only works on UB22.

gurevichmark avatar Feb 17 '23 21:02 gurevichmark