Bug 1272335

Summary: [Heketi] Not all /etc/fstab enteries are cleaned up after volume delete
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Anush Shetty <ashetty>
Component: heketiAssignee: Luis Pabón <lpabon>
Status: CLOSED ERRATA QA Contact: Anush Shetty <ashetty>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: asrivast, madam, sankarshan
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: heketi-1.0.1-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-01 05:41:17 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: 1260783    

Description Anush Shetty 2015-10-16 07:02:57 UTC
Description of problem: Heketi add entries for bricks in /etc/fstab when volumes are created. Not all entries get cleaned up when volumes are deleted.


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


How reproducible: Always


Steps to Reproduce:
1. Run heketi server client[1]
2. Once the cluster is created, create volume: ./heketi-cli volume create -size=100
3. Delete the volume 

Actual results:

When volumes are created:

#
# /etc/fstab
# Created by anaconda on Wed Oct 14 08:18:47 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=2d981ce7-cc53-46a6-b142-fbd3d8d16606 /                       xfs     defaults        0 0
UUID=daafea2b-5b53-442e-9430-9c7accf842d7 swap                    swap    defaults        0 0
/dev/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_2762a2653f50e3fc7de12ebf8ddbd727 /var/lib/heketi/mounts/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_2762a2653f50e3fc7de12ebf8ddbd727 xfs rw,inode64,noatime,nouuid 1 2
/dev/vg_69fefd71c36d3c7e7df93e44a858e182/brick_1b1cf52d36509f7642b931dcccb432ec /var/lib/heketi/mounts/vg_69fefd71c36d3c7e7df93e44a858e182/brick_1b1cf52d36509f7642b931dcccb432ec xfs rw,inode64,noatime,nouuid 1 2
/dev/vg_69fefd71c36d3c7e7df93e44a858e182/brick_eedd01c169dc77f42c2facff9028a962 /var/lib/heketi/mounts/vg_69fefd71c36d3c7e7df93e44a858e182/brick_eedd01c169dc77f42c2facff9028a962 xfs rw,inode64,noatime,nouuid 1 2
/dev/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_3896ab24f862ab38bcf1572b117edd36 /var/lib/heketi/mounts/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_3896ab24f862ab38bcf1572b117edd36 xfs rw,inode64,noatime,nouuid 1 2
/dev/vg_69fefd71c36d3c7e7df93e44a858e182/brick_bfa4a481d86b72e39322dcbb49b99a9b /var/lib/heketi/mounts/vg_69fefd71c36d3c7e7df93e44a858e182/brick_bfa4a481d86b72e39322dcbb49b99a9b xfs rw,inode64,noatime,nouuid 1 2
/dev/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_2f7ad1030eece297098e05567de30018 /var/lib/heketi/mounts/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_2f7ad1030eece297098e05567de30018 xfs rw,inode64,noatime,nouuid 1 2


After volume deletion:

# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Wed Oct 14 08:18:47 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=2d981ce7-cc53-46a6-b142-fbd3d8d16606 /                       xfs     defaults        0 0
UUID=daafea2b-5b53-442e-9430-9c7accf842d7 swap                    swap    defaults        0 0
/dev/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_3896ab24f862ab38bcf1572b117edd36 /var/lib/heketi/mounts/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_3896ab24f862ab38bcf1572b117edd36 xfs rw,inode64,noatime,nouuid 1 2
/dev/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_2f7ad1030eece297098e05567de30018 /var/lib/heketi/mounts/vg_4fe481713c890d3419b56a62f0a5e2d7/brick_2f7ad1030eece297098e05567de30018 xfs rw,inode64,noatime,nouuid 1 2

Additional info:

[1] config file:

{
    "clusters": [
        {
            "nodes": [
                {
                    "node": {
                        "hostnames": {
                            "manage": [
                                "rhshdp03.lab.eng.blr.redhat.com"
                            ],
                            "storage": [
                                "rhshdp03.lab.eng.blr.redhat.com"
                            ]
                        },
                        "zone": 0
                    },
                    "devices": [
                        "/dev/vdb",
                        "/dev/vdc"
                    ]
                },
                {
                    "node": {
                        "hostnames": {
                            "manage": [
                                "rhshdp04.lab.eng.blr.redhat.com"
                            ],
                            "storage": [
                                "rhshdp04.lab.eng.blr.redhat.com"
                            ]
                        },
                        "zone": 0
                    },
                    "devices": [
                        "/dev/vdb",
                        "/dev/vdc"
                    ]
                }
                
            ]
        }
    ]
}

Comment 2 Luis Pabón 2015-10-16 19:23:59 UTC
Fix has been created and submitted upstream:
https://github.com/heketi/heketi/issues/211

Comment 3 Luis Pabón 2015-10-16 19:24:22 UTC
Should the state be changed to POST or MODIFIED?

Comment 4 Luis Pabón 2015-10-21 14:44:51 UTC
Merged: https://github.com/heketi/heketi/pull/214

Comment 7 Anush Shetty 2015-11-10 09:17:12 UTC
Verified on heketi-1.0.1-1.el7rhgs.x86_64

Comment 9 errata-xmlrpc 2016-03-01 05:41:17 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://rhn.redhat.com/errata/RHBA-2016-0193.html