Vinzenz Feenstra has uploaded a new change for review.
Change subject: virt: Always execute after_hibernation event
......................................................................
virt: Always execute after_hibernation event
Previously we had no way that the after_hibernation event got executed.
The enableGuestEvents value was never set to true and we're now also
dropping it on the migration destination.
Since there is also no parameter for enabling guest events on the suspend
call it, we decided that it is much more beneficial to let the VM always
know that it is going to be hibernated and/or has been resumed from
hibernation.
Since purely from theory this information can be also determined without
the notifications there's no security issue that the Virtual Machine would
know too much about it's environment. However it's beneficial for a range of
applications which need to resynchronize, adjust the time or re-accquire an
IP address via DHCP etc.
Change-Id: Ic52b8c22d57028fb6459c7faa2bcfebd8f32d6c4
Bug-Url: https://bugzilla.redhat.com/1349907
Signed-off-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 12 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/59914/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index c2b1b93..d8e4239 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1866,14 +1866,19 @@
except Exception:
self.log.exception("Failed to connect to guest agent channel")
- try:
- if self.conf.get('enableGuestEvents', False):
- if self.lastStatus == vmstatus.MIGRATION_DESTINATION:
+ if self.lastStatus == vmstatus.RESTORING_STATE:
+ try:
+ self.guestAgent.events.after_hibernation()
+ except Exception:
+ self.log.exception("Unexpected error on guest after "
+ "hibernation notification")
+ elif self.conf.get('enableGuestEvents', False):
+ if self.lastStatus == vmstatus.MIGRATION_DESTINATION:
+ try:
self.guestAgent.events.after_migration()
- elif self.lastStatus == vmstatus.RESTORING_STATE:
- self.guestAgent.events.after_hibernation()
- except Exception:
- self.log.exception("Unexpected error on guest event notification")
+ except Exception:
+ self.log.exception("Unexpected error on guest after "
+ "migration notification")
# Drop enableGuestEvents from conf - Not required from here anymore
self.conf.pop('enableGuestEvents', None)
--
To view, visit https://gerrit.ovirt.org/59914
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic52b8c22d57028fb6459c7faa2bcfebd8f32d6c4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Nir Soffer has uploaded a new change for review.
Change subject: tests: Create all instance variables in setUp
......................................................................
tests: Create all instance variables in setUp
AcceptorTests added self.reactor attribute in start_acceptor. This leads
later to AttributeError when you try to clean up stuff in tearDown if
the test failed before the line adding self.reactor. Adding all instance
variable in setUp avoid this issue, and make it easy to understand the
state managed by the test class.
Change-Id: I0360932b3a7515fe8f87cd0ccc2cc4f6b2c90381
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/protocoldetectorTests.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/65101/1
diff --git a/tests/protocoldetectorTests.py b/tests/protocoldetectorTests.py
index c0c1369..887a8c6 100644
--- a/tests/protocoldetectorTests.py
+++ b/tests/protocoldetectorTests.py
@@ -105,6 +105,7 @@
BUFSIZE = 512
def setUp(self):
+ self.reactor = None
self.acceptor = None
self.acceptor_address = None
--
To view, visit https://gerrit.ovirt.org/65101
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0360932b3a7515fe8f87cd0ccc2cc4f6b2c90381
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Milan Zamazal has uploaded a new change for review.
Change subject: numa: Don't crash on hotplugged CPUs when retrieving NUMA info
......................................................................
numa: Don't crash on hotplugged CPUs when retrieving NUMA info
getVmNumaNodeRuntimeInfo maps virtual (from Engine) nodes to physical
nodes by matching nodes and CPUs from the libvirt runtime and from the
Engine NUMA mapping. CPUs that are not pinned to any node in the Engine
NUMA mapping (such as hotplugged CPUs) are irrelevant. However the
matching cycle still looks for them in the Engine NUMA mapping
dictionary, resulting in KeyError.
This patch fixes the KeyError by simply skipping the CPUs not present in
the Engine NUMA mapping.
Change-Id: If7d00b897e430d9c4e8a23cb1451209b6f00e688
Signed-off-by: Milan Zamazal <mzamazal(a)redhat.com>
---
M lib/vdsm/numa.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/65562/1
diff --git a/lib/vdsm/numa.py b/lib/vdsm/numa.py
index 7a31a99..15a8c73 100644
--- a/lib/vdsm/numa.py
+++ b/lib/vdsm/numa.py
@@ -260,7 +260,10 @@
vcpu_to_vnode = _get_mapping_vcpu_to_vnode(vm)
for vcpu_id, pcpu_id in vcpu_to_pcpu.iteritems():
- vnode_index = str(vcpu_to_vnode[vcpu_id])
+ try:
+ vnode_index = str(vcpu_to_vnode[vcpu_id])
+ except KeyError: # hotplugged CPU
+ continue
vm_numa_placement[vnode_index].add(pcpu_to_pnode[pcpu_id])
vm_numa_placement[vnode_index].update(
vcpu_to_pnode.get(vcpu_id, ()))
--
To view, visit https://gerrit.ovirt.org/65562
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If7d00b897e430d9c4e8a23cb1451209b6f00e688
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal(a)redhat.com>
Nir Soffer has uploaded a new change for review.
Change subject: automation: Create coverage report sooner
......................................................................
automation: Create coverage report sooner
For some reason a build artifacts step was inserted before creating the
coverage report. There is no reason not to create the report immediately
after running the tests, and jenkins seems to fail in an unclear way
just after creating the report.
Change-Id: I8688383eb5e99fdd0ee48815cc71afd6483819b4
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M automation/check-patch.sh
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/65414/1
diff --git a/automation/check-patch.sh b/automation/check-patch.sh
index 3284e2b..9311671 100755
--- a/automation/check-patch.sh
+++ b/automation/check-patch.sh
@@ -16,6 +16,11 @@
TIMEOUT=600 make check NOSE_WITH_COVERAGE=1 NOSE_COVER_PACKAGE="$PWD/vdsm,$PWD/lib"
+# Generate coverage report in HTML format
+pushd tests
+coverage html -d "$EXPORT_DIR/htmlcov"
+popd
+
# enable complex globs
shopt -s extglob
# In case of vdsm specfile or any Makefile.am file modification in commit,
@@ -24,8 +29,3 @@
./automation/build-artifacts.sh
yum -y install "$EXPORT_DIR/"!(*.src).rpm
fi
-
-# Generate coverage report in HTML format
-pushd tests
-coverage html -d "$EXPORT_DIR/htmlcov"
-popd
--
To view, visit https://gerrit.ovirt.org/65414
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8688383eb5e99fdd0ee48815cc71afd6483819b4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Francesco Romani has uploaded a new change for review.
Change subject: vm: legacy rng devices fix not needed anymore
......................................................................
vm: legacy rng devices fix not needed anymore
We introduced this fix to deal with upgrades from Vdsm
4.16.z, and we don't need this anymore.
Change-Id: I34eef559ef3d789fd502490acc9691df15c684b9
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 0 insertions(+), 26 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/61243/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 61a59ca..df32da0 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1647,13 +1647,6 @@
self._updateDomainDescriptor()
- # REQUIRED_FOR migrate from vdsm-4.16
- #
- # We need to clean out unknown devices that are created for
- # RNG devices by VDSM 3.5 and are left in the configuration
- # after upgrade to 3.6.
- self._fixLegacyRngConf()
-
self._getUnderlyingVmDevicesInfo()
self._updateAgentChannels()
@@ -4604,25 +4597,6 @@
newChain = [x for x in device['volumeChain']
if x['volumeID'] in volumes]
device['volumeChain'] = drive.volumeChain = newChain
-
- def _fixLegacyRngConf(self):
- def _is_legacy_rng_device_conf(dev):
- """
- Returns True if dev is a legacy (3.5) RNG device conf,
- False otherwise.
- """
- return dev['type'] == hwclass.RNG and (
- 'specParams' not in dev or
- 'source' not in dev['specParams']
- )
-
- with self._confLock:
- self._devices[hwclass.RNG] = [dev for dev
- in self._devices[hwclass.RNG]
- if 'source' in dev.specParams]
- self.conf['devices'] = [dev for dev
- in self.conf['devices']
- if not _is_legacy_rng_device_conf(dev)]
def getDiskDevices(self):
return self._devices[hwclass.DISK]
--
To view, visit https://gerrit.ovirt.org/61243
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34eef559ef3d789fd502490acc9691df15c684b9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>