[2.3] MAAS improperly determines the version of some installs

Bug #1718270 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Mike Pontillo

Bug Description

Due to a bug in `get_version_from_apt()`, which attempts to find the version of a "primary" MAAS package, some installations can fail to detect their own version as follows:

>>> from provisioningserver.utils.version import get_version_from_apt
>>> get_version_from_apt('maas-region-api', 'maas-rack-controller')
''
>>> get_version_from_apt('maas-rack-controller')
'2.3.0~alpha3-6250-g58f83f3-0ubuntu1~16.04.1'

The following example was taken from a machine with only the rack controller installed. MAAS will look for the versions of maas-region-api, then maas-rack-controller, in the apt cache.

Unfortunately, apt considers the package to be in the cache whether or not it is actually installed, and returns an empty string as the version, which the MAAS code didn't expect.

Related branches

Changed in maas:
milestone: none → 2.3.0
summary: - [2.3] MAAS improperly determines the version of rack-controller-only
- installs
+ [2.3] MAAS improperly determines the version of some installs
description: updated
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
milestone: 2.3.0 → 2.3.0beta1
Changed in maas:
status: Fix Committed → Fix Released
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.