Bug 1198848 - AutoYaST Online Update Configuration - `category_filter`
AutoYaST Online Update Configuration - `category_filter`
Status: IN_PROGRESS
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: AutoYaST
Leap 15.3
x86-64 openSUSE Leap 15.3
: P5 - None : Minor (vote)
: ---
Assigned To: Imobach Gonzalez Sosa
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-25 17:36 UTC by Georg Pfuetzenreuter
Modified: 2022-09-19 10:24 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
`save_y2logs` bundle from after the installation (1.36 MB, application/x-xz)
2022-04-25 17:36 UTC, Georg Pfuetzenreuter
Details
AutoYaST_OUC_Original_01.png (94.75 KB, image/png)
2022-04-25 17:37 UTC, Georg Pfuetzenreuter
Details
AutoYaST_OUC_Original_02.png (90.88 KB, image/png)
2022-04-25 17:37 UTC, Georg Pfuetzenreuter
Details
AutoYaST_OUC_Original_03.png (73.84 KB, image/png)
2022-04-25 17:38 UTC, Georg Pfuetzenreuter
Details
AutoYaST_OUC_WithWorkaround_01.png (91.85 KB, image/png)
2022-04-25 17:38 UTC, Georg Pfuetzenreuter
Details
AutoYaST_OUC_WithWorkaround_02.png (82.83 KB, image/png)
2022-04-25 17:39 UTC, Georg Pfuetzenreuter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Pfuetzenreuter 2022-04-25 17:36:17 UTC
Created attachment 858411 [details]
`save_y2logs` bundle from after the installation

Hi,

the block

  <online_update_configuration>
    <enable_automatic_online_update config:type="boolean">true</enable_automatic_online_update>
    <skip_interactive_patches config:type="boolean">true</skip_interactive_patches>
    <auto_agree_with_licenses config:type="boolean">false</auto_agree_with_licenses>
    <include_recommends config:type="boolean">false</include_recommends>          
    <use_deltarpm config:type="boolean">true</use_deltarpm>                      
    <update_interval config:type="string">weekly</update_interval>
    <category_filter config:type="list">
      <category>security</category>
      <category>yast</category>
    </category_filter>
  </online_update_configuration>

passes through Jing, but results in two syntax complaints during setup (AutoYaST_OUC_Original_01.png, AutoYaST_OUC_Original_02.png), caused by the `<category_filter>` section.
Whilst the complaints can be skipped, the resulting install will not have category filters applied (AutoYaST_OUC_Original_03.png).
A `save_y2logs` bundle from right after the installation is attached (y2log-ZoCHJo.tar.xz). Please note that my bundle may show some second stage errors which are unrelated to this issue.

Thanks to jreidinger in IRC - who located the issue to be in https://github.com/yast/yast-online-update-configuration/blob/master/src/modules/OnlineUpdateConfiguration.rb#L592 - for providing the following workaround:

    <category_filter>                                                                                        
      <category config:type="list">          
        <category>security</category>
        <category>yast</category>   
      </category>                
    </category_filter> 

Whilst this throws a complaint during setup as well (AutoYaST_OUC_WithWorkaround_01.png), skipping it allows the system to be provisioned with the correct properties applied (AutoYaST_OUC_WithWorkaround_02.png).

Thanks for looking into this - please let me know should you need any further information!
Comment 1 Georg Pfuetzenreuter 2022-04-25 17:37:27 UTC
Created attachment 858412 [details]
AutoYaST_OUC_Original_01.png
Comment 2 Georg Pfuetzenreuter 2022-04-25 17:37:55 UTC
Created attachment 858413 [details]
AutoYaST_OUC_Original_02.png
Comment 3 Georg Pfuetzenreuter 2022-04-25 17:38:29 UTC
Created attachment 858414 [details]
AutoYaST_OUC_Original_03.png
Comment 4 Georg Pfuetzenreuter 2022-04-25 17:38:59 UTC
Created attachment 858415 [details]
AutoYaST_OUC_WithWorkaround_01.png
Comment 5 Georg Pfuetzenreuter 2022-04-25 17:39:20 UTC
Created attachment 858416 [details]
AutoYaST_OUC_WithWorkaround_02.png
Comment 6 Josef Reidinger 2022-04-25 20:16:08 UTC
Hi,
basically I check the code and reason is that rnc does not match what code expects/generate.

