Bug 1433614

Summary: cns-deploy fails in case there are "dos" partition signature on devices dedicated for bricks in topology file
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Elvir Kuric <ekuric>
Component: heketiAssignee: Niels de Vos <ndevos>
Status: CLOSED ERRATA QA Contact: Ashmitha Ambastha <asambast>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: aos-bugs, hchiramm, jarrpa, kramdoss, madam, ndevos, pprakash, rcyriac, rhs-bugs, rreddy, rtalur, storage-qa-internal
Target Milestone: ---   
Target Release: CNS 3.10   
Hardware: x86_64   
OS: Linux   
Whiteboard: aos-scalability-35
Fixed In Version: heketi-6.0.0-14.el7rhgs Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-12 09:22:12 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:    
Bug Blocks: 1568861    

Description Elvir Kuric 2017-03-18 19:52:06 UTC
Description of problem:

if in topology file device specified for brick has "dos" signature, cns-deploy will never finish due to that. 

Version-Release number of selected component (if applicable):

cns-deploy-3.1.0-14.el7rhgs.x86_64

How reproducible:

always 

Steps to Reproduce:
1. try to create cns cluster using devices with "dos" signature on them 

Actual results:
cns-deploy hangs and never gets back

Expected results:
cns-deploy to finish. 

Inside pod there is run below command to create physical volume :  

# pvcreate --metadatasize=128M --dataalignment=256K /dev/sde 

if this very same command is executed on device with "dos" signature it will report back 

# pvcreate --metadatasize=128M --dataalignment=256K /dev/sde 
WARNING: dos signature detected on /dev/sde at offset 510. Wipe it? [y/n]: 

so it will wait, and will not by default delete "dos" signature. 

solution : 

- either run wipefs -a /dev/sdd 
- pvcreate -fy /dev/sdd 

I think it is fine to use these destructive commands as devices will be specified in topology file and it is responsibility of topology.json creator / owner to ensure it is correct. 

Additional info:
NA

Comment 2 Raghavendra Talur 2017-03-31 16:09:38 UTC
In my opinion, we should not force erase a disk with existing partition, but I agree that the command to error out and exit. Will work on this next release.

Comment 4 Raghavendra Talur 2017-06-12 10:58:20 UTC
We might be able to fix this using the feature in https://github.com/kubernetes/kubernetes/pull/33366 . Should experiment.

Comment 5 Raghavendra Talur 2017-07-25 12:41:24 UTC
https://github.com/heketi/heketi/pull/778

Comment 6 Michael Adam 2017-08-16 15:07:25 UTC
patch merged upstream.

Comment 11 Niels de Vos 2018-05-09 13:36:55 UTC
This bugs has been sent to heketi-devel for further discussion. We may still be able to take this in for cns-3.10 if there is a quick agreement.

http://lists.gluster.org/pipermail/heketi-devel/2018-May/000267.html

Comment 12 Niels de Vos 2018-05-15 10:12:39 UTC
There has been an agreement that a --force option would be useful. When passing this option, the data on the device will be destroyed with 'wipefs --all'.

Most likely the option will be called --destroy-existing-data so that users are warned about the potential danger of using it.

Comment 16 Ashmitha Ambastha 2018-07-10 09:28:43 UTC
I've tried to create a CNS cluster using devices with dos signature on them. cns-deploy doesn't hang and continues with the deployment. 
Hence, moving this bug to verified.

Comment 18 errata-xmlrpc 2018-09-12 09:22:12 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-2018:2686