You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/03 06:33:11 UTC

[GitHub] [pulsar] rdhabalia opened a new pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

rdhabalia opened a new pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804


   ### Motivation
   
   Right now, the broker stores ns-isolation policy regex without validating which will cause failure at runtime. So, perform fast fail validation and validate policy before storing instead of failing at runtime with invalid policy regex.
   
   ```
   23:14:56.710 [pulsar-1-11] WARN  o.a.p.b.l.i.SimpleResourceAllocationPolicies - isPrimaryForAnyNamespace: [{}]
   java.util.regex.PatternSyntaxException: Illegal character range near index 16
   test-broker1[45-46].uswest.com.*
                    ^
           at java.util.regex.Pattern.error(Pattern.java:1955) ~[na:1.8.0_131]
           at java.util.regex.Pattern.range(Pattern.java:2655) ~[na:1.8.0_131]
           at java.util.regex.Pattern.clazz(Pattern.java:2562) ~[na:1.8.0_131]
           at java.util.regex.Pattern.sequence(Pattern.java:2063) ~[na:1.8.0_131]
           at java.util.regex.Pattern.expr(Pattern.java:1996) ~[na:1.8.0_131]
           at java.util.regex.Pattern.compile(Pattern.java:1696) ~[na:1.8.0_131]
           at java.util.regex.Pattern.<init>(Pattern.java:1351) ~[na:1.8.0_131]
           at java.util.regex.Pattern.compile(Pattern.java:1028) ~[na:1.8.0_131]
           at java.util.regex.Pattern.matches(Pattern.java:1133) ~[na:1.8.0_131]
           at java.lang.String.matches(String.java:2121) ~[na:1.8.0_131]
           at org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicyImpl.matchesBrokerRegex(NamespaceIsolationPolicyImpl.java:104)
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804#issuecomment-738193503


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia closed pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

Posted by GitBox <gi...@apache.org>.
rdhabalia closed pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804#issuecomment-740090046


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804#issuecomment-740277750


   The test is failed by this.
   ```
   Error:  testBookKeeperDown(org.apache.pulsar.tests.integration.cli.HealthCheckTest)  Time elapsed: 0.194 s  <<< FAILURE!
   org.apache.pulsar.tests.integration.docker.ContainerExecException: pkill -STOP -f BookieServer failed on e3f20778f4944a0efbec3d50a936bc48e8d43e87f0bfe514dd6e80be937546ec with error code 1
   	at org.apache.pulsar.tests.integration.utils.DockerUtils$2.onComplete(DockerUtils.java:259)
   	at com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec$1.onComplete(AbstrAsyncDockerCmdExec.java:51)
   	at com.github.dockerjava.okhttp.OkHttpInvocationBuilder.lambda$executeAndStream$4(OkHttpInvocationBuilder.java:331)
   	at java.lang.Thread.run(Thread.java:748)
   ```
   
   I remember it already fixed in PR #8791. So could you please rebase to the latest master?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia merged pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

Posted by GitBox <gi...@apache.org>.
rdhabalia merged pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] rdhabalia commented on pull request #8804: [pulsar-broker] validate namespace isolation policy regex before updating

Posted by GitBox <gi...@apache.org>.
rdhabalia commented on pull request #8804:
URL: https://github.com/apache/pulsar/pull/8804#issuecomment-749912950


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org