https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40901 --- Comment #52 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 198554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198554&action=edit Bug 40901: (follow-up) Fail loudly when koha-sip is enabled without flag file The koha-sip@.service unit gates startup on /var/lib/koha/<inst>/sip.enabled, the per-instance "I want SIP on" flag file. `koha-sip --enable` creates that flag in the same call that runs `systemctl enable`; running a bare `systemctl enable koha-sip@<inst>.service` only flips the systemd half, so the unit ends up enabled-but-refusing-to-start. With ConditionPathExists the failure mode is silent: the unit ends up "enabled" at the systemd level but Active: inactive (dead) with "Condition: start condition failed" and the journal logs aren't a big help figuring out the problem. This patch replaces the silent skip with a loud failure with a helpful message: ERROR: SIP not enabled for instance <inst>. Use: koha-sip --enable <inst> SIPconfig.xml is gated by AssertPathExists if it's missing the unit fails. Either failure path lands the unit in failed state, surfaced by 'systemctl --failed' Test plan: 1) Apply this patch and reload systemd: systemctl daemon-reload 2) Pick a test instance whose SIP is not enabled (no /var/lib/koha/<inst>/sip.enabled file). 3) Reproduce the trap with bare systemctl: systemctl enable koha-sip@<inst>.service systemctl start koha-sip@<inst>.service 4) Note that 'start' exits non-zero and: systemctl status koha-sip@<inst>.service reports Active: failed (Result: exit-code), and the journal contains: "ERROR: SIP not enabled for instance <inst>. Use: koha-sip --enable <inst>"! 5) Recover via the helper: systemctl disable koha-sip@<inst>.service systemctl reset-failed koha-sip@<inst>.service koha-sip --enable <inst> koha-sip --start <inst> 6) Confirm the unit is now active (running), the flag file /var/lib/koha/<inst>/sip.enabled exists, and 'koha-list --enabled --sip' lists the instance! -- You are receiving this mail because: You are watching all bug changes.