-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Verify at least one URL is present for cluster creation #19866
Comments
I can take up this. Could you please assign this to me? |
Sure, thanks @niharrathod |
* Introduced validation 1. at least one valid serviceUrl/serviceUrlTls set 2. at least one valid brokerServiceUrl/brokerServiceUrlTls set
…sent for cluster creation apache#19866 * Introduced validation 1. at least one valid serviceUrl/serviceUrlTls set 2. at least one valid brokerServiceUrl/brokerServiceUrlTls set
@michaeljmarshall : FYI unassigning myself I tried to fix this and raised PR. In-fact actual change is easy and small, But the same change breaks almost all unit test-cases around broker sub-systems. So, overall fix becomes really huge. If anyone looking into this issue and wants help, feel free to DM me. |
Thanks for your work @niharrathod. I didn't realize this requirement would have such wide reaching impact. |
The issue had no activity for 30 days, mark with Stale label. |
@michaeljmarshall Would you consider, starting the verification as an option? Then enable the verification module-by-module |
That way we can minimize change scope. |
I am not sure what the right solution is. Given that it sounds like there is a large diff, it might be more complicated than it is worth. |
The required changes being large, it is daunting IMHO. But I am just saying the verification (what this issue is trying to solve) still seem useful, especially when users need to rush --failing fast will help reduce time wasted. 👍🏻 So, taking this plan further, when pushing through, we can choose either of 2 possible scenarios below. A. Gradual change.
Pros: breaking changes into bits. B. All at onceWe can pick up where #19965 was left off. |
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java Lines 1469 to 1480 in aa7decc
I'm now suspecting the condition of this issue - From the source code it seems we actually tolerate only one of Perhaps we lift this check to checkPropertiesIfPresent and that should not break existing tests. |
Is that so? I will try to apply the changes and verify later today 👍🏻 |
May I ask you what you meant by "lift this check", @tisonkun ? From my perspective, whatever we do, we still need to fix all tests that configures only one of |
@JooHyukKim If you take a closer look at #19866 (comment), it supports fallback to The other use case of pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java Lines 239 to 245 in aa7decc
The requirement is checked in place. So...I must say here we have a series of config problems:
Perhaps we can open a new issue to investigate these issues and see if we can have a clear model.
Theoretically, I agree, while it's already different from the proposal of this issue:
... although, if |
My apologies for the delay, @tisonkun! 🙌 Here is my analysis and proposal in semi-PIP style, referencing #16691, thought it will be easier to understand. Let me know what you think 👍🏻👍🏻 Proposal : Log warning on failed verifcationAnalysis : current Implementation
....with this search result and considering additional checks like using Proposal & Conculsion
I also think a warning is a viable starting option at this point. Like you said, we still do not have a clear model of |
We have a good start point with @JooHyukKim's #20541. There is not yet a consensus on if we want to apply strict rules on these options. We can see how the warnings hint users. Closing as no consensus... If anyone has a proposal for changing the current behavior (I suspect we don't need eagerly), please open a new issue with the details. |
For Pulsar, it's sufficient that one of the 4 urls is present. Pulsar client will use http/https based lookup if the Pulsar binary protocol url is missing. |
Search before asking
Motivation
With #19151 and #19762, we verify that cluster urls are valid. It seems like we could also verify that there is at least one
serviceUrl
/serviceUrlTls
and at least onebrokerServiceUrl
/brokerServiceUrlTls
set.Solution
Update the following code to add a check that some of those variables are set:
pulsar/pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/ClusterDataImpl.java
Lines 412 to 430 in e829672
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: