Closed theoweiss closed 7 years ago
Upgrading from before this change (using old rm scripts) to after this change (new inst scripts) will need the user to start the service manually after, do you think this would be okay?
Tested on Debian 8 (systemd) and on Ubuntu 14 (sysVinit), on both (and only occasionally) openHAB refuses to stop after the upgrade completes with the following error:
Exception in thread "main" java.lang.NullPointerException
at org.apache.karaf.main.Stop.main(Stop.java:58)
On Ubuntu 14 openHAB can't access it's own files while running, after this happens, openHAB refuses to start fully until it is killed and then force reinstalled. Unlike the above error, this happens on every upgrade if the process is already running.
2017-01-09 11:01:25.235 [ERROR] [org.eclipse.smarthome.ui ] - Component descriptor entry 'OSGI-INF/proxy.xml' not found
2017-01-09 11:01:25.235 [ERROR] [org.eclipse.smarthome.ui ] - Component descriptor entry 'OSGI-INF/chartservlet.xml' not found
2017-01-09 11:01:25.236 [ERROR] [org.eclipse.smarthome.ui ] - Component descriptor entry 'OSGI-INF/chartprovider.xml' not found
I'd get the impression that stopping the service before an upgrade is essential.
Thanks for testing this! I will try to use a flag file for IPC between prerm and postinst.
hi @theoweiss @BClark09 , wanted to ensure you saw my comment on https://github.com/openhab/openhab-distro/issues/327 , it appears to me at least that stop does not wait for the process to finish, therefore the "restart" command passed to the init.d scripts doesn't work as it doesn't fully wait for the process to stop before issuing a start.
My thought is we need to add in logic that does not return control from the "/etc/init.d/openhab stop" until the process finishes/stops or a set timeout period in which we would issue a kill command.
I think it's related to this ticket as well, so wanted to bring it up.
Hi @abedwardsw! Apologies, I meant to reply to you in that issue. Thanks for bringing it up here too! It could indeed be related to the extended problem that Ubuntu 14 has with this PR.
Hi @BClark09, thanks for testing. I've removed the line. I've no plans for more updates if all works well.
I couldn't get sysVinit systems to start at all after this change. There's no log currently so can't be sure what's going wrong yet.
Does it start without these changes?
@theoweiss with the recent changes, conflicts need to be resolved, but your solution should still be valid for both sysVinit and systemd.
Thanks. I will rework it as soon as possible.
Hopefully fixes #13. I've not tested these changes yet. @BClark09 could you please review this PR.