|Re: [p2-dev] pausing a p2 operation?|
Turning off the machine is not a scenario I would focus on, yes, it can be done by serializing the provplan state, but the use cases are not as clear to me as the ones where p2 keeps running but just suspends the provplan execution, waiting for a notification to “resume”…
Well, that's pretty much all the possibilities of pausing :)
In the scenarios you mention I see a big difference between the case where the user is allowed to reboot his machine (or simply reboot eclipse) and the case where he is not.
If he just wants to pause the install (including download) and then resume it without shutting down eclipse, I think the core aspect of the work could be done relatively simply by checking for pause request in various key points of the installer (mainly engine, dl mgr) in a similar way we check for cancellation today. This would be akin to put a sleep in the middle of the code. The engine would be "hung" and the profile being modified still being locked. I'm not quite sure about the implication on the UI since iirc we rely on the default facilities from the workbench.
Building something that supports reboot is a bit more involving depending on how far we want to go. The minimal thing that would need to happen is to be able to serialize the provisioning plan. With this, it would be possible to continue, after reboot, an installation that had been paused during the download phase. I'm drawing a distinction between download and the rest of the install phase because, once the engine has started through the uninstall / unconfigure / install / configure phases, then it becomes harder because one needs to store the state of the install and some of the operations that have occurred may have been intrusive to the system.
So of all the scenarios you described which one is the most important?
On 2011-08-26, at 3:34 AM, Haigermoser, Helmut wrote:
Hi Pascal J
Pausing a download would come in handy if you need to reboot, or go home for the day and want to continue your install the next day.
Pausing an install would also be nice in case the installation has to be halted, maybe you need disk I/O for something else and want to wait with the p2 install until later etc.
Does this clarify the request?
Could you refine what you mean by "pause" and the kind of problem you are trying to address?
I have many ideas on what this could mean but I'd rather not interpret :)
On 2011-08-25, at 11:07 AM, Haigermoser, Helmut wrote:
Ciao @ll J
I’ve seen other installers allow pausing the download phase , and now I’m wondering if we could implement the same for p2 as well…
Let me know what you think, I can easily kick off a bugzilla here but I thought I’d ask first to see if others would find this feature useful…
Implementation-wise I think the p2 core guys should have the biggest say in how this should work, I was hoping for a simple interface using the agent, the prov eventbus or the monitor, like “mymonitor.pause()” or the like…