Package postinst always fail on first install when using systemd
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | openhpi (Debian) |
Fix Released
|
Unknown
|
||
| | openhpi (Ubuntu) |
High
|
Scott Moser | ||
| | Vivid |
High
|
Scott Moser | ||
Bug Description
This happened when I did "apt-get install libopenhpi-dev"
ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: openhpid 2.14.1-1.3ubuntu2
ProcVersionSign
Uname: Linux 3.19.0-26-generic x86_64
NonfreeKernelMo
ApportVersion: 2.17.2-0ubuntu1.3
Architecture: amd64
Date: Tue Aug 25 12:13:47 2015
DuplicateSignature: package:
ErrorMessage: underprocessen installerade post-installati
InstallationDate: Installed on 2014-12-14 (253 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
RelatedPackageV
dpkg 1.17.25ubuntu1
apt 1.0.9.7ubuntu4.1
SourcePackage: openhpi
Title: package openhpid 2.14.1-1.3ubuntu2 failed to install/upgrade: underprocessen installerade post-installati
UpgradeStatus: Upgraded to vivid on 2015-04-24 (122 days ago)
| Anders Widell (awl-v) wrote : | #1 |
| tags: | removed: need-duplicate-check |
| Robie Basak (racb) wrote : | #2 |
| summary: |
- package openhpid 2.14.1-1.3ubuntu2 failed to install/upgrade: - underprocessen installerade post-installation-skript gav felkod 1 + Package postinst always fail on first install when using systemd |
| tags: | added: systemd-boot |
| Changed in openhpi (Ubuntu): | |
| importance: | Undecided → High |
| Launchpad Janitor (janitor) wrote : | #3 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in openhpi (Ubuntu): | |
| status: | New → Confirmed |
| tags: | added: bitesize |
| Changed in openhpi (Debian): | |
| status: | Unknown → New |
| Changed in openhpi (Ubuntu): | |
| assignee: | nobody → Jon Grimm (jgrimm) |
| Robie Basak (racb) wrote : | #4 |
Bug 1479661 may be a duplicate of this.
| tags: | added: openstack uosci |
| Changed in openhpi (Ubuntu): | |
| assignee: | Jon Grimm (jgrimm) → nobody |
| Changed in openhpi (Ubuntu): | |
| assignee: | nobody → Scott Moser (smoser) |
| Scott Moser (smoser) wrote : | #5 |
Fedora added a very basic systemd job at:
http://
Thats not much help, as that just moves the failure to a native systemd job.
openhpid exits 8 (SA_ERR_HPI_ERROR) when 'OPENHPI_
That might seem helpful, but it can also exit that on other conditions such as 'err("Could not create first domain!")'.
it seems like we either need to:
a.) not try to start and disable the service based on some reading of the conf file (if it has 'OPENHPI_
b.) patch source to exit some specific value on "unconfigured" and do not consider that fail
Anyone have any suggestions?
| Martin Pitt (pitti) wrote : | #6 |
This might be a case of dh_installinit --no-start, to avoid trying to start the service on installation? Alternatively, if the daemon exits with a special code when it is unconfigured, the unit could grow a SuccessExitStat
| Martin Pitt (pitti) wrote : | #7 |
Note that there are also a bunch of Condition*= which you could add to a unit (man systemd.unit), but it seems the config file is already there, so you can't do something like ConditionPathEx
| Martin Pitt (pitti) wrote : | #8 |
Third option: Use dh_installinit --error-
| Scott Moser (smoser) wrote : | #9 |
summary: by adding a systemd openhpid.service file we have parity with previous upstart behavior
== details ==
I've found that installing a systemd service file fixes the problem, and have uploaded the fix to wily.
The designed behavior of openhpi is to exit 8 unless the user edits /etc/openhpi/
OPENHPI_
(sudo sed -i 's,^OPENHPI_
The '/etc/init.
When init changed to systemd, systemd-
So, we ended up with a possibly more correct behavior that caused installation failure.
The interesting thing is that adding the openhpid.service file actually changes the behavior so that the install now succeeds although the service exits non-zero.
The result is that we now act as we did before:
* fresh installation of openhpid succeeds
* 'service openhpid status' immediately after clean install will show the service failed to start.
| Launchpad Janitor (janitor) wrote : | #10 |
This bug was fixed in the package openhpi - 2.14.1-1.4ubuntu1
---------------
openhpi (2.14.1-1.4ubuntu1) wily; urgency=medium
* sync with debian.
* remaining changes:
- debian/
-- Scott Moser <email address hidden> Tue, 29 Sep 2015 14:55:06 +0000
| Changed in openhpi (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Changed in openhpi (Ubuntu Vivid): | |
| assignee: | nobody → Scott Moser (smoser) |
| importance: | Undecided → High |
| status: | New → Confirmed |
Hello Anders, or anyone else affected,
Accepted openhpi into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in openhpi (Ubuntu Vivid): | |
| status: | Confirmed → Fix Committed |
| tags: | added: verification-needed |
| Ryan Beisner (1chb1n) wrote : | #13 |
Checked again with 2.14.1-1.3ubuntu2.1 from vivid-proposed. While I've not done any functional testing against openhpid itself, apt and dpkg now exit cleanly, whereas they did not @ ubuntu2.
ubuntu@
openhpid:
Installed: (none)
Candidate: 2.14.1-1.3ubuntu2
Version table:
2.
400 http://
100 /var/lib/
2.
500 http://
ubuntu@
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '2.14.1-
The following NEW packages will be installed:
openhpid
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/103 kB of archives.
After this operation, 457 kB of additional disk space will be used.
Selecting previously unselected package openhpid.
(Reading database ... 68000 files and directories currently installed.)
Preparing to unpack .../openhpid_
Unpacking openhpid (2.14.1-
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (219-7ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up openhpid (2.14.1-
ubuntu@
0
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #14 |
This bug was fixed in the package openhpi - 2.14.1-1.3ubuntu2.1
---------------
openhpi (2.14.1-
* debian/
-- Scott Moser <email address hidden> Thu, 01 Oct 2015 13:52:13 -0400
| Changed in openhpi (Ubuntu Vivid): | |
| status: | Fix Committed → Fix Released |
The verification of the Stable Release Update for openhpi has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Changed in openhpi (Debian): | |
| status: | New → Fix Released |
| no longer affects: | hacluster (Juju Charms Collection) |


Thank you for taking the time to report this bug and helping to make Ubuntu better.
It looks like openhpid is not expected to work until it is configured. The package ships OPENHPI_ UNCONFIGURED = "YES" in /etc/openhpi/ openhpi. conf. This causes a maintainer script failure on first install of the package. I think this has probably happened since the systemd switch and that the previous Sys V init script was probably just a noop.
To fix this problem, you should adjust /etc/openhpi/ openhpi. conf to your needs and then run "sudo dpkg --configure -a" to restart the daemon and fix the package installation.
So this bug is part user error since /etc/openhpi/ openhpi. conf needs configuring manually, but also part packaging bug because the package will never install successfully the first time.