Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File "/usr/lib/python2.6/site-packages/salt/modules/glusterfs.py", line 243, in status brick, port, online, pid = line.split()[1:] #25169

Closed
theorb77 opened this issue Jul 6, 2015 · 4 comments
Labels
Bug broken, incorrect, or confusing behavior Execution-Module fixed-pls-verify fix is linked, bug author to confirm fix help-wanted Community help is needed to resolve this P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@theorb77
Copy link

theorb77 commented Jul 6, 2015

If the name of the Brick exceeds a single line, this command breaks because there are no brick,port,online,pid values to split.

You can probably solve this by using libgfapi, but you guys don't seem to use external dependencies.

To clarify: In line 229 of /usr/lib/python2.6/site-packages/salt/modules/glusterfs.py, your command is cmd = 'gluster volume status {0}'.format(name). That gives you a table like this:

# gluster volume status test-volume
Status of volume: test-volume
Gluster process                        Port    Online   Pid
------------------------------------------------------------
Brick arch:/export/rep1                24010   Y       18474
Brick arch:/export/rep2                24011   Y       18479
NFS Server on localhost                38467   Y       18486
Self-heal Daemon on localhost          N/A     Y       18491

On line 240 you check if line.startswith('Brick'):, however, there's limited space for a path, such that the line wraps and port, online, and pid are pushed to a second line. This breaks functionality.

@jfindlay jfindlay added Execution-Module Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels Jul 7, 2015
@jfindlay jfindlay added this to the Approved milestone Jul 7, 2015
@jfindlay jfindlay added the help-wanted Community help is needed to resolve this label Jul 7, 2015
@jfindlay
Copy link
Contributor

jfindlay commented Jul 7, 2015

@theorb77, thanks for the report.

@joejulian
Copy link
Contributor

libgfapi doesn't provide most of the cli information. It's primarily only a posix interface library to the gluster filesystem.

The cli, however, does support xml. Simply add --xml to the command line.

@joejulian
Copy link
Contributor

This should have been fixed by #30075. Can you verify @theorb77?

@jfindlay jfindlay added the fixed-pls-verify fix is linked, bug author to confirm fix label Feb 10, 2016
@rallytime
Copy link
Contributor

This fix is available on the latest release of salt, 2015.8.7. Since we haven't heard anything here, I will close this. If this pops up again, leave a comment and we'll be happy to open this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Execution-Module fixed-pls-verify fix is linked, bug author to confirm fix help-wanted Community help is needed to resolve this P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

4 participants