LGTM, thanks.
On Thu, Aug 22, 2013 at 10:16 AM, Helga Velroyen <[email protected]> wrote: > Upgrading the config with respect to the DRBD usermode > helper was so far based on a guess whether or not DRBD > is enabled by checking if there are any DRBD instances > running. This check can now be replaced to look at the > list of enabled disk templates in the cluster's > configuration. > > Signed-off-by: Helga Velroyen <[email protected]> > --- > lib/objects.py | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/lib/objects.py b/lib/objects.py > index 7ff3263..beed137 100644 > --- a/lib/objects.py > +++ b/lib/objects.py > @@ -448,10 +448,7 @@ class ConfigData(ConfigObject): > for nodegroup in self.nodegroups.values(): > nodegroup.UpgradeConfig() > if self.cluster.drbd_usermode_helper is None: > - # To decide if we set an helper let's check if at least one > instance has > - # a DRBD disk. This does not cover all the possible scenarios but it > - # gives a good approximation. > - if self.HasAnyDiskOfType(constants.LD_DRBD8): > + if self.cluster.IsDiskTemplateEnabled(constants.DT_DRBD8): > self.cluster.drbd_usermode_helper = constants.DEFAULT_DRBD_HELPER > if self.networks is None: > self.networks = {} > -- > 1.8.3 > > -- Thomas Thrainer | Software Engineer | [email protected] | Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
