← Back to team overview

maas-devel team mailing list archive

Re: Node state and pserv

 

On 2012-04-27 09:39, Julian Edwards wrote:

I am largely in favour of this.  I'd go even further and say that the only ops
that need to talk to the pserv/cobbler axis are start and stop, because they
can send every detail necessary in the one call and we make pserv just
overwrite anything in cobbler.

That would be ideal for me as well, but isn't pserv also responsible for ongoing DHCP and DNS? I take it that those need to be aware of hostname changes and at least changes in a host's primary MAC.


I am also heavily in favour of making this completely asynchronous so that
appserver threads are not blocked - we are already running into trouble with
this old synchronous approach
(https://bugs.launchpad.net/ubuntu/+source/maas/+bug/989355).

Ouch! Looks like maas-import-isos is keeping Cobbler too busy to respond to the maasserver.


You talk about nodes that "pserv knows about" - this concerns me a bit because
pserv needs to be stateless so that we can scale it easily.  What do you mean
exactly by it knowing about nodes?  Right now we can't avoid that cobbler has
state, but we can overwrite it evey time we talk to it so that the MAAS data
is always authoritative.

Your goals are my goals. When I talk about nodes that pserv knows about, I am thinking of two distinct reasons for it to know:

1. Any kind of slow setup (commissioning or deployment, I suppose) that takes a while and must be done asynchronously. While that's going on, below the granularity of maasserver control, I assume that pserv will need to maintain some state about the node.

And as far as I'm concerned, it should forget about that state as soon as possible: an “amnesiac” implementation. But there's also:

2. DHCP and DNS. If we serve these from inside pserv somewhere, those services will need to know about them. But we can edit some related properties from the MAAS UI: hostname and MAC addresses.

I don't think we've made conscious decisions yet about how and when those changes would need to affect pserv at all. If I change a host's name, from a network-management perspective it seems that dnsmasq should learn about the change. Moreover, if I take out a host's primary MAC address (e.g. because I find that the network card was broken) then I'd expect either its IP address or its hostname to shift to its new primary MAC.

Arguably we can defer all this until the next time a node is installed. It's not a very good idea to go messing with that stuff on the fly. But then we should at least make a conscious choice that editing a node's hostname or MAC addresses only edits what we want that node to look like the next time we start it up, not what they currently look like in the network.

There may be corner cases to watch out for: say I have nodes with hostnames aaa and bbb, and I rename bbb to ccc and I rename aaa to bbb. Then I reboot or even reinstall the first. Now I've got two machines with a claim to hostname bbb.

I *think* we're pretty much good on the MAC/IP front, but I can't say that with confidence yet.


Jeroen


Follow ups

References