Project

General

Profile

action #44786

Updated by JRivrain over 5 years ago

## Acceptance criteria 
 * **AC1:** An openQA test exists that verifies entries in /etc/hosts after installation 
 * **AC2:** An openQA test exists that verifies entries in /etc/hosts after modification by yast2 lan 

 ## Tasks 

 * Understand the current openQA test modules for "yast2_lan" and "yast2_lan_restart" 
 * If not already covered create a test case which tests what is added to hosts file and performs at least following: 
   * Install SLES with static IP and hostname 
   * `cat /etc/hosts` after installation 
   * Start yast2 lan, edit network adapter and change the hostname to something else 
   * On the hostname tab change the hostname as well, submit changes.  
   * `cat /etc/hosts` 

 ## Further details 

 From an original yast team trello card - URL?: 
 Depending on previous setup (examples in the bug report, all cases happened when editing NIC properties, not on DNS/Hostname Tab), it could happen that: 
 1) in case of adding FQDN into /etc/hosts no alias was created 
 2) FQDN was not added as a canonical name but after the alias (proper format in /etc/hosts is [ <ip>, <canonical_name>, <alias1>, ... ], but it sometime happened that the record was stored in form [ <ip>, <alias>, <canonical_name> ] 
 3) We discovered later that the fix for [bsc#1052042](https://bugzilla.suse.com/show_bug.cgi?id=1052042) generates a new bug preventing yast2 lan from setting up a new hostname to the same static IP as previsously, see [bsc#1115644](https://bugzilla.suse.com/show_bug.cgi?id=1115644) 

 * product related PR: https://github.com/yast/yast-network/pull/577 
 * [bsc#1052042](https://bugzilla.suse.com/show_bug.cgi?id=1052042) 
 * [bsc#1115644](https://bugzilla.suse.com/show_bug.cgi?id=1115644) 

Back