[Bug 1190245] New: AutoYast rules and classes match against range does not work
https://bugzilla.suse.com/show_bug.cgi?id=1190245 Bug ID: 1190245 Summary: AutoYast rules and classes match against range does not work Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: AutoYaST Assignee: yast2-maintainers@suse.de Reporter: rainer.konig@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 852337 --> https://bugzilla.suse.com/attachment.cgi?id=852337&action=edit YaST2 log from failed attempt Trying out AutoYast Rules & Classes as it is described here: https://documentation.suse.com/sles/15-SP3/html/SLES-all/rulesandclass.html The rules.xml file looks like this: <?xml version="1.0" encoding="UTF-8"?> <autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <rules config:type="list"> <rule> <disksize> <match>/dev/sda 19000</match> <match_type>greater</match_type> </disksize> <result> <profile>profile_a.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> <rule> <disksize> <match>/dev/vda 10000-19000</match> <match_type>range</match_type> </disksize> <result> <profile>profile_b.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> </rules> </autoinstall> Trying to install on KVM with boot param "autoyast=http://myserver/rule-based_example/". AutoYast shows a dialog box that says "no profile found at this location". it Looking at my local apache log I see, that it receives the rules/rules.xml, but then switches to defaults: 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/rules/rules.xml HTTP/1.1" 200 732 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0A80046 HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0A8004 HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0A800 HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0A80 HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0A8 HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0A HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C0 HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/C HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/52540095067E HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/52540095067e HTTP/1.1" 404 984 "-" "-" 192.168.0.70 - - [07/Sep/2021:09:45:21 +0200] "GET /rule-based_example/default HTTP/1.1" 404 984 "-" "-" Looking at the YaST-Log (see attachment) I see that the range match seems to work, but then I see a shell syntax error that probably causes AutoYast to switch to the default rules (as seen in the Apache access.log). 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(block (2 levels) in Read):463 Rule: disksize 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(block (2 levels) in Read):464 Ruledef: $["match":"/dev/vda 10000-49000", "match_type":"range"] 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(block (2 levels) in Read):463 Rule: result 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(block (2 levels) in Read):464 Ruledef: $["continue":false, "profile":"profile_b.xml"] 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(SubVars):406 file: profile_b.xml 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(SubVars):415 var: 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(SubVars):425 val: profile_b.xml 2021-09-07 03:45:17 <3> install(4435) [bash] ShellCommand.cc(shellcommand):78 sh: -c: line 3: syntax error near unexpected token `)' 2021-09-07 03:45:17 <3> install(4435) [bash] ShellCommand.cc(shellcommand):78 sh: -c: line 3: `if ( ) ; then exit 0; else exit 1; fi' 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(verifyrules):400 Bash return: if ( ) ; then exit 0; else exit 1; fi ($["exit":2, "stderr":"sh: -c: line 3: syntax error near unexpected token `)'\nsh: -c: line 3: `if ( ) ; then exit 0; else exit 1; fi'\n", "stdout":""]) ($["disksize_device0":"/dev/vda", "disksize_size0":40960]) 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(Read):640 element2file=$[] 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(GetRules):815 Getting Rules: [] 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/AutoInstallRules.rb(GetRules):858 No files from rules found 2021-09-07 03:45:17 <1> install(4435) [Ruby] modules/ProfileLocation.rb(Process):251 Creating default Rules Changing the rules.xml to <disksize> <match>/dev/vda 10000</match> <match_type>greater</match_type> </disksize> makes the AutoYast installation work. So the conclusion is that matching against a size range is broken because of that syntax error in the shell skript that is invoked. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1190245 Rainer K�nig <rainer.konig@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Found By|--- |openQA -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1190245 https://bugzilla.suse.com/show_bug.cgi?id=1190245#c1 Imobach Gonzalez Sosa <igonzalezsosa@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED CC| |igonzalezsosa@suse.com --- Comment #1 from Imobach Gonzalez Sosa <igonzalezsosa@suse.com> --- Hi Rainer, Thanks for reporting this bug. After checking the code, I would say that "range" matching type never was implemented for disksize (see https://github.com/imobachgs/yast-autoinstallation/blob/899c444fc4cb8fbd848f...). I have checked different code streams and it seems it is missing in all of them. So it is a valid bug that we need to fix. Regards, Imo -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1190245 Imobach Gonzalez Sosa <igonzalezsosa@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://trello.com/c/zlHf91 | |H4/ Assignee|yast2-maintainers@suse.de |yast-internal@suse.de -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com