question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uploading a Pulsar Function with pulsar-admin 2.2.1 to a 2.4.0 broker causes validation failure

See original GitHub issue

Describe the bug If you use the pulsar-admin client bundled with the 2.2.1 client download with a 2.4.0 broker, uploading functions in a way that works with a 2.2.1 broker fails.

To Reproduce Steps to reproduce the behavior: Attempt to upload a function to a 2.4.0 broker with a 2.2.1 client.

Here’s an example function-config.yaml:

tenant: "public"
namespace: "default"
inputs:
  - "persistent://public/default/public-fooBar"
name: "fooBar"
py: "/Users/grant.wu/fooBar.py"
className: "fooBar.FooBar"
autoAck: true
parallelism: 1
processing-guarantees: AT_LEAST_ONCE

Command used for upload looks like this:

$PULSAR_DIR/bin/pulsar-admin functions create --functionConfigFile "$(realpath function-config.yaml)"

where $PULSAR_DIR is the location of the extracted client tarball.

Expected behavior Completes as normal, or some sort of incompatibility message is presented.

Actual behavior Throws this error message:

The cpu allocation for the function must be positive

Desktop (please complete the following information):

  • OS: Reproduced on macOS Mojave (10.14.5). Originally discovered on a Kubernetes (Linux) cluster.

Additional context it seems strange to me that it would behave like this, especially because the documentation implies that CPU is irrelevant for non-docker runtimes.

I have noticed within the Pulsar broker logs that with a 2.4.0 client, the cpu field seems to be defaulted to 1.0.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jerrypengcommented, Aug 2, 2019

@grantwwu I was able to reproduce the issue with 2.2.1 client. I know what is going on. I will create a patch

0reactions
tisonkuncommented, Dec 9, 2022

Since 2.1 ~ 2.4 has been end of life for a while, it’s possible that the default value and null cases are handled properly.

Closed.

If it’s still relevant to the maintained versions, we can always take this patch back for a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pulsar admin CLI
The pulsar-admin tool enables you to manage Pulsar installations, including clusters, brokers, namespaces, tenants, and more. Usage. $ pulsar-admin command.
Read more >
org.apache.pulsar.commits - 2019 August - 2143 messages - MarkMail
[GitHub] [pulsar] jerrypeng commented on issue #4855: Uploading a Pulsar Function with pulsar-admin 2.2.1 to a 2.4.0 broker causes validation failure - ...
Read more >
Search Results - CVE
This issue affects Apache Pulsar Broker and Proxy versions 2.7.0 to 2.7.4; ... CVE-2022-31780, Improper Input Validation vulnerability in HTTP/2 frame ...
Read more >
Multiple vulnerabilities in Apache Pulsar - CyberSecurity Help
The vulnerability allows a remote attacker to perform MitM attack. The vulnerability exists due to Pulsar Brokers and Proxies create an internal ...
Read more >
Mastering Apache Pulsar
Schema Validation. 41. Inter-Broker Communication. 41. Pulsar Functions and Pulsar IO. 42. Apache BookKeeper. 43. Write-Ahead Logging.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found