Bug 1252374 - tests: no cleanup on receiving external signals INT, TERM and HUP
tests: no cleanup on receiving external signals INT, TERM and HUP
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: tests (Show other bugs)
mainline
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Prasanna Kumar Kalever
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-11 05:25 EDT by Prasanna Kumar Kalever
Modified: 2016-06-16 09:30 EDT (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-16 09:30:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Prasanna Kumar Kalever 2015-08-11 05:25:46 EDT
Description of problem:
when executing testcases manually, some time we may want to terminate the
testcase execution in between due to various reasons.
Existing testcase flow has no mechanism to call cleanup before they terminate
abnormally, hence we endup with volume setups and mount points uncleaned.

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

How reproducible:
call Ctrl+C while executing testcases manually and check volume status

Steps to Reproduce:
1. ./tests/sometestcase
2. call ctrl+C
3. gluster vol status/info

Actual results:
Some resident volume info (say patchy)

Expected results:
clean setup

Additional info:
Comment 1 Anand Avati 2015-08-11 05:32:15 EDT
REVIEW: http://review.gluster.org/11882 (tests: call cleanup on receiving external signals INT, TERM and HUP) posted (#1) for review on master by Prasanna Kumar Kalever
Comment 2 Anand Avati 2015-08-13 15:16:46 EDT
COMMIT: http://review.gluster.org/11882 committed in master by Raghavendra Talur (rtalur@redhat.com) 
------
commit db4e3a371c66c400b3cb95d4e7701625bef4ac95
Author: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Date:   Tue Aug 11 13:45:26 2015 +0530

    tests: call cleanup on receiving external signals INT, TERM and HUP
    
    problem:
    when executing testcases manually, some time we may want to terminate the
    testcase execution in between due to various reasons.
    Existing testcase flow has no mechanism to call cleanup before they terminate
    abnormally, hence we endup with volume setups and mount points uncleaned.
    
    Solution:
    This patch traps such kind of abnormal terminations and calls 'cleanup'
    function soon after they are caught and then terminates the testcases
    with appropriate status..
    
    $ ./tests/basic/mount-nfs-auth.t
    1..87
    =========================
    TEST 1 (line 8): glusterd
    ok 1
    RESULT 1: 0
    =========================
    TEST 2 (line 9): pidof glusterd
    ok 2
    RESULT 2: 0
    =========================
    TEST 3 (line 10): gluster -mode=script --wignore volume info
    No volumes present
    ok 3
    RESULT 3: 0
    ^C
    received external signal --INT--, calling 'cleanup' ...
    
    $ glusterd && gluster vol status
    No volumes present
    
    Change-Id: Ia51a850c356e599b8b789cec22b9bb5e87e1548a
    BUG: 1252374
    Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
    Reviewed-on: http://review.gluster.org/11882
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    Tested-by: NetBSD Build System <jenkins@build.gluster.org>
    Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Comment 3 Niels de Vos 2016-06-16 09:30:14 EDT
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Note You need to log in before you can comment on or make changes to this bug.