-
Notifications
You must be signed in to change notification settings - Fork 159
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
ziti router run error with new release 0.27.3 #993
Comments
The value of env var |
The full command line was |
Providing a writeable directory seems to have appeased bash-4.4$ ls -ld /etc/ziti/endpoints/
drwxrwxrwx 2 root root 4096 Feb 3 18:08 /etc/ziti/endpoints/ |
This file is how routers will keep track changing nodes in an HA cluster. We probably don't need to create it in a non-HA mode. Let me look into it |
Is the container read-only? The config file itself can be updated if the controller is advertising a new address even in non-HA mode |
Right, the config and identities are mounted read-only from Kubernetes resources. This allows their data to be declared by Helm. I can add a storage dependency, but it would be good to characterize the storage in terms of capacity, durability, IO. It sounds like As for the writeable router config file, I'm not sure how to handle that. It doesn't fit into the MO of declarative config mgmt. We can brainstorm on it if you like. There's a Kubernetes way but maybe it needs to be a configurable behavior. Will the router FATAL error if it can't clobber its own config file? |
I would like to understand the purpose of the address update event you mentioned. This allows the router control plane to declare a new router advertisement, or is this to allow the router control plane to communicate a change of its endpoint address to the router? I strongly suspect it is the latter and is intended to facilitate a change of the global domain name of the router control plane endpoint. Is this event that needs to be persisted as a router configuration change representative of a broader category of events, or is it more of an anomaly? If it's a one-off, then it might make more sense for the Kubernetes users to think about this problem in terms of tightly-coupled Ziti controller+Ziti router configs instead of handling Ziti control plane events. An example of such a coupled configuration is Helm umbrella chart that would deploy both controller and router at the same time with the same values. In that scenario, the only way to change the controller's advertised address is to change the value that is consumed by both controller and router, and allow Kubernetes to propagate the change. Here's a sketch of a design to minimally change the router while adding a Kubernetes Controller process to handle the router's events that need to be persisted as configuration changes. sequenceDiagram
loop Ziti Router ConfigMap Controller control loop
router->>router.yml: read file at startup
ziti ctrl plane->>k8s-ctrl: event: new Ziti controller control plane endpoint
Note right of ziti ctrl plane: ignored by the read-only router
k8s-ctrl->>router.yml: update configmap
end
The ConfigMap Controller could also delete the router pod to begin a new process life cycle to load the updated config, but a frequent reloading or signaling behavior would be less intrusive. |
There's a fix for openziti/fabric#601 which will prevent the endpoints file from being written as long as there are no changes. However, for proper functioning in an HA environment where controllers can come and go, the image will need to allow the endpoints file be created and writable. |
@plorenz That's still doable, and I'd still like to specify the runtime storage needs in terms of durability and capacity, at least. Is a small ephemeral volume sufficient or will the router expect to find state in {config dir}/endpoints file in a subsequent process life cycle, and therefore require persistence across restarts? |
Ideally it would be persistent. The file is only used to persist the information across restarts. |
What is a reasonable capacity for the storage volume where the endpoints file is written? I've written the Kubernetes deployments to default to a 50MiB persistent volume. |
Endpoints file should generally be tiny (under 1k in size). It's only listing controller endpoints. You'd need a crazy number of controllers (or very long dns names) to make that file large. |
I started seeing an error from
ziti router run
with the upgrade to 0.27.3. With the same config I can roll back the binary to 0.27.2 as a workaround.It appears that in the new release
ziti router run
has a new behavior that attempts to open a file namedendpoints
in the same directory as the router's config YAML file. I couldn't find any notes about this in the changelog, and I didn't find any interesting occurrences of "open" or "endpoints" inziti/ziti/router.go
.router config
The text was updated successfully, but these errors were encountered: