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

shared keyword and queue name defaults. #1077

Closed
petersilva opened this issue May 30, 2024 · 8 comments
Closed

shared keyword and queue name defaults. #1077

petersilva opened this issue May 30, 2024 · 8 comments
Labels
Sugar nice to have features... not super important.

Comments

@petersilva
Copy link
Contributor

So people have queueName in many, many, many configurations only because
the default does not have the hostname in it. but removing the hostname will cause
all cases where queues are shared to be broken, and just move the queueName declaration from one place to another.

Suggestion:

shared flag (default yes)


what is WHERE? 
     if shared is True...
           ... is there a cluster name? say it's ddsr... WHERE=ddsr
              else "shared"
     else:
            WHERE=HOSTNAME
            

queueName defaults to q_${BROKER_USER}_${PROGRAM}.${WHERE}.${CONFIG}

So then people just have shared yes/no in the cluster name.

So this will make it so that the queues never have the random stuff at the end, but
we have a lot less queueName decls.

@petersilva petersilva added the Sugar nice to have features... not super important. label May 30, 2024
@petersilva
Copy link
Contributor Author

@junhu3 @reidsunderland @andreleblanc11 comments?

@petersilva
Copy link
Contributor Author

an alternative might be a string variable "scope"

queue_scope=host|cluster|shared

@reidsunderland
Copy link
Member

I'm not sure if a whole new config options, maybe just define an environment variable?

in default.conf:

queueName q_${BROKER_USER}_${PROGRAM}.${CONFIG}.${QUEUENAME_SUFFIX}

in some configs, we'd set QUEUENAME_SUFFIX to ddsr-shared, and others ${HOSTNAME}.

The other special case is polls, where we have to use ${POST_BROKER_USER} instead of ${BROKER_USER}.

@andreleblanc11
Copy link
Member

We could get ${BROKER_USER} to be defaulted to ${POST_BROKER_USER} for polls when it gets defined?

FYI : I haven't gone through the code. Just throwing ideas in the dark.

@petersilva
Copy link
Contributor Author

in v2, we did a lot of that sort of defaulting stuff... and it got confusing, so have veered away from it in sr3. I'll try digging up some old examples so we can talk it over a bit.

@petersilva
Copy link
Contributor Author

fwiw... @andreleblanc11 the code that implements ... uh.. I'lll call them inferred? defaults is here:

in sr3:

It's in the config.py finalize() routine:

https://github.com/MetPX/sarracenia/blob/development/sarracenia/config.py#L1861-L2014

in v2... it looks like it's in routines called check() ... about a dozen of them.

in v2 we would do things like guess the post_broker from the broker... I don't remember
all the situations where we did that, but it turned out to confuse more than help ...
It's one of the things that sr3 does a lot less of. Didn't find stuff written up though.

@reidsunderland
Copy link
Member

Did this just get resolved with #1128?

@petersilva
Copy link
Contributor Author

yeah... you're right... this is the same problem ... resolved by the above bug solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sugar nice to have features... not super important.
Projects
None yet
Development

No branches or pull requests

3 participants