Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

federation application doesn't take -T option #576

Closed
lukebigum opened this issue Feb 8, 2019 · 2 comments
Closed

federation application doesn't take -T option #576

lukebigum opened this issue Feb 8, 2019 · 2 comments

Comments

@lukebigum
Copy link
Contributor

When trying to trace a message from a federation broker down to an individual choria server, I need to specify a non-default collective to target. I would usually use "-T all" but that argument doesn't exist on the federation application.

Looking at the code I can see that :collective => options[:collective] gets passed into the Ping message but I can't see where that comes from or if it's possible to change?

@ripienaar
Copy link
Collaborator

options[:collective] will be set while preparing the default options and should match default_collective from the config.

Indeed making this configurable would be good.

Unfortunately to magically add this I would get a ton of other baggage from here https://github.com/choria-io/mcorpc-ruby-support/blob/424dbff77b2dc8b64780e5681012f307cffb5b6e/lib/mcollective/optionparser.rb#L128 so I didnt want all that, but in the process lost -T

So I guess the sanest is to add it to the application as a specific application option thus avoiding all that other stuff that would confuse users.

If you want to take a stab at that let me know else I will try get this for next release cycle in a few weeks

@ripienaar
Copy link
Collaborator

something like:

option :collective,
             :arguments => ["-T", "--target COLLECTIVE"],
             :description => "Target messages to a specific sub collective",
             :type => String

and then check configuration[:collective] and use that else use whats there now

ripienaar added a commit to ripienaar/mcollective-choria that referenced this issue Mar 2, 2019
ripienaar added a commit that referenced this issue Mar 2, 2019
(#576) allow federation traces to be restricted to a subcollective
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants