Bug 1260982 - gdeploy: ENOTEMPTY errors when gdeploy fails
Summary: gdeploy: ENOTEMPTY errors when gdeploy fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gdeploy
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: RHGS 3.1.1
Assignee: Nandaja Varma
QA Contact: Anush Shetty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-08 11:00 UTC by Anush Shetty
Modified: 2016-07-04 01:12 UTC (History)
3 users (show)

Fixed In Version: gdeploy-1.0-10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-05 07:25:54 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1845 0 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.1 update 2015-10-05 11:06:22 UTC

Description Anush Shetty 2015-09-08 11:00:18 UTC
Description of problem: gdeploy fails with an ENOTEMPTY when it fails (eg. error in config file) .

Version-Release number of selected component (if applicable): gdeploy-1.0-9.el6rhs.noarch


How reproducible: Always

Steps to Reproduce:
1. Create a config file for setting up bricks:
 
gdeploy config: gluster.conf

[hosts]
rhshdp03.lab.eng.blr.redhat.com
rhshdp04.lab.eng.blr.redhat.com
rhshdp05.lab.eng.blr.redhat.com
rhshdp06.lab.eng.blr.redhat.com

[devices]
/dev/vdb

[mountpoints]
/gluster1/brick1/

[brick_dirs]
/gluster1/brick1/s1 

[peer]
manage=probe

[volume]
action=create
volname=gluster_vol1
replica=yes
replica_count=2

2. Run gdeploy: gdeploy -c gluster.conf

Actual results:

Fails with the following message:

# gdeploy -k -c /opt/gluster.conf
/usr/lib/python2.6/site-packages/argparse.py:1575: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead
  """instead""", DeprecationWarning)
Error: brick_dirs should be relative to the mountpoint.
Looks like you have provided an absolute path. Exiting!
Traceback (most recent call last):
  File "/usr/bin/gdeploy", line 130, in <module>
    GlusterDeploy()
  File "/usr/bin/gdeploy", line 47, in __init__
    PlaybookGen(config_file)
  File "/usr/lib/python2.6/site-packages/glusterlib/playbook_gen.py", line 54, in __init__
    }[self.var_file]()
  File "/usr/lib/python2.6/site-packages/glusterlib/playbook_gen.py", line 144, in group_vars_gen
    self.var_file)
  File "/usr/lib/python2.6/site-packages/glusterlib/yaml_writer.py", line 48, in __init__
    self.write_sections()
  File "/usr/lib/python2.6/site-packages/glusterlib/yaml_writer.py", line 70, in write_sections
    self.modify_mountpoints()
  File "/usr/lib/python2.6/site-packages/glusterlib/yaml_writer.py", line 117, in modify_mountpoints
    self.cleanup_and_quit()
  File "/usr/lib/python2.6/site-packages/glusterlib/helpers.py", line 63, in cleanup_and_quit
    os.removedirs(Global.base_dir)
  File "/usr/lib64/python2.6/os.py", line 170, in removedirs
    rmdir(name)
OSError: [Errno 39] Directory not empty: '/tmp/tmpNw_62L'

Comment 2 Nandaja Varma 2015-09-08 12:23:55 UTC
Fixed in commit https://github.com/gluster/gdeploy/commit/63167ac4bd710c18e76bd26ff690254a87171f07

Will be available with next build.

Comment 4 Anush Shetty 2015-09-09 12:15:36 UTC
Verified with gdeploy-1.0-10.el6rhs.noarch

Comment 6 errata-xmlrpc 2015-10-05 07:25:54 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/RHSA-2015-1845.html


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