Fix Scheduler address in standalone mode#8403
Conversation
Signed-off-by: Anton Troshin <[email protected]>
Fix for multiple scheduler addresses in standalone mode Signed-off-by: Anton Troshin <[email protected]>
|
Hey @antontroshin will this fix #8412 or is that likely a different issue? |
|
The latest CLI RC2 has this issue fixed for quickstarts dapr/cli#1475 |
Signed-off-by: Anton Troshin <[email protected]>
| if len(s.addresses) > 0 && s.mode == modes.StandaloneMode { | ||
| addresses = s.addresses | ||
| } |
There was a problem hiding this comment.
We can't do this- this is going to fail in standalone mode on an existing deployment when the scheduler replicas are scaled up (or down). This is one of the main reasons for this API existing in the first place. Not least, daprd side hacks like these are super fragile and can back us into a corner long term.
If scheduler is listening on localhost and this is inaccessible to the host machine, how is scheduler reachable at all? If it's listening on another interface, then that IP too should be reachable from the host machine and the existing logic in Scheduler to use the right address to broadcast should also work.
If we must must do something here, I think it best to add a --override-broadcast-address CLI flag on the Scheduler side.
CLI will send this flag in standalone mode by default Signed-off-by: Anton Troshin <[email protected]>
…nn' into fix-scheduler-standalone-jobs-conn
Signed-off-by: Anton Troshin <[email protected]>
|
Superseded by #8416 |
Description
This PR attempts to fix the issue in Dapr runtime when used in standalone mode and it tries to connect to the scheduler but receives an error on the internal
WatchHostsrpc call.It returns internal Docker addresses that are inaccessible from the host machine.
In this case, will use supplied addresses via
--scheduler-host-addressargument, or if it is not supplied, use default local address:50006.Issue reference
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: