On Thu, Feb 20, 2014 at 5:18 PM, Klaus Aehlig <[email protected]> wrote: > > > commit 0fe14c0767b25c047f0e892dc39f9cad46468b70 > Merge: 3daaab6 e6e1752 > Author: Klaus Aehlig <[email protected]> > Date: Thu Feb 20 17:14:30 2014 +0100 > > Merge branch 'stable-2.8' into stable-2.9 > > * stable-2.8 > Improve job status assert affected by race condition > Export and import Disk/NIC name > Fix backup import in case NIC is inside a network > Override get() method of ConfigParser > > Conflicts: > lib/cmdlib/instance.py: manually apply 0973f9ed on > the stable-2.9 version > > Signed-off-by: Klaus Aehlig <[email protected]> > > diff --cc lib/cmdlib/instance.py > index 0c84328,4869a6a..4fe1aff > --- a/lib/cmdlib/instance.py > +++ b/lib/cmdlib/instance.py > @@@ -758,10 -762,19 +763,21 @@@ class LUInstanceCreate(LogicalUnit) > for idx in range(constants.MAX_NICS): > if einfo.has_option(constants.INISECT_INS, "nic%d_mac" % idx): > ndict = {} > - for name in list(constants.NICS_PARAMETERS) + ["ip", "mac"]: > + for name in [constants.INIC_IP, > + constants.INIC_MAC, constants.INIC_NAME]: > - v = einfo.get(constants.INISECT_INS, "nic%d_%s" % (idx, name)) > - ndict[name] = v > + nic_param_name = "nic%d_%s" % (idx, name) > + if einfo.has_option(constants.INISECT_INS, nic_param_name): > - v = einfo.get(constants.INISECT_INS, nic_param_name) > ++ v = einfo.get(constants.INISECT_INS, "nic%d_%s" % (idx, name)) > ++ ndict[name] = v > + network = einfo.get(constants.INISECT_INS, > + "nic%d_%s" % (idx, constants.INIC_NETWORK)) > + # in case network is given link and mode are inherited > + # from nodegroup's netparams and thus should not be passed here > + if network: > + ndict[constants.INIC_NETWORK] = network > + else: > + for name in list(constants.NICS_PARAMETERS): > + v = einfo.get(constants.INISECT_INS, "nic%d_%s" % (idx, name)) > ndict[name] = v > nics.append(ndict) > else: > > > -- > Klaus Aehlig > Google Germany GmbH, Dienerstr. 12, 80331 Muenchen > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores
LGTM, thanks. Michele -- 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
