-
Notifications
You must be signed in to change notification settings - Fork 202
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
Dapr ignore schedule-host-address #1503
Comments
The scheduler-host-address argument accepts "" however will be rewritten to localhost which is why it cannot be disabled at present when running in self-hosted mode unless you kick-off daprd without any scheduler-host-address(es) https://github.com/dapr/cli/blob/16cc1d1b59e5864d6eb31111e702add52b646f39/cmd/run.go#L673:L681 This should be changed to match the annotation logic and documented |
@HenrixG Following the Discord conversation and investigation, linking this here for documentation purposes. Discord link The first issue seems to be caused by a special case of Powershell parsing empty strings in a special way, which is different from the standard Command Prompt. dapr run --scheduler-host-address '""' --app-port 5000 -- go run ./app.go
# or
dapr run --scheduler-host-address="" --app-port 5000 -- go run ./app.go
# or
dapr run --scheduler-host-address='' --app-port 5000 -- go run ./app.go For the Command Prompt, using empty double quotes works as expected. dapr run --scheduler-host-address "" --app-port 5000 -- go run ./app.go Here's the small table of what works as empty string in each Windows shell
The second issue, where the dapr runtime tries to connect to the scheduler using docker's address, is happening when running dapr in standalone mode, after dapr runtime connects to the scheduler, scheduler discovers it's internal address and reports it back to the runtime on which it can start watching the jobs. To handle this special case for docker, the new parameter was added to the scheduler to override the address and report back as
|
Another note for Visual Studio users. "Dapr": {
"commandName": "Executable",
"workingDirectory": "$(ProjectDir)",
"executablePath": "dapr",
"commandLineArgs": "run --app-id XXX --dapr-http-port 3500 --dapr-grpc-port 50001 --metrics-port 20000 --app-protocol https --placement-host-address localhost:50000 --scheduler-host-address \"\" --resources-path ../components/ --log-level debug --app-port 32769 --enable-api-logging -- dotnet run ."
} |
Expected Behavior
If I specify the parameter --scheduler-host-address "empty", the sidecar should not periodically query the scheduler.
Second problem:
if I specify --scheduler-host-address localhost:50007, it should connect to IP 127.0.0.1 and not to the DockerImage IP.
Actual Behavior
For a specific sideCar I can't turn off the scheduler (I don't use actors, jobs, workflow) even if I give the parameter
--scheduler-host-address "empty"
--scheduler-host-address ' ' -> (fisrt image)
it always says in the log that it's trying to connect to the scheduler.
second problem:
and when I write localhost:50006 it says in the log the IP of the dockerImage where the scheduler runs. so I can't connect to the sidecar that runs outside of docker.
(second image)
Steps to Reproduce the Problem
in VisualStudio use this launchSettings.json
"Dapr": {
"commandName": "Executable",
"workingDirectory": "$(ProjectDir)",
"executablePath": "dapr",
"commandLineArgs": "run --app-id XXX --dapr-http-port 3500 --dapr-grpc-port 50001 --metrics-port 20000 --app-protocol https --placement-host-address localhost:50000 --scheduler-host-address ' ' --resources-path ../components/ --log-level debug --app-port 12000 --enable-api-logging -- dotnet run ."
}
Release Note
Dapr CLI 1.15.0
Windows 11
DockerDesktop 4.39
RELEASE NOTE:
I discussed this with @WhitWaldo(Innovian) on Discord.
The text was updated successfully, but these errors were encountered: