-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Weak regex for volume port Fact #33
Comments
Can you provide an example brick name that isn't working correctly? |
If I test with 'gluster volume status brick_name', the complete URL (FQDN and brick name) can in some of my environments be 55 characters long. That leads to a new line in the bash table format. If the Ruby code for the fact depends on the same formatting then the regex can't handle it. |
@tux-o-matic could you give an example of it failing? Also, this comes close to https://bugzilla.redhat.com/show_bug.cgi?id=1033369, although unrelated. |
@jyaworski "close but unrelated", it's a bug like millions of others about string length, not even related to Gluster. I'm not big on Ruby regex so it's hard for me to say how it could handle line return when a brick name is too long. Taking an example from RedHat's doc # 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 Here you'll the brick URL fits nicely in one line, but add a longer path or a FQDN and the shell table will force a line return to respect the cell's character width. |
The regex used to feed the volume port Fact can't always parse completely the output of the 'gluster volume status' command.
gluster.rb L 48
I suspect that it might happen when the brick name is long enough to be formatted into two lines.
The end result is an empty Fact in Puppet
The text was updated successfully, but these errors were encountered: