Bug 1222028

Summary: [Build 71.1] openQA test fails in zypper_migration - During migration, user should can choose option to import GPG pubkey
Product: [openSUSE] PUBLIC SUSE Linux Enterprise Server 15 SP4 Reporter: yutao wang <yuwang>
Component: RegistrationAssignee: SCC Bugs <scc-bugs>
Status: NEW --- QA Contact: Hernan Schmidt <hschmidt>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: x86-64   
OS: SLES 15   
URL: https://openqa.suse.de/tests/13848687/modules/zypper_migration/steps/6
Whiteboard:
Found By: openQA Services Priority:
Business Priority: Blocker: Yes
Marketing QA Status: --- IT Deployment: ---

Description yutao wang 2024-03-27 02:27:27 UTC
Hardware: x86_64
Software: sle15sp4 migration to sle15sp6
**************************************************************************
## Observation

openQA test in scenario sle-15-SP6-Migration-from-SLE15-SPx-aarch64-migr_sles15sp4@aarch64 fails in
[zypper_migration](https://openqa.suse.de/tests/13848687/modules/zypper_migration/steps/6)

## Test suite description
Online migration from sles 15 sp4 with default addons. Migration via zypper. Origin system has system role textmode and default patterns. Additionally, rollback is performed after migration.


## Reproducible

Fails since (at least) Build [64.2](https://openqa.suse.de/tests/13848687)


## Further details

Always latest result in this scenario: [latest](https://openqa.suse.de/tests/latest?arch=aarch64&distri=sle&flavor=Migration-from-SLE15-SPx&machine=aarch64&test=migr_sles15sp4&version=15-SP6)
************************************************************************
Test steps:
1. Installed sles15sp4 with image: autoyast-SLES-15-SP4-aarch64-GM-textmode-updated.qcow2
2. Did zypper patch with full update
3. De-register ltss
4. Use 'zypper migration' to do migration.
During migration, it need import GPG key like:
<message type="info">
New repository or package signing key received:

&lt;gpgkey-info&gt;&lt;repository&gt;SLE-Product-SLES15-SP6-Pool&lt;/repository&gt;&lt;key-name&gt;SUSE Package Signing Key &amp;lt;build@suse.de&amp;gt;&lt;/key-name&gt;&lt;key-fingerprint&gt;7F009157B127B994D5CFBE76F74F09BC3FA1D6CE&lt;/key-fingerprint&gt;&lt;key-algorithm&gt;RSA 4096&lt;/key-algorithm&gt;&lt;key-created time_t=&quot;1674135580&quot; text=&quot;2023-01-19T13:39:40Z&quot;/&gt;&lt;key-expires time_t=&quot;1800279580&quot; text=&quot;2027-01-18T13:39:40Z&quot;/&gt;&lt;rpm-name&gt;gpg-pubkey-3fa1d6ce-63c9481c&lt;/rpm-name&gt;&lt;/gpgkey-info&gt;
</message>
<message type="info">    Note: Signing data enables the recipient to verify that no modifications occurred after the data
    were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system
    and in extreme cases even to a system compromise.</message>
<message type="info">    Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key&apos;s name. If
    you are not sure whether the presented key is authentic, ask the repository provider or check
    their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they
    are using.</message>
<prompt id="14">
<text>Do you want to reject the key, trust temporarily, or trust always?</text>
<option default="1" value="r" desc="Don&apos;t trust the key."/>
<option value="t" desc="Trust the key temporarily."/>
<option value="a" desc="Trust the key and import it into trusted keyring."/>
</prompt>

But it cannot interaction with user. 
It reported 'Migration failed.'  directly.
Refer: https://openqa.suse.de/tests/13848687#step/zypper_migration/6

Expected result:
During migration, if need user import gpg key, it should interaction with user. Let user choose the expected option.
Comment 1 Michael Andres 2024-03-27 08:23:27 UTC
zypper-migration is a plugin just hooked into zypper.
It's AFAIK maintained by the the SCC Team.