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

Commandline switch -s/-single does not seem to have any effect #27

Open
rsommer opened this issue Sep 18, 2017 · 10 comments
Open

Commandline switch -s/-single does not seem to have any effect #27

rsommer opened this issue Sep 18, 2017 · 10 comments

Comments

@rsommer
Copy link

rsommer commented Sep 18, 2017

While integrating some monitoring checks using buckytools I encountered that the -s/-single flag does not seem to restrict for example 'inconsistent' to just a single host as advertised in the help text. Am I missing something from the documentation or did I just hit a bug? I'm currently using buckytools 0.3.2.

To reproduce, just create some empty bogus whisper files on the wrong host(s) and call bucky inconsistent -s. I tried various combinations but from a quick look at the code I can not find a place where the command line flag is actually read and handled except for the restore command. The SetupSingle method is called from rebalance, inconsistent etc. and the help text states that these operations can also be restricted to a single host.

@deniszh
Copy link
Contributor

deniszh commented Sep 18, 2017

Hi @rsommer,
I'm wondering what's expected behaviour of bucky inconsistent -s should be?
Report inconsistency on single host only?
I'm using -single for non-standard rebalance operations, e.g. copy all metrics from one host to another:

user@host002 # bucky rebalance  -no-delete -w 4 -single host001:4242

@rsommer
Copy link
Author

rsommer commented Sep 18, 2017

The specific usecase on my side is that I want to implement monitoring checks bound to the single hosts of the cluster so that every host just reports back wrong metrics on itself.
If this is no intended behaviour the help text for operations not supporting single host mode should not advertise the flag.
I added handling of the flag and could issue a pull request or just keep it for myself if the intended behaviour is as it is now.

@deniszh
Copy link
Contributor

deniszh commented Sep 18, 2017

I'm not an author of bucky, just a curious user, was wondering about usecase here. Looks pretty valid to me.

@rsommer
Copy link
Author

rsommer commented Sep 18, 2017

@deniszh I'm wondering about your example from above: the only command where the SingleHost-flag is actually evaluated is in restore.go. If I do a dry run of a rebalance using -s/-single all metrics are processed nervertheless. Which version of buckytools are you using?

@deniszh
Copy link
Contributor

deniszh commented Sep 18, 2017 via email

@jjneely
Copy link
Owner

jjneely commented Sep 18, 2017

Hey, I'm totally accepting PRs. :-)

@dcharleston
Copy link

@deniszh I don't see any history of the -s flag ever functioning for rebalance, do you have uncommitted changes on your older fork for that?

@rsommer I'd be interested in your handling of the single host though my use case is basically what deniszh does with the rebalance command. Do you have a PR or commit I can look at?

@deniszh
Copy link
Contributor

deniszh commented Dec 9, 2018

@dcharleston: I did nothing for rebalance , it was just working for me out of the box.
I’m not actively using buckytools anymore, but you can check this fork for some additions and patches - https://github.com/go-graphite/buckytools

@dcharleston
Copy link

@deniszh Thanks, i'm curious to know what you're using now?

I still fail to see where the actual logic is that calls SingleHost function in rebalance.go is unless there is some go magic I don't understand, which may very well be the case.

@deniszh
Copy link
Contributor

deniszh commented Dec 12, 2018

@dcharleston : TBH I completely forgot buckytools code. For me, command above bucky rebalance -no-delete -w 4 -single host001:4242 just copy all files from to host001 to current host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants