[SRU] Please accept hibagent to Xenial and Trusty

Bug #1733353 reported by Balint Reczey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
New
Undecided
Unassigned
Bionic
New
Undecided
Unassigned
hibagent (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

The package is new to the releases and adds EC2 instances ability to hibernate on an external trigger.

[Test Case]

Please perform piuparts-like tests with the package and make sure that hibagent service is not started upon the first install or upgrade. Only running the shipped enable-ec2-spot-hibernation command should enable the service and it should be kept enabled during package updates.

The package needs kernel support and on generic systems the service tries to start but fail with error.

[Regression Potential]

Since the package is new it may not cause regressions by being broken but it should not be enabled by default. Accidentally having it enabled would be considered a regression because it would allow triggering hibernation on a system remotely.

Balint Reczey (rbalint)
affects: apt (Ubuntu) → hibagent (Ubuntu)
Balint Reczey (rbalint)
description: updated
Changed in hibagent (Ubuntu):
status: New → Fix Released
Changed in hibagent (Ubuntu Xenial):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Balint, or anyone else affected,

Accepted hibagent into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/hibagent/1.0.1-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-xenial
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Balint, or anyone else affected,

Accepted hibagent into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/hibagent/1.0.1-0ubuntu1~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

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-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in hibagent (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed-trusty
Revision history for this message
Steve Langasek (vorlon) wrote :

Confirmed that installing the hibagent package from xenial-proposed works on a generic system and does not try to start the service (no postinst), and that it leaves no file debris behind on an install, reinstall, remove, purge (piuparts-like test). This works including if 'enable-ec2-spot-hibernation' is called in the middle.

Marking verified for xenial and releasing.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hibagent - 1.0.1-0ubuntu1~16.04.1

---------------
hibagent (1.0.1-0ubuntu1~16.04.1) xenial; urgency=medium

  * Rebuild for Xenial (LP: #1733353)

hibagent (1.0.1-0ubuntu1) bionic; urgency=medium

  * Build-depend on python3-all, it is needed by pybuild
  * Build-depend on python3-pytest to enable build-time tests
  * Drop debian/conffiles, files under /etc/ are marked as such automatically
  * Update maintainer according to Ubuntu processes
  * Fix typo: hybagent -> hibagent
  * Adjust path of hibagent to let tests be run Debian's way
  * Drop obsolete fields from d/control
  * Install init script properly
  * Fix too long line in Description
  * Add debian/copyright
  * Source /lib/lsb/init-functions in init script
  * Drop bogus Lintian override
  * Depend on lsb-base
  * Add debian/TODO with some items
  * Detect hibernation method and add support for systemd
  * Remove bashism and switch to system's sh in init script
  * Add LSB init info to init script
  * Drop pm-utils dependency
  * Fix enable-ec2-spot-hibernation command and disable starting hibagent by
    default.
  * Switch default packaging branch to ubuntu-devel.
    This makes using Ubuntu-style version numbers in the packaging branch less
    confusing.
  * Fix upstream's version number
  * Drop pyremove which is obsolete for the package

hibagent (1.0.0-1) unstable; urgency=medium

  * Initial release.

 -- Balint Reczey <email address hidden> Mon, 20 Nov 2017 17:21:16 +0100

Changed in hibagent (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for hibagent 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.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Launched a trusty instance on ec2, installed linux-aws kernel, rebooted, enabled proposed and installed hibagent (1.0.1-0ubuntu1~14.04.1). The installation was successful and installed a couple of extra new packages from main.
There are no preinst/postinst scripts thus it is inert by default, e.g. there was no hibagent running.

Executing enable-ec2-spot-hibernation as non-root user, did not ask to elevate permissions via sudo, reported errors "update-rc.d: symlink: Permission denied", and claimed that "Starting hibagent... Ok" and exited normally with error code 0. There are no logs from non-root invocation, logged anywhere, as the initd scripts redirects them to /dev/null.

Looking at enable-ec2-spot-hibernation it uses /bin/bash, instead of default ubuntu shell /bin/sh which should be dash. It appears that the script does not use set -e.

Executing init.d script with set -x, and then executing hibagent as non root prints a traceback, yet the invocation exits zero and no daemon is running:

 Traceback (most recent call last):
  File "/usr/bin/hibagent", line 592, in <module>
    main()
  File "/usr/bin/hibagent", line 577, in main
    daemonize(args.pidfile)
  File "/usr/bin/hibagent", line 361, in daemonize
    with open(pidfile, "w+") as fl:
PermissionError: [Errno 13] Permission denied: '/var/run/hibagent.pid'

When daemon fails to daemonize due to lack of permissions, it should not return zero exit status code, as initd script misleadingly reports "Ok" instead of "Failed to start".

Invoking $ sudo enable-ec2-spot-hibernation, has better results. rc.d symlinks get actually installed and service hibagent status actually reports the daemon as running, with pidfile matching the script invoked.

It would have been nicer to use /run/hibagent.pid, instead of the legacy /var/run prefix.

Normal daemon operation appears to log into syslog.

Both init.d script and enable-ec2-spot-hibernation commands should check for root permissions, and bail out asking to use sudo.

tags: added: verification-done verification-done-trusty
removed: verification-needed verification-needed-trusty
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Releasing this as is. The issues you have pointed out are valid, please fill in a new bug for those and we'll be asking the maintainer to fix them with the next upload if possible.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hibagent - 1.0.1-0ubuntu1~14.04.1

---------------
hibagent (1.0.1-0ubuntu1~14.04.1) trusty; urgency=medium

  * Rebuild for Trusty (LP: #1733353)
  * Depend on pm-utils
  * Don't apply obsolete fix-path-of-hibagent-in-tests.patch
  * Let tests fail during the build

hibagent (1.0.1-0ubuntu1) bionic; urgency=medium

  * Build-depend on python3-all, it is needed by pybuild
  * Build-depend on python3-pytest to enable build-time tests
  * Drop debian/conffiles, files under /etc/ are marked as such automatically
  * Update maintainer according to Ubuntu processes
  * Fix typo: hybagent -> hibagent
  * Adjust path of hibagent to let tests be run Debian's way
  * Drop obsolete fields from d/control
  * Install init script properly
  * Fix too long line in Description
  * Add debian/copyright
  * Source /lib/lsb/init-functions in init script
  * Drop bogus Lintian override
  * Depend on lsb-base
  * Add debian/TODO with some items
  * Detect hibernation method and add support for systemd
  * Remove bashism and switch to system's sh in init script
  * Add LSB init info to init script
  * Drop pm-utils dependency
  * Fix enable-ec2-spot-hibernation command and disable starting hibagent by
    default.
  * Switch default packaging branch to ubuntu-devel.
    This makes using Ubuntu-style version numbers in the packaging branch less
    confusing.
  * Fix upstream's version number
  * Drop pyremove which is obsolete for the package

hibagent (1.0.0-1) unstable; urgency=medium

  * Initial release.

 -- Balint Reczey <email address hidden> Mon, 20 Nov 2017 17:33:36 +0100

Changed in hibagent (Ubuntu Trusty):
status: Fix Committed → Fix Released
tags: added: id-5abac11cdf780e3f2d946e2f
tags: added: id-5ace27186788cee231a4229f
tags: added: id-5ababf4c8583f22fdc78566d
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.