action #25716
closed[sle][functional][demo][hard] different test-modules fail because of "unexpected token" in the script
Added by nicksinger about 7 years ago. Updated almost 7 years ago.
0%
Description
Observation¶
openQA test in scenario sle-15-Leanos-DVD-x86_64-USBinstall@uefi fails in
zypper_lifecycle
and also
zypper_lifecycle
The script which runs there exits with: "syntax error near unexpected token '('"
Reproducible¶
Looks like that this always happens on USB-Install jobs since every other job succeeds to execute this script.
Sporadic but happens often enough to be suspicious.
Expected result¶
Script can be executed without an unexpected token
Further details¶
Always latest result in this scenario: latest
Updated by okurz about 7 years ago
- Related to action #26112: [sle][functional] test fails in zypper_lifecycle - bash script fails added
Updated by okurz about 7 years ago
latest example: https://openqa.suse.de/tests/1236471#step/zypper_lifecycle/36
Updated by nicksinger about 7 years ago
Most recent examples:
- https://openqa.suse.de/tests/1244530#step/zypper_lifecycle/36
- https://openqa.suse.de/tests/1244490#step/zypper_lifecycle/20
- https://openqa.suse.de/tests/1244506#step/zypper_lifecycle/20
Where it all fails because of the unexpected token '('… However, several other tests can pass successfully and the syntax error is even in another line (for the first job).
Updated by okurz about 7 years ago
- Due date set to 2017-11-22
- Target version set to Milestone 12
Updated by riafarov about 7 years ago
- Subject changed from [sle][functional] test fails in zypper_lifecycle because of "unexpected token" in the script to [sle][functional][hard] test fails in zypper_lifecycle because of "unexpected token" in the script
Issue is sporadic, was able to reproduce it 2 out 50 runs. Now I've added logging to see the script content. As of now I suspect that we do not parse some output properly which is then injected into next script and breaks it. Other possibility is that script_output is not reliable and doesn't write file correctly.
Updated by mgriessmeier about 7 years ago
- Subject changed from [sle][functional][hard] test fails in zypper_lifecycle because of "unexpected token" in the script to [sle][functional][hard] different test-modules fail because of "unexpected token" in the script
not only happening in zypper_lifecycle, also seen here:
https://openqa.suse.de/tests/1251399#step/snapper_create/64
-> renaming ticket
Updated by riafarov about 7 years ago
- Status changed from New to In Progress
@mgriessmeier I believe this is another problem, as zypper_lifecycle we use script_output and execute downloaded script. And here we get some welcome messages which break syntax. I've created separate ticket for that: https://progress.opensuse.org/issues/27823
Updated by riafarov about 7 years ago
- Has duplicate action #27823: [sle][functional][hard] login output interferes with commands execution on ppc64le added
Updated by riafarov about 7 years ago
So, issue is sporadic, welcome messages are in the script for whatever reason, for example here:
echo $(for repo in Welcome to SUSE Linux Enterprise Server 15 Beta2 (x86_64) - Kernel 4.12.14-3.2-default (ttyS0).
eth0: 10.0.2.15 fec0::5970:498e:9c9b:a910
linux-75xp login: SLE-Product-SLES15-Pool SLE-Product-SLES15-Updates ; do zypper -n -x se -t package -i -s -r $repo ; done | grep name= | head -n 1 |sed -e 's|.name="(["])".*|\1|' )
Updated by riafarov about 7 years ago
- Status changed from In Progress to Feedback
All problems occur due to extra output on serial device, to avoid this issue, we parse results according to our expectations:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3909
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3908
For similar issues we should address them in separate tickets, as otherwise this ticket won't ever get resolved if we will get new failures here and there.
Updated by riafarov about 7 years ago
- Subject changed from [sle][functional][hard] different test-modules fail because of "unexpected token" in the script to [sle][functional][demo][hard] different test-modules fail because of "unexpected token" in the script
Updated by okurz about 7 years ago
- Status changed from Feedback to Resolved
haven't seen this issue in the latest build 343.1 . Whenever we find another instability regarding the use of output of script_output we should either push the os-autoinst change or handle it explicitly in the according test module.
Updated by thehejik about 7 years ago
Maybe the problem wasn't fixed completely, please see https://openqa.suse.de/tests/overview?distri=sle&version=12-SP3&build=0040&groupid=128 - it is SLE12 SP3 + RT, it worked correctly 2 weeks ago.
But the problem seems to be different, there is no trace of "unexpected token" in script_output output and the XML from zypper seems to be correct and valid. Details here https://openqa.suse.de/tests/1258673#step/zypper_lifecycle/21
Updated by riafarov about 7 years ago
Ouch, tried to be to picky with regexp, will provide a fix after verification run
Updated by riafarov about 7 years ago
Updated by riafarov almost 7 years ago
- Status changed from Feedback to In Progress
Seems that it didn't work well, as output of this line is not handled properly and script-finished is not parsed on serial: https://openqa.suse.de/tests/1260361#step/zypper_lifecycle/24
script_output 'echo $(for repo in ' . $base_repos . ' ; do zypper -n -x se -t package -i -s -r $repo ; done )'
Updated by pcervinka almost 7 years ago
I can confirm that SLE12 tests are broken by recent change in zypper_lifecycle:
https://openqa.suse.de/tests/1260164#step/zypper_lifecycle/37
https://openqa.suse.de/tests/1260162#step/zypper_lifecycle/37
https://openqa.suse.de/tests/1260167#step/zypper_lifecycle/37
Updated by riafarov almost 7 years ago
- Status changed from In Progress to Feedback
Updated by riafarov almost 7 years ago
- Status changed from Feedback to Resolved
Looks better now:
https://openqa.suse.de/tests/1269043
https://openqa.suse.de/tests/1265312
Updated by michalnowak almost 7 years ago
https://openqa.suse.de/tests/1447743#step/zypper_lifecycle/10
https://openqa.suse.de/tests/1447718#step/zypper_lifecycle/10
Was not happening before. Is this the same problem?
Updated by riafarov almost 7 years ago
@michalnowak, yes, but it got worse because in my improvement I've forgotten to escape $ sign: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/4349 here is the fix. And this is a new ticket where we handle it: https://progress.opensuse.org/issues/29646