Change in vdsm[master]: yml: return type fixes for Host.hostdevListByCaps
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for Host.hostdevListByCaps
......................................................................
yml: return type fixes for Host.hostdevListByCaps
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Change-Id: I6ad09c310a76dde9267824a337fadf3b1c02bd45
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 178 insertions(+), 54 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/59703/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 6cb6c9a..a289b7f 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -1382,57 +1382,119 @@
type: *BandwidthCurve
type: object
+ HostDeviceAddress: &HostDeviceAddress
+ description: A host device address
+ name: HostDeviceAddress
+ properties:
+ - description: bus
+ name: bus
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: device
+ name: device
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: slot
+ name: slot
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: domain
+ name: domain
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: function
+ name: function
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: host
+ name: host
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: target
+ name: target
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: lun
+ name: lun
+ type: string
+ datatype: uint
+ type: object
+
HostDeviceParams: &HostDeviceParams
added: '3.6'
description: A host device parameters
name: HostDeviceParams
properties:
- - description: The iommu group which the device belongs
- to
- name: iommu_group
- type: uint
-
- description: The capability of the device (usually
pci, usb_device, scsi)
name: capability
type: string
- - description: String representation of the vendor
+ - defaultvalue: no-default
+ description: String representation of the vendor
name: vendor
type: string
- - defaultvalue: null
- description: Name of the physical function that this
- VF belongs to. Also reported for physical function
- itself, therefore in order to detect PF one must
- consider the tuple (totalvfs, physfn). (if sriov
- capable)
- name: physfn
- type: string
-
- - defaultvalue: null
- description: Number of available virtual functions
- (if sriov capable)
- name: totalvfs
- type: uint
-
- - description: Hexadecimal representation of the vendor
+ - defaultvalue: no-default
+ description: Hexadecimal representation of the vendor
name: vendor_id
type: string
- - description: String representation of the product
+ - defaultvalue: no-default
+ description: String representation of the product
specified by vendor
name: product
type: string
- - description: Name of the parent device
+ - defaultvalue: no-default
+ description: Name of the parent device
name: parent
type: string
- - description: Hexadecimal representation of the product
+ - defaultvalue: no-default
+ description: Hexadecimal representation of the product
specified by vendor
name: product_id
type: string
+
+ - defaultvalue: no-default
+ description: Assignable flag
+ name: is_assignable
+ type: boolean
+
+ - defaultvalue: no-default
+ description: Values like usbhid, usb, qxl or sd
+ name: driver
+ type: string
+
+ - defaultvalue: no-default
+ description: Network interface assigned to a device
+ name: interface
+ type: string
+
+ - defaultvalue: no-default
+ description: device udev path
+ name: udev_path
+ type: string
+
+ - defaultvalue: no-default
+ description: device address
+ name: address
+ type: *HostDeviceAddress
type: object
HostDevice: &HostDevice
@@ -1447,13 +1509,12 @@
HostDevices: &HostDevices
added: '3.6'
- description: Mapping of devices to their assignments
+ description: Mapping of device names to device details
name: HostDevices
- properties:
- - description: Name of the device
- name: deviceName
- type: *HostDevice
- type: object
+ key-type: string
+ name: HostDevices
+ type: map
+ value-type: *HostDevice
HostJobStatus: &HostJobStatus
added: '4.0'
@@ -7432,8 +7493,7 @@
- string
return:
description: A list of devices on the host
- type:
- - *HostDevices
+ type: *HostDevices
Host.hostdevChangeNumvfs:
added: '3.6'
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index fac3bf4..bff578c 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -270,27 +270,6 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('Host', 'getStats'), ret)
- def test_badly_defined_ret_type(self):
- ret = {u'pci_0000_00_1b_0':
- {u'params':
- {u'product': u'7 Series/C210 Series Chipset Family ',
- u'vendor': u'Intel Corporation',
- u'product_id': u'0x1e20',
- u'parent': u'computer',
- u'vendor_id': u'0x8086',
- u'capability': u'pci',
- u'address': {u'slot': u'27',
- u'bus': u'0',
- u'domain': u'0',
- u'function': u'0'}}}}
-
- # type definition is broken for this verb
- with self.assertRaises(JsonRpcError) as e:
- _schema.schema().verify_retval(
- vdsmapi.MethodRep('Host', 'hostdevListByCaps'), ret)
-
- self.assertIn('is not a list', e.exception.message)
-
def test_allvmstats(self):
ret = [{'vcpuCount': '1',
'displayInfo': [{'tlsPort': u'5900',
@@ -516,3 +495,88 @@
_schema.schema().verify_args(
vdsmapi.MethodRep('StoragePool', 'connect'), params)
+
+ def test_host_list_caps(self):
+ ret = {'net_eth0_52_54_00_56_00_39':
+ {'params': {'capability': 'net',
+ 'interface': 'eth0',
+ 'parent': 'pci_0000_00_03_0',
+ 'is_assignable': 'true'}},
+ 'computer':
+ {'params': {'capability': 'system',
+ 'is_assignable': 'true',
+ 'product': 'Standard PC (i440FX + PIIX, 1996)'}},
+ 'usb_1_1_1_0':
+ {'params': {'capability': 'usb',
+ 'is_assignable': 'true',
+ 'driver': 'usbhid',
+ 'parent': 'usb_1_1'}},
+ 'scsi_target7_0_0':
+ {'params': {'capability': 'scsi_target',
+ 'is_assignable': 'true',
+ 'parent': 'scsi_host7'}},
+ 'usb_usb1':
+ {'params': {'product': '2.0 root hub',
+ 'vendor': 'Linux Foundation',
+ 'product_id': '0x0002',
+ 'parent': 'pci_0000_00_05_7',
+ 'vendor_id': '0x1d6b',
+ 'driver': 'usb',
+ 'capability': 'usb_device',
+ 'is_assignable': 'true',
+ 'address': {'device': '1', 'bus': '1'}}},
+ 'pci_0000_00_02_0':
+ {'params': {'product': 'QXL paravirtual graphic card',
+ 'vendor': 'Red Hat, Inc.',
+ 'product_id': '0x0100',
+ 'parent': 'computer',
+ 'vendor_id': '0x1b36',
+ 'driver': 'qxl',
+ 'capability': 'pci',
+ 'is_assignable': 'true',
+ 'address': {'slot': '2',
+ 'bus': '0',
+ 'domain': '0',
+ 'function': '0'}}},
+ 'scsi_5_0_0_18':
+ {'params': {'product': 'target1-18',
+ 'vendor': 'LIO-ORG',
+ 'parent': 'scsi_target5_0_0',
+ 'driver': 'sd',
+ 'capability': 'scsi',
+ 'is_assignable': 'true',
+ 'udev_path': '/dev/sg2',
+ 'address': {'bus': '0',
+ 'host': '5',
+ 'target': '0',
+ 'lun': '18'}}},
+ 'scsi_host5':
+ {'params': {'capability': 'scsi_host',
+ 'is_assignable': 'true',
+ 'parent': 'computer'}},
+ 'scsi_generic_sg26':
+ {'params': {'capability': 'scsi_generic',
+ 'is_assignable': 'true',
+ 'udev_path': '/dev/sg26',
+ 'parent': 'scsi_6_0_0_14'}},
+ 'scsi_6_0_0_14':
+ {'params': {'product': 'target2-14',
+ 'vendor': 'LIO-ORG',
+ 'parent': 'scsi_target6_0_0',
+ 'driver': 'sd',
+ 'capability': 'scsi',
+ 'is_assignable': 'true',
+ 'udev_path': '/dev/sg26',
+ 'address': {'bus': '0',
+ 'host': '6',
+ 'target': '0',
+ 'lun': '14'}}},
+ 'block_sdr_36001405292bb96f19064f81b884fa63f':
+ {'params': {'capability': 'storage',
+ 'is_assignable': 'true',
+ 'product': 'target1-03',
+ 'vendor': 'LIO-ORG',
+ 'parent': 'scsi_5_0_0_3'}}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('Host', 'hostdevListByCaps'), ret)
--
To view, visit https://gerrit.ovirt.org/59703
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ad09c310a76dde9267824a337fadf3b1c02bd45
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
6 years, 8 months
Change in vdsm[master]: yml: parameter type fixes for StoragePool.connectStorageServer
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer
......................................................................
yml: parameter type fixes for StoragePool.connectStorageServer
Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 55 insertions(+), 82 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/59701/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index b537e8e..5eb091c 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -342,66 +342,6 @@
type: int
type: object
- IscsiCredentialsLogin: &IscsiCredentialsLogin
- added: '3.1'
- description: Login credentials for an
- ISCI target.
- name: IscsiCredentialsLogin
- properties:
- - description: The username used for
- authentication to an ISCI target
- name: username
- type: string
-
- - description: The password associated
- with the given username
- name: password
- type: string
- type: object
-
- IscsiCredentialsType: &IscsiCredentialsType
- added: '3.1'
- description: An enumeration of ISCSI login
- credentials types.
- name: IscsiCredentialsType
- type: enum
- values:
- chap: Challenge-Handshake Authentication Protocol
-
- IscsiCredentials: &IscsiCredentials
- added: '3.1'
- description: This structure stores ISCSI credentials.
- name: IscsiCredentials
- properties:
- - description: Type-specific authentication
- credentials
- name: params
- type: *IscsiCredentialsLogin
-
- - defaultvalue: chap
- description: The type of authentication to
- be used
- name: authType
- type: *IscsiCredentialsType
- type: object
-
- IscsiPortal: &IscsiPortal
- added: '3.1'
- description: A host/port pair that identifies
- an ISCSI target.
- name: IscsiPortal
- properties:
- - defaultvalue: 3260
- description: A port number
- name: port
- type: int
-
- - description: A fully-qualified domain name
- (FQDN) or IP address
- name: host
- type: string
- type: object
-
IscsiConnectionParameters: &IscsiConnectionParameters
added: '3.1'
description: Parameters for initiating a new ISCSI connection.
@@ -410,27 +350,37 @@
- defaultvalue: 1
description: The Target Portal Group Tag to use
name: tpgt
- type: int
+ type: string
+ datatype: int
- - description: An IscsiPortal to identify the requested
- target
- name: portal
- type: *IscsiPortal
+ - defaultvalue: 3260
+ description: A port number
+ name: port
+ type: string
+ typedata: int
+
+ - description: A fully-qualified domain name
+ (FQDN) or IP address
+ name: connection
+ type: string
- description: The ISCSI Qualified Name
name: iqn
type: string
- - defaultvalue: null
- description: An IscsiCredentials containing the required
- authentication information
- name: credentials
- type: *IscsiCredentials
-
- - defaultvalue: default
- description: The ISCSI interface name
- name: iface
+ - description: The username used for
+ authentication to an ISCI target
+ name: user
type: string
+
+ - description: The password associated
+ with the given username
+ name: password
+ type: string
+
+ - description: Id
+ name: id
+ type: *UUID
type: object
LocalFsConnectionParameters: &LocalFsConnectionParameters
@@ -5587,14 +5537,14 @@
name: StorageDomainType
type: enum
values:
- CIFS: The Storage Domain uses CIFS/SMB based storage
- FCP: The Storage Domain uses FibreChannel based storage
- ISCSI: The Storage Domain uses iSCSI based storage
- LOCALFS: The Storage Domain uses storage on the local file system
- NFS: The Storage Domain uses Network File System based storage
- SHAREDFS: The Storage Domain uses storage from a Linux VFS file
- system
- UNKNOWN: The type is not known
+ 2: The Storage Domain uses FibreChannel based storage
+ 3: The Storage Domain uses iSCSI based storage
+ 4: The Storage Domain uses storage on the local file system
+ 1: The Storage Domain uses Network File System based storage
+ 0: The type is not known
+ 6: The Storage Domain uses posix file system
+ 7: The Storage Domain uses glusterfs
+ 8: The Storage Domain uses cinder
StorageDomainInfo: &StorageDomainInfo
added: '3.1'
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index f80a27c..38f5449 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -479,3 +479,26 @@
sub_id = '|virt|VM_status|426aef82-ea1d-4442-91d3-fd876540e0f0'
_events_schema.events_schema().verify_event_params(sub_id, params)
+
+ def test_connect_server(self):
+ params = {u'connectionParams':
+ [{u'id': u'a454a600-b3b7-46ea-8032-717deedcd219',
+ u'connection': u'10.35.0.99',
+ u'iqn': u'iqn.2003-01.org.dumbo.target1',
+ u'user': u'',
+ u'tpgt': u'1',
+ u'password': '********',
+ u'port': u'3260'},
+ {u'id': u'48b086ae-6d80-4d6f-96ac-43c6ffcaab3e',
+ u'connection': u'10.35.0.99',
+ u'iqn': u'iqn.2003-01.org.dumbo.target2',
+ u'user': u'',
+ u'tpgt': u'1',
+ u'password': '********',
+ u'port': u'3260'}],
+ u'storagepoolID': u'636d9c59-f7ba-4115-87a1-44d6563a9610',
+ u'domainType': 3}
+
+ _schema.schema().verify_args(
+ vdsmapi.MethodRep('StoragePool', 'connectStorageServer'),
+ params)
--
To view, visit https://gerrit.ovirt.org/59701
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
6 years, 8 months
Change in vdsm[master]: [WIP]ABRT integration
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: [WIP]ABRT integration
......................................................................
[WIP]ABRT integration
Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=917062
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M init/systemd/vdsmd.service.in
M init/vdsmd_init_common.sh.in
M lib/vdsm/tool/configurators/Makefile.am
A lib/vdsm/tool/configurators/abrt.py
M vdsm.spec.in
M vdsm/vdsm-logrotate
6 files changed, 138 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/44287/1
diff --git a/init/systemd/vdsmd.service.in b/init/systemd/vdsmd.service.in
index d7d025f..ccacb2e 100644
--- a/init/systemd/vdsmd.service.in
+++ b/init/systemd/vdsmd.service.in
@@ -2,9 +2,10 @@
Description=Virtual Desktop Server Manager
Requires=multipathd.service libvirtd.service time-sync.target \
iscsid.service rpcbind.service supervdsmd.service sanlock.service \
- vdsm-network.service
+ vdsm-network.service abrtd.service
After=multipathd.service libvirtd.service iscsid.service rpcbind.service \
- supervdsmd.service sanlock.service vdsm-network.service
+ supervdsmd.service sanlock.service vdsm-network.service \
+ abrtd.service
Conflicts=libvirt-guests.service
Wants=mom-vdsm.service
diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in
index 00e4054..df2878c 100644
--- a/init/vdsmd_init_common.sh.in
+++ b/init/vdsmd_init_common.sh.in
@@ -83,16 +83,6 @@
return 0
}
-task_configure_coredump() {
- local conf_file="@CONFDIR(a)/vdsm.conf"
- local getconfitem="@VDSMDIR@/get-conf-item"
-
- if "${getconfitem}" "${conf_file}" vars core_dump_enable false |
- tr A-Z a-z | grep -q true; then
- echo "/var/log/core/core.%p.%t.dump" > /proc/sys/kernel/core_pattern
- fi
-}
-
task_configure_vdsm_logs() {
local vdsm_logs="
@VDSMLOGDIR(a)/connectivity.log
@@ -296,7 +286,6 @@
--pre-start)
run_tasks " \
mkdirs \
- configure_coredump \
configure_vdsm_logs \
wait_for_network \
run_init_hooks \
diff --git a/lib/vdsm/tool/configurators/Makefile.am b/lib/vdsm/tool/configurators/Makefile.am
index 9fc7e57..f70b4bb 100644
--- a/lib/vdsm/tool/configurators/Makefile.am
+++ b/lib/vdsm/tool/configurators/Makefile.am
@@ -21,6 +21,7 @@
dist_configurators_PYTHON = \
__init__.py \
+ abrt.py \
certificates.py \
libvirt.py \
multipath.py \
diff --git a/lib/vdsm/tool/configurators/abrt.py b/lib/vdsm/tool/configurators/abrt.py
new file mode 100644
index 0000000..778f505
--- /dev/null
+++ b/lib/vdsm/tool/configurators/abrt.py
@@ -0,0 +1,132 @@
+# Copyright 2015 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 sys
+import os
+
+from .import \
+ MAYBE, \
+ NO
+from .. import service
+from ... import utils
+from ... import constants
+
+from .. import conf_utils
+
+CONF_VERSION = '4.17.0'
+
+
+services = ("abrtd",)
+
+
+def configure():
+
+ conf_utils.remove_conf(FILES, CONF_VERSION)
+
+ for conf_file, content in FILES.items():
+ content['configure'](content, CONF_VERSION)
+
+
+def isconfigured():
+ """
+ Check if abrt is already configured for vdsm
+ """
+ ret = MAYBE
+
+ for path in (conf_utils.get_persisted_files(FILES)):
+ if not conf_utils.open_config(path, CONF_VERSION).hasConf():
+ ret = NO
+
+ if ret == MAYBE:
+ sys.stdout.write("abrt is already configured for vdsm\n")
+ else:
+ sys.stdout.write("abrt is not configured for vdsm\n")
+ return ret
+
+
+FILES = {
+ 'ABRT_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/abrt.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'DumpLocation': '/var/tmp/abrt'
+ },
+ },
+ ]
+ },
+ 'CCPP_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/plugins/CCpp.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'Backtrace': 'yes'
+ },
+ },
+ ]
+ },
+ 'PYTHON_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/plugins/python.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'Backtrace': 'yes'
+ },
+ },
+ ]
+ },
+ 'PKG_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/abrt-action-save-package-data.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'openGPGCheck': 'no'
+ },
+ },
+ ]
+ }
+}
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 21e1b50..6e524c5 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -132,6 +132,7 @@
Requires: nfs-utils
Requires: m2crypto
Requires: libnl3
+Requires: abrt-desktop
Requires: curl
Requires: %{name}-xmlrpc = %{version}-%{release}
Requires: %{name}-jsonrpc = %{version}-%{release}
@@ -709,13 +710,6 @@
/etc/sysctl.conf
fi
-# hack until we replace core dump with abrt
-if /usr/sbin/selinuxenabled; then
- /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?'
-fi
-/sbin/restorecon -R /var/log/core >/dev/null 2>&1
-# hack until we replace core dump with abrt
-
# VDSM installs vdsm-modules-load.d.conf file - the following command will
# refresh vdsm kernel modules requirements to start on boot
/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || :
@@ -1097,6 +1091,7 @@
%{python_sitelib}/%{vdsm_name}/tool/conf_utils.py*
%{python_sitelib}/%{vdsm_name}/tool/configurator.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__*
+%{python_sitelib}/%{vdsm_name}/tool/configurators/abrt.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py*
diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-logrotate
index e2027ac..17d26ab 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-logrotate
@@ -7,12 +7,4 @@
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
-if [ -d /var/log/core ] ; then
- /usr/bin/find /var/log/core -type f -name '*xz' -mtime +7 -exec /bin/rm -f '{}' \;
- EXITVALUE=$?
- if [ $EXITVALUE != 0 ]; then
- /usr/bin/logger -t logrotate "ALERT clean old core files exited abnormally with [$EXITVALUE]"
- fi
-fi
-
exit $EXITVALUE
--
To view, visit https://gerrit.ovirt.org/44287
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
6 years, 8 months
Change in vdsm[master]: [WIP]configurators: move configurator functions into conf_utils
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: [WIP]configurators: move configurator functions into conf_utils
......................................................................
[WIP]configurators: move configurator functions into conf_utils
Change-Id: Id67a0f51adb2d543c0542a48c020d34a13d1f2ed
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M lib/vdsm/tool/Makefile.am
A lib/vdsm/tool/conf_utils.py
M vdsm.spec.in
3 files changed, 110 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/44286/1
diff --git a/lib/vdsm/tool/Makefile.am b/lib/vdsm/tool/Makefile.am
index c8979ca..c3ed0cc 100644
--- a/lib/vdsm/tool/Makefile.am
+++ b/lib/vdsm/tool/Makefile.am
@@ -35,7 +35,8 @@
dump_bonding_defaults.py \
dump_volume_chains.py \
nwfilter.py \
- configfile.py \
+ conf_utils.py \
+ configfile.py \
configurator.py \
register.py \
restore_nets.py \
diff --git a/lib/vdsm/tool/conf_utils.py b/lib/vdsm/tool/conf_utils.py
new file mode 100644
index 0000000..1308097
--- /dev/null
+++ b/lib/vdsm/tool/conf_utils.py
@@ -0,0 +1,107 @@
+# Copyright 2015 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 os
+
+from .. configfile import (
+ ConfigFile,
+)
+
+from ... import utils
+
+if utils.isOvirtNode():
+ from ovirt.node.utils.fs import Config as NodeCfg
+
+
+def get_file(fname, files):
+ return files[fname]['path']
+
+
+def remove_conf(files, version):
+ for cfile, content in files.items():
+ content['removeConf'](content['path'], version)
+
+
+def add_section(content, version, vdsmConfiguration={}):
+ """
+ Add a 'configuration section by vdsm' part to a config file.
+ This section contains only keys not originally defined
+ The section headers will include the current configuration version.
+ """
+ configuration = {}
+ for fragment in content['fragments']:
+ if vdsmConfiguration:
+ if is_applicable(fragment, vdsmConfiguration):
+ configuration.update(fragment['content'])
+ else:
+ configuration.update(fragment['content'])
+ if configuration:
+ with open_config(content['path'], version) as conff:
+ for key, val in configuration.items():
+ conff.addEntry(key, val)
+
+
+def remove_section(path, version):
+ """
+ remove entire 'configuration section by vdsm' section.
+ section is removed regardless of it's version.
+ """
+ if os.path.exists(path):
+ with open_config(path, version) as conff:
+ conff.removeConf()
+
+
+def remove_file(content, vdsmConfiguration):
+ """
+ delete a file if it exists.
+ """
+ if utils.isOvirtNode():
+ NodeCfg().delete(content['path'])
+ else:
+ try:
+ os.unlink(content['path'])
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+
+
+def get_persisted_files(files):
+ """
+ get files where vdsm is expected to add a section.
+ """
+ return [
+ cfile['path'] for cfile in files.values()
+ if cfile['persisted']
+ ]
+
+
+def open_config(path, conf_version):
+ return ConfigFile(path, conf_version)
+
+
+def is_applicable(fragment, vdsmConfiguration):
+ """
+ Return true if 'fragment' should be included for current
+ configuration. An applicable fragment is a fragment who's list
+ of conditions are met according to vdsmConfiguration.
+ """
+ applyFragment = True
+ for key, booleanValue in fragment['conditions'].items():
+ if vdsmConfiguration[key] != booleanValue:
+ applyFragment = False
+ return applyFragment
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 5020d8b..21e1b50 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1094,6 +1094,7 @@
%{python_sitelib}/%{vdsm_name}/tool/dummybr.py*
%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py*
%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py*
+%{python_sitelib}/%{vdsm_name}/tool/conf_utils.py*
%{python_sitelib}/%{vdsm_name}/tool/configurator.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__*
%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py*
--
To view, visit https://gerrit.ovirt.org/44286
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id67a0f51adb2d543c0542a48c020d34a13d1f2ed
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
6 years, 8 months
Change in vdsm[master]: yml: return type fixes for LVMVolumeGroup.getInfo
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for LVMVolumeGroup.getInfo
......................................................................
yml: return type fixes for LVMVolumeGroup.getInfo
Change-Id: I7fc2b2a3d1e8b4563b24c60601c44e851f2603e6
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 112 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/59708/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 2c139ea..d0d176c 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -131,15 +131,17 @@
- description: The SCSI Logical Unit Number associated with
this path
name: lun
- type: uint
+ type: string
+ datatype: uint
- description: The path size (in bytes)
name: capacity
- type: uint
+ type: string
+ datatype: uint
added: '3.6'
- description: The type of path (BlockDeviceType)
- name: deviceType
+ name: type
type: *BlockDeviceType
- description: The current state of this path
@@ -6755,6 +6757,63 @@
OK: All Physical Volumes are online
PARTIAL: One or more Physical Volumes are not available
+ PhisicalVolumeInfo: &PhisicalVolumeInfo
+ description: Phisical volume information.
+ name: PhisicalVolumeInfo
+ properties:
+ - description: The device logical size (in bytes)
+ name: capacity
+ type: string
+ datatype: uint
+
+ - description: The device size (in bytes)
+ name: devcapacity
+ type: string
+ datatype: uint
+
+ - description: A string identifying the device manufacturer
+ name: vendorID
+ type: string
+
+ - description: A string identifying the device model
+ name: productID
+ type: string
+
+ - description: The LVM physical volume associated with this device
+ name: pvUUID
+ type: *UUID
+
+ - description: The volume group associated with this device
+ name: vgUUID
+ type: *UUID
+
+ - description: Firmware version information
+ name: fwrev
+ type: string
+
+ - description: The type of storage device (BlockDeviceType)
+ name: devtype
+ type: *BlockDeviceType
+
+ - description: iSCSI session information
+ name: pathlist
+ type:
+ - *IscsiSessionInfo
+
+ - description: The globally unique identifier of the block device
+ name: GUID
+ type: *UUID
+
+ - description: The device serial number (if available)
+ name: serial
+ type: string
+
+ - description: Multipath information
+ name: pathstatus
+ type:
+ - *BlockDevicePathInfo
+ type: object
+
VolumeGroupInfo: &VolumeGroupInfo
added: '3.1'
description: Information about a Volume Group.
@@ -6766,12 +6825,8 @@
- description: The total capacity (in bytes)
name: vgsize
- type: uint
-
- - description: The storage type of this Volume Group's Physical
- Volumes
- name: deviceType
- type: *BlockDeviceType
+ type: string
+ datatype: uint
- description: The Volume Group name
name: name
@@ -6787,7 +6842,17 @@
- description: The amount of currently unassigned capacity (in bytes)
name: vgfree
- type: uint
+ type: string
+ datatype: uint
+
+ - description: The type of backing storage used by this domain
+ name: type
+ type: *StorageDomainType
+
+ - description: Phisical volume list
+ name: pvlist
+ type:
+ - *PhisicalVolumeInfo
type: object
VolumeStatus: &VolumeStatus
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index 1f319b1..30f5c9a 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -637,3 +637,40 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('StoragePool', 'getInfo'), ret)
+
+ def test_volume_group_info(self):
+ ret = {'state': 'OK',
+ 'vgsize': '53284438016',
+ 'name': 'b0d9c2e8-00e9-4e0e-a5d9-f9e17bb59974',
+ 'vgfree': '48855252992',
+ 'vgUUID': 'aE6hIQ-WY4M-yvgK-rNQi-YN4G-mauM-1xKp56',
+ 'pvlist': [{'vendorID': 'LIO-ORG',
+ 'capacity': '53284438016',
+ 'fwrev': '0000',
+ 'vgUUID': 'aE6hIQ-WY4M-yvgK-rNQi-YN4G-mauM-1xKp56',
+ 'pathlist': [{'connection': '10.35.0.99',
+ 'iqn': 'iqn.2003-01.org.dumbo.target',
+ 'portal': '1',
+ 'port': '3260',
+ 'initiatorname': 'default'}],
+ 'pathstatus': [{'type': 'iSCSI',
+ 'physdev': 'sdbh',
+ 'capacity': '53687091200',
+ 'state': 'active',
+ 'lun': '1'}],
+ 'devtype': 'iSCSI',
+ 'pvUUID': 'mzQhIy-eyno-YUaE-eFod-9JQU-AYeA-xgy0ma',
+ 'serial': 'SLIO-ORG_target3-01_77f3fd04-8038-4383-',
+ 'GUID': '3600140577f3fd048038438393cce45de',
+ 'devcapacity': '53687091200',
+ 'productID': 'target3-01'}],
+ 'type': 3,
+ 'attr': {'allocation': 'n',
+ 'partial': '-',
+ 'exported': '-',
+ 'permission': 'w',
+ 'clustered': '-',
+ 'resizeable': 'z'}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('LVMVolumeGroup', 'getInfo'), ret)
--
To view, visit https://gerrit.ovirt.org/59708
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fc2b2a3d1e8b4563b24c60601c44e851f2603e6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
6 years, 8 months
Change in vdsm[master]: yml: return type fixes for StoragePool.getInfo
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for StoragePool.getInfo
......................................................................
yml: return type fixes for StoragePool.getInfo
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Change-Id: Ifeadf2323d2a3535a5777d0cc16027cfb9e42f0e
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 72 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/59707/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 7dd95d1..2c139ea 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -5607,6 +5607,21 @@
7: The Storage Domain uses glusterfs
8: The Storage Domain uses cinder
+ StorageType: &StorageType
+ added: '3.1'
+ description: An enumeration of Storage Domain types.
+ name: StorageType
+ type: enum
+ values:
+ CIFS: The Storage Domain uses CIFS/SMB based storage
+ FCP: The Storage Domain uses FibreChannel based storage
+ ISCSI: The Storage Domain uses iSCSI based storage
+ LOCALFS: The Storage Domain uses storage on the local file system
+ NFS: The Storage Domain uses Network File System based storage
+ SHAREDFS: The Storage Domain uses storage from a Linux VFS file
+ system
+ UNKNOWN: The type is not known
+
StorageDomainInfo: &StorageDomainInfo
added: '3.1'
description: Information about a Storage Domain.
@@ -5666,6 +5681,18 @@
unattached: The domain is not attached to a Storage Pool
unknown: The status of the Storage Domain is not known
+ StorageStatus: &StorageStatus
+ added: '3.1'
+ description: An enumeration of Storage Domain statuses.
+ name: StorageDomainStatus
+ type: enum
+ values:
+ Active: The domain is attached to a Storage Pool and is activated
+ Attached: The domain is attached to a Storage Pool but is
+ deactivated
+ Unattached: The domain is not attached to a Storage Pool
+ Unknown: The status of the Storage Domain is not known
+
StorageDomainStatusMap: &StorageDomainStatusMap
added: '3.1'
description: A mapping of Storage Domain statuses indexed by Storage
@@ -5698,7 +5725,8 @@
properties:
- description: The remaining free disk space in bytes
name: diskfree
- type: int
+ type: string
+ datatype: int
- description: A list of alerts for this Storage Domain
name: alerts
@@ -5708,15 +5736,21 @@
- description: The total amount of disk space in the Storage
Domain in bytes
name: disktotal
- type: int
+ type: string
+ datatype: int
- description: Current Storage Domain status
name: status
- type: *StorageDomainStatus
+ type: *StorageStatus
- description: Indicates the Storage Domain version
name: version
type: int
+
+ - description: The filesystem path from where ISO images may
+ be referenced
+ name: isoprefix
+ type: string
type: object
StoragePoolDomainInfoMap: &StoragePoolDomainInfoMap
@@ -5749,15 +5783,16 @@
- description: The Storage Pool lock version
name: lver
- type: int
+ type: long
- description: The Storage Pool version
name: version
- type: int
+ type: string
+ datatype: int
- description: The type of storage managed by this Storage Pool
- name: domainType
- type: *StorageDomainType
+ name: type
+ type: *StorageType
- description: The Storage Pool name
name: name
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index eddb735..1f319b1 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -607,3 +607,33 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('StoragePool', 'getSpmStatus'), ret)
+
+ def test_info_storage(self):
+ ret = {'info':
+ {'name': 'No Description',
+ 'isoprefix': '',
+ 'pool_status': 'connected',
+ 'lver': 10,
+ 'domains': u'0900c0cd-8422-497a-85c5-1bb34b2b6b65:Active,794d',
+ 'master_uuid': '3d4accf7-74af-4ea0-b59b-eb9f10eedb83',
+ 'version': '3',
+ 'spm_id': 1,
+ 'type': 'ISCSI',
+ 'master_ver': 33},
+ 'dominfo': {u'0900c0cd-8422-497a-85c5-1bb34b2b6b65':
+ {'status': u'Active',
+ 'diskfree': '48855252992',
+ 'isoprefix': '',
+ 'alerts': [],
+ 'disktotal': '53284438016',
+ 'version': 3},
+ u'794dc113-315f-43e3-ae47-0b7b1bf56427':
+ {'status': u'Active',
+ 'diskfree': '48855252992',
+ 'isoprefix': '',
+ 'alerts': [],
+ 'disktotal': '53284438016',
+ 'version': 3}}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('StoragePool', 'getInfo'), ret)
--
To view, visit https://gerrit.ovirt.org/59707
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeadf2323d2a3535a5777d0cc16027cfb9e42f0e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
6 years, 8 months
Change in vdsm[master]: yml: parameter type fixes for StoragePool.connect
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: parameter type fixes for StoragePool.connect
......................................................................
yml: parameter type fixes for StoragePool.connect
Change-Id: I19b6f25c17e697702ec61eba6b11f256c1df4d83
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 18 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/59702/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 5eb091c..6cb6c9a 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -5599,11 +5599,11 @@
name: StorageDomainStatus
type: enum
values:
- Active: The domain is attached to a Storage Pool and is activated
- Attached: The domain is attached to a Storage Pool but is
+ active: The domain is attached to a Storage Pool and is activated
+ attached: The domain is attached to a Storage Pool but is
deactivated
- Unattached: The domain is not attached to a Storage Pool
- Unknown: The status of the Storage Domain is not known
+ unattached: The domain is not attached to a Storage Pool
+ unknown: The status of the Storage Domain is not known
StorageDomainStatusMap: &StorageDomainStatusMap
added: '3.1'
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index 38f5449..fac3bf4 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -502,3 +502,17 @@
_schema.schema().verify_args(
vdsmapi.MethodRep('StoragePool', 'connectStorageServer'),
params)
+
+ def test_sp_connect(self):
+ params = {u'masterVersion': 33,
+ u'domainDict':
+ {u'0900c0cd-8422-497a-85c5-1bb34b2b6b65': u'active',
+ u'794dc113-315f-43e3-ae47-0b7b1bf56427': u'active',
+ u'1d8235ee-c2ce-4c06-abd5-63b655fd66c5': u'active'},
+ u'storagepoolID': u'636d9c59-f7ba-4115-87a1-44d6563a9610',
+ u'scsiKey': u'636d9c59-f7ba-4115-87a1-44d6563a9610',
+ u'masterSdUUID': u'3d4accf7-74af-4ea0-b59b-eb9f10eedb83',
+ u'hostID': 1}
+
+ _schema.schema().verify_args(
+ vdsmapi.MethodRep('StoragePool', 'connect'), params)
--
To view, visit https://gerrit.ovirt.org/59702
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19b6f25c17e697702ec61eba6b11f256c1df4d83
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
6 years, 8 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>
6 years, 9 months
Change in vdsm[master]: py3: make toolBondingTests pass
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: py3: make toolBondingTests pass
......................................................................
py3: make toolBondingTests pass
I don't really know why, but under Python 3, file.close() seems to issue
another attempt to flush "invalid" data. The added code explicitly
ignores the ensuing exception.
Change-Id: I4487b787c3a14ca9508847572622f431f1188e7f
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/network/netinfo/bonding.py
M tests/Makefile.am
2 files changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/65666/1
diff --git a/lib/vdsm/network/netinfo/bonding.py b/lib/vdsm/network/netinfo/bonding.py
index 0ca2259..2f40b88 100644
--- a/lib/vdsm/network/netinfo/bonding.py
+++ b/lib/vdsm/network/netinfo/bonding.py
@@ -218,7 +218,7 @@
e.g. 'ad_num_ports' or 'slaves'.
"""
return dict(((opt, val) for (opt, val)
- in _bond_opts_name2numeric(bond).iteritems()
+ in six.iteritems(_bond_opts_name2numeric(bond))
if opt not in EXCLUDED_BONDING_ENTRIES))
@@ -268,6 +268,14 @@
vals[name] = numeric
+ # On Python 3, the final close seems to issue another flush attempt,
+ # which results in a repeated exception. Ignore it.
+ try:
+ opt_file.close()
+ except EnvironmentError as e:
+ if e.errno not in (errno.EINVAL, errno.EPERM, errno.EACCES):
+ raise
+
return vals
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e96f226..6eb815b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -227,7 +227,6 @@
storage_workarounds_test.py \
storagefakelibTests.py \
storagetestlib_test.py \
- toolBondingTests.py \
unicode_test.py \
utilsTests.py \
v2vTests.py \
--
To view, visit https://gerrit.ovirt.org/65666
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4487b787c3a14ca9508847572622f431f1188e7f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 11 months
Change in vdsm[master]: profiling: Rename cpuProfileTests.py
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: profiling: Rename cpuProfileTests.py
......................................................................
profiling: Rename cpuProfileTests.py
Use new naming convention for tests modules: cpu_profile_test.py
Change-Id: I10eb0afe0d8d8d6c6db88d4df05159f93385eec0
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/Makefile.am
R tests/cpu_profile_test.py
2 files changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/65251/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1ee0b45..a2f0b58 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -51,8 +51,8 @@
commands_test.py \
concurrentTests.py \
config_test.py \
+ cpu_profile_test.py \
cpuinfo_test.py \
- cpuProfileTests.py \
deviceTests.py \
domainDescriptorTests.py \
domain_manifest_test.py \
diff --git a/tests/cpuProfileTests.py b/tests/cpu_profile_test.py
similarity index 100%
rename from tests/cpuProfileTests.py
rename to tests/cpu_profile_test.py
--
To view, visit https://gerrit.ovirt.org/65251
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I10eb0afe0d8d8d6c6db88d4df05159f93385eec0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
6 years, 11 months