[erlang-questions] Dependent module load before supervisor update

Siri Hansen erlangsiri@REDACTED
Thu Feb 11 12:40:28 CET 2016


Hi,

in case you haven't already solved this... you could have a look at the
generated relup file. It contains low level instructions, based on the high
level instruction 'update' given in you appup. The low level instructions
are in short:

suspend
load
code_change
resume

for each supervisor. You could try to re-arrange these to do something like

suspend
suspend
load
load
code_change
code_change
resume
resume

Note - this comes with absolutely no warranty... so be careful!

Regards
/siri

2016-01-08 9:18 GMT+01:00 Ameretat Reith <ameretat.reith@REDACTED>:

> I have appup instructions like this:
> `
> [
>   {load_module, child_sup},
>   {update, parent_sup, supervisor},
>   {update, child_sup, supervisor}
> ]
>
> I'm intending to update two supervisor states but one of them
> (parent_sup) needs upgraded code (a function changed) from child_sup
> module (child_spec:spec) during its init invocation.
>
> So I want upgrade child_sup function interfaces before supervisor
> upgrade of parent_sup and postpone child_spec init call (supervisor
> upgrade) to after parent_sup fully upgraded.
>
> Now the problem is, in above instructions, I cannot use `load_module,
> child_sup` or `load, {child_sup,...,..,}` getting error "Multiply
> defined module: child_sup" and If without doing this, parent_sup won't
> upgrade since It depend on upgraded interface functions from child_sup.
>
> So, Is there a way to control supervisor state upgrade and its module
> loading during release upgrade?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160211/bc8d8cac/attachment.htm>


More information about the erlang-questions mailing list