Change in vdsm[master]: hooks: Renamed openstacknet_consts file
by mkolesni@redhat.com
Mike Kolesnik has uploaded a new change for review.
Change subject: hooks: Renamed openstacknet_consts file
......................................................................
hooks: Renamed openstacknet_consts file
In order to put functions in the shared file, it is more appropriate to
name it openstacknet_utils rather than openstacknet_consts.
Change-Id: I5cf8c6ce2463e89e88b761f25801a2dcfc8a083c
Signed-off-by: Mike Kolesnik <mkolesni(a)redhat.com>
---
M debian/vdsm-hook-openstacknet.install
M vdsm.spec.in
M vdsm_hooks/openstacknet/Makefile.am
M vdsm_hooks/openstacknet/after_device_create.py
M vdsm_hooks/openstacknet/before_device_create.py
R vdsm_hooks/openstacknet/openstacknet_utils.py
6 files changed, 26 insertions(+), 26 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/22582/1
diff --git a/debian/vdsm-hook-openstacknet.install b/debian/vdsm-hook-openstacknet.install
index a23dce8..b13a151 100644
--- a/debian/vdsm-hook-openstacknet.install
+++ b/debian/vdsm-hook-openstacknet.install
@@ -1,11 +1,11 @@
etc/sudoers.d/50_vdsm_hook_openstacknet
usr/libexec/vdsm/hooks/after_device_create/50_openstacknet
-usr/libexec/vdsm/hooks/after_device_create/openstacknet_consts.py
+usr/libexec/vdsm/hooks/after_device_create/openstacknet_utils.py
usr/libexec/vdsm/hooks/after_device_migrate_destination/50_openstacknet
-usr/libexec/vdsm/hooks/after_device_migrate_destination/openstacknet_consts.py
+usr/libexec/vdsm/hooks/after_device_migrate_destination/openstacknet_utils.py
usr/libexec/vdsm/hooks/after_nic_hotplug/50_openstacknet
-usr/libexec/vdsm/hooks/after_nic_hotplug/openstacknet_consts.py
+usr/libexec/vdsm/hooks/after_nic_hotplug/openstacknet_utils.py
usr/libexec/vdsm/hooks/before_device_create/50_openstacknet
-usr/libexec/vdsm/hooks/before_device_create/openstacknet_consts.py
+usr/libexec/vdsm/hooks/before_device_create/openstacknet_utils.py
usr/libexec/vdsm/hooks/before_nic_hotplug/50_openstacknet
-usr/libexec/vdsm/hooks/before_nic_hotplug/openstacknet_consts.py
+usr/libexec/vdsm/hooks/before_nic_hotplug/openstacknet_utils.py
diff --git a/vdsm.spec.in b/vdsm.spec.in
index b0ff00a..6a5e49e 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1143,15 +1143,15 @@
%defattr(-, root, root, -)
%{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet
%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_consts.py*
+%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py*
%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_consts.py*
+%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py*
%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_consts.py*
+%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py*
%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_consts.py*
+%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py*
%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_consts.py*
+%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py*
%files hook-vhostmd
%defattr(-, root, root, -)
diff --git a/vdsm_hooks/openstacknet/Makefile.am b/vdsm_hooks/openstacknet/Makefile.am
index c73505c..a05e821 100644
--- a/vdsm_hooks/openstacknet/Makefile.am
+++ b/vdsm_hooks/openstacknet/Makefile.am
@@ -18,7 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
-constsfile=openstacknet_consts.py
+constsfile=openstacknet_utils.py
include $(top_srcdir)/build-aux/Makefile.subs
diff --git a/vdsm_hooks/openstacknet/after_device_create.py b/vdsm_hooks/openstacknet/after_device_create.py
index e90d759..be23a32 100755
--- a/vdsm_hooks/openstacknet/after_device_create.py
+++ b/vdsm_hooks/openstacknet/after_device_create.py
@@ -26,13 +26,13 @@
import traceback
import hooking
-from openstacknet_consts import DEV_MAX_LENGTH
-from openstacknet_consts import DUMMY_BRIDGE
-from openstacknet_consts import OPENSTACK_NET_PROVIDER_TYPE
-from openstacknet_consts import PLUGIN_TYPE_KEY
-from openstacknet_consts import PROVIDER_TYPE_KEY
-from openstacknet_consts import PT_BRIDGE
-from openstacknet_consts import VNIC_ID_KEY
+from openstacknet_utils import DEV_MAX_LENGTH
+from openstacknet_utils import DUMMY_BRIDGE
+from openstacknet_utils import OPENSTACK_NET_PROVIDER_TYPE
+from openstacknet_utils import PLUGIN_TYPE_KEY
+from openstacknet_utils import PROVIDER_TYPE_KEY
+from openstacknet_utils import PT_BRIDGE
+from openstacknet_utils import VNIC_ID_KEY
from vdsm.constants import EXT_BRCTL
diff --git a/vdsm_hooks/openstacknet/before_device_create.py b/vdsm_hooks/openstacknet/before_device_create.py
index 6a9e6d1..20cd9f7 100755
--- a/vdsm_hooks/openstacknet/before_device_create.py
+++ b/vdsm_hooks/openstacknet/before_device_create.py
@@ -28,14 +28,14 @@
from xml.dom import minidom
import hooking
-from openstacknet_consts import DEV_MAX_LENGTH
-from openstacknet_consts import DUMMY_BRIDGE
-from openstacknet_consts import OPENSTACK_NET_PROVIDER_TYPE
-from openstacknet_consts import PLUGIN_TYPE_KEY
-from openstacknet_consts import PROVIDER_TYPE_KEY
-from openstacknet_consts import PT_BRIDGE
-from openstacknet_consts import PT_OVS
-from openstacknet_consts import VNIC_ID_KEY
+from openstacknet_utils import DEV_MAX_LENGTH
+from openstacknet_utils import DUMMY_BRIDGE
+from openstacknet_utils import OPENSTACK_NET_PROVIDER_TYPE
+from openstacknet_utils import PLUGIN_TYPE_KEY
+from openstacknet_utils import PROVIDER_TYPE_KEY
+from openstacknet_utils import PT_BRIDGE
+from openstacknet_utils import PT_OVS
+from openstacknet_utils import VNIC_ID_KEY
HELP_ARG = "-h"
TEST_ARG = "-t"
diff --git a/vdsm_hooks/openstacknet/openstacknet_consts.py b/vdsm_hooks/openstacknet/openstacknet_utils.py
similarity index 100%
rename from vdsm_hooks/openstacknet/openstacknet_consts.py
rename to vdsm_hooks/openstacknet/openstacknet_utils.py
--
To view, visit http://gerrit.ovirt.org/22582
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cf8c6ce2463e89e88b761f25801a2dcfc8a083c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <mkolesni(a)redhat.com>
10 years, 3 months
Change in vdsm[master]: [wip] jsonrpc: Vdsm changes
by ybronhei@redhat.com
Yaniv Bronhaim has posted comments on this change.
Change subject: [wip] jsonrpc: Vdsm changes
......................................................................
Patch Set 12: Code-Review-1
(11 comments)
....................................................
Commit Message
Line 3: AuthorDate: 2013-11-29 12:33:29 +0100
Line 4: Commit: pkliczewski <piotr.kliczewski(a)gmail.com>
Line 5: CommitDate: 2013-12-20 15:27:33 +0100
Line 6:
Line 7: [wip] jsonrpc: Vdsm changes
please say more . .how is getAllVmStats change relate to jsonrpc for example..? what changes did you intend to do in yajsonrpc?.
Line 8:
Line 9: Here are engine changes: http://gerrit.ovirt.org/#/c/20926/
Line 10:
Line 11: Next steps:
....................................................
File lib/yajsonrpc/__init__.py
Line 90:
Line 91: return cls.fromRawObject(obj)
Line 92:
Line 93: @staticmethod
Line 94: def fromRawObject(obj):
I guess you meant to replace this definition with yours.. please add your changes here so we will be able to compare the changes
Line 95: if obj.get("jsonrpc") != "2.0":
Line 96: raise JsonRpcInvalidRequestError()
Line 97:
Line 98: method = obj.get("method")
Line 480: ctx.requestDone(JsonRpcResponse(None,
Line 481: JsonRpcInternalError(str(e)),
Line 482: req.id))
Line 483: else:
Line 484: if res is None:
you can do
res = True if res is None else res
Line 485: # method was successful but did not return any response
Line 486: res = True
Line 487:
Line 488: ctx.requestDone(JsonRpcResponse(res, None, req.id))
....................................................
File tests/.gitignore
Line 1: jsonrpc-tests.p12
Line 2: jsonrpc-tests.server.crt
Line 3: jsonrpc-tests.server.csr
Line 4: jsonrpc-tests.server.key
put it in the root's folder .gitignore as all the others
....................................................
File tests/jsonRpcTests.py
Line 176: finally:
Line 177: client.close()
Line 178:
Line 179: @brokentest('we sometime see this fail with '
Line 180: '"error: [Errno 9] Bad file descriptor"')
still broken?
Line 181: @permutations(CONNECTION_PERMUTATIONS)
Line 182: def testMethodCallArgList(self, rt, ssl):
Line 183: data = dummyTextGenerator(1024)
Line 184:
....................................................
File tests/jsonRpcUtils.py
Line 75:
Line 76: @contextmanager
Line 77: def constructReactor(tp, ssl=False):
Line 78: with REACTOR_CONSTRUCTORS[tp]() as (reactorType, laddr):
Line 79: sslctx = None
sslctx = DEAFAULT_SSL_CONTEXT if ssl else None
Line 80: if ssl:
Line 81: sslctx = DEAFAULT_SSL_CONTEXT
Line 82:
Line 83: serverReactor = reactorType(sslctx)
....................................................
File vdsm/API.py
Line 647: ip = '0'
Line 648: self.log.info('network %s: using %s', network, ip)
Line 649: return ip
Line 650:
Line 651: def snapshot(self, snapDrives, snapMemVolHandle=None):
related?
Line 652: v = self._cif.vmContainer.get(self._UUID)
Line 653: if not v:
Line 654: return errCode['noVM']
Line 655: memoryParams = {}
....................................................
File vdsm/gluster/vdsmapi-gluster-schema.json
Line 352: # Since: 4.10.3
Line 353: ##
Line 354: {'command': {'class': 'GlusterService', 'name': 'get'},
Line 355: 'data': {'serviceNames': ['str']},
Line 356: 'returns': 'GlusterServicesStatusInfo'}
please explain this change in the commit msg
Line 357:
Line 358: ##
Line 359: # @GlusterService.action:
Line 360: #
Line 568: #
Line 569: # @brick: #optional Brick name
Line 570: #
Line 571: # @statusOption: #optional Provide one of possible values:
Line 572: # DETAIL, CLIENTS, MEM
whitespace
Line 573: #
Line 574: # Returns:
Line 575: # Gluster volume status
Line 576: #
Line 886: #
Line 887: # Since: 4.10.3
Line 888: ##
Line 889: {'command': {'class': 'GlusterVolume', 'name': 'removeBrickStatus'},
Line 890: 'data': {'volumeName': 'str', 'brickList': ['str'], '*replicaCount': 'int'},
I don't understand how this api change relates to json prc
Line 891: 'returns': 'RebalanceRemoveStatus'}
Line 892:
Line 893: ##
Line 894: # @GlusterVolume.removeBrickCommit:
....................................................
File vdsm_api/vdsmapi-schema.json
Line 1046: #
Line 1047: # @MIXED: The device consists of a mix of iSCSI and FibreChannel paths
Line 1048: #
Line 1049: # Since: 4.10.0
Line 1050: # As in engine :UNKNOWN(0), NFS(1), FCP(2), ISCSI(3), LOCALFS(4), POSIXFS(6), GLUSTERFS(7), GLANCE(8), ALL(-1)
keep the line limit .. is it pass the scheme parser?
Line 1051: ##
Line 1052: {'enum': 'BlockDeviceType', 'data': ['iSCSI', 'FCP', 'MIXED']}
Line 1053:
Line 1054: ##
--
To view, visit http://gerrit.ovirt.org/19497
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If828355b7efe28fe6a2e784069425fefd2f3f25c
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 3 months
Change in vdsm[master]: logger: add libvirtconnection to the logger.conf
by Maor Lipchuk
Maor Lipchuk has uploaded a new change for review.
Change subject: logger: add libvirtconnection to the logger.conf
......................................................................
logger: add libvirtconnection to the logger.conf
libvirtconnection.py does not print logs to the vdsm.log since it does not
configure in logger.conf.
This patch fix that by adds libvirtconnection to the
logger.conf
Signed-off-by: Maor Lipchuk <mlipchuk(a)redhat.com>
Change-Id: I4af25bbc17d8f8a75bc57505b19bfc2096a3990d
---
M vdsm/logger.conf.in
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/22858/1
diff --git a/vdsm/logger.conf.in b/vdsm/logger.conf.in
index e7ff032..20b6f79 100644
--- a/vdsm/logger.conf.in
+++ b/vdsm/logger.conf.in
@@ -1,5 +1,5 @@
[loggers]
-keys=root,vds,Storage,metadata,ovirt_hosted_engine_ha
+keys=root,vds,Storage,metadata,ovirt_hosted_engine_ha,libvirtconnection
[handlers]
keys=console,syslog,logfile,metadata
@@ -18,6 +18,12 @@
qualname=vds
propagate=0
+[logger_libvirtconnection]
+level=DEBUG
+handlers=syslog,logfile
+qualname=libvirtconnection
+propagate=0
+
[logger_Storage]
level=DEBUG
handlers=logfile
--
To view, visit http://gerrit.ovirt.org/22858
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4af25bbc17d8f8a75bc57505b19bfc2096a3990d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
10 years, 3 months
Change in vdsm[master]: vdsm: allow hooks to pass down dictionaries in json format
by majopela@redhat.com
Miguel Angel Ajo Pelayo has posted comments on this change.
Change subject: vdsm: allow hooks to pass down dictionaries in json format
......................................................................
Patch Set 6:
(3 comments)
....................................................
File vdsm/configNetwork.py
Line 645: get('bonding') in bondings)
Line 646: raise ConfigNetworkError(ne.ERR_LOST_CONNECTION,
Line 647: 'connectivity check failed')
Line 648:
Line 649: running_config = netconfpersistence.RunningConfig()
Thanks for re-clarifying, this part was yet quite "draft".
If the hook scripts could only be written in python, I'd go the simplest way: just pass the config request to the hook, and if it does need it he can retrieve the running config using the vdsm lib.
But considering non-python scripts which can't make use of the vdsm python libraries, I think I should better add both things to the JSON dictionary:
{
"request": { "network": {...},
"bondings": {...},
"options":{...}}
"current" : { "network": {...},
"bondings": {...}},
}
Question: Do you think it's a good idea to omit the "current" key when unified persistence is off to avoid confusion.
Question 2: How do I enable/disable unified persistence, and how do I check if it's enabled disabled?
Line 650: hooks.after_network_setup({'networks': running_config.networks,
Line 651: 'bondings': running_config.bonds})
Line 652:
Line 653:
....................................................
File vdsm/vdsmd.8.in
Line 88: "networks": {"virtnet": {"bonding" : "bond0", "bridged": true, "vlan":27}},
Line 89: "options": {"conectivityCheck":false}
Line 90: }
Line 91: .fi
Line 92:
Hi, no problem :-)
It wasn't that hard in the end, but educational about VDSM.
So, I will:
1) Remove the arguments explanation (pointing to setupNetworks, I will expand any doc in setupNetworks if it isn't already there)
2) Keep the creation & removal examples.
3) Reorder the arguments to "networks", "bondings", "options" into the examples.
Line 93: .B bondings specifies any bonding adapter that must be built upon several
Line 94: physical adapters, or removed when we pass the "remove":true option.
Line 95:
Line 96: .B networks specifies any network that must be setup, and it's parameters.
Line 158: sent by the caller of the hook. For example if before_nic_hotplug is called
Line 159: with custom: {qos: '0.5', color: 'red'} then qos and color will be directly
Line 160: available as environment variables when before_nic_hotplug is called.
Line 161:
Line 162:
Done
Line 163: .SS Hook execution
Line 164: before_vdsm_start and after_vdsm_stop scripts are executed as user
Line 165: .I root.
Line 166: All the other hooks are executed as user
--
To view, visit http://gerrit.ovirt.org/20330
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie07c511e9740fd19a1c27baf87e91f9a427d0dcd
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Miguel Angel Ajo Pelayo <majopela(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Miguel Angel Ajo Pelayo <majopela(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 3 months
Change in vdsm[master]: vdsm: allow hooks to pass down dictionaries in json format
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: vdsm: allow hooks to pass down dictionaries in json format
......................................................................
Patch Set 6: Code-Review-1
(4 comments)
....................................................
File tests/functional/networkTests.py
Line 1560: network_config = json.load(cookie_file)
Line 1561: self.assertTrue('networks' in network_config, True)
Line 1562: self.assertTrue('bondings' in network_config, True)
Line 1563: self.assertTrue(NETWORK_NAME in network_config['networks'],
Line 1564: True)
I think that Assaf has noted this earlier the RunningConfig is going to work only work with unified_persistence turned on.
Line 1565:
Line 1566: delete_networks = {NETWORK_NAME: {'remove': True}}
Line 1567: self.vdsm_net.setupNetworks(delete_networks,
Line 1568: {}, {})
....................................................
File vdsm/configNetwork.py
Line 645: get('bonding') in bondings)
Line 646: raise ConfigNetworkError(ne.ERR_LOST_CONNECTION,
Line 647: 'connectivity check failed')
Line 648:
Line 649: running_config = netconfpersistence.RunningConfig()
I can only repeat my request: do not pass *only* the current_config to the hook. Passing the requested changes is important for giving context to the hook script (for example, it has to do some "last final touches" to the modified networks). The hook could figure out the current configuration on its own.
Line 650: hooks.after_network_setup({'networks': running_config.networks,
Line 651: 'bondings': running_config.bonds})
Line 652:
Line 653:
....................................................
File vdsm/vdsmd.8.in
Line 88: "networks": {"virtnet": {"bonding" : "bond0", "bridged": true, "vlan":27}},
Line 89: "options": {"conectivityCheck":false}
Line 90: }
Line 91: .fi
Line 92:
It would be easier and safer to simply say that network, bonding, and options (please use this order) are as defined in the arguments to setupNetworks. The above example is good, but I am afraid that the following details should be placed in a documentation of the setupNetwork verb, not the hook.
I feel kinda bad, since only now do I understand what you meant in the troubles of documenting all the different arguments.
Line 93: .B bondings specifies any bonding adapter that must be built upon several
Line 94: physical adapters, or removed when we pass the "remove":true option.
Line 95:
Line 96: .B networks specifies any network that must be setup, and it's parameters.
Line 158: sent by the caller of the hook. For example if before_nic_hotplug is called
Line 159: with custom: {qos: '0.5', color: 'red'} then qos and color will be directly
Line 160: available as environment variables when before_nic_hotplug is called.
Line 161:
Line 162:
intentional?
Line 163: .SS Hook execution
Line 164: before_vdsm_start and after_vdsm_stop scripts are executed as user
Line 165: .I root.
Line 166: All the other hooks are executed as user
--
To view, visit http://gerrit.ovirt.org/20330
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie07c511e9740fd19a1c27baf87e91f9a427d0dcd
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Miguel Angel Ajo Pelayo <majopela(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Miguel Angel Ajo Pelayo <majopela(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 3 months
Change in vdsm[master]: vdsm: allow hooks to pass down dictionaries in json format
by majopela@redhat.com
Miguel Angel Ajo Pelayo has posted comments on this change.
Change subject: vdsm: allow hooks to pass down dictionaries in json format
......................................................................
Patch Set 6:
(1 comment)
....................................................
File tests/functional/networkTests.py
Line 1560: network_config = json.load(cookie_file)
Line 1561: self.assertTrue('networks' in network_config, True)
Line 1562: self.assertTrue('bondings' in network_config, True)
Line 1563: self.assertTrue(NETWORK_NAME in network_config['networks'],
Line 1564: True)
At this moment, when I check this, networks is empty
We call the hook with:
running_config = netconfpersistence.RunningConfig()
hooks.after_network_setup({'networks': running_config.networks,
'bondings': running_config.bonds})
What does RunningConfig provide, and when is it updated?
Line 1565:
Line 1566: delete_networks = {NETWORK_NAME: {'remove': True}}
Line 1567: self.vdsm_net.setupNetworks(delete_networks,
Line 1568: {}, {})
--
To view, visit http://gerrit.ovirt.org/20330
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie07c511e9740fd19a1c27baf87e91f9a427d0dcd
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Miguel Angel Ajo Pelayo <majopela(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Miguel Angel Ajo Pelayo <majopela(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 3 months
Change in vdsm[master]: vdsClient: manage vdsm.conf
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: vdsClient: manage vdsm.conf
......................................................................
vdsClient: manage vdsm.conf
A user reported that would like to have option in vdsClient to
show the current settings. Additionaly to this option, created a flag
to update vdsm config file.
Change-Id: I81c3f2d2588d3963c66bad42e469e78f1393104b
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M client/vdsClient.py
1 file changed, 63 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/21876/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index d549500..733c7ff 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -26,7 +26,10 @@
import socket
import pprint as pp
+from ConfigParser import ConfigParser
+from datetime import datetime
from vdsm import vdscli
+from shutil import copy2
try:
import vdsClientGluster as ge
_glusterEnabled = True
@@ -59,6 +62,9 @@
SHARED_VOL = 6
INTERNAL_VOL = 7
LEAF_VOL = 8
+
+# VDSM CONF
+VDSM_CONF = "/etc/vdsm/vdsm.conf"
def validateArgTypes(args, conv, requiredArgsNumber=0):
@@ -999,6 +1005,52 @@
volUUID, descr)
if status['status']['code']:
return status['status']['code'], status['status']['message']
+ return 0, ''
+
+ def setConfig(self, args):
+
+ sectionName = args[0]
+ configName = args[1]
+ configNewValue = args[2]
+
+ dt = datetime.now()
+ bkpFile = "/etc/vdsm/." + dt.strftime("%Y-%m-%d_%H%M%S") + "-vdsm.conf"
+
+ copy2(VDSM_CONF, bkpFile)
+
+ config = ConfigParser()
+ config.read(VDSM_CONF)
+
+ sectionFound = False
+ for sec in config.sections():
+ if sectionName in sec:
+ sectionFound = True
+
+ if not sectionFound:
+ config.add_section(sectionName)
+
+ config.set(sectionName, configName, configNewValue)
+
+ with open(VDSM_CONF, 'w+') as fd:
+ config.write(fd)
+
+ print "Please note: \n" \
+ "\tCopied previous vdsm.conf to " + bkpFile + "\n" \
+ "\tTo VDSM load this new change, restart VDSM daemon\n" \
+ "\tIf the system is a oVirt Node (or derivative) run persist " \
+ "/etc/vdsm/vdsm.conf to keep the new config in case of reboot"
+
+ return 0, ''
+
+ def showConfig(self, args):
+ config = ConfigParser()
+ config.read(VDSM_CONF)
+
+ for section_name in config.sections():
+ print '\n[%s]' % section_name
+ for name, value in config.items(section_name):
+ print '%s = %s' % (name, value)
+
return 0, ''
def setVolumeLegality(self, args):
@@ -2219,6 +2271,17 @@
'<Description>',
'Sets a new description to the volume'
)),
+
+ 'setConfig': (serv.setConfig,
+ ('<section> <configName> <newValue>',
+ 'Set new value for a vdsm config'
+ )),
+
+ 'showConfig': (serv.showConfig,
+ ('',
+ 'Get vdsm configuration options available in vdsm.conf'
+ )),
+
'setVolumeLegality': (serv.setVolumeLegality,
('<sdUUID> <spUUID> <imgUUID> <volUUID> '
'<Legality>',
--
To view, visit http://gerrit.ovirt.org/21876
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I81c3f2d2588d3963c66bad42e469e78f1393104b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 3 months
Change in vdsm[ovirt-3.3]: Change expected behaviour for vdsmd reconfigure
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Change expected behaviour for vdsmd reconfigure
......................................................................
Change expected behaviour for vdsmd reconfigure
Vdsmd reconfigure is mainly used by deploy tools for backward
compatibility. Currently without "force" flag it won't reconfigure
libvirt in the deploy process if the configuration is already exist.
The users expect the configuration to be overrided with defaults after
fresh deploy.
This patch omit the check for force flag and force the reconfigure each
call for vdsmd reconfigure.
Change-Id: I1d2d550cdec8421765a7c47750f24232e60b3f67
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1043227
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M init/sysvinit/vdsmd.init.in
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/22839/1
diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in
index dc7847e..d97aa5c 100755
--- a/init/sysvinit/vdsmd.init.in
+++ b/init/sysvinit/vdsmd.init.in
@@ -115,9 +115,7 @@
}
reconfigure_libvirt() {
- local force
- [ "${1}" = "force" ] && force="--force"
- "$VDSM_TOOL" libvirt-configure ${force}
+ "$VDSM_TOOL" libvirt-configure --force
}
start() {
@@ -213,7 +211,7 @@
reconfigure)
# Jump over 'reconfigure'
shift 1
- reconfigure_libvirt "$@"
+ reconfigure_libvirt
RETVAL=$?
;;
*)
--
To view, visit http://gerrit.ovirt.org/22839
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d2d550cdec8421765a7c47750f24232e60b3f67
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
10 years, 3 months
Change in vdsm[master]: Change expected behaviour for vdsmd reconfigure
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Change expected behaviour for vdsmd reconfigure
......................................................................
Change expected behaviour for vdsmd reconfigure
Vdsmd reconfigure is mainly used by deploy tools for backward
compatibility. Currently without "force" flag it won't reconfigure
libvirt in the deploy process if the configuration is already exist.
The users expect the configuration to be overrided with defaults after
fresh deploy.
This patch omit the check for force flag and force the reconfigure each
call for vdsmd reconfigure.
Change-Id: I1d2d550cdec8421765a7c47750f24232e60b3f67
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1043227
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M init/sysvinit/vdsmd.init.in
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/22838/1
diff --git a/init/sysvinit/vdsmd.init.in b/init/sysvinit/vdsmd.init.in
index 6ef5718..30a5f0b 100755
--- a/init/sysvinit/vdsmd.init.in
+++ b/init/sysvinit/vdsmd.init.in
@@ -100,9 +100,7 @@
}
reconfigure() {
- if [ "${1}" = "force" ] || ! "$VDSM_TOOL" is-configured; then
- "$VDSM_TOOL" configure "--force"
- fi
+ "$VDSM_TOOL" configure "--force"
}
start() {
@@ -196,7 +194,7 @@
reconfigure)
# Jump over 'reconfigure'
shift 1
- reconfigure "$@"
+ reconfigure
RETVAL=$?
;;
*)
--
To view, visit http://gerrit.ovirt.org/22838
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d2d550cdec8421765a7c47750f24232e60b3f67
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
10 years, 3 months