in rnc it expects that
    <category_filter config:type="list">
      <category>security</category>
      <category>yast</category>
    </category_filter>

see https://github.com/yast/yast-online-update-configuration/blob/master/src/autoyast-rnc/online_update_configuration.rnc#L28

but in code either import and export it expects that nested levels.
see
https://github.com/yast/yast-online-update-configuration/blob/master/src/modules/OnlineUpdateConfiguration.rb#L592
and
https://github.com/yast/yast-online-update-configuration/blob/master/src/modules/OnlineUpdateConfiguration.rb#L668

Imo: question is how to fix it? for me the rnc format makes more sense, so we should adapt code to export/import from it. But what about already cloned profiles? It is not valid according to schema and if we adapt code it stop working.
Comment 7 Imobach Gonzalez Sosa 2022-05-25 15:38:37 UTC
Hi all,

I agree that the format described by the RNC looks better. Changing the code implies:

1. Supporting both formats when importing (so old profiles might work, although the user might get the validation warning).
2. Exporting in the new format.

The code is rather simple, so it should not be a problem. I will take care.
Comment 8 Imobach Gonzalez Sosa 2022-05-26 10:50:49 UTC
A fix is under review: https://github.com/yast/yast-online-update-configuration/pull/33
Comment 12 Swamp Workflow Management 2022-06-15 19:18:01 UTC
SUSE-RU-2022:2096-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1198848
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.3 (src):    yast2-online-update-configuration-4.3.3-150300.3.3.1
SUSE Linux Enterprise Module for Basesystem 15-SP3 (src):    yast2-online-update-configuration-4.3.3-150300.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 16 Swamp Workflow Management 2022-09-19 10:24:17 UTC
SUSE-RU-2022:3299-1: An update that has 26 recommended fixes and contains one feature can now be installed.

Category: recommended (important)
Bug References: 1195059,1195608,1195894,1196674,1198076,1198848,1199451,1199480,1199554,1199621,1199746,1200155,1200274,1200780,1200803,1200964,1201129,1201185,1201532,1201747,1201924,1201966,1202228,1202479,1202892,1202919
CVE References: 
JIRA References: SLE-22069
Sources used:
openSUSE Leap 15.4 (src):    autoyast2-4.4.39-150400.3.8.1, yast2-4.4.52-150400.3.8.1, yast2-auth-client-4.4.4-150400.3.7.1, yast2-fcoe-client-4.4.3-150400.3.3.1, yast2-firstboot-4.4.9-150400.3.3.1, yast2-installation-4.4.56-150400.3.9.1, yast2-network-4.4.49-150400.3.6.1, yast2-nfs-client-4.4.5-150400.3.4.1, yast2-online-update-configuration-4.4.1-150400.3.10.1, yast2-packager-4.4.32-150400.3.4.1, yast2-schema-default-4.4.14-150400.3.6.2, yast2-schema-micro-4.4.14-150400.3.6.2, yast2-security-4.4.14-150400.3.3.1, yast2-update-4.4.7-150400.3.3.1, yast2-users-4.4.11-150400.3.3.1, yast2-x11-4.4.2-150400.3.3.1
SUSE Linux Enterprise Module for Basesystem 15-SP4 (src):    autoyast2-4.4.39-150400.3.8.1, yast2-4.4.52-150400.3.8.1, yast2-auth-client-4.4.4-150400.3.7.1, yast2-fcoe-client-4.4.3-150400.3.3.1, yast2-firstboot-4.4.9-150400.3.3.1, yast2-installation-4.4.56-150400.3.9.1, yast2-network-4.4.49-150400.3.6.1, yast2-nfs-client-4.4.5-150400.3.4.1, yast2-online-update-configuration-4.4.1-150400.3.10.1, yast2-packager-4.4.32-150400.3.4.1, yast2-schema-default-4.4.14-150400.3.6.2, yast2-security-4.4.14-150400.3.3.1, yast2-update-4.4.7-150400.3.3.1, yast2-users-4.4.11-150400.3.3.1, yast2-x11-4.4.2-150400.3.3.1
SUSE Linux Enterprise Installer 15-SP4 (src):    autoyast2-4.4.39-150400.3.8.1, yast2-4.4.52-150400.3.8.1, yast2-installation-4.4.56-150400.3.9.1, yast2-packager-4.4.32-150400.3.4.1, yast2-users-4.4.11-150400.3.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.