Change in vdsm[master]: storage: move storage_mailbox to lib
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage: move storage_mailbox to lib
......................................................................
storage: move storage_mailbox to lib
Change-Id: I6bf83510617e51d72ce6dcbda63bfe35acff8fa5
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/storage_mailbox.py
M tests/storage_mailbox_test.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/blockSD.py
M vdsm/storage/sp.py
7 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/30/69330/1
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index 4cf1b33..fc76d21 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -49,6 +49,7 @@
resourceManager.py \
rwlock.py \
securable.py \
+ storage_mailbox.py \
task.py \
taskManager.py \
threadPool.py \
diff --git a/vdsm/storage/storage_mailbox.py b/lib/vdsm/storage/storage_mailbox.py
similarity index 99%
rename from vdsm/storage/storage_mailbox.py
rename to lib/vdsm/storage/storage_mailbox.py
index 6a227bf..1cfd61a 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/lib/vdsm/storage/storage_mailbox.py
@@ -18,6 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
+from __future__ import absolute_import
import os
import errno
import time
diff --git a/tests/storage_mailbox_test.py b/tests/storage_mailbox_test.py
index 08aa60d..4d9ed82 100644
--- a/tests/storage_mailbox_test.py
+++ b/tests/storage_mailbox_test.py
@@ -29,10 +29,10 @@
from testlib import VdsmTestCase as TestCaseBase
from monkeypatch import MonkeyPatchScope
+import vdsm.storage.storage_mailbox as sm
from vdsm.utils import retry
from storage.sd import DOMAIN_META_DATA
-import storage.storage_mailbox as sm
MAX_HOSTS = 10
MAILER_TIMEOUT = 6
diff --git a/vdsm.spec.in b/vdsm.spec.in
index dfa33f3..975c4b4 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -950,7 +950,6 @@
%{_datadir}/%{vdsm_name}/storage/sd.py*
%{_datadir}/%{vdsm_name}/storage/sp.py*
%{_datadir}/%{vdsm_name}/storage/spbackends.py*
-%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py*
%{_datadir}/%{vdsm_name}/storage/storageServer.py*
%{_datadir}/%{vdsm_name}/storage/volume.py*
%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py*
@@ -1209,6 +1208,7 @@
%{python_sitelib}/%{vdsm_name}/storage/resourceManager.py*
%{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
%{python_sitelib}/%{vdsm_name}/storage/securable.py*
+%{python_sitelib}/%{vdsm_name}/storage/storage_mailbox.py*
%{python_sitelib}/%{vdsm_name}/storage/task.py*
%{python_sitelib}/%{vdsm_name}/storage/taskManager.py*
%{python_sitelib}/%{vdsm_name}/storage/threadPool.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index edcd55f..777ff0a 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -43,7 +43,6 @@
sd.py \
sp.py \
spbackends.py \
- storage_mailbox.py \
storageServer.py \
volume.py
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 4f64be8..d636f15 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -53,6 +53,7 @@
from vdsm.storage import multipath
from vdsm.storage import resourceManager as rm
from vdsm.storage.persistent import PersistentDict, DictValidator
+from vdsm.storage.storage_mailbox import MAILBOX_SIZE
from vdsm.storage.threadlocal import vars
import vdsm.supervdsm as svdsm
@@ -60,7 +61,6 @@
from sdm import volume_artifacts
import blockVolume
import resourceFactories
-from storage_mailbox import MAILBOX_SIZE
STORAGE_DOMAIN_TAG = "RHAT_storage_domain"
STORAGE_UNREADY_DOMAIN_TAG = STORAGE_DOMAIN_TAG + "_UNREADY"
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 3972cb7..773c7f1 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -40,10 +40,10 @@
from vdsm.storage import misc
from vdsm.storage import mount
from vdsm.storage import resourceManager as rm
+from vdsm.storage import storage_mailbox
from vdsm.storage import xlease
from vdsm.storage.securable import secured, unsecured
-import storage_mailbox
import blockSD
import fileSD
import sd
--
To view, visit https://gerrit.ovirt.org/69330
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bf83510617e51d72ce6dcbda63bfe35acff8fa5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 2 months
Change in vdsm[master]: schema: customizable hook name
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: schema: customizable hook name
......................................................................
schema: customizable hook name
getCaps response contains hook names which by design can be any string.
We need to support following naming scheme in validation.
Change-Id: Icb20039ef1d3bba32518dd23e6b30506cb77e0ec
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M lib/api/vdsmapi.py
M tests/vdsmapi_test.py
3 files changed, 224 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/59251/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index b537e8e..87efa86 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -6,9 +6,9 @@
name: AutoNumaBalancingStatus
type: enum
values:
- DISABLE: Auto numa balancing is not active
- ENABLE: Auto numa balancing is active
- UNKNOWN: Can't get the status(maybe not support in this kernel
+ 0: Auto numa balancing is not active
+ 1: Auto numa balancing is active
+ 2: Can't get the status(maybe not support in this kernel
version)
BalloonInfo: &BalloonInfo
@@ -1390,7 +1390,7 @@
name: HookScriptAdditional
properties:
- description: A key for hook script information
- name: 50_vmfex
+ name: custom_name
type: *HookScriptInfo
type: object
@@ -4190,7 +4190,8 @@
- description: The Maximum Transmission Unit size for
the bridge device
name: mtu
- type: uint
+ type: string
+ datatype: uint
- description: The default IPv6 gateway for the bridge
device
@@ -4226,15 +4227,16 @@
- description: Whether Spanning Tree Protocol status
for the bridge device should be turned on
name: stp
- type: boolean
+ type: string
- - description: A map containing information about the
+ - defaultvalue: no-default
+ description: A map containing information about the
bridge specific options.
name: opts
type: *StringMap
added: '3.4'
- - defaultvalue: needs updating
+ - defaultvalue: no-default
description: host traffic QoS params.
name: hostQos
type: *HostQoSParams
@@ -4247,7 +4249,8 @@
- string
added: '3.4'
- - description: Always True to distinguish this type
+ - defaultvalue: no-default
+ description: Always True to distinguish this type
from NetInfoBridgelessNetwork
name: bridged
type: boolean
@@ -4256,6 +4259,21 @@
the bridge device
name: addr
type: string
+
+ - defaultvalue: no-default
+ description: The network device associated with the network
+ name: iface
+ type: string
+
+ - defaultvalue: no-default
+ description: Specify Switch. Legacy is used if not passed
+ name: switch
+ type: string
+
+ - defaultvalue: no-default
+ description: Whether use stateless autoconfiguration
+ name: ipv6autoconf
+ type: boolean
type: object
NetInfoBridgeMap: &NetInfoBridgeMap
@@ -5393,7 +5411,12 @@
name: SoftwarePackage
type: enum
values:
+ glusterfs: Glusterfs binary and glusterfs translator modules common
glusterfs-cli: GlusterFS a distributed file-system cli
+ glusterfs-geo-replication: Glusterfs geo-replication support
+ glusterfs-fuse: FUSE based clients and glusterfsd
+ glusterfs-rdma: Supports to ib-verbs library neede by Glusterfs
+ glusterfs-server: Glusterfs server daemon
kernel: The Linux kernel
librbd1: RADOS block device client library
libvirt: Low level virtualization API
diff --git a/lib/api/vdsmapi.py b/lib/api/vdsmapi.py
index 36d28e2..8cd4d69 100644
--- a/lib/api/vdsmapi.py
+++ b/lib/api/vdsmapi.py
@@ -297,6 +297,8 @@
unknown_props = [key for key in arg
if key not in prop_names]
if unknown_props:
+ if 'custom_name' in prop_names:
+ return
self._report_inconsistency('Following parameters %s were not'
' recognized' % (unknown_props))
# iterate over properties
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index f80a27c..8599990 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -479,3 +479,193 @@
sub_id = '|virt|VM_status|426aef82-ea1d-4442-91d3-fd876540e0f0'
_events_schema.events_schema().verify_event_params(sub_id, params)
+
+ def test_get_caps(self):
+ ret = {'HBAInventory': {'iSCSI': [{'InitiatorName': 'iqn.1994-05.co'}],
+ 'FC': []},
+ 'packages2': {'kernel': {'release': '201.fc23.x86_64',
+ 'buildtime': 1463837389.0,
+ 'version': '4.5.5'},
+ 'glusterfs-rdma': {'release': '1.fc23',
+ 'buildtime': 1460984315,
+ 'version': '3.7.11'},
+ 'glusterfs-fuse': {'release': '1.fc23',
+ 'buildtime': 1460984315,
+ 'version': '3.7.11'},
+ 'spice-server': {'release': '1.fc23',
+ 'buildtime': 1444215420,
+ 'version': '0.12.6'},
+ 'librbd1': {'release': '2.fc23',
+ 'buildtime': 1463433911,
+ 'version': '0.94.7'},
+ 'vdsm': {'release': '73.git2105bb3.fc23',
+ 'buildtime': 1465561223,
+ 'version': '4.18.999'},
+ 'qemu-kvm': {'release': '10.fc23',
+ 'buildtime': 1464278628,
+ 'version': '2.4.1'},
+ 'glusterfs': {'release': '1.fc23',
+ 'buildtime': 1460984315,
+ 'version': '3.7.11'},
+ 'libvirt': {'release': '1.fc23',
+ 'buildtime': 1462407395,
+ 'version': '1.2.18.3'},
+ 'qemu-img': {'release': '10.fc23',
+ 'buildtime': 1464278628,
+ 'version': '2.4.1'},
+ 'mom': {'release': '1.fc23',
+ 'buildtime': 1464783301,
+ 'version': '0.5.4'},
+ 'glusterfs-geo-replication': {'release': '1.fc23',
+ 'buildtime': 14605,
+ 'version': '3.7.1'},
+ 'glusterfs-server': {'release': '1.fc23',
+ 'buildtime': 1460984315,
+ 'version': '3.7.11'},
+ 'glusterfs-cli': {'release': '1.fc23',
+ 'buildtime': 1460984315,
+ 'version': '3.7.11'}},
+ 'numaNodeDistance': {'0': [10]},
+ 'cpuModel': 'Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz',
+ 'liveMerge': 'true',
+ 'hooks': {'before_nic_hotplug':
+ {'50_vmfex': {'md5': 'e05994261acaea7dcf4b88ea'}},
+ 'before_device_migrate_destination':
+ {'50_vmfex': {'md5': 'e05994261acaea7dcf4b88ea'}},
+ 'before_device_create':
+ {'50_vmfex': {'md5': 'e05994261acaea7dcf4b88ea'}},
+ 'my_custom_hook':
+ {'my_name.py': {'md5': 'e05994261acaea7dcf4b88ea'}}},
+ 'supportsIPv6': True,
+ 'vmTypes': ['kvm'],
+ 'selinux': {'mode': '1'},
+ 'liveSnapshot': 'true',
+ 'kdumpStatus': 0,
+ 'networks': {'ovirtmgmt': {'iface': 'ovirtmgmt',
+ 'ipv4addrs': ['192.168.1.106/24'],
+ 'addr': '192.168.1.106',
+ 'ipv6addrs': [],
+ 'netmask': '255.255.255.0',
+ 'mtu': '1500',
+ 'dhcpv4': True,
+ 'switch': 'legacy',
+ 'dhcpv6': False,
+ 'stp': 'off',
+ 'bridged': True,
+ 'ipv6gateway': '::',
+ 'gateway': '192.168.1.1',
+ 'ports': ['eno1']}},
+ 'kernelArgs': 'BOOT_IMAGE=/vmlinuz-4.5.5-201.fc23.x86_64 ro',
+ 'bridges': {'ovirtmgmt':
+ {'ipv6autoconf': True,
+ 'addr': '192.168.1.106',
+ 'ipv6addrs': [],
+ 'mtu': '1500',
+ 'dhcpv4': True,
+ 'netmask': '255.255.255.0',
+ 'dhcpv6': False,
+ 'stp': 'off',
+ 'ipv4addrs': ['192.168.1.106/24'],
+ 'ipv6gateway': '::',
+ 'gateway': '192.168.1.1',
+ 'opts':
+ {'multicast_last_member_count': '2',
+ 'vlan_protocol': '0x8100',
+ 'hash_elasticity': '4',
+ 'multicast_query_response_interval': '1000',
+ 'group_fwd_mask': '0x0',
+ 'multicast_snooping': '1',
+ 'multicast_startup_query_interval': '3125',
+ 'hello_timer': '0',
+ 'multicast_querier_interval': '25500',
+ 'max_age': '2000',
+ 'hash_max': '512',
+ 'stp_state': '0',
+ 'topology_change_detected': '0',
+ 'priority': '32768',
+ 'multicast_membership_interval': '26000',
+ 'root_path_cost': '0',
+ 'root_port': '0',
+ 'multicast_querier': '0',
+ 'multicast_startup_query_count': '2',
+ 'nf_call_iptables': '0',
+ 'hello_time': '200',
+ 'topology_change': '0',
+ 'bridge_id': '8000.b8ca3aa977e2',
+ 'topology_change_timer': '0',
+ 'ageing_time': '30000',
+ 'nf_call_ip6tables': '0',
+ 'gc_timer': '2191',
+ 'root_id': '8000.b8ca3aa977e2',
+ 'nf_call_arptables': '0',
+ 'group_addr': '1:80:c2:0:0:0',
+ 'multicast_last_member_interval': '100',
+ 'default_pvid': '1',
+ 'multicast_query_interval': '12500',
+ 'multicast_query_use_ifaddr': '0',
+ 'tcn_timer': '0',
+ 'multicast_router': '1',
+ 'vlan_filtering': '0',
+ 'forward_delay': '0'},
+ 'ports': ['eno1']}},
+ 'uuid': '4C4C4544-0046-4E10-8032-B2C04F385A31',
+ 'onlineCpus': '0,1,2,3,4,5,6,7',
+ 'dnss': ['192.168.1.1'],
+ 'nics': {'eno1': {'ipv6autoconf': False,
+ 'addr': '',
+ 'speed': 1000,
+ 'ipv6addrs': [],
+ 'mtu': '1500',
+ 'dhcpv4': False,
+ 'netmask': '',
+ 'dhcpv6': False,
+ 'ipv4addrs': [],
+ 'hwaddr': 'b8:ca:3a:a9:77:e2',
+ 'ipv6gateway': '::',
+ 'gateway': ''}},
+ 'software_revision': '73',
+ 'hostdevPassthrough': 'false',
+ 'clusterLevels': ['3.5', '3.6', '4.0'],
+ 'cpuFlags': 'fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep',
+ 'ISCSIInitiatorName': 'iqn.1994-05.com.redhat:7d366003913',
+ 'netConfigDirty': 'False',
+ 'supportedENGINEs': ['3.5', '3.6', '4.0'],
+ 'autoNumaBalancing': 0,
+ 'additionalFeatures': ['GLUSTER_SNAPSHOT', 'GLUSTER_GEO_RE'],
+ 'reservedMem': '321',
+ 'bondings': {'bond0': {'ipv6autoconf': True,
+ 'addr': '',
+ 'ipv6addrs': [],
+ 'switch': 'legacy',
+ 'active_slave': '',
+ 'mtu': '1500',
+ 'dhcpv4': False,
+ 'netmask': '',
+ 'dhcpv6': False,
+ 'ipv4addrs': [],
+ 'hwaddr': '3a:02:ff:17:ac:74',
+ 'slaves': [],
+ 'ipv6gateway': '::',
+ 'gateway': '',
+ 'opts': {'mode': '0'}}},
+ 'software_version': '4.18',
+ 'memSize': '15934',
+ 'cpuSpeed': '1600.125',
+ 'numaNodes': {'0': {'totalMemory': '15934',
+ 'cpus': [0, 1, 2, 3, 4, 5, 6, 7]}},
+ 'cpuSockets': '1',
+ 'vlans': {},
+ 'lastClientIface': 'ovirtmgmt',
+ 'cpuCores': '4',
+ 'kvmEnabled': 'true',
+ 'guestOverhead': '65',
+ 'version_name': 'Snow Man',
+ 'cpuThreads': '8',
+ 'emulatedMachines': ['pc-q35-2.0', 'pc-q35-2.1'],
+ 'rngSources': ['hwrng', 'random'],
+ 'operatingSystem': {'release': '1',
+ 'version': '23',
+ 'name': 'Fedora'}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('Host', 'getCapabilities'), ret)
--
To view, visit https://gerrit.ovirt.org/59251
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb20039ef1d3bba32518dd23e6b30506cb77e0ec
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years, 2 months
Change in vdsm[master]: storage_mailbox.SPM_MailMonitor: pass poolID to init
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage_mailbox.SPM_MailMonitor: pass poolID to init
......................................................................
storage_mailbox.SPM_MailMonitor: pass poolID to init
A recent patch made SPM_MailMonitor not use anyting of the pool object,
except for its poolID. Thus, we can make SPM_MailMonitor more similar to
HSM_Mailbox, by accepting only the poolID.
The change makes storage_mailbox less dependent on other vdsm.storage
stuff, and makes its tests simpler.
Change-Id: I6b4fdc206e6533a3b46a356e3fa49b32aacc096b
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/storage_mailbox_test.py
M vdsm/storage/storage_mailbox.py
2 files changed, 7 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/70415/1
diff --git a/tests/storage_mailbox_test.py b/tests/storage_mailbox_test.py
index 12a6115..821991e 100644
--- a/tests/storage_mailbox_test.py
+++ b/tests/storage_mailbox_test.py
@@ -32,6 +32,7 @@
MAX_HOSTS = 10
MAILER_TIMEOUT = 6
MONITOR_INTERVAL = 0.1
+SPUUID = '5d928855-b09b-47a7-b920-bd2d2eb5808c'
@contextlib.contextmanager
@@ -45,19 +46,13 @@
os.remove(fname)
-class StoragePoolStub(object):
- def __init__(self):
- self.spUUID = '5d928855-b09b-47a7-b920-bd2d2eb5808c'
-
-
class SPM_MailMonitorTests(TestCaseBase):
def testThreadLeak(self):
- pool = StoragePoolStub()
with mailbox_file() as inbox:
with mailbox_file() as outbox:
mailer = sm.SPM_MailMonitor(
- pool, 100,
+ SPUUID, 100,
inbox=inbox,
outbox=outbox,
monitorInterval=MONITOR_INTERVAL)
@@ -86,17 +81,16 @@
received_messages.append((msg_id, data))
msg_processed.set()
- pool = StoragePoolStub()
with mailbox_file() as inbox:
with mailbox_file() as outbox:
hsm_mb = sm.HSM_Mailbox(
- hostID=7, poolID=pool.spUUID,
+ hostID=7, poolID=SPUUID,
inbox=outbox,
outbox=inbox,
monitorInterval=MONITOR_INTERVAL)
try:
spm_mm = sm.SPM_MailMonitor(
- pool, MAX_HOSTS,
+ SPUUID, MAX_HOSTS,
inbox=inbox,
outbox=outbox,
monitorInterval=MONITOR_INTERVAL)
@@ -104,7 +98,7 @@
spm_mm.registerMessageType("xtnd", spm_callback)
VOL_DATA = dict(
- poolID=pool.spUUID,
+ poolID=SPUUID,
domainID='8adbc85e-e554-4ae0-b318-8a5465fe5fe1',
volumeID='d772f1c6-3ebb-43c3-a42e-73fcd8255a5f')
REQUESTED_SIZE = 100
diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py
index 8b1ddc7..9288a3a 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/vdsm/storage/storage_mailbox.py
@@ -523,7 +523,7 @@
def unregisterMessageType(self, messageType):
del self._messageTypes[messageType]
- def __init__(self, pool, maxHostID, inbox, outbox, monitorInterval=2):
+ def __init__(self, poolID, maxHostID, inbox, outbox, monitorInterval=2):
"""
Note: inbox paramerter here should point to the HSM's outbox
mailbox file, and vice versa.
@@ -532,7 +532,7 @@
# Save arguments
self._stop = False
self._stopped = False
- self._poolID = str(pool.spUUID)
+ self._poolID = poolID
tpSize = config.getint('irs', 'thread_pool_size') / 2
waitTimeout = wait_timeout(monitorInterval)
maxTasks = config.getint('irs', 'max_tasks')
--
To view, visit https://gerrit.ovirt.org/70415
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b4fdc206e6533a3b46a356e3fa49b32aacc096b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 2 months
Change in vdsm[master]: use os.path.join with P_VDSM_RUN
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: use os.path.join with P_VDSM_RUN
......................................................................
use os.path.join with P_VDSM_RUN
In three places the code assumes that P_VDSM_RUN ends with a slash.
Using os.path.join makes the code a bit more robust to common slash
forgetfulness. This makes it possible to make a couple of tests slightly
less ugly.
Change-Id: I51b14fca58345430a8556301b781e9f55713a55b
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M lib/vdsm/network/dhclient_monitor.py
M lib/vdsm/network/ifacetracking.py
M tests/vm_test.py
M tests/vmfakelib.py
M tests/vmrecovery_test.py
6 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/70313/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 44a36b9..e109bc6 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -80,7 +80,7 @@
P_VDSM_HOOKS = '@HOOKSDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_LIB = '@VDSMLIBDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_RUN = '@VDSMRUNDIR@/' # NOQA: E501 (potentially long line)
-P_VDSM_STORAGE = P_VDSM_RUN + 'storage/'
+P_VDSM_STORAGE = os.path.join(P_VDSM_RUN, 'storage/')
P_VDSM_CONF = '@CONFDIR@/' # NOQA: E501 (potentially long line)
P_VDSM_KEYS = '/etc/pki/vdsm/keys/'
P_VDSM_CERT = '/etc/pki/vdsm/certs/vdsmcert.pem'
diff --git a/lib/vdsm/network/dhclient_monitor.py b/lib/vdsm/network/dhclient_monitor.py
index 4a86960..4e7944e 100644
--- a/lib/vdsm/network/dhclient_monitor.py
+++ b/lib/vdsm/network/dhclient_monitor.py
@@ -41,7 +41,7 @@
IFACE_KEY = 'iface'
-MONITOR_FOLDER = P_VDSM_RUN + 'sourceRoutes'
+MONITOR_FOLDER = os.path.join(P_VDSM_RUN, 'sourceRoutes')
def start():
diff --git a/lib/vdsm/network/ifacetracking.py b/lib/vdsm/network/ifacetracking.py
index ffa3071..d1142b2 100644
--- a/lib/vdsm/network/ifacetracking.py
+++ b/lib/vdsm/network/ifacetracking.py
@@ -25,7 +25,7 @@
from vdsm.utils import rmFile
-TRACKED_INTERFACES_FOLDER = P_VDSM_RUN + 'trackedInterfaces'
+TRACKED_INTERFACES_FOLDER = os.path.join(P_VDSM_RUN, 'trackedInterfaces')
def add(device_name):
diff --git a/tests/vm_test.py b/tests/vm_test.py
index c7324cf..b0b2ff5 100644
--- a/tests/vm_test.py
+++ b/tests/vm_test.py
@@ -106,7 +106,7 @@
def assertBuildCmdLine(self, confToDom):
with namedTemporaryDir() as tmpDir:
- with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpDir + '/')]):
+ with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpDir)]):
for conf, expectedXML in confToDom:
expectedXML = expectedXML % conf
diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py
index c240c19..5a5e630 100644
--- a/tests/vmfakelib.py
+++ b/tests/vmfakelib.py
@@ -240,7 +240,7 @@
cif=None, create_device_objects=False,
post_copy=None):
with namedTemporaryDir() as tmpDir:
- with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpDir + '/'),
+ with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpDir),
(libvirtconnection, 'get', Connection),
(containersconnection, 'get', Connection),
(vm.Vm, 'send_status_event',
diff --git a/tests/vmrecovery_test.py b/tests/vmrecovery_test.py
index 2c8cc15..d69c872 100644
--- a/tests/vmrecovery_test.py
+++ b/tests/vmrecovery_test.py
@@ -140,7 +140,7 @@
@contextlib.contextmanager
def setup_env(self):
with fake.VM() as testvm, namedTemporaryDir() as tmpdir:
- with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpdir + '/')]):
+ with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpdir)]):
yield testvm, tmpdir
@@ -188,7 +188,7 @@
def test_clean_vm_files(self):
with fake.VM() as testvm, namedTemporaryDir() as tmpdir:
- with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpdir + '/')]):
+ with MonkeyPatchScope([(constants, 'P_VDSM_RUN', tmpdir)]):
stored = recovery.File(testvm.id)
stored.save(testvm)
@@ -212,7 +212,7 @@
with namedTemporaryDir() as tmpdir:
with MonkeyPatchScope([
- (constants, 'P_VDSM_RUN', tmpdir + '/'),
+ (constants, 'P_VDSM_RUN', tmpdir),
(recovery, '_list_domains', lambda: []),
(containersconnection, 'recovery', lambda: []),
]):
--
To view, visit https://gerrit.ovirt.org/70313
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I51b14fca58345430a8556301b781e9f55713a55b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 2 months
Change in vdsm[master]: Upgrade test - add more old repos to upgrade from
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Upgrade test - add more old repos to upgrade from
......................................................................
Upgrade test - add more old repos to upgrade from
This patch adds master snapshot repo to the test.
Change-Id: I62124b45b8084c49c678e03287aa71f8eabb7f70
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M tests/functional/upgrade_vdsm_test.py
1 file changed, 9 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/67788/1
diff --git a/tests/functional/upgrade_vdsm_test.py b/tests/functional/upgrade_vdsm_test.py
index 792acf7..6d7433c 100644
--- a/tests/functional/upgrade_vdsm_test.py
+++ b/tests/functional/upgrade_vdsm_test.py
@@ -21,8 +21,10 @@
from vdsm.tool.service import service_start, service_status, service_stop
from testlib import VdsmTestCase
+from testlib import permutations, expandPermutations
-el7_ovirt36_repo = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/el7/'
+_EL7_OVIRT36_REPO_URL = 'http://resources.ovirt.org/pub/ovirt-3.6/rpm/el7/'
+_EL7_MASTER_REPO_URL = 'http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el7/'
def run_command(command):
@@ -56,19 +58,21 @@
run_command(['yum', 'install', '-y', 'vdsm'])
service_start('vdsmd')
- def service_up_test(self):
+ @permutations((_EL7_MASTER_REPO_URL, _EL7_OVIRT36_REPO_URL))
+ def service_up_test(self, old_repo):
service_start('vdsmd')
vdsm_version = run_command(['rpm', '-q', 'vdsm'])
- downgrade_vdsm(el7_ovirt36_repo)
+ downgrade_vdsm(old_repo)
upgrade_vdsm()
self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version)
self.assertEqual(service_status('vdsmd'), 0)
- def service_down_test(self):
+ @permutations((_EL7_MASTER_REPO_URL, _EL7_OVIRT36_REPO_URL))
+ def service_down_test(self, old_repo):
service_stop('vdsmd')
vdsm_version = run_command(['rpm', '-q', 'vdsm'])
- downgrade_vdsm(el7_ovirt36_repo)
+ downgrade_vdsm(old_repo)
upgrade_vdsm()
self.assertEqual(run_command(['rpm', '-q', 'vdsm']), vdsm_version)
--
To view, visit https://gerrit.ovirt.org/67788
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I62124b45b8084c49c678e03287aa71f8eabb7f70
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
7 years, 2 months
Change in vdsm[master]: spec: use native ssl implementation in Fedora
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: spec: use native ssl implementation in Fedora
......................................................................
spec: use native ssl implementation in Fedora
Vdsm no longer work with Fedora 25's m2crypto. Let us use the native
implementaiton instead.
Change-Id: Id4c0f461b93bbfbd2c9e350eaa6a7cd8d3760047
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/71248/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index dbf2267..dc37287 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -711,7 +711,9 @@
-e 's/^raw_version_revision =.*/raw_version_revision = "'"${rawversion}"'"/' \
-e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' lib/vdsm/dsaversion.py
+%if ! 0%{?fedora} >= 25
sed -i -e 's/@SSL_IMPLEMENTATION@/m2c/g' lib/vdsm/config.py
+%endif
sed -i -e 's\@VDSMRPCPYLIBDIR@\%{python_sitelib}/%{vdsm_name}/rpc\g' lib/vdsm/constants.py
--
To view, visit https://gerrit.ovirt.org/71248
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4c0f461b93bbfbd2c9e350eaa6a7cd8d3760047
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 2 months
Change in vdsm[master]: m2c: signature change in getsockopt
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: m2c: signature change in getsockopt
......................................................................
m2c: signature change in getsockopt
In 0.23 m2c there was delegation to socket.getsockopt by using apply
function:
def getsockopt(self, *args):
return apply(self.socket.getsockopt, args)
Whereas in 0.25 the implementation has changed [1] to:
def getsockopt(self, level, optname, buflen=None):
return self.socket.getsockopt(level, optname, buflen)
The above issue is causing:
<type 'exceptions.TypeError'>:an integer is required
from /usr/lib64/python2.7/asyncore.py|set_reuse_addr|313
In order to fix it we need to unpack arg tuple ourselves.
[1]
https://gitlab.com/m2crypto/m2crypto/commit/6ffc9561a6cf3b5e1f4002d5cd2be...
Bug-Url: https://bugzilla.redhat.com/1414075
Change-Id: I851445fc6b7c463e062e5eb4964a40dd1d8a6fd5
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/vdsm/m2cutils.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Piotr Kliczewski: Verified
Jenkins CI: Passed CI tests
Irit Goihman: Looks good to me, but someone else must approve
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/71246
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I851445fc6b7c463e062e5eb4964a40dd1d8a6fd5
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 3 months
Change in vdsm[master]: automation: add python3-dateutil package
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: automation: add python3-dateutil package
......................................................................
automation: add python3-dateutil package
python3 tests are failing in check-patch.fc24 due
to missing python3-dateutil package.
Added this package both in check-patch and build
artifacts jobs for fedora 24.
Change-Id: I10930fd15bedc63f899cb6c802d0d8dc603395ee
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M automation/build-artifacts.packages.fc24
M automation/check-patch.packages.fc24
2 files changed, 2 insertions(+), 0 deletions(-)
Approvals:
Piotr Kliczewski: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/71488
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I10930fd15bedc63f899cb6c802d0d8dc603395ee
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 3 months
Change in vdsm[master]: automation: add python3-dateutil package
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: automation: add python3-dateutil package
......................................................................
Patch Set 1: Code-Review+2 Verified+1
--
To view, visit https://gerrit.ovirt.org/71488
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I10930fd15bedc63f899cb6c802d0d8dc603395ee
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 3 months
Change in vdsm[master]: net test: Add network over a configured NM bond+vlan.
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: net test: Add network over a configured NM bond+vlan.
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/71203
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2d5b29b0ee4b72bd5b2170a154696ff48560a4f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
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
7 years, 3 months