Project

General

Profile

action #65429

Updated by riafarov about 4 years ago

More details about feature: https://trello.com/c/WJmotQTM/1548-5-feature-sle-8965-additional-try-option-for-linuxrc-ifcfg-network-setup 

 SR to SLES https://build.suse.de/request/show/215467 (not accepted yet). 

 There is alos nice description in the yast blog: https://yast-branch-sprint-97.surge.sh/blog/2020-04-20/sprint-97 

 ## Acceptance criteria 
 1. Scope of changes is learned 
 2. Exploratory testing is conducted for the parts which are not covered by the automated tests 
 3. Follow-up tickets for automated tests are created with detailed description in case are considered to be useful (efforts vs profit) 
 4. jira ticket is updated accordingly 


 ---------------- 
 Content from trello: 

 Description: https://jira.suse.com/browse/SLE-8965 
 Dev-Task: https://jira.suse.com/browse/SLE-9791 

 ## What's Requested 

 As any system can currently have several network interfaces nowadays and it's often hard to distinguish the right one, Linuxrc supports `ifcfg=eth*...()` including `VLAN`, but we are asked to additionally support a new `try` in that command. This will try to setup the network on interfaces one by one and try to reach the installation system using that network. If that works, this network setup is considered to be successful and Linuxrc stops there. 

 ## Examples 

 - ifcfg=eth*=try,10.10.0.1,10.10.0.2,example.com 
 - ifcfg=eth*.66=try,10.10.0.1,10.10.0.2,example.com 
 - ifcfg=eth*=try,dhcp 

 `try` is obviously **optional** 

 ## Implementation notes 

 As this is more or less about making the `ifcfg` option work the way the classical linuxrc network setup    does (via `hostip`, `gateway`, etc) and these values are stored internally in `config.ifcfg.manual` here: 

 https://github.com/openSUSE/linuxrc/blob/master/global.h#L696 

 this might be as simple as filling up that struct with the `ifcfg` values if `try ` is used. 

 Some additional housekeeping might be required, though. 

 This would imply that there can be only one `ifcfg` option with `try`. But that does not look like a serious restriction. 

 ## Implementation Summary 

 - the patch in the PR works with limitation that try option uses only reachability of installation repositories. Other network aware criteria such as dud, info, autoyast reachability are omitted for now. 
 - try option is supported for dhcp even static configurations. However makes sense only for static ones with pattern. All other variations are applied to all matching interfaces in the first attempt (```ifcfg=eth*=try,1.1.1.1/24``` will try to assign the configuration to eth0, eth1, ... one by one. In opposite to ```ifcfg=eth*=try,dhcp``` which is equal to ```ifcfg=eth*=dhcp``` and will assign dhcp config to all eth interfaces at once) 
 - linuxrc has already implemented some fallback mechanism. For backward compatibility the try option is used after this fallback for one configuration attempt 
 - travis job for some reason fails, however local build works fine 

 ## Review 

 https://github.com/openSUSE/linuxrc/pull/219 

 updated doc in https://en.opensuse.org/SDB:Linuxrc

Back