Change in vdsm[master]: split network restoration from vdsmd.service
asegurap at redhat.com
asegurap at redhat.com
Wed Nov 26 09:45:54 UTC 2014
Antoni Segura Puimedon has posted comments on this change.
Change subject: split network restoration from vdsmd.service
......................................................................
Patch Set 3:
(4 comments)
Thanks for the comments Ido!
http://gerrit.ovirt.org/#/c/29441/3/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:
Line 39: import pkgutil
Line 40:
Line 41: RESTORATION_FILE = constants.P_VDSM_RUN + 'nets_restored'
Line 42:
Line 43: def ifcfg_restoration(**opts):
> missing newline (in general, pep8)
Done
Line 44: configWriter = ifcfg.ConfigWriter()
Line 45: configWriter.restorePersistentBackup()
Line 46:
Line 47:
Line 66: # so that changes of configurator and persistence system are smooth.
Line 67:
Line 68: if flush_configurators:
Line 69: _configurator_flush()
Line 70: libvirt.flush()
> why is libvirt.flush() was moved here from the configurator itself?
Because the configurators deal with device configuration, so it was a bit shaky that the base class did libvirt flushing as well.
Moving it here allows us to have configurator flushing in the vdsm-network-cleanup.service (which happens so early in boot that it can't use libvirt), and then do the libvirt flush before configuring networks here.
Line 71:
Line 72: persistentConfig = PersistentConfig()
Line 73: nets, bonds = _filter_nets_bonds(persistentConfig.networks,
Line 74: persistentConfig.bonds)
Line 144: _configured_restore(**opts)
Line 145:
Line 146:
Line 147: if config.get('vars', 'net_persistence') == 'unified':
Line 148: _configured_restore= unified_restoration
> missing whitespace
Done
Line 149: else:
Line 150: _configured_restore = ifcfg_restoration
Line 151:
Line 152:
Line 164: "it back at it's original location. The file is stored with its full "
Line 165: "path detail.")
Line 166: parser.add_argument('--conditional', action='store_true', default=False,
Line 167: help='Perform only when "%s" does not exist' %
Line 168: RESTORATION_FILE)
> mixed tabs and spaces
Done
Line 169: subparsers = parser.add_subparsers(help='sub-command help')
Line 170:
Line 171: # reconfigure
Line 172: parser_reconfigure = subparsers.add_parser(
--
To view, visit http://gerrit.ovirt.org/29441
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I70cdf1e8a1e7063ec850081ac6199728d4cde381
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list