← Back to team overview

maas-devel team mailing list archive

Death to bootresources.yaml, Fit the Second

 

Hi all,

Now that the sprint's past, we can finish the removal of
bootresources.yaml (see previous thread on this list on that topic).

I've been looking at how to replace it with a simple RPC-mesh API for
the cluster to call, thus:

 1. cluster bootstraps
 2. User commands cluster to import images (via UI, CLI, etc.)
 3. m-i-p-f runs on cluster, requests config from region
 4. … time passes … things download …
 5. … all proceeds as before [first iteration]

Now, in this admittedly simple first iteration we're shifting the
knowledge of the boot resources from bootresources.yaml to the DB. We
already have models for BootSource and BootSelection in the database;
it's now a matter of putting a simple API in place and then hooking
things up.

The simplest API I can think of looks like this:

  def get_boot_sources_for_cluster(uuid):
      # Fetch sources for cluster from DB
      # Convert to the same format as returned by a parsed bootresources.yaml
      # Return

This doesn't provide *anything* other than a replacement for the
config file. There's some obvious failure states we need to deal with:

 1. Region isn't up
 2. Region doesn't recognise cluster as one of its own.
 3. No boot sources for the cluster.

My feeling for 3 is that right now we should just set a sane default
for the boot source and then download the world, per Mark's
preferences.

I've doubtless missed something with my simple-minded API above, so
please tell me when you notice something.

I've started putting a branch together for the simple API; you can
find it here: lp:~gmb/maas/boot-source-api

Cheers,

Graham


Follow ups