Bug 1224023

Summary: [Build 683.1] openQA test fails in znc - znc service fails to start due to wrong default config file path
Product: [openSUSE] openSUSE Distribution Reporter: Max Lin <mlin>
Component: OtherAssignee: Martin Pluskal <mpluskal>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: david.mulder, dimstar, guillaume.gardet
Version: Leap 15.6   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://openqa.opensuse.org/tests/4166786/modules/znc/steps/48
Whiteboard:
Found By: openQA Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---

Description Max Lin 2024-05-08 01:44:40 UTC
## Observation

znc service fails to start, it seem to be because znc can not find config file, it tries to read config file at the wrong path which config file does not exist.

May 07 13:26:29 susetest systemd[1]: Started ZNC, an advanced IRC bouncer.
May 07 13:26:30 susetest znc[4404]: Checking for list of available modules...
May 07 13:26:30 susetest znc[4404]: Opening config [/var/lib/znc/configs/znc.conf]... [ No such file ]
May 07 13:26:30 susetest znc[4404]: Restart ZNC with the --makeconf option if you wish to create this config.
May 07 13:26:30 susetest znc[4404]: Unrecoverable config error.
May 07 13:26:30 susetest systemd[1]: znc.service: Main process exited, code=exited, status=1/FAILURE
May 07 13:26:30 susetest systemd[1]: znc.service: Failed with result 'exit-code'.

'znc --makeconf' has write configurations to [/var/lib/znc/.znc/configs/znc.conf]

Tumbleweed had the same failure.

openQA test in scenario opensuse-15.6-DVD-x86_64-extra_tests_textmode@64bit fails in
[znc](https://openqa.opensuse.org/tests/4166786/modules/znc/steps/48)

## Test suite description
Maintainer: slindomansilla@suse.de.
Mainly post-installation console extra tests.


## Reproducible

Fails since (at least) Build [683.1](https://openqa.opensuse.org/tests/4166786) (current job)


## Expected result

Last good: [680.1](https://openqa.opensuse.org/tests/4158900) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=x86_64&distri=opensuse&flavor=DVD&machine=64bit&test=extra_tests_textmode&version=15.6)
Comment 1 Dominique Leuenberger 2024-05-23 13:58:51 UTC
further analysis shows, that this is not a product bug, but rather a test bug.

the shipped znc.service contains:

ExecStart=/usr/bin/znc -f --datadir=/var/lib/znc

znc --makeconf, when started without --datadir, falls back to ~/.znc

the test should specify the same datadir as used by the service file to launch znc
Comment 3 Dominique Leuenberger 2024-05-24 07:52:30 UTC
(In reply to Dominique Leuenberger from comment #2)
> https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/19372

merged; test fixed