Change in vdsm[ovirt-3.6]: net: Generate dump bonding options on boot and upgrade
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78780 )
Change subject: net: Generate dump bonding options on boot and upgrade
......................................................................
net: Generate dump bonding options on boot and upgrade
Compatible bonding options aren't guaranteed across different
kernel version, so a scenario where the kernel is upgraded and incompatible
default options are lingering will cause problems.
Instead of shipping with default options, dump bonding defaults on
boot via network service and installation/upgrade via a new
dedicated configurator.
Change-Id: I98f7c691a2a86d152ebcb81e1d96f9b0d83fa698
Bug-Id: https://bugzilla.redhat.com/1468240
Signed-off-by: Leon Goldberg <lgoldber(a)redhat.com>
---
M init/systemd/vdsm-network.service.in
M lib/vdsm/tool/configurators/Makefile.am
A lib/vdsm/tool/configurators/bond_defaults.py
M tests/Makefile.am
R tests/bonding-defaults.json
M tests/netinfoTests.py
M tests/netmodelsTests.py
M vdsm.spec.in
M vdsm/Makefile.am
9 files changed, 60 insertions(+), 15 deletions(-)
Approvals:
Michael Burman: Verified
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Edward Haas: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/78780
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I98f7c691a2a86d152ebcb81e1d96f9b0d83fa698
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Meni Yakove <myakove(a)redhat.com>
Gerrit-Reviewer: Michael Burman <mburman(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 4 months
Change in vdsm[ovirt-3.6]: net: Generate dump bonding options on boot and upgrade
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: net: Generate dump bonding options on boot and upgrade
......................................................................
Patch Set 11: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/78780
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I98f7c691a2a86d152ebcb81e1d96f9b0d83fa698
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Meni Yakove <myakove(a)redhat.com>
Gerrit-Reviewer: Michael Burman <mburman(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 4 months
Change in vdsm[ovirt-3.6]: ifcfg: ad_actor_system can not be reset to its default value
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: ifcfg: ad_actor_system can not be reset to its default value
......................................................................
ifcfg: ad_actor_system can not be reset to its default value
_restore_default_bond_options tried to reset this option to
00:00:00:00:00:00, which (on Fedora 23) causes "IOError: [Errno 22]
Invalid argument", during testSetupNetworksActiveSlave.
Linux documentation (bonding.txt) says that "The value can not
be either NULL or Multicast".
Let's add ad_actor_system to EXCLUDED_BONDING_ENTRIES for now
and assume that if a user set ad_actor_system explicitly, she
knows the way to reset it, and that is by setting it to the bond's
own MAC address:
In an AD system, this specifies the mac-address for the actor in
protocol packet exchanges (LACPDUs). The value cannot be NULL or
multicast. It is preferred to have the local-admin bit set for this
mac but driver does not enforce it. If the value is not given then
system defaults to using the masters' mac address as actors' system
address.
Change-Id: I3f307b64546c3efa73ca202e97ced49eeb9670e9
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
Reviewed-on: https://gerrit.ovirt.org/57490
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Continuous-Integration: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/netinfo.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/78898/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index bfd7546..d93a3c9 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -72,7 +72,8 @@
_BONDING_LOADBALANCE_MODES = frozenset(('0', '2', '4', '5', '6'))
_EXCLUDED_BONDING_ENTRIES = frozenset((
'slaves', 'active_slave', 'mii_status', 'queue_id', 'ad_aggregator',
- 'ad_num_ports', 'ad_actor_key', 'ad_partner_key', 'ad_partner_mac'
+ 'ad_num_ports', 'ad_actor_key', 'ad_partner_key', 'ad_partner_mac',
+ 'ad_actor_system'
))
_IFCFG_ZERO_SUFFIXED = frozenset(
('IPADDR0', 'GATEWAY0', 'PREFIX0', 'NETMASK0'))
--
To view, visit https://gerrit.ovirt.org/78898
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f307b64546c3efa73ca202e97ced49eeb9670e9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 4 months
Change in vdsm[ovirt-3.6]: net: Generate dump bonding options on boot and upgrade
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has removed a vote on this change.
Change subject: net: Generate dump bonding options on boot and upgrade
......................................................................
Removed Verified-1 by gerrit-hooks <automation(a)ovirt.org>
--
To view, visit https://gerrit.ovirt.org/78780
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I98f7c691a2a86d152ebcb81e1d96f9b0d83fa698
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Meni Yakove <myakove(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 5 months
Change in vdsm[ovirt-4.1]: net: On MTU change to the default value update the ifcfg file
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has submitted this change and it was merged. ( https://gerrit.ovirt.org/79162 )
Change subject: net: On MTU change to the default value update the ifcfg file
......................................................................
net: On MTU change to the default value update the ifcfg file
When changing only the MTU on a bridged network to the default value
(1500), the new value has not been updated in the ifcfg file.
The problem has been detected on RHEL 7.4, where the MTU of the bridge
is automatically updated to the default when it has no ports connected.
Change-Id: Ib55712725c19e7d20fa8491c8ee78f6f9298ff9a
Bug-Url: https://bugzilla.redhat.com/1460687
Signed-off-by: Edward Haas <edwardh(a)redhat.com>
---
M lib/vdsm/network/legacy_switch.py
1 file changed, 7 insertions(+), 0 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Edward Haas: Verified
--
To view, visit https://gerrit.ovirt.org/79162
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib55712725c19e7d20fa8491c8ee78f6f9298ff9a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 5 months
Change in vdsm[ovirt-4.1]: net: Relocate DEFAULT_MTU costant to link.iface module
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has submitted this change and it was merged. ( https://gerrit.ovirt.org/79161 )
Change subject: net: Relocate DEFAULT_MTU costant to link.iface module
......................................................................
net: Relocate DEFAULT_MTU costant to link.iface module
Users of the DEFAULT_MTU do not directly need netinfo, they just require
the default mtu value.
This patch is partially cleanin up netinfo package and avoids uneeded
dependency on netinfo.
Change-Id: Ie7ec8d809ff6c93398f3d28a158b3dc31fbbda35
Bug-Url: https://bugzilla.redhat.com/1460687
Signed-off-by: Edward Haas <edwardh(a)redhat.com>
---
M lib/vdsm/network/canonicalize.py
M lib/vdsm/network/configurators/ifcfg.py
M lib/vdsm/network/link/iface.py
M lib/vdsm/network/netinfo/mtus.py
M tests/functional/networkTests.py
M tests/network/config_network_test.py
6 files changed, 9 insertions(+), 8 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
Edward Haas: Verified
--
To view, visit https://gerrit.ovirt.org/79161
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7ec8d809ff6c93398f3d28a158b3dc31fbbda35
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
6 years, 5 months
Change in vdsm[master]: Move fencing code to host/fencing.py
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Move fencing code to host/fencing.py
......................................................................
Move fencing code to host/fencing.py
The intention is to split the fence code to be in generic location.
Later patches will pack this code in separate package and will be used
in separate micro service in ovirt cluster.
Change-Id: I73763a7a784b17bd2b8bd04a22c0f5a5ec4ab1b6
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
A lib/vdsm/host/fencing.py
M vdsm/API.py
2 files changed, 203 insertions(+), 151 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/78927/1
diff --git a/lib/vdsm/host/fencing.py b/lib/vdsm/host/fencing.py
new file mode 100644
index 0000000..2283af5
--- /dev/null
+++ b/lib/vdsm/host/fencing.py
@@ -0,0 +1,200 @@
+#
+# Copyright 2017 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
+#
+from __future__ import absolute_import
+
+"""
+The module is taking care of fencing command to a remote host.
+agent is one of (rsa, ilo, drac5, ipmilan, etc)
+action can be one of (status, on, off, reboot).
+"""
+
+# using general logging
+import logging
+import os
+
+from vdsm import commands
+from vdsm import constants
+from vdsm import supervdsm
+from vdsm.common import conv
+from vdsm.common.define import doneCode
+from vdsm.common.define import errCode
+from vdsm.storage import clusterlock
+
+try:
+ import vdsm.gluster.fence as glusterFence
+except ImportError:
+ pass
+
+
+_log = logging.getLogger("fencing")
+
+# This global var will hold HSM instance or another provider that can retrieve Host Lease Status
+# Therefore set_storage_monitor should be called before and set there a class that implements getHostLeaseStatus
+# function.
+_storageMonitor = None
+
+
+def set_storage_monitor(monitor):
+ global _storageMonitor
+ _storageMonitor = monitor
+
+
+def _fence(script, inp):
+ rc, out, err = commands.execCmd([script], data=inp)
+ _log.debug('rc %s inp %s out %s err %s', rc,
+ _hidePasswd(inp), out, err)
+ return rc, out, err
+
+
+def _hidePasswd(text):
+ cleantext = ''
+ for line in text.splitlines(True):
+ if line.startswith('passwd='):
+ line = 'passwd=XXXX\n'
+ cleantext += line
+ return cleantext
+
+
+def _should_fence(policy):
+ # Skip fencing if any of the condition mentioned in the fencing
+ # policy is met
+ if policy is None:
+ _log.debug('No policy specified')
+ return True
+ result = _check_virt_fencing_policies(policy)
+ if result:
+ result = _check_gluster_fencing_policies(policy)
+ return result
+
+
+def _check_virt_fencing_policies(policy):
+ # skip fence execution if map of storage domains with host id is
+ # entered and at least one storage domain connection from host is
+ # alive. Also enforce the following gluster related fencing
+ # policies.
+ hostIdMap = policy.get('storageDomainHostIdMap')
+ if not hostIdMap:
+ _log.warning('No storageDomainHostIdMap provided')
+ return True
+
+ result = _storageMonitor.getHostLeaseStatus(hostIdMap)
+ if result['status']['code'] != 0:
+ _log.error(
+ "Error getting host lease status, error code '%s'",
+ result['status']['code'])
+ return True
+
+ # HOST_STATUS_LIVE means that host renewed its lease in last 80
+ # seconds. If so, we consider the host Up and we won't execute
+ # fencing, even when it's unreachable from engine
+ for sd, status in result['domains'].iteritems():
+ if status == clusterlock.HOST_STATUS_LIVE:
+ _log.debug("Host has live lease on '%s'", sd)
+ return False
+
+ _log.debug("Host doesn't have any live lease")
+ return True
+
+
+def _check_gluster_fencing_policies(policy):
+ # If skipFencingIfGlusterBricksUp is set to true the fencing should
+ # should be skipped if there is any brick up running in the host
+ # being fenced.
+ skipFencingIfGlusterBricksUp = \
+ policy.get('skipFencingIfGlusterBricksUp')
+ # If skipFencingIfGlusterQuorumNotMet is set to true then fencing
+ # should be skipped if the gluster bricks are UP and fencing
+ # this host will bring down those bricks and quourm will be
+ # lost for any replicated volume in the gluster.
+ skipFencingIfGlusterQuorumNotMet = \
+ policy.get('skipFencingIfGlusterQuorumNotMet')
+ hostUuid = policy.get('glusterServerUuid')
+ if skipFencingIfGlusterBricksUp \
+ or skipFencingIfGlusterQuorumNotMet:
+ if not glusterFence:
+ _log.error("Required vdsm-gluster package is "
+ "missing on this host. Note that "
+ "gluster related fencing will not be"
+ "enforced!. Please install the missing "
+ "package in order to enforce gluster "
+ "related fencing polices")
+ return True
+ result, msg = glusterFence. \
+ can_fence_host(supervdsm.getProxy(), hostUuid,
+ skipFencingIfGlusterBricksUp,
+ skipFencingIfGlusterQuorumNotMet)
+
+ _log.debug(msg)
+ return result
+
+ return True
+
+
+def fence_node(addr, port, agent, username, password, action, secure=False, options='', policy=None):
+ _log.debug('fenceNode(addr=%s,port=%s,agent=%s,user=%s,passwd=%s,'
+ 'action=%s,secure=%s,options=%s,policy=%s)',
+ addr, port, agent, username, password, action, secure,
+ options, policy)
+
+ if action not in ('status', 'on', 'off', 'reboot'):
+ raise ValueError('illegal action ' + action)
+
+ if action != 'status' and not _should_fence(policy):
+ _log.debug("Skipping execution of action '%s'", action)
+ return {'status': doneCode, 'operationStatus': 'skipped'}
+
+ script = constants.EXT_FENCE_PREFIX + agent
+
+ inp = ('agent=fence_%s\nipaddr=%s\nlogin=%s\naction=%s\n'
+ 'passwd=%s\n') % (agent, addr, username, action, password.value)
+ if port != '':
+ inp += 'port=%s\n' % (port,)
+ if conv.tobool(secure):
+ inp += 'secure=yes\n'
+ inp += options
+
+ try:
+ rc, out, err = _fence(script, inp)
+ except OSError as e:
+ if e.errno == os.errno.ENOENT:
+ return errCode['fenceAgent']
+ raise
+ _log.debug('rc %s in %s out %s err %s', rc,
+ _hidePasswd(inp), out, err)
+ if not 0 <= rc <= 2:
+ return {'status': {'code': 1,
+ 'message': out + err}}
+ message = doneCode['message']
+ ret = 0
+ if action == 'status':
+ if rc == 0:
+ power = 'on'
+ elif rc == 2:
+ power = 'off'
+ else:
+ power = 'unknown'
+ message = out + err
+ ret = rc
+ return {'status': {'code': ret, 'message': message},
+ 'power': power}
+ if rc != 0:
+ message = out + err
+ return {'status': {'code': rc, 'message': message},
+ 'power': 'unknown', 'operationStatus': 'initiated'}
\ No newline at end of file
diff --git a/vdsm/API.py b/vdsm/API.py
index cf7c04e..e301f51 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -20,11 +20,8 @@
#
# pylint: disable=R0904
-import os
-
from vdsm.network.errors import ConfigNetworkError
-from vdsm import commands
from vdsm import utils
from clientIF import clientIF
from vdsm import constants
@@ -40,9 +37,9 @@
from vdsm.common import logutils
from vdsm.common import response
from vdsm.common import validate
-from vdsm.common import conv
from vdsm.host import api as hostapi
from vdsm.host import caps
+from vdsm.host import fencing
# TODO fix name conflict and use from vdsm.storage import sd
import vdsm.storage.sd
from vdsm.storage import clusterlock
@@ -64,11 +61,6 @@
haClient = None # Define here to work around pyflakes issue #13
try:
import ovirt_hosted_engine_ha.client.client as haClient
-except ImportError:
- pass
-
-try:
- import vdsm.gluster.fence as glusterFence
except ImportError:
pass
@@ -1092,148 +1084,8 @@
# General Host functions
def fenceNode(self, addr, port, agent, username, password, action,
secure=False, options='', policy=None):
- """Send a fencing command to a remote node.
-
- agent is one of (rsa, ilo, drac5, ipmilan, etc)
- action can be one of (status, on, off, reboot)."""
-
- def fence(script, inp):
- rc, out, err = commands.execCmd([script], data=inp)
- self.log.debug('rc %s inp %s out %s err %s', rc,
- hidePasswd(inp), out, err)
- return rc, out, err
-
- def hidePasswd(text):
- cleantext = ''
- for line in text.splitlines(True):
- if line.startswith('passwd='):
- line = 'passwd=XXXX\n'
- cleantext += line
- return cleantext
-
- def should_fence(policy):
- # Skip fencing if any of the condition mentioned in the fencing
- # policy is met
- result = False
- if policy is None:
- self.log.debug('No policy specified')
- return True
- result = check_virt_fencing_policies(policy)
- if result:
- result = check_gluster_fencing_policies(policy)
- return result
-
- def check_virt_fencing_policies(policy):
- # skip fence execution if map of storage domains with host id is
- # entered and at least one storage domain connection from host is
- # alive. Also enforce the following gluster related fencing
- # policies.
- hostIdMap = policy.get('storageDomainHostIdMap')
- if not hostIdMap:
- self.log.warning('No storageDomainHostIdMap provided')
- return True
-
- result = self._irs.getHostLeaseStatus(hostIdMap)
- if result['status']['code'] != 0:
- self.log.error(
- "Error getting host lease status, error code '%s'",
- result['status']['code'])
- return True
-
- # HOST_STATUS_LIVE means that host renewed its lease in last 80
- # seconds. If so, we consider the host Up and we won't execute
- # fencing, even when it's unreachable from engine
- for sd, status in result['domains'].iteritems():
- if status == clusterlock.HOST_STATUS_LIVE:
- self.log.debug("Host has live lease on '%s'", sd)
- return False
-
- self.log.debug("Host doesn't have any live lease")
- return True
-
- def check_gluster_fencing_policies(policy):
- # If skipFencingIfGlusterBricksUp is set to true the fencing should
- # should be skipped if there is any brick up running in the host
- # being fenced.
- skipFencingIfGlusterBricksUp = \
- policy.get('skipFencingIfGlusterBricksUp')
- # If skipFencingIfGlusterQuorumNotMet is set to true then fencing
- # should be skipped if the gluster bricks are UP and fencing
- # this host will bring down those bricks and quourm will be
- # lost for any replicated volume in the gluster.
- skipFencingIfGlusterQuorumNotMet = \
- policy.get('skipFencingIfGlusterQuorumNotMet')
- hostUuid = policy.get('glusterServerUuid')
- if skipFencingIfGlusterBricksUp \
- or skipFencingIfGlusterQuorumNotMet:
- if not glusterFence:
- self.log.error("Required vdsm-gluster package is "
- "missing on this host. Note that "
- "gluster related fencing will not be"
- "enforced!. Please install the missing "
- "package in order to enforce gluster "
- "related fencing polices")
- return True
- result, msg = glusterFence. \
- can_fence_host(supervdsm.getProxy(), hostUuid,
- skipFencingIfGlusterBricksUp,
- skipFencingIfGlusterQuorumNotMet)
-
- self.log.debug(msg)
- return result
-
- return True
-
- self.log.debug('fenceNode(addr=%s,port=%s,agent=%s,user=%s,passwd=%s,'
- 'action=%s,secure=%s,options=%s,policy=%s)',
- addr, port, agent, username, password, action, secure,
- options, policy)
-
- if action not in ('status', 'on', 'off', 'reboot'):
- raise ValueError('illegal action ' + action)
-
- if action != 'status' and not should_fence(policy):
- self.log.debug("Skipping execution of action '%s'", action)
- return {'status': doneCode, 'operationStatus': 'skipped'}
-
- script = constants.EXT_FENCE_PREFIX + agent
-
- inp = ('agent=fence_%s\nipaddr=%s\nlogin=%s\naction=%s\n'
- 'passwd=%s\n') % (agent, addr, username, action, password.value)
- if port != '':
- inp += 'port=%s\n' % (port,)
- if conv.tobool(secure):
- inp += 'secure=yes\n'
- inp += options
-
- try:
- rc, out, err = fence(script, inp)
- except OSError as e:
- if e.errno == os.errno.ENOENT:
- return errCode['fenceAgent']
- raise
- self.log.debug('rc %s in %s out %s err %s', rc,
- hidePasswd(inp), out, err)
- if not 0 <= rc <= 2:
- return {'status': {'code': 1,
- 'message': out + err}}
- message = doneCode['message']
- ret = 0
- if action == 'status':
- if rc == 0:
- power = 'on'
- elif rc == 2:
- power = 'off'
- else:
- power = 'unknown'
- message = out + err
- ret = rc
- return {'status': {'code': ret, 'message': message},
- 'power': power}
- if rc != 0:
- message = out + err
- return {'status': {'code': rc, 'message': message},
- 'power': 'unknown', 'operationStatus': 'initiated'}
+ fencing.set_storage_monitor(self._irs)
+ return fencing.fence_node(addr, port, agent, username, password, action, secure, options, policy)
def ping(self):
"Ping the server. Useful for tests"
--
To view, visit https://gerrit.ovirt.org/78927
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I73763a7a784b17bd2b8bd04a22c0f5a5ec4ab1b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
6 years, 5 months
Change in vdsm[ovirt-4.1]: net: On MTU change to the default value update the ifcfg file
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: net: On MTU change to the default value update the ifcfg file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/79162
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib55712725c19e7d20fa8491c8ee78f6f9298ff9a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
6 years, 5 months
Change in vdsm[ovirt-4.1]: net: On MTU change to the default value update the ifcfg file
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has removed a vote on this change.
Change subject: net: On MTU change to the default value update the ifcfg file
......................................................................
Removed Verified-1 by gerrit-hooks <automation(a)ovirt.org>
--
To view, visit https://gerrit.ovirt.org/79162
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Ib55712725c19e7d20fa8491c8ee78f6f9298ff9a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
6 years, 5 months
Change in vdsm[ovirt-4.1]: net: Relocate DEFAULT_MTU costant to link.iface module
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has removed gerrit-hooks from this change. ( https://gerrit.ovirt.org/79161 )
Change subject: net: Relocate DEFAULT_MTU costant to link.iface module
......................................................................
Removed reviewer gerrit-hooks with the following votes:
* Verified-1 by gerrit-hooks <automation(a)ovirt.org>
--
To view, visit https://gerrit.ovirt.org/79161
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: deleteReviewer
Gerrit-Change-Id: Ie7ec8d809ff6c93398f3d28a158b3dc31fbbda35
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.1
Gerrit-Owner: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
6 years, 5 months