Merge lp:~jtv/maas/q-pkg-bug-1086239 into lp:~maas-maintainers/maas/packaging.quantal
| Status: | Merged |
|---|---|
| Approved by: | Jeroen T. Vermeulen on 2012-12-12 |
| Approved revision: | 150 |
| Merged at revision: | 150 |
| Proposed branch: | lp:~jtv/maas/q-pkg-bug-1086239 |
| Merge into: | lp:~maas-maintainers/maas/packaging.quantal |
| Diff against target: |
125 lines (+69/-10) 3 files modified
debian/changelog (+7/-1) debian/maas-cluster-controller.maas-pserv.upstart (+16/-2) debian/maas-cluster-controller.postinst (+46/-7) |
| To merge this branch: | bzr merge lp:~jtv/maas/q-pkg-bug-1086239 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Scott Moser | Needs Fixing on 2012-12-12 | ||
| Raphaël Badin (community) | 2012-12-12 | Approve on 2012-12-12 | |
|
Review via email:
|
|||
Commit Message
Backport packaging r156: Duplicate CLUSTER_UUID into maas_cluster.conf.
Description of the Change
This backports the fix for bug 1086239 into the Quantal packaging branch. The only tricky bit, from a merging perspective, was updating the version number to match the 1.2 revision it required in debian/changelog.
That is also the one reason why I'm putting this up for review: final sanity check.
Jeroen
| Scott Moser (smoser) wrote : | # |
I think there is a functional bug here. You are storing a value of CLUSTER_UUID in /etc/maas/
CLUSTER_UUID = '<value>'
However, reading that value will fail because you have a inconsistency between the regex given to sed and grep. Instead of outputing <value>, extract_
CLUSTER_UUID = '<value>'
The easiest solution I think is to just ditch the use of grep entirely and use 'sed -n'.
extract_cfg_value() {
# extract the value for a variable named $1 from a
# simplistic formatted shell or python file ($2)
sed -n -e "s/^$1 *= *[\"']\
}
extract_
| Jeroen T. Vermeulen (jtv) wrote : | # |
Good point. The problem doesn't actually happen in practice, so it may not be worth a further precise/quantal change, but it would be nicer to unify the regexes. I tried to stay away from any sed cleverness I could avoid — portability habits! — but it makes sense here.
| Scott Moser (smoser) wrote : | # |
On Wed, 12 Dec 2012, Jeroen T. Vermeulen wrote:
> Good point. The problem doesn't actually happen in practice, so it may not be worth a further precise/quantal change, but it would be nicer to unify the regexes. I tried to stay away from any sed cleverness I could avoid — portability habits! — but it makes sense here.
'sed -n' is probably pretty portable.
http://
| Jeroen T. Vermeulen (jtv) wrote : | # |
Registered that as bug 1089508.


Looks good.