Merge lp:~jtv/maas/import-ephemerals-tftp into lp:maas/trunk
| Status: | Merged |
|---|---|
| Approved by: | Jeroen T. Vermeulen on 2012-06-28 |
| Approved revision: | 692 |
| Merged at revision: | 692 |
| Proposed branch: | lp:~jtv/maas/import-ephemerals-tftp |
| Merge into: | lp:maas/trunk |
| Diff against target: |
304 lines (+107/-9) 2 files modified
etc/celeryconfig.py (+1/-1) scripts/maas-import-ephemerals (+106/-8) |
| To merge this branch: | bzr merge lp:~jtv/maas/import-ephemerals-tftp |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gavin Panella (community) | 2012-06-27 | Approve on 2012-06-27 | |
| Francesco Banconi (community) | code* | 2012-06-27 | Approve on 2012-06-27 |
|
Review via email:
|
|||
Commit Message
Make the maas-import-
Description of the Change
This is horrific. We have no tests for maas-import-
I'm trying to work around some of these problems along the way. The diff consists of 3 kinds of changes:
1. Publish newly downloaded ephemeral images through the MAAS TFTP setup.
This makes use of a custom maas command that was created for the purpose, and which is already used in maas-import-
2. Optionally skip Cobbler-related portions of the script.
Some parts of the script are now wrapped in a $NO_COBBLER condition. That is, you can set a variable NO_COBBLER and the script will no longer attempt to do anything related to Cobbler. It may still need tweaking, and there's probably more that can be shaved off, but this will mean that when the time comes to drop the Cobbler parts, part of the work will already be done. Actually this mostly just helps me try out as much as possible on my cobblerless system. Which, besides revealing a silly mistake in my script code, also allowed me to find a nasty little bug in the defaults as you'll see in the diff!
3. Document what I can.
This is depressingly little, as it happens. But I've had to do some figuring out and at least now I see a bit of how the images are exported over iSCSI, and I managed to figure out what some of the required parameters are. It'd be a shame not to share those nuggets of hard-won knowledge.
Jeroen
| Jeroen T. Vermeulen (jtv) wrote : | # |
Thanks! Yes, you're right on both scores. I fixed the --subarch argument.
- 692. By Jeroen T. Vermeulen on 2012-06-27
-
Review changes.
| Gavin Panella (allenap) wrote : | # |
Only one thing to add to Francesco's review:
[1]
+# Cobbler is being removed from MAAS. Set NO_COBBLER to skip anything
+# in this script that is related to Cobbler.
+NO_COBBLER=
Consider making this non-negative, HAS_COBBLER for example.
| Jeroen T. Vermeulen (jtv) wrote : | # |
I considered phrasing NO_COBBLER in a non-negative way, but in this case the negative expresses exactly what we want: no Cobbler. HAS_COBBLER suggests that having Cobbler installed is desirable.
At any rate, it's transitional so not worth much bother.


Thanks for this branch Jeroen, and thanks for adding comments to the shell script.
I believe that you didn't indented the code inside the [if cobblers is null] blocks on purpose, because this is a work in progress to get rid of cobbler, and the NO_COBBLER var will go away in the future.
Just an observation:
221 + maas install_pxe_image \ "commissioning" --image="$tmpdir"
222 + --arch=$arch --subarch=$2 --release=$release \
223 + --purpose=
Shouldn't "$subarch" be passed to --subarch, rather than "$2"?