Bug 27355

Summary: Missing sip.enabled after upgrade to 20.05.x
Product: Koha Reporter: Magnus Enger <magnus>
Component: SIP2Assignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, mtj, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 24340    
Bug Blocks:    

Description Magnus Enger 2021-01-07 08:12:07 UTC
Bug 24340 introduced the file /var/lib/koha/<instance>/sip.enabled to keep track of whether a site has enabled SIP2 or not. But as far as I can tell, it did not do anything to create this file for existing sites that already had SIP2 enabled and running. 

After upgrading from 19.11.x to 20.05.06 "sudo koha-list --sip" tells me I have no sites with SIP2 enabled, but there should be 5 of them on the server in question. I also get this:

$ sudo koha-sip --status mykoha
[FAIL] SIP server not running for mykoha: failed!

This is true. 

$ sudo koha-sip --start mykoha
SIP is disabled, or you do not have a SIPconfig.xml file.

SIP2 should be enabled, and there is a SIPconfig.xml present for the site in question. 

One solution is to do this:

$ sudo touch /var/lib/koha/mykoha/sip.enabled

And then this works:

$ sudo koha-sip --start mykoha
Comment 1 Jonathan Druart 2021-01-07 14:00:43 UTC
Tomas, Mason, any ideas on how we could fix that?
Comment 2 Tomás Cohen Arazi 2021-02-09 15:50:48 UTC
Do we have a way to know what version are we upgrading from inside koha-common.postinst?

Because the new behavior is that disabling means removing the file. So we need to detect upgrades from =<19.11 to fix this automatically on upgrade.

Mason?