Ido Barkan has uploaded a new change for review. Change subject: net: Remove 3.0.0 network upgrade ......................................................................
net: Remove 3.0.0 network upgrade since ovirt-3.0, VDSM uses libvirt networks (with names prefixed vdsm-*) to store its own networks. Such networks were not defined in older versions of VDSM, and only Linux bridges were used. ovirt-3.5 was the last version that supported the network upgrade to the new naming scheme. Change-Id: I917af80b37976eacaa8a5054ecaa689107512aa5 Signed-off-by: Ido Barkan <ibar...@redhat.com> --- M debian/vdsm-python.install M init/systemd/vdsm-network.service.in M init/sysvinit/vdsmd.init.in M lib/vdsm/tool/Makefile.am D lib/vdsm/tool/upgrade_300_networks.py M vdsm-tool/vdsm-tool.1.in M vdsm.spec.in 7 files changed, 0 insertions(+), 106 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/40568/1 diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install index 25ca0bb..fc42fab 100644 --- a/debian/vdsm-python.install +++ b/debian/vdsm-python.install @@ -40,7 +40,6 @@ ./usr/lib/python2.7/dist-packages/vdsm/tool/transient.py ./usr/lib/python2.7/dist-packages/vdsm/tool/unified_persistence.py ./usr/lib/python2.7/dist-packages/vdsm/tool/upgrade.py -./usr/lib/python2.7/dist-packages/vdsm/tool/upgrade_300_networks.py ./usr/lib/python2.7/dist-packages/vdsm/tool/validate_ovirt_certs.py ./usr/lib/python2.7/dist-packages/vdsm/tool/vdsm-id.py ./usr/lib/python2.7/dist-packages/vdsm/udevadm.py diff --git a/init/systemd/vdsm-network.service.in b/init/systemd/vdsm-network.service.in index 9680f06..722a2b4 100644 --- a/init/systemd/vdsm-network.service.in +++ b/init/systemd/vdsm-network.service.in @@ -8,7 +8,6 @@ Type=oneshot EnvironmentFile=-/etc/sysconfig/vdsm ExecStartPre=@BINDIR@/vdsm-tool --vvverbose --append --logfile=@VDSMLOGDIR@/upgrade.log upgrade-unified-persistence -ExecStartPre=@BINDIR@/vdsm-tool --vvverbose --append --logfile=@VDSMLOGDIR@/upgrade.log upgrade-3.0.0-networks ExecStart=@BINDIR@/vdsm-tool restore-nets KillMode=process RemainAfterExit=yes diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in index 6edd89f..046568a 100755 --- a/init/sysvinit/vdsmd.init.in +++ b/init/sysvinit/vdsmd.init.in @@ -151,11 +151,6 @@ "$VDSM_TOOL" ${UPGRADE_LOGGING_PARAMS} upgrade-unified-persistence } -upgrade_300_nets(){ - echo 'Upgrading to v3.x networking if needed' - "$VDSM_TOOL" ${UPGRADE_LOGGING_PARAMS} upgrade-3.0.0-networks -} - start() { test_already_running && return 0 @@ -172,8 +167,6 @@ unified_network_persistence_upgrade || return 1 restore_nets || return 1 - upgrade_300_nets || return 1 - echo $"Starting up vdsm daemon: " DAEMON_COREFILE_LIMIT=unlimited NICELEVEL="${NICE_LOWEST}" daemon \ diff --git a/lib/vdsm/tool/Makefile.am b/lib/vdsm/tool/Makefile.am index d704bbc..065192f 100644 --- a/lib/vdsm/tool/Makefile.am +++ b/lib/vdsm/tool/Makefile.am @@ -45,7 +45,6 @@ transient.py \ unified_persistence.py \ upgrade.py \ - upgrade_300_networks.py \ vdsm-id.py \ $(NULL) diff --git a/lib/vdsm/tool/upgrade_300_networks.py b/lib/vdsm/tool/upgrade_300_networks.py deleted file mode 100644 index 819aa90..0000000 --- a/lib/vdsm/tool/upgrade_300_networks.py +++ /dev/null @@ -1,88 +0,0 @@ -# -# Copyright 2011-2014 Red Hat, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -# Refer to the README and COPYING files for full details of the license -# - -import logging -import sys - -from vdsm import netinfo -from vdsm.constants import LEGACY_MANAGEMENT_NETWORKS -from vdsm.tool import expose -from vdsm.tool.upgrade import apply_upgrade - -sys.path.append("/usr/share/vdsm") -from network.configurators import ifcfg - -UPGRADE_NAME = 'upgrade-3.0.0-networks' - - -def isNeeded(networks, bridges): - def managementNetwork(): - return any(net in networks for net in LEGACY_MANAGEMENT_NETWORKS) - - def managementBridge(): - return any(net in bridges for net in LEGACY_MANAGEMENT_NETWORKS) - - return not managementNetwork() and managementBridge() - - -def run(networks, bridges): - configWriter = ifcfg.ConfigWriter() - - # Create a network for every bridge that doesn't have one - for bridge in bridges: - if bridge not in networks: - logging.debug('Creating network %s', bridge) - configWriter.createLibvirtNetwork(network=bridge, - bridged=True, - skipBackup=True) - - # Remove all networks that don't have a bridge - for network in networks: - if networks[network]['bridged'] and network not in bridges: - logging.debug('Removing network %s', network) - configWriter.removeLibvirtNetwork(network, skipBackup=True) - - -class Upgrade300Networks(object): - name = UPGRADE_NAME - - def __init__(self, networks, bridges): - self._networks = networks - self._bridges = bridges - - def run(self, ns, args): - run(self._networks, self._bridges) - - -@expose(UPGRADE_NAME) -def upgrade_networks(*args): - """ - upgrade-3.0.0-networks [upgrade-options] - Since ovirt-3.0, Vdsm uses libvirt networks (with names vdsm-*) to store - its own networks. Older Vdsms did not have those defined, and used only - linux bridges. This command is kept as an upgrade tool for the (very few) - people who still have such old setups running. - """ - networks = netinfo.networks() - bridges = netinfo.bridges() - - if isNeeded(networks, bridges): - return apply_upgrade(Upgrade300Networks(networks, bridges), *args) - return 0 diff --git a/vdsm-tool/vdsm-tool.1.in b/vdsm-tool/vdsm-tool.1.in index 5d52857..5ff42c3 100644 --- a/vdsm-tool/vdsm-tool.1.in +++ b/vdsm-tool/vdsm-tool.1.in @@ -152,13 +152,6 @@ .RE .RE .TP -Options for the \fIupgrade_300_networks\fP module: -.RS -.TP -.B upgrade-3.0.0-networks -Since ovirt-3.0, VDSM uses libvirt networks (with names prefixed vdsm-*) to store its own networks. Such networks were not defined in older versions of VDSM, and only Linux bridges were used. This option is kept as a tool for upgrading networks using the old scheme for the (very few) people who still have such old setups running. -.RE -.TP Options for the \fIvalidate_ovirt_certs\fP module: .RS .TP diff --git a/vdsm.spec.in b/vdsm.spec.in index f9c7790..74d5e8d 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -1389,7 +1389,6 @@ %{python_sitelib}/%{vdsm_name}/tool/transient.py* %{python_sitelib}/%{vdsm_name}/tool/unified_persistence.py* %{python_sitelib}/%{vdsm_name}/tool/upgrade.py* -%{python_sitelib}/%{vdsm_name}/tool/upgrade_300_networks.py* %{python_sitelib}/%{vdsm_name}/tool/validate_ovirt_certs.py* %{python_sitelib}/%{vdsm_name}/tool/vdsm-id.py* -- To view, visit https://gerrit.ovirt.org/40568 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I917af80b37976eacaa8a5054ecaa689107512aa5 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ido Barkan <ibar...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches