-
Notifications
You must be signed in to change notification settings - Fork 0
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
The Orion sidecar tale of woe #28
Comments
|
I tried to put a sidecar in front of MongoDB but couldn't get it right. Orion would keep on crashing trying to connect to the DB. Regarding indexes, I tried to use an init container to run a modified version of the Orchestra script in the Orion chart, but that turned out to be a bit of a mission. So yes, glad to know we can do without :-)
ha :-) yes, definitely. It must be config. I've tried everything I could think of but have had no luck so far. |
Sidecar broken wheelTL;DR. There's likely to be a bug in Istio ( This is true when using Istio with our config in ConfigWe have a plain K8s service for Orion with a port name of
and a simple deployment with a matching container port name
We also have Istio config to inject a sidecar and have edited the K8s
Sidecar initThe Orion sidecar container gets prepped by an Istio init container which sets up
Grab the sidecar container ID
Then use it to figure out its PID
and finally make
(more about sidecar injection on the Istio blog.) Another thing to note is that the Envoy proxy gets started with an initial config where you can see a valid definition for our
Observed behaviourIf you try hitting Orion's
you'll get a
You can trace all that with
Istio Envoy containers come with ConsiderationsWhy does the sidecar slam the door closed, i.e. steps 6 and 7 above? Hard to tell---but how rude :-) |
I think I've got to the bottom of this https://archive.istio.io/v1.4/docs/ops/configuration/traffic-management/protocol-selection/ even if not explicitly stated, I don't think you can actually use a port name other than those listed for manual protocol selection. If you do, as we saw earlier, the sidecar shuts down the connection. I see a few problems with this:
I'd argue that from a design standpoint (1) isn't the most fortunate choice, but will let philosophers judge that on its own merits. As for (2), it smells like a bug to me and (3) is something the Istio guys definitely need to improve, IMHO. |
Start-up race conditionsA slow-starting sidecar could stop Orion from completing successfully its start-up procedure. When injecting a sidecar, Istio also adds an init container to set up
We should make it clear to mesh admins that to prevent (1) from happening it's probably a good idea for their K8s configuration to:
Also, Orion logs say DB connections get retried 100 times with a 1000 microsecond delay in between, e.g.
That would mean only |
closed by #36 |
Adding an Istio sidecar to Orion's pod makes the service unreachable. Also it makes it real hard to do any service initialisation through K8s init containers. Sob, sob.
After so much grief trying to figure out why Envoy doesn't play well with Orion, I've decided to park this issue here for now and deal with it some other time to avoid dev paralysis. What's happening is that, with a sidecar, any HTTP call to Orion from another host, be that inside or outside the mesh, fails with a
503
. Requests actually hit the sidecar but then something goes wrong when forwarding to Orion which never actually gets the request and ultimately Envoy returns a503
to the client. Notice that local HTTP calls actually work, i.e. if you log in to the Orion pod and e.g.you'll get the expected response from Orion.
One thing to consider is that deploying Orion without a sidecar may actually be an option. In fact:
The text was updated successfully, but these errors were encountered: