Merge lp:~andreserl/maas/lp1563094 into lp:~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Superseded
Proposed branch: lp:~andreserl/maas/lp1563094
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 40 lines (+7/-5)
2 files modified
src/maasserver/utils/version.py (+6/-4)
utilities/remote-reinstall (+1/-1)
To merge this branch: bzr merge lp:~andreserl/maas/lp1563094
Reviewer Review Type Date Requested Status
MAAS Maintainers Pending
Review via email: mp+290333@code.launchpad.net

This proposal supersedes a proposal from 2016-03-29.

This proposal has been superseded by a proposal from 2016-03-29.

Commit message

Fix determination of installed version.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/utils/version.py'
2--- src/maasserver/utils/version.py 2015-12-01 18:12:59 +0000
3+++ src/maasserver/utils/version.py 2016-03-29 16:41:47 +0000
4@@ -17,7 +17,7 @@
5 apt_pkg.init()
6
7 # Name of maas package to get version from.
8-REGION_PACKAGE_NAME = "maas-region-controller-min"
9+REGION_PACKAGE_NAME = "maas-region-api"
10
11
12 def get_version_from_apt(package):
13@@ -61,9 +61,11 @@
14 try:
15 revno = shell.call_and_check(("bzr", "revno", __file__))
16 except shell.ExternalProcessError:
17- # We may not be in a Bazaar working tree, or Bazaar is not installed,
18- # or any manner of other errors. For the purposes of this function we
19- # don't care; simply say we don't know.
20+ # We may not be in a Bazaar working tree, or any manner of other errors.
21+ # For the purposes of this function we don't care; simply say we don't know.
22+ return None
23+ except FileNotFoundError:
24+ # Bazaar is not installed. We don't care and simply say we don't know.
25 return None
26 else:
27 # `bzr revno` can return '???' when it can't find the working tree's
28
29=== modified file 'utilities/remote-reinstall'
30--- utilities/remote-reinstall 2016-03-25 14:52:23 +0000
31+++ utilities/remote-reinstall 2016-03-29 16:41:47 +0000
32@@ -28,7 +28,7 @@
33 ssh_run="ssh -oBatchMode=yes -l root $hostname"
34
35 echo "Checking $hostname..."
36-maas_version=$($ssh_run "dpkg -s maas-region-controller-min | grep ^Version") \
37+maas_version=$($ssh_run "dpkg -s maas-region-api | grep ^Version") \
38 || die "Cannot SSH to root@$hostname."
39 ip_address=$(get_ip $hostname)
40 maas_version=$(echo $maas_version | cut -d':' -f 2)