> If we have a KVM cluster and user shutdown detection is off, then we still
> want to ensure that ganeti-kvmd is off. 

Correct. The point I was trying to make is that in this case you still try
to stop the daemon on node addition and most like get the same warning
(as on a new node to be added they're likely not running).

> What I had in mind is to make sure that 'enabled_hypervisors' acts as a
> master switch - if it's off, KVM related code shouldn't be even
> invoked (unless we just turned that switch off and want the cluster
> react accordingly - but that is handled in LUClusterSetParams using
> the 'ensure_kvmd' flag).

However, this is not what you're patch is achieving. EnsureKvmdOnNodes
is called at a couple of places on non-KVM clusters, e.g.,
- at cluster init, and
- whenever the set of enabled hypervisors changes, regardless of
  whether kvm is in the old or the new set.

So, that's why my suggestion was, to keep things basically as they are; this
has the advantage that all the decissions on whether and what to do with kvm
is in one central place of the code. If we worry about spurious warnings, we
can tell EnsureKvmdOnNodes "don't worry, from the context we're in, we don't
really expect the daemon to be running anyway; but silently try to stop, just
to be sure". These situations basically are
- node addition (irrespectively of whether kvm is enabled or not),
- parameter changes where kvm is enabled neither before nor after the change.

What do you think of this suggestion?

Regards,
Klaus

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle

Reply via email to