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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 940
Proposed branch: lp:~andreserl/maas/maas_tftppath_lp1042877
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 56 lines (+5/-5)
3 files modified
etc/pserv.yaml (+1/-1)
src/provisioningserver/config.py (+1/-1)
src/provisioningserver/pxe/tftppath.py (+3/-3)
To merge this branch: bzr merge lp:~andreserl/maas/maas_tftppath_lp1042877
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+121676@code.launchpad.net

Commit message

Fixes incorrect TFTP path to not prepend maas/

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

This branch does not pass tests. Andres, did you run “make test” or “make check” before putting this up for review? Lots of failing tests in trunk now. :(

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I'll take some blame, I should have checked before I approved.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I suspect the root problem is that different teams come into this with different operating procedures. We in Red Squad are used to running tests before & after any change, and running the full test suite at least before & after landing — but there's really no point doing that for packaging changes, changes to the client-side packages etc... which is the kind of work that the server team has been doing. In this case, the unfortunate circumstance was that Andres normally has no need to do this (and this _looked_ like a mere configuration change that might not affect tests) whereas Julian would normally expect the engineer to have ensured that tests run before review.

Also, our Jenkins setup must definitely be broken. We should have received emails screaming about this.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Meanwhile, if we're stepping away from the /maas prefix completely (are we?) then we should simplify it out of the regex in provisioningserver.tftp.TFTPBackend.re_config_file.

Revision history for this message
Gavin Panella (allenap) wrote :

On 30 Aug 2012 03:34, "Jeroen T. Vermeulen" <email address hidden> wrote:
>
> Meanwhile, if we're stepping away from the /maas prefix completely (are
we?) then we should simplify it out of the regex in
provisioningserver.tftp.TFTPBackend.re_config_file.

And bootpath also becomes obsolete (more so than it already is).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/pserv.yaml'
2--- etc/pserv.yaml 2012-08-23 19:56:55 +0000
3+++ etc/pserv.yaml 2012-08-28 18:26:18 +0000
4@@ -31,7 +31,7 @@
5 ## TFTP configuration.
6 #
7 tftp:
8- # root: /var/lib/tftpboot
9+ # root: /var/lib/tftpboot/maas
10 # port: 69
11 port: 5244
12 ## The URL to be contacted to generate PXE configurations.
13
14=== modified file 'src/provisioningserver/config.py'
15--- src/provisioningserver/config.py 2012-08-24 10:53:26 +0000
16+++ src/provisioningserver/config.py 2012-08-28 18:26:18 +0000
17@@ -59,7 +59,7 @@
18
19 if_key_missing = None
20
21- root = String(if_missing="/var/lib/tftpboot")
22+ root = String(if_missing="/var/lib/tftpboot/maas")
23 port = Int(min=1, max=65535, if_missing=69)
24 generator = String(if_missing=b"http://localhost/MAAS/api/1.0/pxeconfig/")
25
26
27=== modified file 'src/provisioningserver/pxe/tftppath.py'
28--- src/provisioningserver/pxe/tftppath.py 2012-08-17 14:11:20 +0000
29+++ src/provisioningserver/pxe/tftppath.py 2012-08-28 18:26:18 +0000
30@@ -29,7 +29,7 @@
31 simulate PXELINUX and don't actually load `pxelinux.0`, but use its path
32 to figure out where configuration files are located.
33 """
34- return "maas/pxelinux.0"
35+ return "pxelinux.0"
36
37
38 # TODO: move this; it is now only used for testing.
39@@ -48,7 +48,7 @@
40 # Not using os.path.join: this is a TFTP path, not a native path. Yes, in
41 # practice for us they're the same. We always assume that the ARP HTYPE
42 # (hardware type) that PXELINUX sends is Ethernet.
43- return "maas/pxelinux.cfg/{htype:02x}-{mac}".format(
44+ return "pxelinux.cfg/{htype:02x}-{mac}".format(
45 htype=ARP_HTYPE.ETHERNET, mac=mac)
46
47
48@@ -66,7 +66,7 @@
49 :return: Path for the corresponding image directory (containing a
50 kernel and initrd) as exposed over TFTP.
51 """
52- return '/'.join(['maas', arch, subarch, release, purpose])
53+ return '/'.join([arch, subarch, release, purpose])
54
55
56 def locate_tftp_path(path, tftproot):