Bugzilla – Bug 1217317
yast2 migration failed for undefined method `friendly_name' for nil:NilClass for sles15sp3
Last modified: 2024-01-15 08:30:04 UTC
## description When we do migration from sles15sp3 to sles15sp6 by yast2 migration, we 1) boot from an installed sles15sp3 with related addons installed 2) reboot to do patch sle 3) run the yast2 migration 4) it rcomplained with following error message: ~~~ 64608:2023-11-20 02:25:37 <3> susetest(13162) [Ruby] ui/wizard_client.rb(rescue in run):57 Internal error: undefined method `friendly_name' for nil:NilClass 64614:2023-11-20 02:25:37 <0> susetest(13162) [Ruby] binary/Yast.cc(ycp_module_call_ycp_function):401 Append parameter `HBox (`HSpacing (1), `VBox (`VSpacing (0.2), `VBox (`VSpacing (0.4), `Left (`Heading ("Error")), `VSpacing (0.2), `MinWidth (60, `Left (`Label (`opt (`autoWrap), "Internal error: undefined method `friendly_name' for nil:NilClass"))), `VSpacing (0.2), `Empty ()), `VSpacing (1), `ButtonBox (`opt (`relaxSanityCheck), `PushButton (`id (`ok), `opt (`key_F10, `okButton), "&OK")), `VSpacing (0.2)), `HSpacing (1)) ~~~ ## Observation openQA test in scenario sle-15-SP6-Migration-from-SLE15-SPx-x86_64-online_sles15sp3_pscc_basesys-srv-ltss-desk_def_full_y@64bit fails in [yast2_migration](https://openqa.suse.de/tests/12849189/modules/yast2_migration/steps/4) ## Test suite description The base test suite is used for job templates defined in YAML documents. It has no settings of its own. ## Reproducible Fails since (at least) Build [39.1](https://openqa.suse.de/tests/12839393) ## Expected result Last good: (unknown) (or more recent) ## Further details Always latest result in this scenario: [latest
Created attachment 870848 [details] yast2log
Created attachment 870849 [details] screenshot
Backtrace: > 2023-11-20 02:25:37 <3> susetest(13162) [Ruby] > ui/wizard_client.rb(rescue in run):55 > Caught error: NoMethodError: "undefined method `friendly_name' for nil:NilClass" > . > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:185:in `base_product_text_for' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:160:in `block in migration_items' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:159:in `map' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:159:in `with_index' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:159:in `migration_items' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:153:in `migration_selection_widget' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:132:in `dialog_content' > /usr/share/YaST2/lib/registration/ui/migration_selection_dialog.rb:64:in `run' > /usr/share/YaST2/lib/registration/ui/migration_repos_workflow.rb:417:in `select_migration_products' > /usr/share/YaST2/lib/registration/ui/migration_repos_workflow.rb:96:in `block in run_sequence' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/builtins.rb:546:in `eval' > /usr/share/YaST2/modules/Sequencer.rb:249:in `WS_run' > /usr/share/YaST2/modules/Sequencer.rb:320:in `block in Run' > /usr/share/YaST2/modules/Sequencer.rb:312:in `loop' > /usr/share/YaST2/modules/Sequencer.rb:312:in `Run' > /usr/share/YaST2/lib/registration/ui/migration_repos_workflow.rb:105:in `run_sequence' > /usr/share/YaST2/lib/registration/ui/wizard_client.rb:51:in `run' > /usr/share/YaST2/lib/registration/ui/wizard_client.rb:41:in `main' > /usr/share/YaST2/clients/migration_repos.rb:17:in `<top (required)>' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:346:in `eval' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:346:in `run_client' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:207:in `call_builtin' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:207:in `call_builtin_wrapper' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:196:in `CallFunction' > /usr/share/YaST2/lib/migration/main_workflow.rb:203:in `repositories' > /usr/share/YaST2/lib/migration/main_workflow.rb:152:in `block in aliases' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/builtins.rb:546:in `eval' > /usr/share/YaST2/modules/Sequencer.rb:249:in `WS_run' > /usr/share/YaST2/modules/Sequencer.rb:320:in `block in Run' > /usr/share/YaST2/modules/Sequencer.rb:312:in `loop' > /usr/share/YaST2/modules/Sequencer.rb:312:in `Run' > /usr/share/YaST2/lib/migration/main_workflow.rb:70:in `run' > /usr/share/YaST2/lib/migration/main_workflow.rb:61:in `run' > /usr/share/YaST2/clients/migration.rb:3:in `<top (required)>' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:346:in `eval' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:346:in `run_client' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:207:in `call_builtin' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:207:in `call_builtin_wrapper' > /usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:196:in `CallFunction' > /usr/lib/YaST2/bin/y2start:60:in `<main>'
Created attachment 870850 [details] Migration part of the y2log Extracted from the full y2logs with y2log-merge y2log-split from https://github.com/shundhammer/y2log-util
The products from y2log: > 2023-11-20 02:25:37 <1> susetest(13162) [Ruby] > registration/registration.rb(migration_products):189 > Received system migrations: > . > #<OpenStruct id=0, > identifier="SLES", > version="15.6", > arch="x86_64", > isbase=true, > friendly_name="SUSE Linux Enterprise Server 15 SP6 x86_64", > ProductLine="", > available=true, > free=false, > recommended=false, > product_type="base", > shortname="SLES15-SP6", > release_stage="alpha">, > . > #<OpenStruct id=0, > identifier="sle-module-basesystem", > version="15.6", > arch="x86_64", > isbase=false, > friendly_name="Basesystem Module 15 SP6 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Basesystem-Module", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-desktop-applications", > version="15.6", > arch="x86_64", > isbase=false, > friendly_name="Desktop Applications Module 15 SP6 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Desktop-Applications-Module", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-server-applications", > version="15.6", > arch="x86_64", > isbase=false, > friendly_name="Server Applications Module 15 SP6 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Server-Applications-Module", > release_stage="released">], > . > #<OpenStruct id=0, > identifier="SLES", > version="15.5", > arch="x86_64", > isbase=true, > friendly_name="SUSE Linux Enterprise Server 15 SP5 x86_64", > ProductLine="", > available=true, > free=false, > recommended=false, > product_type="base", > shortname="SLES15-SP5", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-basesystem", > version="15.5", > arch="x86_64", > isbase=false, > friendly_name="Basesystem Module 15 SP5 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Basesystem-Module", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-desktop-applications", > version="15.5", > arch="x86_64", > isbase=false, > friendly_name="Desktop Applications Module 15 SP5 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Desktop-Applications-Module", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-server-applications", > version="15.5", > arch="x86_64", > isbase=false, > friendly_name="Server Applications Module 15 SP5 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Server-Applications-Module", > release_stage="released">], > . > #<OpenStruct id=0, > identifier="SLES", > version="15.4", > arch="x86_64", > isbase=true, > friendly_name="SUSE Linux Enterprise Server 15 SP4 x86_64", > ProductLine="", > available=true, > free=false, > recommended=false, > product_type="base", > shortname="SLES15-SP4", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-basesystem", > version="15.4", > arch="x86_64", > isbase=false, > friendly_name="Basesystem Module 15 SP4 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Basesystem-Module", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-desktop-applications", > version="15.4", > arch="x86_64", > isbase=false, > friendly_name="Desktop Applications Module 15 SP4 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Desktop-Applications-Module", > release_stage="released">, > . > #<OpenStruct id=0, > identifier="sle-module-server-applications", > version="15.4", > arch="x86_64", > isbase=false, > friendly_name="Server Applications Module 15 SP4 x86_64", > ProductLine="", > available=true, > free=true, > recommended=false, > product_type="module", > shortname="Server-Applications-Module", > release_stage="released">
Again since our ancient Bugzilla doesn't even support the most basic editing: Quite obviously, the base product that is used to display in the widget is 'nil'. AFAICS that can only happen here: https://github.com/yast/yast-registration/blob/SLE-15-SP3/src/lib/registration/ui/migration_selection_dialog.rb#L184 > def base_product_text_for(arr) > base_product = arr.find(&:base) > ^^^^^^ > base_product.friendly_name || base_product.short_name || > (base_product.identifier + "-" + base_product.version) > end In the 'master' branch this is https://github.com/yast/yast-registration/blob/master/src/lib/registration/ui/migration_selection_dialog.rb#L184 > def base_product_text_for(arr) > base_product = arr.find(&:isbase) > ^^^^^^^^ > base_product.friendly_name || base_product.short_name || > (base_product.identifier + "-" + base_product.version) > end Which is consistent with the data that we see in comment #5.
"git blame" tells me that this was fixed in the 'master' branch with https://github.com/yast/yast-registration/pull/561 which was the fix for the exact same bug as here: bug #1194989 Back then the assumption was that this changed starting with SLE-15-SP4, but obviously SLE-15-SP3 is also affected.
And BTW this is the fallout of a data format change (!) on the SCC side during the life time of SLE-15 SPx. This wouldn't be so bad if it affected only newer service packs, but as we see here, part of this is being executed while preparing a migration on the old system (here: SLE-15 SP3) before booting into the installation medium of the new system (here: SLE-15 SP6) to migrate to.
From the 'rpm-qa' file of this SLE-15-SP3 y2logs tarball: libsuseconnect-1.4.0~git0.b0f7c25bfdfa-150100.3.9.1 suseconnect-ng-1.4.0~git0.b0f7c25bfdfa-150100.3.9.1 suseconnect-ruby-bindings-1.4.0~git0.b0f7c25bfdfa-150100.3.9.1
Whatever the problem is, I think that this might be an unsupported scenario. I don't have SP6 in hand, but this is SP5 documentation: https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-upgrade-paths.html#sec-upgrade-paths-supported What is says... **Upgrading from SUSE Linux Enterprise Server 15 GA / SP1 / SP2 / SP3** Upgrading from SLES 15 GA, SP1, SP2, or SP3 directly is no longer supported. You need at least SLES 15 SP4 before you can proceed to SLES 15 SP5. If SP3 to SP5 is not supported, then SP3 to SP6 is probably not supported either. Is this scenario requested in some SP6 PRD?
(In reply to Huajian Luo from comment #0) > ## Reproducible > > Fails since (at least) Build [39.1](https://openqa.suse.de/tests/12839393) BTW, this fails with: Test died: command 'rpm -q zypper-migration-plugin' failed at /usr/lib/os-autoinst/testapi.pm line 926. at https://openqa.suse.de/tests/12839393#step/pre_migration/14 so it's probably something else.
I am still confused where version 1.4.0 the suseconnect packages comes from. It doesn't seem to be known in the change log of those packages. From zypper.log from this y2logs tarball: > 2023-11-20 02:09:44 <1> susetest(6257) [zypper++] Summary.cc(readPool):171 > <install> > U_Ts_(19850)libsuseconnect-1.4.0~git0.b0f7c25bfdfa-150100.3.9.1.x86_64 > (SUSE_Linux_Enterprise_Server_LTSS_15_SP3_x86_64:SLE-Product-SLES15-SP3-LTSS-Updates) > . > 2023-11-20 02:09:44 <1> susetest(6257) [zypper++] Summary.cc(readPool):171 > <install> > U_Ts_r(21435)suseconnect-ng-1.4.0~git0.b0f7c25bfdfa-150100.3.9.1.x86_64 > (SUSE_Linux_Enterprise_Server_LTSS_15_SP3_x86_64:SLE-Product-SLES15-SP3-LTSS-Updates) > . > 2023-11-20 02:09:44 <1> susetest(6257) [zypper++] Summary.cc(readPool):171 > <install> > U_Ts_(21436)suseconnect-ruby-bindings-1.4.0~git0.b0f7c25bfdfa-150100.3.9.1.x86_64 > (SUSE_Linux_Enterprise_Server_LTSS_15_SP3_x86_64:SLE-Product-SLES15-SP3-LTSS-Updates) > . > 2023-11-20 02:09:44 <1> susetest(6257) [zypper++] Summary.cc(readPool):171 > <uninstall> > I_TsO(25177)SUSEConnect-0.3.36-150300.20.6.1.x86_64(@System) Version 0.3.36 does have a change log entry, and it was the official version from SUSE:SLE-15-SP3:Update : https://build.suse.de/package/view_file/SUSE:SLE-15-SP3:Update/SUSEConnect/SUSEConnect.changes?expand=1 > ------------------------------------------------------------------- > Wed Jul 27 14:08:54 UTC 2022 - Miquel Sabate Sola <msabate@suse.com> > > - Update to 0.3.36 > - Allow suseconnect-keepalive.service to recognize a configured proxy. (bsc#1200994) > - Remove the `WantedBy` statement from suseconnect-keepalive.service since it's only to be triggered by a systemd timer. > - SUSEConnect will now ensure that the `PROXY_ENABLED` environment variable is honored. > - Write services with ssl_verify=no when using connect with insecure > > --------------------------------------------------------------------
That SLE-Product-SLES15-SP3-LTSS-Updates repo that the 'install' lines in the zypper.log refers to is this AFAICS: https://build.suse.de/project/show/SUSE:Updates:SLE-Product-SLES:15-SP3-LTSS:x86_64 There are 498 patchinfo files. I can't search through all those manually where some suseconnect package might be referred to.
I am also very concerned what happens to customer installations if we should backport imo's patch that does a giant s/base/isbase/ to all kinds of old versions. And how far back should we do that? SLE-15 GA, SP1, SP2, SP3? Or even SLE-12 SPx? Would it be a problem if they use their own registration proxy?
Tom, please have a look. Maybe there is a very simple explanation to all this, and I just don't see it.
suseconnect-ng (go) was released with SLE15SP4, retiring SUSEConnect (Ruby). It seems that suseconnect-ng has a slight change in the API, that was covered with https://github.com/yast/yast-registration/pull/561 in yast (#base -> #isbase). Recently, we replaced SUSEConnect with suseconnect-ng also on SLE15 SP1,2,3: This was released in conjunction with an updated yast2-registration 4.1.27(SP1)/4.2.48(SP2)/4.3.27(SP3). Looks like that yast2-registration is missing the above patch from SP4. Can you release it on SP1,2,3, requiring suseconnect-ng? We're also in the process of replacing SUSEConnect with suseconnect-ng on SLE12SP5: https://smelt.suse.de/incident/31034/ I guess the patch also needs to go to the yast2-registration of that update.
I see, thanks Thomas for the info! Right now I'm testing the SLE12-SP5 backport, I'll include that fix as well. Stefan (HuHa) will help me with updating the SLE15 backports...
JFTR - from IRC: <lslezak> HuHa: this code is fortunately used in offline migration only, so it could only happen with new QU media
Tom, just to clarify: You wrote that SLE-15 SP1, SP2, SP3 are affected. Are you sure that SLE-15 GA is not also affected? Because we are going to start patching with SP1 and then merge upward to SP2 and SP3. If GA is also affected, we'd start with GA -> SP1 -> SP2 -> SP3.
15GA is not affected, because we did not release suseconnect-ng to it (it is out of LTSS support since Dec 2022).
PR for SLE-15-SP1: https://github.com/yast/yast-registration/pull/591 This will become available as yast2-registration-4.1.28.
IBS maintenance request for SLE-15-SP1: https://build.suse.de/request/show/313363
PR for SLE-15-SP2: https://github.com/yast/yast-registration/pull/592 This will become available as yast2-registration-4.2.49. IBS maintenance request for SLE-15-SP2: https://build.suse.de/request/show/313385
PR for SLE-15-SP3: https://github.com/yast/yast-registration/pull/593 This will become available as yast2-registration-4.3.28.
IBS maintenance request for SLE-15-SP3: https://build.suse.de/request/show/313457
For migration to SLE 15 SP3 we still see the problem as we don't have yet the package, currently in the system is yast2-registration-4.3.27 https://openqa.suse.de/tests/13005332
SUSE-RU-2023:4956-1: An update that has one fix can now be installed. Category: recommended (moderate) Bug References: 1217317 Sources used: SUSE Linux Enterprise Server 15 SP1 (src): yast2-registration-4.1.28-150100.3.20.1 SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): yast2-registration-4.1.28-150100.3.20.1 SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): yast2-registration-4.1.28-150100.3.20.1 SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): yast2-registration-4.1.28-150100.3.20.1 SUSE CaaS Platform 4.0 (src): yast2-registration-4.1.28-150100.3.20.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.
SUSE-RU-2023:4955-1: An update that has one fix can now be installed. Category: recommended (moderate) Bug References: 1217317 Sources used: openSUSE Leap 15.3 (src): yast2-registration-4.3.28-150300.3.20.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): yast2-registration-4.3.28-150300.3.20.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): yast2-registration-4.3.28-150300.3.20.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): yast2-registration-4.3.28-150300.3.20.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): yast2-registration-4.3.28-150300.3.20.1 SUSE Enterprise Storage 7.1 (src): yast2-registration-4.3.28-150300.3.20.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.
SUSE-RU-2023:4960-1: An update that has one fix can now be installed. Category: recommended (moderate) Bug References: 1217317 Sources used: SUSE Linux Enterprise Server 15 SP2 (src): yast2-registration-4.2.49-150200.3.20.1 SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): yast2-registration-4.2.49-150200.3.20.1 SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): yast2-registration-4.2.49-150200.3.20.1 SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): yast2-registration-4.2.49-150200.3.20.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.
SUSE-RU-2024:0101-1: An update that contains one feature and has 22 fixes can now be installed. Category: recommended (moderate) Bug References: 1161891, 1170267, 1174657, 1188646, 1194989, 1195003, 1195220, 1195729, 1196076, 1196326, 1197398, 1198625, 1200803, 1200994, 1202705, 1203341, 1204821, 1207876, 1211588, 1212799, 1214781, 1217317 Jira References: PED-3179 Sources used: SUSE Linux Enterprise High Performance Computing 12 SP5 (src): suseconnect-ng-1.4.0~git0.b0f7c25bfdfa-3.3.8, yast2-registration-3.3.2-3.7.4 SUSE Linux Enterprise Server 12 SP5 (src): suseconnect-ng-1.4.0~git0.b0f7c25bfdfa-3.3.8, yast2-registration-3.3.2-3.7.4 SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): suseconnect-ng-1.4.0~git0.b0f7c25bfdfa-3.3.8, yast2-registration-3.3.2-3.7.4 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.