Bug 2058009

Summary: While online reencrypt is started, test-passphrase exits with exit code 1
Product: Red Hat Enterprise Linux 8 Reporter: Ondrej Kozina <okozina>
Component: cryptsetupAssignee: Ondrej Kozina <okozina>
Status: CLOSED ERRATA QA Contact: guazhang <guazhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.5CC: agk, guazhang, jbrassow, okozina, perobins, prajnoha, puiterwijk
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cryptsetup-2.3.7-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2056439 Environment:
Last Closed: 2022-05-10 15:30:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2056439    
Bug Blocks:    

Comment 1 Ondrej Kozina 2022-02-24 09:53:55 UTC
Same issue was backported in RHEL8.

Version-Release number of selected component (if applicable):
cryptsetup-2.3.3-4.el8_5.1
cryptsetup-2.3.7-1.el8

Comment 2 guazhang@redhat.com 2022-02-25 01:06:25 UTC
Hi,

Test pass with fixed package.

cryptsetup-2.3.7-2.el8.x86_64

[root@hp-dl388g8-16 ~]# truncate -s 1G testdisk
[root@hp-dl388g8-16 ~]# cryptsetup luksFormat ./testdisk --force-password

WARNING!
========
This will overwrite data on ./testdisk irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for ./testdisk: 
Verify passphrase: 
[root@hp-dl388g8-16 ~]# $?
-bash: 0: command not found
[root@hp-dl388g8-16 ~]# cryptsetup open --test-passphrase ./testdisk 
Enter passphrase for ./testdisk: 
[root@hp-dl388g8-16 ~]# $?
-bash: 0: command not found
[root@hp-dl388g8-16 ~]# cryptsetup reencrypt ./testdisk --init-only
Enter passphrase for key slot 0: 
[root@hp-dl388g8-16 ~]# $?
-bash: 0: command not found
[root@hp-dl388g8-16 ~]# cryptsetup open --test-passphrase ./testdisk
Enter passphrase for ./testdisk: 
[root@hp-dl388g8-16 ~]# $?
-bash: 0: command not found
[root@hp-dl388g8-16 ~]#

Comment 7 errata-xmlrpc 2022-05-10 15:30:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cryptsetup bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2097