← Back to team overview

maas-devel team mailing list archive

Re: extending MAASserver node schema

 

Julian,

I realized it's going to break the schema with upstream but
it's definitely something we liked to discuss with MAAS devel to have it
extended if appropriate. We are in a middle of a deployment and thought
MAAS made an excellence platform to build our cluster on so just trying to
make it work at the moment.

I think support for arbitrary user data type would do for what we needed
but let me summarize what we are trying to do. My understanding of MAAS
networking model is that each cluster controller is a DHCP/DNS front-end to
a set of nodes that are sitting in the same L2 segment, or L3 segments with
dhcp-helper configured on the router. Basically MAAS made an assumption
that the L2 networking for the nodes are already working and outside the
scope of MAAS.

What we trying to support is a model where the host is an OSPF router and
MAAS is more aware of the networking to store and assist with bringing up
the essential connectivity. The way we have build our nodes is that each
physical node would have two physical connections to two separate routers,
each of the connection ties to a /30 address and form OSPF when it's
brought up. In OSPF, it's ideal that each of the node's have unchanging
logical address that is a /32 that ties to a "dummy0" interface, this is in
compare to the standard L2 network is the node's IP address. Tag is not a
good option for this since we would not want to make a tag for each IP
address.

We like to be able to store at least the /32 in the node data so that when
the node is reinstall, this info can be pushed to the node. Right now the
/30 are assigned from DHCP and is build separately from MAAS but it's
something we would like to be able to store in MAAS node data as well. The
/32 have to be manually assigned to the node afterward at this moment.

I was able to change the node model to store the new /32 value. However,
looking at the docs, code and APIs I'm still very confused about how/where
to write additional functions to add/change/remove the new field, expose it
via the API interface to use with the maas-cli. If you can give me some
code example and pointers I would really appreciate it.

thanks,


-bn
0216331C


On Sun, May 5, 2013 at 6:00 PM, Julian Edwards <julian.edwards@xxxxxxxxxxxxx
> wrote:

> On 15/04/13 15:57, Bao Nguyen wrote:
> > Hi,
> >
> > I'm interested in extending MAAS node model and the associate APIs
> > interfaces so I can store an extra info about a node in MAAS that it's
> > currently do not support. It's specifically for what we need and so Tag
> > is not an option.
> >
> > I've got some Python experience and I've been pouring over quite a bit
> > of MAAS, Django documentation over the weekend and I got as far as
> > extending the schema to allow me to store this additional field.
> >
> > I'm looking to write a very simple function to update the field with
> > some data and another one to read it. Would someone kind enough to show
> > me what's the simplest way I can do this? I've look into extending the
> > api.py and maas-cli to allow this behavior but it's quite a bit of code
> > to go through and I though any help in exposing the relationships of the
> > code or some sample code would help tremendously.
> >
> >
> > thank,
> > -bn
> > 0216331C
> >
> >
> >
>
>
> Hi,
>
> You should be ok with a simple field addition but beware, your change
> might cause problems when you upgrade maas in the future because the
> schema migrations might break.
>
> I think a better way forward is to do an official upstream change to
> support arbitrary user data.  What are you trying to store that can't be
> placed in tags?
>
> J
>

References