<div dir="ltr">Can you see if your app_sup:init function is called during the upgrade? It should be called from supervisor:code_change/3 as a result of this instruction: {code_change,up,[{app_sup,[]}]}. What does it return? Unfortunately the real time error reporting here is not very good.<div><br></div><div>Do the code paths look correct after the upgrade?</div><div><br></div><div>Regards</div><div>/siri@otp</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-08 10:04 GMT+02:00 Ameretat Reith <span dir="ltr"><<a href="mailto:ameretat.reith@gmail.com" target="_blank">ameretat.reith@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to add new supervisor `ch_sup` and It's worker `ch` to<br>
an application supervisor `app_sup` with this appup:<br>
<br>
```<br>
{"0.1.3",<br>
[{"0.1.2",<br>
[{add_module, ch},<br>
{add_module, ch_sup},<br>
{update, app_sup, supervisor},<br>
{apply, {supervisor, restart_child, [app_sup, ch_sup]}}<br>
]<br>
}],<br>
[{"0.1.2",<br>
[{apply, {supervisor, terminate_child, [app_sup, ch_sup]}},<br>
{apply, {supervisor, delete_child, [app_sup, ch_sup]}},<br>
{update, app_sup, supervisor},<br>
{delete_module, ch_sup},<br>
{delete_module, ch}<br>
]<br>
}]<br>
}.<br>
```<br>
<br>
And this relup generated by systools:make_relup:<br>
<br>
```<br>
{"0.0.3",<br>
[{"0.0.2",[],<br>
[{load_object_code,{app,"0.1.3",<br>
[ch,ch_sup,app_sup]}},<br>
point_of_no_return,<br>
{load,{ch,brutal_purge,brutal_purge}},<br>
{load,{ch_sup,brutal_purge,brutal_purge}},<br>
{suspend,[app_sup]},<br>
{load,{app_sup,brutal_purge,brutal_purge}},<br>
{code_change,up,[{app_sup,[]}]},<br>
{resume,[app_sup]},<br>
{apply,{supervisor,restart_child,[app_sup,ch_sup]}}]}],<br>
[{"0.0.2",[],<br>
[{load_object_code,{app,"0.1.2",[app_sup]}},<br>
point_of_no_return,<br>
{apply,{supervisor,terminate_child,[app_sup,ch_sup]}},<br>
{apply,{supervisor,delete_child,[app_sup,ch_sup]}},<br>
{suspend,[app_sup]},<br>
{load,{app_sup,brutal_purge,brutal_purge}},<br>
{code_change,down,[{app_sup,[]}]},<br>
{resume,[app_sup]},<br>
{remove,{ch_sup,brutal_purge,brutal_purge}},<br>
{purge,[ch_sup]},<br>
{remove,{ch,brutal_purge,brutal_purge}},<br>
{purge,[ch]}]}]}.<br>
```<br>
<br>
New release installs But app_sup's child spec wont change, neither<br>
ch_sup start until I terminate app_sup and start It again with<br>
`supervisor:restart_child(real_app_sup, app_sup)`. app is an<br>
included application which is put in real_app's supervision tree. I<br>
don't think app as an included application, should be regarded<br>
special here, since I use It just as a supervisor. But seems I'm wrong..<br>
<br>
So, What is the problem? Can I achieve changing app_sup's main<br>
supervisor without restarting It's process?<br>
<br>
Thanks<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>