xcat-core
                                
                                
                                
                                    xcat-core copied to clipboard
                            
                            
                            
                        Check for netplan, use it to detect static ips if possible
The PR is to fix issue #7226
The modification include
add check for netplan, and use it to check for static ips
@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.
Since xCAT still needs to support UB 16, 18, is there a version of this command that would run on all of them ?
@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
I just get a false or true result:
--> netplan get ethernets.enp0s25.dhcp4 
false
                                    
                                    
                                    
                                
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:~#
                                    
                                    
                                    
                                
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: @.***>
@gurevichmark What needs to happen to move this merge request forward?
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.