gavid

gavid

Horde (and other dist. super.): Managing module versions

(This question is phrased in an abstract way, because it seems to me to be a general problem. But I can create a small example on request.)

So with Horde, a supervised process can be restarted on any node.

Say I have a cluster with three nodes: A, B and C.

I also have a number of GenServers running using the Foo.V_1 module (all under a Horde.DynamicSupervisor). They each starts up other workers under another Supervisor using the Bar.V_1 module.

But, at no point do I know, if a process has been restarted before and on which node it is currently running.

Say I deploy changes to Node A, creating a Foo.V_2 module that starts up Bar.V_2 workers. I create a GenServer with Foo.V_2 called MyWorker. But, before I can deploy changes to the other two nodes, Node A crashes. So now, the Horde.DynamicSupervisor will restart MyWorker on either Node B or Node C.

The trouble is, neither Node B or Node C has the Foo.V_2 nor Bar.V_2 modules.

If I understand correctly (and please feel free to demonstrate my ignorance), then Horde will be able to use the Foo.V_2 to create the worker, but what about Bar.V_2?

Wouldn’t I now get errors from Foo.V_2 because it is trying to use Bar.V_2 to create workers but Bar.V_2 is undefined?

If I understand the situation correctly, what is the best practice for dealing with this?

First Post!

LostKobrakai

LostKobrakai

A simple solution can be having distinct cookies between deployed versions, so clustering only happens between nodes of the same version.

Where Next?

Popular in Questions Top

bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement