Bug 1812299

Summary: Fail NBDE procedure, if the disk partition containing the root filesystem is not encrypted
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: SATHEESARAN <sasundar>
Component: gluster-ansibleAssignee: Gobinda Das <godas>
Status: CLOSED ERRATA QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.5CC: godas, pprakash, rhs-bugs, sabose, sasundar
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.5.z Batch Update 2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: gluster-ansible-infra-1.0.4-6.el8rhgs Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1812298 Environment:
rhhiv, rhel8
Last Closed: 2020-06-16 05:57:29 UTC Type: ---
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:    
Bug Blocks: 1812298    

Description SATHEESARAN 2020-03-11 00:26:56 UTC
Description of problem:
-----------------------
Its a prerequisite to have the root filesystem encrypted ( disk partition containing the root filesystem to be encrypted ). But in some non-regular workflows, customers may try to run the procedure without having the root filesystem encrypted. In those cases, the ansible playbook should care to check whether the root filesystem is encrypted.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
gluster-ansible-infra-1.0.4-5.el8rhgs.noarch.rpm 

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Install RHVH 4.4 without encrypting the root filesystem disk
2. Complete the installation and reboot
3. Run the playbook to setup NBDE for root filesystem disk and other additional disks

Actual results:
---------------
No check was made, it fails when binding to tang server

Expected results:
-----------------
Precheck should be made well before doing any steps for NBDE

Additional info:
----------------
The following command is useful to know whether the partition is encrypted
# cryptsetup isLuks <root-filesystem-disk> 

Example:
--------
In this case, 
/dev/sda2 is encrypted.
/dev/sdb is not encrypted

[root@ ]# cryptsetup isLuks /dev/sda2
[root@ ]# echo $?
0
[root@ ]# cryptsetup isLuks /dev/sdb
[root@ ]# echo $?
1

non-zero value is returned, if its not an encrypted disk

Comment 3 SATHEESARAN 2020-03-21 11:00:32 UTC
Verified with gluster-ansible-infra-1.0.4-6

Precheck is done to make sure that the root disk with root filesystem is LUKS encrypted

Comment 7 errata-xmlrpc 2020-06-16 05:57:29 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, 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/RHEA-2020:2575