Merge lp:~rvb/maas/bug-1061409 into lp:maas/trunk
| Status: | Merged |
|---|---|
| Approved by: | Raphaël Badin on 2012-10-04 |
| Approved revision: | 1164 |
| Merged at revision: | 1167 |
| Proposed branch: | lp:~rvb/maas/bug-1061409 |
| Merge into: | lp:maas/trunk |
| Diff against target: |
168 lines (+78/-11) 2 files modified
src/provisioningserver/dhcp/leases.py (+44/-11) src/provisioningserver/dhcp/tests/test_leases.py (+34/-0) |
| To merge this branch: | bzr merge lp:~rvb/maas/bug-1061409 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Raphaël Badin (community) | Approve on 2012-10-04 | ||
|
Review via email:
|
|||
Commit Message
This branch changes the DHCP lease parsing code so that the DHCP parsing task won't error if the DHCP lease file is not present.
Description of the Change
This branch changes the DHCP lease parsing code so that the DHCP parsing task won't error if the DHCP lease file is not present. Instead, it will display a message in the log file: this message is, I'm afraid, the best we can do because we don't know on the cluster controller side if DHCP is enabled for this cluster or not.
| Jeroen T. Vermeulen (jtv) wrote : | # |
| Raphaël Badin (rvb) wrote : | # |
[...]
> Several things need attention in the details of the text, in my view:
>
> * It doesn't help that the "this is perfectly fine" is ambiguous -- it could
> refer to the inability to parse the leases file, or to installation of maas-
> dhcp.
>
> * Is "Unable to parse the DHCP leases file" really the best information we
> can give? There's a big difference between "the leases file does not exist"
> and "the parser had a problem with the contents of the leases file." I think
> this message is only meant for the former case.
>
> * Hinting that people may be able to solve their problems by installing maas-
> dhcp is an open invitation for people to set up accidental rogue DHCP servers.
>
> * "Note that" doesn't carry a lot of meaning. Better leave it out.
>
> Please fix up before landing!
>
> Jeroen
You're definitely right… how about:
"The DHCP leases file does not exit. This is only a problem if "
"this cluster controller is managing its DHCP server. If that's "
"the case then you need to install the 'maas-dhcp' package on "
"this cluster controller.")
- 1164. By Raphaël Badin on 2012-10-04
-
Fix typo.


The code and tests look fine. However the log notice comes across as confusing for a reader who doesn't already know how things work. It currently says...
89 + "Unable to parse the DHCP leases file. You might want to install "
90 + "the 'maas-dhcp' package. Note that this is perfectly fine "
91 + "if this cluster is not managing its DHCP server.")
I would switch those last two sentences around, so that the message conveys information in this order:
1. There's no leases file.
2. Which is fine, unless you want MAAS to manage DHCP.
3. If you want MAAS to manage DHCP, the problem is that maas-dhcp hasn't been installed.
Several things need attention in the details of the text, in my view:
* It doesn't help that the "this is perfectly fine" is ambiguous -- it could refer to the inability to parse the leases file, or to installation of maas-dhcp.
* Is "Unable to parse the DHCP leases file" really the best information we can give? There's a big difference between "the leases file does not exist" and "the parser had a problem with the contents of the leases file." I think this message is only meant for the former case.
* Hinting that people may be able to solve their problems by installing maas-dhcp is an open invitation for people to set up accidental rogue DHCP servers.
* "Note that" doesn't carry a lot of meaning. Better leave it out.
Please fix up before landing!
Jeroen