action #67534

[functional][y] Change yast2_lan hostname validation

Added by syrianidou_sofia about 2 years ago. Updated about 2 years ago.

Enhancement to existing tests
Target version:
Start date:
Due date:
% Done:


Estimated time:
5.00 h


In yast2_lan module, one of the steps is to verify that the hostname can be successfully changed. Currently in the code, the hostname used for the change comes from: $hostname = get_var('HOSTNAME', 'susetest') . For most architectures 'susetest' is also the hostname prior the change. So, in reality it doesn't verify if the hostname was changed ( ).

On some backends we cannot change hostname without breaking the setup (at least powerVM and zVM). So we might need to limit scope of test to qemu.

Running the module on xen hvm, where original hostname is not 'susetest', fails (
Running the module on x86, with different $hostname works (new needle needed for that to work) (

Acceptance criteria:

  • Change the code of yast2_lan so that the hostname after change is different than before.


#2 Updated by riafarov about 2 years ago

  • Due date set to 2020-06-30
  • Category set to Enhancement to existing tests
  • Target version set to SLE 15 SP2

#3 Updated by riafarov about 2 years ago

  • Description updated (diff)
  • Status changed from New to Workable
  • Estimated time set to 5.00 h

#4 Updated by ybonatakis about 2 years ago

  • Status changed from Workable to In Progress
  • Assignee set to ybonatakis

#5 Updated by ybonatakis about 2 years ago

  • Status changed from In Progress to Feedback

I am about to set this as rejected as i cant see any problem, or reproduce the error above.

I run using HOSTNAME=iob. In such cases, we have just to create a new needle to make the tests work. i think the problem above came from some misuse of the code and not use of the HOSTNAME variable

Is something else that i am missing here? or should i close this ticket

#6 Updated by ybonatakis about 2 years ago

  • Status changed from Feedback to Resolved

The module is fine. To validate that the hostname is able to change there is validation with the
check_etc_hosts_update() in L83. This does not run in our job because it needs to set VALIDATE_ETC_HOSTS variable in the settings.

For xen the problem is different as it described here. But briefly, it is not problem of the module but how the bridged network set the hostname in those machine, making use always the external hostname

Also available in: Atom PDF