Bug 1206065
| Summary: | [Backup]: Crash seen when 'glusterfind create' command is run on a non-existent volume | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Sweta Anandpara <sanandpa> |
| Component: | glusterfind | Assignee: | Aravinda VK <avishwan> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | bugs <bugs> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | mainline | CC: | avishwan, bugs, gluster-bugs, hchiramm, khiremat, nsathyan |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | glusterfs-3.7.0beta1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-05-14 17:27:02 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: | 1186580 | ||
Found crash logs when I re did the scenario.
Had a brand new setup, and executed the below command:
glusterfind create <sessionName> <non-existent-volume-name>
That is when a crash is seen:
Traceback (most recent call last):
File "/usr/bin/glusterfind", line 17, in <module>
main()
File "/usr/libexec/glusterfs/glusterfind/main.py", line 468, in main
globals()["mode_" + args.mode](session_dir, args)
File "/usr/libexec/glusterfs/glusterfind/main.py", line 442, in mode_list
human_time(last_processed).ljust(25)))
File "/usr/libexec/glusterfs/glusterfind/utils.py", line 54, in human_time
return datetime.fromtimestamp(float(ts)).strftime("%Y-%m-%d %H:%M:%S")
TypeError: float() argument must be a string or a number
Changing the title of this bug. The side-effect of this issue is the one that was originally mentioned - a subdirectory getting created in $SESSION_DIR.
Pasted below are the logs:
[root@dhcp43-48 rhs_upstream3.1]# glusterfind list
[root@dhcp43-48 rhs_upstream3.1]# glusterfind create
usage: glusterfind create [-h] [--debug] [--force] session volume
glusterfind create: error: too few arguments
[root@dhcp43-48 rhs_upstream3.1]# glusterfind create sess nashh
Failed to set volume option build-pgfid on: volume set: failed: Volume nashh does not exist
[root@dhcp43-48 rhs_upstream3.1]# glusterfind list
SESSION VOLUME SESSION TIME
---------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/bin/glusterfind", line 17, in <module>
main()
File "/usr/libexec/glusterfs/glusterfind/main.py", line 468, in main
globals()["mode_" + args.mode](session_dir, args)
File "/usr/libexec/glusterfs/glusterfind/main.py", line 442, in mode_list
human_time(last_processed).ljust(25)))
File "/usr/libexec/glusterfs/glusterfind/utils.py", line 54, in human_time
return datetime.fromtimestamp(float(ts)).strftime("%Y-%m-%d %H:%M:%S")
TypeError: float() argument must be a string or a number
[root@dhcp43-48 rhs_upstream3.1]#
[root@dhcp43-48 rhs_upstream3.1]#
[root@dhcp43-48 rhs_upstream3.1]#
REVIEW: http://review.gluster.org/10072 (tools/glusterfind: Validate Volume name before session Create) posted (#1) for review on master by Aravinda VK (avishwan) REVIEW: http://review.gluster.org/10072 (tools/glusterfind: Validate Volume name before session Create) posted (#2) for review on master by Aravinda VK (avishwan) COMMIT: http://review.gluster.org/10072 committed in master by Venky Shankar (vshankar) ------ commit 0d36d4f6bab80dab2137e4049ee64e7cec180161 Author: Aravinda VK <avishwan> Date: Tue Mar 31 18:26:48 2015 +0530 tools/glusterfind: Validate Volume name before session Create Do not create Session directories if Volume does not exists. Change-Id: I60c9107135c2bed2a7198582267b2328dec7e868 Signed-off-by: Aravinda VK <avishwan> BUG: 1206065 Reviewed-on: http://review.gluster.org/10072 Reviewed-by: Kotresh HR <khiremat> Reviewed-by: Venky Shankar <vshankar> Tested-by: Venky Shankar <vshankar> 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user 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.7.0, please open a new bug report. glusterfs-3.7.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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |
Description of problem: 'Glusterfind create' creates a directory for every session that is created, and a subdirectory under it, with the volume name. When the command is given for a non-existent volume, 'glusterfind create' command fails, as expected. But a sub-directory is created under the session directory with the non-existent-volume name. Version-Release number of selected component (if applicable): Glusterfs upstream nightly glusterfs-server-3.7dev-0.777.git2308c07.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. Have a cluster, with 2*2 gluster vol 'ozone' 2. Run the glusterfind create command with non-existent volume name. glusterfind create <sessionName> <volumeName> glusterfind create session1 oz 3. The command fails. Check at /etc/glusterfs/glusterd.vol as to what is the working directory. Check in that location if a directory with the name 'session1' is created and if that is empty. Actual results: Sub-directory 'oz' is created under $session_dir Expected results: No sub-directory should not be created, if the glusterfind create command has failed. Additional info: [root@dhcp43-140 ~]# gluster v i Volume Name: ozone Type: Distributed-Replicate Volume ID: cd2a06e9-fea0-4e69-98f9-9fd46e915c46 Status: Started Number of Bricks: 2 x 2 = 4 Transport-type: tcp Bricks: Brick1: 10.70.43.140:/rhs/brick1/dd Brick2: 10.70.42.75:/rhs/brick1/dd Brick3: 10.70.43.140:/rhs/brick2/dd Brick4: 10.70.42.75:/rhs/brick2/dd Options Reconfigured: changelog.changelog: on storage.build-pgfid: on [root@dhcp43-140 ~]# [root@dhcp43-140 ~]# glusterfind create session1 ozn Failed to set volume option build-pgfid on: volume set: failed: Volume ozn does not exist [root@dhcp43-140 ~]# [root@dhcp43-140 ~]# glusterfind create session1 ozone [root@dhcp43-140 ~]# cd /etc/glusterfs/ glusterd.vol glusterfs-logrotate gluster-rsyslog-7.2.conf logger.conf.example glusterfs-georep-logrotate gluster-rsyslog-5.8.conf group-virt.example [root@dhcp43-140 ~]# cat /etc/glusterfs/glusterd.vol volume management type mgmt/glusterd option working-directory /var/lib/glusterd option transport-type socket,rdma option transport.socket.keepalive-time 10 option transport.socket.keepalive-interval 2 option transport.socket.read-fail-log off option ping-timeout 30 # option base-port 49152 end-volume [root@dhcp43-140 ~]# [root@dhcp43-140 ~]# cd /var/lib/glusterd/glusterfind/session1/oz ozn/ ozone/ [root@dhcp43-140 ~]# [root@dhcp43-140 ~]# glusterfind create session1 oz Failed to set volume option build-pgfid on: volume set: failed: Volume oz does not exist [root@dhcp43-140 ~]# [root@dhcp43-140 ~]# cd /var/lib/glusterd/glusterfind/session1/oz oz/ ozn/ ozone/ [root@dhcp43-140 ~]#