package google-compute-engine-oslogin 20170718-0ubuntu1~16.04.0 failed to install/upgrade: there is no script in the new version of the package - giving up

Bug #1733878 reported by raktim pain on 2017-11-22
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gce-compute-image-packages (Ubuntu)
Medium
Balint Reczey
Trusty
Undecided
Unassigned
Xenial
Undecided
Unassigned
Zesty
Undecided
Unassigned
Artful
Undecided
Unassigned

Bug Description

[Impact]

* The bug make dpkg fail to remove/upgrade the 20170718-0ubuntu1* versions of the package with the following error when openssh-server is not installed:
...
Selecting previously unselected package google-compute-engine-oslogin.
Preparing to unpack .../google-compute-engine-oslogin_20171025+dfsg1-0ubuntu1~16.04.0_amd64.deb ...
Deactivating Google Compute Engine OS Login.
cp: cannot stat '/etc/ssh/sshd_config': No such file or directory
...
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/apt/archives/google-compute-engine-oslogin_20171025+dfsg1-0ubuntu1~16.04.0_amd64.deb (--unpack):
 there is no script in the new version of the package - giving up
...

* This problem may interrupt upgrading other packages as well hence fixing it in stable releases as well is justified.
* The fix is adding an always succeeding prerm script which dpkg can fall back to.

[Test Case]

1. Install openssh-server and ensure ssh server is started
2. Install google-compute-engine-oslogin 20170718-0ubuntu1~16.04.0 or 20170718-0ubuntu1~* targeting the tested release
3. Purge openssh-server
4. Run apt-get dselect-upgrade to trigger upgrade of google-compute-engine-oslogin
4.a. Upgrading to an unfixed version will fail with the errors reported in this bug
4
.b. Upgrading to a fixed version succeeds.

[Regression Potential]

* The added prerm may let package upgrades succeed which were broken for other reasons but the way around that would be adding code which would check for exactly this breakage and this seems to be overkill.
* It seems to be highly unlikely to cause other regressions.

[Original Bug Report Text]

It's taking more than normal time period while booting.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: google-compute-engine-oslogin 20170718-0ubuntu1~16.04.0
ProcVersionSignature: Ubuntu 4.10.0-38.42~16.04.1-generic 4.10.17
Uname: Linux 4.10.0-38-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Mon Nov 20 08:25:50 2017
ErrorMessage: there is no script in the new version of the package - giving up
InstallationDate: Installed on 2017-06-11 (164 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.24
SourcePackage: gce-compute-image-packages
Title: package google-compute-engine-oslogin 20170718-0ubuntu1~16.04.0 failed to install/upgrade: there is no script in the new version of the package - giving up
UpgradeStatus: No upgrade log present (probably fresh install)

raktim pain (dark-dorky) wrote :
tags: removed: need-duplicate-check
Balint Reczey (rbalint) on 2017-11-28
Changed in gce-compute-image-packages (Ubuntu):
assignee: nobody → Balint Reczey (rbalint)
Balint Reczey (rbalint) on 2017-11-28
Changed in gce-compute-image-packages (Ubuntu):
status: New → Confirmed
Balint Reczey (rbalint) on 2017-11-28
Changed in gce-compute-image-packages (Ubuntu):
status: Confirmed → Triaged
Balint Reczey (rbalint) on 2017-11-28
Changed in gce-compute-image-packages (Ubuntu):
status: Triaged → Fix Committed
Balint Reczey (rbalint) wrote :

The failure is caused by old version's prerm failing because it expected openssh-server to be installed.
Please install openssh-server to let prerm succeed and allow upgrades whithout dpkg stopping on prerm error.
I added the proper fix to the packaging repository recovering even when openssh-server is not installed.

Changed in gce-compute-image-packages (Ubuntu):
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gce-compute-image-packages - 20171129+dfsg1-0ubuntu1

---------------
gce-compute-image-packages (20171129+dfsg1-0ubuntu1) bionic; urgency=medium

  [ Balint Reczey ]
  * Add minimal debian/google-compute-engine-oslogin.prerm to fix upgrades
    (LP: #1733878)
  * New upstream version 20171129+dfsg1
    - Generate SSH host keys when none are present.
    - Improve logging when activating OS Login.
    - Fix parsing logic for expiration time on SSH public keys.
    - Fix home directory creation PAM config.
  * Update symlink to shared library with updated revision
  * Use -I/usr/include/json-c for building tests

  [ Ludovic Gasc ]
  * Add systemd as valid ntp daemon

 -- Balint Reczey <email address hidden> Fri, 01 Dec 2017 19:40:05 +0100

Changed in gce-compute-image-packages (Ubuntu):
status: Fix Committed → Fix Released

Hello raktim, or anyone else affected,

Accepted gce-compute-image-packages into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gce-compute-image-packages/20171129+dfsg1-0ubuntu1~17.10.0 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-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. 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 gce-compute-image-packages (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Łukasz Zemczak (sil2100) wrote :

Hello raktim, or anyone else affected,

Accepted gce-compute-image-packages into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gce-compute-image-packages/20171129+dfsg1-0ubuntu1~17.04.0 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-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. 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 gce-compute-image-packages (Ubuntu Zesty):
status: New → Fix Committed
tags: added: verification-needed-zesty
Łukasz Zemczak (sil2100) wrote :

Hello raktim, or anyone else affected,

Accepted gce-compute-image-packages into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gce-compute-image-packages/20171129+dfsg1-0ubuntu1~16.04.0 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!

Changed in gce-compute-image-packages (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Changed in gce-compute-image-packages (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed-trusty
Łukasz Zemczak (sil2100) wrote :

Hello raktim, or anyone else affected,

Accepted gce-compute-image-packages into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gce-compute-image-packages/20171129+dfsg1-0ubuntu1~14.04.0 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!

Balint Reczey (rbalint) on 2017-12-05
description: updated
Balint Reczey (rbalint) on 2017-12-06
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers