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
upgrade to a new release without a relup or rebooting the VM #1581
Conversation
476db21
to
701e896
Compare
This seems interesting, and we would like to discuss it a bit in the team. Could you please provide some more background and use cases for this? Do you think this is a functionality that would be preferred in many cases, compared to the more cumbersome hot upgrade? |
lib/sasl/src/release_handler.erl
Outdated
#release.status, | ||
Releases) of | ||
false -> | ||
lists:keysearch(current, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize that this is copied from another function in this module, but still... if this clause is hit, it will break further down in this function since CurrentRunning
then will be either {value,#release{}}
or false
. If we decide to accept this PR, then please correct both places (or even refactor to avoid the duplicated code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll look at this later today.
I know this is something I would have been using if it existed before all my deploys became containers that are created/deleted for deploys instead of starting a new release next to the current release. For those times that you do deploy the new release to the same node, and you don't need a hot upgrade, it makes sense to not have to do a stop and start of the whole erlang node and to have it be a built in command. |
Still finding this interesting, but could you explain a bit what is the main idea behind using I also think that we must consider what to do if
|
Of course, |
Sorry for the delay. It does set it to permanent before the restart. And seems to work fine. Yea, reboot requires heart but also adds the time of VM startup. But I think the main point would be that even with reboot there still should be a function that reboots to the new release. |
Now I've been testing a bit, but I don't really get it to work. The release_handler does see the second version as permanent after the restart, but the code actually running is still the first version, and init still sees the first version's sys.config and start.boot:
And also the other questions from this comment still apply... |
@tsloughter Anything new on this? Or should I close it? |
Na, I'll close this. |
This function provides a way to go to a new release in the case you want to just do a restart and not a live upgrade but without rebooting the VM or requiring any appups or relup.
It includes the patch from #1580 as well because it partially needs it (at least to work smoothly when using release tarballs generated by relx) but I consider #1580 important on its own and separate as well.