[Planetlab-devel] Replacing planet.cnf and updating
downloadconf.php
Thierry Parmentelat
Thierry.Parmentelat at sophia.inria.fr
Fri Jun 29 11:13:31 EDT 2007
Hi everyone
I'd have a few comments on this topic
* it seems to me that generating a node conf file, or more generally
building the boot material for a node, is special enough an operation
that is deserves a method of its own, for the following reasons
** using a combination of the 3 mentioned methods is doable, but rather
tricky. If for instance, the Web UI was to perform boot material
generation this way, it would basically mean extracting the key
generation code from the API to the Web UI, which I believe is wrong.
** CLI node config generation would become almost undoable
** This would also require an automated testbed to duplicate this code.
** for convenience it is helpful to have this operation logged as such
and not as any other UpdateNode action
* In addition, I've seen some people confused simply for locating the
'generic' ISO or USB image (e.g. using the serial flavour without
necessity). This should at the very least be supported by an API method,
rather than pointing peole to some external http URL
* For all these reasons, I've designed a single multi-purpose API
operation named GetBootMedium that allows to
** either generate the (floppy) node config like AdmGenerateConfFile does
** or download the generic ISO or USB image
** or download a node-specific ISO or USB image (in which case
plnode.txt gets embedded at the right place)
** or for convenience just preview the configuration file (key not
included) for checking (this is displayed in the web UI before actual
generation - useful in our context for multiple interfaces and various
additional settings)
http://svn.one-lab.org/filedetails.php?repname=OneLab&path=%2Fnew_plc_api%2Ftrunk%2FPLC%2FMethods%2FGetBootMedium.py
* This in turn relies on a script that ships with the bootcd module,
names bootcustom.sh - in fact hacked from the former cdcustom.sh - that
knows how to embed plnode.txt into a boot image, either usb or iso
http://svn.one-lab.org/filedetails.php?repname=OneLab&path=%2Fbootcd%2Ftrunk%2Fbootcustom.sh
Please note that this implementation does not support the 'flavours'
like serial iso images at the moment. Also there is a known flaw with
file permissions, when GetBootMedium gets called from plcsh and then
from the web UI, this is something I'll have to fix at some point.
* apart from that, your summary about the key sounds correct.
* finally, afaik plnode.txt is also used in the bootcd somewhere, so you
might wish to get rid of it in there too
* please note however that from various posts, I would suspect some
users still burned a floppy named planet.cnf even with recent BootCDs,
so pushing this change in production might be disruptive.
Sorry if this answer goes way beyond your question. I was thinking you
might consider using this approach as well.
ps.
I do not have a downloadconf.php anymore in my plcwww module but you can
see where our web ui calls GetBootMedium here
http://svn.one-lab.org/filedetails.php?repname=OneLab&path=%2Fnew_plc_www%2Ftrunk%2Fplanetlab%2Fnodes%2Fnode_actions.php
Stephen Soltesz wrote:
> All,
>
> I'd like to be sure that I'm proceeding in the right way. It doesn't
> look like there is a direct replacement for the old API function
> AdmGenerateNodeConfFile(). The comments in the implementation of this
> call indicate that it should be possible to implement it with:
>
> GetNodes()
> GetNodeNetworks()
> UpdateNode()
>
> And, I think I see how. The only point of clarification I'm looking
> for is whether the value of the node['key'] is at all special. It
> looks like it is just some random characters shared between PLC and
> the node to seed the hmac authentication for BootManager. Do I need
> to take any additional care making it up?
>
> Thank you,
> Stephen.
>
> Marc E. Fiuczynski wrote:
>> > Only bootmanager usese planet.cnf/plnode.txt. Its a one line change
>> > to get rid of it.
>>
>> Well, the bootcd 3.x scripts look for plnode.txt and planet.cnf. The
>> bootcd 2.x scripts only look for planet.cnf. Since we've declared
>> 2.x bootcd as dead, we should just get rid of the support to look for
>> planet.cnf in the 3.x bootcd, as well as in the bootmanager.
>>
>> We also need to change the php script that is used to generate config
>> file to return plnode.txt rather than planet.cnf. That's a one line
>> change except that the same php script also uses the older Adm* API,
>> which should be updated, too.
>>
>> Marc
>
> _______________________________________________
> Devel mailing list
> Devel at lists.planet-lab.org
> https://lists.planet-lab.org/mailman/listinfo/devel
More information about the Devel
mailing list