2018-03-01  Arik Hadas  <ahadas@redhat.com>

	vm: support setting device alias for drives and nics
	The engine is expected to set the alias property of devices in
	the domain XML as from 4.2. It would work with all the non-storage
	and non-network devices out-of-the-box since the XML is passed
	through to libvirt, but some adjustment is needed for it to work
	for storage and network devices.

	The new alias property that the engine would send looks as follow:
	<alias name="ua-<device_id>">
	where device_id is the ID of the device on the engine side.

	Bug-Url: https://bugzilla.redhat.com/1544721

2018-03-01  Milan Zamazal  <mzamazal@redhat.com>

	periodic: Don't update read-only drive info
	Updating read-only drive size info periodically is useless and may cause
	unnecessary hangs e.g. on broken ISO domains.

	Bug-Url: https://bugzilla.redhat.com/1207992
	Backport-To: 4.2

	virt: Kill killable VMs paused for too long
	We already kill VMs with ResumeBehavior == KILL if they are going to be resumed
	after being paused for too long.  However we perform that action only on
	resume.  If a paused HA VM is not resumed, it keeps being paused.

	This is not a good behavior for HA VMs, since they do not run while being
	prevented from starting on another host.  So we add a periodic check that kills
	VMs with ResumeBehavior == KILL paused on I/O error for too long.

	Note that we kill paused VMs with both EIO and EOTHER pause codes.  EIO is set
	on I/O error.  EOTHER is set on recovery in Vm._readPauseCode and, according to
	the comments there, there may be some some reasons for that.

	Bug-Url: https://bugzilla.redhat.com/1540548
	Backport-To: 4.2

	api: Log VM id on API.VM calls
	@api.logged decorator helps to log API calls consistently.  However it works on
	API objects rather than with actual API call arguments.  That may lead to loss
	of important information if some arguments are removed before reaching API
	object methods.  It happens with VM id, which is stored in the corresponding
	API object but no longer present in arguments of its methods.  That makes
	tracking VMs in the log difficult.

	This patch enhances @api.logged with the possibility to extract and log
	additional information from API objects and uses the enhancement to log VM ids
	in API.VM calls.

	Backport-To: 4.2

2018-02-28  Milan Zamazal  <mzamazal@redhat.com>

	virt: Set pause code on libvirt life cycle SUSPENDED event
	When a VM is paused due to I/O error by QEMU, there are two kinds of events
	received from libvirt:

	- I/O error event
	- life cycle event

	While Vm.onIOError sets the proper pause code, Vm.onLibvirtLifecycleEvent
	doesn't.  The latter apparently assumes that onIOError takes the
	responsibility.  However this assumption may be wrong under certain
	circumstances due to way the two kinds of events may be ordered.  The following
	has been observed on an attempt to manually resume a VM paused due to I/O
	error:

	- I/O error events are reported, setting the pause code
	- Resume event comes, clearing the pause code in Vm.cont.
	- Suspend event comes, the pause code remains unset.

	That results in the pause code being unset, preventing resume/killing actions
	on VMs paused due to I/O errors.

	This patch fixes it by setting the pause code also in the life cycle event
	handler.

	Bug-Url: https://bugzilla.redhat.com/1526025
	Backport-To: 4.2

	virt: Return EIO pause code from Vm._readPauseCode on I/O errors
	For not completely clear reasons, _readPauseCode returns 'EOTHER' rather than
	'EIO' on I/O errors, see https://gerrit.ovirt.org/37118.  This safety measure
	has some problems:

	- It sets a wrong pause code on recovery of VMs paused due to I/O error,
	  preventing further operations on them (such as resume or kill).
	- It can't be used for other purposes, such as setting the right pause code on
	  life cycle events, as planned to do in a followup patch.

	Since there is no known situation where the returned code should actually be
	'EOTHER', let's fix the problems above by returning 'EIO' instead.

	Bug-Url: https://bugzilla.redhat.com/1526025
	Backport-To: 4.2

2018-02-28  Edward Haas  <edwardh@redhat.com>

	net: NMPropertiesNotFoundError may raise during ifcfg acquire
	OST tests revealed cases where the NM device status property is missing.
	Therefore, we need to add this error as well to the 'ignore' list when
	acquiring a NM interface (ifcfg acquire).

	Bug-Url: https://bugzilla.redhat.com/1549145

2018-02-28  Francesco Romani  <fromani@redhat.com>

	vmdevices: refresh only disk devices
	The lease refresh conflicts with the work we do in fixLeases.
	If we use both mechanisms:
	- fixLeases will fill the placeholders with the right data
	- the refresh code will replace the fixed leases XML
	  with incorrect data rebuilt from the original XML, before
	  fixLease could have fixed it.

	To fix this issue and the possible conflicts with graphics
	and network devices, we make Vdsm by refresh only disk
	devices, avoiding any overlap between refresh and placeholders.

	We also kill the devel tunable which turned out just adding confusion.

	Bug-Url: https://bugzilla.redhat.com/1547479
	Backport-To: 4.2
	Branch-Name: fix-drive-leases

	vm: leases: handle drive leases in fixLeases
	The placeholder support code in fixLeases assumed
	the lease was a VM lease.
	For HE, we must support also drive leases.

	This patch make fixLeases support both lease types.

	Bug-Url: https://bugzilla.redhat.com/1547479
	Backport-To: 4.2
	Branch-Name: fix-drive-leases

2018-02-27  Michal Skrivanek  <michal.skrivanek@redhat.com>

	spec: require libguestfs-tools-c
	pulls in virt-sparsify and virt-sysprep on all platforms

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1447300

2018-02-27  Francesco Romani  <fromani@redhat.com>

	vm: set caching of disks according to the engine xml
	Use the cache property that is specified inside the engine XML if
	it is provided and fall back to the previous logic otherwise.

	Bug-Url: https://bugzilla.redhat.com/1546824
	(cherry picked from commit a26ff7ff848a1bea889d57e4ae8afc08abb4004a)

2018-02-26  Edward Haas  <edwardh@redhat.com>

	net: Introduce NM device sync operations
	NM device object now includes a sync-operations object, which provides
	sync related operations.
	The methods introduced with this change wait for a device state to be
	reached and only then returns.
	In case the state is not reached by a defined timeout, an exception is
	raised.

	On some platforms, some incidents have been detected where the device
	state is not "activated", causing several properties of a device not to
	exist yet.
	Therefore, when a NM device object is created, it is not assumed to be
	in its stable state, and where needed, a waitfor sync operations is
	issued to block until the relevant state is reached.

	Bug-Url: https://bugzilla.redhat.com/1549145

	net: Detect when a NM object is missing propetries
	If an attempt is made to access a device property when the device does
	no longer exist, a missing properties error is raised.
	The driver now catches this error and re-raises a missing properties
	error.

	Bug-Url: https://bugzilla.redhat.com/1549145

	net: Introduce nmerror decorator and handle NMDeviceNotFoundError
	Detection of a missing device has been processed by a single method so
	far.
	Due to the need to detect missing devices is many scenarios, a generic
	exception wrapper is introduced, toghether with a specific usage for the
	missing device error.

	Bug-Url: https://bugzilla.redhat.com/1549145
	(cherry picked from commit aac562ce25e52b52128d6199eaa8e910a0303fb6)

2018-02-26  Nir Soffer  <nsoffer@redhat.com>

	multipath.conf: Fix documentation about drop-ins
	The correct location of the multipath drop-in configuration files is
	/etc/multipath/conf.d, and not /etc/conf.d, as documented in
	multipath.conf(5).

	While fixing the path, refine also the text about drop-in configuration.

	Bug-Url: https://bugzilla.redhat.com/1335176

	check: Fail blocked checker after check interval
	Previously we use to warn about blocked checker every check interval.
	However when a blocked checker returned, the check failed only if the
	underlying dd process failed. This could cause the storage domain to be
	valid while reading from storage blocked for long time. If a VM was
	paused during this time, we would not resume it, since the storage
	domain did not become invalid.

	This patch changes the semantics so storage domain becomes invalid if
	the checker is blocked for more than check internal. When the next check
	succeeds, we will try to resume VMs paused while the checker was
	blocked.

	Together with the new multipath configuration, this decreases the chance
	of missing a short storage outage, since we now treat any timeout as an
	error, even if the check completes successfully after the timeout.

	Bug-Url:https://bugzilla.redhat.com/1335176

2018-02-23  Nir Soffer  <nsoffer@redhat.com>

	multipath: Do not fail I/O after short outage
	Since 3.6 we use "no_path_retry fail" for all devices by default.
	This setting is not new, but before 3.6 it was applied only to a few
	devices specified in our multipath conf, while other devices used the
	defaults hard-coded in the multipathd daemon.

	We have seen several reports in the user list showing that this setting
	makes oVirt too fragile considering short storage outage, and causing
	vms to pause too quickly.

	This patch changes the default setting to "no_path_retry 4". With this
	setting, once multipathd notices that the last path has failed, it will
	check all paths 4 more times (20 seconds assuming the default 5 second
	polling_interval). If no path is up, it will tell the kernel to stop
	queuing.  After that, all outstanding and future I/O will immediately be
	failed, until a path is restored. Once a path is restored the 20 second
	delay is reset for the next time all paths fail.

	This change introduces a 20 seconds delay after the last path has
	failed, before outstanding I/O will fail. If there is a short storage
	outage on the server, and the server could recover in 20 seconds, no vm
	will pause, and commands ran by vdsm (e.g. lvm) will not fail.

	Note that this patch does not solve the issue of vm not resumed after a
	short storage outage, but it can decrease the chance that a vm will
	pause in this case.

	This change was merged in I6496dbdaafca6b110c952fcc5d51bf9ac04d49b4 but
	had to be reverted because of multipath regression in EL 7.3. The
	device-mapper-multipath version we require includes the fix for this
	regression.

	Bug-Url:https://bugzilla.redhat.com/1335176

2018-02-22  Tal Nisan  <tnisan@redhat.com>

	Support memory images on different storage domains
	Up until 4.2 the hibernation volumes always resided on the same storage
	domain and were represnted by a string of comma separated UUIDs.
	From 4.2 onwards having the hibernation volumes on different storage
	domains is supported and due to that we have to intrduce new parameters
	for VM.create that will allow it and replace the old string.
	This patch adds that capability while leaving support for the old string
	for backwards compatibility purposes.
	The tests were also changed as the existing tests didn't really check the
	actual parsing but only whether the hibernation string was popped from the
	parameters

	Bug-Url: https://bugzilla.redhat.com/1150245

2018-02-21  Eyal Shenitzky  <eshenitz@redhat.com>

	logging: fix and improve storage log messages
	Fix and improve some log message which added in
	commit - f3916bb887db3963398ecef0ec2e0a95f4128589
	and - 3f782a5f2755632ecfc21a2c657baa1264776515.

	Bug-Url: https://bugzilla.redhat.com/1531066
	(cherry picked from commit d22858d6a3856f4b12fcd4379033f62cc4d13e7b)

2018-02-21  Ala Hino  <ahino@redhat.com>

	volume: Reinitialize volume lease after rename
	After renaming a volume we must reinitialize the volume lease, since
	sanlock does not allow querying or acquiring a lease without the correct
	lease name.

	This patch fixes flows renaming volumes (such as legacy cold merge) so
	they do not create invalid leases.

	Existing invalid leases are not affected by this change, we will need
	another solution to repair old invalid leases.

	Bug-Url: https://bugzilla.redhat.com/1538472

2018-02-21  Allon Mureinik  <amureini@redhat.com>

	schema: Deprecate VM.getDiskAlignment
	Scan Alignment is only relevant in old and no-longer supported guest
	operating systems, as per [1]:
	"Operating systems older than Windows 2008 and Linux before ca.2010".

	This feature will be removed from from the engine in 4.3, and thus
	this patch marks it as deprecated since 4.2, to align with that.

	[1] http://libguestfs.org/virt-alignment-scan.1.html#recommended-alignment

	Bug-Url: https://bugzilla.redhat.com/1547369

2018-02-19  Francesco Romani  <fromani@redhat.com>

	tests: add test for correcting disks on restore
	Add a test to exercise the restore from snapshot flow.
	We want to test that all the relevant informations are
	updated from XML.

	Bug-Url: https://bugzilla.redhat.com/1533155
	Backport-To: 4.2

	vm: split correctDiskVolumes
	We need to change the metadata of the source domain XML
	(_srcDomXML) in the restore from snapshot flow, but we
	need to do that only if restoring from a snapshot created
	by 4.2.

	This change makes the two support flows -vm.conf based
	and XML based- too different from each other, so this
	patch splits the Vm._correctDiskVolumes in two,
	and fixes the from_xml variant to change the metadata as well.

	Bug-Url: https://bugzilla.redhat.com/1533155
	Backport-To: 4.2

	virt: metadata: add function to replace dev meta
	Add a helper function to replace the content
	of the per-device metadata.
	Will be used in the upcoming patch needed to fix
	the restore from snapshot flow.

	Bug-Url: https://bugzilla.redhat.com/1533155
	Backport-To: 4.2

	virt: dom_desc: add method to get metadata desc
	In the restore from snapshot flow, we need to amend
	the source domain XML (_srcDomXML) we use with
	fresher data received by Engine.
	We use DomainDescriptor for this purpose, but we
	will need to change the metadata too.

	A simple solution is to keep the DomainDescriptor
	own the XML document to change, and to add support to
	get one metadata.Descriptor from it.

	This way, any change to metadata will be easily reflected
	in the XML that the DomainDescriptor owns.

	Bug-Url: https://bugzilla.redhat.com/1533155
	Backport-To: 4.2

	virt: metadata: add from/to tree methods
	In the restore fram snapshot flow, Vdsm needs to make
	changes to the source domain XML (_srcDomXML), before
	to use the data to initialize itself.

	The operation which needs to be done are little different
	to what we already support, so a sensible choice seems
	to extend the current libraries instead of re-implement
	those operations from scratch, again, on top of simple
	primitives like the ones provided by the vmxml.py module.

	We start the extensions adding facilities to the
	metadata.Descriptor class to (de)serialize itself to
	ElementTree object(s), in order to better integrate
	with DomainDescriptor and with the new flow.

	This is a simple extraction of code we already have,
	covered by existing tests.

	Bug-Url: https://bugzilla.redhat.com/1533155
	Backport-To: 4.2

	libvirtxml: do not require vcpu.current attribute
	When parsing the domain XML, we expect the "current" attribute
	in the "vcpu" element to be present, like in this example:

	  <vcpu placement='static' current='2'>16</vcpu>

	But as per

	  https://libvirt.org/formatdomain.html#elementsCPUAllocation

	The attribute is actually optional:

	  current
	    The optional attribute current can be used to specify whether
	    fewer than the maximum number of virtual CPUs should be enabled.
	    Since 0.8.5

	So in this patch we treat it as such.

	Bug-Url: https://bugzilla.redhat.com/1545862
	Backport-To: 4.2

	virt: test: add backward compatibility tests
	Add automated tests to make sure that the output of
	Vm.status() is backward compatible.

	Please note that getVMFullList() is implemented on top of Vm.status(),
	so testing the latter is enough to cover all the cases we care.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	vm: fill vm.conf from XML
	Build top-level vm.conf keys out of the XML configuration.
	Needed for full 4.1 compatibility.

	Engine cares about a minimal set of those values, like 'smp'
	and 'memGuaranteedSize', but extracting them from domain XML
	is relatively simple to do and to test, so we do it.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	virt: metadata: add set_custom helper
	In 4.2+ clusters, Vdsm is not expected to add custom variables
	in the metadata. Those variables are expected to be set by Engine,
	consumed by Vdsm and and never changed by the latter.

	Things change if Vdsm 4.2 is run in 4.1 clusters. Now we use
	the domain XML as source of truth for recovery, so we need to
	add the custom variables that we previously stored in the
	recovery files, otherwise we will lose them on restart.

	This patch adds support to inject custom properties,
	the tests, and let the Vm class use this new facility.

	Please note that even though looks like Engine doesn't care about
	receiving back or not the custom properties it set, Vdsm
	needs them to properly initialize itself in some cases, mostly
	related to network area (e.g. NIC devices)

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	vmdevices: fix config() in backward-compatible way
	In 4.1 compatibility mode, we cannot expose the devices' configuration
	as Vdsm stored it, because in the initialization flow
	some normalization/trasformation has been done.

	Furthermore, between 3.6 and 4.1, the API got saner, and we now send
	more meaningful values, like true booleans instead of True,
	or less convoluted way to express the configuration data (e.g cdrom
	paths).

	This patch starts the compatibility layer, implementing the
	reverse of the normalization Vdsm does for backward compatibility sake.
	We isolate those changes in one vmdevices.compat module, to make
	it easier to kill it as soon as we can.

	At the moment, we don't aim for full backward compatibility, which
	is not needed anyway. Most of the vm.conf is meant to be set by Engine
	and consumed by Vdsm; when checking the Vdsm responses, Engine reads
	only few selected fields, most notably 'deviceId', 'alias', 'address',
	for VFIO NICs, 'hostdev', for disks, 'volumeChain'.
	All of those are already returned by Vdsm even in the backward
	compatible flow.

	We used to dump all the vm.conf in the responses to Engine because
	it was simpler, but it always was a bad idea.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	virt: vmdevices: fix special handling of config()
	In commit 2b98daffb2c2dec we made the config() method
	of some device classes return None.

	The config() method is called in the backward-compatibility
	flow, when Vdsm has to rebuild the vm.conf to work in a 4.1
	environment, to return meaningful values in Vm.status().
	In the compatibility flow, if calling config() on a given device
	instance return None, nothing is added on vm.conf['devices']
	for that device.

	The rationale to return None for some device classes, is to make sure
	vm.conf['devices'] is updated once: either before the Vm is started,
	code added in 4.2, or after the Vm was started, in the existing
	Vm.getUnderlyingDevicesInfo() method.
	Doing this lead to simpler and safer code: we avoid entirely
	the problem of recognizing and updating devices, adding duplicates
	and so forth.

	However, this is not good enough when Vdsm 4.2 runs in 4.1 cluster:
	until the Vm is running, any call to Vm.status() will return partial
	vm.conf. Furthermore, the code in Vm.getUnderlyingInfo() *will*
	add the missing devices, but with minimal information.

	We have another approach, implemented in this patch:
	Let's just leave vm.conf alone completely in the Vm.run(), and
	rebuild the device configuration data on the fly in Vm.status().

	This approach keeps the advantage of having just one piece of code
	which changes vm.conf['devices'], and make it possible to
	fully rebuild the device configuration avoiding any changes to
	the existing code, thus maximizing backward compatibility.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

2018-02-19  Eyal Shenitzky  <eshenitz@redhat.com>

	lvm: add error information for CannotRemoveLogicalVolume exception
	When lvremove operation failed, the only information the log provides is
	the lv-name and the vg-name.

	Add the lvm command error message to the log in order to
	reveal the reason of the failure..

	Bug-Url: https://bugzilla.redhat.com/1528367

2018-02-19  Francesco Romani  <fromani@redhat.com>

	virt: vmdevices: storage fix 'type'
	Due to a rebase glitch, this change was not included in
	change I294f7ee4d477dd49eff79185147779ba16d3cbf9
	This patch fixes that.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	virt: vmdevices: fix attribute reporting
	Careful comparison of the data we get from XML and from the vm.conf
	reveal that we misreport few fields.
	This patch makes the XML path behave like the vm.conf path.

	Please note that the meaning of Device classes fields 'type', 'device'
	and 'deviceType' is highly irregular, and so is the libvirt
	representation. There is no one real correct mapping, so we need
	to preserve backward compatibility with what we did in the past.

	Bug-Url: https://bugzilla.redhat.com/1542117

	virt: network: use get_simple_metadata helper
	Use the newly introduced get_simple_metadata helper instead
	of reimplementing a variant of it.
	No intended change in behaviour.

	Related-To: https://bugzilla.redhat.com/1542117

2018-02-18  Edward Haas  <edwardh@redhat.com>

	Revert "net: lshw is broken on fc27, until fixed, swallow the error"
	A fix has been released for fc27: lshw-B.02.18-15

	This reverts commit 7b4ee87d0f5f802a0ac0d8e84de9954d62ede994.

	(cherry picked from commit eb2764a89df680d2764eded56b63b43853f148f6)

2018-02-15  Eyal Shenitzky  <eshenitz@redhat.com>

	Storage: Use INFO log level for system state changes
	Some storage operations like removing a directory log the operation only
	in DEBUG level.  This makes debugging issue like missing directories in
	/run/vdsm/storage hard.

	Change system state change operations log level to INFO.

	Bug-Url: https://bugzilla.redhat.com/1531066

2018-02-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Create lockfile.lock func  to avoid running multiply instances of vdsmd
	To avoid running executable twice we use a lockfile. The lockfile module
	contains lock function that can be use when starting the executable.
	First instance can get the lock file, second try throws exception and
	exit.
	On D state we can restart the service and depends on the system, we might
	get to a state that the daemon controller runs two instances of the same
	service executable. this lock mechanism helps to avoid such cases.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1525171
	(cherry picked from commit 1d134928f8bb2c22c06736016ec44cb79905ec7c)

2018-02-14  Daniel Erez  <derez@redhat.com>

	spec: update libvirt requirement for fedora
	For fedora, require libvirt-python >= 3.10.0-132
	see: https://bugzilla.redhat.com/show_bug.cgi?id=1540872

	Bug-Url: https://bugzilla.redhat.com/1469235

2018-02-14  Eyal Shenitzky  <eshenitz@redhat.com>

	Logging: Add missing log for system state change operations
	Bug-Url: https://bugzilla.redhat.com/1531066

2018-02-14  Francesco Romani  <fromani@redhat.com>

	vm: metadata: try to use backward compat params
	To ensure full 4.1 compatibility, Vdsm needs to report the deviceId
	of the devices of a VM. This requires a Device is given its deviceId
	in the first place when built out of the XML.
	Vdsm 4.2 always recover from XML, regardless the cluster it is installed
	on (4.1 vs 4.2 vs 4.y), so, if the deviceId is given, let's use it.

	This patch makes the device always use this field even if unneeded,
	e.g 4.1. cluster later upgraded to 4.2. If Engine doesn't need this
	field anymore, the only real drawback is wasted space in the domain
	metadata.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	virt: metadata: save deviceId if available
	We need to save deviceId in the metadata, to be able to fully
	rebuild a faithful device state on recovery. Otherwise, Engine
	will not be able to match the devices.

	We will have this attribute set (not None) only if the VM was started by
	a 4.1 entity, so we can safely attempt to save it every time: for 4.2
	VMs, we will silently skip it

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	vm: migration: don't add conf['xml'] if src is 4.1
	When initializing a VM, we put the _srcDomXML content in
	the 'xml' field, and we use it as authoritative source of
	truth for the domain definition.

	And this is fine if we do that once the original XML is in
	turn authoritative and complete, and this is true only
	for 4.2 sources, being those Engine calls or migrations from
	4.2 Vdsms.

	When we migrate from 4.1 sources, we should not consider this
	XML truthful until libvirt gives it back to us, and pre-initialize
	Vdsm with data from vm.conf.

	Once the domain is started, we reconcile the data Vdsm received
	to the XML from libvirt, and from that moment on it doesn't matter
	anymore the source of the XML - the XML is 4.2 compliant, otherwise
	we will have other bugs, for example in recovery.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	virt: utils: fix has_xml_configuration for 4.1
	It is possible to run Vdsm 4.2 in 4.1 clusters.
	virt.utils.has_xml_configuration was not designed
	with this scenario in mind, and produces wrong results
	in this case.

	This patch fixes the function and adds few tests.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

	vm: export memGuaranteedSize in status
	We need to report memGuaranteedSize to Engine when
	running in 4.1 cluster.
	Vdsm already takes care of all the bookkeeping, the
	only missing step is to add the value to the response
	of getVMFullList, so in the return value of Vm.status().

	To do so, we must also make sure to restore the value
	Vdsm saved, but only if we Engine didn't set itself.

	Backport-To: 4.2
	Related-To: https://bugzilla.redhat.com/1542117

	vm: split the device creation flow
	There is no need anymore for all the complexity we had,
	so let's de-entangle the flows and lets kill some no
	longer useful debug tunables.

	Backport-To: 4.2
	Related-To: https://bugzilla.redhat.com/1542117

2018-02-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	abrt: change in abrt config to keep full coredump
	The output without full coredump is not meaningful enough to debug qemu
	crashes. With this patch full coredump will be handled by abrt service
	and saved under /var/tmp/abrt in the form:
	/var/tmp/abrt/ccpp-2017-11-23-15:53:15-2166/coredump

	We limit the codedumps to 13.5Gib to avoid passing the /var pass minimum
	capacity requirement

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1533410

2018-02-12  Eyal Shenitzky  <eshenitz@redhat.com>

	Logging: Add virt missing log for system state change operations
	Bug-Url: https://bugzilla.redhat.com/1531066

2018-02-12  Francesco Romani  <fromani@redhat.com>

	virt: metadata: add get_simple_metadata helper
	We will use it in the upcoming patches to avoid code duplication.

	Backport-To: 4.2
	Related-To: https://bugzilla.redhat.com/1542117

	taskset: export cpulist_parse function
	We need this helper in libvirtxml.py now.
	Only trivial rename.

	Backport-To: 4.2
	Related-To: https://bugzilla.redhat.com/1542117

	vm: devices: report correct controller type
	We should report the right device type for controller ('controller'),
	to match what Vdsm 4.1 used to report.
	Engine >= 4.2 doesn't care about that.
	We use this value for recovery in 4.1 compatibility mode.

	Backport-To: 4.2
	Bug-Url: https://bugzilla.redhat.com/1542117

2018-02-11  Edward Haas  <edwardh@redhat.com>

	net: lshw is broken on fc27, until fixed, swallow the error
	lshw is used by vdsm to query which interfaces are handled by dpdk.
	On fc27 last update, the lshw json output format got curropted.

	As a workaround, is such an error is detected on fc27, assume no dpdk
	interfaces exist in the system.

	(cherry picked from commit 7b4ee87d0f5f802a0ac0d8e84de9954d62ede994)

2018-02-08  Benny Zlotnik  <bzlotnik@redhat.com>

	vm: introduce ReplicationNotInProgress exception
	Currently, in diskReplicateFinish, when there is
	no replication in progress or there is an error in
	the replication process, the same exception will
	be sent to the engine.

	However, when the diskReplicate attribute is not
	available as a result of some failure we should be
	able to perform a cleanup to make the next LSM
	possible without a manual cleanup.

	Bug-Url: https://bugzilla.redhat.com/1542423

2018-02-08  Miguel Martin  <mmartinv@redhat.com>

	vdsm: call "after_vm_pause" hooks when the VM was paused because of an EIO
	Now vdsm does not call "after_vm_pause" after the VM was paused because
	an I/O Error.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1543103

2018-02-06  Irit Goihman  <igoihman@redhat.com>

	vdsm-api: speed up vdsm-client using pickled schema
	In order to make vdsm-client commands run faster, we
	can parse pickle schema args instead of yaml schema.
	The pickle schema is created on every vdsm upgrade by
	vdsm-tool schema configurator.
	In case that pickle schema is not available, yaml schema
	will be loaded instead.
	If no pickle schema is available, it should be created using
	'vdsm-tool configure --force' and not created automatically.

	When comparing running time of vdsm client verbs we can see
	that running time using pickle is ~2.7 times faster than using yaml.

	    time vdsm-client Host ping2

	no changes (using yaml schema):
	real	0m0.952s
	user	0m0.898s
	sys	0m0.048s

	using pickled schema:

	real	0m0.358s
	user	0m0.279s
	sys	0m0.043s

	All code that is calling client.py verbs will be affected
	by this change.

	Bug-Url: https://bugzilla.redhat.com/1466461

2018-02-06  Francesco Romani  <fromani@redhat.com>

	virt: nic: report type='interface'
	In the vm.conf compatibility flow, NIC objects initialized from XML
	used to misreport their type. They should report type=='interface'.

	Apparently noone but the vm_migrate_hook.py cared about that.

2018-02-05  Dan Kenigsberg  <danken@redhat.com>

	automation: include storage in combined coverage report
	As long as we do not have independent reports for each subsystem, I'd
	like to be able to tell which lines or modules have zero coverage.
	The combined report gives me that. This patch includes storage tests
	in this bird's eye view of uncovered code.

2018-02-04  Dan Kenigsberg  <danken@redhat.com>

	storage.sp: drop unused data memeber
	StoragePool._maxHostID is set, but never used.

	storage.mailbox_test: call unregisterMsgType
	For code cleanliness only. No functional gain.

2018-02-03  Dan Kenigsberg  <danken@redhat.com>

	storage.mailbox: setMaxHostID: drop dead code
	mailbox.setMaxHostID is used only by sp.setMaxHostID, which was never
	fully implemented nor used. Both can be silently dropped from the code
	base.

	storage.mailbox: welcome Python 2.5
	Replace a couple of acquire/release pairs with a nicer "with".
	There is no functional gain, but there is a little less ugly code.

2018-02-01  Nir Soffer  <nsoffer@redhat.com>

	automation: Export subsystem coverage reports
	Store generated coverage reports in the exported-artifacts directory.

	The reports can be viewed in Jenkins build page at:
	- artifact/exported-artifacts/htmlcov-storage-py27/
	- artifact/exported-artifacts/htmlcov-storage-py36/

	tests: Create coverage report for storage tests
	The storage tests generate now coverage report by default for both
	python 2.7 and python 3.6 tests.

	Coverage data is collected in .coverage-storage-py27 and
	.coverage-storage-py36. The coverage data files can be used to create
	combined coverage report.

	Each testenv creates its own html coverage report in:
	- tests/htmlcov-storage-py27
	- tests/htmlcov-storage-py36

	The view the report locally use:

	    xdg-open tests/htmlcov-storage-py27/index.html

	automation: Add the missing tested repo
	The fcraw repos file was missing the tested repo, which can explain why
	ovirt-imageio-common is not found in the CI.

	Using "fc28" since $distro is "fcraw", and we don't have:
	http://resources.ovirt.org/repos/ovirt/tested/master/rpm/fcraw/

	But we have:
	http://resources.ovirt.org/repos/ovirt/tested/master/rpm/fc28/

	tox: Remove storage-py35 testenv
	We support now only Fedora 27 or EL 7 for development, so we don't need
	to test on python 3.5.

2018-02-01  Eyal Shenitzky  <eshenitz@redhat.com>

	Storage: Add tests for transient disks creation

2018-01-31  Allon Mureinik  <amureini@redhat.com>

	spec: Require device-mapper-multipath for SCSI reservations
	Bug 1510834 describes an issue with device-mapper-multipath not
	distributing unprivileged SGIO to its child devices, thus preventing
	guests from using SCSI reservations on their direct LUNs.

	This issue was fixed in RHEL and CentOS 7.4.z by
	device-mapper-multipath-0.4.9-111.el7.2. This patch requires that
	version to ensure that the latest vdsm will supply the ability to use
	such reservations.

	Related-To: https://bugzilla.redhat.com/1510834
	Related-To: https://bugzilla.redhat.com/1111783

	spec: require kernel for safe use of blkdiscard
	BZ#1507043 describes a case where using blkdiscard on a storage array
	that misreports its limits may result in an illegal request. This
	problem was fixed by kernel-3.10.0-693.14.1.el7 that's available for
	both RHEL and CentOS 7.4.z updates. This patch requires that kernel
	version so that blkdiscard can safely be used with those arrays.

2018-01-31  Nir Soffer  <nsoffer@redhat.com>

	tests: Import qemuio instead of its names
	qemuio names are best used with the modules names. Replace imports of
	VerificationError, write_pattern, and verify_pattern with fully
	qemeio.VerificationError, qemuio.write_pattern, and
	qemuio.verify_pattern.

	While renaming, improve the indentation of some calls to make the code
	more clear.

	tests: Rename qemuio helpers
	Now that we have a proper module we can use shorter and nicer names.

	qemuimg: Port to python 3
	Fix few str/bytes issues that work in python 2 but breaks in python 3,
	both in the module and the tests.

	tests: Extract qemuio module
	This module provides the qemu_pattern_write and qemu_pattern_verify,
	used to write data to qcow2 files and verify qcow2 files content.

	Moving the functions to separate module will allow porting qemuimg tests
	to python 3. Currently they cannot run on python 3 since storagetestlib
	imports modules which are not compatible with python 3 yet.

	The tests for the helpers moved to a new module and converted to pytest.

2018-01-31  George Joseph  <gjoseph@digium.com>

	gluster: Fix error when brick is on a btrfs subvolume
	When a brick is on a btrfs subvolume, "gluster volume status detail"
	doesn't return the device, blockSize, mntOptions or fsName.
	cli._parseVolumeStatusDetail however expects them to be there so
	we get a "KeyError: 'device'" every time details are asked for.

	Those fields are now tested by calling get() instead of being
	directly accessed.

	Bug-Url: https://bugzilla.redhat.com/1410283

2018-01-30  Tal Nisan  <tnisan@redhat.com>

	Do not parse driver io attribute for CDROM devices
	CDROM devices don't need their io policy tempered with, especially since
	now CDROM devices can reside on a block domain and in that case get their
	io policy to change to 'native' which is not supported for CDROM devices

	Bug-Url: https://bugzilla.redhat.com/1536826

2018-01-29  Irit Goihman  <igoihman@redhat.com>

	vdsm-tool: configure: load schema
	Accessing pickle file that holds all schema objects is much faster
	than accessing the yaml schema.
	We create the pickle file at every version upgarde.

	Bug-Url: https://bugzilla.redhat.com/1466461

2018-01-29  Edward Haas  <edwardh@redhat.com>

	net: NM device needs to be stateless
	Currently, the NM device object keeps the device in its state. Doing so
	assumes that the device will not disapear before calling other actions
	on the object. Such an assumption has been found unsafe, as the device
	on which the object is based can be removed by NM in mid-air.

	With this change, the device is no longer saved in the object with
	re-fetched on each operation.
	If the device no longer exists, the NMDeviceNotFoundError exception is
	raised.

	Bug-Url: https://bugzilla.redhat.com/1538632

2018-01-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix tests that fail when enabling coverage
	Not sure why setting up coverage for the child python process fails, but
	we don't have to use python to test that execCmd return process stderr.

2018-01-29  Irit Goihman  <igoihman@redhat.com>

	vdsmapi: move load yaml action to a method
	since we load yaml schema in a few places, the code
	has been moved to a different method.

	Bug-Url: https://bugzilla.redhat.com/1466461

2018-01-29  Nir Soffer  <nsoffer@redhat.com>

	hsm: improve performance of getDeviceList(guids)
	When passing a "guids" list to getDeviceList, we used to call
	lvm.getPV() for each guid. Each call runs "pvs" command, using long
	filter including all the multipath devices, getting the information
	about a single pv.

	When passing empty "guids" list, we are using lvm.getAllPVs(), running
	"pvs" command once, getting the information about all pvs.

	This patch changes getDeviceList to always use getAllPVs(), improving
	performance significantly when using lot of guids.

	Here's a table that shows the execution time in seconds of getDeviceList
	with different amount of guides before and after this patch:

	guids   before   after
	-----------------------
	 0       8.67     8.77
	 1       6.98     7.65
	 2       8.59     6.93
	 4      12.48     7.16
	 8      17.78     7.44
	16      29.47     7.37
	32      53.52     8.66
	64      97.85    11.08

	This change also eliminates the bogus error when calling lvm.getPV() on
	an empty LUN. We use to log a bogus traceback about inaccessible PV that
	we did not create yet.

	Bug-Url: https://bugzilla.redhat.com/1533035
	Bug-Url: https://bugzilla.redhat.com/1539108

	automation: Remove pluggy version requirement
	We use tox and pytest with latest pluggy in other projects
	(ovirt-imageio, ioprocess) and we don't have any issues.

	Also, vdsm tests install newer pluggy anyway, so this requirement is not
	effective. Here is a report from recent vdsm test run:

	00:15:43.691 ================= test session starts ==================
	00:15:43.693 platform linux2 -- Python 2.7.5, pytest-3.3.0, py-1.5.2,
	    pluggy-0.6.0 -- /home/.../vdsm/.tox/lib-py27/bin/python2.7

2018-01-28  Dan Kenigsberg  <danken@redhat.com>

	remove vmfex hook
	hook-vmfex-dev has replaced hook-dev back in 2014. We should have
	dropped the ancient hook-vmfex long ago, but better later than never.

	Since ovirt-3.6, vdsm.rpm requires vdsm-hook-vmfex-dev, which in itself
	conflicts with vdsm-hook-vmfex.rpm. Thus it is clear that
	vdsm-hook-vmfex.rpm is not installable in any supported ovirt release.

2018-01-27  Dan Kenigsberg  <danken@redhat.com>

	test: move qemuimg_test to storage
	qemuimg module is part of the storage subsystem. Its test should be
	there, too.

	In its new location it has become clear that we should clear the
	memoized fake value of `qeming help` also after running qemuimg_test, so
	it does not make other tests dirty.

2018-01-26  Dan Kenigsberg  <danken@redhat.com>

	vmoperations_test: drop el6-only skip
	el6 is long-unsupported.

	mkimage_test: avoid skipping tests
	I do not recall why we skip a failure to run blkid. We should run the
	tests we write, not skip them.

	mkimage_test: do not ignore mount failures
	Ib70e6f3ffe9bd68 has fixed our loop device mess. Let us not ignore a
	problem if we see it.

	py3: mkimage_test: drop from blacklist

2018-01-25  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix typo in condition excluding CD-ROM disk mapping warnings
	It should check that the disk serial number is longer than 20 characters, but
	due to misplacement of the colon it didn't.

2018-01-25  Edward Haas  <edwardh@redhat.com>

	Revert "net: unmanage bonds used for options gathering"
	This reverts commit 1566036c547cf6d25894e51ae7e0f69d68ae5057.
	OST upgrade from 4.1 to 4.2 is failing with:
	DBusException: org.freedesktop.DBus.Error.AccessDenied: Property
	"Managed" of interface "org.freedesktop.NetworkManager.Device" is not
	settable

2018-01-24  Ala Hino  <ahino@redhat.com>

	spec: Require qemu-kvm-rhev-2.10 for Fedora
	This qemu-img version comes with support for unsafe commands that we
	want to use when creating volumes.

	Bug-Ur: https://bugzilla.redhat.com/1535582

2018-01-24  Milan Zamazal  <mzamazal@redhat.com>

	py3: virt: Make format_xml return string in Python 3
	format_xml returns its value from a binary stream.  This makes vmxml_test.py
	to fail when comparing incompatible types, bytes and str.

	The docstring says the function should return str, so let's fix the return
	value by decoding the bytes from the stream.  This also makes vmxml_test.py
	working in Python 3, so we can remove it from Python 3 blacklist.

	py3: tests: Don't crash on non-ASCII permutation arguments
	When permutation arguments contain non-ASCII characters, they may be put into
	the reported pseudo-method name.  However the corresponding stream is open as
	ASCII stream, which results in errors like the following in Python 3:

	  UnicodeEncodeError: 'ascii' codec can't encode characters in position 61-67: ordinal not in range(128)

	To prevent such errors, we must encode the method name before outputting it to
	the stream.

2018-01-24  Edward Haas  <edwardh@redhat.com>

	net: During atomic copytree, apply fsync on all files
	In order to assure integrity of the files after copy, they need to be
	sync and applied on the filesystem.
	The OS may delay the actual sync if not explicitly specified to optimize
	media writes.

	Bug-Url: https://bugzilla.redhat.com/1511608

2018-01-24  Sahina Bose  <sabose@redhat.com>

	gluster: Installing gluster-gnfs
	gluster-gnfs is no longer part of the glusterfs-server
	dependencies. Requiring it as part of gluster management
	to keep backward compatability for existing gluster
	nfs users.

	Bug-Url: https://bugzilla.redhat.com/1528615

2018-01-24  Edward Haas  <edwardh@redhat.com>

	net: Clean unused methods from netconfpersistence

2018-01-24  Eyal Shenitzky  <eshenitz@redhat.com>

	core: set transient disk type as file
	When creating a transient disk we actually add another
	layer on top of the disk latest layer.
	This layer creates on the host local storage under
	/var/lib/vdsm/transient, therefore it will always create
	as file regardless to the disk this layer based on.

	For the given disk device from the engine -

	 <disk snapshot="no" type="block" device="disk">
	  <target dev="sda" bus="scsi"/>
	  <source dev="/rhev/data-center/mnt/blockSD/123/images/123/123"/>
	  <driver name="qemu" io="native" type="raw" error_policy="stop" cache="writethrough"/>
	  <address bus="0" controller="0" unit="0" type="drive" target="0"/>
	  <serial>123</serial>
	</disk>

	With the following metadata section -

	<metadata>
	  <ovirt-tune:qos/>
	  <ovirt-vm:vm>
	    <minGuaranteedMemoryMb type="int">1024</minGuaranteedMemoryMb>
	    <clusterVersion>4.2</clusterVersion>
	    <ovirt-vm:custom/>
	    <ovirt-vm:device devtype="disk" name="sda">
	      <ovirt-vm:shared>transient</ovirt-vm:shared>
	      <ovirt-vm:imageID>123</ovirt-vm:imageID>
	      <ovirt-vm:poolID>123</ovirt-vm:poolID>
	      <ovirt-vm:volumeID>123<ovirt-vm:volumeID>
	      <ovirt-vm:domainID>123</ovirt-vm:domainID>
	    </ovirt-vm:device>
	    <launchPaused>false</launchPaused>
	    <resumeBehavior>auto_resume</resumeBehavior>
	  </ovirt-vm:vm>
	</metadata>

	The XML that should eventually create should look like -

	<disk device="disk" snapshot="no" type="file">
	    <address bus="0" controller="0" target="0" type="drive" unit="0" />
	    <source file="/var/lib/vdsm/transient/123.123" />
	    <target bus="scsi" dev="sda" />
	    <serial>123</serial>
	    <driver cache="writethrough" error_policy="stop" io="threads" name="qemu" type="qcow2" />
	</disk>

	Bug-Url: https://bugzilla.redhat.com/1534950

2018-01-23  Petr Horáček  <phoracek@redhat.com>

	net: unmanage bonds used for options gathering
	NetworkManager acquires bondscan- bondings in the middle of default
	bond options gathering. This race causes vdsmd startup to fail.

	With this patch we unmanage created bondscan- devices so they won't
	be touched by NetworkManager.

	Bug-Url: https://bugzilla.redhat.com/1534258

2018-01-22  Sahina Bose  <sabose@redhat.com>

	gluster: Use gluster 3.12 version
	Bug-Url: https://bugzilla.redhat.com/1429536

2018-01-22  Dan Kenigsberg  <danken@redhat.com>

	py3: virttests.vmlease_test: test on Python 3
	vmlease_test used to be broken on Python 3, but now it is just fine.
	Remove the skips from the tests.

2018-01-21  Nir Soffer  <nsoffer@redhat.com>

	travis: Remove Fedora 26 build
	We don't support this version, and there is no point in testing it.

2018-01-20  Nir Soffer  <nsoffer@redhat.com>

	dockerfile: Update tox version
	We require now tox 2.9.1, but the docker images still install 2.5.0, so
	travis build started to fail.

	automation: Run distpkg and rpms check before install
	Checking the distribution tarball and rpms should be faster than yum
	install, failing the build earlier.

	tests: Extract rpm linting to separate script
	check-patch.sh is not a place for tests, having a separate script enable
	running the tests manually when needed.

	build: Update tox to latest version
	We are using an old version of tox for no good reason. Update tox to
	latest version. I'm using latest version with ovirt-imageio and
	ioprocess.

2018-01-20  Dan Kenigsberg  <danken@redhat.com>

	py3: network.tc_test: attempt to test on Python 3
	Most of network.tc_test is passing on Python 3. This patch marks the
	two still-broken tests, but tests all the other ones.

	py3: nettestlib: fix Tap.addDevice
	network.nettestlib.nettestlib.Tap('foo').addDevice() now works in Python
	3, too. However, network.tc_test.TestPortMirror.testMirroring* are still
	failing due to other yet unknown reasons.

2018-01-20  Ala Hino  <ahino@redhat.com>

	create-snapshot: Use unsafe option when creating snapshots
	With new qemu-img support for unsafe operations (added in qemu-img
	2.10.0), and as the VM may be running while creating snapshots,
	we have to use new qemu-img support for unsafe operations. When
	using the new unsafe support, qemu-img doesn't access the backing file,
	hence we have to provide the size.

	Providing the size of the volume will save preparing and tearing down
	the volume, thus improving the performance of snapshot creation.

	However, when working with qemu-img < 2.10, we do have to prepare and
	the backing volume despite the fact that we add the size, because it is
	NOT documented that qemu-img will not access the backing chain.

	Bug-Url: https://bugzilla.redhat.com/1395941

2018-01-20  Ala hino  <ahino@redhat.com>

	qemuing: Support unsafe volume create
	Extend the qemuimg create helper to support the unsafe option.

	Bug-Url: https://bugzilla.redhat.com/1395941

2018-01-19  Francesco Romani  <fromani@redhat.com>

	vm: remove unused option
	Back in time, we add the 'device_xml_legacy_configuration_enable'
	option to smoothen the transition between vm.conf device initialization
	and XML-based device initialization: some device classes where not yet
	updated.

	Now things are changed, and keeping this option is more harmful than
	helpful. Time to remove it for good, it should be never used anyway.

2018-01-19  Nir Soffer  <nsoffer@redhat.com>

	tests: Move check_distpkg to external script
	check-patch.sh should be a trivial adapter for ovirt CI. This is not a
	place for test code. Tests should live under tests/, so we can run them
	separately when needed.

	automation: Extract create_artifacts_repo helper
	Simplify check-patch.sh by moving the dirty details into a helper
	function in the ovirt.sh library.

2018-01-18  Milan Zamazal  <mzamazal@redhat.com>

	tests: Don't set legacy VM parameters if `xml' is provided
	Engine doesn't send them anymore and new code may be confused by their presence
	when checking for legacy configuration presence.

	virt: Set correct disk paths on XML Engine resume
	When a VM is resumed from a snapshot, the disks in its domain XML must be
	updated to the drives obtained from Engine.  In the legacy non-XML Engine path
	it was ensured by initializing disk devices from conf provided by Engine and
	replacing the disk attributes in domain XML with that information.  However
	with XML Engine the only source of information used is the domain XML from the
	snapshot, which is wrong: Devices are initialized from it and the domain XML is
	updated with information from itself, i.e. not updated at all.

	To fix that both Engine and Vdsm patches are needed.  Engine must provide
	previously omitted `xml' parameter on resume from snapshot, with up to date
	drive parameters.  And Vdsm must take the updated disk properties from that
	parameter.  Only disk attributes are updated, the rest of the domain XML must
	be used from the snapshot untouched.

	This patch implements the Vdsm changes.  We must ensure that all occurrences of
	XML data are properly updated and the updated data is used everywhere, so we
	perform the update as soon as possible, that means in Vm.__init__.

	Moreover there are the following situations we must distinguish and handle
	properly:

	- Modern way, `xml' param is present: We use _srcDomXML and update it with that
	  param.
	- Legacy way, no `xml' param, but legacy configuration is present: We use
	  _srcDomXML and update it with devices created from conf provided by Engine.
	- Intermediate way, no `xml' param and no legacy configuration (Engine 4.2.0):
	  This is wrong and doesn't provide necessary configuration, but we can't crash
	  on that; _srcDomXML is used unchanged.

2018-01-18  Francesco Romani  <fromani@redhat.com>

	virt: periodic: reschedule exclusive operations
	The semantic of exclusive operations is that no more than
	one operation should be running at any given time.
	This means that one periodic exclusive operation is always either:
	1. running (this includes being blocked)
	2. waiting to be runned, thus scheduled and pending execution

	This means that we should schedule again one new exclusive operations:
	1. once it is completed. This is because of the semantic explained just
	   above.
	2. iff we failed to submit to the executor. This is because
	   the executor never loses data: once one operation is submitted,
	   it *will* be executed (sometime in the future, asap)

	Due to one oversight, #2 was missing, and this patch implements the
	logic.

	Bug-Url: https://bugzilla.redhat.com/1512547
	Backport-To: 4.1

2018-01-18  Petr Kotas  <petr.kotas@gmail.com>

	virt: Fix the wrong order of service shutdown
	The shutdown order of the services was reversed.
	The vdsm shutdown before the libvirt-guests
	resulting in the wrong information propagated back
	to engine.

	This patch fixes the order.

	Bug-Url: https://bugzilla.redhat.com/1334982

2018-01-17  Nir Soffer  <nsoffer@redhat.com>

	image: Keep volume preallocation during copy
	When copying preallocated volumes to storage domain supporting
	sparseness, use pareallocation="falloc" to keep image preallocated.
	Without this flag volume copied during live storage migration or cloning
	become sparse.

	On file systems supporting fallocate(2) (Gluster, NFS 4.2) preallocation
	takes no time.  On file systems that do not support it (NFS < 4.2) this
	will slow down the copy.

	This change fixes both live storage migration and moving/copying disks
	with cluster level < 4.2.

	Bug-Url: https://bugzilla.redhat.com/1532133

	qemuimg: Add preallocation option to convert()
	qemu-img convert supports preallocation option like create. This option
	is required to keep image preallocation during copy.

	Bug-Url: https://bugzilla.redhat.com/1532133

2018-01-17  Francesco Romani  <fromani@redhat.com>

	tests: periodic: add test for exclusive operation
	Due to a bug in the implementation of exclusive periodic operations,
	if we try to schedule while the executor is full, the attempt fails
	(ResourceExhausted), and it is never tried again.

	This is wrong: the semantic of the exclusive operations is that
	at any given time exactly one given operation should be either
	1. executing (including blocked)
	2. scheduled to be executed

	So the correct behaviour is to schedule again the operation,
	trying until we succeed to submit it to the executor.
	Once we succesfully submitted the operation to the executor,
	we should schedule it again once it completed -somehow.
	The latter part is already implemented.

	Add test to demonstrate the bug.

	Bug-Url: https://bugzilla.redhat.com/1512547
	Backport-To: 4.1

	vm: net: save device metadata on update
	The Vm.updateDevice() API may update the port mirroring.
	Looks like we don't persist the configuration after the change,
	and we didn't also in 4.1 and 4.0.

	This patch saves the update device metadata (not only the updated
	portMirroring information) after a succesfull update.

	Bug-Url: https://bugzilla.redhat.com/1533778

	lib: executor: max_workers may be None
	The field max_workers may be None, and this is handled gracefully
	in all the places but __repr__. If we repr() one executor with
	this setting, we will fall badly. Add fix to format string and
	test to exercise this code.

2018-01-17  Milan Zamazal  <mzamazal@redhat.com>

	virt: Update domain descriptor on disk mapping updates
	When disk mapping is changed, domain metadata is updated.  However the updated
	metadata may not be propagated to Engine when Vm._domain still contains stale
	XML data.

	This patch adds the missing domain XML update from libvirt.

	Bug-Url: https://bugzilla.redhat.com/1518209

2018-01-16  Ala hino  <ahino@redhat.com>

	qemuimg: Memomize _supports_option results
	In commit 197f3877 (qemuimg: Add _supports_option helper), we added a
	helper to check whether qemuimg supports an option. In this patch we
	memoize the result of that helper. This caches the info until Vdsm is
	restarted, so if qemu-img is upgraded or downgraded, Vdsm needs to be
	restarted.

2018-01-16  Milan Zamazal  <mzamazal@redhat.com>

	virt: Storage XML hotplug
	Support for hot plugging and unplugging storage devices specified by XML rather
	than their parameters.  This is another step towards using libvirt XML
	directly.  The old way of parameter passing remains supported for backward
	compatibility with older Engines.

	virt: Replace NIC XML on XML network hot plug
	If a NIC has empty network, the network name must be replaced with
	`;vdsmdummy;'.  It's handled in Interface instance creation on NIC hot plug,
	but the untouched XML received from Engine, i.e. with empty network, is used in
	XML NIC hot plug.  It results in NIC hot plug failure in libvirt.

	This patch updates the received NIC XML before passing it attachDevice.

	Note that no update is needed for XML NIC hot unplug, since the hot plugged XML
	is always constructed from the device instance there.

	Bug-Url: https://bugzilla.redhat.com/1533762

2018-01-16  Dan Kenigsberg  <danken@redhat.com>

	automation/check-patch.sh: rebuild rpms more often
	We'd like to try building the rpm with any change to the automation
	directly (e.g repo changes, or changes to check-patch.sh itself)

2018-01-16  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't use iterkeys in vmdevices.storage
	It breaks Python 3 compatibility and causes test failure in a followup patch.

2018-01-16  Francesco Romani  <fromani@redhat.com>

	virt: test: exercise the propagateErrors flow
	The change Iaa845ecd36235e21b95458070efe819972dc4d56 fixed one bug
	when a cdrom is created using vm.conf: the propagateErrors field
	was not initialized in this flow, leading to a failure in getXML.

	This patch adds basic tests to exercise the defaults in both flows.

2018-01-15  Milan Zamazal  <mzamazal@redhat.com>

	virt: Split dev_from_xml function
	dev_from_xml is suitable for all devices except for drives.  Drives require
	special parsing of the device XML and then some preparation actions must be
	performed before the device instance can be created.  To make dev_from_xml
	usable also for storage devices, we extract a new function out of dev_from_xml
	that processes the provided XML without creating the device instance.

2018-01-15  Nir Soffer  <nsoffer@redhat.com>

	lvm: Log only once when we refresh active lvs
	When we refreshed active lvs, we called lvm public function
	refreshLVs(), logging again about the refreshed lvs:

	2018-01-02 20:00:55,619+0200 INFO  (vmrecovery) [storage.LVM]
	Refreshing active lvs: vg=6ffbc483-0031-403a-819b-3bb2f0f8de0a
	lvs=['93331705-46be-4cb8-9dc2-c1559843fd4a'] (lvm:1290)

	2018-01-02 20:00:55,619+0200 INFO  (vmrecovery) [storage.LVM]
	Refreshing LVs (vg=6ffbc483-0031-403a-819b-3bb2f0f8de0a,
	lvs=['93331705-46be-4cb8-9dc2-c1559843fd4a']) (lvm:1318)

	This looks like 2 refreshes in the same time, and doubles the noise in
	the logs.

	Fixed by extracting private and unlogged _refreshLVs() function, and
	using it from the public and logged functions.

	Bug-Url: https://bugzilla.redhat.com/1432039

	lvm: Do not refresh special lvs during lvm bootstrap
	The special lvs are currently static (e.g. ids, leases) or being
	refreshed when needed (metadata), so we don't need to refresh them
	during bootstrap.

	Bug-Url: https://bugzilla.redhat.com/1432039

	blockSD: Refresh the metadata lv only if needed
	If the metadata lv was extended on the SPM, we may try to read or write
	volume metadata block after the end of the device. Refresh the metadata
	lv in this case, and disable all other unneeded refreshes.

	Bug-Url: https://bugzilla.redhat.com/1432039

	lvm: Do not refresh lvs static lvs
	Since change I845ce1f930d we are refreshing active LVs when activating
	LVs. This is required for lvs which may be extended to prevent data
	corruption if the lv size on the host is not correct.

	However for static lvs like most of the special lvs, this refresh is not
	needed, and causes additional load on the storage server for no value,
	and lot of noise in vdsm logs.

	lvm.activateLVs has now a ``refresh`` argument, allowing disabling
	refresh for LVs which do not need a refresh. We use the new option to
	avoid refreshing static LVs.

	With this change, only the metadata lv is refreshed when activated.

	Bug-Url: https://bugzilla.redhat.com/1432039

2018-01-15  Ala hino  <ahino@redhat.com>

	volume: Use unsafe=True when calling qemuimg.info()
	When calling qemuimg.info() the VM may be running, hence we have to use
	unsafe=True when calling it.

	Bug-Url: https://bugzilla.redhat.com/1533155

	qemuimg: Add -U option when calling qemuimg.info()
	Change qemuimg.info() helper to support qemu-img support for unsafely
	execute commands, that was added in qemu 2.10.0.

	Bug-Url: https://bugzilla.redhat.com/1533155

	qemuimg: Add _supports_option helper
	Qemu 2.10.0 added unsafe commands.  When using qemu >= 2.10, we have to
	use the unsafe option, otherwise the commands fail.  However, this
	change isn't backward compatible, i.e. while adding the unsafe option
	will work with the new qemu version, it will fail when using qemu <=
	2.9. In this patch, we add a helper to check whether qemu supports
	option for command. We will use this to check if qemu-img supports the
	-u/-U options.

	Bug-Url: https://bugzilla.redhat.com/1533155

2018-01-15  Nir Soffer  <nsoffer@redhat.com>

	storage: Fix cdrom with cluster version 4.1
	Older engine did not specify propagateErrors for cdrom, but since commit
	f609ec496a24 (vm: support error_policy='report' for CDROMs), we assume
	that cdrom has a propagateErrors attribute and fail to start a vm with a
	KeyError.

	Fixed by initializing with default value.

2018-01-15  Edward Haas  <edwardh@redhat.com>

	net: Relocate dns module from network.netinfo to network
	The dns module should now represent any dns related action, including
	set actions (which should come in the future).

	This is a netinfo cleanup step, aiming to have netinfo as a pure info
	collector, utilizing other modules/packages info reporting capabilities.

	net: Remove netinfo.vlans and replace with alternatives
	This is a netinfo cleanup step, aiming to have netinfo as a pure info
	collector, utilizing other modules/packages info reporting
	capabilities.

	hooks net: Remove the fakesriov hook
	With the introduction of a dedicated network caps, and the will to allow
	Engine to use it, either a new hook point should be created or drop any
	existing hooks that manipulate the network caps data.

	It has been decided to drop the network caps for now, especially when
	the existing one is not used in a production env.
	Therefore, this patch removes the fakesriov hook.

	net: Import valid IP data from an ifcfg file
	When the IP configuration is retrieved from an existing ifcfg file, the
	static IP configuration is valid only if all values exist.
	When NM is active, ifcfg file may contain partial configuration values
	which may not be used with a pure ifcfg setup.

	In case one or more values are missing, all IP values are considered as
	missing.

	Bug-Url: https://bugzilla.redhat.com/1530839

	net: Do not preserve ifcfg IP data for bond and bridge slaves
	During the ifcfg configuration, in some scenarios the defined IP
	configuration in the existing ifcfg file is preserved.
	(When a base device is not owned by VDSM, but a VLAN on top of it is)

	In this patch, IP configuration is not loaded from the ifcfg existing
	file if the device in question has (or needs to have) a bridge or
	a bond over it.

	Bug-Url: https://bugzilla.redhat.com/1530839

	net tests: Add network on external tagged bond
	Cover a scenario where a network is created over an existing external
	bond which also has a vlan on top of it (also external).

	Bug-Url: https://bugzilla.redhat.com/1530839

2018-01-15  Denis Chaplygin  <dchaplyg@redhat.com>

	qemuimg: Add preallocation support to qemuimg.create()
	Implements volume preallocation with qemuimg.create().
	Tested with glusterfs (including sharding feature) and nfs.

	Bug-Url: https://bugzilla.redhat.com/1532133

	qemuimg: Wrap create command into operation object
	As qemuimg.create() method potentially could be slow
	and we want to add (slow) preallocation support
	in the next patch.

	Therefore, we need to replace direct qemu-img execution
	with return of operation object, wrapping qemu-img call.
	Using operation object, we can abort the command
	if a task is aborted.

	Bug-Url: https://bugzilla.redhat.com/1532133

2018-01-15  Francesco Romani  <fromani@redhat.com>

	sampling: samplewindow: make last() return ts
	Change sampling.SampleWindow.last() to return the sample
	timestamp alongside the sample itself.
	It will be used by a future optimization patch.
	The change is pretty safe because noone uses this API anymore.

2018-01-13  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix loop devices failures in ovirt CI
	The issue with loop devices on ovirt CI is not having enough loop
	devices nodes in /dev/loop*.

	On local mock environment, we get 5 loop devices:

	<mock-chroot> sh-4.4# ls -lh /dev/loop*
	crw-rw-rw-. 1 root root 10, 237 Jan 11 21:52 /dev/loop-control
	brw-rw-rw-. 1 root root  7,   0 Jan 11 21:52 /dev/loop0
	brw-rw-rw-. 1 root root  7,   1 Jan 11 21:52 /dev/loop1
	brw-rw-rw-. 1 root root  7,   2 Jan 11 21:52 /dev/loop2
	brw-rw-rw-. 1 root root  7,   3 Jan 11 21:52 /dev/loop3
	brw-rw-rw-. 1 root root  7,   4 Jan 11 21:52 /dev/loop4

	2 devices are used by my the host docker daemon:

	<mock-chroot> sh-4.4# losetup -a
	/dev/loop1: [64771]:1179847 (/var/lib/docker/devicemapper/devicemapper/metadata)
	/dev/loop0: [64771]:1179771 (/var/lib/docker/devicemapper/devicemapper/data)

	On this system we can create 3 loop devices:

	<mock-chroot> sh-4.4# for n in `seq 3`; do truncate -s 1g backing$n; done
	<mock-chroot> sh-4.4# for n in `seq 3`; do losetup -f backing$n; done

	But when we create the forth device, losetup fail with the familiar
	error:

	<mock-chroot> sh-4.4# truncate -s 1g backing4
	<mock-chroot> sh-4.4# losetup -f backing4 --show
	losetup: backing4: failed to set up loop device: No such file or directory

	Creating additional loop devices fixes the issue:

	<mock-chroot> sh-4.4# mknod --mode 0666 /dev/loop5 b 7 5
	<mock-chroot> sh-4.4# losetup -f backing4 --show
	/dev/loop5

	Fix the issue by creating more loop device nodes. Vdsm tests use only
	one loop device at the same time, so 8 nodes should be enough.

2018-01-12  Germano Veit Michel  <germano@redhat.com>

	osinfo: error level on kdump_status exception logging
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1532483

2018-01-12  Dan Kenigsberg  <danken@redhat.com>

	vdsm-tool: sort configurators

2018-01-12  Milan Zamazal  <mzamazal@redhat.com>

	tests: Make ClientIF.prepareVolumePath working with dictionaries
	Real prepareVolumePath can handle both strings and dictionaries, so the fake
	method should too.  It'll be needed in a followup patch.

2018-01-12  Nir Soffer  <nsoffer@redhat.com>

	tests: Speed up concurrent.format_traceback test
	We use 1 second sleep for giving time for the worker thread to start and
	enter builtin time.sleep(). This works but make the test slow, so it
	does not run in the CI.

	Replace the sleep with 2 events - this ensures that we format a
	traceback when the worker thread is inside the inner() function, without
	sleeping.

	To test the formatted traceback, we don't try to check the function the
	thread is blocked on - this is racy and require sleeps. Instead, we
	check that the both the worker() and inner() function are mentioned in
	the traceback.

	This makes the test both deterministic and 1000 times faster so we can
	always run it.

	If a slave is horribly slow and the worker thread failed to start in 1
	second, we will fail with RuntimeError, making it clear that this is not
	a test failure but an issue with the environment.

	Example run:

	$ ./run_tests_local.sh common/concurrent_test.py:TestFormatTraceback.test_get_running_trace
	common.concurrent_test.TestFormatTraceback
	    test_get_running_trace                                      OK

	----------------------------------------------------------------------
	Ran 1 test in 0.001s

2018-01-12  Francesco Romani  <fromani@redhat.com>

	vm: support error_policy='report' for CDROMs
	Since patch I62ff73048cd5bef59a7c3236fcc8c91b0254a660
	Engine wants to set error_policy='report' for CDROM devices.
	To do so, it sets the right property in the XML it creates and
	sends to Vdsm.

	Problem is Vdsm doesn't (yet) pass through that XML, but
	it parses that data, initialize the VM data structures, and
	produce a new XML from that, which should be equivalent
	to the one it received.

	It is not the case, because Vdsm did not create the 'driver'
	element for CDROM devices alltogether.

	This patch fixes the issue making the Vdsm code recognize
	the error_policy = 'report' and producing the right XML
	in this case.

	Related-To: https://bugzilla.redhat.com/1207992

2018-01-11  Edward Haas  <edwardh@redhat.com>

	net tests: Fix vlan creation name length in nettestlib
	The VLAN helper which creates external vlans in tests had its vlan
	interface name wrongly set.
	The expected format is: <base iface>.<vlan id>
	However, due to a default maximum name length, some trailing random
	chars have been added to the vlan iface name.

	The vlan iface name is now fixed by setting the name length.

	net: Net restoration should not remove unowned bonds
	When the network restoration detects differences between actual and
	persisted (desired) state, an attempt to sync the two is made.
	Specifically, when external bonds exist, the restoration process will
	wrongly attempt to remove them (as they do not appear in the persisted
	state).

	Such external bonds which do no appear in the persisted state will no
	longer be removed in the network restoration process.

	Bug-Url: https://bugzilla.redhat.com/1530839

2018-01-11  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	spec: ship __init__.py* in vdsm-common only
	__init__.py* was listed both in the common and
	network file section, producing a conflict during dnf
	update.

2018-01-11  Martin Polednik  <mpolednik@redhat.com>

	caps: uppercase kernel features
	Requested by engine for better user experience.

2018-01-11  Francesco Romani  <fromani@redhat.com>

	clientIF: better exceptions on storage failure
	Improve the exceptions to better document which drive
	failed to be setup in the initialization phase.

	Related-To: https://bugzilla.redhat.com/1524941

2018-01-10  Nir Soffer  <nsoffer@redhat.com>

	automation: Fix build on Fedora 27
	dnf behavior has changed on Fedora 27, and we can no longer install vdsm
	rpms directly. Fix the issue by creating a repository from the built
	artifacts, and installing from the repository.

2018-01-10  Ala hino  <ahino@redhat.com>

	sosplugin: Add checkStatus=False when getting storage domains info
	Calling getDeviceList without checkStatus=False will try to check the
	status of every LUN, which can take many minutes with hundreds of LUNs,
	and potentially result in timeouts.
	When tested with 20 devices, it took 1.42373394966 seconds without
	checkStatus=False, while it tooks 0.969262838364 seconds with
	checkStatus=False.

	Bug-Url: https://bugzilla.redhat.com/1523292

2018-01-10  Petr Horáček  <phoracek@redhat.com>

	network: process only legacy networks under netinfo.cache
	Bug-Url: https://bugzilla.redhat.com/1530230

2018-01-09  Dan Kenigsberg  <danken@redhat.com>

	storage: lvm.setrwLV: nicer variable names

2018-01-09  Francesco Romani  <fromani@redhat.com>

	virt: tests: more testacases for drive XML
	Exercise the parsing of the error_policy for storage Drives.

	Test-Only: yes

	v2v: pylint: workaround false positive about Locks
	Workaround pylint issue #782, which is not yet fixed for module-level
	variables like we have in v2v.py.

	See https://github.com/PyCQA/pylint/issues/782 for details.

2018-01-09  Edward Haas  <edwardh@redhat.com>

	host stats net: Add a test to examine the net stats format
	Due to the will of refactoring the network caps, a test is introduced to
	examine the report format.

	net: Introduce a new getNetworkCapablities verb
	The network capabilities report has been included in the all-included
	getCapabilities verb.
	VDSM clients, mainly Engine, frequently need only the network information
	ignoring the rest.

	With this patch, VDSM exposes a focused verb, reporting only network
	related data.
	Usage example: vdsm-client Host getNetworkCapabilities

	For backward compatibility, the network caps data is kept in the
	getCapabilities report.

2018-01-09  Martin Polednik  <mpolednik@redhat.com>

	caps: add reporting of various kernel runtime config opts
	VDSM currently doesn't report status of things such as PTI (page table
	isolation), ibrs (indirect branch restricted speculation) or IBPB
	(indirect branch prediction barriers). Reporting these may be
	important for some users, as those settings imply performance and
	security characteristics of the underlying system.

	To learn about the state of those config opts, one can access the
	debugfs, see https://access.redhat.com/articles/3311301.

	Bug-Url: https://bugzilla.redhat.com/1532180

2018-01-09  Michal Skrivanek  <michal.skrivanek@redhat.com>

	spec: update dependencies for CVE-2017-5754,CVE-2017-5753,CVE-2017-5715

2018-01-08  Viliam Serecun  <v.serecun@gmail.com>

	net: Remove test_setupNetworks_swap_slaves_between_bonds
	redundant test (test_setupNetworks_swap_slaves_between_bonds)
	removed from /tests/functional/networkTest.py. The same test
	(method: test_swap_slaves_between_bonds) is placed
	in /tests/network/functional/bond_basic_test.py

2018-01-08  Francesco Romani  <fromani@redhat.com>

	tests: network: remove useless monkeypatch
	libvirtconnection_test.py started to fail regularly on my F27
	box with errors like:

	TypeError: __init__() got an unexpected keyword argument 'killOnFailure'

	or

	TypeError: nodeDeviceLookupByName() takes exactly 2 arguments (1 given)

	simplest reproducer:

	./run_test_local.sh network/tc_test.py common/libvirtconnection_test.py

	the root cause is still unclear, but do we stil need to monkeyclass
	tc_test.py in the first place?

	This patch removes the apparently useless monkeypatching, fixing
	the issue by side effect.

	vm: avoid NotConnectedError on shutdown
	The API getAllIoTunePolicies() may let the NotConnectedError
	bubble up if we hit a race on shutdown.
	The error is benign - no real harm is done, yet it adds noise
	in the logs, so this patch adds a new method to deal with
	it in a more grceful way.

	This patch is also the first step to clean up the getIoTune*()
	mess we currently have in the Vm class.

	Related-To: https://bugzilla.redhat.com/1503468

	virt: kill get_drive_conf_identifying_attrs
	This function is used only in the tests, and for historical
	reasons. We can safely remove it and fix the relevant tests
	with the simpler code that the production code also uses.

	vm: use format strings logging XML
	It is better practice to use format strings even when
	logging strings. Also, avoids errors transitioning to python3.

	No expected changes in behaviour.

2018-01-08  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't assume devices from _process_devices are all vmxml.Element's
	Vm._process_devices can add two kinds of Element instances:

	- vmxml.Element instances from getXML() device methods
	- etree.Element instances when the device has custom properties and thus is
	  processed with hooks and the resulting XML is parsed with vmxml.parse_xml

	However the loop in _make_domain_xml assumes that all the devices are
	vmxml.Element instances, resulting in crash during VM startup from non-XML
	Engine on devices with custom properties.

	There are several possible ways to remedy the problem.  This patch selects
	handling appendChild arguments in _make_domain_xml as a possibly the least
	invasive non-controversial fix in a legacy code.

	Bug-Url: https://bugzilla.redhat.com/1532151

2018-01-07  Allon Mureinik  <amureini@redhat.com>

	spec: hook-localdisk's grammar
	Improve the grammar in the hook-localdisk's description.

2018-01-07  Nir Soffer  <nsoffer@redhat.com>

	flake8: Fix F812 - list comprehension redefines name
	Fix the error by using more specific variable names in the original
	line, so the temporary variable in the list comprehension does not clash
	with anything now, and the code is more clear.

	flake8: Fix E501 - line too long
	Fix the violations and remove this error from the ignore list.

	tox: Use latest flake8
	The new version reveal many issue in the current code. To keep the build
	working with current code, I added these errors to the ignore list:

	43    E305 expected 2 blank lines after class or function definition, found 1
	5     E501 line too long (84 > 79 characters)
	173   E722 do not use bare except'
	4     E741 ambiguous variable name 'l'
	1     F812 list comprehension redefines 'lv' from line 44

	The next step is to fix the code and remove these ignores.

2018-01-05  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add tests for parameter based network hot(un)plug
	Let's add missing unit tests for recently failed paths in Vm NIC hotplug and
	hotunplug methods.

2018-01-05  Edward Haas  <edwardh@redhat.com>

	net: Remove unused netinfo.dhcp module

2018-01-04  Milan Zamazal  <mzamazal@redhat.com>

	virt: Ensure exit info presence in reported Down status
	Vm.getStats() call checks for Down status and adds exited VM stats in such a
	case.  If a VM is not initially down, those stats are not added.

	However VM status can change to Down during getStats call, e.g. on end of
	migration.  Then VM, while initially not down, may be reported as Down in the
	final result, without providing the reason.  This may confuse Engine and lead
	up to destroying a VM, e.g. when a migration finishes and then getStats reports
	its Down status without providing "migration succeeded" reason.

	Vm.send_status_event() may also send an incomplete information about VM Down
	status.

	Let's fix that by retrieving the final status in getStats before the check for
	Down and by adding down stats (such as exit info) if needed in
	send_status_vent.

	Note that the whole getStats call is not protected against other possible
	inconsistencies.  This patch fixes the worst one known.

	Bug-Url: https://bugzilla.redhat.com/1527416

2018-01-04  Nir Soffer  <nsoffer@redhat.com>

	virt: Use sorted, one item per line format
	Using this format, we can easily add or remove items with a single line
	change, and finding items is easier because of the sorting.

	tests: Keep trailing , in argument lists
	This way we can add or remove arguments with a single line change. This
	was removed without a reason in commit 788a36cc8f24 (core: add 'shared'
	field to METADATA_KEYS).

	tests: Remove unneeded is_block parameter
	This parameter was copied from old tests that used to monkeypatch
	utils.isBlockDevice to make the tests pass.  Since we removed lazy
	diskType discovery, we don't need to fake anything in the tests.

2018-01-04  Eyal Shenitzky  <eshenitz@redhat.com>

	core: add 'shared' field to METADATA_KEYS
	Since compatibility version 4.2 the engine composes the VM XML that
	passed to libvirt.
	As part of this change, the XML should contain a field to indicate
	whether the VM disk device is a transient (backup) disk or not.
	If the disk is transient, the VDSM should create a transient volume
	under /var/lib/vdsm/transient on the relevant host.

	In the engine - missing 'shared' field was added to VM disk device metadata
	in the domain XML.

	 <metadata>
	    <ns0:qos />
	    <ovirt-vm:vm>
	        <minGuaranteedMemoryMb type="int">1024</minGuaranteedMemoryMb>
	        <clusterVersion>4.2</clusterVersion>
	        <ovirt-vm:custom />
	        <ovirt-vm:device devtype="disk" name="sda">
	            <ovirt-vm:shared>transient</ovirt-vm:shared>
	            <ovirt-vm:imageID>...</ovirt-vm:imageID>
	            <ovirt-vm:poolID>...</ovirt-vm:poolID>
	            <ovirt-vm:volumeID>...</ovirt-vm:volumeID>
	            <ovirt-vm:domainID>...</ovirt-vm:domainID>
	        </ovirt-vm:device>
	        <launchPaused>false</launchPaused>
	        <resumeBehavior>auto_resume</resumeBehavior>
	    </ovirt-vm:vm>
	</metadata>

	Added the missing 'shared' field to METADATA_KEYS in order to parse it
	from the domain XML.

	Bug-Url: https://bugzilla.redhat.com/1526815

2018-01-04  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove unneeded mocking of isBlockDevice
	Now that diskType is detected when preparing an image, we don't need to
	mock anything for testing. Since this was the last usage of
	utils.isBlockDevice, it was removed.

2018-01-03  Nir Soffer  <nsoffer@redhat.com>

	vm: Do not check disk type when starting LSM
	If engine did not specify the disk type, we used to check the disk type
	using utls.isBlockDevice, which may block for minutes if the disk is on
	a non-responsive NFS storage domain. This check is not needed now since
	prepareVolumePath adds the disk type if needed.

	Remove the disk type check, and update the disk replica only if disk
	type was added or modified by prepareVolumePath.

	Bug-Url: https://bugzilla.redhat.com/1530072

	storage: Set diskType early and safely
	We suffer from lazy initialization of Drive.diskType since it was
	introduced in http://gerrit.ovirt.org/4283. This makes testing harder,
	and recently caused a deadlock during migration.

	In 4.2 engine is always sending the diskType since it knows the type of
	the storage, simplifying vdsm flows. Move diskType initialization to
	prepareVolumePath, normalizing drive creation in legacy flows, and
	simplifying Drive code.

	We used to check if a path is a block device using os.stat(), which can
	block for unlimited time on non-responsive NFS server. We can avoid this
	now using the information returned by Image.prepare() for vdsm images.

	Note that we use 'network' disk type only if engine specified this
	value. Therefore if the value was not specified, gluster volume must use
	'file' diskType.

	For GUID format, we don't need to check anything, since GUID format
	means we are using a multipath device.

	For other types of volumes, we are not supporting "block" disk type so
	we can default to "file" unless engine ask to use another type, like
	"network" when using Ceph storage.

	Bug-Url: https://bugzilla.redhat.com/1530072

2018-01-03  Francesco Romani  <fromani@redhat.com>

	vm: graphics: don't inject displayNetwork=None
	We have code in the Vm class to preserve backward compatibility
	with Engines <= 3.5.

	In circa-3.5 times, displayNetwork was a top-level vm.conf key.
	Around the 3.6 cycle we moved it into the graphics device spec parameters.
	For backward compatibility, we copied there from vm.conf if missing.
	One unexpected side effect is that we injected

	  'displayNetwork': None

	in the graphics device specParams.

	We should avoid this, because it could hide other bugs, like it
	happened in rhbz#1524119

	Related-To: https://bugzilla.redhat.com/1524119

2018-01-03  Edward Haas  <edwardh@redhat.com>

	spec: vdsm-network is arch dependent due to OVS

2018-01-03  Nir Soffer  <nsoffer@redhat.com>

	localdisk: Update drive diskType
	The local disk hook may update a drive of any type to a local block
	device. The hook was not updating the drive diskType, assuming that vdsm
	will detect the disk type later. Change the hook to update the disk type
	so we can remove the late detection.

	Bug-Url: https://bugzilla.redhat.com/1530072

	volume: Return volume type in getVmVolumeInfo
	When we prepare an image, we add information about the leaf volume in
	the response. We used to return {"volType": "path"} for both file and
	block volumes, and later in the virt Drive class, try to check the
	volume type using os.stat(). Calling os.stat() on NFS storage may block
	for unlimited time if the storage become non-responsive, causing the
	entire process to be in D state.

	Now we return {"type": "block"} for block volumes, and {"type": "file"}
	for file volumes, eliminating the risky os.stat() call in virt layer.

	Bug-Url: https://bugzilla.redhat.com/1530072

2018-01-03  Francesco Romani  <fromani@redhat.com>

	doc: fix examples in the documentation
	Make the comments correct XML.

2018-01-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Set SourceThread._started flag for hibernation
	SourceThread._started flag was introduced in 8469d6b.  However it is set to
	True only for host migrations, not for hibernation.  The result is that
	when hibernation succeeds the loop in SourceThread.run continues, fails on a no
	longer existent domain and reports confusing errors to the log.

	This patch fixes the problem by setting SourceThread._started flag also for
	file migrations.

	Bug-Url: https://bugzilla.redhat.com/1530292

2018-01-03  Dan Kenigsberg  <danken@redhat.com>

	network: ifcfg: nice name for temporary variable
	to make flake8-3.5 a bit happier

2018-01-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Improve naming of objects related to stored device parameters
	In commit e026991, we introduced Base._kwargs attribute and
	Base.conf_parameters method accessing it.  Let's use better names for those
	objects.

2018-01-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding memoryStats to mertic report if exists
	In https://gerrit.ovirt.org/#/c/80644/ we added memory stats that we don't
	send as part of metric report.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1529271

2018-01-03  Dan Kenigsberg  <danken@redhat.com>

	vdsm-gencerts: activate time is UTC
	Eduardo Warszawski has pointed out that the bug is better solved by
	using only UTC when passing activation_time to certtool. This makes sure
	we ignore changes in timezone.

	This patch makes a single execution to `date` to avoid possible
	discrepancies between two calls.

	utils: drop dead code
	last usage of listSplit was dropped two years ago, by I430977e5137f

	tc_test: better assertion message
	not very helpful but certainly harmless

2018-01-03  Edward Haas  <edwardh@redhat.com>

	host stats net: Cleanup network stats collection code

2018-01-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Check for None explicitly in MutableDomainDescriptor.all_channels
	It's a good practice and it avoids FutureWarning's (and future Python
	compatibility problems), at least when running tests.

	virt: Don't update disk mapping when VM is not Up
	Updating disk mapping when a VM is not in UP status doesn't make much sense and
	may be harmful.  For instance, guest agent data is not available anyway before
	the VM is started and we don't care about handling disk mapping updates when a
	VM is already down.  And when a VM is migrating, we must even avoid disk
	mapping metadata updates, since libvirt blocks on setMetadata until the
	migration finishes.

	So let's update disk mapping only when the VM is not UP.  In case disk mapping
	change is detected and ignored in such a case, while the update is still
	meaningful, the mapping will be updated once the VM switches to UP status
	again.

	Bug-Url: https://bugzilla.redhat.com/1527416

	virt: Use hotplugged XML, not original XML, in NIC hotplug rollback
	Obviously we should hot unplug what we've previously plugged in.  Since the
	original XML from params may be modified by before_nic_hotplug, we must use the
	updated version.

	Related-To: https://bugzilla.redhat.com/1496719

2018-01-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add a test for interface name legacy conversion
	We added missing conversion of network.Interface name for legacy conf in
	52b7186.  Let's add a unit test too.

	We (ab)use TestHotplug for simplicity of testing the functionality there.

	virt: Avoid adding already present devices to Vm.conf
	For backward compatibility with migrations to Vdsm < 4.2, we add all devices to
	Vm.conf legacy structure.  We add all devices in a fallback loop there, except
	for disks, which are added separately.

	However there are also other device classes, namely NICs and Controllers, that
	shouldn't be added to Vm.conf, since they already add themselves there in their
	update_device_info methods.  They may also transform their initialization
	parameters for conf, e.g. Interface device may be initialized with `bridge'
	device type while putting `interface' devicet type to Vm.conf.  So the fallback
	may add duplicates or unrecognizable devices to Vm.conf.

	This patch fixes it by omitting the devices that should be added by their
	update_device_info methods.  Part of the fix is ensuring that all Controller
	devices, even those without address such as PCI controller, are added in
	Controller.update_device_info.

2018-01-02  Edward Haas  <edwardh@redhat.com>

	net: DefaultRoute move semantic
	VDSM supports a single network which has DefaultRoute set.

	This patch changes the semantics of setting the default route from
	defensively validating it is set on a single network to an active move
	operation. In case a setup network is set with the default route and an
	already existing network has it defined, the canonicalize step will
	auto-generate the request to remove the default route from the existing
	network.

	Please note that a move operation implicitly generate the setup request
	on the existing network, causing it to be removed and added.

	Bug-Url: https://bugzilla.redhat.com/1522971

2018-01-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix swapped variable value in Vm._update_guest_disk_mapping
	At the beginning of the method the guest agent disk mapping hash should be
	stored to a local variable, to be later used as new Vm._last_disk_mapping_hash
	value.  This is to prevent races with disk mapping updates in the meantime, so
	that we don't miss any update.

	However, Vm._last_disk_mapping_hash was stored to the local variable by
	mistake.  That means Vm._last_disk_mapping_hash has never been updated and disk
	mapping metadata being updated on each call.  This patch fixes the mistake.

	Bug-Url: https://bugzilla.redhat.com/1527416

	virt: Transform NIC model for conf
	There is a mismatch between NIC model naming in Engine and Vdsm (+ libvirt).
	What Vdsm and libvirt call `virtio' is called `pv' in Engine when using conf
	parameters rather than XML to represent devices.  We perform pv -> virtio
	conversion in Interface.__init__.  But when we create conf from XML, rather
	than just returning back what has been received from non-XML Engine, we don't
	perform the opposite conversion and Engine fails to recognize `virtio' NIC
	model.  This may cause problems when getFullVMList is (still) used in hosted
	Engine deployment.

	This patch adds pv -> virtio conversion for older Engine versions.

	Bug-Url: https://bugzilla.redhat.com/1527318

	virt: Always remove unplugged network device from Vm.conf
	When we hot unplug a network device specified by XML, we don't remove it from
	Vm.conf assuming that it's not needed with XML Engine.  However we still have
	to keep legacy conf data around, e.g. for migrations to older Vdsm versions.

	This patch ensures that Vm.conf is updated in any case.

2018-01-01  Dan Kenigsberg  <danken@redhat.com>

	gluster: give a better name to a local variable
	to make flakes8-3.5 a bit happier

	storage: hsm: drop two good-for-nothing comments
	The Python code is very clear; no need to say the same thing in English.

2017-12-29  Allon Mureinik  <amureini@redhat.com>

	automation: Remove FC24 and FC25 configurations
	Looking at the jenkins repository
	(http://gerrit.ovirt.org/p/jenkins), vdsm's master doesn't run CI on
	Fedora 24 (commit 1904a7) or Fedora 25 (commit 2f01fe).

	This patch cleans up old, unused, configurations for those distros.

2017-12-29  Nir Soffer  <nsoffer@redhat.com>

	tox: Use latest pytest
	pytest 3.3 brings nice features like test progress. Lets try to use the
	latest version.

2017-12-29  Dan Kenigsberg  <danken@redhat.com>

	v2v: testWait: run faster
	Now that the implementation of PipelineProc.wait() does not have
	arbitrary time intervals, the tests can be made to run tenfold faster.

2017-12-28  Nir Soffer  <nsoffer@redhat.com>

	tox: Use latest pylint version
	Our version is too old, and we fail to detect broken code because of
	this. Lets try to use latest pylint.

	I hoped that latest pylint fixed detection of missing attributes on
	builtin types (https://github.com/PyCQA/pylint/issues/1736). This is
	still broken even on master with python 2.7, but works with python 3.
	We should start run pylint with both python 2.7 and python 3.

2017-12-27  Nir Soffer  <nsoffer@redhat.com>

	blockdev: Add missing conv=fsync flag
	Add missing conv=fsync flag to ensure that data was written to physical
	storage when dd terminates.

2017-12-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	configurator: adding removeConf to libvirt and abrt
	In https://gerrit.ovirt.org/#/c/75658 we removed this function from
	libvirt configurator as part of splitting the code to confutils.
	This patch adds removeConf func both to libvirt and abrt to fix the removal
	of vdsm conf using vdsm-tool remove-config whice run on vdsm rpm removal.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1528816

2017-12-26  Edward Haas  <edwardh@redhat.com>

	net: Add OVS net gateway normalization in kernelconfig
	kernelconfig.normalize is used to normalize a given running config in
	order to compare it with kernel config.

	With an OVS network, a gateway which is not a default route is
	not supported (source route is not supported).

	This patch adds a new normalization for the OVS networks gateway
	property to remove gateway when no default route is specified.

2017-12-25  Tal Nisan  <tnisan@redhat.com>

	Fix a typo in CannotCreateSparse exception message

	storage: Allow attaching a cdrom device from block domain
	Since we can now attach disks on data domains containing ISO images to VMs
	as cdrom, VDSM needs to prepare also CD images.

	Also a validation which enforces a cdrom device to be of file type was
	removed

	Cdrom devices on glusterfs using libgfapi is not supported yet.

	Bug-Url: https://bugzilla.redhat.com/1122970

2017-12-24  Dan Kenigsberg  <danken@redhat.com>

	v2v: wait: use subprocess32.Popen.wait() instead of slow polling
	The code removed by this patch polled every 1 second to check if a
	subprocess has finished. Unlike Python 2's subprocess,
	subprocess32.Popen.wait(timeout) is good  enough to be used more
	cleanly for that purpose.

2017-12-23  Edward Haas  <edwardh@redhat.com>

	net tests: Restore original host default route and nameservers
	Some of the functional tests are touching the default route and directly
	or indirectly the nameservers settings.

	When touching these host level properties, connection to the host may be
	lost. This patch attempts to restore the original default route and
	resolv.conf as appeared before the test change.

2017-12-23  Petr Horáček  <phoracek@redhat.com>

	pylint: fix argument errors in vm_migrate_hook
	pylint fails with:
	00:05:45.790 ************* Module vdsm.virt.vm_migrate_hook
	No value for argument 'domain' in function call
	No value for argument 'event' in function call
	No value for argument 'phase' in function call

	With this patch we explicitly pass domain, event and phase arguments.

2017-12-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	executor: Log traceback for blocked workers
	Here is formatting example:

	Worker blocked: <Thread(Test, stopped daemon 140584499463936)>
	traceback:
	File: "/usr/lib64/python2.7/threading.py", line 777, in
	__bootstrap
	  self.__bootstrap_inner()
	File: "/usr/lib64/python2.7/threading.py", line 804, in
	__bootstrap_inner
	  self.run()
	File: "/usr/lib64/python2.7/threading.py", line 757, in run
	  self.__target(*self.__args, **self.__kwargs)
	File: "/home/pkliczewski/git/vdsm/lib/vdsm/common/concurrent.py", line
	194, in run
	  ret = func(*args, **kwargs)
	File: "/home/pkliczewski/git/vdsm/tests/common/concurrent_test.py", line
	39, in worker
	  time.sleep(1)


	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1501012

2017-12-20  Irit Goihman  <igoihman@redhat.com>

	client: document reconnect options
	added detailed instructions about reconnect options.

	Bug-Url: https://bugzilla.redhat.com/1527155

2017-12-20  Nir Soffer  <nsoffer@redhat.com>

	xlease: Fix handling of truncated volume
	Trying to read a truncated external leases volume was stuck in endless
	loop because EOF was not handled. This is not an issue in practice,
	since having a truncated xleases volume means you have much bigger
	trouble, but it should be fixed anyway.

	This error will raise now TruncatedIndex error:

	    TruncatedIndex: Couuld not read index, expected 256512 bytes,
	    available 256000 bytes

	fileSD: Use InterruptibleDirectFile backend
	FileStorgeDomainManifest uses now InterruptibleDirectFile for the
	external leases backend.  This ensure that the process does not become
	uninterruptible if storage is non-responsive.

	This change bypass the python bug[1] causing the entire process to hang
	when opening the special xleases volume. Now the operation is done in
	the child process outside of Vdsm.

	[1] https://bugzilla.redhat.com/1520068

	Bug-Url: https://bugzilla.redhat.com/1518676

	sd: Extract external_leases_backend class method
	We create an external leases backend when formatting the xleases volume,
	and when managing external leases. Extract the code for creating the
	backend to a class method, so we can override it in FileStorageDomain.

	Bug-Url: https://bugzilla.redhat.com/1518676

	sd: Make external_leases_volume an instance method
	This helper was used only from instance context but it was defined as a
	module function. Make it an instance method and remove the unneeded path
	argument.

	Bug-Url: https://bugzilla.redhat.com/1518676

	xlease: Add InterruptibleDirectFile class
	InterruptibleDirectFile implements the DirectFile interface using dd for
	reading and writing from storage, and ioprocess for checking file size.

	If storage becomes non-responsive, the thread calling
	InterruptibleDirectFile will block, but the it will remain
	interruptible, so it can be restarted if needed. In this case systemd
	will take care of the stuck child process.

	The new implementation will be used for file storage domain, when
	storage may block for infinite time. On block storage our multipath
	configuration limits the maximum block time, so we may block for 15-30
	seconds on the first time all paths become failed. After that any access
	to storage will fail immediately. This is also the existing convention
	in vdsm; we access storage directly when using block storage, and via
	external process for file storage.

	Bug-Url: https://bugzilla.redhat.com/1518676

	tests: Add tests for xlease.DirectFile
	We had tests for the higher level classes covering this class. This
	patch adds tests for the DirectFile class, to make it safer to create a
	new implementation.

	Bug-Url: https://bugzilla.redhat.com/1518676

	xlease: Simplify DirectFile interface
	Previously loading from storage was done using seek() and read(), and
	dumping using seek() and write(). Simplify the interface with pread()
	and pwrite() methods, accepting an offset. This will make it easier to
	implement a version of DirectFile doing I/O outside of Vdsm.

	Bug-Url: https://bugzilla.redhat.com/1518676

	xlease: Simplify DirectFile interface
	Previously write did not fsync, and the caller could fsync if needed
	using DirectFile.fileno(). We want to add an implementation that will do
	the I/O outside of Vdsm, so we cannot assume an instance has a file
	descriptor.

	The use pattern of DirectFile is:
	- write single block to storage for atomic changes like allocating a
	  lease or marking an index as updating.
	- write multiple blocks when formatting an index

	In all cases, we like to fsync after every write. We don't have a use
	case for write without fsync, so having a generic file like interface
	is not needed.

	This patch removes the fileno() interface, and fsync on every write.

	Bug-Url: https://bugzilla.redhat.com/1518676

2017-12-19  Milan Zamazal  <mzamazal@redhat.com>

	virt: Catch NotConnectedError in guest mapping metadata sync
	When changed disk mapping is detected on stats retrieval, domain metadata is
	updated accordingly.  Contingent libvirtError on metadata update is caught and
	logged and disk mapping metadata is supposed to get updated in one of future
	stats calls.

	However libvirtError is not the only error that can prevent metadata update.
	It won't work also when the domain is not connected, such as during VM start or
	when the VM is finished.  NotConnectedError is raised in such a case and whole
	Vm.getStats call fails due to the error.  So NotConnectedError should be caught
	and handled at that place too.

	Bug-Url: https://bugzilla.redhat.com/1525955

	virt: Return None disk mapping hash when disk mapping is empty
	Vm class updates and processes disk mapping report from GuestAgent.  However
	guest agent is not available initially or it may not be available at all.
	GuestAgent returns empty disk mapping in such a case but it's still being
	processed and attempted to store to metadata.  That's useless and can be even
	harmful, e.g. when we try to update metadata before Vm domain is available and
	connected.  To avoid such a processing we must check that disk mapping is
	empty.  We already check disk mapping hash in Vm._update_guest_disk_mapping so
	if a special hash value, namely None, was returned from GuestAgent on empty
	disk mapping, the processing would be skipped automatically.

	This patch changes GuestAgent.guestDiskMapping to return None on empty disk
	mapping in order to skip the useless and possibly harmful disk mapping
	processing as described above.

	Bug-Url: https://bugzilla.redhat.com/1525955

2017-12-19  Edward Haas  <edwardh@redhat.com>

	net: Refactor net/bond iteration in the canonicalize module

	net: Declare custom property 'default_route' as deprecated
	Users of this custom property should use the new default route role.

2017-12-18  Fred Rolland  <frolland@redhat.com>

	hsm: add logs for start and finish of init
	Adding logs in info level for tracking the init method of HSM

	INFO  (MainThread) [storage.HSM] START HSM init (hsm:366)
	INFO  (hsm/init) [storage.HSM] FINISH HSM init succeeded in 0.53 seconds (hsm:409)

2017-12-18  Irit Goihman  <igoihman@redhat.com>

	pylint: fix no value for argument error
	pylint complains about "no value for argument 'action' in function
	call" when calling private function _parse_args.
	It seems that although the function declaration contains 'action' as
	argument, no method is actually passing it directly when calling
	_parse_args.
	'action' argument was removed from the declaration and now it's part of
	'args'.

2017-12-18  Francesco Romani  <fromani@redhat.com>

	vmstats: user proper way to detect host devices
	Lacking better ways, back in time we detected host devices
	checking their name (!). Now we the code is evolved and we
	have proper and safer way to do the same task, so this patch
	updates the vmstats code accordingly.

2017-12-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Handle missing network parameter in Interface.get_metadata
	When a SR-IOV passthrough network device is hot plugged, `network' parameter is
	not set and may not be present in Interface instance.  However when the hot
	plugged device metadata is updated it tries to access Interface.network
	attribute, which results in AttributeError and incomplete Interface instance
	initialization after successful device hot plug, since
	Interface.update_device_info is not called due to the error.  Consequent
	problems such as inability to handle the hot plugged network device or
	tracebacks in periodic functions accessing the device instance follow.

	This patch fixes the problem by checking whether `network' attribute is present
	and not accessing it and not writing <network> to metadata if it is not.

	Bug-Url: https://bugzilla.redhat.com/1526133

2017-12-18  Irit Goihman  <igoihman@redhat.com>

	AsyncDispatcher: readable should return false if channel isn't ready
	We encountered a "busy wait" when vdsm server is down and the client attempts
	to reconnect non-stop.
	This happens because of frames being sent to client side when the
	socket is closed (still need to investigate why), causing an exception to be raised
	which triggers handle_error and handle_timeout.

	DEBUG:yajsonrpc.protocols.stomp.AsyncClient:Timeout occurred, trying to reconnect
	WARNING:vds.dispatcher:unhandled write event
	WARNING:vds.dispatcher:unhandled close event
	DEBUG:stomp.AsyncDispatcher:Communication error occurred.
	DEBUG:stomp.AsyncDispatcher:managed to connect successfully.
	DEBUG:yajsonrpc.protocols.stomp.AsyncClient:Timeout occurred, trying to reconnect
	WARNING:vds.dispatcher:unhandled write event
	WARNING:vds.dispatcher:unhandled close event

	The issue was solved by having  dispatcher "readable" function return
	False when dispatcher is still handling timeout.

	Bug-Url: https://bugzilla.redhat.com/1525453

2017-12-17  Irit Goihman  <igoihman@redhat.com>

	dpdk: check if 'driver' exists in device configuration
	We check if dpdk supported devices exist using `lshw -json` output,
	in this case, we are checking if device['configuration']['driver']
	is one of the supported drivers.
	Previously cases where NICs were not bound to any driver were not supported
	(raised an exception), now we are also considering these cases.

	Bug-Url: https://bugzilla.redhat.com/1526192

2017-12-17  Fred Rolland  <frolland@redhat.com>

	storage: rescan only once on connectStorageServer
	For each connections provided to connectStorageServer, a full ISCSI
	and FC rescan is performed. These calls are time consuming.

	In this patch, the rescan is done only once.

	Bug-Url: https://bugzilla.redhat.com/1488892

	storage: HSM connectStorageServer tests

	storage: rename HSM method
	In order to be able to override the method '__getSDTypeFindMethod' in HSM
	for testing purpose, the method is renamed with only one leading
	underscore.

2017-12-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix failing tests with pytest 3.3
	pytest 3.3 put the test name into the environment. This breaks if the
	test name contains binary data, like the uuid packing tests. The tests
	fail with this error:

	value = b'tests/storage/misc_test.py::test_pack_uuid[\x00\x00...] (setup)'

	    def __setitem__(self, key, value):
	        key = self.encodekey(key)
	        value = self.encodevalue(value)
	>       self.putenv(key, value)
	E       ValueError: embedded null byte

	Fixed by using pytest.param(id="name"). The tests looks like this now:

	storage/misc_test.py::test_pack_uuid[smallest] PASSED        [ 47%]
	storage/misc_test.py::test_pack_uuid[highest] PASSED         [ 47%]
	storage/misc_test.py::test_pack_uuid[random] PASSED          [ 47%]
	storage/misc_test.py::test_pack_uuid_random PASSED           [ 47%]

2017-12-16  Fred Rolland  <frolland@redhat.com>

	udev: use latest dm_seqnum for valid_paths
	The 'dm_seqnum' is needed for checking the right 'valid_paths' value, as
	udev events can arrive in a different order that they were created by
	Device Mapper.

	When a new event arrives, the 'dm_seqnum' is compared with the
	previously saved 'dm_seqnum' and only if the new is greater, the
	'valid_paths' is updated

	Bug-Url: https://bugzilla.redhat.com/1526010

	udev: add failing test for unordered udev events
	Add a failing test simulating getting udev event with unordered dm_seqnum.

	Bug-Url: https://bugzilla.redhat.com/1526010

	udev: support dm_seqnum
	Adding the value of 'dm_seqnum' in the MultipathEvent tuple.

	The 'dm_seqnum' is needed for checking the right 'valid_paths' value,
	as udev events can arrive in a different order that they were created by
	Device Mapper.

	For 'REMOVE' events, the value will be 'None'.

	Bug-Url: https://bugzilla.redhat.com/1526010

2017-12-16  Petr Horáček  <phoracek@redhat.com>

	spec: move network to its separate rpm

2017-12-15  Nir Soffer  <nsoffer@redhat.com>

	pylint: Silence pylint warnings for libvirt events
	pylint cannot tell that unpacking the *args tuple is safe, but we know
	that the unpacking is safe since we assume libvirt documneted callback
	api.

	The real solution to this issue is to create a method per callback with
	fixed number of arguments, and register the callbacks separately with
	libvirt. But this requires hard work, untangling the way we create
	libvirt connection for handling events.

2017-12-14  Francesco Romani  <fromani@redhat.com>

	virt: graphics: displayNetwork may be absent
	The 'displayNetwork' parameter may be missing from the
	graphics device spec parameters. This most often happens
	with Hosted Engine.

	The Graphics device code has already some code to deal with 'None'
	displayNetwork, but this is one half-baked solutionm byproduct
	of some past backward compatibility code which is no longer relevant.

	This patch makes the fallback code fully baked, dealing with missing
	displayNetwork.
	It is not clear, and should be addressed in future patches, if
	as per API contract the clients are actually at fault, and they
	should always send displayNetwork.
	For the short term, this patch accepts what existing Hosted Engine
	deployments are already using.

	Related-To: https://bugzilla.redhat.com/1524119

2017-12-14  Milan Zamazal  <mzamazal@redhat.com>

	virt: Improve thread safety of QemuGuestAgentPoller
	We should protect looping over QemuGuestAgentPoller._capabilities and
	QemuGuestAgentPoller._last_failure_lock with locks, in order to prevent
	failures on changed dictionary contents.  Here is an example of such a failure
	spotted in logs:

	  ERROR (qgapoller/0) [virt.periodic.Operation] <bound method QemuGuestAgentPoller._cleanup of <vdsm.virt.qemuguestagent.QemuGuestAgentPoller object at 0x3c47810>> operation failed (periodic:215)
	  Traceback (most recent call last):
	    File "/usr/lib/python2.7/site-packages/vdsm/virt/periodic.py", line 213, in __call__
	      self._func()
	    File "/usr/lib/python2.7/site-packages/vdsm/virt/qemuguestagent.py", line 201, in _cleanup
	      for vm_id in self._capabilities:
	  RuntimeError: dictionary changed size during iteration

	When capabilities update is under lock now, we perform it only if the
	capabilities are changed.

2017-12-13  Petr Horáček  <phoracek@redhat.com>

	spec: move common to its separate rpm
	With this change we will be able to split other components as well
	and depend only on common package.

2017-12-13  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't crash if portMirroring param is missing in hotunplugNic

2017-12-13  Irit Goihman  <igoihman@redhat.com>

	pylint: silence no-member error when using contextlib.closing
	when upgrading pylint version a few new issues were raised:

	00:06:53.873 ************* Module vdsm.v2v
	00:06:53.874 E:1368,27: Instance of 'closing' has no 'read' member (no-member)

	00:06:53.892 ************* Module vdsm.network.netlink.monitor
	00:06:53.893 E:172,58: Instance of 'closing' has no 'poll' member (no-member)

	This is a bug in pylint: https://github.com/PyCQA/pylint/issues/1437
	pylint does not recognize object attributes when calling 'closing'
	context manager.

2017-12-13  Francesco Romani  <fromani@redhat.com>

	vm: devices: add `type` to Lease device
	The Lease device incorrectly lacked the `type` and `device`
	attributes. The Lease devices themselves never uses those attributes,
	but other code may in order to distinguish the device.

	This patch makes the Lease device up to speed adding the missing
	two attributes.

	We also add a test to make sure all the supported device kinds
	have the `type` attribute.

	Bug-Url: https://bugzilla.redhat.com/1524119

	tests: metadata: extract fakemetadatalib
	Extract common utilities to be used for tests
	needing to fake metadata.
	We expect a growing number of such test, so we
	add this utility.

	No expected changes in behaviour

	Test-Only: yes

2017-12-13  Milan Zamazal  <mzamazal@redhat.com>

	virt: Store disk mapping from guest agent to metadata
	XML Engine doesn't call getVMList with full status anymore, it uses domain XML
	to extract needed information.  However there is one piece of data provided by
	full status that is not present elsewhere – guestDiskMapping.  We need to
	provide that data, preferably in domain XML, so this patch adds it to disk
	metadata.

	The added metadata is a bit different from full status data.  We moved
	serial->id processing from Engine to Vdsm to make Engine side implementation
	easier.

	Bug-Url: https://bugzilla.redhat.com/1518209

2017-12-12  Edward Haas  <edwardh@redhat.com>

	net: Include bond hwaddr in KernelConfig report
	Bond hwaddr is persisted in the unified configuration but is missing
	from the kernel configuration report. This caused several functional
	tests to fail and on restoration the diff between the persistent and
	kernel config would falsely detect a change.

	The hwaddr attribute is now reported in KernelConfig if it was mentioned
	in the unified configuration.

2017-12-12  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix flipped condition in hotunplugNic
	We want to use the default when the explicit value is not given.

	Related-To: https://bugzilla.redhat.com/1496719

2017-12-12  Nir Soffer  <nsoffer@redhat.com>

	tests: Add the missing needs_monitoring tests
	We just fixed a deadlocked in Drive.needs_monitoring. If we had tests
	for this code testing the forgotten no diskType use case, we could
	discover the deadlock during the first build.

	This code is being tested by the drive monitor tests, but these tests
	are too big and complicated. Having simple unit tests for the Drive
	class will make it easier to refactor it later.

	storage: Add missing test for unset diskType
	Since ovirt 4.2 we always have a disk type, but in older versions
	diskType was not sent from engine, and was discovered by vdsm, assuming
	that the type can be file or block. Since we added support for network
	disk type, all the tests were converted to use explicit disk type, the
	legacy case untested.

2017-12-12  Dan Kenigsberg  <danken@redhat.com>

	storage.blockSD: import StringIO from six
	The only effect of this change is to make blockSD importable in Python
	3.

2017-12-12  Germano Veit Michel  <germano@redhat.com>

	hooks: add boot_hostdev
	This hook allows to boot VMs from Passthrough devices such as scsi, usb
	and pci cards such as SR-IOV NICs and SAS/SATA controllers.

	To use:
	1. Pass a device to a VM using the Host Devices tab
	2. Copy the device name (i.e.: scsi_2_0_0_0)
	3. Add vm custom property boot_hostdev and paste the device name from above.

	Bug-Url: https://bugzilla.redhat.com/1511234

2017-12-11  Edward Haas  <edwardh@redhat.com>

	net: Overwrite bond ifcfg file on external bond acquire
	When an external bond is used by a network, its ifcfg file should be
	fully acquired by overwritting it with the standard configuration.

	Bug-Url: https://bugzilla.redhat.com/1523661

	net: Persist bond hwaddr in the unified config
	In scenarios where bond hw address is specified, it is persisted in the
	ifcfg file but not in the unified persistency config files.

	This patch correctly persists hwaddr in the running config.

2017-12-11  Nir Soffer  <nsoffer@redhat.com>

	storage: Fix deadlock in Drive.diskType
	Drive.diskType getter was accessing self.path which is public locked
	property, instead of the private self._path. This creates a deadlock if
	needs_monitoring is called before diskType is set.

2017-12-11  Milan Zamazal  <mzamazal@redhat.com>

	virt: Create also device conf when making devices from XML
	When a VM initialized from XML Engine or XML recovery is migrated to a host
	running Vdsm < 4.2, conf['devices'] device configuration may be required on the
	destination.  Currently some important pieces of that configuration are
	missing, which may lead to migration failure.  This has already been observed
	when migrating a recovered (after Vdsm restart) VM containing a rng device from
	4.2 host to 4.1 host.

	This patch adds all devices retrieved from XML to Vm.conf['devices'] in order
	to allow migration to hosts supporting only legacy VM configuration.

	Bug-Url: https://bugzilla.redhat.com/1522901

	virt: Make sure XML configuration is present on resume from snapshot
	XML Engine stopped sending `xml' parameter when resuming from a live snapshot
	with memory.  We use _srcDomXML parameter to initialize the domain, but `xml'
	parameter is missing in self.conf.  Then Vdsm thinks that we are running with
	legacy conf, which is actually not present too.  The result are errors when
	trying to start the VM.

	This patch fixes that by copying _srcDomXML to self.conf['xml'].

	Bug-Url: https://bugzilla.redhat.com/1523399

2017-12-11  Ala hino  <ahino@redhat.com>

	spec: Update libvirt-daemon-kvm required version for CentOS
	In Change-Id I1ba8112 (spec: Update libvirt-daemon-kvm required version),
	we updated libvirt required version for RHEL, but not for CentOS because
	it wasn't ready at that time. Now that libvirt version is released for
	CentOS, the spec is updated to require that version.

	Bug-Url: https://bugzilla.redhat.com/1520953

2017-12-07  Ala hino  <ahino@redhat.com>

	spec: Update libvirt-daemon-kvm required version
	Update libvirt-daemon-kvm version to >= 3.2.0-14.el7_4.5.
	This is required due to selinux issues found in BZ 1506072.
	The version is required only on RHEL, because it isn't ready for CentOS
	and Fedora yet.

	Bug-Url: https://bugzilla.redhat.com/1509675

2017-12-07  Nir Soffer  <nsoffer@redhat.com>

	localdisk: Support host LVM filter
	The ovirt-local VG devices are not not needed by the host, so they are
	not included in the LVM filter. If the user created LVM filter with
	vdsm-tool config-lvm-filter, the localdisk helper process will fail to
	access the ovirt-local VG.

	Fixed by adding a permissive filter in localdisk-helper LVM operations.

	Bug-Url: https://bugzilla.redhat.com/1523232

2017-12-06  Nir Soffer  <nsoffer@redhat.com>

	lvmfilter: Filter out the master LV on the SPM
	When running on the SPM when the master domain is a block storage
	domain, the master LV is mounted. This cause two issues:

	1. The tool suggest to include the master LV devices in the filter. This
	   is harmless since the master LV is never used by VMs, but a bad idea in
	   general. We don't want the master LV to be available on a host.

	2. If a filter was already configured, which does not include the master
	   LV devices, the tool fail to check the master VG info, since the
	   devices are hidden by the filter. The ``lvs`` command fail with error
	   5, and we fail the configuration.

	Additionally, if a host has an incorrect filter hiding some devices
	needed by the host, the tool may fail to create a filter, since the
	``vgs`` command will fail reading partial VG. This is very unlikely
	since such host may not boot, but easy to avoid.

	Fix both problems by:

	1. Override the current filter with permissive filter ["a|.*|"] when
	   looking up VG info in mounted LVs. This ensure that ``lvs`` and
	   ``vgs`` commands succeed, and we can create a correct filter
	   regardless of the currently configured filter.

	2. Read the VG tags of mounted LVs, and skip oVirt LVs using the special
	   ``RHAT_storage_domain`` VG tag.

	When running in verbose mode (-vvv), we will see now this debug message
	about the master LV:

	    MainThread::DEBUG::2017-12-06 03:52:31,300::lvmfilter::134::lvmfilter::(find_lvm_mounts)
	    Skipping oVirt logical volume u'/dev/mapper/6ffbc483--0031--403a--819b--3bb2f0f8de0a-master'

	Bug-Url: https://bugzilla.redhat.com/1449968

	lvmfilter: Remove double [yes/No]?
	The "[yes/NO] ?" part was duplicated in confirmation message:

	    Configure LVM filter? [NO/yes] ? [yes,NO]

	Now we show it only once:

	    Configure LVM filter? [yes/NO]

	Bug-Url: https://bugzilla.redhat.com/1449968

2017-12-06  Edward Haas  <edwardh@redhat.com>

	net: Produce less noise when adding sourceroute
	Adding a sourceroute over an existing one is causing a bit of noise in
	the log, mentioning that the addition of the route record failed with
	a strange error description (file exists).

	This patch updates the error message to describe that the addition
	failed due to an already existing route.
	It is now recorded in the log as debug.

	Bug-Url: https://bugzilla.redhat.com/1518587

2017-12-06  Francesco Romani  <fromani@redhat.com>

	vm: py3: use six.iteritems
	Switch from {}.iteritems() to six.iteritems({}) to be python3
	compatible. No expected changes in behaviour.

2017-12-06  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: log flow_id for setupNetworks

2017-12-06  Nir Soffer  <nsoffer@redhat.com>

	tests: Add replication extension tests
	Extending drives during replication is complicated the tricky, and we
	have no tests for this flow. Some extension tests cover this as a side
	effect of checking the outcome. Add new tests for checking this flow.

	Unfinished - added class dosctring with the flows we need to test, no
	tests added yet.

2017-12-06  Francesco Romani  <fromani@redhat.com>

	vmxml: reimplement ElementTree.tostring()
	In Python3, ElementTree has become more picky, and
	emits the xml header (aka the declaration):

	  <?xml encoding=... >

	in even fewer circumnstances than it used to do in python2.
	With the switch of python3, Vdsm may silently start to lose
	those declarations.

	The actual impact should be negligible, but ElementTree
	provides a simple fix with the `xml_declaration` argument
	of the write() method.

	Unfortunately, if we use the tostring() utility, we don't
	have easy access to that argument.
	The simplest way to fix this is to reimplement tostring()
	locally, borrowing a good chunk of the Python3 implementation.

	This is actually way less scary than it sounds, since the
	implementation is just one handful lines long.
	This way we can always have the XML declaration both in python2
	and in python3.

2017-12-06  Milan Zamazal  <mzamazal@redhat.com>

	virt: Network device XML hot(un)plug
	Support for hot plugging and unplugging network devices specified by XML rather
	than their parameters.  This is another steps towards using libvirt XML
	directly.  The old way of parameter passing remains supported for backward
	compatibility with older Engines.

	Related-To: https://bugzilla.redhat.com/1496719

	virt: Don't insert None attributes to DOM
	Inserting None values to DOM is incorrect and leads to tracebacks on XML
	exports with no pointer to the actual problem.  Let's prevent that and let's
	log rather than execute attempts to set None attribute values.

	Related-To: https://bugzilla.redhat.com/1496719

	virt: Use lower case encoding value in vmxml.format_xml
	Python decides about <?xml ...> declaration insertion based on the specified
	encoding.  While Python 3 recognizes "UTF-8" as a standard value, Python 2
	doesn't.  Let's unify behavior for both the Python versions by using "utf-8",
	which is recognized by both of them.  It will help with a unit test in a
	followup patch.

	Related-To: https://bugzilla.redhat.com/1496719

2017-12-06  Edward Haas  <edwardh@redhat.com>

	common: Relocate hostdev to common
	hostdev module relocation to common completes vdsm.network isolation
	from VDSM, depending solely on vdsm.common, standard and external libs.

	common: Relocate cpuarch to common
	cpuarch module is moved to common in order to allow in the following
	patch the move of hostdev to common.

	common: Relocate libvirtconnection to common

	libvirtconnection: Relocate libvirt_password
	libvirt_password is being used by libvirtconnection, however it is
	defined under tool.configurators.
	It seems more appropriate for the tool configurators to depend inwards
	to VDSM.

	This patch relocates libvirt_password and its constants to
	libvirtconnection, allowing it to be solely dependent on standard libs
	and common.
	The following patch will relocate libvirtconnection to common.

	common: Relocate weakmethod to common

	common: Relocate hooks module to common

2017-12-05  Edward Haas  <edwardh@redhat.com>

	net: Atomically persist the *config
	Save running/persistent config atomically on disk.

	netconf is now a symlink that points to the 'real' netconf folder.
	When save is applied, the content is persisted to a random generated
	folder and at the very end, the symlink is pointed towards that folder.

	Bug-Url: https://bugzilla.redhat.com/1511608

	net: Cleanup netconfpersistence from suffix '/' in constants
	Remove the '/' suffix in the constants which are not needed anymore.
	Using os.path.join in all path concatenations consistently.

	Bug-Url: https://bugzilla.redhat.com/1511608

	net: Refactor atomic running config safe store
	RunningConfig store has been refactored to allow the atomic copy action
	to be reused also for the 'save' operations.

	Bug-Url: https://bugzilla.redhat.com/1511608

2017-12-05  Dan Kenigsberg  <danken@redhat.com>

	py3: remove encoding_test from blacklist

2017-12-05  Francesco Romani  <fromani@redhat.com>

	vm: fix error logging
	A spurious comma makes the log handle raise when invoked.
	This patch fixes the issue, avoiding a nasty

	TypeError: not all arguments converted during string formatting

2017-12-05  Dan Kenigsberg  <danken@redhat.com>

	py3: drop stompasyncclient_test from blacklist

2017-12-05  Petr Horáček  <phoracek@redhat.com>

	net: remove ip from a bond when a network was removed
	Bug-Url: https://bugzilla.redhat.com/1478890

2017-12-05  Idan Shaby  <ishaby@redhat.com>

	storage: deprecate the discard_zeroes_data flag

2017-12-03  Idan Shaby  <ishaby@redhat.com>

	storage: add zero_block_size_mb configuration value
	This patch adds a new configuration value to allow the user determine
	the amount of MiB that will be zeroed in each iteration by the zero
	method (dd/blkdiscard).
	The default value, 1MiB, was not changed.

2017-12-01  Edward Haas  <edwardh@redhat.com>

	automation: Add timeout to the tests run in check-merged
	Several occurrences have been seen where the lago shell which runs the
	tests got stuck and never returned. It caused jenkins to cancel the job
	by sending a termination signal after 3 hours.
	Unfortunately, when doing so, the logs are not collected and processes
	are not correctly cleaned up from the worker machine.

	A timeout is added to the execution of the lago shell which runs the
	tests, limiting it to 1 hour.

	virt net: Support setting a display network on a non-vm net
	A display network that is set on a non-vm network caused VM/s to fail
	starting. The libvirt network created for the display network was
	wrongly assumed to be based on a bride.

	The libvirt network created now for the display is now supporting both
	bridged and bridgeless host networks.

	Bug-Url: https://bugzilla.redhat.com/1518688

2017-11-30  Idan Shaby  <ishaby@redhat.com>

	storaqge: fix failing lvmfilter test

2017-11-30  Martin Polednik  <mpolednik@redhat.com>

	hugepages: disable dynamic allocation by default
	Because ovirt-engine does not support dynamic hugepage allocation, we
	disable it by default in VDSM. That removes one step from setting up
	the host (as VDSM would remove preallocated pages by default).

2017-11-29  Nir Soffer  <nsoffer@redhat.com>

	config-lvm-filter: Configure LVM filter
	`vdsm-tool config-lvm-filter` uses now lvmfilter.analyze() to decide
	whether a filter need to be configured, and to configure the filter
	automatically if possible.

	If the host is already configured, the tool does nothing:

	    # vdsm-tool config-lvm-filter
	    Analyzing host...
	    LVM filter is already configured for Vdsm

	On a host that is not configured yet, the tool configures the LVM filter
	automatically after the user confirms the operation:

	    # vdsm-tool config-lvm-filter
	    Analyzing host...
	    Found these mounted logical volumes on this host:

	      logical volume:  /dev/mapper/vg0-lv_home
	      mountpoint:      /home
	      devices:         /dev/vda2

	      logical volume:  /dev/mapper/vg0-lv_root
	      mountpoint:      /
	      devices:         /dev/vda2

	      logical volume:  /dev/mapper/vg0-lv_swap
	      mountpoint:      [SWAP]
	      devices:         /dev/vda2

	    This is the recommended LVM filter for this host:

	      filter = [ "a|^/dev/vda2$|", "r|.*|" ]

	    This filter will allow LVM to access the local devices used by the
	    hypervisor, but not shared storage owned by Vdsm. If you add a new
	    device to the volume group, you will need to edit the filter manually.

	    Configure LVM filter? [yes,NO] ? [NO/yes] yes
	    Configuration completed successfully!

	    Please reboot to verify the LVM configuration.

	If the host configuration does not match Vdsm required configuration,
	the user need to configure LVM filter manually.

	    # vdsm-tool config-lvm-filter
	    Analyzing host...
	    Found these mounted logical volumes on this host:

	      logical volume:  /dev/mapper/vg0-lv_home
	      mountpoint:      /home
	      devices:         /dev/vda2

	      logical volume:  /dev/mapper/vg0-lv_root
	      mountpoint:      /
	      devices:         /dev/vda2

	      logical volume:  /dev/mapper/vg0-lv_swap
	      mountpoint:      [SWAP]
	      devices:         /dev/vda2

	    This is the recommended LVM filter for this host:

	      filter = [ "a|^/dev/vda2$|", "r|.*|" ]

	    This filter will allow LVM to access the local devices used by the
	    hypervisor, but not shared storage owned by Vdsm. If you add a new
	    device to the volume group, you will need to edit the filter manually.

	    This is the current LVM filter:

	      filter = [ "a|^/dev/vda2$|", "a|^/dev/vdb1$|", "r|.*|" ]

	    WARNING: The current LVM filter does not match the recommended filter,
	    Vdsm cannot configure the filter automatically.

	    Please edit /etc/lvm/lvm.conf and set the 'filter' option in the
	    'devices' section to the recommended value.

	    It is recommend to reboot after changing LVM filter.

	Bug-Url: https://bugzilla.redhat.com/1449968

2017-11-29  Martin Polednik  <mpolednik@redhat.com>

	hugepages: nr_hugepages and hugepagesz = 0 if hugepages are disabled
	Otherwise, the calculation mixes up VMs with and without hugepages.
	Thus way, VMs without hugepages are considered separate bucket by
	_all_vm_hugepages function (out of default hugepagesz).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1495213

2017-11-29  Francesco Romani  <fromani@redhat.com>

	virt: drivemonitor: avoid negative thresholds
	We discovered that the drivemonitor can set negative threshold
	if the drive size is unexpectedly too small.
	It is first a storage issue if the disk is created below the minimum
	supported size (1 GiB), but the drivemonitor should nevertheless be
	more robust and not set impossible values.

	This patch makes sure that the drive monitor never sets
	thresholds below a minimum (constant value) of 1 MiB.

	virt: drivemonitor: test for negative threshold
	We discovered that the drivemonitor can set negative threshold
	if the drive size is unexpectedly too small.
	It is first a storage issue if the disk is created below the minimum
	supported size (1 GiB), but the drivemonitor should nevertheless be
	more robust and not set impossible values.

	This patch adds a test to demonstrate this issue.

2017-11-29  Nir Soffer  <nsoffer@redhat.com>

	lvmfilter: Analyze current LVM filter
	The current version of vdsm-tool config-lvm-filter is too naive and not
	helpful enough. It will always recommend to configure a filter, even if
	the host is already configured. When configuration is needed, it asks
	the user to configure, instead of writing the configuration.

	The goal of this work is to have automatic LVM filter configuration, as
	part of the host deployment. We also need to check the current
	configuration when Vdsm starts, and fail if LVM filter needs
	configuration.

	To allow this behaviour, the lvmfilter module provides now the analyze()
	function. This function accept the current lvm filter, and the wanted
	lvm filter, and return an Advice object suggesting how to proceed.

	Bellow are example outputs for typical use cases.

	Host is not configured:

	    >>> lvmfilter.analyze(None, ["a|^/dev/sda2$|", "r|.*|"])
	    Advice(action='configure', filter=["a|^/dev/sda2$|", "r|.*|"])

	Host is configured:

	    >>> curent_filter = wanted_filter = ["a|^/dev/sda2$|", "r|.*|"]
	    >>> lvmfilter.analyze(current_filter, wanted_filter)
	    Advice(action='unneeded', filter=None)

	Host is configured using different syntax:

	    >>> current_filter = ["a/^/dev/sda2$/", "r\.*\"]
	    >>> wanted_filter = ["a|^/dev/sda2$|", "r|.*|"]
	    >>> lvmfilter.analyze(current_filter, wanted_filter)
	    Advice(action='unneeded', filter=None)

	Host is configured but filter items have different order:

	    >>> curent_filter = ["a|^/dev/sda2$|", "a|^/dev/sdb2$|", "r|.*|"]
	    >>> wanted_filter = ["a|^/dev/sdb2$|", "a|^/dev/sda2$|", "r|.*|"]
	    >>> lvmfilter.analyze(current_filter, wanted_filter)
	    Advice(action='unneeded', filter=None)

	Host is configured with a different LVM filter. In this case we
	recommend to change the filter, but we will not confiugre it
	automatically:

	    >>> curent_filter = ["a|^/dev/sda2$|", "a|^/dev/sdb2$|", "r|.*|"]
	    >>> wanted_filter = ["a|^/dev/sdb2$|", "r|.*|"]
	    >>> lvmfilter.analyze(current_filter, wanted_filter)
	    Advice(action='recommend', filter=["a|^/dev/sdb2$|", "r|.*|"])

	Bug-Url: https://bugzilla.redhat.com/1449968

2017-11-29  ahadas@redhat.com  <ahadas@redhat.com>

	Detect if OVA was generated by oVirt
	Check if an OVA file is generated by oVirt by examining the namespaces
	in the OVF configuration, if they contain the 'ovirt' namespace then
	the OVA file is for sure one that was generated by oVirt.

	Bug-Url: https://bugzilla.redhat.com/1049604

2017-11-29  Francesco Romani  <fromani@redhat.com>

	virt: metadata: correctly store portMirroring
	The portMirroring attribute of the network devices is one of the
	few supported metadata items that is a sequence.

	While the load from metadata worked fine, the store had a bug:
	the top level element ('portMirroring') was lost.

	Instead of

	  <device mac_address='...'>
	    <network>foo</network>
	    <portMirroring>
	      <network>bar</network>
	    </portMirroring>
	  </device>

	The code incorrectly stored

	  <device mac_address='...'>
	    <network>foo</network>
	    <network>bar</network>
	  </device>

	This patch fixes the issue and adds a test to exercise the code,
	to make it unlikely to break again.

	Bug-Url: https://bugzilla.redhat.com/1496719

2017-11-28  Edward Haas  <edwardh@redhat.com>

	net: Support missing OVS package during netcaps
	In case the openvswitch package is not installed, the check for the
	status of the openvswitchd service raises an exception.

	VDSM should support such a scenario and just report back that OVS is not
	available, equivalent to the service being down.

	Bug-Url: https://bugzilla.redhat.com/1518315

2017-11-28  Francesco Romani  <fromani@redhat.com>

	virt: domainxml: save metadata when hot{,un}plug
	This patch make sure we update the drive and nic
	parameters both in the legacy vm.conf  hotplug and hotunplug flows.

	Another patch (https://gerrit.ovirt.org/84602) is
	needed to handle the new domain XML flows.

	Bug-Url: https://bugzilla.redhat.com/1496719

2017-11-28  Fred Rolland  <frolland@redhat.com>

	mpathhealth: Implement Monitor start method
	Implementing mpathhealth.Monitor.start method.
	This method reads the status of the multipath devices, collecting the
	failed paths and counting the active ones.
	If all the paths are active, no status is kept.

	This is needed to collect the faulty devices before starting to listen
	to the udev events.
	Also report to the API the actual state even if the device paths were
	faulty before the Vdsm started.

	hsm: Add multipath_health method
	Add multipath_health method that return the status from the mpathHealth
	monitor.
	The result is added to the Host.getStats return value.
	If all paths are OK, the value will be empty

	Here an example:
	...
	    "multipathHealth": {
	        "36001405976dc283c6bf497b940e69eed": {
	            "valid_paths": 0,
	            "failed_paths": [
	                "sdae"
	            ]
	        }
	    },
	...

	mpathhealth: Add multipath health status to schema
	Adding MultipathHealthMap in the Host.getStats return value.

	This is a map of MultipathHealth status indexed by the multipath device
	UUID.

	udev: Use devicemapper device_name method
	Instead of reimplementing the same functionality, udev module can use
	the devicemapper.device_name method.

	mpathealth: Fix double quoting in log
	Remove double quoting in the logging messages.

2017-11-28  Nir Soffer  <nsoffer@redhat.com>

	lvmconf: Introduce the storage lvmconf module
	This module helps to access LVM configuration, required for analyzing
	and modifying current configuration when configuring a host. We also
	plan to use it later for verifying that a host has a safe LVM
	configuration during Vdsm startup.

	We use the amazing augeas library, but provide an easier to use
	ConfigParser like interface.

	Here is example usage of this module:

	    with lvmconf.LVMConfig() as conf:
	        old_filter = conf.getlist("devices", "filter")
	        ...
	        conf.setlist("devices", "filter", new_filter)
	        conf.save()

	Bug-Url: https://bugzilla.redhat.com/1449968

	spec: Require python-augeas
	This package will be used for analyzing and modifying lvm configuration.

	Bug-Url: https://bugzilla.redhat.com/1449968

	tool: Add config-lvm-filter command
	This is the first step in automating lvm filter configuration. The
	config-lvm-filter command will scan the host devices and suggest LVM
	filter.

	Currently the user is responsible for configuring LVM filter manually; a
	future version of this command will configure the filter for the user.

	Here is example run of this tool:

	    # vdsm-tool config-lvm-filter
	    Found these mounted logical volumes on this host:

	      logical volume:  /dev/mapper/vg0-lv_home
	      mountpoint:      /home
	      devices:         /dev/vda2

	      logical volume:  /dev/mapper/vg0-lv_root
	      mountpoint:      /
	      devices:         /dev/vda2

	      logical volume:  /dev/mapper/vg0-lv_swap
	      mountpoint:      [SWAP]
	      devices:         /dev/vda2

	    This is the recommended LVM filter for this host:

	      filter = [ "a|^/dev/vda2$|", "r|.*|" ]

	    To use this LVM filter please edit /etc/lvm/lvm.conf
	    and set the 'filter' option in the 'devices' section.
	    It is recommended to reboot the hypervisor to verify the
	    filter.

	    This filter will allow LVM to access the local devices used
	    by the hypervisor, but not shared storage owned by Vdsm.
	    If you want to add another local device you will have to
	    add the device manually to the LVM filter.

	Bug-Url: https://bugzilla.redhat.com/1449968

	lvmfilter: Introduce the storage.lvmfilter module
	This module provides the infrastructure needed for generating and
	validating lvm filter on a host.

	The module provides these functions:

	- find_lvm_mounts: returns a list of dicts describing the lvm based file
	  systems on this host, and the underling devices needed by these
	  logical volumes. This will be used for describing the setup in
	  interactive mode, and for building lvm filter for this host.

	- build_filter: Create a lvm filter from the mounts discovered by
	  find_lvm_mounts. The result can be used to configure or analyze
	  lvm.conf using tools such as augeas.

	- format_option: Format the filter options from the filter built by
	  build_filter for display purpose, or for configuring the lvm.conf
	  manually.

	We are using test data produced on my RHEL 7.4 and Fedora. We probably
	need to collect data on more esoteric setups such as RHV-H and RHHI.

	Bug-Url: https://bugzilla.redhat.com/1449968

	tests: Fix non-daemon thread leak in pthread_test
	When testing the pthread module, we cannot use our concurrent.thread()
	helper to start threds, since it is using the pthread module. The test
	was using raw threaing.Thread, and failed to use it correctly, leaking
	non-daemon thread after the test. This can cause the testrunner process
	to never terminate, waiting until the non-daemon thread exits.

	The leak can be detected by running --with-thread-leak-check several
	times:

	$ ./run_tests_local.sh --with-thread-leak-check common/pthread_test.py
	nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
	common.pthread_test.PthreadNameTests
	    test_name_is_set                                            OK
	ERROR
	    test_name_set_doesnt_change_parent                          OK
	    test_name_too_long                                          OK

	======================================================================
	ERROR: test_name_is_set (common.pthread_test.PthreadNameTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
	    self.runTest(result)
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
	    test(result)
	  File "/usr/lib64/python2.7/unittest/case.py", line 431, in __call__
	    return self.run(*args, **kwds)
	  File "/usr/lib64/python2.7/unittest/case.py", line 408, in run
	    result.stopTest(self)
	  File "/usr/lib/python2.7/site-packages/nose/proxy.py", line 177, in stopTest
	    self.plugins.stopTest(self.test)
	  File "/usr/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
	    return self.call(*arg, **kw)
	  File "/usr/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
	    result = meth(*arg, **kw)
	  File "/home/nsoffer/src/vdsm/tests/testValidation.py", line 114, in stopTest
	    raise Exception('This test leaked threads: %s ' % leaked_threads)
	Exception: This test leaked threads: frozenset([<Thread(Thread-1, started 140206643451648)>])

	The code had several common errors:

	1. Creating a non-daemon thread
	2. Not joining the thread
	3. Not signaling the thread if the test assertion failed, leaving a
	   running non-daemon thread that will never exit.

	This change fixes the stuck build issue after the test runner process
	timed out.

2017-11-27  Fred Rolland  <frolland@redhat.com>

	devicemapper: Refactor finDev method
	The devicemapper.finDev method was receiving two integer and format them
	into a string, while the callers were parsing the same string into
	integers.

	The method was changed to receive the string directly.

	udev: Register mpathhealth monitor
	Create a mpathhealth.Monitor in HSM.init and register the instance to
	the multipathListener.

	udev: Fix udev event device action
	In pyudev versions before 0.16, the device object did not have
	a property call 'action'.
	It can be accessed using the dictionary key "ACTION"

	devicemapper: Add multipath status
	Introduce devicemapper.multipath_status() method.

	This method returns the status of the paths of all multipath devices.
	The result is a dictionary where the keys are the GUIDs of the multipath
	devices, and the values are a list of devicemapper.PathStatus.

	Here an example of the result:

	{
	    '360014053d0b83eff3d347c48509fc426':
	         [
	             PathStatus('sda', 'F'),
	             PathStatus('sdb', 'A'),
	             PathStatus('sdc', 'A')
	          ]
	}

	storage: Add mpath health monitor
	Adding the mpathhealth module.
	The mpathhealth.Monitor registers to udev.MultipathListener
	in order to be updated on MultipathEvents.

	The Monitor maintains a data structure containing the
	faulty paths and the number of valid paths for each device.

	The status of the devices will be first read in the 'start'
	method, ensuring the integrity before receiving events.

	The data is available through the 'status' method.

	Here an example of the data:
	{
	    "uuid-2": {
	        "valid_paths": 1,
	        "failed_paths": [
	            "sdba",
	            "sdbb"
	        ]
	    },
	    "uuid-1": {
	        "valid_paths": 0,
	        "failed_paths": [
	            "sdaa",
	            "sdab"
	        ]
	    }
	}

	The 'Mpath health monitor' will be used as part of the multipath event
	feature:
	https://www.ovirt.org/develop/release-management/
	features/storage/multipath-events/

2017-11-27  Edward Haas  <edwardh@redhat.com>

	common: Relocate supervdsm module to common

	common: Relocate retry function to common.function

2017-11-27  Tomáš Golembiovský  <tgolembi@redhat.com>

	qga: add configutation options
	Add a set of configutation options specific to guest agents so as not to
	abuse the options from sampling.

	A kill switch is also introduced. That way the QEMU-GA poller facility
	can be easily disabled if needed.

2017-11-27  Edward Haas  <edwardh@redhat.com>

	net: Exclude bond vlan mac sync for modes 5 & 6
	Bond modes 5 and 6 operation do not require the mac addresses of the vlan,
	bond and its slaves to be in sync, therefore, for these modes the
	special sync handling is bypassed.

	Bug-Url: https://bugzilla.redhat.com/1507278

2017-11-27  Tomáš Golembiovský  <tgolembi@redhat.com>

	qga: add QEMU-GA polling facility
	We want to replace our oVirt Guest Agent (OGA) with QEMU Guest Agent
	(QGA). OGA was pro-active and sent periodicaly information to VDSM. QGA
	does not do that and we have to poll for the information repeatedly on
	regular basis.

	Pool of worker threads is created and each VM is served by a task. The
	concept is much like in the periodic.py, in fact the core objects in
	executor.py and periodic.py are reused. Special executor managing the
	pool of workers is created. Intentionaly it is not the same as for other
	periodic operations because there are several reasons (unresponsive
	guest agents, OS under load, ...) for workers to block. This would put
	other periodic tasks at risk due to lack of available executor threads.

	There are several notable risks and issues connected with using QEMU
	Guest Agent:

	- We (vdsm) have no easy way of knowing whether agent is installed,
	  running and responsive. Libvirt has pretty good idea whether agent is
	  running or not because it watches QEMU events related to the socket.
	  But we have no way of finding that out.

	- We can make a call to check the responsiveness of the agent and it
	  would quickly return if the agent is not running. However, if the
	  agent is running but is not responding then the call will block. This
	  is problematic because we cannot pro-actively "ping" the agent.
	  Why? Because of the following...

	- When we send call to the agent libvirt will lock the domain for the
	  time of the operations. This means that lots of other calls to libvirt
	  on that domain will block or become unavailable. Notably this affects
	  most (if not all) of the operations in periodic.py. All the
	  operations handled by VmDispatcher will become unavailable
	  (Vm.isDomainReadyForCommands() returns False). Bulk stats will
	  probably be delayed.

	When gather information we want (at least for now) to prefer information
	from OGA over the information from QGA if OGA is available.

2017-11-27  Nir Soffer  <nsoffer@redhat.com>

	udev: Rename _notify_monitors to _forward_event
	I think "forwarding" describe better what the listener is doing.

	udev: Move logs to _callback
	Logging for sending events wa hidden in _detect_event, that does not
	send anything to anyone. Move the log to _callback where we log about
	the flow.

	tests: Streamline listener variable
	In the context of the multipath listener tests, there is one kind of
	listener, and calling it listener is best.

	udev: Support monitor hot[un]plug
	We don't need to support this yet, as we plan to register all monitor
	during startup, but we have tests using this for testing registration
	from a callback, and implementing this is not much more complicated then
	blocking this.

	Hot-plug flow:

	1. Listener add the monitor to the monitors set - at this point the
	   monitor can receive events from the observer thread
	2. Listener start the monitor for checking current system state
	3. If the monitor failed to start, it is removed from the monitors set

	Hot-unplug flow:
	1. Listener remove monitor from monitors set
	2. Listener stops the monitor

	It is harder to write a monitor that can be hot-plugged, since you must
	handle events from the observer thread while you check the current
	system state, so this is usage is not recommend.

	udev: Orchestrate multipath monitor startup
	When starting to monitor multipath state, the monitor must:

	1. Register udev events with the kernel
	2. Check the current system state
	3. Start receiving events from the kernel

	This order avoid loosing events while after checking current system
	state, but before starting to receive events. Loosing such event may
	cause the monitor to report a failed path until the next Vdsm restart,
	because the event about recovered device was missed.

	To avoid programming errors when using the multipath listener, the
	MultpathMonitor interface was enhanced with these methods:

	- start() - called after registering events with the kernel, but before
	  the listener starts the observer thread. The monitor may implement
	  this for checking the current system state.

	- stop() - called when stopping the listener. The monitor may implement
	  this if it wants to do some cleanup at this point.

	MultipathListener.start() was enhanced to start the registered monitors
	after registering udev events with the kernel, but before the observer
	thread is started.

	MultipathListner.stop() stops now all the monitors for consistency with
	start().

	Here is example usage of the new api:

	    listener = udev.MultipathListener()
	    monitor = MyMonitor()
	    listener.register(monitor)
	    listener.start()

	New tests added coverting monitor lifecycle.

	tests: Use utils.running for running the listener
	Instead of try-finally block, we can use our handy utils.running()
	context manager.

	tests: Remove duplication in monitor exception test
	Extract a helper function to run the test setup, and use it for testing
	different registration order.

	Move the BadMonitor helper class to the module, so it can be reused by
	future tests.

	udev: Introduce the MultipathMonitor interface
	To avoid loosing events when checking the initial state of the system,
	we must orchestrate listening for events, checking the initial state, and
	starting the udev observer. This is not possible with the current design
	accepting a callback for handling events.

	This patch changes the MultipathListener to accept an object implementing
	the MultipathMonitor interface instead of a callable. The interface will
	be extended later to support correct startup process.

2017-11-27  Tomáš Golembiovský  <tgolembi@redhat.com>

	doc: document guest agent communication
	Document basics behind guest agent communication. Notably document the
	need of refactoring and where it should lead to.

2017-11-27  Francesco Romani  <fromani@redhat.com>

	vm: on kill on resume, exit with proper error
	If a VM is auto-killed because of the configured ResumeBehaviour,
	it should not exit cleanly, but rather with proper error and
	exitreason, to let the HA logic kick in if needed.

	Otherwise, there are no means to distinguish this case and restart
	the VM elsewhere.

	Bug-Url: https://bugzilla.redhat.com/1516322

2017-11-26  Edward Haas  <edwardh@redhat.com>

	hooks: The PYTHONPATH for hooking should not depend on hooks
	The hooks module is used by VDSM to access the existing hooks on the
	system. The hooks themselves are importing the hooking module which
	exposes VDSM functionality to the hooks.

	Current code is assuming a dependency between the hooks module and the
	hook package, including the modules locations.
	This patch removes the location dependency (which assumes that hooks and
	hook are located in the same path).

2017-11-26  Nir Soffer  <nsoffer@redhat.com>

	tests: Optimize waits in async command wait tests
	Add a constant documenting the minimal timeout for async command, and
	use it with the new TIMEOUT constant to verify the tests. Use assertLess
	and assertGreater for better error message when tests fail.

	Before this change:

	==== slowest 10 test durations ====
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitTimeout
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitCond
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testCommunicate
	0.50s call     tests/storage/misc_test.py::TestITMap::testMoreArgsThanThreads
	0.41s call     tests/storage/misc_test.py::TestSamplingMethod::test_many_threads
	0.40s call     tests/storage/misc_test.py::TestSamplingMethod::test_two_threads
	0.25s call     tests/storage/misc_test.py::TestEvent::testOneShot
	0.25s call     tests/storage/misc_test.py::TestEvent::testInstanceMethodDead
	0.25s call     tests/storage/misc_test.py::TestEvent::testEmitStale
	0.25s call     tests/storage/misc_test.py::TestEvent::testUnregister
	==== 69 passed, 1 skipped in 8.16 seconds ====

	After this change:

	==== slowest 10 test durations ====
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitTimeout
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testCommunicate
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitCond
	0.51s call     tests/storage/misc_test.py::TestITMap::testMoreArgsThanThreads
	0.40s call     tests/storage/misc_test.py::TestSamplingMethod::test_many_threads
	0.40s call     tests/storage/misc_test.py::TestSamplingMethod::test_two_threads
	0.26s call     tests/storage/misc_test.py::TestEvent::testOneShot
	0.25s call     tests/storage/misc_test.py::TestEvent::testInstanceMethodDead
	0.25s call     tests/storage/misc_test.py::TestEvent::testEmitStale
	0.25s call     tests/storage/misc_test.py::TestEvent::testUnregister
	==== 69 passed, 1 skipped in 6.18 seconds ====

	This change saves 2 seconds for every build.

	tests: Optimize waits in misc_test
	Replace hard-coded and undocumented long waits (5-0.5 seconds) with
	documented constant. On my laptop all tests pass using 0.005 seconds
	timeout. Use higher value (0.25 seconds) to avoid failures on overloaded
	ci slaves.

	Before this change:

	==== slowest 10 test durations ====
	5.01s call     tests/storage/misc_test.py::TestEvent::testOneShot
	5.00s call     tests/storage/misc_test.py::TestEvent::testEmitStale
	5.00s call     tests/storage/misc_test.py::TestEvent::testUnregister
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitTimeout
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitCond
	1.01s call     tests/storage/misc_test.py::TestITMap::testMoreArgsThanThreads
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testCommunicate
	1.00s call     tests/storage/misc_test.py::TestEvent::testInstanceMethodDead
	0.41s call     tests/storage/misc_test.py::TestSamplingMethod::test_many_threads
	0.40s call     tests/storage/misc_test.py::TestSamplingMethod::test_two_threads
	==== 69 passed, 1 skipped in 23.63 seconds ====

	After this change:

	==== slowest 10 test durations ====
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitTimeout
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitCond
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testCommunicate
	0.50s call     tests/storage/misc_test.py::TestITMap::testMoreArgsThanThreads
	0.41s call     tests/storage/misc_test.py::TestSamplingMethod::test_many_threads
	0.40s call     tests/storage/misc_test.py::TestSamplingMethod::test_two_threads
	0.25s call     tests/storage/misc_test.py::TestEvent::testOneShot
	0.25s call     tests/storage/misc_test.py::TestEvent::testInstanceMethodDead
	0.25s call     tests/storage/misc_test.py::TestEvent::testEmitStale
	0.25s call     tests/storage/misc_test.py::TestEvent::testUnregister
	==== 69 passed, 1 skipped in 8.16 seconds ====

	This change saves 15.5 seconds for every build.

	tests: Optimize wait time in ioprocess tests
	The test was setting ioprocess timeout to 5 seconds, and waited 1
	extra second to ensure a timeout. The timeout was replaced with 0.5
	second, using another 0.5 second extra timeout.

	Then the test was performing gc.collect(), sleeping another second, and
	performing another gc.collect(). This purpose of this strange dance is
	not documented, and the tests pass without it, so it was removed.

	Before this change:

	==== slowest 10 test durations ====
	7.06s call     tests/storage/outofprocess_test.py::TestOopWrapper::testAmountOfInstancesPerPoolName
	0.02s call     tests/storage/outofprocess_test.py::TestOopWrapper::testDifferentPoolName
	0.02s call     tests/storage/outofprocess_test.py::TestOopWrapper::testSamePoolName
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testFileUtilsCall
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testUtilsFuncs
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testSubModuleCall
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testEcho
	0.00s setup    tests/storage/outofprocess_test.py::TestOopWrapper::testAmountOfInstancesPerPoolName
	0.00s teardown tests/storage/outofprocess_test.py::TestOopWrapper::testUtilsFuncs
	0.00s setup    tests/storage/outofprocess_test.py::TestOopWrapper::testFileUtilsCall
	==== 7 passed in 7.20 seconds ====

	After this change:

	==== slowest 10 test durations ====
	1.04s call     tests/storage/outofprocess_test.py::TestOopWrapper::testAmountOfInstancesPerPoolName
	0.02s call     tests/storage/outofprocess_test.py::TestOopWrapper::testDifferentPoolName
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testSamePoolName
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testFileUtilsCall
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testEcho
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testSubModuleCall
	0.01s call     tests/storage/outofprocess_test.py::TestOopWrapper::testUtilsFuncs
	0.00s setup    tests/storage/outofprocess_test.py::TestOopWrapper::testFileUtilsCall
	0.00s setup    tests/storage/outofprocess_test.py::TestOopWrapper::testAmountOfInstancesPerPoolName
	0.00s teardown tests/storage/outofprocess_test.py::TestOopWrapper::testEcho
	==== 7 passed in 1.18 seconds ====

	This change saves 6 seconds for every build.

2017-11-26  Idan Shaby  <ishaby@redhat.com>

	spec: update requirement for ovirt-imageio-daemon version
	Since Host.get_image_ticket works only with versions 1.2.0 of
	ovirt-imageio-daemon and above, this patch updates the requirement for
	it.

2017-11-26  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	tests: fix stomp tests
	There are py3 compat issues with json module so blacklisting the test
	for now.

2017-11-26  Dan Kenigsberg  <danken@redhat.com>

	osinfo: openvswitch: report as a key package

2017-11-25  Edward Haas  <edwardh@redhat.com>

	common: Relocate panic module to common
	panic module is relocated to common in order to allow in the following
	patches to relocate supervdsm module to common.

2017-11-25  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix child process leak in taskset tests
	Almost all taskset tests leaked a child process, causing random failures
	in the CI like this:

	======================================================================
	ERROR: test_set_from_parent(frozenset((1, 2))) (taskset_test.AffinityTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
	    self.runTest(result)
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
	    test(result)
	  File "/usr/lib64/python2.7/unittest/case.py", line 431, in __call__
	    return self.run(*args, **kwds)
	  File "/usr/lib64/python2.7/unittest/case.py", line 342, in run
	    result.startTest(self)
	  File "/usr/lib/python2.7/site-packages/nose/proxy.py", line 170, in startTest
	    self.result.startTest(self.test)
	  File "/vdsm/tests/testlib.py", line 404, in startTest
	    self.stream.flush()
	IOError: [Errno 4] Interrupted system call

	Confirmed by our process leak check:

	$ ./run_tests_local.sh --with-process-leak-check taskset_test.py
	...
	======================================================================
	ERROR: test_get (taskset_test.AffinityTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
	    self.runTest(result)
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
	    test(result)
	AssertionError: Test leaked child processes:
	[
	    {
	        "cmdline": [],
	        "pid": 26456
	    }
	]

	Fixed by waiting for the process, see:
	https://docs.python.org/2/library/multiprocessing.html#multiprocessing.Process.join

	py3: Fix utils.unique() on python 3
	This helper was returning a list in python 2, and odict_keys on python
	3, breaking code that assumed it was getting a list.

	This change make storageserver_test compatible with python 3.

	py3: Enable monitor_test on python 3
	The tests works now, probably due to subprocess32 work.

	tests: Show 10 slowest tests
	The pytest based tests show now the top 10 slowest tests on each run.
	These tests should be optimized to minimize the build time, or marked as
	slow tests.

	Here is example output:

	storage-py27:

	==== slowest 10 test durations ====
	7.09s call     tests/storage/outofprocess_test.py::TestOopWrapper::testAmountOfInstancesPerPoolName
	5.01s call     tests/storage/misc_test.py::TestEvent::testOneShot
	5.00s call     tests/storage/misc_test.py::TestEvent::testUnregister
	5.00s call     tests/storage/misc_test.py::TestEvent::testEmitStale
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitTimeout
	2.01s call     tests/storage/misc_test.py::TestAsyncProc::testWaitCond
	1.01s call     tests/storage/misc_test.py::TestAsyncProc::testCommunicate
	1.01s call     tests/storage/iscsi_test.py::TestRescanTimeout::testTimeout
	1.01s call     tests/storage/misc_test.py::TestITMap::testMoreArgsThanThreads
	1.00s call     tests/storage/resourcemanager_test.py::TestResourceManager::testResourceAutorelease

	storage-py35:

	==== slowest 10 test durations ====
	5.00s call     tests/storage/misc_test.py::TestEvent::testOneShot
	5.00s call     tests/storage/misc_test.py::TestEvent::testEmitStale
	5.00s call     tests/storage/misc_test.py::TestEvent::testUnregister
	1.00s call     tests/storage/misc_test.py::TestITMap::testMoreArgsThanThreads
	1.00s call     tests/storage/misc_test.py::TestEvent::testInstanceMethodDead
	0.90s call     tests/storage/clusterlock_test.py::test_acquire_wait_until_host_id_is_acquired
	0.61s call     tests/storage/clusterlock_test.py::test_acquire_after_inq_lockspace_failure
	0.51s call     tests/storage/operation_test.py::TestCommandWatch::test_abort_running
	0.50s call     tests/storage/operation_test.py::TestCommandRun::test_abort_running
	0.41s call     tests/storage/asyncevent_test.py::TestEventLoop::test_call_later_order

	lib-py27:

	==== slowest 10 test durations ====
	0.00s call     tests/hooking_test.py::TestHooking::test_read_domxml
	0.00s call     tests/hooking_test.py::TestHooking::test_write_domxml
	0.00s call     tests/hooking_test.py::TestHooking::test_roundtrip_domxml
	0.00s setup    tests/hooking_test.py::TestHooking::test_read_domxml
	0.00s setup    tests/hooking_test.py::TestHooking::test_write_domxml
	0.00s setup    tests/hooking_test.py::TestHooking::test_roundtrip_domxml
	0.00s teardown tests/hooking_test.py::TestHooking::test_read_domxml
	0.00s teardown tests/hooking_test.py::TestHooking::test_roundtrip_domxml
	0.00s teardown tests/hooking_test.py::TestHooking::test_write_domxml

	We can see that lib-py27 is in good shape!

	tests: Use pytest instead of py.test
	py.test is the legacy name, the modern name of the tool is pytest.

2017-11-24  Edward Haas  <edwardh@redhat.com>

	common: Relocate udevadm to common

	common: Relocate commands module to common

	vdsm: Relocate terminat* from utils to commands
	This change is introduced to help with the relocation of commands module
	to common in the following patch.

	common: Relocate wrap_command to common and remove vdsm.cmdutils
	Removing vdsm.cmdutils and merging its content into common.cmdutils

	net: Adjust tc filter show output parsing to fc27
	The command output of 'tc filter show dev <dev name> parent <id>' on
	fc27 has a new field: 'not_in_hw' (without any value).
	Adding this field name to the parser in order to correctly continue
	parsing the rest of the fields.

2017-11-24  Francesco Romani  <fromani@redhat.com>

	virt: make sure to store device metadata
	When a VM is started from domain XML, Engine is in charge
	to set the proper device metadata, so Vdsm just needs to
	keep them up to date, should any action change them.

	However, Vdsm must support the old vm.conf initialization
	method, and, given that recovery files are long gone, it
	is now in charge to save -and not just update- the per-device
	metadata in this flow.

	This patch implements the code that saves that metadata.
	Without this patch, Vdsm works fine until it is restarted;
	after the restart, random action could fail with apparently
	unrelated exceptions, most likely AttributeError.

	Bug-Url: https://bugzilla.redhat.com/1516660

	virt: don't validate params on incoming migration
	When Vdsm receives one incoming migration of a VM
	created with domain XML, it will incorrectly try to
	validate the params. But they will be missed, so
	the validation fail. The correct thing to do is to
	skip validation in this case, but we must distinguish
	further between VMs created in 4.2 with domain XML
	or VMs created in 4.1 with vm.conf.

	In the latter case, we should keep validating the parameters.

	Bug-Url: https://bugzilla.redhat.com/1516405

	virt: metadata: __bool__ for Descriptor
	Add the __bool__ magic method for the metadata.Descriptor class.
	Now client code can easily detect if there is valid metadata or not.

2017-11-24  Edward Haas  <edwardh@redhat.com>

	common: Relocate cmdutils.receive to common.cmdutils
	Note: When all cmdutils content is relocated (in the following patches)
	the vdsm.cmdutils will be removed and only a single version of it will
	exist.

2017-11-23  Nir Soffer  <nsoffer@redhat.com>

	tests: Mark loop device test as broken on ovirt CI
	This test fails randomly on oVirt CI. Mark this test as broken on oVirt
	CI for now. We will need to investigate this later.

	travis: Add Fedora 27 build

	dockerfile: Consume ovirt-imageio-common from rawhide
	ovirt-imageio-common is built now for Fedora rawhide, so we don't need
	to install the build from Fedora 26 repo.

	dockerfile: Add Fedora 27 build
	We tested Fedora 27 before it was released, by testing Fedora rawhide.
	Since the release, we are testing only rwahide (28). Add a docker file
	for Fedora 27.

2017-11-23  Petr Horáček  <phoracek@redhat.com>

	net: parse tc filter u32 chain number
	With Fedora 27, u32 chain number is listed in tc filter show.

2017-11-23  Francesco Romani  <fromani@redhat.com>

	tests: mark mkimage tests broken_on_ci
	Some mkimage tests fail too often, and apparently randomly.
	Let's disable them to reduce the noise until we have the time
	to properly fix them.

	Test-Only: yes

2017-11-23  Fred Rolland  <frolland@redhat.com>

	storage: Start MultipathListener in HSM.init
	In this patch, a 'MultipathListener' instance is created and started
	in the 'init' method of HSM.

	The 'MultipathListener' is stopped in HSM 'prepareForShutdown'.

	Currently no callbacks are added to the 'MultipathListener'

	This is the log when the 'MultipathListener' starts:
	[storage.udev] Starting multipath event listener

	This is the log when a device become faulty:
	[storage.udev] Sending MultipathEvent(
	    type='failed',
	    mpath_uuid=u'36001405976dc283c6bf497b940e69eed',
	    path=u'sdae', valid_paths=0)

	This is the log when a device become active again:
	[storage.udev] Sending MultipathEvent(
	    type='reinstated',
	    mpath_uuid=u'36001405976dc283c6bf497b940e69eed',
	    path=u'sdae', valid_paths=1)

	This is the log when the 'MultipathListener' stops:
	 [storage.udev] Stopping multipath event listener

	The 'MultipathListener' will be used as part of the multipath event
	feature: https://www.ovirt.org/develop/release-management/
	features/storage/multipath-events/

2017-11-23  Nir Soffer  <nsoffer@redhat.com>

	automation: Fix fc27 build when running on fc26 slave
	We used to install pip using easy_install, because pip was not available
	on the EL7 slaves. However in recent Fedora, easy_install is not
	available, and the build will fail with:

	00:01:15.007 + easy_install pip
	00:01:15.008 ./automation/check-patch.sh: line 53: easy_install: command not found

	python-pip is available on EPEL, which is ok to use in oVirt CI.
	Require python-pip and remove easy_install and the python-setuptools
	required for it.

	Example failing build:
	http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc27-x86_64/100/console

2017-11-23  Fred Rolland  <frolland@redhat.com>

	storage: Add multipath event listener
	This patch introduces the 'MultipathListener' class.
	The MultipathListener can listen to udev events, convert the relevant
	ones to MultipathEvent objects and forward them to the registered
	callbacks.

	Only the udev events that match the following criterias will be
	forwarded:
	- The 'DM_UUID' field should start with 'mpath-'
	- The event 'action' is 'remove'
	- The event 'action' is 'change' and there is a field 'DM_ACTION'
	  with one of these values: 'PATH_FAILED' or 'PATH_REINSTATED'

	The 'MultipathEvent' contains the following fields: 'type','mpath_uuid',
	'path' and valid_paths'.

	The MultipathListener allows to register callables, that will be
	triggered when a multipath event arrives. Unregistering callables is
	also supported.

	Calling MultipathListener.start(), will cause the MultipathListener to
	register to udev events.
	Once 'start' has been called, it is safe to check the current state,
	as events will not be lost in the between.

	The 'MultipathListener' will be used as part of the multipath event
	feature:
	https://www.ovirt.org/develop/release-management/
	features/storage/multipath-events/

	Here an example of the use:

	from vdsm.storage import udev
	mp_listener = udev.MultipathListener()
	def callb(event):
	    print(event)
	mp_listener.register(callb)
	mp_listener.start()

	Output:
	MultipathEvent(type='failed',
	               mpath_uuid=u'36001405976dc283c6bf497b940e69eed',
	               path=u'sdae',
	               valid_paths=0)
	MultipathEvent(type='reinstated',
	               mpath_uuid=u'36001405976dc283c6bf497b940e69eed',
	               path=u'sdae',
	               valid_paths=1)

2017-11-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Raising libvirt CONF_VERSION to enable qemu cores
	This is done separate to the conf change (http://gerrit.ovirt.org/84358)
	we want to not force re-configure in older versions, but backport the
	conf change to have it in new installation. for 4.2 we force
	re-configure on upgrade with this patch.

2017-11-23  Petr Horáček  <phoracek@redhat.com>

	net: save ovn-bridge-mappings on upgrade
	OVS property ovn-bridge-mappings is used by ovn to connect its logical
	networks to physical network/bridge. Support for this property was added
	to VDSM only recently.

	In case a user deployed networks on his hosts before this feature, and only
	then upgraded to latest VDSM, mappings will be missing and provider physical
	networks won't work.

	With this patch we make sure that mappings are saved on upgrade.

2017-11-23  Edward Haas  <edwardh@redhat.com>

	v2v: Refactor PipelineProc.wait and unify process check
	The wait method has been simplified.
	The check of the processes termination has been combined and performed
	after the timeout.
	This should resolve the detected problem where one process ends before
	another less than a second earlier (the timeout resolution), but during
	that time the timeout expired and the second process is not checked
	again.

	Two tests have been introduced to check the specific scenarios:
	- Both processes finished when entering the wait.
	- Both processes finished in the timeout period but not at the same
	  time.

2017-11-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding max_core = "unlimited" to libvirt qemu.conf
	Without this paramter in qemu.conf, qemu processes get the system ulimit
	setting for coredump size which by default set to 0

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1515124

2017-11-23  Francesco Romani  <fromani@redhat.com>

	virt: storagexml: extract constants
	We tidy up the code a tiny bit, and we will reuse the constants
	in a future patch.

2017-11-22  Francesco Romani  <fromani@redhat.com>

	virt: config: drivemonitor: enable by default
	Enable drive monitoring with events by default.
	We believe this will give a great performance benefit
	in 4.2.0, and we want to test it throughtly before the release.

	Bug-Url: https://bugzilla.redhat.com/1181665

2017-11-22  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	automation: Prepare for fedora 27 and rawhide builds
	We want to run the CI with the latest fedora versions, to detect and
	handle regressions earlier.

	If tests starting to fail with newer fedora version we may need to fix
	the code or report bugs upstream.

2017-11-22  Ala Hino  <ahino@redhat.com>

	live-merge: Handle LookupError when tracking active layer merge job
	When tracking jobs in queryBlockJobs, in case of active layer merge
	pivot might already be completed, but the thread isn't marked as
	succeeded yet. In this case, a LookupError is raised causing live merge
	operation to fail. This isn't the desired behavior as in the next block
	jobs query, the thread will probably be marked as succeeded and the flow
	is supposed to continue as expected. In this patch, we correctly handle
	this use case, by handling the exception and continue tracking the next
	block job. In addition, we don't abort querying drive block jobs if the
	drive is gone, a use case that is less likely to happen.

	Bug-Url: https://bugzilla.redhat.com/1488542

2017-11-21  Ala hino  <ahino@redhat.com>

	live-merge: Handle errors raised during updating VM block jobs
	When updating the VM block jobs, errors may be raised. In such cases,
	the errors will fail the whole live merge operation even though the
	error may be related only to a single block job. In this catch, we
	log the errors and continue the flow.

	Bug-Url: https://bugzilla.redhat.com/1488542

2017-11-21  Nir Soffer  <nsoffer@redhat.com>

	tests: Configure logging for all storage tests
	To see logging output, someone must configure logging before running the
	test. In the legacy vdsm tests, this was done in testrunner.py, which we
	don't use here. Configuring logging in the storage test package is an
	easy way to do this.

2017-11-21  Francesco Romani  <fromani@redhat.com>

	tests: virt: make_env() should be a contextmanager
	To improve isolation of the tests, and to make them
	fully indipendent from the host-specific configuration.

	Test-Only: yes

2017-11-21  Dan Kenigsberg  <danken@redhat.com>

	v2v_test: mark testWait as broken on Python 3
	I do not understand why, but testWait fails quite often when run in
	Python 3. Let us mark it as broken until we find the time to understand
	the issue.

2017-11-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing mkdir for core dir which is being handled by abrt service
	we used to create /var/log/core also in init script and spec. Since abrt
	integration abrt is responsible to collect core dumps and configured the
	output directories under /etc/abrt/plugins

	This patch removes also logrotate configuration to handle /var/log/core
	rotation, and qemu conf for auto_dump_path

2017-11-21  Francesco Romani  <fromani@redhat.com>

	tests: don't hardcode constant
	The simulate_extend_callback helper had a magic number hardcoded in.
	This works fine until we simulate just one callback, but will fail
	once we start adding tests to cover the replication flows.

	Test-Only: yes

2017-11-21  Edward Haas  <edwardh@redhat.com>

	common: Relocate vdsm.cmdutils.Error to common
	Moving vdsm.cmdutils.Error to vdsm.common.cmdutils.Error
	and point udevadm to use it.

	In the following patches, udevadm will move to common.

2017-11-21  Tomas Jelinek  <tjelinek@redhat.com>

	vm: make guaranteed memory hot-settable also on unplug
	Following the https://gerrit.ovirt.org/#/c/81754/
	this adds the support also for unplug.

	Bug-Url: https://bugzilla.redhat.com/1430491

2017-11-21  Francesco Romani  <fromani@redhat.com>

	vm: drivemonitor: clear threshold if events enabled
	We should not change the threshold in any way if the
	event support is disabled.

	tests: drivemonitor: clear_threshold ignores flag
	Add a failing test to make evident that DriveMonitor.clear_threshold
	ignores the events_enabled flag.
	Actually, it should leave the drive alone if the event support is
	disabled.

2017-11-21  Dan Kenigsberg  <danken@redhat.com>

	py3: fix v2v and its test

2017-11-21  Nir Soffer  <nsoffer@redhat.com>

	vm: Extract a _update_drive_volume_size method
	After drive's volume is extended, we have to update the drive size and
	set a new threshold. Extract the code from __afterVolumeExtension to a
	new method, since we need to do the same in __afterReplicaExtension, if
	while extending the replica, we pivoted to the replica.

	This code is covered by the current drive extension tests.

2017-11-20  Francesco Romani  <fromani@redhat.com>

	vm: clear drive threshold when snapshot completes
	Let's clear the old block threshold when a snapshot completes.
	We don't need to set a new threshold right now, we can wait
	for the next monitoring cycle to pick up the drive and do
	all the needed checks.

	vm: doc: unset threshold when live merge completes
	The last step of a live merge is a pivot. If this step
	succeeds, we need to set a new threshold on the new active
	layer. We can't do this immediately, because we can't make
	any safe assumptions about the drive state.

	So, the best thing to do is to treat the drive like a new one,
	set its threshold_state to UNSET and let the drive monitor do
	any needed check in the next monitoring cycle.

	The drive monitoring is already re-enabled at the end of live merge.

	This is a doc-only change. All the needed steps are already
	done by the existing code.

	Documentation-Only: yes

	doc: vm: document disk replication threshold state
	When LSM completes, aka when diskReplicationFinish succesfully
	completes, we need to UNSET the drive threshold state.

	This is done implicitely when we change the path of the
	Drive object. This patch add a comment to explain why it is correct.

	Documentation-Only: yes

	vm: get vmType from domain, not from conf
	The commit 66971d3a8 stop adding defaults to vm.conf in the XML flow.
	Unfortunately, we didn't notice that there is one place in the
	Vm.getStats() flow on which the code assumes vm.conf['vmType']
	to be present - this is no longer the case.

	This patch solves this issue returning the vm_type from the
	domain descriptor, not from the vm.conf: this is the right
	thing to do in both flows.

2017-11-20  Dan Kenigsberg  <danken@redhat.com>

	v2v_test: testWait: use constant instead of hard-coded numbers
	I hope that in the future we can shorten the length of SHORT_SLEEP.
	currently it causes an unexplained failure of the test.

2017-11-20  Francesco Romani  <fromani@redhat.com>

	vm: keep reporting 'vmName'
	In the XML flow, don't inject a made up vm name if the corresponding
	parameter is missing - this is not one error, the parameter is supposed
	to be absent.

	When responding to one VMList query, make sure to add the VM name in
	the output.

	Bug-Url: https://bugzilla.redhat.com/1514925

2017-11-19  Edward Haas  <edwardh@redhat.com>

	net: Make libvirtnetwork availability optional in netupgrade
	netupgrade module uses libvirtnetwork to list existing libvirt networks
	as part of its upgrade flow.
	(VDSM has persisted the network in libvirt in older versions and in
	newer ones the networks get persisted in running config.)

	In case libvirtnetwork is missing, we safely can assume that no networks
	have been persisted under libvirt.

	This patch removed the hard dependency between netupgrade and
	libvirtnetwork.

	net: Remove the dependency on vdsm.tool.service
	vdsm.network is using vdsm.tool.service to check OVS service status.
	The check has been reimplemented in a simple manner under ovs.info
	module.

2017-11-17  Dan Kenigsberg  <danken@redhat.com>

	py3: fix monkeypatch so that monkeypatch_test passes

	py3: drop vmapi_test from blacklist
	vmapi_test is utterly broken, but that is true for Python 2 and Python 3
	alike.

2017-11-16  Dan Kenigsberg  <danken@redhat.com>

	py3: make stompadapter_test pass

	py3: mkimage: avoid iteritems
	This is the only first meaningless step attempting to port mkimage to
	Python 3.

	py3: drop device_test from blacklist

	py3: remove API_test from blacklist

2017-11-16  Francesco Romani  <fromani@redhat.com>

	virt: storage: move monitoring check in Drive
	The DriveMonitor.monitored_drives() logic is no longer thread safe,
	because it depends on various storage.Drive attributes:

	- drive.readonly: cannot change at runtime
	- drive.monitorable
	- drive.threshold_state
	- drive.chunked: can change when path is changed after first
	                 snapshot or after live storage migration
	- drive.replicaChunked: can change when starting/stopping
	                        live storage migration

	To make the check safe, we move the logic inside a new method
	of the storage.Drive class. This way we can check all the attributes
	using proper locking.

	doc: sync the design document with the code
	Make sure the thin provisioning design document and the code
	are aligned.

	vm: storage: add a Drive.monitorable flag
	We want to disable monitoring per-drive rather than per-vm.
	In other words, we want to be able to disable drive monitoring
	only on specific devices.

	This patch adds a `monitorable` flag to the storage.Drives, which
	we will use to implement this feature.

2017-11-16  Petr Horáček  <phoracek@redhat.com>

	net: don't persist nameservers when using dhcp
	Curently, when setting up a management network, we persist nameservers.
	The problem is that we persist them even when DHCP is to be used.
	Due to this, change of nameservers on DHCPd is not propagated to VDSM
	unified persistent config. On boot, it will overwrite the older ones.

	With this patch we don't persist nameservers when DHCP is used.

	Bug-Url: https://bugzilla.redhat.com/1508397

2017-11-16  Francesco Romani  <fromani@redhat.com>

	vm: handle StorageUnavailableError explicitely
	The Vm.updateDriveVolume() method used to handle StorageUnavailableError
	internally; if the exception was raised, the update of the drive
	apparentsize and truesize was skipped. This made impossible for the
	program[1] detect the failure and react accordingly.

	Now we delegate the handling of the exception to the calling site.

	+++

	[1] the exception was logged, so humans were made aware.

	vm: split updateDriveVolume,  updateDriveParams
	Vm.updateDriveParams used to call updateDriveVolume implicitely.
	Now we make the call explicit in the calling sites of updateDriveParams:
	a future patch wants to handle the failure of updateDriveVolume, and
	update the block thresholds only if the update succeeds.

	Vm.updateDriveParameters used to call Vm._sync_metadata() right after
	the internal call to Vm.updateDriveVolume.
	There is not a dependency to those calls. Vm._sync_metadata() cares
	about a subset of the drive parameters that
	a) must be taken from the metadata, because are oVirt-specific and not
	   represented, or can be safely inferred, from the domain XML
	b) cannot be learned by Vdsm on its own

	The up to date disk sizes, returned by Vm.updateDriveVolume, belong
	to neither of those categories.

	virt: doc: document the extension from UI flow
	One user can edit the disk properties and explicitely
	request one extension. Document how we want to handle this flow.

2017-11-16  Milan Zamazal  <mzamazal@redhat.com>

	virt: Ignore disconnected domains in Vm._undefine_domain
	Disconnected domains can't be undefined by definition, so it's pointless to
	crash in the undefine call on domain cleanup.  A typical case where that
	happens is when canceling an incoming migration – the destroy call fails on the
	domain undefine call and the failure is reported to the user.  Not calling
	undefine in that case is not a problem, since libvirt takes care of cleaning up
	the migration destination VM.

	So let's ignore _undefine_domain errors on Disconnected domains.

	virt: Don't report a failed migration as running
	When a migration fails, SourceThread._recovery method gets called.  VM status
	is changed to UP at the end of the method and the corresponding status event is
	sent.  However VM._getVmStatus checks for migration and SourceThread.migrating
	still reports True, so "Migration source" is still sent as the VM status.

	Let's fix that and make SourceThread.migrating return False when VM status is
	set to UP.

	Revert "virt: Don't call destroy on destination after failed migration"
	This reverts commit 3dffa7c2fd041d719f94037121a91da20107c464.

	We removed the destroy call in the hope that libvirt and Engine always do the
	right thing and by removing the call we can be safer from various problems.
	However libvirt doesn't signal failed migrations on the destination and when a
	migration fails quickly then Engine doesn't call destroy on the destination.
	So although libvirt makes proper cleanup on the destination, Vdsm doesn't.  The
	result is that Vdsm thinks the VM is still present on the destination after
	failed migration, until its long wait for migration completion times out.

	The simplest mitigation for now is to keep the destroy call from the source
	host.

2017-11-15  Francesco Romani  <fromani@redhat.com>

	vm: livemerge: isolate drive conf update
	This patch isolates all the vm.conf updates from the drive object
	in a method, with no intended changes in behaviour.

2017-11-15  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: update documentation
	In order to debug communication errors between Engine and Vdsm,
	it is useful to have an option to install vdsm-client package
	and run Vdsm commands.
	The only problem is that vdsm-client looks for its certificate under
	/etc/pki/vdsm, which is missing on Engine host.

	We can overcome this by creating symbolic links to engine cert and key
	files.
	An explanation was added to vdsm-client doc.

	Bug-Url: https://bugzilla.redhat.com/1508375

2017-11-15  Francesco Romani  <fromani@redhat.com>

	vm: livemerge: update volumeChain separately
	This patch completes the split between the drive data
	and its conf counterpart. Now Vm._syncVolumeChain treats
	the two sets of data as completely indipendent - even though
	both should carry the same informations.
	This way we can easily disable the updates to vm.conf once we are ready.

	vm: livemerge: update the active layer path
	This patch make sure both drive object active layer path and
	its drive configuration counterpart are updated independently.
	The purpose is still to make the drive object the source of truth,
	and to make the vm.conf easy to turn out when  Engine no longer needs
	it.

	vm: livemerge: update conf from drive
	We want to make sure the drive object is the source of truth.
	To implement this, we update the vm.conf from the attributes of
	the drive object, not the other way around.

	No intended changes in behaviour.

	vm: livemerge: don't share volInfo
	The Vm._syncVolumeChain method used to share some nested data
	structure (volumeChain, volumeInfo) between the drive object
	and the vm.conf dictionary.

	This means that both places will hold a reference to the same, say,
	list. However, we want to stop populating vm.conf - as soon as Engine
	doesn't use it anymore -, so we need to start making sure that the
	drive object, and not its conf, is the source of truth.

	We start this process splitting the update of volumeInfo in two
	parallel tracks, one for the drive object and one for its conf.
	Nothing should change in terms of behaviour, because the data
	is supposed to be the same.

	To make sure, we add a safeguard and warning.

	vm: livemerge: generalize getVolumeInfo helper
	The Vm._syncVolumeChain method defines a private getVolumeInfo helper.
	The name is a little misleading: what the helper do is to find the
	volume chain node matching a given volumeID; that node will be used
	as up to date volumeInfo for the drive subject to live merge.

	This patch generalizes the helper and makes it a free function.
	We want to reuse it in a future patch, to make sure the livemerge flow
	uses the drive object attributes - not its configuration stored in
	vm.conf, so the latter can be eventually removed.

2017-11-15  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't store agent channel name to metadata
	It's useless there – Engine no longer puts it there and the channel name is
	fixed.

	virt: Set correct agent channel name when not present in conf
	Engine used to send oVirt guest agent name in conf and/or in metadata.  That is
	no longer true and the agent name is present just in the corresponding
	<channel> element of the VM's domain XML.  The current code sets the legacy
	channel name in such a case, which is wrong.  We should use the new agent
	channel name instead.

	We introduce a helper method to get the correct channel name.  If Engine
	explicitly sends the channel name in conf, it's used.  Otherwise we must
	distinguish between old Engine and new Engine.  New Engine sets the name in the
	domain XML, so we look if it is present there.  If it is then it is used,
	otherwise the legacy name is used.

	Since oVirt guest agent is used in only three places, making the socket file
	path, constructing domain XML and making compatibility symlinks, two of them
	being legacy code, there's no strong need to store it in an attribute.  So we
	make the new helper property replacing the original attribute.

	Bug-Url: https://bugzilla.redhat.com/1512572

2017-11-14  Fred Rolland  <frolland@redhat.com>

	tests: Fix typos in README

2017-11-14  Edward Haas  <edwardh@redhat.com>

	net tests: Remove testRemovingBridgeDoesNotLeaveBridge
	It is already covered by:
	test_switch_between_bridgeless_and_bridged_vlaned_net

	net tests: Relocate testBondHwAddress
	testBondHwAddress has been reimplemented as
	test_bond_slaves_order_does_not_affect_the_mac_address

	net tests: Remove testDelNetworkBondAccumulation
	The test does not seem to have any special purpose except creating and
	destroying bonded networks. Such scenarios are already covered in the
	net_with_bond_test module.

	net tests: Remove testSetupNetworksAddBadParams
	testSetupNetworksAddBadParams is already covered by
	test_add_bridged_vlaned_net_missing_sb_device_fails and
	test_add_bridgeless_vlaned_net_missing_sb_device_fails

	net tests: Relocate testSetupNetworksMultiMTUsOverNic
	testSetupNetworksMultiMTUsOverNic is being replaced by modified existing
	tests:
	test_removing_a_net_updates_the_mtu
	test_adding_a_net_updates_the_mtu

	A 'bonded' parametrize has been defined to assist with this change.

	net tests: Relocate testSetupNetworksMultiMTUsOverBond
	testSetupNetworksMultiMTUsOverBond has been relocated and renamed to
	test_adding_a_bonded_net_updates_the_mtu.
	Part of the original test is covered by
	test_removing_a_bonded_net_updates_the_mtu.

	net tests: Remove testSetupNetworksStableBond
	testSetupNetworksStableBond is already covered by existing tests:
	Change bond slaves: test_given_bonded_net_transfer_one_slave_to_new_net
	Add new network over the bond: test_add_vlaned_network_on_existing_bond

	net tests: Remove KeepNetworkOnBondAfterBondResizing
	testSetupNetworksKeepNetworkOnBondAfterBondResizing is removed and
	test_given_bonded_net_transfer_one_slave_to_new_net is used to cover its
	content (adding link monitoring and bridged scenarios).

2017-11-14  Irit Goihman  <igoihman@redhat.com>

	sos: collect hostdevListByCaps command
	hostdevListByCaps command output is needed for getting
	additional info from sos report and has been added to sos
	plugin.

	Bug-Url: https://bugzilla.redhat.com/1506193

2017-11-14  Francesco Romani  <fromani@redhat.com>

	tests: avoid defaults in make_env
	In patch I561b04704aa6ae9d38aef7a0f7c38eed5e8ea37a we started a
	refactoring of the drive_extension_test.py testsuite.
	We added some backward compatibility to the existing tests
	to limit the size of the patch, but that lead to unclear test
	environment.

	This patch removes any default, now any testcase has to declare
	its environment explicitely.

2017-11-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Make it easy to run specific tests using tox
	Using tox we can run the tests with all installed python versions.
	However running all tests takes more than a minute, and when you work on
	a module you want to run only the module tests after every change.

	Modify the storage testenvs to override the "storage" directory with
	list of files to tests, allowing testing specific modules.

	Example usage:

	    tox -e storage-py27,storage-py35,storage-py36 -- storage/qcow2_test.py

2017-11-13  Edward Haas  <edwardh@redhat.com>

	net tests: Embed waitfor.waitfor_linkup into monitor_stable_link_state
	monitor_stable_link_state is added a new argument 'wait_for_linkup',
	defaulting to True, which instructs the funtion to wait for the link up
	state before the monitor starts.

	It is aimed to reduce the noise in the tests (as this functionality is
	commonly used).

2017-11-13  Francesco Romani  <fromani@redhat.com>

	virt: storage: extract Drive.volume_target_index
	Extract the volume_target_index helper from the volume_target method.
	We will use the new method both in the existing volume_target method,
	but also to update the block thresholds when LSM or live merge are
	completed.

2017-11-13  Nir Soffer  <nsoffer@redhat.com>

	tests: Document how to use tox virtual environment
	Installing pytest on your system is a bad idea when using pytest in tox.
	When you run tox, pytest from your environment can be used instead of
	the installed pytest from the environment, causing strange failures, or
	worse, false success (e.g running python 3 tests with python 2).

	Add a section to tests/README about using tox virtual environment to run
	pytest directly.

2017-11-13  Francesco Romani  <fromani@redhat.com>

	virt: save and restore drive metadata
	This patch make sure that the changes to the drive metadata performed
	bu live merge are persisted to the device metadata - and also restore,
	like we used to do with recovery files.

2017-11-13  Petr Horáček  <phoracek@redhat.com>

	net: test: skip test_add_delete_ipv4_ipv6 if NM is running
	The test is checking that IPAddress.delete() successfully removed
	ip address from an interface.

	On IPv6 address deletion, NM seems to re-add the address and fails
	the test.

	BZ#12345 has been opened to track this issue.

	Revert "net tests: Block on ip address deletion (for max of 0.5sec)"
	This reverts commit c37e8a8bd60cb0acc1016cf38bace375b5d1a351.

	The problem is probably caused by BZ#1512316 and cannot be fixed by us.

2017-11-13  Edward Haas  <edwardh@redhat.com>

	net tests: Relocate AddNetworkToNicAfterBondBreaking
	testSetupNetworksAddNetworkToNicAfterBondBreaking has been moved to the
	new functional tests as test_given_bonded_net_replace_bond_with_a_slave.

	net tests: Fix unsupported bond removal explicit request
	Issuing setupNetworks with an explicit bond removal was not supported.
	{'bond0': {'remove': True}}

	net tests: Remove testSetupNetworksAddVlan
	testSetupNetworksAddVlan is covering a creation of a vlanned network and
	cutomization of bridge options.
	Both are already covered by existing (new) functional tests.

	net tests: Replace testSetupNetworksMtus with new tests
	testSetupNetworksMtus has been replaced with tests from the new func
	test suite.
	Specifically, a new link mtu assert has been introduced and used to
	verify the networks nics correct mtu values.

2017-11-12  Dan Kenigsberg  <danken@redhat.com>

	py3: storage.hsm: use six.moves.map

	execCmd: drop **extra trick
	Now that deathSignal is gone, there is no need with the hack introduced
	by commit bc6c8d7c38

	execCmd: use subprocess32 instead of cpopen
	As this removes the final dependency on cpopen, python-cpopen is removed
	from the spec. Sic transit gloria locali.

	execCmd: drop deathSignal
	We have no more users of deathSignal, so we can drop the code
	implementing it.

2017-11-12  Nir Soffer  <nsoffer@redhat.com>

	Remove last usage of non-standard deathSignal
	Replace usage of non-standard cpopen option "deathSignal" with
	utils.terminating() helper.

	This change also fix possible reaping of the dd child process if the
	operation failed. We used to kill the process without waiting for it.

	We are still using commands.AsyncProc which is not compatible with
	python 3, more work is needed to replace it.

2017-11-11  Ala Hino  <ahino@redhat.com>

	vm: Format exception message
	A LookupError was raised with unused %s placeholder. Format
	the missing alias into the exception message properly.

	Example log:

	    No block job found for drive 'vda'

2017-11-10  Dan Kenigsberg  <danken@redhat.com>

	storage.mount: simplify execCmd call

2017-11-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make sure balloon target is initialized
	When VM initialization from XML is applied, balloon device target and minimum
	parameters remain uninitialized.  Those values are not available in the part of
	libvirt domain XML corresponding to the device and must be retrieved from
	memory parameters, stored in metadata or available in memory set up in libvirt
	domain XML.

	We must ensure that the extra initialization settings of the balloon device are
	applied also when XML VM initialization is used.  We must also distinguish
	between VM start up, where we use the boot time memory size, and VM recovery,
	where we use current memory size.

	Bug-Url: https://bugzilla.redhat.com/1497517

2017-11-10  Dan Kenigsberg  <danken@redhat.com>

	storage.mount: drop timeout arg
	The sematics of this argument is dubious (it attempts to kill the mount
	process, but does not wait for its returncode). Its implementation
	dependes on an awkward definition of AsyncProc.wait (returning whether
	timout passed rather than subprocess return code). But most importantly,
	nobody uses it.

2017-11-09  Dominik Holler  <dholler@redhat.com>

	net: Fix mix-up of VLAN ID and VLAN Name
	This change fixes mixed VLAN ID and VLAN Name in lldpad driver
	and its unit test.

	net: Add Link Aggregation and MTU TLV
	The lldpad driver is extended to support the
	Link Aggregation TLV and the MTU TLV.

	The Link Aggregation TLV might be marked as OUI 80c2,
	subtype 7, or OUI 120f subtype 3. lldptool shows both
	in the same way, so it is not possible to conclude
	from lldptool's output to the OUI and subtype.

2017-11-09  Francesco Romani  <fromani@redhat.com>

	vm: explicit sync in untrackBlockJob
	A future patch wants to update more drive metadata when
	Vm.untrackBlockJob completes succesfully.

	This patch prepares the code making the syncronization with
	the libvirt domain object one explicit step.

	No intended changes in behaviour.

	vm: set device metadata in updateDriveParameters
	When a VM method changes the parameters of one drive, we call the
	the Vm.updateDriveParameters() method to persist the changes to both
	the Drive object and to enable the recovery.

	Up until oVirt 4.1, that meant to update the drive configuration dict
	in vm.conf, and write a new recovery file.
	Now we need to persist the relevant fields in the device metadata,
	and synchronize the metadata with the libvirt Domain object.

	vm: storage: report threshold_state in repr(Drive)
	Report the disk threshold state in Drive's __repr__
	to improve the debuggability of Vdsm.

2017-11-09  Irit Goihman  <igoihman@redhat.com>

	vm_migration_hook: move to new client
	jsonrpcvdscli is deprecated and should be replaced with the
	new vdsm client.

2017-11-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove from init script the mkdir of /var/log/vdsm/backup
	This directory exists after vdsm installation. This was added for old
	node installation when vdsm spec script does not run on the image.

	The following line creates the directory with the required ownership
	%dir %{_localstatedir}/log/%{vdsm_name}/backup

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260747

2017-11-09  Francesco Romani  <fromani@redhat.com>

	virt: drivemonitor: fix typo
	A typo prevented the drive monitoring to be enabled correctly.

	virt: tests: add tests for the Drivemonitor enable
	The drivemonitor class can be created disabled, and
	enable/disabled at runtime. Add tests to exercise this code.

2017-11-09  Edward Haas  <edwardh@redhat.com>

	net: Rename the bond used for option mapping
	In order to create the default bond options map, on every boot VDSM is
	running a scan on all bond modes and detects the existing attributes and
	their default values. It does so using a bond device with a random name
	which has an unwanted side effect of logging the scan.

	In order to explain these logs and have them marked as related to this
	bond scan, the random generated bond name has been assigned a constant
	prefix: "bondscan-"

	Bug-Url: https://bugzilla.redhat.com/1495905

2017-11-08  Edward Haas  <edwardh@redhat.com>

	net: Logging failure to read the speed at debug level
	Logging failure to read the speed has been done in WARN level, which
	reached the journal, over spamming it.

	It is enough to log it in debug level for now (not reaching the journal).
	Even when the logging is missing, a value of 0 implies a possible
	failure, therefore, the information lost has small impact.

	Bug-Url: https://bugzilla.redhat.com/1510443

2017-11-08  Francesco Romani  <fromani@redhat.com>

	virt: drivemonitor: set exceeded state if needed
	When we monitor a drive, if we detect that it needs extension,
	we should force its threshold_state to exceeded, to avoid missing
	the drive in a future monitoring cycle, and to make sure
	it is extended.

2017-11-08  Irit Goihman  <igoihman@redhat.com>

	yajsonrpc: create exception.py module
	move all yajsonrpc exception types to a separate
	module and change all moved exception types references.

2017-11-08  Edward Haas  <edwardh@redhat.com>

	net: netupgrade - Ignore unowned bonds and do not persist them
	During a network upgrade flow where the system is in
	unified persistence mode, external bonds have been automatically
	acquired and persisted in the unified config.
	This is not the desired behavior, bonds that are not owned by VDSM
	should not be acquired.

	This patch fixes this behavior and ignores bonds which are not owned.

	Bug-Url: https://bugzilla.redhat.com/1422430

2017-11-08  Francesco Romani  <fromani@redhat.com>

	virt: move Vm._shouldExtendVolume in drivemonitor
	Move Vm._shouldExtendVolume into the Drivemonitor class.
	This method is related to the drive monitoring, so it is a good
	fit to be moved out of the Vm class.

	No intended changes in behaviour.

	virt: move ImprobableResizeRequestError
	Move ImprobableResizeRequestError from the vm.py to the drivemonitor.py
	module. This movement-only patch will allow to move more
	drive-monitoring related code into the drivemonitor.py module.

	vm: syncVolumeChain: de-entangle assignements
	Trivial refactoring to make further updates easier.
	We will need to skip meaningless updates of the devices configuration
	in the Engine XML flow.

2017-11-07  Fred Rolland  <frolland@redhat.com>

	storage: add ID to connection object
	In order to be able to test HSM connectStorageServer method,
	the ID of the connection from the engine is passed to the connection
	object when creating a connection.

2017-11-07  Francesco Romani  <fromani@redhat.com>

	vm: don't save legacy storage metadata
	We no longer need this.

	virt: persist drive replica in the metadata
	We should not store the drive replica in the vm.conf in the
	Engine XML flow. Let's use the domain metadata instead.

2017-11-07  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: remove deprecated option
	"unsecure" option is deprecated for a few months and
	not needed anymore.

2017-11-07  Francesco Romani  <fromani@redhat.com>

	vm: recreate disk device configuration from XML
	Engine wants to send only the domain XML.
	Unfortunately, we discovered some gaps in the implementation
	of some storage operations (live merge, and thus live storage migration),
	which are still heavily using the vm.conf data format.

	To move forward, we rebuild the vm.conf data from the engine XML,
	to present a sane environment to live merge.

	This patch is safe because we
	1. use anyway engine XML as source of truth, so we are duplicating
	   the same information
	2. we persist the data in the Engine XML

	more patches are in the pipeline to make the storage operations
	stop use the vm.conf data, so we can remove this one in the near
	future.

2017-11-06  Fred Rolland  <frolland@redhat.com>

	contrib: fix wiki URL in NFS check utility
	The URL of the NFS troubleshooting has changed.

2017-11-06  Petr Horáček  <phoracek@redhat.com>

	net: save mapping between networks and ovs bridges
	external_ids:ovn-bridge-mappings is used by OVN to map between network
	name and OVS bridge on which it is set on. In case OVN has a localnet port
	assigned to a network, this information is used to find the correct bridge
	for the creation of a patch.

	This information is always saved after setupNetworks of OVS networks.

	Please note that we do not cover this side effect in any current test.
	It should be covered by OVN related tests as system test. But we may want
	to add coverage internally as well.

2017-11-06  Dan Kenigsberg  <danken@redhat.com>

	py3: remove network/ipwrapper_test.py from blacklist
	The test TestUnicodeDrvinfo is still broken, though, so it is
	explicitly skipped on Python 3. It would be fixed only after we remove
	our prevalent assumptions that only strings (rather than geneic
	bytestreams) are passed to exec_cmd.

	py3: drop vmoperations and vm tests from blacklist

	py3: vmfakelib: do not MonkeyPatch a bound method

	py3: vm: use appendChild(element) instead of etree_element
	The minor modifications to vm.py are analogous to I60003e69702, needed
	to avoid failures such as the following ones:

	ERROR: test_onDeviceRemoved('dimm0', {'balloon'}) (virttests.vm_test.TestLibVirtCallbacks)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/vdsm.git/tests/testlib.py", line 143, in wrapper
	    return f(self, *args)
	  File "/vdsm.git/tests/virttests/vm_test.py", line 1649, in test_onDeviceRemoved
	    testvm.onDeviceRemoved(alias)
	  File "/vdsm.git/lib/vdsm/virt/vm.py", line 5777, in onDeviceRemoved
	    self._updateDomainDescriptor()
	  File "/vdsm.git/tests/vmfakelib.py", line 288, in _updateDomainDescriptor
	    fake._domain = DomainDescriptor(fake._buildDomainXML())
	  File "/vdsm.git/lib/vdsm/virt/vm.py", line 2185, in _buildDomainXML
	    return self._make_domain_xml()
	  File "/vdsm.git/lib/vdsm/virt/vm.py", line 2233, in _make_domain_xml
	    domxml._devices.appendChild(etree_element=dev)
	  File "/vdsm.git/lib/vdsm/virt/vmxml.py", line 367, in appendChild
	    append_child(self._elem, element, etree_element)
	  File "/vdsm.git/lib/vdsm/virt/vmxml.py", line 232, in append_child
	    element.append(etree_child)
	TypeError: append() argument must be xml.etree.ElementTree.Element, not Element

	ERROR: testSerialBios('serial', 'x86_64', True, True) (virttests.vm_test.TestVm)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/vdsm.git/tests/testlib.py", line 143, in wrapper
	    return f(self, *args)
	  File "/vdsm.git/tests/virttests/vm_test.py", line 343, in testSerialBios
	    dom_xml = fakevm._buildDomainXML()
	  File "/vdsm.git/lib/vdsm/virt/vm.py", line 2185, in _buildDomainXML
	    return self._make_domain_xml()
	  File "/vdsm.git/lib/vdsm/virt/vm.py", line 2238, in _make_domain_xml
	    domxml._devices.appendChild(etree_element=elem)
	  File "/vdsm.git/lib/vdsm/virt/vmxml.py", line 367, in appendChild
	    append_child(self._elem, element, etree_element)
	  File "/vdsm.git/lib/vdsm/virt/vmxml.py", line 232, in append_child
	    element.append(etree_child)
	TypeError: append() argument must be xml.etree.ElementTree.Element, not Element

	py3: vm: six.string_types is a portable way to catch all text types.

	py3: vm: use range instead of xrange
	range() works well in both Python 2 and Python 3, while its pricde in
	Python 2 is quite low for short lists.

	spec: fix vdsm-client dependencies
	vdsm-client uses code from vdsm-python, which in its turns uses
	subprocess32. This patch records these dependencies in spec

2017-11-06  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make sure Drive.path is not None for file devices
	Domain XML stored by libvirt and later delivered via _srcDomXML parameter on
	migrations may omit `file' attribute from `source' element of CD-ROM and
	similar devices if the file is an empty string.  When we attempt to read the
	attribute and put it to DOM structures, we must ensure the value is not None,
	otherwise DOM export will crash.

	This patch assigns empty string to `path' parameter when `file' attribute is
	missing in `source' element.

	Bug-Url: https://bugzilla.redhat.com/1507884

2017-11-06  Edward Haas  <edwardh@redhat.com>

	net: Adjust dhclient detection for IPv6 requests
	VDSM determines if a dhcp request is enabled on a network/device by
	parsing the dhclient arguments.

	It turns out that when the ifcfg initscripts executes dhclient for
	an IPv6 request, it appends the host name (-H option) at the tail of the
	arguments.
	VDSM has assumed up until this patch that the last argument is the
	device name and not another option. This patch attempts to detect the
	device by ignoring any options at the tail.

	Note: This solution does not cover cases where a flag ('-') is
	positioned just before the device.
	Example: sbin/dhclient ... -6 eth0

	build: Expose autogen.sh failures

2017-11-05  Edward Haas  <edwardh@redhat.com>

	net tests: Centralize the MTU tests to the a new mtu module
	Relocating two existing mtu functional tests to a new link_mtu_test
	module.

	MTU tests from the old functional tests will get relocated to this
	module in the following patches.

2017-11-05  Petr Horáček  <phoracek@redhat.com>

	net: report bridge 'opts' only in caps
	Gathering of bridge options is expensive operation and considerably
	slows down networks setup (we spend 20-40% of setupNetworks on it).

	However, 'opts' are not needed during the setup, so we could move it
	from netinfo to caps.

	With this change add of 250 networks takes 95s and nic change of
	250 networks 108s. Without this patch it used to be 124s and 220s.

2017-11-04  Dan Kenigsberg  <danken@redhat.com>

	py3: virt.libvirtxml: sort cpu for consistent response
	Iterating over keys() produces different outputs in Python 3, since
	Python is using a different hashing function. Let us explicitly sort the
	keys to have a consistent output.

	py3: virt.libvirtxml: use integer division in py3, too
	There is no sense in reporting 4.0 cores per socket.

	py3: osinfo: return version and release_name as unicode

	py3: yajsonrpc: port values()
	Suggested code creates a new list of current values both in Python 2 and
	Python 3.

2017-11-03  Ryan Barry  <rbarry@redhat.com>

	gencerts: use yesterday as the valid date for the CA cert
	Following the same pattern as certs for engine, use yesterday's
	date as the starting date for certificate validity, in case the
	local hardware clock is not UTC (or will otherwise be drift
	corrected).

	This was already done for vdsmcert, but the CA also needs it, or
	it will not be able to verify the chain.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1455441

2017-11-03  Edward Haas  <edwardh@redhat.com>

	net tests: Link is not stable when touching a bridge SB
	As part of test_create_network_and_reuse_existing_owned_bridge funtional
	test, the link stability is checked. It turns out that it is not stable
	on CI even with NM down.

	Further investigation is needed, the test is skipped for the time being.

2017-11-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Log the failed device in Vm._process_devices
	When there is a problem with a processed device, such as exception due to
	invalid DOM content, we would like to know which device has caused the
	problem.

2017-11-02  Edward Haas  <edwardh@redhat.com>

	automation: Add python-subprocess32 to check-merged
	The package exists in check-patch but not in check-merged.

2017-11-01  Edward Haas  <edwardh@redhat.com>

	net: When using an external bond, persist its mac address
	Bond devices may be created outside of VDSM and used by a network.
	In such cases, the bond is "acquired" by VDSM.
	The bond mac address is chosen based on the original creation tool/env.

	When VDSM takes over, the bond mac address may change, leaving the bond
	with a different mac address and thus potentially getting a different
	dynamic IP address.

	This patch preserves the mac address in such scenarios, attempting to
	avoid cases in which the bond mac address change when acquiring it.
	Upon the canonicalize stage, the bond type is detected and if it fits
	the criteria, its mac address (hwaddr) is preserved.

	net: Support bond mac address enforcement
	Enforcing a mac address on a bond device is now possible through the
	bond 'hwaddr' optional attribute (VDSM networking API).

	This patch handles the legacy networks (ifcfg based) setup.
	Support for OVS based networks will be introduced in a future patch.

2017-11-01  Dan Kenigsberg  <danken@redhat.com>

	cmdutils_test: test with subprocess32 rather than with CPopen
	We want to phase CPopen out, so let us not use it in these tests.

2017-11-01  Edward Haas  <edwardh@redhat.com>

	net: Bond objectivize should attempt to use setup bond attrs
	During the network objectivize step, if the network is based on a bond,
	the bond is objectize with values read from netinfo.

	With this patch, the bond objectivize is performed with bond attributes
	defined in the requested setup.
	If the bond was specified in the current setup transaction, its
	attributes are used directly, otherwise, the bond attributes are fetched
	from the running config (at canonicalize step).

2017-11-01  Dan Kenigsberg  <danken@redhat.com>

	py3: common/osutils_test: send bytes to os.write()

2017-11-01  Ala Hino  <ahino@redhat.com>

	blockSD: Rename _extendlock to metadata
	In commit 70b01ae1 (blockSD: Rename _extendlock), we renamed _extendlock
	to metadata_lock but didn't use the new name in reduceVolume.

	Bug-Url: https://bugzilla.redhat.com/1508560

2017-11-01  Petr Horáček  <phoracek@redhat.com>

	net test: check running bridge options against kernel
	Also fix _assertCustomBridgeOpts - we cannot call iteritems on
	a generator.

2017-11-01  Dan Kenigsberg  <danken@redhat.com>

	storage.operation: use subprocess32 instead of CPopen

	vdsm-tool register: add "register" to usage text
	Bug-Url: https://bugzilla.redhat.com/1501064

2017-11-01  Edward Haas  <edwardh@redhat.com>

	net: Canonicalize external bond when used by a network
	When a bond is already defined on the host, not through VDSM, a network
	over the bond can be defined without specifying the bond entity.

	This patch detects this setup configuration and adds the bond definition
	based on its current properties.

	net: Remove support for bond options custom switch type
	Bond switch type could have been specified through the bond options
	custom section. It was an intermediate option to allow the specification
	of the switch type to be inputted from Engine.
	As we no longer need this hack (having a dedicated attribute for it),
	this patch removes it.

2017-10-31  Francesco Romani  <fromani@redhat.com>

	virt: move enable flag into DriveMonitor
	Move the drive monitoring enable flag inside the DriveMonitor
	class, from the Vm class.

	virt: drivemonitor: set threshold on all drives
	We should set the block threshold on all the drives the DriveMonitor
	picks. The drivemonitor already picks suitable drives, so there
	is no need to do a further selection here.

	tests: simplify fake set_drive_size()
	The drive extension tests need to set the fake drive size.
	The current code is too pedantic; this patch simplifies it and
	adds a guard to make sure the test data is meaningful.

	spec: python-subprocess32 is a build dependency
	In the build stage, we create the API documentation
	(vdsm-api.html). To do so, we use one helper that
	uses vdsm code. If we lack python-subprocess32 at
	build time, we end up there:

	make[3]: Entering directory `/builddir/build/BUILD/vdsm-4.20.5/lib/vdsm/api'
	  Generate vdsm-api.html
	chmod u+w .
	PYTHONPATH=./../../:./../../vdsm \
		./schema_to_html.py vdsm-api.yml vdsm-api.html
	Traceback (most recent call last):
	  File "./schema_to_html.py", line 29, in <module>
	    from vdsm.api import vdsmapi
	  File "/builddir/build/BUILD/vdsm-4.20.5/lib/vdsm/api/vdsmapi.py", line 28, in <module>
	    from vdsm import utils
	  File "/builddir/build/BUILD/vdsm-4.20.5/lib/vdsm/utils.py", line 47, in <module>
	    from vdsm.common.compat import pickle
	  File "/builddir/build/BUILD/vdsm-4.20.5/lib/vdsm/common/compat.py", line 86, in <module>
	    import subprocess32 as subprocess
	ImportError: No module named subprocess32

	To fix this, we set python-subprocess32 as build time dependency.

2017-10-31  Tomáš Golembiovský  <tgolembi@redhat.com>

	supervdsm: mkimage: remove floppy if existing
	Under normal circumstances we clean leftover payload files when we
	destroy VM. Due to unclean host shutdowns and possibly bugs in VDSM an
	image may be left in the payload directory. This is problematic in case
	of floppy images that are created using mkfs.msdosfs because it refuses
	to overwrite existing image. Such image then blocks start of the VM and
	manual intervention from administrator is required.

	There appears to be no way to force mkfs.msdosfs to overwrite the
	existing image so we have to do the dirty job.

	Bug-Url: https://bugzilla.redhat.com/1506517

2017-10-31  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	stomp: calls are now blocking
	All calls wait a certain timeout if stomp connection is not
	available, allowing recovery time in case of a closed connection.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-10-31  Francesco Romani  <fromani@redhat.com>

	virt: normalize storage devices from XML
	Vdsm tracks the drive indexes per-bus, in order to be
	able to find a valid device name (from device interface and index)
	when a new disk is hotplugged.

	This tracking done when a VM is started using the old vm.conf format
	(oVirt <= 4.1), but not yet when a VM is started using the domain XML
	sent by the client.

	This leads to duplicate device names when a disk is hotplugged, which
	will make the operation fail.

	This patch makes sure that the internal tracking data structure is
	properly initialized even if a VM is started from the domain XML.

	tests: refactor virt_drivemonitor_test.py
	This patch refactors virt_drivemonitor_test.py to make
	room for the upcoming tests, and to reduce the code duplication.

2017-10-31  Petr Horáček  <phoracek@redhat.com>

	tests: explicitly create export dir
	In case check-patch.sh tests fail and we try to save vdsm logs to
	export dir we fail since the directory is not yet created.

2017-10-31  Dan Kenigsberg  <danken@redhat.com>

	storage/curl-img-wrap: do not mention CPopen in doc
	We intend to phase CPopen out.

	storage.check: use subprocess32 instead of CPopen

	v2v: use subprocess32

2017-10-30  Ala Hino  <ahino@redhat.com>

	qemuimg: Handle leaked clusters when running qemuimg check
	We use qemuimg check to get the volume offset in order to reduce its
	size to optimal. However, if the base volume have leaked clusters,
	qemuimg check return the info in stdout, but the return code is 3
	(our code expects 0 as the success return code). As the out is
	still returned even if there leaked clusters, in this patch we
	handle the error code and return the expected result.

	If leaked cluster found, following message is logged (message was cut
	for a nice representation):
	WARN [QemuImg] 223 leaked clusters found on the image

	Bug-Url: https://bugzilla.redhat.com/1502488

	blockSD: Rename _extendlock
	_extendlock is used is used to protect the metadata mapping, which may
	change either when lvs are created, removed, resized or when pvs are
	added, removed, resized, when using old storage domain versions.
	In this patch, we rename the lock to metadata_lock to better reflect its
	usage, and we declare it public as it will be used outside of this
	class, e.g. commit Ia9f823 (api: Implement reduceVolume verb).

	blockSD: move extendVolume to BlockStorageDomain
	extendVolume is an SPM operation and manifest objects should not be
	used to execute SPM operations. In this patch, we move extendVolume
	to the domain class. In addition, this change is symmetric to
	reduceVolume.

	tests: Add lvm argument to FakeSD
	This lvm argument will be used to implement extendVolume.

2017-10-30  Nir Soffer  <nsoffer@redhat.com>

	lvs-stats: Analyze sosreport lvm commands output
	This tool reads the lvs sos command output, and print a report about the
	found logical volumes.

	Here is an examle run:

	$ cd sosreport-hostname.*/sos_commands/lvm2
	$ lvs-stats < lvs_-a_-o_lv_tags_devices_--config_global_locking_type_0
	     #lv vg name                              #active  #open    #removed
	     355 475f3971-83e8-48d4-af55-957b84c5b42e       31       26        0
	     353 bb273403-5489-4306-bdae-636afdc2689b        6        1        0
	     349 ffc79d5c-ade4-4aa7-b29f-d18d0eb9ed47        6        1        0
	     349 eba89272-6603-440d-8662-579882e4c566        6        1        0
	     349 4b1948cb-8500-4155-834c-48a3b1e39abb        6        1        0
	     348 a09ec488-fc29-462f-9319-fd13d1335131        6        1        0
	     348 34c280f6-ea97-4ac1-af2e-241c83d106ad        6        1        0
	     325 a4f0eb6c-4904-41fc-b12b-84b053c98dc1        6        1        0
	     292 b6c183ce-a020-4442-b7d8-596c8cf042a9        6        1        0
	     283 5458edbd-1f29-4960-b67c-31644d53cac4        6        1        0
	     274 dacd9668-6ca6-4c60-bffa-1efecdfb3595        6        1        0
	     268 efb361c3-7cab-4601-a35f-f859c017ca11        6        1        0
	     254 9b5c609b-0165-412a-9bcb-05e9bd8f802d        6        1        0
	     242 3a5fb6b8-74b1-47c8-857f-aa3a799f8699       27       22        0
	     216 95231fba-5724-4063-8492-0866f4c74de8       31       26        0
	     200 a3ba1656-9567-4a6a-a939-e5ce0d2282f6        6        1        0
	     179 2711b96f-b7d3-4d1c-98a3-c12046496c97        6        1        0
	     163 e7ca2cca-94c2-45ef-ae12-a60d138c0faf        9        1        0
	     112 5696ccc8-d0cd-4d35-9e3b-30c214408213       18       13        0
	     104 a8a8d55f-d042-4f81-b8c2-cd676dacb214        6        1        0
	      78 203e766c-a3fe-4b80-abc8-f5217a16d787        6        1        0
	      62 b1bfa173-1748-4ae4-99b9-e6174528b03d        6        1        0
	      56 1ca68870-23b3-4f02-b185-9a469ad14a90        6        1        0
	       9 ef0b8570-f345-4187-9645-49ac484ffaba        6        1        0
	       9 9d7ed78c-ceb2-4cb4-a52c-28c21ba320cf        6        1        0
	       9 608a69c8-cf0b-49e3-a8b1-cd568e0b4e0c        6        1        0
	       8 0416631d-a0c5-4a9e-b5d7-bedce8c0e85e        6        0        0
	       4 HostVG                                      4        4        0
	       1 VG                                          0        0        0

	totals
	        lv:  5599
	    active:  252
	      open:  113

	Bug-Url: XXX

2017-10-30  Milan Zamazal  <mzamazal@redhat.com>

	virt: Always resume VMs paused due to ENOSPC
	We introduced conditional resume of a paused VM in previous patches.  However
	the resume shouldn't be conditional when we resume a VM stopped due to ENOSPC,
	i.e. when disk extension is in action.

	With this patch we revert the misplaced maybe_resume calls.  We call
	maybe_resume only in storage domain state change callback now.

	Bug-Url: https://bugzilla.redhat.com/1317450

2017-10-30  Francesco Romani  <fromani@redhat.com>

	virt: network: ensure 'vmid' parameter
	The network device objects should always have the 'vmid'
	attribute, from metadata. It was missing because of one
	overlook.

2017-10-30  Ala Hino  <ahino@redhat.com>

	vm: Format exception message
	A LookupError was raised with unused %s placeholder. Format
	the missing alias into the exception message properly.

	Example log:

	    Unable to find matching XML for device 'virtio-disk0'

2017-10-29  Roy Golan  <rgolan@redhat.com>

	core: Support gitreview
	git-review is a tool that helps submitting git branches to gerrit for review.

	- Free software: Apache license
	- Documentation: http://docs.openstack.org/infra/git-review/
	- Source: https://git.openstack.org/cgit/openstack-infra/git-review
	- Bugs: https://storyboard.openstack.org/#!/project/719

2017-10-28  Dan Kenigsberg  <danken@redhat.com>

	tests: move virt_drivemonitor_test.py to virttests

2017-10-27  Dan Kenigsberg  <danken@redhat.com>

	py3: vm: Exception.message no longer exists

	virt.vm: drop useless decode()
	In the anceint I8f12a6b5ac641686ad29dc17a9f214ee82b3b2cf we dropped vm
	name in favor of vmid for socket filenames. That had made decode()
	useless (and wrong when Python 3 is considered).

	spec: add subprocess32 as a runtime requirement
	I've been quite careless introducing the new dependency; I hope there is
	no other place I forgot to state it.

	automation: python-subprocess32 is needed by build-artifacts, too
	Without it, build-time import of vdsm.common.compat fails.

2017-10-26  Ala Hino  <ahino@redhat.com>

	live-merge: Don't teardown the top volume if libvirt block commit job fails
	In commit b7d2e153 (Live Merge: Teardown volume on HSM after live merge),
	we tore down the top volume in the live merge cleanup thread. However,
	the clean up thread runs also in cases where the block commit job
	fails, i.e. merge failed. In this case, we don't want to teardown the
	top volume.

	Bug-Url: https://bugzilla.redhat.com/1502352
	Bug-Url: https://bugzilla.redhat.com/1422670

2017-10-26  Dan Kenigsberg  <danken@redhat.com>

	cpopen: replace by subprocess32 on tests that do not need it

	common, network: use subprocess32 instead of cpopen
	cpopen is an oVirt-seeded project reimplementing Python 2's
	subprocess.Popen in a thread-safe manner. Years after its
	implementations, subprocess32 was introduced and has effectively become
	the standard safe implementation of Popen for Python 2. We prefer using
	a common standard over maintaining our own code.

	In this patch, we remove usage of cpopen from the common and network
	subsystems. We cannot do a universal blind replacement, because cpopen
	has added non-standard functionality that may be used in several
	locations.

	py3: drop vmmigration and vmrecovery from blacklist
	Python 3 was unhappy by vmfakelib's usage of lambda as bound methods as
	done by MonkeyPatch, exploding with the likes of

	Traceback (most recent call last):
	  File "vdsm.git/tests/testlib.py", line 143, in wrapper
	    return f(self, *args)
	  File "vdsm.git/tests/vmmigration_test.py", line 271, in test_migrate_from_status
	    res = testvm.migrate({})  # no params needed
	  File "<decorator-gen-3>", line 2, in migrate
	  File "vdsm.git/lib/vdsm/common/api.py", line 94, in method
	    return func(*args, **kwargs)
	  File "vdsm.git/lib/vdsm/virt/vm.py", line 1919, in migrate
	    self.send_status_event()
	TypeError: <lambda>() missing 1 required positional argument: '_'

	This patch places these assignements directly in the mocked Vm object.
	Minor tweaks were applied to recovery.py and vm.py in order to make the
	tests pass.
	Finally the dropped tesst modules can be moved to virttests, where they
	belong.

	Dockerfiles: add python-subprocess32
	A follow-up patch is going to add it as a Vdsm dependency. Let us start
	by preparing our Docker images to have it installed.

2017-10-25  Francesco Romani  <fromani@redhat.com>

	virt: tests: unify sampling_test.py
	We used to have tests/sampling_test.py and
	tests/virttest/sampling_test.py only because of the former contained
	some code incompatible with python3. It is no longer the case,
	so we can unify the two test modules.

	tests: move virt tests under virt subdirectory
	We have a bunch of virt tests under tests/ just because
	they are not python3 compatible; the tests in the virt-specific
	test subdirectory must run under python2 and python3.

	Now that some virt tests are been fixed to run under python3, move
	them under the virt subdirectory.

	Only code movement, no changes.

2017-10-25  Idan Shaby  <ishaby@redhat.com>

	imageio: add "transferred" and "active" fields to ImageTicketInfo
	This patch adds the "transferred" and "active" fields to ImageTicketInfo
	API.

2017-10-25  Francesco Romani  <fromani@redhat.com>

	virt: watermark: use the watermark flag
	Use the libvirt block threshold event to raise a flag signaling drives
	needing extension. This patch enables the watermark event consumption
	for the steady state, aka the simplest VM flow: a VM is run on thinp
	storage, and no other management operation is performed.

	Following patches will make sure the management operations like
	snapshot, live storage migration, live merge works well with the
	watermark event.

	Please note the usage of the watermark event is still disabled
	by default in the configuration.

	tests: drivemonitor: add tests for event support
	Add tests to exercise the drive monitoring with BLOCK_THRESHOLD event
	enabled

	Test-Only: yes

2017-10-24  Dan Kenigsberg  <danken@redhat.com>

	py3: drop several currently-passing tests from blacklist

	py3: drop vmsecret_test blacklist
	... after tiny fixes to the test code

	py3: drop sampling_test from blacklist

	py3: drop hugepages_test from blacklist

	py3: remove period_tests from blacklist
	In order to run period_tests under py3, this pach replaces 'unicode' in
	vdsm.storage.task with six.text_type, so that vdsm.storage.task is
	importable by Python 3.

2017-10-24  Francesco Romani  <fromani@redhat.com>

	vm: add support to force the resume behavior
	This patch extends Vm.maybe_resume() to accept
	the ResumeBehavior as optional parameter. If None is specified, the Vm
	setting received through the domain metadata will be used.

	This is useful because Vm.maybe_resume() may be called in the Vm internal
	flows, where stopping - or worse killing a VM may lead to very
	surprising behaviour.

	Related-To: https://bugzilla.redhat.com/1317450

	metadata: proper dump engine-provided payload
	The existing serialization code in the metadata.py module does
	not properly handle the case on which Engine sends the payload
	device content. This patch fixes that.

2017-10-24  Dan Kenigsberg  <danken@redhat.com>

	storage.task: reorder imports

2017-10-24  Francesco Romani  <fromani@redhat.com>

	virt: devices: add debug logs in device init flow
	Add more debug logs in the device initialization flow,
	to improve troubleshooting and to make it easier in
	the future to get rid of the legacy device initialization flow.

2017-10-23  Francesco Romani  <fromani@redhat.com>

	virt: config: initialize storage devices from XML
	Switch the default and make also the storage devices
	initialize themselves from the engine XML.

2017-10-23  Ala Hino  <ahino@redhat.com>

	reduce-vol: Add missing argument to sd.reduceVolume
	In commit 6fb9f94 (api: Implement reduceVolume verb), we added
	reduveVolume helper to sd.py, but we missed adding imgUUID argument to
	that helper. In this patch, we add the missing argument to the helper.

	Bug-Url: https://bugzilla.redhat.com/1505150

	tests: Add test for sd.reduceVolume
	Bug-Url: https://bugzilla.redhat.com/1505150

2017-10-23  Francesco Romani  <fromani@redhat.com>

	virt: storage: BLOCK_THRESHOLD support in Drive
	This patch adds another building block for the BLOCK_THRESHOLD
	event support.

	The storage.Drive class gains support for BLOCK_THRESHOLD event.
	This includes:
	- a new lock to guard changes to the 'threshold_state' and 'path'
	  attributes. This is because a path change (e.g. snapshot) invalidates
	  the threshold_state == SET for a drive, so we need to atomically check
	  both when changing either.
	- the on_block_threshold callback, to be invoked when the
	  BLOCK_THRESHOLD state is received.

	tests: drivemonitor: add simulate_extend_callback
	Add helper to simulate the drive extension callback,
	to avoid copy/pasting the same snippet over and over
	again.

	Test-Only: yes

	tests: prepare for DriveMonitor events test
	Change the existing drivemonitor test to make sure
	they run with events disabled, monkeypatching the configuration.

	Test-Only: yes

2017-10-23  Allon Mureinik  <amureini@redhat.com>

	spec: Require libvirt-python fix
	Bug 1496517 (solved for EL 7.4.z by bug 1497197) describes an issue
	where libvirt's python bindings do not properly release the GIL in
	virDomain.getMemoryStats and virDomain.diskErrors.
	If either of these methods are called on a VM that uses a disk placed
	on non-responsive storage, vdsm itself may get blocked.

	This patch requires libvirt-python-3.2.0-3.el7_4.1, which provides a
	fix for the aforementioned issue.

	Bug-Url: https://bugzilla.redhat.com/1505280

2017-10-22  Dan Kenigsberg  <danken@redhat.com>

	tests: netinfo_tests passes with python3

2017-10-21  Petr Horáček  <phoracek@redhat.com>

	net: remove unused argument keys from _bridge_options

2017-10-21  Edward Haas  <edwardh@redhat.com>

	net tests: Update the static bonding options defaults
	As part of the network tests, static bonding options defaults are
	included to allow the tests to execute where VDSM is not installed.

	With the introduction of Centos 7.4, the bond options changed,
	therefore the static bond options defaults needed to be updated.

2017-10-19  Edward Haas  <edwardh@redhat.com>

	net: Wait for link-up while query netinfo nic speed
	During the network caps data collection, a nic speed may be query while
	the link is still down (due to a previous setup action).
	A max of 2 seconds wait period is added, giving the links a chance to
	recover.

	On the first link that is detected as down, the 2sec period is
	initiated. This is an one per report wait period (and not per link).

	Bug-Url: https://bugzilla.redhat.com/980363

2017-10-18  Francesco Romani  <fromani@redhat.com>

	virt: storage: don't override index
	We take the drive index from drivename.split(), so no need
	to fetch it from the metadata.

	virt: handle payload device from vm.conf
	Add compatibility with old Engines which send payload device
	definition in the device dict's specParams.

2017-10-18  Irit Goihman  <igoihman@redhat.com>

	asyncClient: save all requests before reconnecting
	All pending 'SEND' requests are deleted after client is reconnected.
	In order to avoid this situation and manage to complete client requests,
	all 'SEND' commands are saved and will be restored after connection is
	healthy again.

	Bug-Url: https://bugzilla.redhat.com/1376843

	stomp: implement client reconnect
	After enabling incoming heartbeats in AsyncDispatcher,
	an implementation of handle_timeout is presented in the
	client side also.
	In the client side we wish to reconnect when we stop receiving
	incoming heartbeats according to a retry policy which defines
	number of tries and the timeout we wish to wait.
	In order to make sure incoming heartbeats are received and we won't
	close the socket before getting them, we add grace period for incoming
	heartbeats and reduce the outgoing heartbeats interval in order to make
	sure the outgoing heartbeats are received in server side.
	By default, number of retries after timeout is 1 to ensure fast
	recovery.

	Bug-Url: https://bugzilla.redhat.com/1376843

	AsyncDispatcher: add handle_error
	So far handle_error method wasn't implemented in AsyncDispatcher
	and communication errors were ignored.
	After seeing some communication errors left unhandled I've decided
	to implement this method.
	In case of error, handle_timeout will be called.

	Bug-Url: https://bugzilla.redhat.com/1376843

	AsyncDispatcher: next_check_val reflects reconnect timeout
	Client should attempt reconnecting on a connection timeout for a number
	of times and wait a certain amount of time between retries.
	In order to support the reconnect timeout, next_check_val will also
	check reconnect interval. In case the reconnect is enabled and timeout
	has passed, next_check_val will trigger asyncore loop.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-10-17  Fred Rolland  <frolland@redhat.com>

	storage: rename HSM method
	In order to be able to override the method '__prefetchDomains'
	in HSM for testing purpose, the method is renamed with only one
	leading underscore.

2017-10-17  Francesco Romani  <fromani@redhat.com>

	virt: metadata: handle payload devices
	Engine should send the payload information in the per-device
	metadata, like in the following example:

	  <ovirt-vm:device devtype="disk" name="hdd">
	    <ovirt-vm:payload>
	      <ovirt-vm:volId>config-1</ovirt-vm:volId>
	      <ovirt-vm:file path='openstack/content/0000'>AAA</ovirt-vm:file>
	      <ovirt-vm:file path='openstack/latest/meta_data.json'>BBB</ovirt-vm:file>
	      <ovirt-vm:file path='openstack/latest/user_data'>CCC</ovirt-vm:file>
	    </ovirt-vm:payload>
	  </ovirt-vm:device>

	This patch implement the Vdsm side, in order to properly
	consume this data.

2017-10-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove old code that was required by spice server
	This chmod code was added as part of 
	https://bugzilla.redhat.com/show_bug.cgi?id=503022

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260747

2017-10-17  Francesco Romani  <fromani@redhat.com>

	virt: sampling: explicitely select the stats type
	Explicitely select the subset of bulk stats Vdsm cares about.
	Previously, we used the default "0", meaning "everything".

	This works, but requests data we don't care about (e.g. perf stats),
	possibly adding unneeded load on libvirtd.

2017-10-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding libvirt_sasl_isconfigured test
	This test checks if isconfigured works as expected. for latest libvirt
	configure, the isconfigured should check for specific string in the
	sasl2 conf file. The test validates that.

2017-10-17  Edward Haas  <edwardh@redhat.com>

	net tests: Replace testSetupNetworksAddNetworkToNicAfterBondResizing
	Replace testSetupNetworksAddNetworkToNicAfterBondResizing by adding a
	new test under the new functional tests:
	test_given_bonded_net_transfer_one_slave_to_new_net
	and adding a link stability check in the test_change_bond_slaves test.

	net tests: Use parametrize_bridged in net_with_bond_test

	net tests: Relocate under-the-bridge test to the new func tests
	testSetupNetworksDeletesTheBridgeOnlyWhenItIsReconfigured test has been
	replaced with test_create_network_and_reuse_existing_owned_bridge which
	creates a network over an existing bridge (by replacing a network
	southbound nic).
	The new tests is monitoring the bridge state while the edit is
	performed, expecting it not go down.

	Note: This test frequently fails randomly, suspecting NM as the main
	reason.

	net tests: Relocate testSetupNetworksConvertVlanNetBridgeness
	Relocate testSetupNetworksConvertVlanNetBridgeness to the new functional
	tests.

	net tests: Relocate testDelNetworkWithMTU to the new func tests

	net tests: Refactor net_basic_test and use parametrize_bridged

2017-10-17  Irit Goihman  <igoihman@redhat.com>

	betterAsyncore: add modified create_socket
	changed dispatcher.create_socket method to support creating
	an SSL socket and AF_UNSPEC family.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-10-17  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix constant name
	CHUNK_SIZE is in bytes, remove the confusing _GB.

	drivemonitor: Improve documentation
	Mainly change the docstring to match the code, and some minor cleanups.

2017-10-16  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	tests: always close the client
	We need to make sure that after the tests are done we close the client
	properly so resources used by the client are released.

2017-10-16  Edward Haas  <edwardh@redhat.com>

	net: An unowned existing bridge should be ignored
	The ifcfg configurator supports the ability to reuse an existing bridge
	without tearing it down. However, an unowned bridge (either with an ifcfg
	file or without) should not be considered for this case, as it may require
	redefinition.

	And old functional test (testSetupNetworksOverExistingBridge) was used
	to check a scenario where a bridge existed without an ifcfg file,
	however, the test was broken and never really created the bridge.
	This patch relocated the test under the new functional tests and fixes
	the production code to ignore unowned bridges.

	net tests: Relocate testReorderBondingOptions to the new func tests
	The tests has mainly verified that if the mode is specified last in
	the bond options, it is still handled first (the other options may
	have no meaning before the mode switch).

	In addition, the original test used named values in the bond options,
	which requires special normalization in the tests assertion.
	(name to numeric translation)

	The network part of the original test has been removed, as it only
	relates to bonds.

2017-10-16  Allon Mureinik  <amureini@redhat.com>

	lvm: Add stderr to CannotCreateLogicalVolume
	When a creation of a logical volume (LV) fails an exception is raised,
	as expected, but this exception isn't very useful unfortunately.
	While it includes the IDs required to identify the failed LV creation,
	it doesn't contain any information about the error that occurred.

	This patch adds the stderr output to the exception so it can be
	logged.

	Related-To: https://bugzilla.redhat.com/1497931

2017-10-16  Nir Soffer  <nsoffer@redhat.com>

	multipath: Document vdsm defaults
	Document vdsm settings in /etc/multipath.conf. This should help
	customers and vendors to adapt oVirt multipath.conf as needed.

	multipath: Remove stale comment
	The comment about Fedora 21 is not relevant for long time.

2017-10-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Change to Exception level from RuntimeError when treating logger conf
	While reading logger conf with wrong format or some other issues, it raises
	exception from type Exception (see code of ConfigParser)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1502206

2017-10-14  Petr Horáček  <phoracek@redhat.com>

	network: detect default route only once per caps get
	network.api.network_caps() call on a host with 51 networks takes
	0.09s with this patch, 0.11 without it.

2017-10-13  Edward Haas  <edwardh@redhat.com>

	net tests: Relocate testSetupNetworksDelOneOfBondNets
	Relocate testSetupNetworksDelOneOfBondNets to the new functional
	tests.
	MTU assertion has been added to support it (under netfunctestlib).

	Note: MTU modification and bond stability is not supported with OVS
	switches, therefore marked as xfail.

	net tests: Relocate testSetupNetworksAddOverExistingBond
	Relocate testSetupNetworksAddOverExistingBond to the new functional
	tests.

	Note: Bond stability is not supported with OVS and therefore marked as
	xfail.

2017-10-13  Francesco Romani  <fromani@redhat.com>

	virt: powerdown: fix qemuGuestAgent usage
	The Vm.qemuGuestAgent* helpers correctly raise exceptions
	on failure, instead of reporting errors using the response module.
	This is correct because the creation of responses belongs to the API
	layer, not to the application layer.

	Unfortunately, the clients in the vmpowerdown module were not updated,
	expecting responses as return value.

	This patch fixes the vmpowerdown module to catch the exceptions
	in case of failures, and act accordingly.

	Bug-Url: https://bugzilla.redhat.com/1487064

	virt: make hasSpice work with Engine XML
	With this patch, Vm.hasSpice reports the correct value
	also when the Vm is created with Engine XML.

2017-10-12  Francesco Romani  <fromani@redhat.com>

	virt: tests: add test for hasSpice with Engine XML
	Add test to demonstrate that Vm.hasSpice produces the
	wrong result when the VM is created with Engine XML.

	Test-Only: yes

	vm: fix Vm.get_balloon_info
	At steady state, we will have exactly one balloon device,
	one 'real' one if Engine asked Vdsm so, or one bogus otherwise.

	Unfortunately, this is not true while the VM is starting up.
	Nothing prevents the getStats() flow to be called in this case,
	and if so it will fail, emitting one scary and unneeded stacktrace
	in the logs.

	This patch makes Vm.get_balloon_info() behave correctly when we
	have no Balloon Devices.

2017-10-12  Milan Zamazal  <mzamazal@redhat.com>

	virt: Kill VMs paused for too long
	If a VM is paused due to an I/O error for a defined interval and its
	auto-resume setting is `kill', it should be killed rather than resumed.  The
	interval is set similar to sanlock lease expiration interval, 80s.  It needs to
	be more than 0 to tolerate short time hiccups and must not be longer than time
	it takes Engine to move VM to Unknown status, which would trigger a restart
	elsewhere (~5 minutes).

	Bug-Url: https://bugzilla.redhat.com/1317450

	virt: Initialize safe_to_force in Vm._destroyVm
	If gracefulAttempts == 0, the variable is read uninitialized, resulting in
	crash.  This can happen e.g. when calling Vm.destroy(gracefulAttempts=0).

	virt: Track pause time
	We would like to kill, depending on autoResume setting in metadata, VMs that
	are paused due to an I/O error for too long time.  In order to be able to do
	that, we must track the time when the VM was paused.  This patch implements the
	tracking and storing it to metadata.

	Bug-Url: https://bugzilla.redhat.com/1317450

	virt: Auto-resume VMs only conditionally
	When a VM experiences an I/O error, it gets paused.  Once the problem is gone,
	Vdsm may resume the VM automatically.  This is however not always desirable, so
	we make this behavior configurable.  Engine can set auto-resume behavior in
	metadata `resumeBehavior' item now, to one of the following values:

	- auto_resume: The VM is resumed.
	- leave_paused: The VM will remain paused.
	- kill: The VM will be killed if it is stopped for too long; otherwise it is
	  resumed.

	If the setting is not present, we keep the current behavior, i.e. the VM is
	resumed.

	This patch implements only `auto_resume' and `leave_paused' cases, `kill' will
	be implemented in next patches.

	Bug-Url: https://bugzilla.redhat.com/1317450

2017-10-12  Francesco Romani  <fromani@redhat.com>

	hooking: python3: read/write bytes, not strings
	To make the hooks python3 ready, let's use byte I/O on the domxml temporary
	file, instead of default mode.
	This will not break backward compatibility because we had explicit
	{en,de}coding step anyway, and because python2 makes no difference
	between string and bytes.

2017-10-12  Petr Horáček  <phoracek@redhat.com>

	tests: save logs from unit/integrations tests

2017-10-12  Francesco Romani  <fromani@redhat.com>

	virt: metadata: improved debuggability
	In order to make it easier to follow the updates to
	the metadata, add debug log lines.

2017-10-11  Francesco Romani  <fromani@redhat.com>

	vm: device configuration may be missing
	Actually, it should be missing when we will fully
	switch to the Engine-XML flow, so fix the code
	to not require it anymore, but use only if present.

2017-10-11  Milan Zamazal  <mzamazal@redhat.com>

	tests: Fix of ResourceExhausted module name

2017-10-11  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	virt: Fix s390x default machine
	The s390x default machine identifier was mistyped, leading
	to a failure creating a minimal machine.

2017-10-10  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	files removal
	Both files were pushed together with revert. None of those file should
	be part of vdsm source tree.

2017-10-10  Edward Haas  <edwardh@redhat.com>

	net tests: Refactor functional test test_detach_used_bond_from_bridge

2017-10-09  Francesco Romani  <fromani@redhat.com>

	virt: sampling: rename field for clarity
	Change the ill-name stats_flags to stats_types:
	this argument express the bulk stats types we want in output,
	and not the flags we give to the call:

	"""
	Help on method getAllDomainStats in module libvirt:

	getAllDomainStats(self, stats=0, flags=0)
	    method of libvirt.virConnect instance
	    Query statistics for all domains on a given connection.
	"""

	Here we always used the (also poorly named) `stats' argument,
	and never the `flags' argument.

2017-10-08  Edward Haas  <edwardh@redhat.com>

	net tests: Relocate testSetupNetworksAddDelDhcp to the new func tests

2017-10-07  Petr Horáček  <phoracek@redhat.com>

	net: log warning when cannot read nic speed
	Replace logging.exception with logging.warning to log failure to
	read speed of a nic. With the current state we spam vdsm log with
	long traceback and ERROR each time we try to get speed of dummy
	device.

	virt: trick OVS display network
	A libvirt network with type="bridge" and bridge="ovs_nb_interface"
	can be used as a network for libvirt graphics with autodetected IP
	address. Note that this network won't be usable for VM interfaces
	since it is not a real bridge.

	By doing this trick we can get rid of some special handling of
	IP resolution and part of migration hook.

	Bug-Url: https://bugzilla.redhat.com/1400952

2017-10-07  Edward Haas  <edwardh@redhat.com>

	net tests: Include in netfunctestlib gateway and IPv6 assertions
	The tests dnsmasq server now serve the route (always) and the asserts
	assume it.

	This patch is part of an effort to move the dynamic IP functional tests
	from the previous format to the newer.

2017-10-05  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	revert client reconnect
	By accident I pushed the patches to the head instead of for the master.

	client reconnect

2017-10-05  Irit Goihman  <igoihman@redhat.com>

	stomp: calls are now blocking
	All calls wait a certain timeout if stomp connection is not
	available, allowing recovery time in case of a closed connection.

	stomp: implement client reconnect
	After enabling incoming heartbeats in AsyncDispatcher,
	an implementation of handle_timeout is presented in the
	client side also.
	In the client side we wish to reconnect when we stop receiving
	incoming heartbeats according to a retry policy which defines
	number of tries and the timeout we wish to wait.
	In order to make sure incoming heartbeats are received and we won't
	close the socket before getting them, we add grace period for incoming
	heartbeats and reduce the outgoing heartbeats interval in order to make
	sure the outgoing heartbeats are received in server side.
	By default, number of retries after timeout is 1 to ensure fast recovery.

	Bug-Url: https://bugzilla.redhat.com/1376843

	AsyncDispatcher: add handle_error

	AsyncDispatcher: next_check_val reflects reconnect timeout
	Client should attempt reconnecting on a connection timeout for a number
	of times and wait a certain amount of time between retries.
	In order to support the reconnect timeout, next_check_val will also
	check reconnect interval. In case the reconnect is enabled and timeout has
	passed, next_check_val will return 0 and trigger asyncore loop.

	betterAsyncore: add modified create_socket
	changed dispatcher.create_socket method to support creating
	an SSL socket and AF_UNSPEC family.

2017-10-04  Francesco Romani  <fromani@redhat.com>

	virt: metadata: preserve deeply-nested metadata
	The metadata module initially didn't plan to support more than
	one level than nesting. It was not supported, for example, to
	store data structure (list or dicts), only plain data like
	strings or numbers.

	This limitation was artificial and intentional, to discourage
	the consumers to abuse the metadata, and to discourage bloat in
	this area.

	The need to support storage drives configuration changed the
	landscape, so support for deeply nested data structure was added.
	A number of places assumed no nesting, and not everyone was fixed.
	This patch fixes the remaining places and adds a test to cover
	the last one we are aware of.

	Please note that even though we plan to deprecate the support
	for storage device in metadata, the payload devices will be
	kept in the metadata, and they will likely require some
	deeper nesting.

2017-10-04  Edward Haas  <edwardh@redhat.com>

	net tests: Rename dhclient_test module to dynamic_ip_test

	net tests: Simplify TestNetworkStaticIpBasic using parametrize
	Introducing parametrize_bridged and parametrize_ip_families and using
	them in the TestNetworkStaticIpBasic test group to reduce overhead.

	net: Handle netlink.monitor deadlock when the scan thread fails
	An unexpected crash of the scan thread (which reads netlink messages and
	passes them to the caller) may cause a deadlock on the blocking
	queue.get.

	Such exceptions are not handled and the calling thread is informed in
	order to reraise its own exception.

	net: Structure the event message in netlink.monitor
	netlink.monitor is using events to communicate between a netlink
	message listener thread (scan) and the caller.

	This patch structures the event message to include type and data,
	allowing it to be interpreted in an unified manner.

2017-10-03  Edward Haas  <edwardh@redhat.com>

	net: Report bond (virtual) speed through net caps
	According to https://bugzilla.redhat.com/show_bug.cgi?id=1464055#c15
	Engine is not storing bond speed when provided in getVdsStats.
	Providing it through caps as done for the nics seems reasonable.

	spec: Fix kernel dependency (removing trailing arch)
	58ebca9 introduced a dependency on a newer kernel version, however it
	included the kernel arch.

	When trying to install vdsm on a host that has kernel
	version = 3.10.0-693.2.1.el7, the installation fails because from RPM
	perspective 3.10.0-693.2.1.el7 < 3.10.0-693.2.1.el7.x86.64.
	Nevertheless, the version of the 'kernel' package doesn't include the
	'x86_64' suffix.

	The error doesn't occur in check-merged since the kernel version in the
	centos7.4 image is greater than 3.10.0-693.2.1.el7.

2017-10-03  Francesco Romani  <fromani@redhat.com>

	virt: devices: use diskType attribute
	We should use the public diskType attribute when setting up
	the storage.Drive type.

	virt: test: no explicit index in metadata
	With the introduction of drivename.split(), we don't need this
	anymore, and it could hide real bugs; better to get rid of it.

2017-10-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Handling fatal fail in supervdsm when log conf is invalid
	Copying same treatment we use in vdsmd.py when we have a fail in loading
	logging conf. Currently implementation tried to use stdout and it fails
	when running as systemd service. See bugzilla for more details.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1216880

2017-10-03  Francesco Romani  <fromani@redhat.com>

	virt: watermark: introduce the drivemonitor module
	This patch introduces the drivemonitor code, which
	will hold all the logic needed to set and clear
	the block threshold for drives, and the code
	to handle the block threshold events.

	The next patches will build on top of this code
	to use and consume the libvirt BLOCK_THRESHOLD event.

2017-10-03  Denis Chaplygin  <dchaplyg@redhat.com>

	caps: Added VM CPU architecture reporting.
	Engine need to know host architecture during VM import process.

	Bug-Url: https://bugzilla.redhat.com/1425863

2017-10-03  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	faqemu: update machines for fedora
	During my hook testing I noticed that faqemu is not working with my
	fedora 25. I listed machines by using `qemu-kvm -machine help` and
	updated after_get_caps.py after which I saw a vm up and running.

	Here is the issue I saw without this change:
	libvirtError: internal error: process exited while connecting to
	monitor: 2017-08-21T08:06:36.057757Z qemu-system-x86_64: -machine
	pc-i440fx-rhel7.3.0,accel=tcg,usb=off,dump-guest-core=off: unsupported
	machine type

2017-10-02  Dan Kenigsberg  <danken@redhat.com>

	net: nic: speed: drop infiniband speed hack
	EL-7.4 kernels do not need it, as they report the correct speed for
	InfiniBand devices.

2017-10-02  Edward Haas  <edwardh@redhat.com>

	net: Exclude nic speed info from netinfo and add it to netcaps only
	NIC speed information was part of netinfo report, which is frequently
	used during the setup flows.
	As the speed is not required during the setup flow and has value only in
	the network capability report, speed is no longer part of netinfo.

	The NIC speed info is now added only as part of netcaps.

	net: Extract vlan speed handling to link.vlan module
	Reading a vlan speed has been relocated to link.vlan module.
	Small refactoring has been applied to use existing tools.

	net: Extract bond speed handling to link.bond.speed module
	Reading a bond speed has been relocated to link.bond.speed module.

	net: Extract nic speed handling to link.nic module
	Reading a nic speed has been relocated to link.nic module and its
	handling has been refactored a bit to fit existing tools.

	The new link.nic module is aimed to handle physical interfaces
	operations that the common iface module is missing.

	Bug-Url: https://bugzilla.redhat.com/980363

2017-10-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Refine expected failures on travis
	Only the raw tests fail on travis because we get a file system which
	does not support sparseness. Add a customized xfail for this issue and
	use it to mark only the test that fail on travis.

	qcow2: Support compressed qcow2 uploads
	If a compressed qcow2 image is uploaded, copying the image to block
	storage is likely to fail, because we used the source image size for
	allocating the destination image.

	This patch enables qcow2 source image in qcow2.estimate_size() and use
	it to estimate the destination file size when copying qcow2 image to
	another storage domain.

	Bug-Url: https://bugzilla.redhat.com/1470435

2017-10-02  Francesco Romani  <fromani@redhat.com>

	virt: metadata: don't try to decode not-leaf elems
	Up until now, the metadata.Metadata.load() happily tried to
	decode all subelements of the given one. This is one old design
	decision, when nested elements where not yet fully embraced.

	When the clear need for nested elements arised, the upper layer
	code (e.g. device metadata or custom metadata handling code)
	explicitely descended in the elements which are known to be nested,
	overriding anything the decoder could have been done.

2017-10-01  Tal Nisan  <tnisan@redhat.com>

	spec: Update libvirt and libvirt-python requirements
	Require Libvirt >= libvirt-3.2.0-14.el7_4.2 to solve a live merge bug
	(1461303) and high watermark bug (1470127) this version is needed since
	in RHEL 7.4 Libvirt broke live merge when the redetect of backing chain
	after snapshot was removed (see https://bugzilla.redhat.com/1461303)

	Bug-Url: https://bugzilla.redhat.com/1464002

2017-10-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Change syslog logger format
	This patches modifies the logger to use for standard format for syslog print.
	The logs should be printed in the format:

	"vdsm[1234]: ERROR VDSM failed to load logger conf"

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1471727

2017-10-01  Francesco Romani  <fromani@redhat.com>

	tests: virt: correct faking of ClientIF
	Some tests in vm_test.py need a not-None vm.cif object.
	The code took a shortcut and used "self" as value for vm.cif,
	which is obviously wrong in all but the most trivial scenarios.

	The easy fix is to just use fake.ClientIF().

2017-10-01  Edward Haas  <edwardh@redhat.com>

	net tests: Fix block on ip address deletion
	Commit c37e8a8 added a blocking IP address deletion in the test but has
	not waited for the specific event to occur.

	This patch waits only for 'del_addr' events.

	net: Drop _wait_for_ipaddr_event

2017-09-29  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	test: s390-specific libvirt tests
	Added a s390-specific testcase for libvirt domcapabilities.
	Extended the caps_test with an s390 example.

2017-09-28  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	cpuinfo: Fix outstanding style issues
	The initial commit had some style issues, mainly about usage
	of the regular expression module, variable naming and comment
	indentation. Fixed by this change.

	machinetype: initial CPU model support
	For s390 the CPU models are reported by QEMU and not read from
	a cpumap.xml file. Use the getDomainCapabilities function to
	retrieve the supported CPU models for the host.

2017-09-27  Edward Haas  <edwardh@redhat.com>

	net: Increase netlink socket buffer size to 512KB
	By default, nl socket is using a buffer of 32KB.
	When multiple links exists, this buffer size is insufficient.

	This patch increases the buffer size to 512KB.

	Bug-Url: https://bugzilla.redhat.com/1466628

2017-09-27  Francesco Romani  <fromani@redhat.com>

	virt: storage: use 'devtype' as matching attribute
	The metadata handling code needs some attributes
	to match a device instance with its metadata.
	Storage devices used the (type, name) tuple, but
	the "type" attribute clash with the type hint the
	generic metadata code uses.

	We switch to the (devtype, name) tuple to avoid this clash.
	The 'name' attribute alone is sufficient to uniquely match
	a device, but we keep the newly renamed 'devtype' attribute
	to make the code more future-proof.

	This bug didn't surface before because was hidden by another
	bug[1], and because we overlooked a quirk in how the ElementTree
	parser works, that furterly prevented this bug to emerge[2]

	[1]: https://gerrit.ovirt.org/#/c/82288/
	[2]: see the tests of [1] to learn about the quirk

2017-09-27  Edward Haas  <edwardh@redhat.com>

	automation: Update lago host image to el7.4

2017-09-27  Francesco Romani  <fromani@redhat.com>

	virt: metadata: better error message
	Give more context in the error raised when the metadata
	code fails to decode one element.

	docs: document thin provisioning support
	Add documentation about how thin provisioning support works up to oVirt
	4.2, and how we do want to improve it for 4.2, consuming the libvirt
	block threshold event.

	Documentation-Only: yes

2017-09-27  Dominik Holler  <dholler@redhat.com>

	net: Treat OID as optional
	lldpad driver does not expect the optional object identifier of
	the Management Address TLV in lldpad's lldptool output anymore,
	because lldptool suppresses the of output the object identifier
	if it is empty.

	Bug-Url: https://bugzilla.redhat.com/1494921

2017-09-27  Ryan Barry  <rbarry@redhat.com>

	gencerts: use yesterday as the valid date for the certificate
	Following the same pattern as certs for engine, use yesterday's
	date as the starting date for certificate validity, in case the
	local hardware clock is not UTC (or will otherwise be drift
	corrected).

	Even though we recommend ntp/chrony, it's possible that this will
	not always be done before vdsm-tool configure, so it's better to
	be safe.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1474213

2017-09-27  Tomáš Golembiovský  <tgolembi@redhat.com>

	virt: use OGA memmory stats if balloon stats are unavailable
	If statistics from balloon driver are not available for some reason, we
	should use statistics from ovirt-guest-agent (if those are available).

	virt: replace page fault counter stat
	This change deprecates the 'pageflt' counter, representing total number
	of page faults, and adds new counter 'minflts', representing number of
	minor page faults. Together with the existing counter for major page
	faults, the two are able to replace the 'pageflt' counter.

	The counter for total number of page faults does not exist by itself and
	VDSM (or the guest agent before) has to compute the value from the sum
	of major and minor page faults. Later, MOM performs the subtraction of
	major page faults to again recover the count of minor page faults.
	Having the separate counters for major and minor page faults removes the
	need for this redundant arithmetic exercise.

	virt: gather memory statistics from balloon driver
	Change reporting of memory statistics. We take the statistics from
	balloon driver and prefer them over ovirt-guest-agent. We use
	ovirt-guest-agent only for statistics that cannot be yet supplied by
	balloon drivar. Notably mem_buffered and mem_caches.

	virt: deprecate some memory statistics
	Deprecate some memory statistics returned by ovirt-guest-agent. The
	rationale is that we plan to switch gathering of statistics from
	ovirt-guest-agent to balloon driver memory statistics and not all values
	can be reported that way.

	swap_total, swap_usage: these stats can be happily removed right away
	without breaking Engine or MOM.

	mem_buffers, mem_cached: these stats are marked as deprected but we will
	still stend them (if OGA is installed in guest) because they are part of
	Engine REST API. The plan is to get the values properly via balloon
	driver. If we succeed in doing that we can drop the deprecation. If not,
	we'll have to deprecate the values in REST API too.

	Finaly, there is the 'mem_free' stat which is problematic. It cannot be
	removed now because both Engine and MOM code slightly depends on it and
	have to be patched before we can remove the stat completely. For Linux
	VMs it used to contain sum:

	       mem_unused + mem_buffers + mem_cached

	For now the stat will return same value as mem_unused which is just the
	free memory without any reclaimable memory included.

2017-09-27  Francesco Romani  <fromani@redhat.com>

	lib: make base26.encode() work like Linux
	This patch changes the implementation of
	base26.encode() to behave like the linux kernel.

	The original implementation of base26.encode() uses
	a different algorithm than the Linux kernel.
	Thus, the names Vdsm produces are "wrong", meaning
	that, past the 26-th disk device, they are different
	from the one Linux uses.

	This breaks the assertion that
	device == drivename.make(*drivename.split(device))

	but other than that is expected to have near zero-impact
	on existing VMs.
	The only possible source of troubles is if we migrate
	one VM from buggy Vdsm to fixed Vdsm. If the VM has a very
	complex disk configurations with holes in the sequence,
	(e.g. 27 disks attached, #28 hotunplugged, #29 attached),
	it is theoretically possible that hotunplug will fail
	because the new base26 code will pick a correct but conflicting
	device name, depending on the device index.

	But the only drawback would be hotplug fail, and a trivial
	workaround (in one already extreme scenario) is just to pick
	a different bus (e.g. SCSI vs virtio).

	vm: skip readonly drives in getChunkedDrives()
	Strictly speaking, a readonly chunked drive makes sense and it
	is a supported configuration. But we use (and we should use)
	Vm.getChunkedDrives() only in the drive extensions flow,
	and in this flow we don't care about readonly drives - those are
	obviously never extended online.

	Thus, this patch makes getChunkedDrives() skip readonly drives.

2017-09-26  Daniel Erez  <derez@redhat.com>

	hsm: Allow upload of images with backing file
	Instead of raising an error when the volume has a backing file,
	verify that the image backing file matches vdsm metadata.

	verify_untrusted_image will fail now when:
	- image backing file does not match the volume parent volume uuid
	- image does not have backing file, but volume has a parent volume uuid
	- image have a backing file but volume parrent volume uuid is blank

2017-09-26  Idan Shaby  <ishaby@redhat.com>

	imageio: add API to get a ticket from imageio daemon
	This patch adds an API, get_image_ticket, to retrieve an imageio ticket
	from the daemon given a ticket ID.

	Related-To: https://bugzilla.redhat.com/1484060

2017-09-26  Adam Litke  <alitke@redhat.com>

	fileSD: Gracefully handle purgeImage delete race
	When deleting file-based images we first call deleteImage to mark the
	image for deletion (by renaming the directory with a known prefix).  We
	complete the deletion by calling purgeImage which first removes the
	contents of the deleted image directory and then the directory itself.

	If the sdCache is invalidated between the calls to deleteImage and
	purgeImage, then the FileSD.imageGarbageCollector method will be invoked
	when the FileSD is recreated.  This will remove the deleted image
	directory early.  In this case, purgeImage is failing when the directory
	cannot be deleted.

	We already gracefully handle missing volume files by logging a warning.
	We should do the same when the directory itself is missing.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1342550

2017-09-26  Edward Haas  <edwardh@redhat.com>

	automation: Remove lago ovirt serve usage
	Upon lago ovirt deploy execution, a local repo is created for the deploy
	stage (removed when the deploy finishes).
	As the functional tests do not install any package (through yum/dnf),
	there is no need to raise a serve service.

	net tests: Block on ip address deletion (for max of 0.5sec)
	IP address deletion is executed in an async manner and recent test runs
	failed randomly when checking that the address is missing right after the
	deletion.
	This patch adds a blocking wrapper to the deletion action, waiting up to
	0.5sec for an event to be detected after the action.

2017-09-26  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	virt: use meaningful defaults for s390 domains
	s390 doesn't have USB devices, therefore no input device is added in
	this case. Further, virtual CD ROM/DVD devices must have a bus type
	of SCSI. And the default machine type for s390 libvirt domains is
	s390-ccw-virtio and has to be set by VDSM.

	numa: report memory stats even without NUMA
	If libvirt is built without numactl support, it will report a "fake"
	single cell numa topology. However it will fail to report node memory
	statistics for the numa cell 0 with an error message.

	This prevents ovirt-engine from correctly displaying the host's status.

	To work around this issue, memory statistics for a single cell host
	are retrieved for the entire host which works even without numactl
	support. The behavior doesn't change.

	network: add support for TUNSETIFF ioctl on s390
	The code calling the TUNSETIFF ioctl was only supporting
	ppc and x86, but didn't account for s390.

	osinfo: identify s390 nested virtualization caps
	The KVM module is called kvm on s390, so this has been added for
	the list of modules to be looked up.

	cpuinfo: added s390-specific parsing
	The /proc/cpuinfo parsing didn't understand the format of this
	file on the s390 platform and thus didn't return model string,
	features or frequency.

2017-09-25  Andrej Krejcir  <akrejcir@redhat.com>

	mom: Do not use GuestQemuProc mom collector
	The data collected by the collector is not used anywhere.
	And the collector needs PID of the VM, which
	is no longer reported by the VDSM.

	Bug-Url: https://bugzilla.redhat.com/1454633

2017-09-25  Francesco Romani  <fromani@redhat.com>

	vm: make Vm._chunkedDrives() public
	We will need the _chunkedDrives() helper in the new block_threshold
	events flow, so this patch makes it public, and trivially renames
	getChunkedDrives() for consistency.

	vm: make Vm._findDriveByName public
	Will be needed by the disk extension flow based on block
	threshold event from libvirt. Trivial rename only.

	vm: doc: add docstring for Vm._vmDependentInit
	Document when the method is called, and what it does.

2017-09-25  Petr Horáček  <phoracek@redhat.com>

	api: ping2 and confirmConnectivity
	In order not to perform confirm_connectivity() side effect during ping
	verb, we split its functionality into ping2 and confirmConnectivity.

	The reason for this change is not to accidentaly confirm connectivity
	by other ping verb users from localhost.

2017-09-25  Nir Soffer  <nsoffer@redhat.com>

	spec: Require sanlock 3.5
	Sanlock 3.5 provides some enhancements that we like to use:

	- 64502df sanlock: set open files limit to 2048
	  see bug 1435966

	- 8a564c2 sanlock: add man page info about renewal history
	  Useful for users/support

	- b79bd2a (github/master) python: Use error description in SanlockException
	  Allows vdsm to log meaningful errors

	- c8ce851 sanlock: add strerror function
	  Allows libvirt to return meaningful errors from sanlock

	- ed4504a python: Support resource clearing
	- 64026d2 sanlock: write lease with clear flag
	  Allows vdsm to clear external leases

	- fa70eff Add option to log UTC timestamps
	  Allows vdsm to use UTC timestamps for sanlock logs

	- 8a7764f Add size option to sanlock direct dump
	  Required for support

	This version will be available in EL 7.4.

	Relates-to: https://bugzilla.redhat.com/1443140

2017-09-22  Milan Zamazal  <mzamazal@redhat.com>

	virt: Save disk metadata once devices are prepared
	Once disks are prepared we should save their metadata as soon as possible to
	not lose that configuration on contingent Vdsm restart or crash.  Since the VM
	is not set up or running yet, we create the most simplistic VM domain to store
	the metadata too.  It is going to be updated later on real VM start.

	A notable case is incoming migration, where the domain may not be yet available
	at the time metadata is stored.  So for incoming migrations we store metadata
	only after we attach to the domain.

	This patch restores disk data saving, through a different mechanism, that used
	to be performed when recovery files were used.

2017-09-22  Tomáš Golembiovský  <tgolembi@redhat.com>

	daemonAdapter: Add config option for LIBVIRT_DEBUG
	When troubleshooting problems with libvirt it is sometimes beneficial to
	enable libvirt debug messages. We already control LIBVIRT_LOG_FILTERS
	and LIBVIRT_LOG_OUTPUTS, adding also LIBVIRT_DEBUG only completes the
	set.

	Configuration option is added that controls setting of LIBVIRT_DEBUG.
	This environemnt variable controls printing of client side libvirt
	messages. The meaningful values are:

	 * 1 or "debug": asking the library to log every message emitted,
	   though the filters can be used to avoid filling up the output
	 * 2 or "info": log all non-debugging information
	 * 3 or "warn": log warnings and errors, that's the default value
	 * 4 or "error": log only error messages

	Setting LIBVIRT_DEBUG= is the same as unset. If you specify an invalid
	value, it will be ignored with a warning.

2017-09-22  Francesco Romani  <fromani@redhat.com>

	vm: prepare hugepages outside _buildDomainXML
	Move the hugepages preparation outside the Vm._buildDomainXML method.
	The rationale is
	1. make sure hugepages are set correctly in both legacy and domain XML
	flows; Engine needs to send the custom properties to let Vdsm do the
	preparation, but besides that Vdsm will trust the XML received by
	Engine.
	2. The hugepages preparation doesn't really belong in
	Vm._buildDomainXML.

	Bug-Url: https://bugzilla.redhat.com/1481246

2017-09-22  Tomáš Golembiovský  <tgolembi@redhat.com>

	api: clarify documentation string for counters
	The documentation string was misleading. What guest agent always
	reported is the average per second.

2017-09-22  Petr Kotas  <pkotas@redhat.com>

	Adress remarks from #79840

2017-09-22  Viktor Mihajlovski  <mihajlov@linux.vnet.ibm.com>

	arch: add s390 as a supported architecture
	Note that s390 is used as a common denomination for the IBM mainframe
	architecture, whereas s390x specifically identifies the 64-bit hardware.

2017-09-21  Nir Soffer  <nsoffer@redhat.com>

	tests: blivet is broken also in Fedora 28
	Fedora rawhide version is now 28; update the tests that skipped on 27 to
	skip also on 28.

	travis: Remove the fedora 25 build
	The Fedora 25 build is failing since commit 82f735d7393d (virt: Remove
	old libvirt compatibility from migration.ongoing) and we require now
	Fedora 26 in master.

2017-09-19  Idan Shaby  <ishaby@redhat.com>

	imageio: add filename to the ImageTicket API

	imageio: return the response of imagetickets.request
	imagetickets.request executes an HTTP request but doesn't return the
	response.
	This patch makes it return the response so that callers can read not
	only the return status, but also the return body in case it's a GET
	request.

	imageio: don't read response if content_length = 0

	imageio: Fix body encoding
	This patch encodes the body of the http requests that are sent to the
	daemon in order to be compatible with Python3.

	imageio: expect bytes as http response type
	imagetickets_test uses a FakeResponse object to mock the http response
	that vdsm gets from the daemon.
	Since reading from an http socket results in bytes and not unicode,
	there's no reason to work with unicode in the test infrastructure.
	Therefore, this patch changes the type of the data field of the
	FakeResponse object to be bytes rather than unicode.

	In imageticket.py._read_content, this patch decodes the response using
	utf8, what makes it compatible with Python3.

2017-09-19  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: Removing testSetupNetworksNicless.
	testSetupNetworksNicless is essentially a test that
	covers the creation of a bridged nicless network with stp.

	This test is already covered in bridge_test
	("test_add_bridge_with_stp"), and the nicless checks are already
	covered in net_basic_test ("test_add_bridged_net_missing_sb_device")

	net: tests: Introducing bridge creation with stp.
	Introducing a functional tests that creates a bridge
	with stp. Also introducing a new module dedicated for
	bridge tests.

	net: tests: assert stp status in assertBridgeOpts

2017-09-19  Francesco Romani  <fromani@redhat.com>

	virt: vm: process storage devices separately
	Now that we have all the tools, we can implement
	the two-phase storage device processing, including
	the hook processing.

	virt: storage: disable from_xml_tree
	When using the engine XML flow, the storage device need
	special two-phase processing, because their parameters
	need to be updated on per-host basis.

	For pratical purposes, we do this setup after the parsing
	of the XML snippet (augmented with metadata) to restore
	the storage.Drive params, but before to create the
	storage.Drive instance; this way we complicate the
	flow a bit, but we minimize the overall changes[1].

	This patch prepares the path disabling the Drive.from_xml_tree
	method, to make sure storage devices are not processed
	twice.

	+++

	[1] The setup code include two major steps: path preparation
	and the running of the hooks after the image has been prepared.
	Both stages expect to deal with update exposing the dict interface,
	which storage.Drive implements only partially.
	Since this ambiguity between object interface (obj.foo vs obj['foo'])
	is already confusing, I prefer to differentiate the storage
	device processing a bit.

2017-09-19  Petr Horáček  <phoracek@redhat.com>

	network: remove vlan directly if not a top device
	In case vlan is not a top device of a network we can remove it
	directly via `ip link delete` instead of calling `ifdown` on it.
	This is possible because of it does not keep any L3 configuration
	that would need a cleanup.

	Time spent on setupNetworks call of 51 networks:
	         add  edit  remove
	master:  47s  44s   28s
	patched: 47s  33s   17s

2017-09-19  Francesco Romani  <fromani@redhat.com>

	virt: storage: function to get the storage params
	For historical reasons, the storage devices needs
	special processing on per-host basis. We cannot
	easily avoid that, so we set up them from engine XML
	in two stages instead of in one go, differently from
	each other device class.

	To implement that, we need one helper function to
	extract all the storage device parameters from the
	engine XML, to use them a little later to do per-host
	setup.

	This patch adds that function.

	virt: storage: use name,type to match metadata
	We already identify the drive metadata using the (name,type) pair,
	there is no real need to change this when we look for Engine-provided
	metadata. This patch fixes that before Engine starts to send metadata.

2017-09-19  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: kvm2ovirt: add config option for buffer size
	Add new config option that modifies the buffer size used by kvm2ovirt
	when donwloading data from source libvirt. The default value that we had
	does not work with older versions of libvirt. This allows users to
	change the buffer size when necessary.

	Bug-Url: https://bugzilla.redhat.com/1448913

2017-09-19  Francesco Romani  <fromani@redhat.com>

	virt: device: extract helper methods
	Extract helper methods to iterate over all the device elements
	and to get the per-device metadata belonging to a given device
	element.

	Only code movement, no intended change in behaviour.

	virt: do not override devices
	Storage device used to not support the XML-based initialization.
	We added a safety net to fetch them from the old vm.conf
	but this is not needed anymore, and it is actually hiding bugs for
	the Engine-XML flow.

	We already have a conditional to fully enable the engine-XML flow,
	but this hunk was no included by mistake. This patch fixes that.

	virt: vmdevices: allow to import storagexml

2017-09-18  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: use pytest assertions in netfunctestlib
	Use pytest's detailed assertions over python's default ones in
	netfunctestlib. This is necessary in order to display disparities
	in inner assertions in netfunctestlib while running tests.

2017-09-18  Idan Shaby  <ishaby@redhat.com>

	imageio: imagetickets.request cleanup
	This patch extracts the parsing of the response in imagetickets.request
	to another method to make it more readable.

2017-09-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Remove no longer valid comment from device removal

	virt: Remove old libvirt compatibility from migration.ongoing

	virt: Remove transient domain support for legacy libvirt
	We had to support transient domains due to a problem in older libvirt versions.
	We can always use persistent domains with current libvirt.

2017-09-18  Francesco Romani  <fromani@redhat.com>

	virt: API: move api.logged from vm to API.py
	Using the @api.logged decorator in our API.py module
	leads to a cleaner architecture and to slightly cleaner logs,
	especially true for the VM.create case, which has misleading
	log for the START.

	We also change the logger name from "vdsm.api" to "api.{virt,host}",
	depending on the specific API being decorated.
	The reason for this change is that the original logger name was
	too generic and not really well designed in the first place.

	virt: tests: enhance test for OVS NIC with engine XML
	Fix the exiting test to demonstrate the expected behaviour
	and to better reflect how Vdsm works.

	Add a new test to check the XML-intialization flow.

	Bug-Url: https://bugzilla.redhat.com/1483309

2017-09-18  Petr Kotas  <pkotas@redhat.com>

	virt: service: Gracefuly shutdown running VMs
	The graceful shutdown has been implemented via
	libvirt 'libvirt-guests' service. To make this
	work the following has been done:

	- the conflict in vdsmd.service with
	  libvirt-guests has been removed, as it is
	  no longer an issue (verified)

	- when shutting down, the vdsm waits for
	  engine to clear the VMs, delay is set
	  for 5 second which is the default and
	  fallback set
	  The time can be set in /etc/vdsm.conf
	  by timeout_engine_clear_vms integer option

	- the setup introduced by this commit is
	  non intrusive
	  the libvirt-guests by default still remains
	  disabled and stopped
	  the libvirt-guests by default configuration
	  cannot connect to the libvirt, because they
	  do not have proper connection string, therefore
	  they can't touch the running VMs in any way

	Bug-Url: https://bugzilla.redhat.com/1334982

2017-09-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't call destroy on destination after failed migration
	When a migration fails, the source host calls destroy on the destination host.
	That's not necessary, since libvirt destroys the VM itself (and the call
	swallows any exception).  Handling several destroy calls on the destination
	used to be buggy and has been fixed.  Destroy on the migration destination
	should be invoked only by libvirt or Engine, that's enough.

	This patch removes the superfluous destroy call from the migration source.

2017-09-17  Ala Hino  <ahino@redhat.com>

	Revert "sos-plugin: Introduce collectLVMCommand helper"
	This reverts commit 7c60bbed6a62a805e985ddba369062a0684f6adb.

	We found that when lvm command returns nothing, addStringAsFile fails.
	We will use the existing collectCmdOutput, adding the new lvm config.

	sos-plugin: Add lvm configuration when executing lvm commands
	Add lvm configuration when executing lvm command to gather information.
	This is important because, for example, lvmetada could be enabled and we
	want to disable it when creating the sos report, in addition and as
	recommended, the user can define devices filter and we want to override
	that filter to get all relevant devices.
	In this patch we provide the following lvm config:

	    global {
	        locking_type = 0
	        use_lvmetad = 0
	    }

	    devices {
	        preferred_names = [ '^/dev/mapper/' ]
	        ignore_suspended_devices = 1
	        write_cache_state = 0
	        disable_after_error_count = 3
	        filter = [ 'a|^/dev/mapper/.*|', 'r|.*|' ]
	    }

	Bug-Url: https://bugzilla.redhat.com/1474566

2017-09-17  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Improve logging when creating socket
	Log the host, port and discovered socket parameters to make it easier to
	diagnose issues in the field, for example, unsupported ipv6.

	Example log:

	2017-09-12 19:25:22,484 DEBUG (MainThread) [vds.MultiProtocolAcceptor]
	Creating socket (host='::1', port=0, family=10, socketype=1, proto=6)
	(protocoldetector:225)

	tests: Mark IPv6 tests broken on travis
	IPV6 is not available now in the travis environment[1], failing tests
	trying to use IPv6 features. Mark these tests broken on travis instead
	of skipping them, so they will fail on oVirt CI if someone break IPv6
	there.

	[1] https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future#ipv6-no-longer-present

	tests: Use IPv4 address if IPv6 is not enabled
	IPV6 is not available now in the travis environment[1], failing tests
	trying to bind to "[::1]:0".

	[1] https://blog.travis-ci.com/2015-11-27-moving-to-a-more-elastic-future#ipv6-no-longer-present

2017-09-16  Milan Zamazal  <mzamazal@redhat.com>

	automation: Add automation for Fedora 26

2017-09-15  Francesco Romani  <fromani@redhat.com>

	virt: devices: storage: add from_xml_tree
	Make it possible to initialize a Drive device from its
	XML representation.

	lib: detect invalid index in drivename.make
	Properly raise ValueError if given invalid (< 0) index
	instead of silently swallowing it.

2017-09-15  Dan Kenigsberg  <danken@redhat.com>

	spec: use glob to blindly collect all network modules
	There is no real benefit in introducing each new file into the spec.
	Having it in git (and sometimes in Makefile.am) is (more than) enough.

	check-patch.repos: move with the times
	I do not recall why
	http://mirror.centos.org/centos/7/virt/x86_64/ovirt-4.0/ is needed, but
	it no longer exist. Let us move with the time, hopefully fixing the
	currently-failing check-merged job.

2017-09-15  Francesco Romani  <fromani@redhat.com>

	virt: avoid stacktrace in __afterVolumeExtension
	The Vm.__afterVolumeExtension callback tries to resume
	a Vm once a thin-provisioned volume has been extended.
	In the expected common case, this action is proactive,
	so the Vm wasn't actually paused.

	Fix the error handling to avoid emitting scary and
	meaningless stacktraces if the Vm was not paused.

2017-09-15  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: allow import of disk with type='volume'
	Currently we support only import of disks with type either 'file' or
	'block'. In libvirt, it is possible to have a disk with type='volume' in
	which case the name of the storage pool and volume name are then
	supplied in domain XML.

	This is mostly useful for KVM source. Theoreticaly it could be also used
	with Xen sources. But we support Xen only on RHEL5 and 'volume' type is
	not available there (libvirt is too old).

	Bug-Url: https://bugzilla.redhat.com/1469077

	kvm2ovirt: change storage types to volume and path
	Change how we pass source disks to kvm2ovirt. Instead of making the
	distinction based on the disk type -- file vs. block device --
	differentiate between the methods we use to access the disk, i.e. volume
	in storage pool vs. local path.

	As previously with 'file' and 'block' methods the new methods 'path' and
	'volume' are mutualy exclusive. For 'path' we expect path to the disk
	file or block device. For 'volume' we pass libvirt volume key (which is
	basicaly also path).

2017-09-15  Tomas Jelinek  <tjelinek@redhat.com>

	vm: make guaranteed memory hot-settable
	The hotplug memory now takes a new optional parameter: the memGuaranteedSize.

	If set, it sets this value to the _mem_guaranteed_size_mb.

	Bug-Url: https://bugzilla.redhat.com/1430491

2017-09-15  Francesco Romani  <fromani@redhat.com>

	virt: dump executor state when ResourceExhausted
	This patch make Vdsm log the executor state (aka the TaskQueue content)
	once we reach the task limit. We do so to improve troubleshooting and
	debuggability.

	Bug-Url: https://bugzilla.redhat.com/1490810
	Backport-To: 4.1

2017-09-14  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: allow import of disks not in storage pool
	It should be possible to import also disks that are not in libvirt
	storage pool. Previously we required that all local disks
	(<disk type='file' ...>) exist in some storage pool. This requirement is
	unjustified and having no storage pools at all is completely valid use
	case.

	The only exception is Xen source where virDomainGetBlockInfo() is not
	implemented.

	Bug-Url: https://bugzilla.redhat.com/1468944

2017-09-14  Francesco Romani  <fromani@redhat.com>

	virt: storage: add the drivename module
	Move storage.makeName and storage.splitName into the
	new `drivename' module, and update all the code to use it.

	The rationale for this patch is
	1. allow the upcoming storagexml.py module (needed by the Engine XML
	   flow) to use the splitName functions avoid cyclic dependencies.
	2. shed some weight from vmdevices/storage.py

	Only code movement + trivial rename.

2017-09-14  Ala Hino  <ahino@redhat.com>

	Revert "sos-plugin: Add lvm configuration when executing lvm commands"
	This reverts commit b96c89f632402e69e01dea2db1256e5650f9c2f8.

	We found that when lvm command returns nothing, addStringAsFile fails.
	We will add a check to handle empty results.

2017-09-14  Tomáš Golembiovský  <tgolembi@redhat.com>

	tests: v2v: improve disk related checks
	Our approach to testing various disk types (file vs. block device) and
	access methods was rather shaky. This change is trying to stir things in
	better direction. It allows us to have better control of what disk type
	a VM has and theoreticaly also test situation when a VM has both types
	of disk (for which we don't have any real test yet).

2017-09-14  Francesco Romani  <fromani@redhat.com>

	virt: storage: add splitName
	splitName is the reverse of makeName.
	It will be needed in the Engine XML flow.

	This patch adds comprehensive test data,
	generated using the same algorithm (actually
	the very same function) of the linux kernel 4.12.9 -
	see the `sd_format_disk_name` function in the file
	http://elixir.free-electrons.com/linux/latest/source/drivers/scsi/sd.c#L3155

	lib: add docs and make encode() more readable
	This patch enhances base26.encode() fixing the variable
	name - from 'devindex' to 'value' for consistency with the incoming
	decode() counterpart, and adds the missing docstring.

2017-09-14  Milan Zamazal  <mzamazal@redhat.com>

	API: Don't log tracebacks on non-existent VMs
	When a Vdsm operation is requested on a VM that doesn't exist, we log an
	exception with a traceback.  This pollutes Vdsm log with tracebacks even in
	some regular operations such as powering off a VM, see the referenced bug.

	Calling an operation on a VM that doesn't exist is not a Vdsm error and the
	traceback produced in API.py is useless.  So let's mark that exception as
	expected.

	Bug-Url: https://bugzilla.redhat.com/1478712

2017-09-14  Francesco Romani  <fromani@redhat.com>

	virt: storage: introduce the base26 module
	Linux names the device using their base26-encoded drive
	number. For example, on any given bus (SCSI, virtio...)
	the 0th device name is 'a', the 1st is 'b', and so
	forth up to 'zzz' - this limit is in the kernel code.

	This patch extracts the base26 encoding code - currently
	broken, see https://gerrit.ovirt.org/#/c/81128/ and moves
	it into the newly introduced 'base26.py' module to
	improve the readability and to make room to the decoding
	code, which will be added by the followup patch.

	Only code movement, no changes.

2017-09-13  Ala Hino  <ahino@redhat.com>

	sos-plugin: Add lvm configuration when executing lvm commands
	Add lvm configuration when executing lvm command to gather information.
	This is important because, for example, lvmetada could be enabled and we
	want to disable it when creating the sos report, in addition and as
	recommended, the user can define devices filter and we want to override
	that filter to get all relevant devices.
	In this patch we provide the following lvm config:

	    global {
	        locking_type = 0
	        use_lvmetad = 0
	    }

	    devices {
	        preferred_names = [ '^/dev/mapper/' ]
	        ignore_suspended_devices = 1
	        write_cache_state = 0
	        disable_after_error_count = 3
	        filter = [ 'a|^/dev/mapper/.*|', 'r|.*|' ]
	    }

	Bug-Url: https://bugzilla.redhat.com/1474566

	api: Implement reduceVolume verb
	Bug-Url: https://bugzilla.redhat.com/1168327

	lvm: Add support to force reduce LV
	In live merge we need to force reducing the LV because of the active
	volume. In this patch, we introduce a flag to indicate whether to force
	LV reduce.

	Bug-Url: https://bugzilla.redhat.com/1168327

	api: Introduce reduceVolume verb
	reduceVolume will be used to reduce volumes to optimal size. Main usage
	of this verb is after live/cold merge.

	Bug-Url: https://bugzilla.redhat.com/1168327

2017-09-13  Francesco Romani  <fromani@redhat.com>

	tests: virt: add test for VMFEX XML initialization
	Add a test to check the behaviour with one VMFEX device.
	Since the real work is done by the vdsm hook, this test
	only checks that the device initializes what it can,
	and ignores what it doesn't know about.

2017-09-12  Nir Soffer  <nsoffer@redhat.com>

	yajsonrpc: Fix python 3.6 compatibility
	Python 3.6 changed json.loads() to use keyword only arguments, breaking
	some calls in yajsonrpc. Fix the calls to use keyword style.

	The tests are failing on python 3.6 since commit 464a1d6f96cb (rpc:
	propagate executor issue to the engine) with this error:

	    Traceback (most recent call last):
	      File "/vdsm/lib/yajsonrpc/__init__.py", line 107, in decode
	        obj = json.loads(msg, 'utf-8')
	    TypeError: loads() takes 1 positional argument but 2 were given

	See https://www.python.org/dev/peps/pep-3102/

2017-09-12  Milan Zamazal  <mzamazal@redhat.com>

	recovery: Ignore external VMs in DOWN status
	Those VMs are generally uninteresting and displaying them could be more
	confusing than useful.

	virt: Update domain descriptor only for connected domains in _startUnderlyingVm
	Otherwise _updateDomainDescriptor will crash, typically when recovering domains
	in DOWN status.

	recovery: Set basic VM parameters on recovery
	Some basic VM parameters are not required for VMs Engine is aware of.  But when
	there is a recovered domain unknown to Engine, or an external domain, then
	Engine looks at those VM properties and produces failures if they are not
	available.

	Bug-Url: https://bugzilla.redhat.com/1488416

	recovery: Remove invalid parentheses from logging calls

2017-09-11  Nir Soffer  <nsoffer@redhat.com>

	tests: Change fake_dd to succeed
	The fake_dd helper was returning zero exit code but it was not returning
	any stats, causing delay() to raise. Fix by writing dd-like stats to
	stderr.

2017-09-11  Francesco Romani  <fromani@redhat.com>

	virt: storage: ensure proper 'readonly' attribute
	Make sure that the 'readonly' attribute is always present, and it
	is always a proper boolean - and not, say, a string like 'true'.

2017-09-10  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	test: cleanup run_test pythonpath
	We removed client directory some time ago and there is no need to have
	it in pythonpath.

2017-09-09  Dan Kenigsberg  <danken@redhat.com>

	fix multiline strings
	remove internal spaces

2017-09-07  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	rpc: propagate executor issue to the engine
	When we fail with executor being busy so it could not accept more tasks
	we want to reply with specific error so the engine could react properly
	and it and perform an action like soft fencing.

	Bug-Url: https://bugzilla.redhat.com/1433380

2017-09-06  Edward Haas  <edwardh@redhat.com>

	net: Use the iface interface directly

	net: Provide iface list function and type detection under link.iface
	List system links using iface.list() and enable the detection of the
	link type.

2017-09-06  Petr Horáček  <phoracek@redhat.com>

	network: skip ifdown if bridge does not exist
	Until now we called ifdown during setup of a bridge even when
	it did not exist. That led to performance drop during setup of
	high number of new networks.

	With this patch we don't call ifdown if a bridge is not found
	in the system.

	Setup of 26 new bridged networks without this patch takes
	15 seconds, with this patch it only takes 5.

2017-09-05  Dan Kenigsberg  <danken@redhat.com>

	require selinux-policy that allows vdsm:lldpad communication
	Until the needed selinux-policy policy is available on CentOS, we make
	the dependency explit only on RHEL.

2017-09-05  Arik Hadas  <ahadas@redhat.com>

	virt: consume custom properties of nics from engine xml
	Set the custom properties defined in the metadata section of the
	engine XML into the Interface device class. This is needed
	particularly to enable calls to VDSM hooks.

	Bug-Url: https://bugzilla.redhat.com/1483309

2017-09-04  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Revert "Enabled selinux boolean virt_use_glusterd for glusterd"
	This reverts commit 66a62fa05b0108b816bf88092325b462de05380c.

	After fetching the latest master today I (and Petr) saw that vdsm is not
	able to start due to: KeyError: 'virt_use_glusterd'. This revert fixes
	the issue.

2017-09-04  Dominik Holler  <dholler@redhat.com>

	net: Fail early on initialization of LLDP
	If LLDP is detected as not active, the initialization of LLDP
	is not continued.
	This has the advantage that there is no further time spent on
	the initialization of LLDP, if LLDP is not working properly.

2017-09-03  Dominik Holler  <dholler@redhat.com>

	Avoid calling netinfo() during initialization
	Replace the call to vdsm.netswitch.configurator.netinfo()
	during initialization by vdsm.network.ipwrapper.getLinks(),
	because the former relies on initialization itself.

	This change avoids enabling lldp on DPDK interfaces.

	Bug-Url: https://bugzilla.redhat.com/1487157

2017-09-01  godas  <godas@redhat.com>

	Enabled selinux boolean virt_use_glusterd for glusterd
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1458257

2017-09-01  Francesco Romani  <fromani@redhat.com>

	virt: devices: tunable to disable the XML refresh
	Some device classes may or may not need to refresh the XML configuration
	that Engine sends. Add a tunable to easily enable/disable XML refresh on
	a per-device-class basis.

	This tunable is under the `devel' section, and should be used when tuning
	the Engine XML support. Should never be used in production environment
	(as any other in the `devel' section), and we may likely go away as soon
	as we have a stabilized the engine XML flow.

	virt: add tunable to disable legacy configuration
	The storage devices are the most complex devices to be properly
	configured, so when switching to domain XML, we agreed to let them
	still use the vm.conf dictionary for the setup.

	Furthermore, in order to use the domain XML for the recovery,
	the storage devices require a lot of data to be added to the metadata.

	To move forward, we add a new tunable, disabled by default, to
	enable the storage devices to use the domain XML and the fewest
	possible metadata to configure themselves, much like the rest of the
	devices.

	This will allow testing of the full domain XML flow while Vdsm
	still keep working as usual.

2017-09-01  Leon Goldberg  <lgoldber@redhat.com>

	net: Use ip link over brctl on bridge removal.
	brctl doesn't remove bridges that are still up which
	currently may cause OST failures when a dhcp server
	takes too long to respond.

	Use a more modern flavor in ip link which removes
	devices regardless of their state.

2017-09-01  Dan Kenigsberg  <danken@redhat.com>

	Eliminate vdsm/Makefile.am and its containing dir
	The current content of vdsm/Makefile.am has nothing to do with the vdsm
	directory, since the latter is all but empty. This patch moves the
	creation of general directories into static/Makefile.am instead, and
	lets us finally eliminate the vdsm subdirectory.

	improve hook debugability
	When executing a hook script, log its name and return code, on top of
	its stderr.

2017-09-01  Francesco Romani  <fromani@redhat.com>

	virt: metadata: per-device custom properties
	The per-device metadata section of the domain XML
	contains any device data which doesn't properly fit
	elsewhere in the domain XML. This include oVirt-specific
	data.

	Except for storage devices, this section is flat, with
	no nesting allowed. This is because the metadata is
	supposed to be used sparingly, because most if not all
	the configuration a domain may need should find its place
	in the domain XML proper.

	Unfortunately, the custom properties badly fit in this
	assumption. The device custom properties are a bunch of
	key-value pairs, and the the network subsystem makes heavy
	use of them, partially because key functionality is implemented
	in hooks, which in turn require (or are activated by) per-device
	custom properties.

	To better fit this case, we allow one nested section
	in the per-device metadata, called "custom", to hold
	the key-value custom properties. No further nesting is allowed.
	Engine can trivially translate the old custom properties
	to the new XML format, and with this patch Vdsm can consume
	them - and also encode them should the need arise.

	Example:

	  <metadata>
	    <ovirt-vm:vm>
	      <ovirt-vm:device mac_address='${MAC}'>
	        <ovirt-vm:custom>
	          <ovirt-vm:vnic_id>${UUID}</ovirt-vm:vnic_id>
		  <ovirt-vm:provider_type>EXTERNAL_NETWORK</ovirt-vm:provider_type>
	        </ovirt-vm:custom>
	      </ovirt-vm:device>
	    </ovirt-vm:vm>

	This patch also addresses the attached BZ.
	In the attached BZ, the problem is that the hooks are not triggered,
	because in the domain XML flow that field is not populated, because
	Vdsm doesn't know where to look for the per-device custom properties[1].

	Please note that in order to fix the attached BZ, Engine must also
	encode the device custom properties in the metadata section, and
	send them in the domain XML.

	+++

	[1] Vdsm already parse some well-known XML fields to populate some
	custom properties when the mapping is not ambiguous, like 'queues',
	but none is relevant on this case.

	Bug-Url: https://bugzilla.redhat.com/1483309

2017-08-31  Leon Goldberg  <lgoldber@redhat.com>

	net: Introducing ipwrapper.IPRoute2NoDeviceError
	Introducing a specific variation of IPRoute2Error for
	operations on missing devices.

2017-08-31  Dominik Holler  <dholler@redhat.com>

	Fix dependency to lldpad
	Declare supervdsmd.service wants lldpad.service, instead of
	vdsmd.service, because supervdsmd communicates with lldpad.

	Bug-Url: https://bugzilla.redhat.com/1487078

2017-08-31  Milan Zamazal  <mzamazal@redhat.com>

	virt: Destroy libvirt domain when destroying incoming migration
	When Destroy is called on migration destination we just set the VM to Down
	status and don't destroy the libvirt domain.  It's OK in typical cases since
	the migration is canceled on the source and the domain is terminated by
	libvirt.

	But there is at least one situation where it's not sufficient.  When Engine
	loses connection to the source host during migration and wants to cancel the
	migration it calls Destroy on the destination host.  Then the VM is removed
	from Vdsm but the migration may still be running and eventually finish,
	resulting in the VM running on the destination without Vdsm and Engine being
	aware about it.  Split brain follows sooner or later.

	So when destroy is requested on the destination we try to destroy the libvirt
	domain.  The call may not succeed if the domain has already been destroyed or
	it's not yet started on the destination.  In the latter case there is still
	theoretical risk of split brain but with much lower probability than without
	this patch.

	Bug-Url: https://bugzilla.redhat.com/1486543
	Backport-To: 4.1

2017-08-31  Michal Skrivanek  <michal.skrivanek@redhat.com>

	hooks: remove obsolete hostusb
	This functionality is replaced in 3.6 by a native support for passthrough

2017-08-31  Francesco Romani  <fromani@redhat.com>

	virt: tests: fix random failures in test_exception
	The original intent of this test was to confirm that
	we swallow any exception raised in Vm._run().

	After commit 8eff492 this test started to fail randomly,
	because of insufficient faking.
	This patch fixes that.

2017-08-30  Ala Hino  <ahino@redhat.com>

	vm: Fix invocations to __refreshDriveVolume
	Consumers of __refreshDriveVolume don't pass the drive name in the
	dictionarypassed to the method, thus a KeyError is raised when
	__refreshDriveVolume logs a message. In this patch, we add the drive
	name to the dictionary passed to __refreshDriveVolume.

	Bug-Url: https://bugzilla.redhat.com/1486347

2017-08-30  Milan Zamazal  <mzamazal@redhat.com>

	virt: Ignore guestfs VMs
	We look for external VMs and expose them in Engine UI.  However guestfs
	VMs (such as those created during sparsify) should remain hidden and users
	shouldn't be allowed to perform any operation (such as power off) on them.

	This patch hides guestfs domains.

2017-08-30  Andrej Krejcir  <akrejcir@redhat.com>

	stats: Avoid possible division by zero in CPU monitoring
	Bug-Url: https://bugzilla.redhat.com/1437883

2017-08-30  Milan Zamazal  <mzamazal@redhat.com>

	virt: Watch for external VMs periodically
	We already check for external VMs on recovery.  It shouldn't be necessary to
	restart Vdsm to detect them so let's add a periodic check.  We utilize data
	gathered by libvirt life cycle events in the periodic check rather than
	unnecessarily asking libvirt about all domains and checking them
	directly (which is what we must do on recovery).

	virt: Remove support for recovery files
	We don't use recovery files anymore, so let's:
	- Remove loading and saving recovery files.
	- Remove saveState calls that no longer save a useful purpose.
	- Replace the other saveState calls with just _updateDomainDescriptor calls.

	virt: Update disk metadata in Vm.updateDriveParameters
	We should store the updated configuration to metadata there.  In order to make
	it working, `type' and `iface' must be present in drive conf passed to
	updateDriveParameters.  So we put them there in the calling functions, that
	shouldn't harm.

2017-08-30  Francesco Romani  <fromani@redhat.com>

	virt: extract the interface to device name map
	trivial refactoring to prepare the code for the
	addition of the splitName function, which will reuse
	the aforementioned mapping.

2017-08-29  Francesco Romani  <fromani@redhat.com>

	virt: devices: use 'name' to get drive metadata
	The 'vmdevices.common.get_drive_conf_identifying_attrs' provides
	the attributes to use to match a device with its metadata.

	When the client code needs to update the drive configuration stored
	in the metadata, it can invoke this function on the configuration and
	use the return value as argument for metadata.Descriptor.device()
	to eventually access the metadata.

	In the device configuration, the 'name' key carries the exact
	same information of the ('iface', 'index') pair. Both uniquely
	represent a drive from the guest perspective - e.g. (scsi, 0)
	will always be 'sda'.

	Problem is the matching code uses the given tuple verbatim,
	so ('sda',) is different from ('iface', 0,), even though this
	is actually the same drive.

	To fix this issue, the function must normalize the parameters.
	We choose to always use the name, leveraging the storage.makeName
	helper.

	One noteworthy drawback is that we now hide the fact that sometimes
	the drive configuration is not normalized: drive configuration is
	expected to always contain the keys 'iface', 'index', and 'name', the
	latter two assigned by Vdsm.

2017-08-29  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	move sitecustomize to static

2017-08-29  Irit Goihman  <igoihman@redhat.com>

	ovs-dpdk: support ovs 2.7
	Compatibility with the old dpdk<portid> naming is broken in ovs 2.7, and as
	such a device will not be available for use until a valid dpdk-devargs is
	specified.
	When adding dpdk devices to ovs bridge, the PCI address must be
	set using the 'dpdk-devargs' option.
	Device naming is arbitrary.

2017-08-29  Edward Haas  <edwardh@redhat.com>

	automation: Fix - Add iproute-tc package to fc25
	On recent fedora25, the tc tool has been extracted out of iproute
	package and moved to its own package.
	This package is now added as a VDSM dependency (used by
	vdsm-networking for QoS).

	This patch fixes an older patch where the dependency has not been
	correctly added to the spec file:
	e23586b6d9c913786b06ec063649c8eb56d73a49

2017-08-29  Barak Korren  <bkorren@redhat.com>

	Fix exploding tox
	It seems that a new 'pluggy' version (0.5.0) was added in PyPi and this
	causes check-patch.sh to explode when trying to create the Python 3.x
	environments.

	This patch forces installation of pluggy 0.4.0 or lower.

2017-08-29  Shirly Radco  <sradco@redhat.com>

	metrics: stop sending host metrics except storage
	stop sending host metrics except storage
	to statsd, since they will be collected by collectd.

	Bug-Url: https://bugzilla.redhat.com/1469109

2017-08-29  Irit Goihman  <igoihman@redhat.com>

	dpdk: add only non dpdk nics to aqcuired ifaces
	Acquirement should not be done on DPDK based ifaces
	since the actions are not supported on these devices.

2017-08-28  Andrej Krejcir  <akrejcir@redhat.com>

	RPC client: Add methods to subscribe, unsubscribe and notify
	The vdsm.client can now subscribe to a queue and
	listen to JSON responses or events.

2017-08-28  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: help now shows gluster commands
	vdsm-client help will print gluster commands help when passing
	"--gluster-enabled" option.
	It will work only if vdsm-gluster is installed and gluster schema is present.

	    # vdsm-client --gluster-enabled -h

	    ...

	    Namespaces:
	    namespace method [arg=value]
	    GlusterEvent
	    Task
	    GlusterSnapshot
	    LVMVolumeGroup
	    Image
	    VM
	    Volume
	    Host
	    GlusterHost
	    ISCSIConnection
	    StorageDomain
	    StoragePool
	    GlusterService
	    GlusterHook
	    SDM
	    GlusterTask
	    GlusterVolume
	    Lease

	documentation: update README.md
	The installation paragraph has been rewritten due to some
	mistakes.

	Bug-Url: https://bugzilla.redhat.com/1401281

2017-08-28  Dan Kenigsberg  <danken@redhat.com>

	move dsaversion to common
	dsaversion is used by infra and network subsystems, and should thus be
	shipped in common.

2017-08-28  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't store pause code to vm.conf
	We'd like to stop using Vm.conf and we needn't to store pause code there
	anymore since we don't recover from recovery files and pause code is recovered
	from libvirt state.  So let's put pause code to its own attribute.

	virt: Don't store status to conf
	The only recent use of this conf item has been recovery.  Since we no longer
	use recovery files, we don't need this item anymore.

	recovery: Initial support for external VMs
	It's useful to show users external VMs running on their hosts.  Engine already
	recognizes external VMs and handles them appropriately.  So all we need to do
	is to report external VMs to Engine.

	This patch reads in external VMs on recovery.  We should watch for external VMs
	periodically, which functionality will be provided in a followup patch.

	recovery: Recover VMs from domain XML

2017-08-27  Milan Zamazal  <mzamazal@redhat.com>

	virt: Store block job info to metadata
	libvirt doesn't provide means to get information about running block jobs so we
	must store it to metadata.  The stored information is a nested dictionary and
	the default Vdsm metadata mechanism doesn't provide means to handle that.  We
	must use a custom way to store the info and we (ab)use JSON for that rather
	than trying to manage it specifically in metadata.py, which would hardly bring
	any real benefit.

2017-08-27  Dan Kenigsberg  <danken@redhat.com>

	net: import config from vdsm.common.config

2017-08-25  Francesco Romani  <fromani@redhat.com>

	vm: get launchPaused flag from metadata
	When Engine starts a VM using the domain XML, it will encode
	send the 'launch paused' flag in the domain metadata.

	This patch makes Vdsm able to consume the value.
	Vdsm still honour the flag if present in the vm.conf dictionary,
	but only if no domain XML is given.

2017-08-24  Francesco Romani  <fromani@redhat.com>

	virt: metadata: introduce make_element()
	The support of the storage device demands complex
	layout, not planned in the original design.
	Even though the support for storage device is temporary,
	we should support them correctly for the time being.

	The current code make use of ET.Element() and ET.SubElement()
	this is not optimal, but still correct, because the code
	doesn't take into account the namespace prefixing.

	This is the responsability of the metadata.Metadata() class.
	To fill this gap, we introduce the make_element() helper,
	and we change the _dump_device helpers to use it.

	virt: metadata: improve the documentation of dump()
	Fix the documentation of the metadata.Metadata.dump() method:
	- remove copy/paste artifact
	- clarify a bit the return value, pointing to the example

	No code change, only fix in the docstring.

	virt: metadata: network: support portMirroring
	The domain XML doesn't support port mirroring information,
	so Engine is adding it to the metadata.

	This patch makes Vdsm consume this information.

	Bug-Url: https://bugzilla.redhat.com/1481217

	virt: metadata: add Metadata.dump_sequence()
	We need to support sequences in metadata.
	There are two main options:
	1. add support for "list" type hint, much like we have for bool, int
	   etcetera, thus making making sequences a first class citizen.
	2. add helper method into the metadata.Metadata() class, postponing
	   full sequence support.

	Nowadays, sequence are used exactly once, excluding the temporary
	storage device support, for portMirroring.

	Hence, we decide to go with the simpler and less invasive solution #1,
	postponing full sequence support for the future.

	Bug-Url: https://bugzilla.redhat.com/1481217

2017-08-24  Andrej Krejcir  <akrejcir@redhat.com>

	RPC: Add some unit tests for JsonRpcClient
	Adds 3 unit tests for JsonRpcClient,
	to test sending notifications and
	receiving incorrect messages.

2017-08-24  Milan Zamazal  <mzamazal@redhat.com>

	virt: Protect all Vm.*legacy_disk_conf* calls with _confLock
	This is necessary to ensure consistency in a followup patch handling dom jobs
	metadata.

2017-08-24  Maor Lipchuk  <mlipchuk@redhat.com>

	hsm: Use default host id when pool doesn't exists
	We want to enable the possibility to force detach a storage domain
	even if the host is not yet connected to the storage pool.

	This will be used in a scenario when a user will want to recover
	its setup after a disaster, and will try to attach a storage domain
	with dirty pool UUID of the old storage pool to a new unintialized
	Data Center.
	Currently the process fails since the host is not yet connected
	to the storage pool and therefore there is no host id which we can
	use to take a lock on the storage domain.

	That is why we should enable the option for force detach a storage
	domain and clean its SP_UUID before we will want to connect it to
	the storage pool.
	Therefore we generate a default host id to get a lock on the storage
	domain and detach it from the old storage pool.

	Bug-Url: https://bugzilla.redhat.com/1205739

2017-08-24  Andrej Krejcir  <akrejcir@redhat.com>

	RPC: JsonRpcClient supports multiple subscriptions
	Previously JsonRpcClient could only receive rpc
	responses and only from a single STOMP queue.

	Now it is possible to subscribe to multiple queues
	and receive also events as well as rpc responses.

	The user can call subscribe() method to receive messages from a given
	STOMP queue. The method also takes an optional queue, to which
	incoming events are pushed.

	Currently, any received message from any queue is processed as follows:
	- the received string is parsed to JSON
	- based on the contents of the JSON object, it is recognized as either:
	  - a response to a previous RPC request
	  - an asynchronous event

	- RPC response is handled by finding the associated RPC request
	  and setting the response as the return value of the request

	- events are pushed into the user provided queue.
	  A different event queue can be registered for different STOMP queues.

2017-08-24  Dominik Holler  <dholler@redhat.com>

	net: Update tags to reflect backport of getLldp command
	The API extension for Link Layer Discovery Protocol (LLDP) will be
	backported to oVirt 4.1.5.

	The 'added:' tags are updated to 4.1 to reflect this.

2017-08-23  Dan Kenigsberg  <danken@redhat.com>

	move vdsm.config to common
	vdsm.config is used by all subsystems. It should thus sit in common.
	This patch keeps a proxy in place, so that existing users of vdsm.config
	can be updated in separate patches.

2017-08-23  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	hooking: move to lib
	As part of broader migration we move hooking.py away from vdsm dir.

2017-08-23  Milan Zamazal  <mzamazal@redhat.com>

	virt: Safer handling of persistence in migrations
	We used to set VIR_MIGRATE_PERSIST_DEST flag on migrations.  However that would
	cause breakages when migrating to hosts with older Vdsm versions.  To provide
	that backward compatibility we must make the destination VM transient and
	change it to persistent there (if run on a new Vdsm version).

	virt: Add Vm.min_cluster_version
	Engine now provides information about cluster version the VM is running on.
	We are going to use that information in future patches so we introduce a method
	to check for a minimum required cluster version.

2017-08-23  Francesco Romani  <fromani@redhat.com>

	vm: allow erasing of metadata key
	A bug in Vm._add_disk_legacy_conf_to_metadata() prevented
	the code to remove keys from the drive config stored in the metadata.
	Adding and updating keys was fine.
	This is relevant when finalizing a live storage migration operation,
	because diskReplicateFinish wants to remove the replica information
	from the parent drive.

	This patch fixes the bug and add unit tests to cover the methods
	in the Vm class.

	vm: store replica information
	In order to support the removal of the recovery files,
	We need to track in the metadata the replica state.

2017-08-23  Edward Haas  <edwardh@redhat.com>

	virt net: Avoid removing the display network when not defined
	Bug-Url: https://bugzilla.redhat.com/1478965

2017-08-22  Edward Haas  <edwardh@redhat.com>

	net tests func: Fix IPv4 default route assertion
	The request flag of defaultRoute is not directly related to the net caps
	property of ipv4defaultroute.
	ipv4defaultroute is true when the network gateway is also the host
	default route.
	However, a request with defaultRoute set and no gateway is valid,
	resulting with a false ipv4defaultroute.

	This patch updates the assertion check to be in sync with the
	described logic.

2017-08-22  Francesco Romani  <fromani@redhat.com>

	virt: metadata: support disk replica
	During the live storage migration, Vdsm dynamically
	adds the 'diskReplicate' key to a drive configuration.
	This is, for all intents and purposes, a nested drive
	configuration. The key will be updated according
	to the need of the LSM, and removed once completed.

	We need to support this key in order to properly save
	and restore the drive configuration.

	In the long term, we will still need to save some
	information in the metadata, but we will be able
	to get rid of the nested drives once the proper
	XML support for drives is merged.

2017-08-22  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't use conf in Vm._normalizeBalloonDevice
	Memory size should be got using the corresponding helper method and
	memGuaranteedSize can be taken from metadata now.

2017-08-22  Francesco Romani  <fromani@redhat.com>

	virt: metadata: don't (re)store drive.volumeInfo
	We used to store drive.volumeInfo in the metadata,
	like we currently do for vm.conf. Turns out, however, that
	drive.volumeInfo is no longer used inside Vdsm,
	it was one early attempt to store the data that we now
	provide inside the drive.volumeChain.
	So we can elide this information.

	This patch skips this key on both save and restore the drive
	configuration to metadata. We will use the Engine XML - and the
	recovery code from XML, only in clusterLevel >= 4.2, and
	nothing changes in the vm.conf flow,
	so backward compatibility is ensured.

	With this patch, we also fix the attached rhbz#1481165, which
	was caused by the fact that for network (gluster) drives,
	volumeInfo contains the unexpected 'hosts' entry, which the
	current code is not prepared to deal with.

	Bug-Url: https://bugzilla.redhat.com/1481165

	vm: lease: fix Lease constructor call
	Was not updated when we removed the self.conf argument in commit
	39d7e95ac95b3fbec7b6e4645e981b976f6d37d4

	Related-To: https://bugzilla.redhat.com/1481691

	tests: add basic test for Vm.hotplugLease
	Add very basic test to exercise the VM.hotunplugLease code,
	in order to test the fix added in the next patch:
	https://gerrit.ovirt.org/#/c/80873

	virt: metadata: atomic {de,}serialization
	Add a lock inside descriptor.Metadata to ensure atomic
	load/save of the metadata itself.

	No clean and safe way emerged to update the content of the metadata
	descriptor, so the synchronization in this step is still on the client
	class (e.g. Vm class)

2017-08-22  Dan Kenigsberg  <danken@redhat.com>

	vdsm.tool.service: unbreak tool.service
	In commit 53a2562 I have avoided execCmd splitting its output to lines,
	but I ignored a case where the split was actually used. I do not yet
	understand how did this passed my verification.

2017-08-22  Francesco Romani  <fromani@redhat.com>

	tests: improve faking
	This patch avoids this error due to insufficient faking
	AttributeError: 'NoneType' object has no attribute 'notify'

2017-08-22  Dan Kenigsberg  <danken@redhat.com>

	checkimages hook: avoid using execCmd(sync=False)
	I would like to move hooking.py to the common package. However, common
	does not have the complex execCmd, and is not likely to ever have
	something with sync=False. This patch reimplements exec-with-timeout
	using threading.Timer instead of sync=False.

2017-08-21  Ala Hino  <ahino@redhat.com>

	sos-plugin: Introduce collectLVMCommand helper
	Introduce collectLVMCommand helper to better reuse logic and get rid of
	the error prone string concatination that was used. In addition, use
	subprocess.Popen to execute the commands.

	Bug-Url: https://bugzilla.redhat.com/1474566

2017-08-21  Francesco Romani  <fromani@redhat.com>

	metadata: extract helpers
	For networked storage, volumeInfo may contain extra keys.
	This patch does some refactoring to prepare the code
	to the proper volumeInfo support.

	Bug-Url: https://bugzilla.redhat.com/1481165

2017-08-19  Dan Kenigsberg  <danken@redhat.com>

	tool.service: avoid execCmd(raw=False)
	tool.service.execCmd has raw=True as its default,but two places we use
	raw=False to split lines in command output. However, we concatenate
	these lines immediately afterwards, or ignore them.

2017-08-18  Francesco Romani  <fromani@redhat.com>

	vm: metadata: recover the storage config earlier
	To avoid races with the periodic tasks, we restore the
	storage device configuration as soon as possible, in Vm.__init__.

	Previously, we tried to move the restoration out of already overcrowded
	__init__, but doing the restoration in Vm._run opens the gate
	for races on startup. To fix them, we would need synchronization
	between threads, so moving the restoration in __init__ seems
	the (slightly) lesser evil.

	vm: save device metadata after libvirt update
	We should save the storage configuration after we received updates
	from libvirt. Most notably, doing this way we make sure to record
	the device aliases.

	virt: metadata: support for ioTune values
	The per-drive ioTune settings are stored in the specParams
	of the drive configuration. Furthermore, Engine can send
	the values when creating the VM.

	This patch adds support for the nested 'ioTune' section in
	the per-drive specParams.

2017-08-18  Michal Skrivanek  <michal.skrivanek@redhat.com>

	faqemu hook: add 7.3 machine types to capabilities
	We should match the supported machine types even in fake environment

2017-08-18  Francesco Romani  <fromani@redhat.com>

	virt: storage: use integer division in makeName
	We want to be python3 compatible. No changes in behaviour.

2017-08-17  Dan Kenigsberg  <danken@redhat.com>

	checkimages hook: split line for readability

2017-08-17  Edward Haas  <edwardh@redhat.com>

	net: Remove unused function: ifaceUsed

	vdsm tool configurators: bond_defaults - do not depend on time
	The bond defaults dump is considered updated if it exists (as it is
	created per boot, and its content is dependent on the kernel).

	The existing time check (verifying if the period elapsed from the file
	update is no older then the time elapsed from the system boot) is no
	longer needed, as the dump is placed under /var/run which is assured
	to be cleaned on boot.
	This patch removes the time checks which are not valid when the time is
	updated during the boot.

	Bug-Url: https://bugzilla.redhat.com/1482014

2017-08-17  Francesco Romani  <fromani@redhat.com>

	virt: tests: start Vm.monitor_drives tests
	Commit aa0b902f6b15 introduced one change in behaviour we
	don't want. This is bad especially because the aforementioned
	commit wanted to be a pure refactoring.

	Add the basic tests to Vm.monitor_drives to document
	the behaviour we want.

	virt: metadata: support network storage
	We need to support the nested 'auth' and 'hosts'
	key to allow support for networked drives.
	This patch does that, reusing the infrastructure
	already needed for specParams and volumeChain.

	Bug-Url: https://bugzilla.redhat.com/1481165

	virt: metadata: use constants
	Use more constants in the code, to tidy up and make room
	for extensions.

2017-08-17  Dan Kenigsberg  <danken@redhat.com>

	cmdutils: add env to exec_cmd()'s args
	Expose Popen's env argument throught exec_cmd(). The newly-introduced
	argument is going to be used by hooks.py in the following patch.

	move exec_sync_bytes to common.cmdutils.exec_cmd
	exec_cmd(), a skinny version of our ancient over-grown execCmd, is
	useful not only in the network subpackage, so it needs to reside under
	vdsm.common.

2017-08-17  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix filterParameters processing
	There is a mismatch in filterParameters data format in vmdevices.Interface and
	thus getXML method omits filterParameters previously stored by from_xml_tree.
	This patch fixes filterParameters processing in Interface.from_xml_tree to
	match the format expected in getXML.

	Bug-Url: https://bugzilla.redhat.com/1482034

2017-08-16  Maor Lipchuk  <mlipchuk@redhat.com>

	hsm: Fix misspelled method name

2017-08-16  Edward Haas  <edwardh@redhat.com>

	virt net: vhost custom property with a wrong net name
	If the network name specified in `vhost' custom property
	doesn't correspond to a network contained in the interface object,
	ignore it.

	Bug-Url: https://bugzilla.redhat.com/1479872

	net: Introduce iface interface driver
	The iface interface is defined and implemented using a hybrid set of
	tools, including sysfs, netlink, iproute2 and ethtool.

2017-08-15  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: Migrate testFailWithInvalidBridgeName to the new func tests.

	net: tests: Relocate a test to the public methods.
	test_remove_unbridged_network_with_a_nic_used_by_a_vlan_network
	was placed among the private methods.

	also renamed "unbridged" to "bridgeless" to match the rest of the
	tests.

2017-08-15  Denis Chaplygin  <dchaplyg@redhat.com>

	gluster: Added workaround for mounting rdma enabled volumes
	gluster implicitly adds suffix .rdma to the filesystem
	specification when volume is mounted using RDMA.
	As VDSM checks successfulness by comparing those
	filesystem specifications and mount point named.

	Due to difference in filesystem specifications,
	there was no way to use RDMA mounted gluster volume in VDSM.

	This patch introduces workaround for that problem,
	removing .rdma suffix on gluster volumes.

	Bug-Url: https://bugzilla.redhat.com/1428851

	gluster: Added test for rdma enabled volumes mounts
	gluster implicitly adds suffix .rdma to the filesystem specification
	when volume is mounted using RDMA.

	This patch adds a tests case for that bug.

	Bug-Url: https://bugzilla.redhat.com/1428851

2017-08-15  Edward Haas  <edwardh@redhat.com>

	net: netinfo: Detect early that an iface is missing
	While creating the network caps report using netinfo, an expected
	iface may be missing. For such scenarios, the network it represents is
	skipped and not reported (assumed not to exist).

	This patch detects the missing iface earlier.

	net: Extract ethtool to its own module
	ethtool is used to retrieve driver information for a given iface.

	This patch extracts the ethtool code to an independent module in order
	to ease its usage by other modules and give it a proper scope.

	net tests: Define switch type parametrize at netfunctestlib
	Several parametrize definitions are common to multiple functional test
	modules and their definition can be moved to the test lib.

	This patch handles the switch type parametrize, future patches will
	define new ones to serve the tests.

	net tests: Run functional tests using pytest
	Enable the network functional tests to be run using pytest.

	The existing marking and assertion of the tests have been
	converted from nose to pytest.

	There is no change in the unit and integration test run.

	In order to run the network functional tests:
	pytest -m legacy_switch network/functional
	pytest -m ovs_switch network/functional

	To run all functional tests except the ovsdpdk ones:
	pytest -m "not ovsdpdk_switch" network/functional

	Note: pytest needs to be installed on the system (pip install pytest).

	net tests: Relocate network (new) functional tests to its own folder
	The functional tests are not mixed with other test types (unit and
	integration), therefore, moving them to a seperated folder will remove
	some uneeded complexity in choosing which tests should run.

	Running the unit & integration tests has not changed.
	Running the functional requires these commands:
	./run_tests.sh -a switch=legacy network/functional/*_test.py
	./run_tests.sh -a switch=ovs network/functional/*_test.py

	For running legacy, ovs and switch type change tests (but not dpdk ones):
	./run_tests.sh -A "switch!='ovs-dpdk'" network/functional/*_test.py

	This patch is one step forward in moving all networking tests
	to py.test.

2017-08-14  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make sure all hotunplug calls update domain descriptor
	NIC and host device hot unplug calls don't update domain descriptor after the
	hot unplug has been completed.  Apparently this had had no bad consequences
	until we started to use Engine XML and then the domain XML reported to Engine
	and actual state of the VM got out of sync.  This patch adds the missing update
	calls.

	Bug-Url: https://bugzilla.redhat.com/1480949

2017-08-14  Edward Haas  <edwardh@redhat.com>

	net: Wait for vlan link creation when bond-vlan-dhcp is used
	In a setup with a bridgeless network that has bond, vlan and DHCP, the
	ifup action is performed in a nonblocking manner and may cause a race
	where the vlan link is assumed to exist but the ifup has not yet
	executed.

	This patch introduces a wait-for-link mechanism for this specific scenario.

	Bug-Url: https://bugzilla.redhat.com/1479829

2017-08-13  Leon Goldberg  <lgoldber@redhat.com>

	net: don't use properties internally.
	IPAddressData's __repr__ device, scope, and flags
	properties aren't returning modified variations
	of their attributes and as such there is no need
	to use them over the actual attributes.

	net: Remove redundant hasattr calls.
	IPAddressData __repr__ contains redundant hasattr calls
	for attributes that are guaranteed to be present.

2017-08-12  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: Remove testSetupNetworksNiclessBridgeless
	The creation of a nicless and bridgeless network
	is tested in the new functional tests
	(test_add_bridgeless_net_missing_sb_device_fails)

2017-08-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Test for stale domain removal

2017-08-10  Francesco Romani  <fromani@redhat.com>

	tests: split metadata_test
	We added tests to cover the legacy storage needs, but those tests
	are covering temporary code, so better separating theme from
	the other tests.

	No intended change in behaviour.
	Test-only.

2017-08-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Revert "hooking: move to lib"
	This reverts commit 6687ba74e74fcd18d20fcce00349aca5adf38a30.

	Verified that without those changes the hooks are being read properly.
	This folder move should be re-defined and fixed properly later.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1478054

2017-08-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add Defined.UUIDString method
	It's used in metadata logging on possibly Defined domains, resulting in not
	being to start a VM when debug logging is enabled and the method is missing.

2017-08-09  Francesco Romani  <fromani@redhat.com>

	vm: use metadata for storage configuration
	In order to make it possible the recovery using only the
	XML as source of data, and thus get rid of the recovery files,
	we must make sure the storage configuration is included in
	the domain XML.

	At the moment this is not true, because the storage configuration
	- and only that - is still being sent in the legacy format.

	Until the storage support matures, the quickest way out is just
	move all this data in the domain metadata. We add some overhead,
	but we unlock the way forward.

	virt: metadata: add logs in load/dump
	Add debug logs in load and dump to be able to easily
	learn the state of metadata.

	metadata: tests: add tests for SGIO drives
	Ensure basic coverage.

	metadata: ensure attributes are string
	The ElementTree module requires all the Element attributes
	to be string, otherwise it spits Serialization Error.

	This patch ensures so using explicit conversions.

	virt: metadata: more generic drive attr matching
	In order to support various disk types (e.g. LUN devices)
	we need to generalize the attribute matching we do.

	We need to match a drive with its metadata, but we also
	need to use the minimal set of attributes.

	We try to use GUID first, and the pair iface/index if this fails.
	This covers all the known cases, even though will need
	further work, e.g. using the path if available.

	virt: metadata: support for payload cdrom devices
	The payload devices are yet another special case of the already
	complex storage device. We need to support them, and
	this patch adds metadata support for this use case.

2017-08-08  Nir Soffer  <nsoffer@redhat.com>

	vm: Log changes in drive extension info
	Each time drives' capacity, allocation, or physical change, log a debug
	log with the new values. This log will allow easy debugging when lower
	level component misbehave.

	Here is an example log when starting a VM:

	2017-08-02 02:54:24,468+0300 DEBUG (periodic/0) [virt.vm]
	(vmId='f33a7fbc-3dab-448c-bb41-204eccee70ba') Extension info for drive
	sda volume 13b40805-a43b-4c0e-9a0b-0c03a2e4ecbb:
	BlockInfo(capacity=8589934592L, allocation=0L, physical=1073741824L) (vm:1057)

	The allocation value is 0, since qemu did not write anything yet to this
	drive. Once qemu write to the drive, we get the correct allocation:

	2017-08-02 02:54:38,473+0300 DEBUG (periodic/1) [virt.vm]
	(vmId='f33a7fbc-3dab-448c-bb41-204eccee70ba') Extension info for drive
	sda volume 13b40805-a43b-4c0e-9a0b-0c03a2e4ecbb:
	BlockInfo(capacity=8589934592L, allocation=2490368L, physical=1073741824L)
	(vm:1057)

	Bug-Url: https://bugzilla.redhat.com/1461536

	vm: Use time.Clock for timing extend flow
	Use the new clock facility to record detailed timing of the extension
	process. We record:

	- total: the time from detecting that a drive needs extension until the
	  guest can see the new size. When extending during live storage
	  migration, this time includes the time to extend the replica and the
	  volume.
	- extend-replica: The time to extend the replica volume during live
	  storage migration.
	- refresh-replica: The time to refresh the replica volume after it was
	  extended during live storage migration.
	- extend-volume: The time to extend the drive volume.
	- refresh-volume: The time to refresh the drive volume after it was
	  extended.

	Here is an example log during live storage migration from block storage
	to block storage - both the volume and the replica are extended:

	2017-07-31 02:39:33,390+0300 INFO  (mailbox-hsm/0) [virt.vm]
	(vmId='338f0c16-286a-4250-937a-e65f1fdaeedd') Extend volume
	c951edf1-16aa-4a8e-9197-cdec7c893dca completed
	<Clock(total=6.30, extend-replica=2.08, refresh-replica=0.13,
	extend-volume=3.98, refresh-volume=0.11)> (vm:1259)

	Here is an example log during live storage migration from block storage
	to file storage - only the volume is extended:

	2017-07-31 02:43:46,356+0300 INFO  (mailbox-hsm/1) [virt.vm]
	(vmId='338f0c16-286a-4250-937a-e65f1fdaeedd') Extend volume
	cad101f2-dedd-4b5e-a3db-49370ff3813a completed
	<Clock(total=4.36, extend-volume=4.18, refresh-volume=0.18)> (vm:1259)

	Here is an example log during live storage migration from file storage to
	block storage - only the replica is extended:

	2017-07-31 02:59:22,390+0300 INFO  (mailbox-hsm/1) [virt.vm]
	(vmId='338f0c16-286a-4250-937a-e65f1fdaeedd') Extend replica
	37b8493e-f9d3-4cbe-bc2a-783303dd1a2e completed
	<Clock(total=2.31, extend-replica=2.12, refresh-replica=0.19)> (vm:1198)

	time: Add a Clock utility for timing complex flows
	This helps to record the time for multiple steps in a complex flow and
	log the results. This will be used in the next patch for timing extend
	disk flow.

	Bug-Url: https://bugzilla.redhat.com/1461536

2017-08-08  Allon Mureinik  <amureini@redhat.com>

	selinux: Remove restorecon workaround
	As of libselinux-2.5-2, restorecon will successfully succeed if
	selinux is disabled.

	This allows us to clean up vdsm's code and remove the boilerplate

	    if selinux.is_selinux_enabled():
	        selinux.restorecon(path)

	Bug-Url: https://bugzilla.redhat.com/1326799

2017-08-08  Nir Soffer  <nsoffer@redhat.com>

	monitor: Log changes in domain host id status
	When acquiring a host id in the domain monitor we use async=True, so the
	host id is not acquired yet when StorageDomain.acquireHostId() returns.
	We find that the operation was successful on a future monitor cycle.

	Log INFO message when StorageDomain.hasHostId() changes from False to
	True (successful acquire), and log WARN message if the value changes
	from True to False, meaning that the host id was released.

	Bug-Url: https://bugzilla.redhat.com/1422508

2017-08-08  Milan Zamazal  <mzamazal@redhat.com>

	virt: Remove stale domains with the same name
	When we start a new VM we look for its old stale domain by the VM id.  If
	found, the stale domain is removed.  However libvirt also refuses to run a VM
	with a different id but the same name as an existent domain.  So we should also
	remove stale domains with the same name.

	A stale domain with the same name and a different id may occur when the host
	crashes, leaving the stale domain behind, and the user removes and creates
	again the original VM in Engine.

	Bug-Url: https://bugzilla.redhat.com/1477151

2017-08-08  Dominik Holler  <dholler@redhat.com>

	net: Report empty LLDP TLV lists for operationally-down interfaces
	Before this patch, a single interface that was never monitored by lldpad
	had caused the API level to fail, blocking information about
	properly-enabled interfaces.

	This change reports interfaces being not in state UP as not
	enabled for LLDP with an empty list of TLVs.

2017-08-08  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: handle handshake errors
	There are two possible errors (sslerror and socket.error) which are
	raised during ssl handshake that need to be handled. We do not want
	to see unhandled error backtraces in the logs which could easily
	generate enourmos amount of logs when malicious client exploit it.
	We log now only the occurence of the error and the offending IP address
	that caused the error.

	We fix the issue by handling both errors and cleanly closing file
	descriptor.

	Bug-url: https://bugzilla.redhat.com/1473295

2017-08-08  Edward Haas  <edwardh@redhat.com>

	net: Hide zero-mac nics only if they are identified as vmfex
	zero-mac interfaces which have been identified as VF have been assumed
	to be vmfex interfaces.
	There seem to be other VF interfaces which appear with zero-mac that are
	not vmfex.

	To make it more specific, the vmfex driver name is examined ('enic').
	zero-mac interfaces that are not vmfex are now reported as nics by the
	network caps.

	Bug-Url: https://bugzilla.redhat.com/1474638

2017-08-07  Tomáš Golembiovský  <tgolembi@redhat.com>

	build: remove constants.py from dist package
	Recently constants.py was moved to lib/vdsm/common. This was done by
	commit f63269e9fa2b1a31e6d9673f8e3337eeacbd0332. However, because of
	existing rule in Makefile.am this file was mistakenly included into
	dist package. As a result constants.py was not recreated during RPM
	builds which resulted in broken RPMs (constants.py contained invalid
	paths).

	lib/vdsm/common/Makefile.am contained dist_* rule that includes all
	'*.py' into dist package. Note that files listed in the nodist_* rule
	are not taken into account during 'make dist'.

	This change does two things:

	1)  it modifies the dist_* rule to contain all '*.py' minus the files
	    listed in nodist_* rule

	2)  test is added to check-patch.sh to make sure no file generated from
	    .in file is included in the dist package

	ad 2) There are several exceptions that we seem to include in dist
	package on purpose. I don't really believe that including any of those
	files (except maybe vdsm.spec) is necessary, but I did not investigate.
	This can be improved in subsequent patches.

2017-08-07  Ala Hino  <ahino@redhat.com>

	logging: Handle exception logging when calling getVolumeInfo
	Until now, when getVolumeInfo is called and the volume didn't exist, a
	VolumeDoesNotExist is raised. Raising that exception when asking for the
	volume info is misleading and indicating that something is wrong in the
	system, while it is legitimate to ask for the volume info for a volume
	that doesn't exist. In this patch, we mark the VolumeDoesNotExist error
	as expected when calling getVolumeInfo.

	Bug-Url: https://bugzilla.redhat.com/1408304

	logging: Fix logging expected errors in dispatcher
	Log expected errors as info messages, rather than error messages.

	Related-To: https://bugzilla.redhat.com/1408304

	logging: Support not logging expected errors in storage tasks
	In commit I74c56a2 (logging: Support not logging expected errors), we
	added a support not to log expected errors. In this patch, we add same
	support for storage tasks.

	Bug-Url: https://bugzilla.redhat.com/1408304

	logging: Support not logging expected errors
	    If a user ask to perform an invalid operation, this is not Vdsm error,
	    and we should not log a traceback. On the other hand, we must return the
	    error response to engine, and we like to keep the flows clean using
	    exceptions.

	    We can mark some errors as expected, but other errors may be expected
	    only in certain conditions, and unexpected in other conditions. Add an
	    expected decorator that mark any error as expected. If a lower level
	    component raise an exception, and a higher level component determine
	    that this exception is expected in this flow, the higher level component
	    can decorate the error and re-raise it.

	    Example usage:

	        try:
	            get_thing_info()
	        except NoSuchThing as e:
	            raise expected(e)

	logging: Use str helper to better log the error message
	Before this patch, the logged message as seen below, wasn't too
	descriptive:

	    [storage.TaskManager.Task] (Task='3c40ea42') aborting: Task is aborted:
	    'Volume does not exist' - code 201

	With this patch, the message is more descriptve showing the info about
	the task that failed. For example, below is what we see when
	getVolumeInfo task fails - the task Id and the volume Id:

	      [storage.TaskManager.Task] (Task='d3a3ef') aborting: Task is aborted:
	      "Volume does not exist: (u'0e93ebfb-eb4e-4ee6-aba1-0c6608d44f54',)" -
	      code 201

	Related-To: https://bugzilla.redhat.com/1408304

2017-08-07  Francesco Romani  <fromani@redhat.com>

	metadata: add support for complex storage metadata
	We want to copy the storage configuration from the legacy format
	to the domain metadata as quick fix to unlock the engine-XML based
	recovery, while the full support matures.

	To do so, we must make sure the existing code in metadata.py can
	cope with the nested sections required by storage device:

	- 'address'
	- 'specParams'
	- 'vm_custom'
	- 'volumeChain'
	- 'volumeInfo'

	This patch implements this support.

	virt: metadata: don't return refs in  all_devices
	The all_devices() method should return copies of
	the device data, not references to the internal
	data structures.

	However, all_devices() is used also internally, so
	to accomodate both use cases we extract a common
	helper.

2017-08-06  Leon Goldberg  <lgoldber@redhat.com>

	net: Introduce link vlan validations.
	This patch introduces vlan validations with the first checked
	scenario being a VLAN without underlying device.

	Prior to this patch, although the scenario was checked in different
	locations for legacy/OVS, different error codes were used.

	net: tests: use nics in test_add_bond_with_bad_name_fails
	The test shouldn't contain more than a single error.
	Currently besides testing for bad names, the test supplied
	no nics for the bond, resulting in another error.

	net: tests: Add the missing switch parameter to *bond_with_no_nics_fails

	net: Introducing validate_bond_configuration.
	There is common validation logic for bond configuration
	between OVS and legacy switch; adding it to link validator.

	net: sb validator: raise on missing sb device.
	If no southbound device was given to a bridgeless network,
	raise. This is true for both OVS and linux bridge.

	Bridged and sb'less networks are supported by linux bridge,
	while OVS is currently broken, and as such the relevant
	test is currently skipped.

	net: tests: Remove func_net_ip_test.py
	There already is a module dedicated to testing static ip
	configuration. Remove func_net_ip_test and move its tests
	to func_static_ip_test.

	net: Introduce ipv4 config validator
	ipv4 configuration validity is shared between ovs and legacy switch
	and as such should be validated prior to ovs/legacy split.

	As there were some inconsistencies in the raised error codes of invalid
	ip configurations, all related errors now raise ERR_BAD_ADDR.

2017-08-06  Edward Haas  <edwardh@redhat.com>

	net: Centralize call to pre-config validation
	Introduce network.validator module, which is responsible to call all
	pre-config validators.

	This patch creats a new validator module for the link package and moves
	the call to these validations (bond naming) to the new network.validator
	module.

	New pre-config validations should be called from this new module and
	existing validation calls should be migrated and called from the new
	module as well.

2017-08-05  Andrej Krejcir  <akrejcir@redhat.com>

	RPC: Add missing return statement
	In the current code, the function _processEvent()
	is not reachable, so this change does not affect anything.
	But it will be reachable in subsequent patches.

	It is unreachable, because the JsonRpcClient can only
	receive messages from a single subscription queue and
	this specific queue does not contain events,
	only rpc responses

	RPC: Add missing return statement when handling messages
	Whithout the return statement, the code would access
	undefined local variables.

2017-08-05  Edward Haas  <edwardh@redhat.com>

	jsonrpc tests: Discard the dependency on the network package
	The tests do not really need the networking connectivity functionality
	and patching an inner implementation is not recommended.

	This patch removes the dependency by placing a NOP at the usage.

2017-08-05  Petr Horáček  <phoracek@redhat.com>

	tool: remove dummy bridge
	Add a command that removes libvirt dummy bridge ;vdsmdummy;.

	Also rename dummybr command to dummybr-create to keep naming consistent.

	Bug-Url: https://bugzilla.redhat.com/1430799

2017-08-04  Edward Haas  <edwardh@redhat.com>

	net build, take 2: Unify module collection on the network dir
	In order to simplify and reduce the overhead when adding new modules
	under the vdsm/network package, all *.py files are collected by the
	makefile and all *.py* are specified in the spec.

	This is a repetition of commit 1990252 which was merged prematurely.

2017-08-04  Francesco Romani  <fromani@redhat.com>

	virt: metadata: rename the `name' parameter
	Rename the `name' parameter of the Metadata.dump()
	method, to avoid possible name clashes with the attributes.

2017-08-04  Milan Zamazal  <mzamazal@redhat.com>

	virt: Never leave a recovered VM in WAIT_FOR_LAUNCH status
	If we recover a VM and get an unexpected VM state from libvirt (which can
	happen only in unexpected situations we are not aware of), the VM remains in
	WAIT_FOR_LAUNCH status.  That means clientIF._waitForDomainsUp will wait
	forever and Vdsm will remain unresponsive in recovery state.

	To fix that problem we set the VM status to UP (as the best effort fallback
	consistent with libvirt inaccessibility handling) in such a case rather than
	leaving it in WAIT_FOR_LAUNCH.

2017-08-04  Petr Horáček  <phoracek@redhat.com>

	tool: list/clear networks configured by VDSM
	Provide tools to list networks configured by VDSM and to clear
	them.

	This command could be called before vdsm removal to leave host
	in a clean state. Typically a user would find default route network
	name with `vdsm-tool list-nets` and then remove all networks but
	the default route one with `vdsm-tool clear-nets --exclude-net netname`

	Bug-Url: https://bugzilla.redhat.com/1430799

2017-08-04  Edward Haas  <edwardh@redhat.com>

	net: Raise a meaningful exception for multiple sb nics
	Multiple southbound nics per network are not supported.
	When decoding the kernel config, an error will occur, failing the flow.

	This patch raises a meaningful exception, describing the problem to ease
	the troubleshooting of errors.

	net: Allow QoS caps to ignore nets with multiple sb nics
	Multiple southbound nics per network are not supported, and when issuing
	a caps request, it failed in the QoS section.
	This patch allows the caps to continue by ignoring the invalid network,
	reporting the error in the log.

	Bug-Url: https://bugzilla.redhat.com/1470696

2017-08-03  Nir Soffer  <nsoffer@redhat.com>

	asyncevent: Improve asyncore integration
	Add poll() function based on asyncore.poll2() from python 3.7, and 2.7.
	This function waits for events on the event loop channels, and return
	list of ready dispatchers, instead of invoking the I/O callbacks
	immediately, which is racy.

	The ready dispatchers are added to the event loop ready queue, and the
	callbacks are invoked at the end of _run_once, in the same way it is
	done in the python 3 event loop.

	With this change, a faulty handle_error() raising exception will not
	cause the event loop to skip the next I/O callbacks. The error will be
	logged and then the next callbacks will be handled.

	This change also fix the following python bugs that may never be fixed
	in 2.7 or even in 3.x, since asyncore was deprecated since version 3.6.

	- http://bugs.python.org/issue30994
	- http://bugs.python.org/issue30931

2017-08-03  Dominik Holler  <dholler@redhat.com>

	net: Report lldp through new getLldp command

	net: Add info lldp to lldp
	lldp is extended to provide informations received by LLDP.
	The provided lldp information can be restricted by a filter.
	The only implemented filter criteria is to restrict the lldp
	information by a list of NIC names received the LLDP information.

	net: Enable LLDP on NICs
	lldpad has to be configured to provide LLDP on network interfaces.

	This change activates LLDP on all NICs.

2017-08-03  Edward Haas  <edwardh@redhat.com>

	net: Introduce the LLDPAD driver with an LLDP interface
	The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer
	protocol in the Internet Protocol Suite used by network devices for
	advertising their identity, capabilities, and neighbors on an IEEE 802
	local area network, principally wired Ethernet.

	This patch introduces an LLDP interface, implemented using the lldpad
	service & tool.

2017-08-03  Dan Kenigsberg  <danken@redhat.com>

	Revert "net build: Unify module collection on the network dir"
	This reverts commit 199025259295c3c1ee38b9fd9525f70589f5f456 since I should have merged much more urgent lldp patches first.

2017-08-03  Edward Haas  <edwardh@redhat.com>

	net build: Unify module collection on the network dir
	In order to simplify and reduce the overhead when adding new modules
	under the vdsm/network package, all *.py files are collected by the
	makefile and all *.py* are specified in the spec.

2017-08-03  Francesco Romani  <fromani@redhat.com>

	virt: devices: document the metadata used

2017-08-03  Milan Zamazal  <mzamazal@redhat.com>

	recovery: Recover persistent domains in down state
	Persistent down domains are currently simply undefined.  But that's not
	correct, we want to keep them and to report them to Engine until they are
	destroyed.  A typical case, besides other less or more corner cases, when a VM
	in DOWN state is recovered is when the VM is shutdown or killed while Vdsm is
	down.

	We need the following changes to recover VMs in down state:

	- Don't undefine domains in down state on recovery.
	- Permit calling self._dom.state on those domains in order to be able to
	  examine their state.
	- If exit info is not found in metadata on recovery, set it.

	virt: Move Vm attribute initialization to a separate method
	Just to move chunk of code out of Vm.__init__.

	virt: Store VM exit info to metadata
	This information shouldn't be lost in case Vdsm is restarted.

2017-08-03  Francesco Romani  <fromani@redhat.com>

	virt: metadata: add the all_devices() method
	Add a method to enumerate all the devices matching a given
	set of arguments.

	Will be useful to support the storage devices sent with the legacy
	configuration format.

	virt: metadata: devices: more attribs for lookup
	we need a way to match per-device metadata to its device.
	The current code does that (ab)using the `alias' attribute.
	Engine -or any other client- is free to add `alias' attributes
	to the domain XML, so Vdsm could use this to match metadata
	with devices.

	Libvirt doesn't allow the client to set aliases, so those
	aliases will be discarded.
	This works fine on VM creation, but will make accessing the metadata
	on recovery impossible: the alias will be overwritten by libvirt, so any
	metching will fail.

	While we look for a better approach, we solve this issue for the
	network devices trivially using the mac address, which is non-ambiguous,
	already used by Engine, and guaranteed to be present in all the cases
	we care about.

	Storage device could follow suit using the "path" attribute.
	This patch also adds tests demonstrating when the match fail and when
	it will succeed.

2017-08-02  Irit Goihman  <igoihman@redhat.com>

	stomp: fix AsyncDispatcher next_check_interval
	If next_check_interval returns 0, asyncore loop is triggerred.
	In case of no outgoing heartbeat, the function doesn't ignore the
	calculation and returns 0, which causes the loop to be triggerred
	constantly and send heartbeats.
	On server side outgoing heartbeats are always greater than 0 so we
	didn't encounter this behavior before. When we added the same
	functionality to client side, where outgoing heartbeat is 0 by default,
	we encountered high cpu usage.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-08-02  Francesco Romani  <fromani@redhat.com>

	collectd: client: raise if we receive NaN
	The collectd daemon may return NaN for some values.
	Let's make sure we handle this in our client library.
	The default behaviour is to raise ValueError.
	We add one option to just return NaN to the calling code,
	like we did before this patch.

2017-08-01  Nir Soffer  <nsoffer@redhat.com>

	vm: Add missing log for diskSizeExtend api
	For some reason this method was not logged. Add the missing @logged
	decorator so we get proper information.

	Bug-Url: https://bugzilla.redhat.com/1461536

	pytest: Set locale properly for pytest based tests
	We are setting LC_ALL=C environment variable for vdsm, supervdsm, and
	the nose based tests, but nothing for the pytest based tests. This
	results in failures in check_test, when running with locale that does
	not use "." for decimal separator:

	MiscFileReadException: Internal file read failure:
	('/var/tmp/tmpPpV1Rj', "no match: bytearray(b'4 bytes (4 B) copied,
	0,000496228 s, 8,1 kB/s')")

2017-07-31  Nir Soffer  <nsoffer@redhat.com>

	vm: Unify indentation style
	Change the indentation style to match other code in this area.

	vm: Improve extending related names
	Rename extendDrivesIfNeeded() to monitor_drives(), since this is the
	entry point of the DriveWatermarkMonitor.

	Rename try_to_extend_drive to extend_drive_if_needed, which describe
	better what it does, and document it properly.

	vm: Remove duplicate check for chunked drive
	extendDrivesIfNeeded() should operate on the list of chunked drives -
	drives which are chunked or being replicated to a chunked replica.
	Commit aa0b902f6b15 (virt: vm: add try_to_extend_drive) change this for
	no reason; move the check back to the extend loop, simplifying the code.

	vm: Fix handling of improbable resize error
	If we get improbable extension info from libvirt, we pause the VM and
	raiseImprobableResizeRequestError. This should abort the extend loop in
	extendDrivesIfNeeded(). Commit aa0b902f6b15 (virt: vm: add
	try_to_extend_drive) changed this behaviour by mistake; move the
	exception handler back to the extend loop.

2017-07-31  Francesco Romani  <fromani@redhat.com>

	virt: vmdevices: move get_xml_elem in core.py
	It will be used in two different places, so move it with the
	other vmdevice utilities.

	Only code movement and trivial rename.

2017-07-31  Martin Polednik  <mpolednik@redhat.com>

	hooks: add cpuflags hook
	The new `cpuflags` hook is a mechanism to add/remove specific CPU
	features so that the guest OS can see and take advantage of them.

	The hook expects a custom property called cpuflags, where the syntax
	is uses following conventions:

	1. '+feature' (all lowercase) enables a feature,
	2. '-feature' (all lowercase) disables a feature,
	3. UPPERCASE indicates a group of features (currently implemented is
	special SAP group)
	4. features and groups are separated by comma

	It is then transformed into libvirt XML, more specifically <cpu>
	element features.

2017-07-31  Francesco Romani  <fromani@redhat.com>

	virt: vm: add try_to_extend_drive
	Extract Vm.try_to_extend_drive from Vm.extendDrivesIfNeeded.
	The new method will try to extend a single drive, while the
	existing method always scanned all the Vm drives, trying to
	extend any of them.

	We reimplement Vm.extendDrivesIfNeeded on top of the new method,
	with no changes in behaviour.

	This change makes the room for the usage of the libvirt
	BLOCK_THRESHOLD event. When this event fires, we will know
	which drive needs to be extended, so it is pointless and wasteful
	to scan all the drives again.

2017-07-30  Nir Soffer  <nsoffer@redhat.com>

	gluster: Disable blivet tests also on Fedora 26
	Same issue seen on rawhide exists also in Fedora 26.
	See https://bugzilla.redhat.com/1450607.

	travis: Add Fedora 26 build

	dockerfile: Remove Fedora 24 image
	We stopped using this image since commit 33e80260b1cf (rawhide: Add
	travis Fedora rawhide build) on May 7, and Fedora 24 is approaching end
	of life soon.

2017-07-28  Nir Soffer  <nsoffer@redhat.com>

	dockerfile: Add Fedora 26 image

2017-07-28  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: Migrate testFailWithInvalidParams to the new func tests

2017-07-28  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	hooking: move to lib
	As part of broader migration we move hooking.py away from vdsm dir.

2017-07-28  Andrej Krejcir  <akrejcir@redhat.com>

	RPC: Fix tests in integration/jsonRpcTests.py
	The tests were broken by patch:
	https://gerrit.ovirt.org/#/c/79299/

	This patch fixes them.

2017-07-28  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: Migrate testFailWithInvalidIpConfig to the new func tests

2017-07-27  Dan Kenigsberg  <danken@redhat.com>

	net: place bonding defaults under /var/run
	vdsm-tool places bonding-defaults.json under /usr/share. However,
	the proper place to store application data that is generated every boot
	is under /var/run.

	net test: use static bonding defaults if dump fails
	sysfs_options_mapper.dump_bonding_options may fail during the test if
	its target directory is missing. In such a case, take the shipped
	defaults.

	testrunner: mock vdsm.common.constants.P_VDSM
	As long as we keep vdsm.constants as proxy to vdsm.common.constants, we
	need to keep them align also when mocked.

2017-07-27  Nir Soffer  <nsoffer@redhat.com>

	pki: Introduce the pki module
	This module keeps now the pki constants, used by the rpc layer and vdsm
	tool. This is not a very smart module but having it removes some
	constants imports. Also, the pki constants are not generated, so having
	them in a generated file is a bad idea.

2017-07-27  Idan Shaby  <ishaby@redhat.com>

	storage: add an option to zero volumes using "blkdiscard --zeroout"
	Up until now, we used "dd" to zero volumes.
	This patch introduces a new method to zero volumes, using
	"blkdiscard --zeroout".
	Note that this patch keeps the old "dd" method as the default one for
	zeroing volumes, and that it can be configured by setting the config
	value "zero_method".

	When "blkdiscard --zeroout" is used:
	1. If the underlying storage supports "write same" [1], then the kernel
	   quickly zeroes the volume using write same.
	   This can take ~ 90% less time than zeroing it using "dd".
	2. Otherwise, the kernel zeroes it by writing pages of zeros, just like
	   when using "dd".

	[1] For more info, please refer to the feature page "Wipe volumes using
	blkdiscard":
	http://www.ovirt.org/develop/release-management/features/storage/wipe-volumes-using-blkdiscard/

	Bug-Url: https://bugzilla.redhat.com/1367806

	storage: rename blkdiscard.blkdiscard to discard
	Since blkdiscard can not only discard devices, but also zero them using
	the "-z" flag, the functions in the blkdiscard module should have more
	informative names.

	storage: remove unused variable from blkdiscard_test

	storage: move blockdev_test to use pytest

	storage: change blockdev tests to use loop device
	Today, blockdev_test uses files for testing zero and discard operations.
	This is a limitation because real block operations cannot be executed on
	files. Therefore, this patch replaces it to use loop devices with
	backing files, so that block operations can be tested properly.

	exception: make InvalidConfiguration subclass of ContextException
	This patch makes InvalidConfiguration a subclass of ContextException in
	order to use the more convinient way of key-value logging for the
	details of the exception.

	Following is an example of the new error message:
	InvalidConfiguration: Invalid configuration value: {'reason':
	'Unsupported value for irs:qcow2_compat', 'supported_values': ('0.10',
	'1.1'), 'qcow2_compat': '2.0'}

2017-07-27  Dan Kenigsberg  <danken@redhat.com>

	net: use vdsm.common.constants
	Take P_VDSM_RUN and P_VDSM_LIB directrly from vdsm.common.constants.
	This removes the dependency of the network package on the global
	vdsm.constants module.

2017-07-26  Ala Hino  <ahino@redhat.com>

	fileVolume: Simplify *.meta glob building
	To locate children volumes, we need to build following glob pattern:

	    /rhev/data-center/.../sd_id/images/img_id/*.meta

	Previously, we did this using in an error prone way by splitting
	the path on "images", and adding back '/images/img_id/*.meta.
	In this patch, we replace the last path element of the volume path
	with "*.meta".

2017-07-26  Edward Haas  <edwardh@redhat.com>

	net tests: Patch BONDING_NAME2NUMERIC_PATH on package level
	Extend the current package level patching of BONDING_DEFAULTS to
	include BONDING_NAME2NUMERIC_PATH as well.

2017-07-26  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Remove networkDev and blockDev
	Now we use only a diskType property, therefore we do not
	need old blockDev/networkDev properties anymore.

	virt: Use Drive.diskType instead of networkDev and blockDev
	Now that we have explicit diskType we don't need to use the networkDev
	and blockDev properties. This is very useful when we set libvirt disk
	type property, or want to check for certain disk type.

2017-07-26  Francesco Romani  <fromani@redhat.com>

	metadata: more information in UnsupportedType
	Let the upper layer know which key caused the UnsupportedType exception.

	metadata: virt: handle empty element gracefully
	Currently, metadata.Metadata.load() returns None if fed with empty
	element. Example:

	<data>
	 <something />
	</data>

	will yield: {'something': None}

	This was not explicitely designed and it is a byproduct of how
	ElementTree works.
	Furthermore, this makes the roundtrip[1] impossible without extra processing.
	In this patch, we establish that empty element
	- is decoded at empty string if type is not specified, or if type is string
	- raises exception when it has a different type hint, and we try to
	  decode it.

	+++

	[1] assert expected_xml == metadata.dump(metadata.load(expected_xml))

2017-07-26  Nir Soffer  <nsoffer@redhat.com>

	tests: Document how to run pytests as root
	pytest is trying to keep the last 3 runs temporary directories, to allow
	inspection of test files after failed tests. This does not work well
	when running the tests both as root and regular user, when pytest
	running as regular user is trying to clean up old temporary directories
	created by root.

	The recommended way to solve this issue is to use separte --basetemp
	directories for root and regular user. Add section in the README about
	running the tests as root.

2017-07-26  Dan Kenigsberg  <danken@redhat.com>

	introduce vdsm.common.constants
	Many constants are used by all vdsm subsystems. This patch move
	vdsm.constants into vdsm.common in order to reflect this fact.
	The patch keeps a proxy module in vdsm.constants, so that we don't have
	to touch all the modules that import vdsm.constants in this single
	patch.

	vdsm.constants contains constants should be private to a specific
	module or subpackage. After moved to vdsm.common, I would like to
	continue to clean it up, and to keep there only values that must be
	shared by multiple different subsystems.

2017-07-26  Nir Soffer  <nsoffer@redhat.com>

	storage: Handle inaccessible storage when creating a drive
	We used to initialize diskType in __init__, to tell if it is a file or
	block storage. However this may fail during recovery if the storage is
	not available when creating the drive. Make diskType a computed property
	so we can create a drive at this point. Any operation that needs the
	disk type will fail later with OSError, until storage becomes accessible
	again.

	Bug-Url: https://bugzilla.redhat.com/1474320

	tests: Add failing test when storage is not available
	Since we initialize diskType in __init__, creating a drive when storage
	is not available will fail now. Add a failing test to demonstrate this.

	Bug-Url: https://bugzilla.redhat.com/1474320

2017-07-25  Edward Haas  <edwardh@redhat.com>

	net tests: Patch BONDING_DEFAULTS on package level
	Multiple tests are dependent on BONDING_DEFAULTS.
	Several tests (see tc_test module) are dependent on the bonding defaults
	but do not specify it (by patching it).
	These tests have been passing so far by chance: one of the patched tests
	have been chosen to run first.
	If an unpatched test runs first, it will fail.

	This patch is patching the BONDING_DEFAULTS at package level once,
	removing the need to patch individual tests.

2017-07-25  Nir Soffer  <nsoffer@redhat.com>

	storage: Remove the imageRepository package
	This package has only one module. Move the module to vdsm.storage and
	rename it to lowercase.

	qemuimg: Move to vdsm.storage
	qemuimg is a critical piece of storage, and should not be used from
	other packages. There is one usage in vdsm.virt.vm that we plan to
	eliminate by adding a new storage api.

	properties: Move to vdsm.common
	The properties module is used by virt and storage, and must be in the
	common library.

2017-07-25  Francesco Romani  <fromani@redhat.com>

	lib: add collectd client
	add collectd client library, using the plain text protocol
	over the unixsock plugin.

	We ship the configuration for the unixsock plugin; however,
	it must be noted that this protocol is not well suited to
	transfer large amount of data. We may need to switch to a more
	performant solution to handle high loads.

	However, the end goal is to make Engine consume data directly
	from collectd (or the final metrics store), so this is
	a good first step and backward compatibility option.

	NOTE: until rhbz#1304029 is fixed, we will still need manual
	intervention.

	NOTE: Unfortunately, this code:
	https://github.com/collectd/collectd/blob/master/contrib/collectd_unixsock.py
	is not shipped by default (nor, as far as we know, supported
	as official python client), so we roll our own.

2017-07-25  Nir Soffer  <nsoffer@redhat.com>

	password: Move to vdsm.common
	This is part of vdsm packages cleanup, moving common modules to
	vdsm.common.

	While modifying the import, I also sorted the imports around the
	password imports. Some modules imports were extremely messy so I use the
	opportunity to clean up the mess.

2017-07-25  Ala Hino  <ahino@redhat.com>

	fileVolume: Fix volume path spliting when domain or server path contains "images"
	In getChildrn helper that was introduced in commit 317b957f (New
	getChildrenList implementation), we get the domain path from the
	image path by splitting the path by 'images'. However, this
	logic is broken if the path contains 'images'. For example:

	    /rhev/data-center/mnt/images.com:_path/...
	    /rhev/data-center/mnt/server:_images/...

	In this patch, we improved the split logic by:
	1. Split by '/images/' instead of 'images'
	2. Split from right instead of from left

	In addition, as the same split logic is implemented in
	getDomUuidFromVolumePath helper, we fixed it as well.

	Bug-Url: https://bugzilla.redhat.com/1461029

2017-07-24  Dan Kenigsberg  <danken@redhat.com>

	move constants.P_VDSM_STORAGE to storage.constants

	drop constants.EXT_PYTHON
	commands_test and gluster.gfapi's ugly hack can use sys.executable.

	move constants.SUPPORTED_DOMAIN_VERSIONS to storage.constants
	DOMAIN_VERSIONS and SUPPORTED_DOMAIN_VERSIONS belong to storage
	subsystem.

	move constants.SUPPORTED_BLOCKSIZE to storage.constants

	Makefile: replace astrisks with equal signs
	Tripple astrisks are used to mark failures in make and other utilities.
	Let us use '===' instead for comments.

2017-07-24  Francesco Romani  <fromani@redhat.com>

	virt: recovery: update domain XML from libvirt
	In the XML creation flow, we take steps to make sure we save the
	domain metadata in the libvirt domain XML. We do not, however,
	alter in any way the XML we receive from the client (Engine).
	This is a good practice, because we should consider the VM params
	as read-only.

	However, this means that the client-provided domain XML is no longer
	up to date in the recovery; the one stored in libvirt always is,
	so in the recovery path we should override the XML stored in the
	recovery file with a fresh copy obtained from libvirt.

	virt: devices: skip legacy-init-only devices
	We should skip legacy-init-only devices (storage devices) when
	parsing the `devices` section of the domain XML, to avoid to raise
	NotImplementedError.

	We didn't expect any storage device there, but it may be added for
	payload devices.

	vm: devices: constant for legacy-init-only devices
	Hide the device classes which don't support the XML initialization
	flow behind a constant, like we did for devices needing XML refresh.

2017-07-24  Petr Horáček  <phoracek@redhat.com>

	network: add IPAddressApi and its iproute implementation

2017-07-24  Andrej Krejcir  <akrejcir@redhat.com>

	RPC: Refactor JSON RPC exceptions
	JsonRpcError class is now derived from ContextException
	and other derived exceptions use the context to
	provide more information.

	For example, new error message for JsonRpcMethodNotFoundError is:
	  The method does not exist or is not available: {'method': 'some_missing_method'}

	Also added a new class JsonRpcServerError, that can have
	any code and message.

	RPC: Fix error messages in JsonRpcResponse
	JsonRpcResponse.error is now always an exception
	object derived from JsonRpcError.

	Previously it could also be a dictionary which caused problems.

2017-07-24  Dan Kenigsberg  <danken@redhat.com>

	sslutils: add info to SSLHandshake errors
	Include name of peer and its full certificate if they do not match,
	in order to understand which non-legitimate client attempts to connect.

2017-07-24  Francesco Romani  <fromani@redhat.com>

	vm: initialize logger as early as possible
	We need to be able to use the VM logger as soon as possible,
	and this patch makes it happen.

2017-07-23  Dan Kenigsberg  <danken@redhat.com>

	hook: checkimages: define GiB properly
	The constant is called GIB, but the value was that of the plain decimal
	GB.

	janitorial: drop once-used P_VDSM_KEYS
	PKI_DIR leads to basically the same place.

	move constants.EXT_BRCTL to its sole current user
	EXT_BRCTL is not going to move anytime soon from /usr/sbin/brctl. This
	patch defines this constant inside its sole current user, dummybr.

	move constants.P_VDSM_NODE_ID to its sole user

	move vdsm.constants.UUID_GLOB_PATTERN to storage.constants
	UUID_GLOB_PATTERN is used only by storage, and should be defined there
	as well.

2017-07-22  Dan Kenigsberg  <danken@redhat.com>

	net: move API.updateTimestamp to net.connectivity.confirm
	When connectivityCheck=True is passed to the setupNetworks verb, an
	automatically roll back is performed, unless connectivity is confirmed
	by the client. Note that Vdsm does not have an explicit
	connectivity_confirm verb. connectivity_confirm is called as a side
	effect of the ping verb.

2017-07-22  Edward Haas  <edwardh@redhat.com>

	net: Get iface mtu using netlink instead of sysfs
	link.iface module mostly uses netlink to fetch iface properties.
	For consistency and efficiency, mtu is now collected through netlink.

	net: Remove netinfo.mtus module and relocate content
	The getMtu funtion has been relocated to link.iface and renamed to
	get_mtu.
	This patch is another step towards cleaning up netinfo package.

	net: Remove getMaxMtu function and inline it in the caller
	getMaxMtu implementation is trivial enough not to require a special
	function.
	This patch is contributing to the netinfo cleanup effort.

2017-07-20  Francesco Romani  <fromani@redhat.com>

	virt: add libvirtxml.make_minimal_domain helper
	Add the helper to create a minimal meaningful Domain object.
	We add all the elements which don't need any logic to be added -
	besides the check on architecture.

	Everything else should be added explicitely.
	Trivially adapt the tests, and fixes the acpi_enabled tests, solving
	rhbz#1472286

	Bug-Url: https://bugzilla.redhat.com/1472286

	virt: libvirtxml: don't do appendMetadata in init
	The __init__ method of libvirtxml.Domain claims that it will
	create a minimal 'skeleton Domain'.
	If this is the purpose, then the method does already too much:
	appendMetadata doesn't belong here, so this patch removes from it.

	We should do the least possible amount of work in __init__, and
	if we add metadata in here it becomes hard to draw a line to
	distinguish what belongs and what doesn't.

	With this patch, we aim to establish a boundary: anything that is
	currently handled by methods (e.g. appendOs, appendMetadata...)
	should not be handled in __init__, which will now only contain the
	very basic mandatory elements (e.g. memory, vcpus).

	On the other hand, there is the need for a convenient way to create
	a simple valid Domain to represent the VM configuration.
	This means that we will add all the elements that don't require
	setup or non-trivial logic, ruling out hugepages, numa settings, devices.
	We will use this in the Vm class to uniformly access the Vm
	configuration regardless if it is given in the old vm.conf format
	or in the new domain XML format.

	This is going to be handled by one upcoming patch will add one
	helper to make a minimal domain, calling all the right methods.

	With all the patches in this topic, we will have:
	1. call libvirtxml.Domain(...) only to get the skeleton, the bare
	minimum domain representation.
	2. call the new helper method to get a minimal but meaningful domain
	representation
	3. call the various append* methods to complete the representation,
	adding extra elements which require extra setup steps.

	Bug-Url: https://bugzilla.redhat.com/1472286

2017-07-19  Nir Soffer  <nsoffer@redhat.com>

	task: Fix wrong import during recovery
	During task recovery, task try to import a module name, failing with:

	2017-07-16 18:49:11,395+0300 ERROR (tasks/9) [storage.TaskManager.Task]
	(Task='8e3b5318-2b14-450d-bcb2-a6caf841b142') Unexpected error
	(task:870) Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 877, in _run
	    return fn(*args, **kargs)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 398, in run
	    [self.moduleName])
	ImportError: No module named storage.volume

	This is expected since there is no module name storage.volume. All
	storage modules moved recently to vdsm.storage. Fix the import path to
	use the correct fully qualified module name.

	Bug-Url: https://bugzilla.redhat.com/1472253

2017-07-19  Francesco Romani  <fromani@redhat.com>

	tests: virt: add test for Vm.acpi_enabled()
	In commit a877434796eeb5af513 we started to use DomainDescriptor
	even for VM configured using the legacy vm.conf format.
	We want one uniform way to inspect the Vm configuration, regardless
	of how the Vm was started.

	Unfortunately, the Vm.acpi_enabled() call started to misreport the
	ACPI state. This happens because in the Vm.conf flow we build
	early a minimal DomainDescriptor out of the configuration we received,
	but we don't call all the initialization method we need.

	Add tests to demonstrate this issue.

	Bug-Url: https://bugzilla.redhat.com/1472286

2017-07-19  Sahina Bose  <sabose@redhat.com>

	storage: Add LibgfApi support as additional feature
	To enable cluster level support for libgfapi

	Bug-Url: https://bugzilla.redhat.com/1022961

2017-07-19  Denis Chaplygin  <dchaplyg@redhat.com>

	virt: enable glusterfs access through libgfapi interface
	This patch will allow qemu to access gluster volume using libgfapi
	interface.

	After introduction of libgfapi interface in Glusterfs, QEMU supports
	access of disks in glusterfs through libgfapi as well.

	To enable glusterfs volume access through its libgfapi interface,
	gluster storage disk should be exposed as network device to qemu,
	it also need info such as host, volume and image path to construct
	a url syntax which has to fit as a command line argument to qemu.

	This change is based on Federico's changes:
	https://gerrit.ovirt.org/33768/

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022961

2017-07-19  Francesco Romani  <fromani@redhat.com>

	virt: devices: add test for hostdev NICs
	Add test to make sure the hostdev NICs are correctly handled.

2017-07-18  Petr Horáček  <phoracek@redhat.com>

	network: remove ip from a nic used by a removed network
	Bug-Url: https://bugzilla.redhat.com/1432386

2017-07-18  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Added retrieval of bricks participating in gluster volume
	We need other bricks data, so it can be supplied to
	libgfapi in advance, so it will not depend on
	availability of a single brick, specified
	in gluster url.

	Bug-Url: https://bugzilla.redhat.com/1022961

2017-07-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make sure Vm._start_time is always initialized
	It may not be always present in metadata, at least in case of external VMs.

2017-07-18  Petr Horáček  <phoracek@redhat.com>

	static: use tabs for indetation in Makefile

2017-07-18  Irit Goihman  <igoihman@redhat.com>

	sos: fix addCopySpecLimit call
	sosreport 3.4 replace add_copy_spec_limit with
	add_copy_spec.
	commit 2e2559d4f3dd7625e52aad3314379ef1ee2afe41 replaced
	this call but apperantly in prior sosreport versions,
	number of parameters of add_copy_spec method was different and
	caused a TypeError.

	Bug-Url: https://bugzilla.redhat.com/1471663

2017-07-17  Milan Zamazal  <mzamazal@redhat.com>

	virt: Rename Vm._cleanup_domain to Vm._undefine_domain
	Vdsm maintainers suggest _undefine_domain as a better name for that method.

2017-07-16  Dan Kenigsberg  <danken@redhat.com>

	spec: move libvirt-hook.sh to its static location
	This is another step to clean %install in the spec file.

2017-07-14  Dan Kenigsberg  <danken@redhat.com>

	gitignore: remove needless line
	commit 930686 removed this script, but forgot to clean .gitignore of it.

2017-07-13  Irit Goihman  <igoihman@redhat.com>

	check_imports: fix expected to fail
	expected_to_fail should be initialized to an empty set, since
	it used to be a set and not a dict.
	This caused travis fedora rawhide builds to fail:

	check_imports.py:43: in find_modules
	    expected_to_fail.add("vdsm.gluster.storagedev")
	E   AttributeError: 'dict' object has no attribute 'add'

2017-07-13  Nir Soffer  <nsoffer@redhat.com>

	monitor: _notifyStatusChange should not be a cancelpoint
	This method is very fast, so there is no need to make it a cancellation
	point. Also, it is called from the checker event loop thread, so it may
	abort this thread in the unlikely case when the monitor thread is
	stopped while the checker event loop thread is blocked on this method.

	Bug-Url: https://bugzilla.redhat.com/1469175

	monitor: Fix domain monitoring isolation
	Previously we tried to acquire a host id both from the checker event
	loop thread when a checker completes, and from the monitor thread. We
	assumed that acquiring a host id is a fast operation since we are using
	async=True. However, during other flows, we are acquiring the host id
	using async=False. Acquiring the host id takes about 20 seconds
	normally, but can take up to 3 minutes if the host was not shutdown
	cleanly. This leads to blocking of the event loop thread, delaying
	checking of unrelated domains.

	The problematic flow is:

	1. Request thread acquire host id with async=False
	2. Request thread takes the SANLock._lock
	3. Check thread finish and try to acquire with async=True
	4. Check thread blocked on SANLock._lock until acquire finish

	When this happens, we see this warning:

	2017-07-11 19:13:35,546-0400 WARN  (check/loop) [storage.asyncutils]
	Call <bound method DirectioChecker._check of <DirectioChecker
	/dev/3997e663-0f09-4e29-b7de-c69975f734b4/metadata running
	next_check=4295185.60 at 0x2fda350>> delayed by 1.42 seconds
	(asyncutils:138)

	Additionally, MonitorThread._acquireHostId is ia a cancellation point,
	raising utils.Canceled exception when the monitor thread is stopped.
	This is fine in the monitor thread, since it was designed for
	cancellation, but raising a BaseException subclass in the event loop
	abort the event loop. This can explain the silent death of the event
	loop threads seen in the bug.

	When this happens, we would see this log:

	2017-07-12 03:35:16,889+0300 ERROR (check/loop) [root] FINISH thread
	<Thread(check/loop, started daemon 139956156602112)> failed
	(concurrent:198)
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/common/concurrent.py", line 191, in run
	    ret = func(*args, **kwargs)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 125, in run_forever
	    self._run_once()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 190, in _run_once
	    handle._run()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 394, in _run
	    self._callback(*self._args)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 577, in reap
	    self._complete(rc)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/check.py", line 337, in _check_completed
	    self._complete(result)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/monitor.py", line 496, in _pathChecked
	    raise utils.Canceled("Simulating cancellation in _acquireHostId")
	Canceled: Simulating cancellation in _acquireHostId

	Finally, acquiring a host id from two threads creates a race when
	checking if host id should be released. I think this race is the root
	cause for random failure in seen in bug 1449944, and so far this issue
	was not seen with this patch.

	This patch changes host id acquire so it is done only from the monitor
	thread, so the checker thread can never block on clusterlock internal
	lock, and would not get cancelled by mistake.

	Bug-Url: https://bugzilla.redhat.com/1469175
	Bug-Url: https://bugzilla.redhat.com/1449944

	check: Handle errors the complete callback
	When a check is completed, the checker invokes a complete callback.
	Error in the complete callback are failure of the user code implementing
	the callback, not a checker error, so it is a good idea to handle the
	error immediately, instead of propagating the error to the event loop.

	When an error in a complete callback is unhandled, we would see this
	log:

	2017-07-11 23:02:41,420+0300 ERROR (check/loop) [storage.check]
	Unhandled error in complete callback (check:339)
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/check.py", line 337, in _check_completed
	    self._complete(result)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/monitor.py", line 496, in _pathChecked
	    raise RuntimeError("Faulty complete callback")
	RuntimeError: Faulty complete callback

	Bug-Url: https://bugzilla.redhat.com/1469175

	asyncevent: Log errors in handle_error()
	asyncore.poll2 delegates error handling to dispatcher's handle_error(),
	but it does *not* handle the case when handle_error() raises. This used
	to abort the event loop.

	Now when faulty handle_error() raises, we would get this log:

	2017-07-11 22:42:15,229+0300 ERROR (check/loop) [storage.asyncevent]
	Unhandled error in I/O handler (asyncevent:168)
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 163, in _run_once
	    asyncore.poll2(timeout, self._channels)
	  File "/usr/lib64/python2.7/asyncore.py", line 201, in poll2
	    readwrite(obj, flags)
	  File "/usr/lib64/python2.7/asyncore.py", line 123, in readwrite
	    obj.handle_error()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 539, in handle_error
	    raise RuntimeError("Faulty error handler")
	RuntimeError: Faulty error handler

	Bug-Url: https://bugzilla.redhat.com/1469175

	asyncevent: Add failing test for handle_error failures
	asyncore.poll2() does not handle errors raised from dispatchers
	handle_error() implementation. This abort the event loop thread.
	This patch adds a failing test to demonstrate this issue.

	Bug-Url: https://bugzilla.redhat.com/1469175

	asyncevent: Fix double complete calls on errors
	BufferedReader is calling the complete callback when the reader is
	closed in handle_close(). This handler is called both for normal
	termination (the file descriptor was closed), or when an error occurred,
	from handle_error().

	Due to asyncore error handling mechanism, if the complete callback
	raises, handle_error is called. This was leading to a second failure in
	the complete callback, raising a new exception which is *not* handled by
	asynccore, and is *not* handled by the EventLoop, terminating the
	EventLoop.

	Here is an example error, simulated by adding an assert in the
	monitor.py:

	2017-07-10 22:14:38,335+0300 ERROR (check/loop) [storage.asyncevent]
	Unhandled error in <vdsm.storage.asyncevent.BufferedReader connected at
	0x36715a8> (asyncevent:527)
	Traceback (most recent call last):
	  File "/usr/lib64/python2.7/asyncore.py", line 114, in readwrite
	    obj.handle_close()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 523, in handle_close
	    self._complete(self._data)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/check.py", line 318, in _read_completed
	    self._check_completed(rc)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/check.py", line 336, in _check_completed
	    self._complete(result)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/monitor.py", line 495, in _pathChecked
	    assert 0, "Simulating unexpected failure in _acquireHostId()"
	AssertionError: Simulating unexpected failure in _acquireHostId()
	2017-07-10 22:14:38,336+0300 ERROR (check/loop) [root] FINISH thread
	    <Thread(check/loop, started daemon 139829069199104)> failed
	    (concurrent:198)
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/common/concurrent.py", line 191, in run
	    ret = func(*args, **kwargs)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 125, in run_forever
	    self._run_once()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 162, in _run_once
	    asyncore.poll2(timeout, self._channels)
	  File "/usr/lib64/python2.7/asyncore.py", line 201, in poll2
	    readwrite(obj, flags)
	  File "/usr/lib64/python2.7/asyncore.py", line 123, in readwrite
	    obj.handle_error()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 528, in handle_error
	    self.handle_close()
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/asyncevent.py", line 523, in handle_close
	    self._complete(self._data)
	  File "/usr/lib/python2.7/site-packages/vdsm/storage/check.py", line 311, in _read_completed
	    rc = self._proc.poll()
	AttributeError: 'NoneType' object has no attribute 'poll'

	This patch fix the double complete calls in the BufferedReader. I think
	this is the root cause of this bug.

	A later patch will fix the EventLoop so it does not terminate on I/O
	errors from asyncore.

	Bug-Url: https://bugzilla.redhat.com/1469175

2017-07-13  Edward Haas  <edwardh@redhat.com>

	net: NM acquire should ignore duplicate ifcfg files
	When quering NM DBUS to translate a file path to a connection ID, an
	error with "is not an ifcfg base file" is raised when the file is a copy
	of an existing ifcfg file (a backup).

	This patch ignores these king of error the same way it did for non ifcfg
	files that are named with the ifcfg prefix.

	Bug-Url: https://bugzilla.redhat.com/1441530

2017-07-13  Dan Kenigsberg  <danken@redhat.com>

	net: move EXT_TC into vdsm.network.tc
	The only users of EXT_TC is the tc package and its tests. There is no
	need to expose it in the global constants module.

2017-07-13  Irit Goihman  <igoihman@redhat.com>

	move vdsmd from vdsm dir
	vdsmd.py moved to lib/vdsm and vdsmd script moved
	to static directory

2017-07-13  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	lib: move API
	As part of bigger effort we move modules from vdsm to lib.vdsm. This
	patch moves API.

	lib: move clientIF
	As part of bigger effort we move modules from vdsm to lib.vdsm. This
	patch moves clientIF.

2017-07-13  Nir Soffer  <nsoffer@redhat.com>

	utils: Remove CommandStream
	The only usage was in qemuimg, using now operation.Command. Remove the
	class and the tests.

	qemuimg: Replace CommandStream with Command
	Now that operation.Command supports streaming, we can use it to process
	qemu-img progress reports. This simplifies qemuimg.QemuImgOperation as
	most of the logic is already implemented in operation.Command.

	This also simplify and make caller code safer, as operation.Command()
	cannot be used incorrectly, and does not need to be closed when done.

	The qcow2_test module can run now on python 3, since we don't use
	deathSignal any more. However turns out that qemuimg.ProgressCommand is
	mixing bytes and strings, so this module is not compatible yet with
	python 3. I marked the estimate tests as expected failure on python 3
	instead of skipping them.

2017-07-13  Francesco Romani  <fromani@redhat.com>

	virt: remove vdsm/virt directory
	All the content was moved under lib/vdsm/virt, so we don't need
	this subdirectory anymore. Good riddance.

2017-07-13  Dan Kenigsberg  <danken@redhat.com>

	API: drop no-longer-needed calls to updateTimestamp
	The code dropped in this patch was required for ancient Engine versions
	(pre 3.1), which are not supported for a very long time. Read more in
	commit 95302a1 which introduced these calls.

	virt.sampling: drop dead code
	recentClient was used by the connectivity log, and should have been
	dropped in commit f68cc2d7. This patch stops updating a field that no
	one reads

	net: remove vintage ovirt-node code piece
	ovirt-node vintage is not with us since ovirt 3. This patch removes a
	piece of dead code.

2017-07-12  Nir Soffer  <nsoffer@redhat.com>

	clusterlock: Remove unused variable
	The _sanlcokfd instance variable was never used. The single sanlock fd
	is kept in the _sanlock_fd class variable.

2017-07-12  Irit Goihman  <igoihman@redhat.com>

	move vm.py to lib/vdsm/virt

2017-07-12  Milan Zamazal  <mzamazal@redhat.com>

	virt: Switch to persistent domains
	We have been using transient domains for running VM so far.  They disappear
	when their VMs stop running at the given host.  Detailed information about a
	destroyed VM is still retained in its recovery file, until Engine asks for
	releasing it.

	We would like to stop using Vdsm specific recovery files and use libvirt domain
	XML as the complete and ultimate source of information about a VM instead.  In
	order to be able to access the domain data before the VM is started or after
	it's stopped, similarly to the recovery files, we need persistent domains that
	don't disappear immediately.

	This patch switches from transient to persistent libvirt domains.  Creation and
	removal of the domains is handled similarly to recovery files.  The only extra
	feature is that we must remove the domain, if it exists, before a VM is
	defined.

	This patch has already been applied and reverted, due to missing support in
	libvirt for live storage migration of persistent domains (see
	https://bugzilla.redhat.com/1458548 and https://bugzilla.redhat.com/1459113).
	The support is available in development libvirt versions now, so we can apply
	the patch again with a required change to blockCopy libvirt call and test it.
	We keep backward compatibility with released libvirt versions until the updated
	libvirt is generally available.

2017-07-12  Francesco Romani  <fromani@redhat.com>

	virt: devices: set class name for not implemented
	When raising NotImplementedError, report class name to make
	evident which class is at fault.

	vmstats: extract the nic_info helper
	We need to create per-nic dict with the stats, as per API contract.
	Let's extract a helper to create the basic per-nic structure of the
	aforementioned dict, to be used in the existing code and also in the
	upcoming collectd-based flow.

2017-07-11  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Use cmdutils.Error for qemu-img commands
	This prepare the code for using new operation.Command for watching
	qemu-img output in qemuimg.commit() and qemuimg.convert(), and unify
	error handling, since qemuimg.rebase() is already raising this error.

2017-07-11  Dan Kenigsberg  <danken@redhat.com>

	net: keep our own BRCTL constant
	BRCTL has two usages: in vdsm-tool, and in the ifcfg network
	configurator. It resolves to /usr/sbin/brctl on all platforms.

	In order to facilitate future separation of the network subpackage, this
	patch defines network's own copy of BRCTL.

	openstacknet hook: do not use vdsm-internal constants
	Hooks should avoid vdsm internals. Luckily, EXT_BRCTL is already
	defined in openstrack_utils. The hook script should use its
	locally-available definition.

	net: move IFDOWN and IFUP into ifcfg
	Nobody outside the ifcfg configurator needs IFDOWN nor IFUP. They
	resolve to /sbin/ifdown and /sbin/ifup on all platforms. This patch
	localizes the constants into the network subsystem, where they belong.

2017-07-11  Nir Soffer  <nsoffer@redhat.com>

	concurrent: Log BaseException when threads finish
	We logged an exception when thread fails with Exception, but
	BaseExceptions are ignored silently. This may hide real errors raising
	BaseException subclasses.

	We log now a DEBUG message if a thread terminated with SystemExit or
	KeybardInterrupt. These are unlikely, but are not user code error.
	Anything else, including BaseException subclasses is considered as
	critical failure and log a traceback.

	Bug-Url: https://bugzilla.redhat.com/1469175

2017-07-11  Francesco Romani  <fromani@redhat.com>

	virt: devices: hostdev: add from_xml_tree
	Make it possible to initialize a Host device from its
	XML representation.

2017-07-11  Dan Kenigsberg  <danken@redhat.com>

	spec: install 85-vdsm-hook-fcoe.preset in Makefile

	spec: install 85-vdsmd.preset in Makefile

	spec: install tmpfiles.d/vdsm.conf and libvirtd.service.d/unlimited-core.conf in Makefile
	Another little step in the quest to clean the spec file.

2017-07-11  Francesco Romani  <fromani@redhat.com>

	vmstats: extract the disk_info helper
	We need to create per-disk dict with the stats, as per API contract.
	Let's extract a helper to create the basic per-disk structure of the
	aforementioned dict, to be used in the existing code and also in the
	upcoming collectd-based flow.

2017-07-11  Dan Kenigsberg  <danken@redhat.com>

	net: eliminate LEGACY_MANAGEMENT_NETWORKS
	LEGACY_MANAGEMENT_NETWORKS are used only once in netupgrade. There is no
	need to keep this constant any more

2017-07-11  Francesco Romani  <fromani@redhat.com>

	virt: vmstats: drop the unused `interval` argument
	Not used anymore since commit ffbf6a3db1297586bf7

2017-07-10  Sahina Bose  <sabose@redhat.com>

	spec: Conditionally use gluster version
	Use glusterfs >=3.8 for RHEL and use
	latest upstream for all other distro.

2017-07-10  Francesco Romani  <fromani@redhat.com>

	metadata: make sure the nodes are sorted
	Sorting the nodes gives us two benefits:
	1. false negative tests due to out of order attributes are no longer
	possible.
	2. easier to debug output.

	The metadata XML are expected to be small, so the performance cost
	should be negligible.

	See the review of https://gerrit.ovirt.org/#/c/76817/ for more
	details.

2017-07-10  Petr Horáček  <phoracek@redhat.com>

	network: make sure to pass bytes to io.BytesIO

2017-07-10  Dan Kenigsberg  <danken@redhat.com>

	spec: install udev-rules in Makefile
	The %install section of the spec file should be much cleaner. This is
	only one tiny step in that direction.

2017-07-10  Francesco Romani  <fromani@redhat.com>

	vm: create devices from engine XML
	Now that most of the devices allow to be initialized
	from their XML representation, we can support the engine XML creation
	flow. This patch does so adding the final pieces to the puzzle.

	In the existing, vm.conf-based creation flow, Vdsm will
	adjust the device configuration received by Engine on per-host basis
	(example: leases, storage, OVS networking...), then initialize
	the devices object from that configuration. The last step is to
	compose the libvirt domain XML using the device objects and the
	VM configuration received by Engine.

	The XML creation flow is slightly different. Engine sends almost all
	the VM configuration already encoded in a well-formed domain XML,
	with the notable exceptions of the storage devices (see below).
	Vdsm parses the information it needs from this XML to fill the VM and
	devices data structures, but most of the XML is unchanged. The
	only changes are again the host-specific parts, which Vdsm fills
	with the data it gathered.

	Actually, currently Vdsm doesn't fill the gaps, but rather regenerates
	the device-specific XML snippet. The end result is the same, but we
	took this approach because it is the one which requires less changes
	considering the current infrastructure.

	The only notable exception is the storage devices. Here Vdsm still
	expects the configuration to be sent *only* in the legacy vm.conf format,
	and will rebuild the devices XML snippets from scratch as it did before.
	We choose this approach because the high complexity of the storage
	devices.

	virt: sampling: make most of tests python3 ready
	Most of sampling tests are python3 ready. Let's
	move them under virttests/ and out of the blacklist.

2017-07-07  Dan Kenigsberg  <danken@redhat.com>

	packaging: eliminate /usr/lib/systemd/systemd-vdsmd
	This script was introduced many years ago (commit c01a733c) as a helper
	to the makeshift systemd service. Mistakenly, it was not removed by
	commit ad15e459 that introduced a proper systemd service. This patch
	drops the long-dead code.

	spec: drop VDSMRPCPYLIBDIR
	The spec file always replaces @VDSMRPCPYLIBDIR@ with the path of
	vdsm.rpc package. This can be done much simpler in python code.

	The original complexity was introduced, most probably, because of the
	former separation between lib/vdsm/ and vdsm/ trees.

2017-07-07  Nir Soffer  <nsoffer@redhat.com>

	tests: Add clusterlock test module
	Add basic tests for clusterlock.SANLock. These tests do not cover the
	entire code, but are good enough to be confident with the new code for
	waiting until host id is acquired when acquiring a lease.

	fakesanlock: Implement missing methods
	Implement the missing methods needed for testing the clusterlock module.

2017-07-07  Edward Haas  <edwardh@redhat.com>

	net: On MTU change to the default value update the ifcfg file
	When changing only the MTU on a bridged network to the default value
	(1500), the new value has not been updated in the ifcfg file.

	The problem has been detected on RHEL 7.4, where the MTU of the bridge
	is automatically updated to the default when it has no ports connected.

	Bug-Url: https://bugzilla.redhat.com/1460687

	net: Relocate DEFAULT_MTU costant to link.iface module
	Users of the DEFAULT_MTU do not directly need netinfo, they just require
	the default mtu value.
	This patch is partially cleanin up netinfo package and avoids uneeded
	dependency on netinfo.

	Bug-Url: https://bugzilla.redhat.com/1460687

2017-07-07  Francesco Romani  <fromani@redhat.com>

	tests: testlib: make read_data pick the right cwd
	testlib.read_data wants to make easy for a testcase
	to read some static data.
	To do so, it does some smart magic to automatically
	discover the Current Working Directory (CWD) and pick
	the specified file from the $CWD/data subdirectory.

	The current implementation, however, detects the
	CWD of the *defining* module (tests/testlib.py),
	not the one of the *calling* module.

	This either requires to duplicate the per-vertical hierarchy like

	tests/
	 +-data
	 |  +- virttests/
	 |  +- network/
	 |  +- storage/
	 +- virttests/
	 +- network/
	 +- storage/

	or makes the helper useless.
	This patch adds a bit more magic to read_data to make it
	detect the CWD of the calling module, so we can have this
	hierarchy instead, fully separated by vertical:
	tests/
	 +- virttests/
	     +-data/
	 +- network/
	     +-data/
	 +- storage/
	     +-data/

2017-07-06  Nir Soffer  <nsoffer@redhat.com>

	vm: Log the time took to extend a volume
	Measure the time to extend a volume from the time we decided that the
	volume should be extended, until the time the volume is refreshed after
	the extension.

	Note that during live storage migration we extend the replica volume
	before extending the original volume, so the time to extend the original
	volume includes the time to extend the replica.

	clusterlock: Move logs out of the locked region
	Move the log before performing an operation and after the operation
	completes out of the locked region. The main reason for this change is
	to make it easier to debug when multiple threads try to call the same
	code protected with the same lock.

	This change also modify the log level of the completion log to INFO, to
	make it easier to understand when the operation was finished. Without
	the completion logs, you have to guess the completion by searching for
	unrelated logs in in in the same flow.

	Bug-Url: https://bugzilla.redhat.com/1422508

	clusterlock: Wait until host id is acquired
	acquireHostId() is typically called with async=True from the domain
	monitor. Then the domain monitor invokes hasHostId() every monitoring
	cycle, until the operation completes. Vdsm reports the acquire status of
	a domain to engine, but unfortunately engine is ignoring the acquired
	status, and try to start storage jobs before the host id is acquired.
	This leads to failure to acquire a volume lease if a job was started
	before the asynchronous host id acquire operation was completed.

	This patch changes SANLock.acquire() to wait until a host id is acquired
	before trying to acquire a lease. If engine choose a bad host that did
	not acquire the host id yet, the job will be delayed up to 30 seconds in
	normal conditions when trying to acquire the volume lease.

	If sanlock cannot acquire the host id, a job may be delayed up to 180
	seconds waiting for host id acquire completion.

	Flows that acquire a temporary host id before acquiring a lease should
	not be effected by this change.

	I checked another approach, trying to acquire the host id if it was not
	acquired yet. This creates an ownership issue with the domain monitor,
	managing the host id acquire life cycle, so it was rejected.

	Bug-Url: https://bugzilla.redhat.com/1422508

2017-07-06  Francesco Romani  <fromani@redhat.com>

	virt: move the libvirt migration hook under lib/
	The only missing piece is vm.py, which will be moved
	once the work currently ongoing reaches a stable state.

2017-07-05  Petr Horáček  <phoracek@redhat.com>

	network: use bytes explicitly in netinfo.IPv4toMapped

	network: replace Popen calls with exec_sync
	In order to do required decoding of command output with Python 3,
	use network.cmd.exec_sync to run commands that used to be executed
	explicitly via Popen.

	network: make ipwrapper.drv_name Python 3 compatible
	In Python 3 array.array does not support 'c' (Python char) type anymore.
	We need to ask for C chars (Python ints) instead and then decode
	returned data if needed.

	network: to_str and to_binary
	Move to_str and to_binary functions under network py2to3.py module
	as they were needed and duplicated in multiple places.

2017-07-04  Eyal Edri  <eedri@redhat.com>

	Revert stomp client reconect patches
	This reverts all client reconnect commits

2017-07-04  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Added docstring to _getSourceXML

2017-07-04  Nir Soffer  <nsoffer@redhat.com>

	concurrent: Add ValidatingEvent
	This event behaves like threading.Event, but allow failing of current or
	future waiters by invalidating the event.

	Bug-Url: https://bugzilla.redhat.com/1422508

	clusterlock: Improve logging when acquiring host id
	Improve logging in SANLock.acquireHostId:

	- Do not log bogus success message when using async=True. In this case
	  the host id acquire is in progress, and the acquire will be discovered
	  later by the domain monitor. Previously we use to lie about successful
	  acquire while the operation was in progress.

	- Log success when using async=False. We have two cases - first, when
	  sanlock call failed with EINPROGRESS, and we check if host id is
	  acquired. Second, when sanlock call succeeded.

	- Log the time spent in sanlock.add_lockspace. This operation must be
	  very fast when using async=True, but may be very slow when using
	  async=False after a host was shutdown uncleanly. In both cases we
	  would like to know how much time the call was blocked.

	- Include the async flag in the log

	Bug-Url: https://bugzilla.redhat.com/1422508

2017-07-04  Denis Chaplygin  <dchaplyg@redhat.com>

	virt: Added support for explicit disk type value during live storage migration.
	This patch adds support for diskType to be sent by engine during
	live storage migration. It is needed for network drives support,
	as we can not detect type of those drive by ourself

2017-07-04  Nir Soffer  <nsoffer@redhat.com>

	pytest: Replace namedTemporaryDir with tmpdir fixture
	pytest tempdir builtin fixture is easier to use and more powerful than
	namedTemporaryDir:

	- No need to nest the test code in a with statement, keeping the tests
	  shorter and nicer to work with.
	- tmpdir supports join(), creating filenames inside the temporary
	  directory.
	- All tests are created inside a base directory, configured using
	  (configured to /var/tmp/vdsm in tox.ini)
	- Each test uses a unique directory (e.g. .../test_worst_0_10_1_0)
	  so it is easy to inspect the temporary files if a test failed.

	For more info on builtin fixtures see:
	https://docs.pytest.org/en/latest/builtin.html#builtin-fixtures-function-arguments

	pytest: Merge tests that have slow permutations
	Some tests were separated to test_xxx and test_xxx_slow and check_xxx,
	because some permutations were slow. When using pytest.mark.parametrize,
	we can use single test, and mark the each permutation as slow.

	pytest: Replace permutations with pytest.mark.parametrize
	Replace our custom parameterization decorator with
	pytest.mark.parametrize which is more flexible and has more useful
	features, like marking single permutation as expected failure.

	To use pytest.mark.parametrize, we must also convert the tests to pytest
	style - the classes cannot inherit from unitest.TestCase. This also
	allows using plain asserts instead of the assertXXX methods.

	For more info on pytest.mark.parametrize:
	https://docs.pytest.org/en/latest/parametrize.html#parametrizemark

	pytest: Replace broken_on_ci with pytest.mark.xfail
	pytest.mark.xfail is flexible enough to replace our custom broken_on_ci
	decorator, making the code more friendly to new developers.

	For more info on pytest.mark.xfail:
	https://docs.pytest.org/en/latest/skipping.html#xfail-mark-test-functions-as-expected-to-fail

2017-07-04  Francesco Romani  <fromani@redhat.com>

	virt: hostdev: add device_name_from_address
	For USB devices, it is not safe to assume that
	device name is always in the form "usb_%{bus}_%{device}".
	There are multiple cases in the wild on which this naive
	assumption doesn't hold.

	However, we already retrieve the full device listing
	from libvirt, and among other information we have the device name and
	its address, so we can build the mapping we need to
	later safely retrieve the device name given its address.

	lib: move normalize_pci_address to validate.py
	We move this function here from the virt.vmdevices.core module,
	since the hostdev module also wants to use it.

	Code-Move-Only: yes

2017-07-04  Irit Goihman  <igoihman@redhat.com>

	stomp: add integration tests for client reconnect
	Bug-Url: https://bugzilla.redhat.com/1376843

	stomp: set default heartbeat values and add grace period
	default incoming heartbeat used to be 5 seconds but was never checked.
	In an actual system the heartbeat should be greater, since CPU and network
	spikes affect the server communication and don't indicate there is a
	real communication problem.
	Also, in order to make sure incoming heartbeats are received and we won't
	close the socket before getting them, we add grace period for incoming
	heartbeats and reduce the outgoing heartbeats interval in order to make
	sure the outgoing heartbeats are received in server side.
	By default, number of retries after timeout is 1 to ensure fast recovery.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-07-03  Nir Soffer  <nsoffer@redhat.com>

	tests: Make random uuid test repeatable
	Use pseudo random number generator with specific seed value for a
	predictable list of random UUIDs.

	python3: Fix UUID packing/unpacking on python 3
	The old code was broken on python 3 because it used float division (/),
	and was depending on long integer representation ("L" suffix).  It also
	tried to reinvent the uuid module. We use now the uuid module for
	converting to/from integer value and uuid string.

	Due to PyCQA/pylint#961, we have to disable pylint member check when
	accessing UUID's int attribute.

	python3: Improve uuid packing tests
	Add tests verifying the packing format, ensuring that we don't change it
	in future refactoring.

	The new test is using pytest style. The old test was converted to the
	same style for consistency.

	python3: Run misc_test in python 3
	Skip tests that cannot run on python 3 (code use AsyncProc), and mark
	failing test packUuid/unpackUuid as expected failure. The rest of the
	tests pass on python 3.

2017-07-03  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Added disk type change logging
	Bug-Url: https://bugzilla.redhat.com/1022961

2017-07-03  Edward Haas  <edwardh@redhat.com>

	net: Unneeded newline is added when updating only the mtu
	When the MTU is updated on a bridged network, a special handling is
	conducted and a nasty newline may be added where not needed.

	This patch also makes sure a newline is always added at the end.

	Bug-Url: https://bugzilla.redhat.com/1460619

2017-07-03  Francesco Romani  <fromani@redhat.com>

	virt: metadata: remove dead code
	replaced by metadata.Descriptor.

	virt: network: use core.find_device_guest_address
	Use the existing helper instead of reinventing it.
	No changes in behaviour.

2017-07-02  Nir Soffer  <nsoffer@redhat.com>

	python3: Run qcow2_test on python 3
	The estimate tests are skipped now on python 3 since qemuimg.convert()
	used for the test is not compatible with python 3 yet. The rest of the
	tests pass.

2017-07-02  Irit Goihman  <igoihman@redhat.com>

	stomp: implement client reconnect
	After enabling incoming heartbeats in AsyncDispatcher,
	an implementation of handle_timeout is presented in the
	client side also.
	In the client side we wish to reconnect when we stop receiving
	incoming heartbeats according to a retry policy which defines
	number of tries and the timeout we wish to wait.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-07-01  Dan Kenigsberg  <danken@redhat.com>

	spec: move polkit rules location logic to automake

2017-06-30  Nir Soffer  <nsoffer@redhat.com>

	python3: Explicitly convert to int
	Python 3 does not convert float to int when performing bitwise
	operations, failing with:

	    TypeError: unsupported operand type(s) for &: 'float' and 'int'

	Fix by converting the argument to int in the caller.

	python3: Use bytes when writing to file
	Python 3 requires bytes when writing to files in binary mode.

	python3: Fix json loading in qemuimg
	In python 3 the json module requires a string instead of bytes, so we
	have to decode the data read from qemu-img stdout.

	python3: Add missing module stub for ioprocess
	We don't have yet ioprocess for python3, add a missing module stub to
	allow tests to run on python 3 by monkey-patching ioprocess.

	python3: Make missing sanlock module pass import
	On python 3 we are using a special missing sanlock module, that will
	fail when used, so we can test code monkeypatching sanlock on python 3.
	However sanlock constants are used during import, failing import of all
	the tests that import sanlock.

	Add the missing constants to sanlock, so importing the tests works.
	These tests can now be marked with pytestmark so they are skipped on
	python 3.

	python3: Remove most usages of contextlib.nested()
	This nested has been deprecated in favour of the multiple manager form
	of the with statement:

	   with ctx1(), ctx2():
	       ...

	There are only 2 places in storage using nested with dynamically sorted
	context mangers. Replacing this needs more work, probably using
	guarded.context().

	tests: Remove global panic mocking
	Global mocking of the panic function requires using our non-standard
	test runner. We want to be able to run any test using existing tests
	runners like py.test. Tests that needs to mock panic.panic() should
	monkey-patch it during the test.

	The old panic tests was testing the panic mock; replace the test with a
	test testing the real code.

2017-06-30  Francesco Romani  <fromani@redhat.com>

	virt: hostdev: rename attribute
	hostdev._DeviceTreeCache has one _parent_to_device_name attribute
	initialized once in __init__ and never touched again.
	On the other hand _parent_to_device_params is used in various method but
	never initialized. It seems we missed a trivial rename, this patch
	does that.

2017-06-30  Irit Goihman  <igoihman@redhat.com>

	move vdsm-gencerts.sh to static

2017-06-29  Nir Soffer  <nsoffer@redhat.com>

	python3: Run iscsi_test on python 3
	Two tests depending on AsyncProc are skipped now, rest of the tests pass
	on python 3.

	mailbox: Make run() private
	The run() method of the mailbox threads is not part of the interface; it
	is used as the thread target function, and it should not be invoked by
	any other code. Rename the methods to make this clear.

	tests: Skip root only tests using pytest
	Replace @ValidateRunningAsRoot and @ValidateNotRunningAsRoot with
	pytest.mask.skipif.

	tests: Mark slow and stress tests using pytest.mark
	Replace @slowtest and @stresstest with pytest.marks.

	When running from tox, slow and stress tests do not run but are not
	skipped; instead these they are reported as "deselected":

	    314 passed, 40 skipped, 91 deselected, 29 warnings in 22.40 seconds

	When running directly, for example when running a single module tests,
	all tests run by default:

	    $ pytest storage/asyncevent_test.py
	    ====================================================================================
	    test session starts
	    =====================================================================================
	    platform linux -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0
	    rootdir: /home/nsoffer/src/vdsm/tests, inifile:
	    collected 67 items

	    storage/asyncevent_test.py ...................................................................

	    =================================================================================
	    67 passed in 8.38 seconds
	    ==================================================================================

	To run only fast tests, disable slow or stress tests:

	    $ pytest -m "not (slow or stress)" storage/asyncevent_test.py
	    ====================================================================================
	    test session starts
	    =====================================================================================
	    platform linux -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0
	    rootdir: /home/nsoffer/src/vdsm/tests, inifile:
	    collected 67 items

	    storage/asyncevent_test.py ................................

	    ====================================================================================
	    35 tests deselected
	    =====================================================================================
	    ==========================================================================
	    32 passed, 35 deselected in 0.92 seconds
	    ==========================================================================

	tests: Run storage tests using tox and pytest
	Storage tests are running now using tox storage-py27, storage-py35, and
	storage-py36 (for Fedora rawhide) envs, using pytest instead of nose.

	The storage modules were removed completely from tests/Makefile. To
	blacklist modules not compatible with python 3 we use pytest
	--ignore=path option.

	See tests/README for more info on running the new tests.

2017-06-29  Irit Goihman  <igoihman@redhat.com>

	hugepages: add support for shared pages
	When we create a VM with a vhostuser vnic banckend,
	we need shared hugepages in order to enable communication.
	In order to enable it, we require a 'hugepages_shared' custom
	property.

	The configuration on engine host is as follows:

	$ engine-config -s  "UserDefinedVMProperties=hugepages=[0-9];hugepages_shared=(true|false)"

2017-06-29  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: add vdsm apis for webhooks in gluster eventing
	Webhooks can be registered in glusterfs to receive various
	events generated to gluster. This patchs adds the required
	vdsm verbs to support add, update, delete and syncing of
	webhooks.

	This needs glusterfs-events pacakges to be installed on
	the glusterfs servers.

	Bug-Url: https://bugzilla.redhat.com/1379309

2017-06-29  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Made diskType a real property.
	Drive should be constructed with some specified disk type.
	for compatibility reasons constructor parameter is optional
	and diskType getter will check actual disk type.

	diskType should be authoritative source for blockDev and networkDev.
	Earlier blockDev and networkDev properties was a correct way to
	determine type of Drive. Now we use diskType for that and
	blockDev and networkDev will be removed in the future.

	Bug-Url: https://bugzilla.redhat.com/1022961

	storage: Added tests for diskType
	diskType should be a real property, so this patch
	adds new tests to verify diskType behaviour.

	Bug-Url: https://bugzilla.redhat.com/1022961

2017-06-29  Francesco Romani  <fromani@redhat.com>

	tests: hostdev: extract hostdevlib
	It will be useful to avoid duplication for the new upcoming hostdev
	patch, which wants to add support to initialize devices from XML.

	Only code moving, necessary renaming and import fixing.

	virt: devices: hostdev: normalize pci addresses
	Let's always use the hex representation for PCI addresses.
	Libvirt supports mobth hex and dec, and to simplify our flows
	we just pick one.

	No expected changes in behaviour.

2017-06-28  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix mailbox thread leak test
	The thread leak test was added to make sure we close the thread pool and
	wait for the threads when stopping the mail monitor.

	There are many issues in this test:
	- Not sure what the asserts were testing. Looking at the original bug,
	  we should test that the worker pool threads were stopped, but the test
	  was asserting that the number of threads is the same as it was when
	  running the mailer.
	- The test was invoking run() - this can never happen in the real
	  code and is invalid use of this code. I think this was an attempt to
	  deal with stop being asynchronous.
	- The test was using utils.retry - this helper does not work in pytest

	Fix all the issues by simplifying the test to count the number of threads
	before creating the mail monitor, stop and wait until the mail monitor
	was stopped, and check that we did not leak any threads.

2017-06-28  Dan Kenigsberg  <danken@redhat.com>

	place sos plugin under lib

2017-06-28  Leon Goldberg  <lgoldber@redhat.com>

	net: Generate dump bonding options on boot and upgrade
	Compatible bonding options aren't guaranteed across different kernel
	versions, so a scenario where the kernel is upgraded and incompatible
	default options are lingering will cause problems.

	Instead of shipping with default options, dump bonding defaults on
	boot via network-init service and installation/upgrade via a new
	dedicated configurator.

	Bug-Id: https://bugzilla.redhat.com/1458549

2017-06-28  Irit Goihman  <igoihman@redhat.com>

	stomp: introduce restore_subscriptions in client
	restore_subscriptions is required for persisting subscriptions
	after client reconnects to server.

	Bug-Url: https://bugzilla.redhat.com/1376843

	stomp: stop using hard coded values for heartbeats
	We wish to support incoming heartbeats in JSONRPC client
	in order to implement reconnect mechanism.
	AsyncClient connect method used to send HEARTBEAT header with
	hard coded values, which are now configurable and enable both
	ways heartbeats.

	Bug-Url: https://bugzilla.redhat.com/1376843

	stomp: handle timeout in server side
	When the server stops receiving incoming heartbeats, it should
	cleanup subscriptions and close the fd.

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-06-28  Dan Kenigsberg  <danken@redhat.com>

	place [gs]et-conf-item scripts under libexec
	These are helper scripts used only by vdsm startup script

2017-06-28  Petr Horáček  <phoracek@redhat.com>

	network: move ip.address to its separate package
	In following patches IPAddress API and its implementation will be
	introduced.

2017-06-28  Francesco Romani  <fromani@redhat.com>

	vm: add helper to make device objects
	This helper is almost useless code moving now, but will make
	the introduction of the engine XML flow easier in the later
	patches. No intended changes in behaviour.

	Code-Move-Only: yes

	virt: metadata: use the Descriptor class
	We switch to the newly-introduced Descriptor class.

2017-06-27  Irit Goihman  <igoihman@redhat.com>

	stomp: handle incoming heartbeats
	According to stomp specification, Heart-beating can optionally be used
	to test the healthiness of the underlying TCP connection and to make sure
	that the remote end is alive and kicking. [1]
	until now, we ignored incoming heartbeats and raised ValueError
	when their value was not 0.
	This patch gets the incoming heartbeats and updates the
	dispatcher according to their value.
	incoming heartbeat will be updated every time a new frame will be
	received, indicating connection is still active.
	If timeout has exceeded, the frame handler (client or server) will handle
	it according to its implementation.

	[1] https://stomp.github.io/stomp-specification-1.2.html#Heart-beating

	Bug-Url: https://bugzilla.redhat.com/1376843

	spec: make sure infra package is deleted on upgrade
	infra package should be removed when upgrading to vdsm
	4.19 version (and above).
	The previous rule didn't cover 4.18.x versions so the package
	wasn't deleted on upgrade.

	Bug-Url: https://bugzilla.redhat.com/1460140

2017-06-27  Martin Betak  <mbetak@redhat.com>

	vm.py: Parse <on_reboot> destroy compatibility
	Added handling that translates the libvirt-native
	<on_reboot>destroy</on_reboot> sent by the engine, to the current
	metadata implementation.

2017-06-27  Francesco Romani  <fromani@redhat.com>

	virt: network: engine xml: support SRIOV devices
	Add support for SRIOV devices in the from_xml_tree flow.

	virt: devices: simplify 'device' and 'type'
	The vmdevices.core.parse_device_params() tried to be a generic
	helper to parse the very basic attributes common to all the devices.

	Among other things, it tried to extract the 'device' and 'type'
	attributes, used all across our device class hierarchy.

	We should settle for one meaning of those attributes:
	- device: the device class (e.g. Sound, Tpm, Graphics...)
	- type: the device subtype, should the device have one.

	The problem is that this is never ever enforced, so each and every class
	has the complete freedom to use those attributes how it likes.
	So, the 'type' could not be used at all, or used as alias for 'device',
	or any theoretical combination. And we had quite a lot of those
	combinations actually used in the code.

	The parse_device_params() helper tried to generalize a bit and
	return the aforementioned mapping, but this backfired badly,
	and we had a proliferation of reassignment or swaps between
	params['device'] and params['type']. This was utterly confusing.

	A cleanup of this mess is out of the scope for the devices-from-xml
	tree. The best we can do now is remove the failed attempt to generalize,
	and do the mapping per-device basis.
	At least now the code is less obscure, and we don't further increase the
	mess we already have.

	virt: vmstats: never raise if stat is missing.
	We used to try to distinguish if the lack of stat reported by libvirt
	is a serious issue or could be ignored. There are a lot of flows
	and circumstances to consider, making this a daunting task.

	Ultimately, all this effort is misplaced, because even if we can
	reliably detect that the lack of one expected stat is a bug, we can
	do nothing besides record this event in the log and carry on.
	The only noteworthy exception to this is if we somwhow ask for a key
	that can't exist; for this reason, better not to completely silence
	the failure.

	To handle those cases, one concise log is enough, no need to bubble
	up the exception and to spit scary stacktraces in the logs.

	Bug-Url: https://bugzilla.redhat.com/1458901

	virt: vmstats: use dedicated logger
	Let's not overuse the root logger.

	Bug-Url: https://bugzilla.redhat.com/1458901

	static: fix passwd file path
	Use full local path to make sure `make` finds the file.
	Without this patch, I hit

	make[2]: Entering directory '/home/fromani/Projects/upstream/vdsm/static'
	make[2]: *** No rule to make target
	 'usr/local/etc/pki/vdsm/keys/libvirt_password', needed by 'distdir'.
	  Stop.
	make[2]: Leaving directory '/home/fromani/Projects/upstream/vdsm/static'
	Makefile:625: recipe for target 'distdir' failed

	While doing 'make rpm'.

2017-06-27  Dan Kenigsberg  <danken@redhat.com>

	cleanup: remove unused mk_sysprep_floppy
	Change I27f176378 dropped the code calling this helper script.
	There is no need to keep it behind.

	drop vdsm/vdsm-libvirt-access.pkla
	It should have been removed with its single user, the debian packaging
	attempt.

2017-06-27  Edward Haas  <edwardh@redhat.com>

	net: Unified configuration existance can have only nets or bonds
	Both are not required.

	Bug-Url: https://bugzilla.redhat.com/1457889

2017-06-27  Irit Goihman  <igoihman@redhat.com>

	dpdk: ignore virtual functions
	virtual functions also use vfio-pci driver so they were accidentally
	recognized as dpdk devices.
	Now devices having 'Virtual Function' product type will be ignored.

2017-06-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	Require abrt-cli for vdsm sos plugin
	vdsm sos plugin uses abrt-cli output. without requiring that, sos output
	will print an error. reasonable to require that as part of vdsm.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=917062

2017-06-27  Dan Kenigsberg  <danken@redhat.com>

	place vdsm-logrotate under static

2017-06-26  Nir Soffer  <nsoffer@redhat.com>

	tests: Make permutations pytest friendly
	pytest does not support the character "[" in a permuted test name. It
	assumes that the means the test was parameterized, and remove the
	character when collecting methods, breaking collection.

	Fix the issue by replacing "[" and "]" to "(" and ")" in test names.
	With this change, all storage tests pass with pytest on python 2.7, and
	about 30% of the tests pass on python 3.5.

	tests: Use assertIn() / assertNotIn()
	These asserts generate better error message on test failures.

	tests: Make misc_test.py compatible with pytest
	pytest assert magic does not play well with utils.retry. Simplify the
	nice test so it is compatible with pytest.

	tests: Add storage tox envs using pytest
	Add storage-py27 and storage-py35 test envs, to run all storage tests
	using pytest.  Since storage tests are not compatible yet with pytest,
	and with python 3.5, these are not enable yet.

	To run storage tests with python 2.7:

	    tox -e storage-py27

	To run storage tests with python3.5:

	    tox -e storage-py35

	To avoid duplication of test options, the common pytest option were
	moved to [pytest] section. These options are also used when running
	pytest directly.

	We were using an old pytest for running the import tests, use current
	pytest version (3.1.2) for al pytest targets.

2017-06-26  Irit Goihman  <igoihman@redhat.com>

	tests: rename mock classes in stomp tests
	mock classes in stomp tests have confusing names,
	they start with Test prefix, indicating these are test suites
	but they are just mock objects for testing purposes.
	Their names now have 'Fake' prefix.

2017-06-26  Dan Kenigsberg  <danken@redhat.com>

	place libvirt_password under static
	Note that I had to add a yucky install-data-local section in
	static/Makefile.am in order to keep the silly 600 mode of the silly
	libvirt_password file.

	This patch keeps the RPM unchanged. It only moves libvirt_password under
	static/.

2017-06-26  Martin Polednik  <mpolednik@redhat.com>

	vfio-mdev: fix check for available instances
	We have compared string to int. The string comes from sysfs read, so
	we have to explicitly cast it to int for the comparison to work.

2017-06-26  Milan Zamazal  <mzamazal@redhat.com>

	tests: Add 'operation' item to fake job_stats
	The item is provided by new libvirt versions and its value is checked when new
	libvirt version is detected.  So we must add the item to keep tests passing
	when new libvirt is installed.

2017-06-25  Dan Kenigsberg  <danken@redhat.com>

	place dhclientmon.sh under static
	This patch simplifies Makefile.am and clears a single file from the
	vdsm/ directory. There is no change in the content of the RPM.

2017-06-23  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove TestCaseBase in stoarge tests
	Some tests were importing VdsmTestCase as TestCaseBase. This rename is
	not helping anyone.

	tests: Unify storage test class names
	Use TestName instead of NameTests. TestName is the default test class
	pattern detected by both nosetest and pytest, enabling test case that do
	not inherit from unittest.TestCase.

	tests: Move storage tests to tests/storage
	Move storage_*_test.py modules, libraries and data files to
	tests/storage package.

	The move requires more specific import of storagetestlib and
	storagefakelib.

	To run all storage tests:

	    ./run_tests_local.sh storage

	operation: Support streaming command output
	operation.Command can be used now when the caller need to process
	command's stdout for example when reporting progress.

	Example usage:

	    out = bytearray()
	    for data in proc.watch():
	        out +=  data
	        # handle progress messages in out...

	If command failed, Command.watch() will raise the usual cmdutils.Error,
	including the collected stderr. Since the output was passed to the
	caller, it will not be included in the error.

	This required before utils.CommandStream, which is harder to use since
	you need to define callbacks for receiving stdout and stderr data,
	collect stderr yourself, and reimplement this in every command that
	needs progress.

	tests: Add storage_qcow2_test to test modules
	This test was never added to the makefile, so it never run in the CI.

	Running on travis show that some tests are broken since the file system
	on travis does not support sparseness. This issue was discovered before
	when we tested qemuimg.map(). Mark the broken tests as broken on travis.

2017-06-23  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make sure VMs are restored as paused
	When we restore VMs from snapshot, we expect that they are restored as paused
	and we then unpause them with `resume' call in Vm._underlyingCont.  However at
	least with newer libvirt versions the VMs may be actually run automatically
	from `restore' call.  Then the `resume' call fails and the VM is lost.

	It's probably change from former libvirt behavior, however the libvirt
	documentation says: "Normally, the saved state file will remember whether the
	domain was running or paused, and restore defaults to the same state."  So the
	current behavior can't be classified as unexpected or even buggy.

	libvirt offers flags to specify whether to restore the VM as paused or running.
	Let's use VIR_DOMAIN_SAVE_PAUSED flag as the least invasive fix guaranteeing
	consistent behavior.

	Bug-Url: https://bugzilla.redhat.com/1461811
	Backport-To: 4.1

	virt: Use MIGRATABLE flag for _srcDomXML
	The domain XML used in restore must be retrieved with VIR_DOMAIN_XML_MIGRATABLE
	flag from libvirt.  While restore has been working despite the missing flag,
	newer libvirt version may refuse to run the VM with errors such as

	  libvirtError: unsupported configuration: Target CPU feature count 6 does not match source 0

	This patch fixes the problem by adding the flag to the corresponding XMLDesc call.

	Bug-Url: https://bugzilla.redhat.com/1461811
	Backport-To: 4.1

	virt: Remove sysprepInf support
	Engine no longer sends `sysprepInf' parameter on VM.create, it was used only in
	< 3.1 compatibility versions.  So we can remove support for that from Vdsm.

	virt: Always check migration status on recovery
	When we recover a VM we check its migration status only if migration is
	indicated in the VM's recovery file.  But we want to stop using recovery files
	and we also want to support external VMs.  In both the cases there is no
	special hint whether the VM is migrating, so we must always assume that
	possibility.  For that reason we always check for a possibly running migration
	in recovery.

	virt: Improve migration check
	We need to know in domain XML based recovery and when handling external VMs in
	the future whether a VM is migrating to another host.  Current
	migration.ongoing utility checks just for a running job regardless of its
	operation, since it assumes that we are migrating.  This patch enhances the
	function to check also for the job operation kind.

	The functionality necessary for the improved check is present only in recent
	libvirt, not yet universally available (see
	https://bugzilla.redhat.com/1441563).  So we can't rely on its presence now and
	we must not fail with current libvirt versions.  The check can't distinguish
	between job operations with those libvirt versions but otherwise it's not worse
	than the current state.  It will get fixed automatically once new libvirt is in
	use.

2017-06-23  Tomáš Golembiovský  <tgolembi@redhat.com>

	virt: add shutdown via QEMU GA
	Add new shutdown/reboot method performed by QEMU Guest Agent.

2017-06-23  Francesco Romani  <fromani@redhat.com>

	virt: metadata: add default arguments
	We're going to use the same argument for metadata.Descriptor,
	so we add them as default arguments for the sake of practicality.
	No changes in behaviour.

2017-06-23  Nir Soffer  <nsoffer@redhat.com>

	dockerfile: Add missing glusterfs-api package
	This package is required for vdsm.gluster.gfapi module. Importing this
	module during imports tests fail on Fedora 25 becuase libgfapi is not
	installed in this image. For some reason, this library is included in
	the Fedora 24 and Centos 7 image.

	Add the library to all dockerfiles to make sure the library exists even
	if the base image is modified in the future.

2017-06-22  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	storage: move to lib/vdsm

2017-06-22  Nir Soffer  <nsoffer@redhat.com>

	resourceFactories: Work around import cycle
	resourceFactories imports image for Image.getChain(), creating import
	cycle. Work around the import cycle by delaying the import.

	image: Move image creation helper to StorageDomain
	The volume module is importing the image module to create the image
	directory if needed when creating a new volume. This creates a circular
	dependency, since the image module depends on the volume module. Remove
	the dependency by moving image creation to StorageDomain, which also
	makes sense anyway.

	blockVolume: Fix circular import
	Add BlockStorageDomainMenifest.metadata_volume_path() method and use it
	for reading and writing block volume metadata. This eliminate the need
	to import sd for accessing storage domain internal implementation
	details, and fixes the circular dependency between blockVolume and sd.

	blockSD: Add create_volume_lease() method
	Move the code for creating a volume lease to blockSD, since this is part
	of the block storage domain implementation. Moving this code removes a
	circular dependency between blockVolume and sd modules.

	The RESERVED_LEASES constant was moved to blockSD since it is an
	implementation detail of block storage domain, and needed for creating a
	new lease.

	Moving the code revealed duplicate code for calculating a volume lease
	offset. The duplicate code was extracted to new volume_lease_offset()
	method.

	sd: Remove duplicate constants for the same value
	We two constants (sd.METASIZE and constants.METADATA_SIZE) for the same
	value, the size of a metadata block on storage. Remove sd.METASIZE and
	use only constants.METADATA_SIZE, since importing it does not create
	circular imports in the volume layer.

	fileVolume: Fix circular fileSD import
	fileSD was imported for creating a storage domain when validating volume
	path. Get the storage domain from sdCache instead and remove the
	circular import.

2017-06-22  Francesco Romani  <fromani@redhat.com>

	virt: test: use the configured path
	When running tests with ./run_test_local.sh,
	the P_VDSM_RUN directory could be
	/usr/loca/var/run/vdsm (./configure defaults).
	In any case, is not guaranteed to be
	the system directory (/var/run/vdsm) that
	the tests expect.

2017-06-21  Dan Kenigsberg  <danken@redhat.com>

	py3: use next() builtin instead of deprecated method

2017-06-21  Francesco Romani  <fromani@redhat.com>

	tests: python3: avoid decoding errors
	We have one test which wants to feed libvirt with incorrect xml.
	To make it work properly under python3, we need to read the data
	as bytes (not as strings) and decode it to string when needed.

	No intended changes in behaviour.

2017-06-21  Nir Soffer  <nsoffer@redhat.com>

	volume: Remove unused repoPath argument
	The repoPath argument is not used now in Volume.getImageVolumes().

	fileVolume: Fix circular import
	fileVolume.py was importing sd.py to access sd.DOMAIN_IMAGES constant
	for building a glob pattern for *.meta files inside an image directory.
	Fix the circular import by using StorageDomain.getImageDir() instead of
	reinventing it in fileVolume.

2017-06-21  Denis Chaplygin  <dchaplyg@redhat.com>

	virt: Added network drive support to _changeDisk
	_changeDisk now uses Drive APIs to determine
	disk type and libvirt source attr correctly.
	This also adds support for netwok drives.

	vm: Block commit call sould use drive name when using indexes.
	According to http://libvirt.org/html/libvirt-libvirt-domain.html#virDomainBlockCommit
	using source name of the device ("path") is not recommended with
	indexes and it doesn't works with gluster based network drives.
	This patch replaces "path" with device target name, like "sda".

	virt: Set correct diskType for snapshot target drive
	Snapshotting code now checks for correct protocol of
	base and target drives in case of NETWORK disk type,
	but setting correct protocol in prepareVolumePath
	requires diskType to be correctly specified before the call.
	As we do not support snapshots on different disks, it
	can be safely copied from base drive to the target drive.

2017-06-21  Nir Soffer  <nsoffer@redhat.com>

	travis: Update yaml for new trusty images
	Travis is updating the vm images, requiring now a new group setting.

	See https://blog.travis-ci.com/2017-06-19-trusty-updates-2017-Q2

2017-06-21  Francesco Romani  <fromani@redhat.com>

	virt: metadata: introduce the Descriptor class
	The device-specific metadata is stored in the domain metadata, as
	children of the main domain metadata element. The same applies for
	the custom properties. Those two cases are the only two on which
	the nesting is allowed on metadata.

	A full-featured and legal domain metadata layout could look
	like (namespace omitted for brevity)

	  <metadata>
	    <vm>
	      <foo>1</foo>
	      <bar>2</bar>
	      <custom>
	        <fizz>a</fizz>
	      </custom>
	      <device alias='dev0'>
	        <buzz>b</buzz>
	      </device>
	    </vm>
	  </metadata>

	the metadata.domain() context manager allows to modify only the VM
	metadata, so it must returns top-level properties.
	It should thus ignore the per-device custom properties, and the VM
	custom properties. Currently, if we write back the above metadata
	we will get

	  <metadata>
	    <vm>
	      <foo>1</foo>
	      <bar>2</bar>
	      <custom />
	      <device />
	    </vm>
	  </metadata>

	This happens because the current code goes too far ignoring the nested data,
	and wipes them out when the metadata is rewritten.
	This is because actually both domain() and device() context manager need
	to keep too much implicit state and fail to do so.

	So, the root cause is the implicit state and its management. To solve
	this issue, we choose to remove any implicit state management and
	we introduce one explicit Descriptor class, which will keep the current
	metadata and allow the client code to do fine-grained management.

	the Descriptor class will replace:
	1. metadata.from_xml()
	   use metadata.Descriptor.from_xml() instead
	2. metadata.domain()
	   use metadata.Descriptor.load()/values()/dump() instead
	3. metadata.device()
	   use the `device` context manager of metadata.Descriptor instead
	4. metadata.device_from_xml_tree()
	   use metadata.Descriptor.from_xml() and the `device` context manager
	   instead

	Future patches will port the new code to the new Descriptor class,
	and later we will remove the obsolete functions.

2017-06-21  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: disable sslv3 on centos7
	During testing I noticed that sslv3 is still enabled on centos7 so we
	need to disable it.


	Bug-Url: https://bugzilla.redhat.com/1412552

	ssl: enable tlsv1.2 support
	We support all three tlsv1, tlsv1.1 and tlsv1.2 protocols or only
	tlsv1.2. We provide a way to disable specific protocols.

	It is not possible to use ssl.PROTOCOL_TLS because it is not available
	for centos7.

	Bug-Url: https://bugzilla.redhat.com/1412552

2017-06-20  Irit Goihman  <igoihman@redhat.com>

	vm: create a vnic with vhostuser backend
	When creating a VM with a network device on ovs bridge
	that contains a dpdk port, a vhost user interface device
	will be created.

	This patch updates VM XML with vhostuser interface that
	will be created in this situation.

	NIC hotplug / hotunplug is not supported currently.

2017-06-20  Francesco Romani  <fromani@redhat.com>

	vm: don't set unresponsive with sampling disabled
	Don't set VM unresponsive for stats too old if the
	sampling is disabled.
	Vdsm sampling will be disabled if collectd is enabled:
	only one agent should monitor the host, for performance reasons.

	This hunk was mistakenly not included in change 4ed0590

2017-06-19  Nir Soffer  <nsoffer@redhat.com>

	sd: Fix circular import caused by getNamespace
	sd.py is imported by lot of modules for sd.getNamespace(), which is not
	related to storage domains but to resource management. Move the function
	to resourceManager.py to avoid circular imports.

	sd: Remove circular import
	sd.py was importing image.py for ImageManifest.getImageDir(), creating
	circular import, since image.py needs sd.py for other stuff. Break the
	circular import by moving getImageDir to sd.py, which is the right place
	for this, using storage domain internal state.

	Updating the callers to use the storage domain reveal that ImageManifest
	is useless and can be removed.

	Update storagetestlib.fake_file_env() to monkeypatch fileVolume.sdCache,
	used now to get image directory. Without this we try to use the real
	sdCache and fail trying to access non-existing supervdsm.

	blockVolume: Remove circular import
	blockSD import blockVolume for the BlockVolume class, and blockVolume
	was importing blockSD for BlockStorageDomainManifest class. This create
	a circular import that make it impossible to work with this code.

	Break the circle by removing blockSD dependency, creating the instance
	using sdCache.procude_manifest().

	Update storagetestlib.fake_block_env to monkeypatch blockVolume.sdCache
	so tests invoking newVolumeLease will not try to use the real sdCache,
	failing when trying to access non-existing supervdsmd process.

2017-06-19  Arik Hadas  <ahadas@redhat.com>

	fix examples in the documentation of vdsm-client
	Apparently, the '-f' flag that points to a JSON file that contains the
	arguments should be specified before the namespace. This patch fixes
	the documentation accordingly.

2017-06-19  Tomáš Golembiovský  <tgolembi@redhat.com>

	vmpowerdown: renamed guestAgentCallback to ovirtGuestAgentCallback
	Just a trivial rename. Interface to QEMU Guest Agent will be added later
	and this should make the distinction between the Guest Agents clearer.

2017-06-19  Irit Goihman  <igoihman@redhat.com>

	jsonrpc: fix typo in heartbeat header
	HEARTEBEAT is a typo - fixing header constant to HEARTBEAT

	Bug-Url: https://bugzilla.redhat.com/1376843

2017-06-19  Francesco Romani  <fromani@redhat.com>

	virt: devices: the rng rate is optional
	As per libvirt docs[1], the 'rate' element in Rng devices
	is optional, so it must handled accordingly.
	Update both code and tests to reflect that.

	+++

	[1] https://libvirt.org/formatdomain.html#elementsRng

	virt: devices: drop parse_device_ident
	It became a shallow wrapper now, let's just dissolve it.
	No change in behaviour.

2017-06-19  Edward Haas  <edwardh@redhat.com>

	net,static: Configure NM with slaves-order=name
	NM by default, adds bond slaves based on their index.
	In order to be consistent with initscripts ordering, the order is
	changed to follow the slaves names instead of the index.

	Note: This solution is available from NM version 1.8, part of RHEL 7.4
	and Fedora 26.

	Bug-Url: https://bugzilla.redhat.com/1443347

2017-06-18  Idan Shaby  <ishaby@redhat.com>

	storage: remove discard_enable flag from config file
	As discarding logical volumes is managed by the engine from version 4.1,
	we don't need to maintain this config flag anymore, which is a part of
	the first phase of the Discard After Delete feature.

	For more information, please refer to the Discard After Delete feature
	page:
	http://www.ovirt.org/develop/release-management/features/storage/discard-after-delete/

	Bug-Url: https://bugzilla.redhat.com/1438822

2017-06-16  Milan Zamazal  <mzamazal@redhat.com>

	recovery: Set vmType parameter from domain XML
	Once we stop using recovery files, we must get that parameter from domain XML.

	recovery: Function for making VM params
	We want to recover VMs from their domain XMLs rather than from recovery files.
	Before we can make the switch we must be able to retrieve some VM params from
	domain XML.  We create a function that does that.  More will be added to it in
	the followup patches.

	virt: Make sure VM id is in stats
	If a VM is initialized from domain XML, its id is not present in conf and thus
	not in the full stats.  This may damage migrations (if nothing else), since
	migration params are initialized from status and some API calls look at VM id
	in params.

	virt: Restore conf values from metadata
	When a VM is started or restored from XML configuration, some parameters are
	stored in metadata.  We must retrieve the parameters from there.

2017-06-16  Francesco Romani  <fromani@redhat.com>

	virt: test: ensure SSL enabled
	The graphics device XML tests assume XML enabled.
	Let's make this assumption explicit with the appropriate faking.

2017-06-16  Martin Polednik  <mpolednik@redhat.com>

	hugepages: add test coverage for VM methods
	VM.nr_hugepages, VM.hugepagesz and VM.hugepages are all methods that
	can be easily tested and are easy to get wrong. We therefore add unit
	test coverage for them.

	hugepages: use integer ceiling
	Instead of relying on math module, we can use simple integer formula
	to calculate the ceiling (n + m - 1) // m.

	hugepages: merge hugepagesz into hugepages predefined property
	We can simply use hugepages custom property and expect the hugepage
	size as it's value instead of using 2 properties. We fallback to
	default hugepage size if we don't match any size advertised by the
	system in case anyone used the property in the past.

2017-06-16  Martin Betak  <mbetak@redhat.com>

	Add dynamic reboot behavior configuration
	* Added a new setDestroyOnReboot verb that can be used to mark VM as one
	  trapping guest-reboots (when configuration changes)
	* This flag can be also set in the VM xml metadata section (for RunOnce
	  purposes)
	* Based on this flag we trap the reboot in the libvirt lifecycle event loop and
	  initiate a destroy with appropriate exit code that tells engine further steps
	  related to cold reboot are required to be performed.

2017-06-15  Tomáš Golembiovský  <tgolembi@redhat.com>

	utils: add terminate() function
	Factor out part of terminating() function into a new function
	terminate() so it can be reused elsewhere.

2017-06-15  Irit Goihman  <igoihman@redhat.com>

	sos: fix broken vdsm plugin
	sos report 3.4 leads to this failure:
	plugin vdsm does not install, skipping: type object 'Plugin' has no
	attribute 'add_copy_spec_limit' a non-existing plugin (vdsm) was
	specified in the command line.

	add_copy_spec_limit was removed from sosreport Plugin code and replaced
	by add_copy_spec function in commit
	https://github.com/sosreport/sos/commit/c39a3df3ee1380fc6f2b394912923780ff0d9956

	This fix replaced add_copy_spec_limit call with add_copy_spec and
	removed function __addCopySpecLogLimit since it's not needed anymore.

	Bug-Url: https://bugzilla.redhat.com/1460732

2017-06-15  Petr Horáček  <phoracek@redhat.com>

	network: decode command output to native string
	We should keep strings native. With this patch we decode command
	output from binary to unicode (in case Python 3 is used) directly
	in network.cmd.exec_sync. Thanks to that we handle all strings
	natively and we don't end up with errors trying to split binary
	with unicode.

	This patch fixes Python 3 problems where we handled command output
	as a str although it was bytes.

	This problem lead into failed tests with Python 3 running. Those
	tests could be removed from Python 3 blacklist as soon as we fix
	other Python 3 problems.

	network: use six.reraise in python3 compatible way
	Althought six.reraise(NewExc, 'message', tb) works on Python 2,
	it is not a valid for Python 3. Python 3 requires second argument
	to be an exception instance, body of this instance will be passed
	to the first (NewExc) argument.

	network: use six.viewitems/keys for python 3 compatibility

2017-06-15  Martin Polednik  <mpolednik@redhat.com>

	hugepages: report stats as integers
	No point in using strings.

	hugepages: report vdsm free hugepages
	Since VDSM has concept of reserved hugepages, we need to expose this
	information to engine. Luckily we can do that in the stats, using new
	'vm.' namespace.

2017-06-14  Martin Betak  <mbetak@redhat.com>

	Add DESTROYED_ON_REBOOT VM exit reason
	Added exit reason that can be used to differentiate vm destroy that is a part
	of trapped guest-reboot that should be translated into engine-controlled cold
	reboot that can apply new configuration changes.

2017-06-13  Nir Soffer  <nsoffer@redhat.com>

	commands: Remove unused watchCmd
	I think it is a leftover from commit 5f4ce454f8af (misc: Remove ddCopy()
	and ddWatchCopy()) , removing the last usage of storage.misc.watchCmd(),
	which was the only user of commands.watchCmd().

2017-06-13  Francesco Romani  <fromani@redhat.com>

	yajsonrpc: more detailed failure log
	Let's log the request we couldn't serve.
	Example of the log we will get:

	2017-06-09 12:40:35,969+0200 ERROR (JsonRpcServer) [jsonrpc.JsonRpcServer]
	 could not serve request {'params': {}, 'jsonrpc': '2.0',
	 'method': u'Host.getStats', 'id': u'970e25b8-7786-43e5-a46c-0906a056e8e5'}
	 (__init__:698)
	Traceback (most recent call last):
	  # omitted: same as before

2017-06-13  Edward Haas  <edwardh@redhat.com>

	concurrent: Move concurrent module to common
	concurrent fits vdsm.common as it has no dependencies on inner vdsm
	packages.

2017-06-13  Martin Polednik  <mpolednik@redhat.com>

	hostdev: report mdev supported types
	This is part of VDSM side of vGPU implementation. We have to report
	data from mdev-capable devices. Unfortunately, the kernel interface to
	report concrete information regarding mdev type is insufficient at the
	moment (the description sysfs file is pretty much vendor dependent
	free-text), so we only report part of the information - mdev type name
	and available instances. We also don't report driver at the moment as
	we only support vfio-pci.

2017-06-13  Martin Betak  <mbetak@redhat.com>

	vm.py: Add missing optional parameter to doDestroy()
	Patch 182c6fc4dfd755bc5716844786c0cdcd503437b6 introduced new parameter to
	Vm#doDestroy() method, but omitted to fix its invocation in
	VmShutdown#forceCallback which would fail in case the callback chain got to the
	forceCallback.

	Fixed by adding default value consistent with other code paths added in the
	referenced patch.

2017-06-13  Milan Zamazal  <mzamazal@redhat.com>

	virt: Restore start time from metadata if available
	We currently retrieve start time from a recovery file.  We are going to stop
	using recovery files so we should get start time from metadata if it is
	available there.

	virt: Don't put "boot" to stats
	That parameter is apparently not used by Engine anymore.

	virt: Get information about ACPI presence from domain XML
	So that we are ready for XML Engine and for recovery from domain XML as for
	this property.

	virt: Don't set CPU shares if VM XML configuration is provided
	In such a case the shares should be already set in the XML and aren't be
	available in VM params/conf.

2017-06-13  Francesco Romani  <fromani@redhat.com>

	virt: metadata: support for boolean values
	We need to store boolean values in the metadata, and it is
	just too awkward to store them as integers; let's add true
	metadata support.

2017-06-13  Edward Haas  <edwardh@redhat.com>

	pthread: Move pthread module to common
	pthread fits vdsm.common as it has no dependencies on inner vdsm
	packages.

2017-06-13  Francesco Romani  <fromani@redhat.com>

	virt: tests: unify listAllDevices{,2}
	We currently have two faked listAllDevices, one of which is used
	only for the hostdev performance test.

	A test run under python3 revelead issues with our monkeypatch
	implementation, most likely related to confusion between instance/classmethod
	and subtle changes to object model between python2 and python3, like
	we faced in Ie3100455ab761481f57a93ab8aacc34ac4ab91eb

	The actual source of error is yet to be understood, but we can just
	sidestep this issue by removing some duplication, and we do that
	in this patch.

2017-06-12  Francesco Romani  <fromani@redhat.com>

	virt: sampling: add top-level toggle switch
	Add option to disable completely the Vdsm {host,VM}monitoring.

2017-06-11  Edward Haas  <edwardh@redhat.com>

	spec: Handle VDSM services restart on upgrade to posttrans
	VDSM services restart has been handled upon upgrade at the postun stage,
	which is triggering the scriptlets of the source/old version.

	In order to support upgrades with new logic, the scriptlets should run
	based on the new version.
	Therefore, the handling has been moved to the posttrans step, which
	belongs and runs as part of the new version at the end of the
	transaction.

	Side effect: Upgrades from versions that predates 4.2 will have the
	service restart occuring twice, once at the old version postun step and
	once in the new posttrans step.

	Bug-Url: https://bugzilla.redhat.com/1457889

2017-06-10  Edward Haas  <edwardh@redhat.com>

	net: nmdbus internal renaming of attributes
	Renaming attributes for consistency with dbus naming.

2017-06-09  Francesco Romani  <fromani@redhat.com>

	virt: extract Vm.process_devices()
	Extract the code which does the XML generation (and hook processing)
	in the existing vm.conf flow, and make it generic enough to be used
	also in the new engine XML flow.

	virt: devices: add get_extra_xmls() method
	Few devices need to build additional XML snippets for ancillary devices.
	For example, graphics devices need to make sure one special channel
	is setup when the device itself is configured with SPICE.
	Disk devices need to make sure the leases are configured, and so on.

	We already have code to cover those cases, but each device uses a
	different name, so there is not no uniform way to answer device objects
	for those extra XML snippet.

	This patch adds such code, allowing the XML building flow (aka the
	vm.conf legacy flow) to iterate over all devices and ask for their
	requirements.
	This will allow us to remove our cumbersome device-specific code, which
	requires ugly type checking.

	virt: add method to build device map from XML
	We already have one helper module to create a device map
	out of vm.conf; this patch add a companion method
	to build a device map from a domain XML.

	Please note that this method is just about building objects out
	of the domain XML we receive, we don't want to handle the filtering
	of unknown devices here.

	We also simplify a bit the identification of the devices.
	There is no real need for a blacklist of devices; if it is outside
	our mapping, we can ignore the data and not build one object out of it.

	virt: move minimum balloon size in Balloon class
	Make the minimum balloon size a real Balloon device property,
	and use that as authoritative source to report it.
	Previously, we just computed from the vm.conf.

	+++

	Our modelling of the Balloon device is debatable, and sometimes
	awkward. In particular, it is debatable that the balloon device
	should keep its state, while we modify it using Domain methods
	(look at libvirt methods invoked under the hood).

	However, what's surely the bigger evil is to have the state spread
	across the Vm class and the Balloon device.
	Until we find a better modeling, we have now a complete and consistent
	Balloon device. As minor bonus, we go one babystep forward in the task
	of slimming down the Vm class.

	virt: store balloon target in Balloon dev object
	We call 'balloon target' the current amount of memory a Vm could use.
	The modelling of this property is already debatable: we store it
	as Balloon device attribute ('target', unsurprisingly), yet we use
	domain methods to set it (virDomainSetMemory).

	The bugger issue is that up until now we stored this setting as
	device configuration item, thus in Vm.conf['devices'], and never
	propagated it to the device object proper.

	This will cause issues when we will migrate to engine XML, because
	the vm.conf will be deprecated.

	In this patch we streamline how we use the 'target' property, as
	follows:
	1. we make it a full blown Balloon device attribute
	2. we use it as authoritative source - no more the vm.conf['devices']
	   counterpart
	3. we ensure we initialize it from the vm.conf, to handle recvoery
	   gracefully.

	No expected changes in external behaviour

	vm: refactor Vm.setBalloonTarget
	Raise proper exceptions, and never return responses explicitely.
	No expected changes in behaviour

2017-06-09  Milan Zamazal  <mzamazal@redhat.com>

	virt: Store agent information to metadata
	We need that information on recovery from the domain XML.  We could get the
	channel name from the libvirt domain XML in theory, but it's better to avoid
	guesswork.

	guestAgentAPIVersion is set on migrations so we must update metadata after the
	domain is attached after migration.

	virt: Minor formatting improvement in Vm._startUnderlyingVm

	clientIF: Take new VM id from the Vm object
	We are not going to provide vmId parameter on recovery, so we need to take it
	from the newly created Vm instance.

2017-06-08  Petr Horáček  <phoracek@redhat.com>

	network: provide __repr__ for route and rule
	IPRuleData and IPRouteData now provides __repr__ method in a more
	Pythonic way.

	network: use driverloader in vdsm.network.ovs.driver

2017-06-07  Edward Haas  <edwardh@redhat.com>

	spec: Use systemctl directly instead of vdsm-tool where possible
	There is no longer a need to wrap service control using vdsm-tool as we
	support only systemd anyway.

2017-06-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove upgrade hacks for vdsm version <=4.16
	Before 4.17 we added few hacks (commits d4cce072 and e79dfe64)
	to allow smooth upgrade between versions while vdsmd service is running
	Since 4.20 (ovirt-4.2) we don't support upgrades from 4.16 to 4.20 so
	we can safetly remove those parts and use this logic for new hacks :)
	That's why this patch still leaves the upgrade file that is being
	created during vdsm upgrade.

2017-06-07  Francesco Romani  <fromani@redhat.com>

	Revert "virt: Switch to persistent domains"
	This reverts commit 15808ddf9035287575a59d9aa879598a33a2b6bc.
	Reason: we hit rhbz#1458548, which is qemu/libvirt issue, no ETA
	on their side, we can't have this regression in live storage migration.

	Bug-Url: https://bugzilla.redhat.com/1458548

	virt: devices: add normalize_pci_address function
	To simplify the code of device classes, we want the have the PCI
	addresses always expressed in a consistent format.
	Various formats are possible and legal (
	https://wiki.xen.org/wiki/Bus:Device.Function_%28BDF%29_Notation
	).

	We add normalization function to make sure we always use one format.

	virt: devices: add find_device_guest_address
	Add a new helper with stricter semantic than vmxml.device_address()
	we want to make sure to parse either the first 'address' children
	of a given node or to return None.

	vmxml: extract parse_device_address
	Extract one helper to parse the libvirt 'address' element
	into a dict.
	We use this snippet repeatedly, so worth extracting it.

2017-06-07  Denis Chaplygin  <dchaplyg@redhat.com>

	clientIF: Add missing line, separating imports from code.

2017-06-07  Nir Soffer  <nsoffer@redhat.com>

	gluster: Fix error handling when loading libgfapi
	We used ctypes.util.find_library() to locate the libgfapi file name. If
	the library is not installed, this function returns None, but the return
	value was not checked. Trying to locate later the glfs_new() function we
	failed with a bogus error:

	    AttributeError: /vdsm/.tox/imports/bin/python: undefined symbol: glfs_new

	Change the call to use "libgfapi.so.0". Now if the library is missing we
	fail with a clear message:

	    OSError: libgfapi.so.0: cannot open shared object file: No such file or directory

2017-06-07  Petr Horáček  <phoracek@redhat.com>

	network: translate libnl str output only if not None

2017-06-07  Nir Soffer  <nsoffer@redhat.com>

	Revert "multipath: Do not fail I/O after short outage"
	This reverts commit c43169e3dea98fbc3469ae149264f344bd04bba0.

	Multipath segfaults now when using "no_path_retry 4" in the special
	all_devs section. We will have to wait for a fix before we can use this
	configuration.

	Relates-to: https://bugzilla.redhat.com/1459370

2017-06-06  Nir Soffer  <nsoffer@redhat.com>

	api: Use default argument instead of None
	Since the supported versions are constant, we can define the default
	value during import time.

	multipath: Do not fail I/O after short outage
	Since 3.6 we are using "no_path_retry fail" for all devices by default.
	This setting is not new, but before 3.6 it was applied only for few
	devices specified in our multipath conf, while other devices used the
	defaults hard-coded in the multipathd daemon.

	We have seen several reports in the user list that this makes ovirt too
	fragile considering short storage outage, causing vms to pause too
	quickly.

	This patch change the default setting to "no_path_retry 4". With this
	setting, once multipathd notices that the last path has failed, it will
	check all paths 4 more times (20 seconds assuming the default 5 second
	polling_interval). If no paths are up, it will tell the kernel to stop
	queuing.  After that, all outstanding and future I/O will immediately be
	failed, until a path is restored. Once a path is restored the 20 second
	delay is reset for the next time all paths fail.

	This change will introduce a 20 seconds delay after the last path has
	failed, before outstanding I/O will fail. If there is a short storage
	outage on the server, and the server could recover in 20 seconds, no vm
	will pause, and commands ran by vdsm (e.g. lvm) will not fail.

	Bug-Url: https://bugzilla.redhat.com/1335176

2017-06-06  Allon Mureinik  <amureini@redhat.com>

	spec: Clean up lvm2 requirement
	The epoch in lvm2 RPMs on EL distros represents the major version
	(see [1]). As we only support EL7 (and will for the next couple of
	years), it's safe to drop the epoch requirement from the spec file and
	simplify it.
	Moreover, if lvm2 continues using monotonically increasing version
	numbers, there would be no reason to use the epoch even when we do
	support EL7 and EL8, unless, perhaps, there's a specific fix
	backported to EL7 we'd like to require - but that bridge can be
	crossed when we get to it.

	[1] https://git.centos.org/blob/rpms!lvm2.git/191583678466169c13b312069ea9d83d1e958d39/SPECS!lvm2.spec#L662

2017-06-06  Nir Soffer  <nsoffer@redhat.com>

	lvm: Support the special [unknown] value
	Since lvm2 2.02.145 (March 2016), lvm commands return "[unknown]"
	instead of "unknown device" for missing pv or unknown vg name.  Update
	the code to support the new special name and require the lvm version
	introducing it.

	Bug-Url: https://bugzilla.redhat.com/1452898

	api: Show task id in storage api logs
	Following storage asynchronous task (e.g. Lease.create) is hard; you
	must find the api START log, and then locate the task thread by some of
	the arguments (e.g. lease_id). However all storage api calls run in a
	task, and the task id is known during the api call.

	This patch adds the task id to the api logs, making it easier to follow
	the task.

	Here is an example api call:

	    2017-05-28 19:32:28,094+0300 INFO  (jsonrpc/0) [vdsm.api] START deleteImage(
	    sdUUID=u'aed577ea-d1ca-4ebe-af80-f852c7ce59bb', spUUID=u'6c99f4e5-8588-46f5-a818-e11151c1d19c',
	    imgUUID=u'14018222-70d7-493c-b1f8-f509eca3c1ae', postZero=u'true', force=u'false', discard=False)
	    from=::ffff:10.35.0.111,47418, task_id=ef3b0a5c-420e-4865-bef7-b79be89291dd (api:46)

	Using the task_id, we can easily locate the worker thread handling this
	request:

	    2017-05-28 19:32:28,204+0300 INFO  (tasks/6) [storage.ThreadPool.WorkerThread]
	    START task ef3b0a5c-420e-4865-bef7-b79be89291dd ...

	Bug-Url: https://bugzilla.redhat.com/1425596

2017-06-06  Edward Haas  <edwardh@redhat.com>

	compat: Move compat module to common
	compat fits vdsm.common as it has no dependencies on inner vdsm
	packages.

	cmdutils: Relocate systemd_run to common.cmdutils
	systemd_run is moved from vdsm.cmdutils to common.cmdutils, allowing its
	callers to depend on common.

	constants: Move EXT_SYSTEMD_RUN from constants to cmdutils
	EXT_SYSTEMD_RUN is used only by cmdutils and there seem to be no
	apparent reason to allow its bin path to change.

	The move was triggered by the need to move cmdutils functions to common
	and avoid large scale changes, like moving constants to common.

	cmdutils: Relocate *_log_line funcs to common.cmdutils
	Moving command_log_line and retcode_log_line to common.cmdutils.

2017-06-06  Petr Horáček  <phoracek@redhat.com>

	network: remove blacklisted tests fixed by netlink refactoring

2017-06-06  Edward Haas  <edwardh@redhat.com>

	net nm: nmdbus connections settings report race fix
	When reporting the connections under nmdbus.settings, a race may exist
	between the fetching of the connections paths to the fetching of each
	connection content.

	When attempting to retrieve the connection content, a missing connection
	is now acceptable, assuming that it was removed, therefore not reported
	back.

2017-06-06  Petr Horáček  <phoracek@redhat.com>

	network: isolate libnl constants, object type names

	network: isolate libnl constants, NETLINK_ROUTE

	network: remove unused netlink constant _NLE_NODEV

	network: isolate libnl constants, callback kinds

	network: isolate libnl constants, callback actions

	network: isolate libnl constants, interface state

	network: isolate libnl constants, routing tables

	network: isolate libnl constants, EVENTS

	network: isolate libnl bindings, route functions

	network: isolate libnl bindings, link functions

	network: isolate libnl bindings, address functions

	network: isolate libnl bindings, object and message functions

	network: isolate libnl bindings, cache functions

	network: isolate libnl bindings, socket functions

2017-06-06  Francesco Romani  <fromani@redhat.com>

	virt: move device mapping inside vmdevices
	No need to clutter the Vm class with this.
	Additional benefits:
	- pep8-ification of the code
	- better testability

2017-06-06  Edward Haas  <edwardh@redhat.com>

	net tests: Introduce requires_systemdrun and use it in cmd_test
	test_exec_systemd_new_unit test from cmd_test requires not only
	systemd availability, but the ability to run systemd-run.
	This issue has been found when running the tests as a non-root user.

2017-06-05  Nir Soffer  <nsoffer@redhat.com>

	rawhide: Use ovirt-imageio-common from Fedora 26

	rawhide: Add travis Fedora rawhide build
	Replace the unsupported Fedora 24 build with the unsupported rawhide
	build.

	rawhide: Skip blivet tests on Fedora rawhide
	Importing blivet fail with:

	    ValueError: Namespace BlockDev not available for version 1.0

	Marking the import test as xfail, and updating the import check in the
	test using blivet to handle the ValueError.

	To skip the tests only on rawhide, we use vdsm.osinfo.version(), so we
	require now the rpm-python package.

	readme: Fix build status url
	markdown does not support newline in links. Breaking long lines cause
	the link to display as [ build-status-icon ]( link ).

2017-06-05  Martin Sivak  <msivak@redhat.com>

	reactor: Cleanup the send command code a bit
	A cleanup patch that should make the code more readable.

	reactor: Support hierarchical subscriptions to all messages
	This patch adds the hierarchical subscription capability to the
	STOMP reactor.

	Any client subscribing to 'some.topic' will be effectively
	subscribed also to 'some.topic.a', 'some.topic.b', ... meaning
	the client will get all messages sent to topics that start with
	the subscribed to destination name.

	This allows clients (including VDSM itself) to use a single
	subscription and receive all JSON-RPC commands from a group
	event though the group uses separate topic names for each command.

	Example:

	Subscription to jms.commands will also allow you to receive
	messages sent to jms.commands.getCaps.

	But you can also subscribe just to jms.commands.getCaps
	when you are not interested in the whole group.

	reactor: Forward all messages to all subscribers
	Any client can now register to receive messages that are
	then responded to by VDSM itself. This is to allow
	eavesdropping on jms.topic.vdsm_requests and
	jms.topic.vdsm_irs_requests queues.

	Previously messages meant for VDSM were silently swallowed
	by it even though there was a configured subscription.

2017-06-05  Petr Horáček  <phoracek@redhat.com>

	network: use native strings with libnl
	We need to return native string format from binding functions in
	order not to break current VDSM code.

	With Python 2 that means we need to keep output in Py2 str (the
	same as bytes), so there is no change compared to pre-refactoring
	netlink code.

	For Python 3 we need to use new str (unicode in Python 2).

	We cannot just use unicode in both 2 and 3 since it would break
	functionality in the rest of VDSM with Python 2. For example by
	concatenating path '/sys/class/net/' (str==bytes) and netlink output
	u'eth0' (unicode) we would get path in unicode format while system
	file functions (open, exists,...) expects encoded str and would fail
	with UnicodeError in case the string contains special characters.

2017-06-05  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop unused sslutil constants
	It should have been dropped together with xmlrpc in commit b3d3db.

2017-06-05  Edward Haas  <edwardh@redhat.com>

	net tests: Create a networking version of the running context
	running has been copied from vdsm.utils to remove the dependency between
	the network package and vdsm.

	utils: Extract anyFnmatch from utils module
	anyFnmatch is moved and renamed to the ipwrapper module as a private
	function.

	utils: Extract kill_and_rm_pid from utils module
	kill_and_rm_pid is moved to the dhclient module as a private function.

	utils: Extract traceback from utils module
	traceback has been relocated to common.logutils, to make it clearer
	that it is being used by multiple subsystems, and verifying that it
	has no dependencies on non-common vdsm code.

	utils: Extract NoIntrPoll from utils module
	NoIntrPoll has been relocated to common.osutils, to make it clearer
	that it is being used by multiple subsystems, and verifying that it
	has no dependencies on non-common vdsm code.

	It has also been renamed to uninterruptible_poll.

	utils: Extract pgrep from utils module
	pgrep has been relocated to common.proc, to make it clearer
	that it is being used by multiple subsystems, and verifying that it
	has no dependencies on on non-common vdsm code.

	utils: Extract pidStat from utils module
	pidStat has been relocated to common.proc, to make it clearer
	that it is being used by multiple subsystems, and verifying that it
	has no dependencies on on non-common vdsm code.

2017-06-05  Milan Zamazal  <mzamazal@redhat.com>

	virt: Get VM name from domain descriptor
	XML Engine is going to send as a domain XML rather than all the params.
	So let's take VM name from the domain XML and not from conf/params.

2017-06-05  Francesco Romani  <fromani@redhat.com>

	API: skip parameter validation with engine XML
	If the client (aka Engine) provides the domain XML, we don't need
	any extra Vm Parameter.

2017-06-05  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop unused virt constant

2017-06-05  Francesco Romani  <fromani@redhat.com>

	API: add 'xml' parameter to VM.create
	Allow to pass client (Engine)-built XML.

2017-06-04  Nir Soffer  <nsoffer@redhat.com>

	tox: Update flake8 to version 3.1.0
	Version 3.0.4 fails now with import error. Version 3.1.0 is the latest
	version compatible with current vdsm code; later version complain about
	many new errors.

2017-06-04  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	http: extract request handler
	Move request handler class from a create_server method to the module
	level.

	http: make request exception explicit
	There is no need to hide request exception in handler class and this
	patch extracts it.

	http: removal of xmlrpc dependencies
	When we stopped using xmlrpc as vdsm transport we only use http module
	to upload/download images. There is no need to be dependent on xmlrpc
	classes. This patch removes this dependenciy.

2017-06-04  Dan Kenigsberg  <danken@redhat.com>

	janitorial: net tests: remove unused constants

	janitorial: drop unused storage constants

2017-06-03  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop unused storage.misc.getProcCtime
	Should have been removed with commit bb50245.

	net tests: add a slightly more meaningful message on exception
	Seeing a list of offending rules or routes is more legible than a
	generic
	    AssertionError: 2 != 3

2017-06-02  Dan Kenigsberg  <danken@redhat.com>

	janitorial: throttledlog: drop never-used constant

	janitorial: storage tests: drop unused constants

2017-06-02  Irit Goihman  <igoihman@redhat.com>

	shell helper: fix vdsm-client calls
	unsecure option has been recently deprecated and replaced by
	insecure option.
	shell helper script has been still using the old option and needed an
	update.

	Signed-off-by: Irit Goihman <igoihman@redhat.com>`

	vdsm-client: fix man page
	unsecure option is a typo and has been marked as
	deprecated in vdsm-client code.
	It's been replaced by insecure option.

	Bug-Url: https://bugzilla.redhat.com/1454696

2017-06-02  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	xmlrpc: remove transport verification
	This patch removes unused code and it is logical follow-up patch after:
	66d1801a from the same topic branch.

2017-06-01  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop another never-used constant

2017-06-01  Martin Polednik  <mpolednik@redhat.com>

	hugepages: fix typo in exception
	Contignuous (not a word) -> Contiguous (actual word).

	hugepages: add test for ppc64le hugepage default
	Ppc64le uses 16 MB pages as default. Let's test that's what we set.

	hugepages: create 1G hugepages mount
	Non default hugepages require hugetlbfs to be mounted w/ special
	option specifying the hugepage size (e.g. hugepagesz=1G).

	To avoid having users do this themselves, we create systemd mount to
	mount hugetlbfs with 1G pages to location where qemu/libvirt expect it
	(/dev/hugepages1G).

	vdsmtool: allow unit files other than services
	The previous code did not allow any other unit files than pure
	services to be controlled. We extend the code to keep the previous
	behavior of adding .service to unit name as long as user doesn't
	specify the type explicitly.

2017-06-01  Nir Soffer  <nsoffer@redhat.com>

	tox: Use site packages for all targets
	flake8 target fails now because of a regression in setuptools, not
	finding six in the virtual environment. Since we require six for actual
	vdsm code, we can use the system install version. Unify all targets to
	use sitepackages=True.

2017-05-31  Milan Zamazal  <mzamazal@redhat.com>

	virt: Initialize Vm.id from domain descriptor
	XML Engine is going to send as a domain XML rather than all the params.
	So let's take VM id from the domain XML and not from the params.

	virt: Store VM start time to metadata
	We want to stop using recovery files in the future.  In order to discard
	recovery files, we must store all relevant information to domain XML.  If some
	information is not available from domain XML or libvirt functions, we must
	store it to domain XML metadata.

	This patch introduces the needed functionality:

	- It defines a method to store needed information about a VM to metadata.
	- It calls the method when the VM is started.
	- VM start time is stored to metadata as a particular piece of needed information
	  currently not available elsewhere.  Other pieces of information will be added
	  in followup patches.

	We plan to update metadata only when a VM is started and at (rare, if any)
	occasions when information in metadata changes.  This a significant difference
	to updating recovery files, which must be updated at each status or device
	change.  With information stored in domain XML and VM status determined from
	libvirt (once https://bugzilla.redhat.com/1441563 is fixed) such frequent
	updates are no longer necessary.

	virt: Switch to persistent domains
	We have been using transient domains for running VM so far.  They disappear
	when their VMs stop running at the given host.  Detailed information about a
	destroyed VM is still retained in its recovery file, until Engine asks for
	releasing it.

	We would like to stop using Vdsm specific recovery files and use libvirt domain
	XML as the complete and ultimate source of information about a VM instead.  In
	order to be able to access the domain data before the VM is started or after
	it's stopped, similarly to the recovery files, we need persistent domains that
	don't disappear immediately.

	This patch switches from transient to persistent libvirt domains.  Creation and
	removal of the domains is handled similarly to recovery files.  The only extra
	feature is that we must remove the domain, if it exists, before a VM is
	defined.

2017-05-31  Francesco Romani  <fromani@redhat.com>

	virt: devices: network: add from_xml_tree
	Make it possible to initialize a Network device from its
	XML representation.

	This patch adds the basic support for simple NICs connected
	to the plain linux bridge.

2017-05-30  Roy Golan  <rgolan@redhat.com>

	jobs: Send an event on job completion
	Whenever a job completes, no matter the final state, notify using a
	stomp event.
	Note that the this is called last after every handling occur.

2017-05-30  Ala Hino  <ahino@redhat.com>

	cold-merge: Minimize illegal chain during cold merge
	Before this patch, base volume was set to ILLEGAL at the prepareMerge
	step. That decision was too conservative as at the prepareMerge step the
	volume size is updated, and at the merge step, the data is copied. The
	critical point where setting base volume to ILLEGAL, is when updating
	qemu metadata in finalizeMerge step.

	We don't change base volume legality anymore, because it remains valid
	during the whole merge process. However, we set top volume to ILLEGAL
	in the very short window when updating qemu and vdsm metadata.

	This patch also enhances recovery from failures during cold merge.
	Previously, if cold merge failed at any step, the base volume was
	ILLEGAL and manual recovery (fixing the metadata) required. With this
	change, the chances that the top volume is ILLEGAL are really low, which
	enables the user to recover from failures by retrying cold merge.

	Bug-Url: https://bugzilla.redhat.com/1430358

	cold-merge: Refactor metadata update code
	This refactor will be needed in commit I86b76a (cold-merge: Update top
	volume legality at finalize step) in order to set top volume legality.

	Note that recovery from failures explained in this patch, will be
	changed in commit I86b76ab (cold-merge: Update top volume legality at
	finalize step).

	Bug-Url: https://bugzilla.redhat.com/1430358

2017-05-30  Nir Soffer  <nsoffer@redhat.com>

	hsm: Allow monitoring specific domains
	Clients may like to use Host.getStorageRepoStats for monitoring specific
	storage domain (e.g hosted engine storage domain), decreasing the noise
	in vdsm log and amount of data formatted and parsed on each request.

	Add domains argument for specifying the storage domains. If not
	specified, return statistics for all domains.

	Example usage:

	    # vdsm-client -f- Host getStorageRepoStats <<EOF
	    {
	        "domains": [ "d4ad5a78-1d75-457b-8caf-400d2d7917a6" ]
	    }
	    EOF
	    {
	        "d4ad5a78-1d75-457b-8caf-400d2d7917a6": {
	            "code": 0,
	            "actual": true,
	            "acquired": true,
	            "delay": "0.0010929",
	            "lastCheck": "3.3",
	            "version": 4,
	            "valid": true
	        }
	    }

	tests: Fix flaky qemuimg.commit() test
	When testing commit, we used to verify that upper layers are not
	modified by the commit using the number of used blocks (st_blocks). For
	some reason this check fail randomly every few month in the CI. Change
	the test to use image-end-offset returned by qemu-img check.

2017-05-30  Edward Haas  <edwardh@redhat.com>

	net: Add retcode logging to cmd.exec_*

	net test: Use cmd.exec_* in network tests

2017-05-30  Francesco Romani  <fromani@redhat.com>

	virt: devices: graphics: add from_xml_tree
	Make it possible to initialize a Graphics device from its
	XML representation.

2017-05-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	using io.open in passwd.py
	to support py3 formating, io.open allows to specify encoding to utf-8

2017-05-30  Francesco Romani  <fromani@redhat.com>

	virt: metadata: add device_from_xml_tree
	We take a slighlty different route with respect to
	metadata.from_xml to avoid wasteful repeated parsing of the domain xml.

	vm: update vm properties from metadata
	Since we are going to get all the VM parameters from the
	client-provided domain XML, we now need to get the custom properties from
	the domain metadata.

	Furthermore, we also need to ensure we always haver the 'devices'
	key in the vm.conf dict, even though we no longer use it, to avoid
	to pepper the Vm class code with `if`s.

2017-05-29  Nir Soffer  <nsoffer@redhat.com>

	misc: Remove ddCopy() and ddWatchCopy()
	No code is using these now except the tests; remove the code and the
	tests.

	blockSD: Replace misc.ddCopy with blockdev.zero()
	Replace the last usage of misc.ddCopy with calls to the new
	blockdev.zero().

	blockdev: Support zeroing special images
	When zeroing images, device size is always multiple of the vg extent
	size (128MiB). But when zeroing special volumes like the inbox and
	outbox, the size is less then a megabyte. Refactor the code so we can
	support sizes which are not aligned to 1MiB.

	blockdev: Introduce the blockdev module
	This module handles data operations on block devices:

	- zero() - fill block device with zeros

	- discard() - discard a block device

	- discard_enabled() - tell if a user configured automatic discard
	  regardless of device capabilities.

	These operations were duplicated multiple times in blockSD and
	blockVolume.

	The new module avoids dependencies on legacy modules that cannot be
	tested like blockSD and blockVolume.

	Error handling is somewhat improved by handling only relevant errors
	during zero. Previously we used to log error twice, once after
	ddWatchCopy failed, and again when the task fail. Now we are raising
	either se.VolumesZeroingError for expected write errors, and letting
	other errors propagate to the top error handler, where they will be
	logged once.

	Logging is improved to log the time for wipe or discard operation
	similar to the way we log qemu-img operations, but using log.info, so
	the information is available by default.

	This patch is required for wiping volumes using blkdiscard.

	Bug-Url: https://bugzilla.redhat.com/1454425

2017-05-29  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Add support for parsing drive xml for network drives
	Also adds network device support to volume id retrieval.

	storage: Add tests for creating snapshot xml for network drive
	Add missing tests for creating snapshot xml and handling invalid protocol.

2017-05-29  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't report migration parameters in status
	Engine shouldn't need those parameters and they get into machineParams in other
	ways.  Migrations and hibernation apparently work despite the typos in the
	parameter names, which is some confirmation that those parameters won't be
	missing anywhere.

2017-05-29  Francesco Romani  <fromani@redhat.com>

	virt: use the new find_device_alias helper
	alias = vmxml.find_attr(some_xml, 'alias', 'name')

	used to be a pretty common construct; we can now replace
	with more generic and more high-level helper.

	virt: metadata: add from_xml helper
	Parse the metadata section of one engine-provided domain XML.

	virt: vmdevices: add more parsing helpers
	Will be used to find the device metadata.

	vm: hugepages: use the vm._custom field
	We are transitioning towards the engine-provided domain XML,
	so we should access custom properties using the Vm._custom attribute,
	which is guaranteed to be present and valid regardless how the VM
	is initialized (conf format or xml format).

	This patch fixes that.

2017-05-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	Configure sasl2 libvirt to use scram-sha-1
	The default of mech_list was changed in libvirt 3.2 to gssapi. This
	patch adds to isconfigured a check if the new value exists. If so,
	configure will replace the content to mech_list: scram-sha-1

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1444426

2017-05-29  Edward Haas  <edwardh@redhat.com>

	net: Route removal should not ignore the table it is in
	When querying the list of ip routes in a specific table,
	the returned list in iproute2 implementation does not include the
	table ID and therefore it was wrongly assumed as 'none'/any.

	The table is returned in the report only if the table is 'all', which
	reports all routes from all tables.
	The ip.route/iproute2 driver has been updated to include the correct
	table for each route data object.

	Bug-Url: https://bugzilla.redhat.com/1452185

2017-05-29  Petr Horáček  <phoracek@redhat.com>

	network: isolate libnl bindings, *2str functions

	network: isolate libnl bindings, error function
	Also use nl_geterror with error code argument, since nl_geterror
	without arguments is not documented in libnl codebase.

2017-05-29  Edward Haas  <edwardh@redhat.com>

	net: Use cmd.exec_* in ipwrapper module
	netns_exec has been modified to use an async executor in the form of
	Popen.

	net: Use cmd.exec_* in tc package

	net: Use cmd.exec_* in vsctl module

	net: Use cmd.exec_* in networkmanager module

2017-05-29  Milan Zamazal  <mzamazal@redhat.com>

	virt: Store restoreFromSnapshot to _altered_state
	Let's remove another Vm.conf usage with this patch and utilize the common place
	of information about the VM origin.

2017-05-29  Edward Haas  <edwardh@redhat.com>

	net: Use cmd.exec_* in link.dpdk module

	net: Use cmd.exec_* in ifcfg module

2017-05-29  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop another unused constant
	Prehistoric commit 806420 stopped using this constant.

	janitorial: drop unused constant
	vdsmcert is defined twice in constants.py, only one definition is ever
	used.

2017-05-29  Irit Goihman  <igoihman@redhat.com>

	net api: introduce remove_ovs_port function
	remove_ovs_port is needed for vhostuser port.
	In this case, the port isn't deleted automatically when
	vm is destroyed and we need to call this function explicitly.

	net api: introduce add_ovs_vhostuser_port command
	The function is responsoble for adding a vhostuser
	interface to ovs bridge.

2017-05-28  Nir Soffer  <nsoffer@redhat.com>

	tests: Add loopback module
	Provides the loopback.Device class, useful for creating temporary loop
	devices for testing:

	    with loopback.Device("/tmp/baking-file"):
	        print device.path  # /dev/loop0

	This module is needed for tests creating temporary vgs and lvs.

	Bug-Url: https://bugzilla.redhat.com/1374545

2017-05-27  Edward Haas  <edwardh@redhat.com>

	net: Use cmd.exec_* in dhclient module

	net: Introduce a simplified cmd exec implementation
	The network package is frequently utilizing the execCmd function to
	execute shell based commands.
	This patch introduces a simplified version of execCmd, focused on the
	limited needs of the network package.

	The new cmd module exposes a blocking exec function (exec_sync) and a
	systemd exec function.

	In the following patches, the users of execCmd will get migrated to the
	new cmd module implementations, reducing the dependency on the generic
	VDSM libs.

	net test: Modify and clean TestNMConnectionSettings tests
	Cleaning up some of the tests overhead and complexity by using the
	nm_connections returned value (the list of created connections).

	net: Run NM tests only if systemctl is available
	NM tests have been excluded from the 'check' test pool by marking them
	as functional. But this approach in practice expluded them from ever
	running.
	This patch checks for the availability of systemctl and skips the test
	module if not available.

	Nodes that do not have NM running, should skip these tests.

2017-05-26  Edward Haas  <edwardh@redhat.com>

	net: Remove iproute2 configurator
	ifcfg and iproute2 are the existing available net configurators but
	iproute2 has not been maintained (or tested) for some time now.
	It is also not in use by any module.

	As we plan to replace the configurators as defined today, there is no
	reason to keep iproute2 in the code base.

2017-05-26  Francesco Romani  <fromani@redhat.com>

	metadata: document _find_device return type
	_find_device may return None if no device data is found;
	let's improve the documentation of the function to reflect that.

	metadata: namespace support in _find_device
	Will be used by *from_xml functions.
	Non change in existing behaviour.

	We need to explicitely support namespaces because
	we access the same XML data from two sources.
	Once the domain is defined, libvirt takes care of the
	namespace handling through its API, so the XML we work with
	is clean and simple.

	In the creation flow, however, we must deal with the XML
	ourselves and take care of the namespaces.

	The metadata code needs to support both those flows, hence
	the need for explicit, optional namespace support.

	virt: domain_descriptor: add metadata property
	expose the `metadata` element, much like we do with
	the `devices` element.

	virt: devices: core: assume vmid parameter
	The vm devices can have optional device metadata;
	however, they must always know the UUID of their
	parent Vm.

	The Vm class must make sure the 'meta' dictionary
	has always at least the 'vmid' key.
	Thus, we can depend on this constraint in the devices
	code.

	This patch ensures so for core (aka simple) devices:
	- the Console device needs the vm UUID to build the unix
	  domain socket path
	- the Rng device needs the vm UUID for appropriateRngDevice

	Actually those are the only core device which need the VM UUID.

2017-05-26  Martin Polednik  <mpolednik@redhat.com>

	hugepages: make dynamic allocation configurable
	There may be use cases or host loads where attempting to dynamically
	allocate hugepages could take hours of machine time. We therefore
	allow users to configure whether such behavior is wanted.

	Defaults to True as there is no downside on properly configured hosts
	(those that have enough preallocated hugepages).

2017-05-26  Milan Zamazal  <mzamazal@redhat.com>

	virt: Merge _migration_destination and _restore_state_path
	Those attributes serve a similar purpose and are mutually exclusive, so we can
	merge them into a single attribute.  It simplifies the code a bit and saves one
	Vm attribute.

2017-05-26  Adam Litke  <alitke@redhat.com>

	storage: Don't swallow domain lock init failures
	When creating a new storage domain, we were swallowing errors when
	initializing the SPM lease failed.  This just delays problems because an
	incomplete domain is created and subsequent flows (eg. attach SD) will
	fail due to a missing Sanlock lockspace.  All new domains must have a
	functional cluster lock so stop ignoring failures.

	Refactor the test classes so that tests meant to be run on file and
	block domains can be implemented just once in a shared ancestor class.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1386830

2017-05-25  Edward Haas  <edwardh@redhat.com>

	net: Wait for link-up when creating a bond through link.bond
	The test _test_add_network_with_multiple_vlans_over_a_bond failed
	frequently while NM is running due to the bond iface link state (it was
	down).

	This patch gives the bond a chance to update its link state to UP before
	the setup flow continues (giving a 2 sec timeout).

	net: Post bond ifup, wait until its link comes up
	When acquiring the device from NM, it may take a few seconds until
	the bond is released by NM and loaded through initscripts.

	This patch is giving the bond a chance to come up before continuing.

	The problem appeared in one of the NM functional tests:
	test_add_net_based_on_device_with_multiple_nm_connections

	net test: Use a single slave in the NM vlan-bond-slave sync test
	The test_add_net_based_on_existing_vlan_bond_nm_setup test has randomly
	failed due to the slaves mac address swap (the bond mac is assigned
	based on the first slave added).

	Until the NM and ifcfg/initscripts use a consitent order to load the
	slaves, the test will use a single slave.

	Note that the test itself was focused on the vlan iface mac being
	identical to the bond mac and not on the consistency of the slave load
	order.

	net test: Refactor NM tests and its test lib
	The patch includes NM tests setup and teardown functionality, making
	sure the resources are cleaned from the VDSM configuration.

	The dummy nics that have been used as slaves to the NM bond are now
	created at the test level (and not in the test lib) to allow more
	control and reduce the complexity in the test lib.

2017-05-25  Martin Polednik  <mpolednik@redhat.com>

	hugepages: add intelligent allocation policies
	Since we would like to use dynamically and statically allocated
	hugepages together, we have to make sure we respect what the user
	or other applications want.

	We therefore add following allocation and deallocation policies:

	* reserved pages (portion of preallocated pages that we don't touch)
	* preallocated pages (via kernel cmdline)
	* dynamically allocated pages

	Allocation:

	- only allocate pages if there are not enough free pages that do not
	fall into reserved range
	- if the total number of pages isn't sufficient for reserved pages,
	  allocate these on top of VM pages

	Deallocation:

	- never deallocate preallocated pages
	- never deallocate pages that are reserved (even if previously
	  allocated)
	- never deallocate more pages than the VM needed in the first place

2017-05-25  Milan Zamazal  <mzamazal@redhat.com>

	virt: Store migration destination to a dedicated Vm attribute
	We'd like to get rid of Vm.conf, so let's move that information out of there.

	virt: Store restore state to a dedicated Vm attribute
	We'd like to get rid of Vm.conf, so let's move that information out of there.

	virt: Don't get _srcDomXML from self.conf
	Let's store _srcDomXML to a dedicated attribute rather than to self.conf.

2017-05-25  Francesco Romani  <fromani@redhat.com>

	vm: memory_info(): ignore races on shutdown
	The newly added Vm.memory_info() is going to be called asynchronously,
	so the underlying domain can be swapped while the code run.
	Let's handle this case gracefully without spitting a scary (and useless,
	this is a known benign case) stacktrace in the logs.

2017-05-25  Irit Goihman  <igoihman@redhat.com>

	ovs driver: introduce add_vhostuser_iface command
	The command supports setting dpdkvhostuserclient inreface type.

	network api: update ovs_bridge call
	ovs_bridge now returns bridge name and a boolean indicating
	if it contains a dpdk type port.

2017-05-25  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Revert "jobs: Send an event on job completion"
	This reverts commit 7cd036d682dff2c2483d145442b505ee485dcfde.

2017-05-25  Roy Golan  <rgolan@redhat.com>

	jobs: Send an event on job completion
	Whenever a job completes, no matter the final state, notify using a
	stomp event.
	Note that the this is called last after every handling occur.

	Bug-Url: https://bugzilla.redhat.com/??????

2017-05-25  Tomas Jelinek  <tjelinek@redhat.com>

	virt: migration: do not refer to RHBZ#919201
	In case the migration is stalling we issue a warning log message containing a
	reference to RHBZ#919201 which is a bug opened against ovirt 3.1 and is not
	relevant anymore.

	Bug-Url: https://bugzilla.redhat.com/1455138

2017-05-24  Francesco Romani  <fromani@redhat.com>

	virt: always add vmid to device configuration
	Devices should always have the 'vmid' attribute available.

	tests: call device setup/teardown
	The proper device protocol requires that the Device instances
	are completely initialized before to call any real method on that,
	otherwise we end up in undefined behaviour (method may or may not work
	depending on device parameters and the method being called).

	We accomplish that doing

	obj = Device(*args, **kwargs); obj.setup()

	The current test didn't do that, because core devices don't need to do
	anything meaningful in their setup().
	The only exception was the Rng device, but here the bug sneaked in
	because of the test parameters, which do not mandate the instance to
	do further actions in setup()

	This patch ensures the right protocol is followed in _check_roundtrip,
	making the test code ready to accomodate the complex devices (Graphics,
	Interface), which will need to do complex operations in
	setup()/teardown().

	tests: simplify _check_roundtrip
	_check_roundtrip used to return the instance it created after the
	check succesfully completed. That allowed to piggyback more tests after
	the main one.

	Now we remove this ability for the sake of cleanliness - and to further
	improve the roundtrip tests: in a future patch
	(Ie2cdfde781d929c3575fe170ffd2e1b35e850e70), we will need to call
	setup/teardown around getXML() in _check_roundtrip, so it makes no
	sense anymore to return the object we used for the check: after
	teardown, it will become useless.

	The two tests that relied on the previous behaviour of
	_check_roundtrip are being split off and preserved.

2017-05-24  Milan Zamazal  <mzamazal@redhat.com>

	tests: Skip asyncproc tests on Python 3
	Those tests use execCmd that uses AsyncProc class that doesn't work on
	Python 3.  Let's disable them for Python 3 to prevent reporting the failure.

2017-05-23  Dan Kenigsberg  <danken@redhat.com>

	virt: graphics: resolve specParams[displayNetwork] once
	Once we know we have a valid display_network, we'd better use it.
	This patch has no functional change.

2017-05-23  Martin Polednik  <mpolednik@redhat.com>

	hugepages: add support for arbitrary supported size

	hugepages: move hook functionality to the main codebase
	Since we now have everything we need to properly support hugepages
	without hooks, the hook can be dropped.

	The way hugepages work is backwards compatible, requiring `hugepages`
	custom property. Slight change is that the code can now automatically
	calculate and allocate required number of hugepages, therefore the
	logic simply checks for hugepages > 0 to enable the functionality.

2017-05-22  Petr Horáček  <phoracek@redhat.com>

	network: use driverloader in vdsm.network.link.bond

2017-05-22  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Add index support for blockcommit
	libvirt virDomainBlockCommit call is used in merge flow and requires
	two arguments - base file and top file, commiting changes that were
	made to temporary top-level files within a disk image backing file chain
	into a lower-level base file.

	Those base and top arguments could be either paths to files within
	the backing chain, or the device target shorthand, followed by an index
	to the backing chain enclosed in square brackets.

	For example it could be either '/path/to/file' or 'vda[1]'

	Before that patch vdsm used first approach and supplied
	virDomainBlockCommit call with path to files.

	Unfortunately it appeared, that using indexes is a recomended approach,
	due to qemu limitations:

	"the URI itself can't be really identified by libvirt in the API entry
	point, since that depends on the qemu impl itself, since that API does
	not take an XML which is the frontend description of the disk.
	But with using indexes in the backing chain, libvirt will know how
	drive ("vda") is implemented internally."

	We actually hit that limitation with network disk types, as per
	https://bugzilla.redhat.com/1397870

	As network disk types require using indexes in block commit calls and
	using indexes is a recommended way to supply base/top arguments of that
	call, this patch switches merge flow for all disk types to indexes.

	Bug-Url: https://bugzilla.redhat.com/1022961

2017-05-22  Francesco Romani  <fromani@redhat.com>

	virt: fix is_kvm helper
	it should work with custom properties only, not with vm.conf

	hooks: do not use vm.conf directly
	But rather the subset of the data that the hooks actually use.

2017-05-22  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: remove m2crypto
	We introduced this library because it supports ssl session caching which
	improved performance of xmlrpc communication where we established many
	connections. Now with jsonrpc we connect once and we maintain the
	connection for long time so cached session do not give us any benefits.
	By removing m2crypto we reduce maintenance pain of supporting two ssl
	libraries.

2017-05-21  Dan Kenigsberg  <danken@redhat.com>

	logutils: drop QueueHandler
	The last usage of QueueHandler was removed by
	http://gerrit.ovirt.org/4318 .
	There is no need to keep this class around.

	logutils: drop TracebackRepeatFilter
	Since its introduction in prehitoric commit 6f8a7a7 due to rhbz#572050,
	logger.conf had a wrong reference to TracebackRepeatFilter. The class
	has never been used in production code, and it is time to retire it.

2017-05-21  Edward Haas  <edwardh@redhat.com>

	logUtils: Move logUtils module to vdsm.common
	logUtils has been relocated to common, to make it clearer
	that it is being used by multiple subsystems, and verifying that it
	has no dependencies on non-common vdsm code.

	The module has been renamed to logutils.

	This patch also fixes lib/vdsm/common/api.py which depended on an
	external (non common) module.

	A follow up patch is planned to add traceback to this module.

	In order to support upgrades of systems that have manually edited the
	logger conf file, a small proxy is left in the current logUtils module,
	pointing to the new location under common.

2017-05-19  Nir Soffer  <nsoffer@redhat.com>

	stoarge.dispatcher: Update fallback error log
	If a task cannot be created, or handling task error fails, we a have a
	fallback exception.

	This patch:
	- Documents the purpose of this log
	- Removes the "run and protect" prefix since storage logs do not contain
	  this concept any more
	- Formats arguments in new style (key=val, ...)

	storage.dispatcher: Unify verbs errors
	In virt all apis are wrapped in @api.method, logging exceptions on
	errors. In storage, we have more complex implementation that we cannot
	replace easily. This patch unifies the error logs to use the same format
	as in @api.method.

	Bug-Url: https://bugzilla.redhat.com/1112120

	hsm: Unify storage and virt api logs
	Replace the "Run and protect:" storage logs on the "dispatcher" logger
	with the standard @logged decorator, logging to "vdsm.api" logger used
	in virt. This adds the call context to all storage logs.

	Example remote call with 4.2 engine:

	    2017-05-12 15:11:59,312-0400 INFO  (jsonrpc/6) [vdsm.api] START
	    spmStart(spUUID=u'4e932851-4ec8-4aca-ae78-756aa093ca23', prevID=-1,
	    prevLVER=u'-1', maxHostID=250, domVersion=u'4', options=None)
	    from=::ffff:192.168.201.3,57136, flow_id=33280e0f (api:46)

	    2017-05-12 15:11:59,313-0400 INFO  (jsonrpc/6) [vdsm.api] FINISH
	    spmStart return=None from=::ffff:192.168.201.3,57136,
	    flow_id=33280e0f (api:52)

	Example remote calls with 4.1 engine (no flow_id):

	    2017-05-12 03:44:04,057+0300 INFO  (jsonrpc/3) [vdsm.api] START
	    spmStart(spUUID=u'6c99f4e5-8588-46f5-a818-e11151c1d19c', prevID=-1,
	    prevLVER=u'-1', maxHostID=250, domVersion=u'4', options=No ne)
	    from=::ffff:10.35.0.111,53336 (api:46)

	    2017-05-12 03:44:04,058+0300 INFO  (jsonrpc/3) [vdsm.api] FINISH
	    spmStart return=None from=::ffff:10.35.0.111,53336 (api:52)

	Example internal calls (no context):

	    2017-05-12 03:43:54,040+0300 INFO  (periodic/2) [vdsm.api] START
	    repoStats(options=None) from=internal (api:46) 2017-05-12

	    03:43:54,041+0300 INFO  (periodic/2) [vdsm.api] FINISH repoStats
	    return={} from=internal (api:52)

	Bug-Url: https://bugzilla.redhat.com/1112120

2017-05-19  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: fix allocated hugepages calculation
	The previous calculation worked fine for simple case where we only
	added hugepages or subtracted them, but didn't properly account for
	possible failures.

	Example failure:
	allocated pages = 16
	count = 4
	allocated pages + count = 18 (system couldn't allocate all 4 pages)
	but we returned min(18, 4) ~> 4.
	Now we return 18 - 16 = 2.

2017-05-19  Irit Goihman  <igoihman@redhat.com>

	shell-helper: remove old packages
	infra and cli packages have been removed so they're
	not needed anymore.

2017-05-19  Nir Soffer  <nsoffer@redhat.com>

	cmdutils: Introduce the receive() helper
	cmdutils.receive() replaces both commands.AsyncProc and
	utils.CommandStream. This function allows reading from sub process
	stdout and stderr in the same time, without using callbacks as in
	utils.CommandStream, and avoiding the performance issues and the
	complexity of utils.AsyncProc. This function is also python 3
	compatible.

	cmdutils.receive() does not support writing to and reading from a sub
	process in one thread at the same time. This is supported by
	commands.AsyncProc, but I don't know of any real world use case for
	this.

	Example usage:

	    # Reading from both stdout and stderr:

	    p = CPopen(["foo", "--progress"], cmd, stdout=PIPE, stderr=PIPE)

	    for src, data in cmdutils.receive(p):
	        if src == cmdutils.OUT:
	            print data
	        if src == cmdutils.ERR:
	            print data

	    # Waiting for process 10 seconds without risk of deadlock:

	    for _ in cmdutils.receive(p, timeout=10):
	        pass

	Comparing with AsyncProc and plain Popen.stdout, new tests copy 1g of
	data to/from subprocess. commands.AsycProc() is limited to 0.06g/s,
	while using cmdutils.receive() only somewhat slower than reading
	directly from subproces stdout.

	test_asyncproc_read   1.00g in 17.02 seconds (0.06g/s) OK
	test_asyncproc_write  1.00g in 13.71 seconds (0.07g/s) OK
	test_plain_read       1.00g in 0.45 seconds (2.22g/s) OK
	test_read             1.00g in 0.53 seconds (1.89g/s) OK
	test_write            1.00g in 0.49 seconds (2.04g/s) OK

	Currently we are using utils.CommandStream only in qemuinfo.convert()
	and qemuimg.commit(). This usage will be replace with cmdutils.received
	in these series.

	Usage of commands.AsyncProc will be update later.

2017-05-19  Irit Goihman  <igoihman@redhat.com>

	yajsonrpc: define a more proper exception
	avoid calling superclass init function, instead
	inherit from VdsmException.

2017-05-19  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Made get_snapshot_xml use _getSourceXml
	As most parts of get_snapshot_xml code were generation
	of <source/> element, it should use already existing
	_getSourceXml for that.

	storage: Made get_snapshot_xml a member of Drive.
	As get_disk_snapshot_xml depends on:

	 * drive's diskType
	 * drive's name
	 * new snapshot path

	It looks like a Drive method, so i moved it to Drive and made using
	Drive's infrastructure.

	common: Made UnsupportedOperation subclass of a ContextException

2017-05-19  Martin Polednik  <mpolednik@redhat.com>

	vdsmclient: change unsecure option to insecure
	Unsecure shouldn't be the argument indicating lack of security in
	protocol sense. Let's use more appropriate word 'insecure' as an alias
	to unsecure.

	We also change the help text of the wrong option to warn about
	deprecation. This change is therefore backwards compatible.

	https://english.stackexchange.com/questions/19653/insecure-or-unsecure-when-dealing-with-security

2017-05-18  Francesco Romani  <fromani@redhat.com>

	lib: dmidecode: suppress bogus pylint warning
	We got a pylint complain about dmidecodeUtil:

	E: 44,22: Module 'dmidecode' has no 'system' member (no-member)

	This is likely caused by this star-import as the very
	beginning of dmidecode.py:

	  from dmidecodemod import *

	(dmidecode.py doesn't define system() and gets it from dmidecodemod.so)

	Thus, at runtime we have this method, but no static analysis tool
	can detect it.
	This patch suppress the unhelpful pylint warning.

2017-05-18  Nir Soffer  <nsoffer@redhat.com>

	vm: Remove unneeded return value check when ending live merge
	This is the libvirt binding binding implementation:

	    ret = libvirtmod.virDomainBlockJobAbort(self._o, disk, flags)
	    if ret == -1: raise libvirtError ('virDomainBlockJobAbort() failed', dom=self)
	    return ret

	vm: Remove unneeded return value handling
	Some libvirt calls are documented to return 0 on success and -1 on
	error. However, when using the python bindings, these calls always
	return 0, or raise an exception. Therefore, there is no need to check
	the return value, only handle the exception.

	This patch removes unneeded return value check when starting live merge.
	This is the libvirt binding implementation:

	    ret = libvirtmod.virDomainBlockCommit(self._o, disk, base, top, bandwidth, flags)
	    if ret == -1: raise libvirtError ('virDomainBlockCommit() failed', dom=self)
	    return ret

2017-05-18  Edward Haas  <edwardh@redhat.com>

	utils: Extract CommandPath from utils module
	CommandPath has been relocated to common.cmdutils, to make it clearer
	that it is being used by multiple subsystems, and verifying that it
	has no dependencies on on non-common vdsm code.

2017-05-18  Fred Rolland  <frolland@redhat.com>

	image: estimate_qcow2_size max size calculation
	In estimate_qcow2_size, the format of the source volume was used for
	calculating the max_size instead of using COW format.

	Bug-Url: https://bugzilla.redhat.com/1448606

2017-05-17  Petr Horáček  <phoracek@redhat.com>

	network: add driverloader module
	DriverLoader class provides tools to gather and provide drivers
	(interface implementations).

	In this patch we use it just for ip.route and ip.rule. In following
	patches we will use this also for OVS and bonding drivers.

	network: prepare ip_rule_test for different implementations

	network: split ip.rule api and implementation
	Prepare ground for different IPRuleApi implementations (such as
	NetworkManager one) by splitting API and its iproute2 implementation.

	network: wrap rule.py add/del exceptions with IPRuleError

2017-05-17  Irit Goihman  <igoihman@redhat.com>

	dmidecode: collect only system info
	We report only system related info in getHardwareInfo so
	collecting other verbs is unnecessary.

	Bug-Url: https://bugzilla.redhat.com/1447454

2017-05-17  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Replaced strings with constants in get_disk_snapshot_xml
	Source type checking now uses predefined constants and expception
	is raised for unknown values.

	storage: Added tests for get_snapshot_xml

	storage: extracted get_snapshot_xml
	get_snapshot_xml was extracted from vm.snapshot
	to improve readability and testability.

2017-05-17  Leon Goldberg  <lgoldber@redhat.com>

	net tests: Migrating testFailWithInvalidBondingName to the new functional tests.

	net tests: testing sb validations using dedicated function
	Instead of using the general validate functions, now using
	the dedicated validate_southbound_devices_usages function.

	net: Introducing validate_bond_names to netswitch validators
	There is no difference in the definition of valid bond names
	between OVS and legacy switch. As such, bond name validation
	was moved upwards to netswitch validators.

	Besides checking for valid bond names upon bond creation,
	we're now also checking the names of externally created bonds
	that networks are being set on.

2017-05-17  Miguel Martin  <mmartinv@redhat.com>

	vdsm: fix kvm_amd nested virtualization detection
	Vdsm osinfo module fails detecting kvm_amd nested virtualization.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1426566

2017-05-17  Francesco Romani  <fromani@redhat.com>

	virt: move call of hooks back in Vm
	Preparing a Vm for a live migration involves calling some hooks,
	and accessing private Vm data. This suggest those steps should
	be incapsulated in one method of the Vm class.
	This patch does that.

	virt: move hibernation logic back in Vm
	The steps needed to hibernate a VM should be encapsulated
	in a method of the Vm class, not called by the friend migration code.
	This patch does the move.

2017-05-17  Arik Hadas  <ahadas@redhat.com>

	preliminary support for engine's domxml
	This patch introduces a basic preliminary support for getting libvirt's
	domxml generated by the engine. The reason for having this temporary
	code is twofold:
	1. it enables people to use this new API in their development environment
	in an early stage of 4.2, which increases the chance to find issues
	in the generation of the XML.
	2. it enables people to use this new API that is expected to simplify
	the implementation of new features/changes.

	The domxml is optional. If the engine sends it, it send it together with
	all the stuff that the engine used to send on run/create VM. That way,
	the existing code in VDSM works as it worked before and only the function
	_buildDomainXML is changed: instead of building the XML from the data
	in the VM dictionary, it just replace some place-holders in the given
	XML and then continues with the modified XML.

2017-05-17  Irit Goihman  <igoihman@redhat.com>

	ovs: support creating an ovs-dpdk setup
	In case that ovs bridge is created on top of a dpdk
	nic, ovs bridge will be created with user space
	forwarding plane, having the ability to communicate with
	dpdk libraries.

	ovs: introduce set_dpdk_bridge and set_dpdk_port commands
	These commands set dpdk bridge and port types, enabling
	support of ovs-dpdk setup.

	network: add special treatment for dpdk ports
	When nics are bound to DPDK driver, instead of traditional kernel
	driver, they have to be accessed in a different manner.

	Netowrk processing driver is a user space driver and packet processing
	is not taking place in kernel domain.
	Hence, traditional tools for reading nic speed, getting information
	about its state and similar actions are irrelevant.

	This patch adds fake information for nics which are bound to DPDK.

	shell-helper: replace xmlrpc with http package
	xmplrpc package has been recently replaced with http package.
	In order to install vdsm using shell_helper functions we need
	to replace xmlrpc with http in the list of rpms to install.

2017-05-17  Francesco Romani  <fromani@redhat.com>

	vm: fix the logic in the recovery flow
	In the recovery flow, we should swallow the exceptions and go ahead,
	while in every other flow we should bail out with exception.

	In commit 0cb80ab195e4a65c4df45ca1f07cb4baf48f3a63 a logic bug
	sneaked in, caused the reversal of the aforementioned exception
	handling logic in the recovery flow.

	This patch restores the expected behaviour.

	virt: tests: recovery must ignore exception
	Add a test to make sure we swallow the exceptions in the recovery flow.
	As master 10b3840, this is broken (since 0cb80ab195) and fixed by change
	Ib6094cac930311db53d40b5886003a766c2036ce, thus the new test is
	marked @xfail.

	host: stats: use integer division
	We use integers in the API schema

2017-05-16  Nir Soffer  <nsoffer@redhat.com>

	lvm: Add info logs for state changes
	Add missing info level log for lvm operations that change the system
	state.  These operations were logged only in debug level, showing the
	actual lvm command. New logs show the logical operations and the
	arguments.

	Example logs:

	2017-05-14 18:25:39,482-0400 INFO  (jsonrpc/0) [storage.LVM] Creating LV
	(vg=c3ebdeb0-7e77-4e9d-92a8-408eecaffd5f, lv=metadata, size=512m,
	 activate=True, contiguous=False, initialTags=()) (lvm:1150)

	2017-05-14 18:25:41,167-0400 INFO  (jsonrpc/0) [storage.LVM] Changing VG
	tags (vg=c3ebdeb0-7e77-4e9d-92a8-408eecaffd5f, delTags=['RHAT_storage_domain_UNREADY'],
	addTags=['RHAT_storage_domain']) (lvm:1410)

	2017-05-14 18:33:19,414-0400 INFO  (tmap/0) [storage.LVM] Removing LVs
	(vg=c3ebdeb0-7e77-4e9d-92a8-408eecaffd5f, lvs=['4dd1e40a-e269-4792-a27c-a3a1cbae89a1'])
	(lvm:1185)

	Bug-Url: https://bugzilla.redhat.com/1450132

2017-05-16  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	xmlrpc: rename binding
	As part of xmlrpc cleanup we want to update the naming of the modules
	and classes which are still used and used to be part of xmlrpc code.
	We still want to keep http server used by xmlrpc because it is still
	used by ova upload/download.

2017-05-16  Nir Soffer  <nsoffer@redhat.com>

	hsm: Warn about inefficient use of getDeviceList
	Host.getDeviceList has a checkStatus argument defaulting to True for
	backward compatibility with old engines. Using checkStatus=True, we
	perform a pvcreate --test on all devices, which is very expensive. We
	have seen it takes up to 3 minutes with 180 devices.

	Since 3.6, engine calls getDeviceList with checkStatus=False to get all
	devices. If the user selected some devices, engine calls getDeviceList
	again with the selected devices and checkStatus=True.

	Log a warning when getDeviceList is used inefficiently so callers can
	improve their code.

2017-05-16  Martin Polednik  <mpolednik@redhat.com>

	vfio-mdev: hook
	A hook to allocate and assign an mdev-capable device to a VM. The hook
	works by using a custom property mdev_type which should be one of the
	types exposed by mdev devices on the host.

	Example:

	1) custom property mdev_type = nvidia-11
	2) the hook goes through all mdev-capable devices, tries to find one
	with nvidia-11 type
	3) create xml snippet to assign the mdev to the VM

	Algorithm explanation:
	First, we iterate over all mdev-capable devices. These devices are
	symlinked in /sys/class/mdev_bus/, where each physical device (the
	actual card) contains at least 1 mdev capable device.

	Every device supports a bunch of mdev types
	(/sys/class/mdev_bus/$DEVICE/mdev_supported_types). That is what we
	are interested in - user doesn't request physical device but rather
	this mdev type. We therefore have to iterate through the types and
	figure out whether the card supports what user requested.

	Here comes a sneaky constraint: some vendors only allow single a mdev
	type per device. If you have 2 VMs: VM_1 and VM_2, and these request
	mdev_type A and B respectively, and a host only has single card;
	those VMs can only be started if the one card supports > 1 mdev types
	per card.

	If 2 cards are available and mdev type can't be mixed, the
	algorithm simply skips card with mdev type allocated and goes to the
	next one, yielding allocation such as

	{VM_1 -> mdev type A -> card 1;  \___ 1 mdev type per card
	 VM_2 -> mdev type B -> card 2}. /

	If the types can be mixed, the allocation will look like this:

	{VM_1 -> mdev type A -> card 1;  \___ multiple mdev types per card
	 VM_2 -> mdev type B -> card 1}. /

	Bug-Url: https://bugzilla.redhat.com/1444992

	hostdev: add mdev dummy device
	Preparation for mdev hook. Should we create mdev XML, it'll be
	detected 1) as unknown device 2) as host device on next run.

	To avoid 2) being a problem, let's map it to a simple skipped device.

	Bug-Url: https://bugzilla.redhat.com/1444992

2017-05-16  Francesco Romani  <fromani@redhat.com>

	virt: remove pid reporting
	We remove the pid reporting from vdsm stats.
	Engine 3.6+ doesn't use it, and since we depend on libvirt, it is not
	useful anyway for the command line tools.

	The old xml-rpc based vdsClient was one noteworthy user of this
	value, but this is already gone.

	virt: host: refactor the VM memory usage reporting
	This patch rewrites the reporting of the memory usage of the VMs,
	eliminating the need for the ugly memCommit and vm.conf['pid']
	attributes.

	We use one new call now, and we rely on libvirt to get the memory usage
	info for the VMs (see
	https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainMemoryStats).

	No expected change in behaviour, only internal refactoring.

2017-05-16  Edward Haas  <edwardh@redhat.com>

	net tool: Merge dump_bonding_opts into the network module

	net test: Merge toolbonding_test module into link_bond_test

	net: Move dump_bonding_opts logic content to sysfs_options_mapper
	Leaving under dump_bonding_opts only the tool registration, moving the
	logic to the network package.

	As part of this patch, toolbonding_test module has been temporary
	relocated under the test network package.

	net: Use BONDING_MASTERS directly from the sysfs_driver
	Several usages of BONDING_MASTERS have been done through
	netinfo.bonding, this patch directs all to the bond sysfs driver.

	This is part of netinfo.bonding cleanup.

	net: Clean netinfo.bonding and create sysfs options mapper
	Bond options scanning and several leftovers from netinfo.bonding have
	been relocated and cleaned out.
	Users of netinfo.bonding that used it as a proxy have been updated to
	point to the bond sysfs driver.

2017-05-16  Nir Soffer  <nsoffer@redhat.com>

	python3: Enable storage mount tests on python 3
	Remove the module from the blacklist and mark the test that needs more
	work using new @skipif decorator.

	testValidation: Add @skipif decorator
	Allows skipping a test if it cannot run with the current environment.
	The tests is not run in the skip condition is True, but it must pass if
	the skip condition is false. This can be used to skip tests that are not
	compatible on python 3 yet.

	Example usage:

	    from testValidation import skipif

	    @skipif(six.PY3, "Needs porting to python 3")
	    def test_rusty_python2_code(self):
	        ...

	This is a subset of pytest.mark.skipif.

2017-05-16  Edward Haas  <edwardh@redhat.com>

	net test: Cleanup colliding test ip rules
	During the CI test runs, stale test ip rules have been detected on
	the nodes, causing test failures.
	Failty tests (or production code) are suspected to run on the nodes,
	causing their network stack to become dirty.

	This patch is introducing a package teardown handler that checks if
	there are any test ip rules left on the system and attempts to remove
	them.
	An exception (StailIPRulesError) is raised in case such ip rules are
	detected to inform of this problem.

	Note: This is a test level attempt to make sure bugs do not leave the
	node dirty. However, it will not cover all corner cases (like a crash of
	the run before reaching the cleanup section), therefore infrastructure
	solutions are still needed (netns, containers, VM) and should be
	considered in order to protect the nodes.

	net: Replace IPRuleData __str__ to __repr__

2017-05-15  Nir Soffer  <nsoffer@redhat.com>

	utils: Make stopwatch log level configurable
	Most storage operations are slow and we like an easy way to log the time
	it took to complete the operation using log.info. Add a level argument
	to utils.stopwatch so it can be used for info level logs.

	Example usage:

	    with utils.stopwatch("Description...", level=logging.INFO):
	        do_slow_operation()

2017-05-15  Fred Rolland  <frolland@redhat.com>

	build: add pylint to check target
	Adding pylint to make check. Since this slow down the build, it is
	recommended to run make check in parallel:

	    make --jobs=2 --output-sync=line check

	Running a local build, the average time for running 'make check' is:

	With 1 job:
	real	4m52s
	user	3m37s
	sys	0m16s

	With 2 jobs:
	real	2m47s
	user	3m47s
	sys	0m18s

	Command use to measure:
	time make --jobs=$i check >/dev/null 2>&1

	using 1 jobs...

	real	5m4.860s
	user	3m47.745s
	sys	0m17.578s
	using 1 jobs...

	real	4m42.127s
	user	3m27.062s
	sys	0m14.630s
	using 1 jobs...

	real	4m42.029s
	user	3m27.396s
	sys	0m16.586s

	using 2 jobs...

	real	2m51.780s
	user	3m47.838s
	sys	0m18.654s
	using 2 jobs...

	real	2m44.158s
	user	3m47.548s
	sys	0m19.383s
	using 2 jobs...

	real	2m51.779s
	user	3m46.936s
	sys	0m18.256s

2017-05-15  Nir Soffer  <nsoffer@redhat.com>

	api: Handle calls without context
	threadlocal.vars is a thread local, so it never has the "context"
	attribute unless the thread owning it initialized the value. This
	happens only in the RPC threads, before calling the api. When other
	threads (e.g. periodic/1) call internal storage apis, we don't have any
	context and fail with AttributeError:

	2017-05-14 18:39:43,395-0400 ERROR (vmrecovery) [virt.recovery.file]
	Error recovering VM: 0b2f5a7f-39c0-4a9d-be14-8ff133e1c496 (recovery:112)
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/virt/recovery.py", line 110, in load
	    res = cif.createVm(params, vmRecover=True)
	  File "/usr/share/vdsm/clientIF.py", line 447, in createVm
	    vm = Vm(self, vmParams, vmRecover)
	  File "<string>", line 2, in __init__
	  File "/usr/lib/python2.7/site-packages/vdsm/common/api.py", line 45, in method
	    ctx = context_string()
	  File "/usr/lib/python2.7/site-packages/vdsm/common/api.py", line 58, in context_string
	    ctx = vars.context
	AttributeError: 'thread._local' object has no attribute 'context'

	Fixed using getattr() instead of accessing vars.context directly.

	Bug-Url: https://bugzilla.redhat.com/1112120

	tests: Add failing test for @logged decorator
	When calling @logged method from internal vdsm threads, there is no
	context and they fail with AttributeError. Add failing tests before
	modifying the code.

	Bug-Url: https://bugzilla.redhat.com/1112120

	tests: Add tests for logged methods
	Testing vars.context is tricky, since it exists only if the thread
	owning the thread local data has set vars.context.

	This patch adds a helper to run a function in a thread, setting
	vars.context, and use the helper to test that @logged methods work when
	a context is set.

	The logged tests should test the logs before and after the call, but the
	way @logged is defined makes this too ugly. We will add the missing
	asserts later.

	Bug-Url: https://bugzilla.redhat.com/1112120

2017-05-14  Nir Soffer  <nsoffer@redhat.com>

	rawhide: Add ovirt-imageio-commmon from Fedora 25
	We don't build ovirt-imageio yet for rawhide, so install the rpm for
	Fedora 25 from ovirt-release-master repository.

	rawhide: Add Fedora rawhide image
	Testing with Fedora development image will help to find and fix
	regression quickly.

	ovirt-imageio-common is required, but it is not available yet for
	rawhide. Remove it until it will be available, so we can find other
	issues with this image.

2017-05-14  Irit Goihman  <igoihman@redhat.com>

	network: fail network validation when adding dpdk device
	Adding dpdk nic is only supported in case of an ovs switch,
	and only on an ovs bridge.
	This patch prevents the user from using dpdk nics as part
	of a legacy network or as slaves of a linux bond.
	It also prevents adding a dpdk device as a slave of ovs bond.

2017-05-13  Nir Soffer  <nsoffer@redhat.com>

	sanlock: Only storage should depend on sanlock
	Recently we added sanlock to compat module, introducing sanlock
	dependency in most of vdsm modules.  Move sanlock compatibility hack to
	new storage.compat module so only storage code depends on sanlock.

2017-05-13  Leon Goldberg  <lgoldber@redhat.com>

	net: Dedicating a package to netswitch.
	In order to improve modularity and make netswitch validations easily
	testable, netswitch now has its own package. Additionally,
	netswitch content has been split to configurator and validator modules.

2017-05-12  Petr Horáček  <phoracek@redhat.com>

	network: add verbose string representation of IPRuleData

	network: move ip.rule to its separate package
	Implementation code will be split from API in a following patch.

	network: prepare ip_route_test for different implementations

	network: split ip.route api and implementation
	Prepare ground for different IPRouteApi implementations (such as
	NetworkManager one) by splitting API and its iproute2 implementation.

	network: wrap route.py add/del exceptions with IPRouteError

	network: add verbose string representation of IPRouteData

	network: move ip.route to its separate package
	Implementation code will be split from API in a following patch.

2017-05-12  Nir Soffer  <nsoffer@redhat.com>

	operation: Prepare for integrating CommandStream
	operation.Command supports thread-safe abort, but cannot be used for
	commands that needs progress, because it is caching entire process
	output.

	Move the state management code during startup into _start_process() and
	extract _finalize() method for the shutdown state management code.  We
	will reuse these methods for the version streaming output to the caller
	with CommandStream.

	After these changes, _wait_for_process() is only a call to
	Popen.communicate(), so it was inlined into run().

2017-05-12  Milan Zamazal  <mzamazal@redhat.com>

	virt: Remove Vm.hasGuestNumaNode
	Apparently this property is not used anymore.

2017-05-12  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove unneeded context initialization
	Response tests do not use context so there is no need to initialize the
	context. Also, initialize a context prevent testing of the non-existing
	context case.

	Bug-Url: https://bugzilla.redhat.com/1112120

	api: Move Context class to common.api
	The Context class was defined in yajsonrpc.stompreactor, but it actually
	belongs to vdsm.common.api module. This is part of the interface between
	the RPC layer and the API layer, so it should be defined in the api
	layer. This allows using a context in the api tests.

	Bug-Url: https://bugzilla.redhat.com/1112120

2017-05-12  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	common: missing context member
	There is no way to check the context if the context was not provided
	prior to check.

	pylint complains about it as well:

	************* Module vdsm.common.api
	E: 53,10: Instance of '_local' has no 'context' member (no-member)

	We need to make sure to set the default.

2017-05-12  Nir Soffer  <nsoffer@redhat.com>

	schema_to_html: Use script's python executable
	We were using $(PYTHON) while the script is already using
	"#!/usr/bin/python2", better run the script with the required python
	version.

2017-05-12  Irit Goihman  <igoihman@redhat.com>

	dpdk: call lshw only when required
	lshw is an expensive call, so lshw command will be called only if
	if devices lack an entry in '/sys/bus/pci/devices/<driver>/' directory
	(not in the system anymore) or new dpdk devices were bound to one of
	dpdk drivers.

2017-05-12  Dan Kenigsberg  <danken@redhat.com>

	net.ip.validator: fix typo

2017-05-11  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: log call context for api calls
	We want to log flow_id and additional information when logging that
	specific verbs were called.

	When flow_id is provided by the client we can see following log message:

	START getCapabilities() from=::ffff:192.168.1.107,51374,
	flow_id=523e4d11 (api:41)

	when flow_id is not available we see:

	START getCapabilities() from=::ffff:127.0.0.1,53074 (api:41)

	and if the context is not available because the method was called
	internally we see:

	START getCapabilities() from=internal (api:41)

2017-05-11  Ala Hino  <ahino@redhat.com>

	tests: Replace hard-coded size values
	Replace hard-coded size values with calls to corresponding helpers.

	Bug-Url: https://bugzilla.redhat.com/1443147

	optimal-size: Add padding and limit optimal to minimum
	Until this patch, we always added a chunk (1024 MB) to block volumes when
	calculated the optimal size. However, for internal volumes, we can add
	less space. In this patch we add minimal padding (1 MB) for internal
	volumes.
	In addition, we now limit the volume optimal size to 1 GB.

	Sample execution:
	Before merge:
	95d6683e-3060-40f5-83b2-9bc540ff2e58 cad71b68-f74d-4c26-b04b-758e9039f88b -wi-------   1.00g
	e0d5f266-f557-42c8-a4fa-8dadd8110893 cad71b68-f74d-4c26-b04b-758e9039f88b -wi-------   1.00g
	79d98629-8fcd-4b53-b97c-9dcd18bcf36b cad71b68-f74d-4c26-b04b-758e9039f88b -wi-------   1.50g

	After merge of base (internal merge):
	95d6683e-3060-40f5-83b2-9bc540ff2e58 cad71b68-f74d-4c26-b04b-758e9039f88b -wi-------   1.00g
	79d98629-8fcd-4b53-b97c-9dcd18bcf36b cad71b68-f74d-4c26-b04b-758e9039f88b -wi-------   1.50g

	As can be seen, no extra space added to the internal volume.

	Bug-Url: https://bugzilla.redhat.com/1443147

2017-05-11  Irit Goihman  <igoihman@redhat.com>

	automation: add lshw to travis builds
	lshw was added to vdsm docker test images.

2017-05-11  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix broken import after splitting utils
	Commit 9ad4a5461b0b (tests: add test for mkimage.injectFilesToFs
	function) introduced usage or moved utils.rmFile, and was merged
	without a rebase on master, hiding the test failure.

2017-05-11  Tomáš Golembiovský  <tgolembi@redhat.com>

	tests: add test for mkimage.injectFilesToFs function

2017-05-11  Edward Haas  <edwardh@redhat.com>

	net: Remove network.utils
	network.utils module contained a single function,
	remove_custom_bond_option which has now been relocated to link.setup.

2017-05-11  Irit Goihman  <igoihman@redhat.com>

	network: report dpdk devices as nics
	added link_info dictionary for dpdk dev information.
	Currently it contains hard coded and empty values.

	getLinks now reports dpdk devices as nics and providing
	their link_info as well.

2017-05-11  Arik Hadas  <arik.hadas1@gmail.com>

	introduce a verb for querying domain xmls
	The new verb returns Libvirt's domain XML for the given VMs.
	In a sense, it is equivalent to call 'dumpxml' for each VM,
	but in this case the returned XMLs are cached by VDSM. It
	is thus called 'dumpxmls'.

2017-05-11  Irit Goihman  <igoihman@redhat.com>

	dpdk: add driver name to dpdk device information
	driver name is required for faster queries of dpdk devices
	status in the system.

2017-05-11  Francesco Romani  <fromani@redhat.com>

	virt: move sanitization in API.py
	This code doesn't belong in API.py, but at least it is no longer
	split between vm.py and API.py.

	vm: remove the kvmEnable attribute
	We don't do any logic on this field, so it makes
	no sense to have it as instance attribute.

2017-05-11  Fred Rolland  <frolland@redhat.com>

	automation: run check target in parallel
	Run the 'check' target with 2 jobs at once.

	Note that the output of the jobs will be interleaved.

	Running a local build, the average time for running 'make check' is:
	With 1 job:
	real: 3m8s
	user: 1m0.50s
	sys: 0m15s

	With 2 jobs:
	real: 2m46s
	user: 1m47s
	sys: 0m16s

	Command use to measure:
	time make --jobs=$i check >/dev/null 2>&1

	using 1 jobs...

	real	3m20.207s
	user	2m0.073s
	sys	0m16.764s

	using 1 jobs...

	real	3m2.763s
	user	1m44.729s
	sys	0m15.885s

	using 1 jobs...

	real	3m2.793s
	user	1m45.791s
	sys	0m15.037s

	using 2 jobs...

	real	2m42.842s
	user	1m47.766s
	sys	0m16.880s

	using 2 jobs...

	real	2m51.072s
	user	1m48.987s
	sys	0m17.223s

	using 2 jobs...

	real	2m45.465s
	user	1m46.635s
	sys	0m16.519s

2017-05-11  Edward Haas  <edwardh@redhat.com>

	utils: Extract monotonic_time from utils module
	monotonic_time has been relocated to common.time.

	utils: Extract rget from utils module
	As network.canonicalize is the only user of this dict util, it has been
	relocated to the same module that uses it.
	In case other users will require it, a dictutils module may fit.

	utils: Drop unused utils.forceLink

	utils: Extract rmTree from utils module
	rmTree has been relocated to common.fileutils.
	Adjusted for pep8 compliant names.

	utils: Extract atomic_file_write from utils module
	atomic_file_write has been relocated to common.fileutils.

	common fileutils: Use logging exception in rm_file

	utils: Extract rmFile from utils module
	rmFile has been relocated to common.fileutils.
	Adjusted for pep8 compliant names.

2017-05-11  Nir Soffer  <nsoffer@redhat.com>

	rawhide: Use longer passphrase to make genrsa happy
	On Fedora rawhide genrsa does not like our default password:

	error:28069065:UI routines:UI_set_result:result too
	small:crypto/ui/ui_lib.c:779:You must type in 4 to 1023 characters

	Use longer passphrase to make genrsa happy.

2017-05-11  Edward Haas  <edwardh@redhat.com>

	utils: Extract touchFile from utils module
	touchFile has been relocated to common.fileutils.
	Adjusted for pep8 compliant names.

	utils: Extract random_iface_name from utils module
	random_iface_name has been relocated to network.link.iface.

	utils: Extract memoized from utils module
	memoized has been relocated to common.cache.

	utils: Extract tobool from utils module
	This patch is one of a seriese of patches that aim to split utils module
	and relocate its content to vdsm.common.

2017-05-10  Fred Rolland  <frolland@redhat.com>

	image: prepare volume before calculating size
	In image.copyCollapsed, there is a need to calculate the destination volume
	blocks needed to be allocated before creating it.

	As part of the calculation, if the source volume is raw, qemu-img info
	is called to read the actual size in use.

	In case that the source domain is a block domain, the volume need to
	activated before it can be read.

	In this patch, the 'prepare' of the source volume is moved to be
	executed before the call to 'calculate_vol_alloc'
	The volume will be teardowned as before in the 'finally' of the method.

	Bug-Url: https://bugzilla.redhat.com/1448606

2017-05-10  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: change default library
	We would like to change default ssl library being used from m2crypto to
	ssl. The value that we saw when introducing m2crypto was no longer
	there when we started to maintain the connection. We do not need to
	maintain two code bases using different ssl libraries.

	This patch would enable us to remove m2crypto in the future.

	ssl: add flag to enable client certificate
	We are not strict about having resolvable names. In OST and possibly in
	customer environments there could be wrongly configured name resolution
	service which caused certificate verification to fail. In order to
	mitigate potential breakage we provide a flag to enable/disable the
	verification.

	ssl: client cert check for IPv4 mapped addresses
	When we check the certificate it is possible that in the certificate
	we have IPv4 address and we use IPv4 mapped addresses (starting with
	::FFFF/96). We need to make sure that this case in covered in
	ssutils#compare_names.

2017-05-09  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: adding context for api calls
	We want to understand how specific requests pass through the system and
	we are using flow id for that. We get it from a client using custom
	header and it is passed around in vdsm using threadlocal.

	The context that we pass consists of:
	- flow_id - uniquely identifies flow
	- client_host - host ip address from where specific verb was called
	- client_port - which port was used to call the verb

	When a client do not provide flow_id we use None to indicate it.


	Bug-Url: https://bugzilla.redhat.com/1112120

	common: move thread local
	We want to use this module as part of correlation id work so moving it
	to common.

2017-05-09  Edward Haas  <edwardh@redhat.com>

	net: Fix store net config - delete dir only if existed.
	On safe persisting the config,the  previous netconf *real* directory
	is removed after the path is resolved from a symlink.

	This patch makes sure that a real directory is removed only if it
	existed before.
	This is an addition to the previous fix.

	Bug-Url: https://bugzilla.redhat.com/1448837

2017-05-09  Nir Soffer  <nsoffer@redhat.com>

	blockSD: Allow using badly restored storage domains
	Block Storage domain is created with 2 metadata areas on all PVs, but
	all the metadata areas are disabled excpet the first PV. This is
	typically the save PV where the metadata LV is located. Since 4.1 we are
	reporting the metadata PV in StorageDomain.getInfo. If we cannot find
	the metadata device, we will fail with UnexpectedVolumeGroupMetadata
	exception, and activating the storage domain will fail.

	In the error, we can see the PVs with incorrect configuration
	(irrelevant attributes stripped):

	    PV(name='/dev/mapper/360014054ae1fdf75b074e488e9d803bd',
	       ...
	       mda_count='1',
	       mda_used_count='1'),
	    PV(name='/dev/mapper/360014053f404fa44d844d9198cfee437',
	       ...
	       mda_count='1',
	       mda_used_count='1')

	We can see that both PVs have one used metadata area, instead of 2 used
	metadata areas in one (the metadata PV), and 2 unused metadata areas in
	the other (regular PV).

	Turns out that there are lot of users that somehow got their VG metadata
	deleted, and unfortunately used incorrect instructions for restoring the
	VG metadata.  This process did not use the required "--metadatacopies 2"
	option, and the "--metadataignore y" option on all the PVs but the
	first. This problem is too common so we cannot fail
	StorageDomain.getInfo in this case.

	This patch changes the behavior to log a warning, and return the storage
	domain info without the "vgMetadataDevice" key. The user will not be
	able to remove a PV from such storage domain.

	Storage domain with this configuration is not supported, and must be
	fixed by recreating the LVM metadata correctly.

	Bug-Url: https://bugzilla.redhat.com/1446492

2017-05-09  Francesco Romani  <fromani@redhat.com>

	vm: setIoTune: remove _reportException
	The Vm._reportException helper should be phased out, we have
	better tools now.

	virt: tests: move domaindescriptor tests in virt
	Move the tests under the virt/ subdir, and run them under
	python3 as well.

	vm: iotune: simplify the interleaved get/set test
	In commit 3aeb20d86fe2070 we added test_concurrent_get_and_set
	which was fragile and clunky, and actually, after closer inspection,
	failed to test the interesting scenario of one setIoTune call
	which updates mid-way the iotune cache while getIoTuneResponse
	was running.

	We replace now that cumbersome test which another simpler one,
	which actually exercise that flow.

	Bug-Url: https://bugzilla.redhat.com/1443654
	Backport-To: 4.1

	virt: devices: lease: add from_xml_tree
	Make it possible to initialize a Lease device from its
	XML representation.

	virt: devices: memory: add from_xml_tree
	Make it possible to initialize a Memory device from its
	XML representation.

2017-05-09  Edward Haas  <edwardh@redhat.com>

	net: Fix store net config - delete dir correctly.
	Bug-Url: https://bugzilla.redhat.com/1448837

2017-05-09  Nir Soffer  <nsoffer@redhat.com>

	vm: Detect when a block job is ready
	When a block job is ready, blockJobInfo returns equal "cur" and "end"
	values, but equal values do not mean that a block job is ready. To get
	the ready state, we can use the disk's mirror element:

	    <mirror type='file' job='active-commit' ready='yes'>
	      <format type='raw'/>
	      <source file='/rhev/data-center/.../168134ea-a173-448c-b1b9-087abac87ed8'/>
	    </mirror>

	The ready flag was not reliable before libvirt-1.2.18. Since we require
	libvirt >= 2.0 on all platform it should be safe to use now.

	Bug-Url: https://bugzilla.redhat.com/1442266
	Bug-Url: https://bugzilla.redhat.com/1438850

2017-05-09  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: improve certificate check
	We need to make sure that if a host has multiple nics we check all the 
	names.

2017-05-09  Irit Goihman  <igoihman@redhat.com>

	dpdk: update lshw command
	lshw command lists all hardware devices. polling USB, IDE and SCSI
	is not required as we're only interested in network devices.
	Disabling these calls reduces the amount of time 'lshw' command runs.

2017-05-09  Martin Polednik  <mpolednik@redhat.com>

	hostdev: update_device_info: handle unknown device type
	Preparation for mdev hook. We want to make sure not to touch libvirt
	since mdevs aren't standard devices.

	Bug-Url: https://bugzilla.redhat.com/1444992

2017-05-07  Martin Polednik  <mpolednik@redhat.com>

	hugepages: update the hook
	The hook can now use facilities provided by VDSM library for hugepage
	manipulation. As a side effect, we have now fixed the hook for ppc64le
	platform.

2017-05-07  Edward Haas  <edwardh@redhat.com>

	net: Implement vdsm-store-net-config in netconfpersistence
	Drop vdsm-store-net-config shell script and implement its functionality
	into netconfpersistence.

2017-05-06  Edward Haas  <edwardh@redhat.com>

	net, virt net: Relocate network.libvirt to virt.libvirtnetwork
	Access to libvirt networks is now limited to virt (with a small
	exception for the configuration upgrade, see netupgrade).
	Therefore, the module is moved from the network package to the virt
	package.

2017-05-05  Edward Haas  <edwardh@redhat.com>

	net: Use python to clear backups instead of the shell
	When storing the network config as "safe", vdsm-store-net-config has
	been used to clear the ifcfg backups.

	This patch uses the python version to clear the ifcfg backups instead of
	the shell, adding another step towards the removal of the
	vdsm-store-net-config shell script.

	net: Set ifcfg.ConfigWriter.clearBackups as staticmethod
	There is no reason to leave clearBackups as a classmethod and converting
	it to a staticmethod will allow its usage by external modules.

	This modification is part of the attempt to convert the
	vdsm-store-net-config shell script into python.

2017-05-05  Francesco Romani  <fromani@redhat.com>

	vm: fix typo in __init__
	In commit 293c488e a typo sneaked in Vm.__init__.
	Apparently, it is harmless:

	$ cat tx.py
	class Test(object):
	    def __init__(self, params):
	        self.conf = {'pid': '0', '_blockJobs': {}, 'clientIp': ''}
	        self.conf.update(params)
	        if 'smp' not in self .conf:  # <== note the space!
	            self.conf['smp'] = '1'

	    def __repr__(self):
	        return repr(self.conf)

	print Test({})
	print Test({'smp': 8})

	$ python tx.py
	{'_blockJobs': {}, 'clientIp': '', 'pid': '0', 'smp': '1'}
	{'_blockJobs': {}, 'clientIp': '', 'pid': '0', 'smp': 8}

	This patches fixes it anyway.

2017-05-05  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add mdev removal
	Mediated devices are removed by writing 1 into
	/sys/class/mdev_bus/$DEVICE/$UUID/remove.

	Since the operation must be done with elevated permissions, we add a
	small function to supervdsm to handle that for us.

	hostdev: add mdev creation
	Mediated devices are allocated by writing uuid4 into
	/sys/class/mdev_bus/$DEVICE/mdev_supported_types/$TYPE/create.

	Since the operation must be done with elevated permissions, we add a
	small function to supervdsm to handle that for us.

2017-05-04  Francesco Romani  <fromani@redhat.com>

	vm: setIoTune: use exceptions
	Do not return response objects, raise exceptions instead.

	vm: blockIoTune: add and use cache
	Getting and setting the block I/O tune values need to go
	deep down the QEMU monitor. Thus, this call is costly and risky,
	and we should avoid it as much as we can for obvious benefit purposes.

	MOM and Engine needs this data, but both pass through Vdsm
	to get and set the values.

	Thus, it makes sense to add a caching layer for this data inside Vdsm.
	Doing so we both increase the system performance reducing the libvirt
	load, and by relieving stress on libvirt side we reduce the risk
	of thread pool exhaustion.

	Bug-Url: https://bugzilla.redhat.com/1443654
	Backport-To: 4.1

2017-05-04  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: update general documentation
	vdsm-client help is generated from vdsm schema and the
	documentation should reflect that.

2017-05-04  Francesco Romani  <fromani@redhat.com>

	vmpowerdown: fully switch to the response module
	Do not build response objects manually; just use functions
	from the response module. This will make our switch to proper
	exceptions easier: we will just need to 'git grep -w response'.

2017-05-03  Martin Polednik  <mpolednik@redhat.com>

	hugepages: add function to (de)alloc hugepages
	Small (currently unused) function that is able to allocate or
	deallocate (given negative number of allocations) a default-sized
	hugepages (of size default for given platform).

	hoststats: report hugepages
	We have previously added hugepage sizes to the capabilities, now what
	we want to do is report the actual hugepages usage. To do that, we
	extend HostSample and monitoring to provide the data via the hugepages
	module.

	How that looks on a host with 2KiB and 1GiB hugepages enabled:
	    "hugepages": {
	        1048576: {
	            "resv_hugepages": "0",
	            "free_hugepages": "0",
	            "nr_overcommit_hugepages": "0",
	            "surplus_hugepages": "0",
	            "nr_hugepages": "0",
	            "nr_hugepages_mempolicy": "0"
	        },
	        2048: {
	            "resv_hugepages": "0",
	            "free_hugepages": "10",
	            "nr_overcommit_hugepages": "0",
	            "surplus_hugepages": "0",
	            "nr_hugepages": "10",
	            "nr_hugepages_mempolicy": "10"
	        }
	    }

	sampling: fix typos

	hugepages: reporting
	Hugepages can be accessed via sysfs interface

	/sys/kernel/mm/hugepages

	which contains subdirectories indicating various hugepage sizes
	present on the system e.g.

	$ ls /sys/kernel/mm/hugepages
	hugepages-1048576kB hugepages-4096kB

	and each hugepage size contains files with a piece of information
	indicated by the filename:

	free_hugepages  nr_hugepages  nr_hugepages_mempolicy
	nr_overcommit_hugepages  resv_hugepages  surplus_hugepages

	VDSM can report availablity of hugepages caps key:

	caps = {...
	hugepages = [4096, 1048576],
	...}

2017-05-03  Edward Haas  <edwardh@redhat.com>

	virt net: Access libvirt networking module directly
	libvirt networking module is being accessed from virt through the
	networking api.
	In order to assist in relocating the libvirt networking module from
	network to virt (in a following patch), this patch drops libvirt
	networking related calls from the network api, requiring the callers to
	call it directly.

2017-05-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Get VM memory size from domain XML
	Let's use actual VM size rather than the value stored in vm.conf.
	It's not only more accurate but also removes one particular vm.conf usage in
	favor of retrieving information from libvirt.

	virt: Initialize DomainDescriptor early
	We are going to retrieve various information about the VM from its domain
	XML (instead of vm.conf), even before the VM is actually started.  So we should
	initialize the domain descriptor from available data as soon as possible.

	The initialized domain will still be incomplete and must be amended later as
	devices are added in Vm._run.

	virt: Fix of `smp' parameter tests
	The passed values should be strings, not integers.  If they are integers then
	domain XML export may fail – not now, but in a following patch where domain XML
	is build in (also fake) VM initialization.

	virt: Use vm.id rather than vm.conf['vmId']
	When we assign vm.id, we should use it and so remove another use of vm.conf.

	virt: Remove legacy config patching
	That piece of code is marked as needed only for very old Vdsm migration
	targets.  We no longer support them, so we can remove the code.

2017-05-03  Nir Soffer  <nsoffer@redhat.com>

	compat: Suppress unhelpful unused import warnings
	In the compat module, no module is used, but pyflakes does not know
	about it. Mark the unused imports with NOQA comment, suppressing the
	unhelpful warnings.

	compat: Import sanlock from vdsm.compat
	On python2 this import does not change the behavior in any way; if
	sanlock is missing, we raise ImportError.

	On python3 this import returns a MissingModule instance. Any operation
	on this module will raise compat.Unsupported exception. However, tests
	using fakesanlock can still test the modules and keep them python3
	compatible. Previously we could not test modules importing sanlock on
	python3 because sanlock is not available.

	compat: Use six.PY2 instead of reinventing it

	compat: Introduce compat.MissingModule
	MissingModule is a placeholder for a module not available on the current
	platform. Any operation on the module will raise compat.Unsupported
	exception to make it clear that the module is missing.

	Example usage:

	    try:
	        import foobar
	    except ImportError:
	        if six.PY2:
	            raise
	        # foobar is not available yet on python 3 but we can still
	        # test this code using fakefoobar.
	        foobar = compat.MissingModule("foobar is missing")

	This will raise compat.Unsupported:

	    foobar.do_something()

	profiling: Add devel:cpu_profile_filename option
	This is mainly for simplifying the tests. Now we can control the test
	environment by mocking the config. Additionally, we use now a proper
	temporary file for the saved profile, so the tests run now on a read
	only file system.

	This may also be useful for developers that want to change the location
	of the application wide profile.

	profiling: Add env context manager
	Instead of having multiple @MonkeyPatch() lines for each test, use a
	context manager that creates the environment needed for the tests.

	profiling: Decouple cpu profiling from vdsm config
	Previously we accessed vdsm configuration to set module defaults during
	import. This makes it impossible to use the module from another
	application like supervdsm or ovirt-ha-agent.

	The configuration is accessed now when starting an application wide
	profile using the start() and stop() interface.

	This change also simplify the tests, we can mock (almost) everything via
	the module config.

	vdsm configuration is still loaded when importing the profiler module,
	more work is needed to avoid this.

	profiling: Add generic Profiler class
	Current profiling solution is usable only by vdsm, writing the profile
	to /run/vdsm/vdsmd.prof, and assuming vdsm configuration.

	This patch adds a generic Profiler class which can be used by any
	application, for example supervdsm or ovirt-ha-agent.

	Example usage:

	    from vdsm.profiling import cpu
	    ...
	    profiler = cpu.Profiler("/run/myapp/profile.pstat")
	    profiler.start()
	    ...
	    profiler.stop()

2017-05-02  Francesco Romani  <fromani@redhat.com>

	virt: devices: watchdog: add from_xml_tree
	Make it possible to initialize a Watchdog device from its
	XML representation.

	virt: devices: tpm: add from_xml_tree
	Make it possible to initialize a Tpm device from its
	XML representation.

	virt: devices: rng: add from_xml_tree
	Make it possible to initialize a Rng device from its
	XML representation.

	virt: devices: video: add from_xml_tree
	Make it possible to initialize a Video device from its
	XML representation.

	virt: devices: redir: add from_xml_tree
	Make it possible to initialize a Redir device from its
	XML representation.

	virt: devices: smartcard: add from_xml_tree
	Make it possible to initialize a Smartcard device from its
	XML representation.

	virt: devices: controller: add from_xml_tree
	Make it possible to initialize a Controller device from its
	XML representation.

	pylint: v2v: initialize attribute in __init__
	pylint was complaining about a missing attribute, this
	patch fixes that making the code a bit easier to follow.

	pylint: v2v: fix missing attributes
	Fixes a pylint bug: some exception do not have one required attribute.

	Backport-To: 4.1

	pylint: vm: simplify the exception flow
	Reorganize the exception flow to make it (a bit) easier to follow,
	and to make pylint happy.

	pylint: virt: fix missing attribute
	Let's initialize the attribute in __init__ instead of using hasattr.

2017-05-01  Ala Hino  <ahino@redhat.com>

	tests: Add an option to specify volume type
	Before this patch, volume type was set as leaf. In this patch,
	we add an argument to specify whether the volume is a leaf.

	Bug-Url: https://bugzilla.redhat.com/1443147

2017-05-01  Nir Soffer  <nsoffer@redhat.com>

	pylint: Rewrite readSessionInfo eliminating pylint errors
	When reading iscsi session, we used to dynamically create a list of
	values read from sysfs, and unpack them into local variables. This code
	made pylint unhappy, was hard to follow, and error prone. Eliminate the
	bad code using the new sysfs module.

	Error handling is improved now when reading integer values. Previously
	if port or tpgt were missing, we failed with:

	    ValueError: invalid literal for int() with base 10: ''

	Now we will fail a clear error about the missing attribute:

	    IOError: [Errno 2] No such file or directory: '.../persistent_port'

	Security is improved by using sysfs.read_password, the raw password is
	never stored in a local variable, so there is no chance to log it by
	mistake.

	pylint: Introduce the sysfs module
	This module provides helpers for accessing sysfs attributes. This will
	be used in the next patch for reading iscsi session attributes, and will
	be used later in other modules.

2017-05-01  Edward Haas  <edwardh@redhat.com>

	tool net: Output to stderr when logging setup fails for restore-net

	net: Embed vdsm-restore-net-config into vdsm.network
	vdsm-restore-net-config has been run as an executable.
	This patch moved the executable python file into vdsm.network
	package and runs it by importing & calling it.

2017-04-30  Nir Soffer  <nsoffer@redhat.com>

	pylint: Add missing abstract methods to Volume
	Few methods were implemented only on the concrete sub classes, making
	pylint unhappy and making it harder to understand the Volume interface.

	pylint: Add missing abstract methods and attributes
	VolumeManifest was missing a lot of methods and one class attribute
	implemented only in the concrete sub classes. This is good enough for
	runtime but makes pylint unhappy and makes it harder to understand the
	VolumeManifest interface.

	pylint: Remove unused metaoff instance variable
	BlockVolumeManifest.metaoff was always None, so the value was never
	used. BlockVolume had a read only property returning the unused value
	from the menifest, and no code was acessing this property. The only
	effect of this instance variable was generating pylint error, since it
	is not defined in the VolumeManifest.

	pylint: Unify removeMetadata interface
	removeMetadata() is defined differently in BlockVolumeManifest (accepts
	a metaId argument) and FileVolumeManifest (doesn't accept any argument)
	while it is not defined in VolumeManifest.  This works in runtime since
	this method is called only from the concrete class with the correct
	number of arguments, but it makes pylint unhappy and makes the code
	harder to understand.

	Add the missing abstract method in VolumeManifest, and an optional
	metaId argument to FileVolumeManifest so the interface is similar.

2017-04-30  Edward Haas  <edwardh@redhat.com>

	net: Access DUMMY_BRIDGE through network.api
	Accessing DUMMY_BRIDGE externally to the network package should pass
	through a single entry point: network.api.

	net: Move sysctl module under the network package
	The sysctl module contains only network related actions, therefore it
	fits well under the network package.

2017-04-28  Francesco Romani  <fromani@redhat.com>

	pylint: fix and silence pylint errors in vm.py
	Silences:
	E:2259,31: Instance of 'Interface' has no 'portMirroring' member (no-member)
	E:2260,67: Instance of 'Interface' has no 'name' member (no-member)

2017-04-28  Dan Kenigsberg  <danken@redhat.com>

	pylint: containers: silence error
	Due to https://github.com/PyCQA/pylint/issues/961
	pylint does not recognize uuid.UUID.int

2017-04-27  Nir Soffer  <nsoffer@redhat.com>

	pylint: Remove broken and unneeded code
	oop.os.rename() was trying to handle the case when the destination
	directory exists and is not empty. In this case, the code tried to
	delete the destination directory, and rename the source directory.
	This code was broken, failing with:

	    AttributeError: '_IOProcessOs' object has no attribute 'listdir'

	The broken code was introduced in commit 576428e876c2 (ioprocess
	implementation), and is available since 4.16.0.

	The only effected flow is Image.delete, when we rename the image
	directory to remove_me_<uuid>. In this flow, we do not expect that the
	destination directory to exist.

	This patch removes the unneeded functionality, restoring POSIX
	semantics.

	Bug-Url: https://bugzilla.redhat.com/1444659
	Reported-by: pylint

2017-04-27  Edward Haas  <edwardh@redhat.com>

	net: tool: Relocate restore_nets content

2017-04-27  Francesco Romani  <fromani@redhat.com>

	virt: devices: console: add from_xml_tree
	Make it possible to initialize a Console device from its
	XML representation.

	virt: devices: balloon: add from_xml_tree
	Make it possible to initialize a Balloon device from its
	XML representation.

	virt: devices: start the from_xml_tree method
	Let's start adding to devices the capability to be initialized
	from their XML representation.
	The end goal is to make possible to properly initialize a device
	from either the usual parameters dictionary or a valid XML snippet.

	This is only about device construction, no changes about the
	state management whatsoever.

2017-04-27  Edward Haas  <edwardh@redhat.com>

	net: Drop unused PersistentConfig.restore method

2017-04-27  Dan Kenigsberg  <danken@redhat.com>

	pylint: ignore no-member in vmdevices
	vmxml.Devices fields are set outside __init__, confusing pylint. Let us
	ignore this problem to make new pylint-catchable mistakes found.

2017-04-27  Francesco Romani  <fromani@redhat.com>

	v2v: add _command placeholder
	The V2VCommand base class should have placeholder also for the
	_command() method, which is supposed to be overridden by subclasses,
	much like execute().

	This also makes pylint a bit happier.

2017-04-27  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Revert "ssl: change default library"
	This reverts commit aaef1a430bb4b485902a4ad8a18641fad3e805bc.

	Due to issue with comparing certificates let's revert this change
	for now.

2017-04-27  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: extracted path_to_vol_id
	volume_id was extracted from parse_volume_chain
	to improve readability and testability.

	storage: Added tests for parse_volume_chain covering error handling.

2017-04-27  Francesco Romani  <fromani@redhat.com>

	vmpowerdown: implement base class interface
	The VmPowerdown class was not implementing fully its interface,
	demanding to its derived class to fill the blanks. This made
	pylint unhappy and the code a bit harder to follow.

	In this patch we complete the VmPowerdown interface, so the derived
	class need now to override the attributes.
	This makes pylint happy and the code a bit easier to read.

2017-04-27  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	pylint: Check whether message was parsed to a dict
	We need to make sure that a message is parsed to a dictionary so we
	added a check. We still need to silence pylint issue:

	 E:324,22: Instance of 'bool' has no 'get' member (no-member)

2017-04-27  Fred Rolland  <frolland@redhat.com>

	storage: use constant for COW overhead
	Use of storage constant COW_OVERHEAD in image.py

2017-04-27  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: change default library
	We would like to change default ssl library being used from m2crypto to
	ssl. This patch would enable us to remove m2crypto.

2017-04-26  Francesco Romani  <fromani@redhat.com>

	vm: use response.success() in setIoTune
	Tiny refactoring, could also be useful as faking point later

	Backport-To: 4.1
	Related-To: https://bugzilla.redhat.com/1443654

2017-04-25  Adam Litke  <alitke@redhat.com>

	merge: Report the original chain when starting merge
	When debugging failed live merge operations it can be helpful to know
	the original chain of volumes as reported by qemu/libvirt.  We are
	already collecting this information so let's report it in the log.

	Example (trimmed) log output:

	INFO  (jsonrpc/4) [vdsm.api] START merge(driveSpec={u'poolID': u'00000001-0001-0001-0001-000000000311',
	u'volumeID': u'66765728-b659-4c47-b25e-5041b5ae165a', u'domainID': u'7271d11d-e58d-46cc-b8ba-024830612abe',
	u'imageID': u'ce510487-53da-4916-8a03-154aa2735e6b'}, baseVolUUID=u'c55b088d-e700-4648-906d-6bd848625e82',
	topVolUUID=u'ac6ed641-eef2-41be-9ffd-f3e0369af0da', bandwidth=u'0',
	jobUUID=u'dbc22072-74ce-4b4f-ac02-5ff68d508473') (api:39)

	INFO  (jsonrpc/4) [virt.vm] (vmId='3c0ba002-8925-4d43-ab95-1cc2efb7ea9c') Starting merge with
	jobUUID='dbc22072-74ce-4b4f-ac02-5ff68d508473' original chain=2938ad34-bb16-4015-bc2f-44f362774708 <
	c55b088d-e700-4648-906d-6bd848625e82 < ac6ed641-eef2-41be-9ffd-f3e0369af0da
	< 66765728-b659-4c47-b25e-5041b5ae165a (top)' (vm:4869)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1428147

	logging: Print volume IDs instead of object references
	When logging the volume chain we are currently logging references to volume
	objects which is useless.  Log the volume ID for each volume instead.
	Also, move the logging to the caller of Image.getChain so we can add a
	little more context and omit duplicate messages where they don't add
	value.

	For example:

	INFO  (merge/3c0ba002) [storage.Image]
	    sd=7271d11d-e58d-46cc-b8ba-024830612abe
	    img=ce510487-53da-4916-8a03-154aa2735e6b
	    chain=2938ad34-bb16-4015-bc2f-44f362774708
	        < c55b088d-e700-4648-906d-6bd848625e82
	        < ac6ed641-eef2-41be-9ffd-f3e0369af0da
	        < 66765728-b659-4c47-b25e-5041b5ae165a (top)  (image:251)

2017-04-25  Edward Haas  <edwardh@redhat.com>

	net: Support editing bond mode using a named value
	Bug-Url: https://bugzilla.redhat.com/1424810

2017-04-25  Dan Kenigsberg  <danken@redhat.com>

	pylint: Silence pylint errors in infra
	Some of the silenced errors should be fixed; others should be silenced
	more pointedly.

2017-04-25  Nir Soffer  <nsoffer@redhat.com>

	pylint: Use sentinel error to make pylint happy
	pylint was unhappy about raising an exception that could be None.  Make
	the code easier to check statically by initializing the exception to a
	sentinel _NO_ERROR.

	pylint: Fix Volume.__init__ signature
	Volume.__init__ signature was different from FileVolume and BlockVolume
	__init__, making pylint unhappy. The code was correct becuase in runtime
	only FileVolume and BlockVolume are created, but pylint could not detect
	this.

	Simplify the code, moving __init__ from FileVolume and BlockVolume up to
	Volume class. This fix these pylint warnings:

	E:1010,28: Too many positional arguments for constructor call (too-many-function-args)
	E:1018,32: Too many positional arguments for constructor call (too-many-function-args)

	This change introduces new pylint errors in fileVolume.py and
	blockVolume.py, since VolumeManifest is missing many methods. This will
	be fixed in the next patch.

2017-04-25  Dan Kenigsberg  <danken@redhat.com>

	fix copyright message

2017-04-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	vdsm metrics: replace dots with underscore in entity names
	statsd recognize dots as entering to subtree. If a nic name includes
	dot in their name we convert it to underscore to avoid
	recognize it as sub metric tree in collectd

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1433734

2017-04-25  Edward Haas  <edwardh@redhat.com>

	net: Move numerize_bond_mode implementation to sysfs_options
	numerize_bond_mode is specific to sysfs options and moving the
	implementation down the stack allow usage of it from the sysfs drivers
	and help clean netinfo.bonding.

	net: Centralize bond mode 'numerization'
	When handling the bond mode, at several location the numeric value is
	required, therefore the conversion from a name value to a numeric value
	is performed.

	As this task is currently perform at several locations outside the bond
	modules, this patch centralizes it under one of bond modules.

	This change originated from the need to add another such numerization of
	the bond mode value.

2017-04-25  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	pylint: Rename arguments in configurator.configure
	We pass parameters when running configure we use _parse_args and return
	already used variable name args which causes pylint to complain:

	E:129,23: Instance of 'tuple' has no 'force' member (no-member)

2017-04-25  Nir Soffer  <nsoffer@redhat.com>

	pylint: Add missing abstract methods
	getVolumeClass(), getLeasesFilePath(), getIdsFilePath(), and
	validateMasterMount() were implemented only on concrete storage domain
	classes, which is good enough for runtime, but makes it harder to
	understand the storage domain interface, and makes pylint unhappy.

	pylint: Add missing class attributes
	manifestClass and mountpoint are part of the StorageDomain interface,
	but they were defined only in concrete sub classes. This make the code
	harder to understand, and make pylint unhappy.

	pylint: Add missing abstract findDomainPath
	pylint was complaining that findDomainPath was missing on
	FileStoraeDomain. Add an abstract method in StorageDomain to make it
	happy and make it easier to understand the storage domain interface.

	pylint: Check changed modules in check-patch
	Add pylint-diff target checking the modules modified by this patch.
	Since this check is fast enough, we can run it for every patch in
	check-patch.sh.

	Since pylint will fail now for many modules, we do not fail the build
	yet. When the current code is pylint-clean we can start failing the
	build if a new error is detected.

	Timing pylint and pylint-diff for typical patch:

	    $ time make pylint
	    ...
	    real 1m31.133s
	    user 1m29.934s
	    sys 0m0.849s

	    $ time make pylint-diff
	    ...
	    real 0m12.364s
	    user 0m11.879s
	    sys 0m0.262s

	pylint: Silence warning about __securityOverride
	The @secured method adds **kwargs to all methods, and handles the
	special __securityOverride argument for allowing secured methods when
	an object is not secured. Unfortunately pylint is checking the methods
	before they are wrapped, so it cannot detect the additional *kwargs.

	Making this code easy to check statically requires a major rewrite; this
	is a good idea anyway but not now. Silence the errors so we can check
	this file and detect regressions.

	pylint: Remove unused StoragePool.moveMultipleImages
	This verb is deprecated since 2012, and the implementation was broken
	since we added discard support, causing pylint errors about missing
	discard argument.

	pylint: Simplify pylint unfriendly code
	Pylint can not check properly code based on a type check. Replace the
	type check and normalizing with simple search.

	This also move argument normalization to the top of the method, so force
	is always a boolean inside this method. Add TODO to remove this
	normalization later, we don't want to support this.

	pylint: Make utils.pidStat pylint friendly
	Use utils.STAT(*args) instead of STAT._make(args) to help pylint detect
	that we return a STAT namedtuple. This fixes these errors in many
	modules:

	    E:278,18: Instance of 'stat' has no 'pid' member (no-member)
	    E:280,15: Instance of 'stat' has no 'comm' member (no-member)

	pylint: Remove useless code from IscsiInterface.__getattr__
	The original code was trying to access object.__getattr__ for getting
	existing attributes in __getattr__. This is wrong because object does
	not have __getattr__, but the code was safe since __getattr__ is invoked
	only for missing attributes, so the wrong code never run. Remove the
	useless code.

	For more info see:
	https://docs.python.org/2/reference/datamodel.html#object.__getattr__

	Reported-by: pylint

2017-04-25  Jenny Tokar  <jtokar@redhat.com>

	MOM: Reduce log messages when MOM unavailable
	When MOM is not available the log gets cluttered with messages.
	This patch utilizes the throttledlog module to display the messages
	once every 100 calls instead of every time the methods are called.

	Bug-Url: https://bugzilla.redhat.com/1437341

2017-04-24  Jonathan Dieter  <jdieter@lesbg.com>

	Remove deprecated listen attribute
	Tested using ovirt-engine-4.1.1.8 and vdsm-4.19.10.1 with this patch
	applied.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1437523

2017-04-23  Nir Soffer  <nsoffer@redhat.com>

	pylint: Fix AttributeError hiding the real error
	If running a protected function failed, the error handler used to raise
	with AttributeError trying to log the real exception with self.name
	instead of name.

	The error was introduced in commit 12e8853ddbb5 (dispatcher: use a
	method wrapper instead of Protect) in Apr 2014, "refactoring" code
	without tests.

	Bug-Url: https://bugzilla.redhat.com/1444657
	Reported-by: pylint

2017-04-23  Edward Haas  <edwardh@redhat.com>

	pylint: Clean tc.filter from pylint errors
	Pylint detects an assignment from a function that does not specify any
	return value.

2017-04-23  Leon Goldberg  <lgoldber@redhat.com>

	net tests: migrating testDelWithoutAdd to the new functional tests

2017-04-23  Edward Haas  <edwardh@redhat.com>

	pylint: Do not check distutils attributes
	In a virtualenv, distutils namespace is replaced with some
	black-magic code that can't be statically analysed.
	Therefore, its member attributes should not be checked.
	Cf. https://github.com/PyCQA/pylint/issues/73

2017-04-23  Leon Goldberg  <lgoldber@redhat.com>

	net tests: migrating testFailWithInvalidNic to the new functional tests

	net tests: migrating testAddTwice to the new functional tests

2017-04-21  Dan Kenigsberg  <danken@redhat.com>

	pylint: Silence pylint errors in gluster
	pylint is complaining about valid code, checking if an attribute exists
	before using it. Maybe we can change the code so pylint will be happy,
	for now we disable this check for the specific line.

2017-04-21  Nir Soffer  <nsoffer@redhat.com>

	monitor: Fix pylint error when invoking callabck
	Pylint was complaining about non-callable cycleCallback. The callback
	was initialized to None, and the code was checking if cycleCallback is
	not None before invoking it, but pylint is not smart to enough to
	understand this.

	Fixed by initializing to _NULL_CALLBACK function. Now we don't need the
	None check and we can invoke the callback on every iteration. This is a
	little bit more expensive compared with the None check, but we call this
	once in 10 seconds so it does not matter.

2017-04-21  Edward Haas  <edwardh@redhat.com>

	net tests: Clean libvirt related mock leftovers

	net: Provide an alternative to libvirt.is_libvirt_device
	The dhclient_monitor has been using libvirt.is_libvirt_device to
	determine if a processed interface belongs to an owned network.

	As part of the effort to remove the dependency on libvirt and to
	correctly check for network interfaces, the networks_northbound_ifaces
	is introduced, reporting all the northbound ifaces of all networks.

	net: Cleanup configurator backup of libvirt nets
	Backup and restoration of libvirt networks is no longer needed, cleaning
	the remaining code.

	net: Drop libvirt network removal from setup network flow
	Libvirt networks are now removed at netupgrade step and are no longer
	removed in the setup networks flow.

	This patch compliments the removal of libvirt networks creation and
	decouples host networking from libvirt.

	The only reference left to libvirt is in the netupgrade step.

2017-04-21  Dan Kenigsberg  <danken@redhat.com>

	xmlrpc: silence pylint import-error

	fix typo in doctext

2017-04-21  Irit Goihman  <igoihman@redhat.com>

	nics: list dpdk ports
	dpdk ports can't be seen by kernel tools.
	We wish to know which dpdk ports are in the system in order to
	bind them to ovs-dpdk bridge.
	We query 'lshw -json' in order to get a json formatted response
	of system devices, take only network class devices which have a
	'handle' key and don't have logical name - meaning they are physical
	network devices which are not recognized by the kernel.

	Also, added fake network info for dpdk ports.

2017-04-20  Fred Rolland  <frolland@redhat.com>

	blockVolume: validate initial size with max size
	When creating a volume, there is an optional parameter called initial
	size used for QCOW volumes.

	The initial size was validated against the volume size. If it was
	greater than the size, an InvalidParameterException was thrown.

	However, there are cases where the 'truesize' can be greater than the
	'capacity' due to the qcow2 overhead and alignment to extent size.

	In this patch, the validation of the 'initial size' will be against the
	'max size' which is computed based on the 'size', the qcow2 overhead and
	extent size.

	Bug-Url: https://bugzilla.redhat.com/1434927

	block: add failing test for initial size
	For COW format on block domain, the initial size can be more than the
	capacity due to the header overhead. Though it should not be bigger
	than the max size.

	Bug-Url: https://bugzilla.redhat.com/1434927

	blockvolume: tidy blockvolume_test
	Bug-Url: https://bugzilla.redhat.com/1434927

2017-04-20  Francesco Romani  <fromani@redhat.com>

	API: replace validateMinimalKeySet
	Now that we have proper exception support, we can replace this
	utility function with new smaller code, achieving the same goal
	with less boilerplate.

	We took this chance to bootstrap the 'validate' module, which
	will hold any validation function we may need in the future.

	docs: executor: document Executor.dispatch()
	Fix the documentation of the `Executor.dispatch` method to reflect
	the last changes.

	No code changes, only docstring.

2017-04-20  Leon Goldberg  <lgoldber@redhat.com>

	net tests: removing the remainder of *CompatibilityMultipleNetsSameNic
	After having portions of the test moved to the new functional tests,
	what's left is redundant. The remainder of the test initially creates 2
	networks:

	1) 'test-network4' - 'another-nic', vlan: 100
	2) 'test-network5' - 'nic', vlan: 200

	There's no value in checking whether these networks were created
	successfully as the use case is already covered(2 different networks,
	different nics, different vlans)

	Afterwards supposedly 2 networks are created, but it is not so as the
	networks have the same name and are part of a single transaction
	(the second network simply overwrites the first network as they have
	the same dictionary key).

	This leads to a single new network:

	3) 'test-network6' - 'yet-another-nic', vlan: 300

	Another network with a different name on a different nic with a
	different vlan tag.

2017-04-20  Francesco Romani  <fromani@redhat.com>

	virt: devices: extract common parsing function
	We want all the devices to be able to initialize themselves
	from their XML representation.
	We start isolating the code which update the state from the XML,
	extracting one helper function that we will use in both paths.

	tests: consolidate the device XML tests
	We have the device XML tests scattered around, but we want to
	consolidate them in a dedicate module.
	Benefits:
	1. python3 compatibility
	2. moved into the vertical-specific subdirectory
	3. becomes trivial to understand which module to exercise

	Only code movement + rename to be pep8 friendly.

	virt: devices: stop passing the 'conf' parameter
	The device do not use the 'conf' attribute anymore,
	so it is now time to remove it.

	vmdevices: stop using self.conf
	We feed every Device object the vm.conf dict, but this is
	actually used in very few cases.

	We fix those cases injecting the needed extra attributes
	in the device configuration, so the conf attribute is now useless
	and will be removed in a future patch.

2017-04-20  Liron Aravot  <laravot@redhat.com>

	image: typo leading to AttributeError
	dstSdUUID and dstVolFormat should be separated by a comma, by mistake
	it was added as a dot as part of change I6a0aacc8c663.

	Bug-Url: https://bugzilla.redhat.com/1443548

2017-04-20  Andrej Krejcir  <akrejcir@redhat.com>

	io-tune: Cache io-tune policy in vdsm for faster reading
	Previously io-tune policy was read from libvirt xml metadata.
	Now, vdsm remembers what values were written to the metadata
	and does not read it.

	Bug-Url: https://bugzilla.redhat.com/1435218

2017-04-19  Ala Hino  <ahino@redhat.com>

	shrink-volume: Use vol.volUUID
	This patch fixes the code in commit 540e825 (block-volume: Refactor shrink to
	optimal size logic) where vol.UUID called instead of vol.volUUID.

	Bug-Utl: https://bugzilla.redhat.com/1420405

2017-04-18  Nir Soffer  <nsoffer@redhat.com>

	live-merge: Improve logging in Image.syncVolumeChain
	Currently, when Image.syncVolumeChain is called, the actual chain is
	logged but not the changes to the chain.

	Now we log:

	- The items being removed from the vdsm chain
	- Setting the leaf volume to ILLEGAL
	- Changing the parent of the next volume when unlinking internal volume

2017-04-18  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	yml: parameter type fixes for StoragePool.connect

	yml: return type fixes for LVMVolumeGroup.getInfo

	yml: return type fixes for StoragePool.getInfo
	There is a difference between engine and vdsm how they represent
	storage statuses. Engine uses lower case whereas vdsm capitalized.

2017-04-18  Ala Hino  <ahino@redhat.com>

	cold-merge: Shrink base volume
	During prepareMerge step, the base volume is extended by top volume size.
	In this patch, the base volume is reduced to optimal size.

	Bug-Utl: https://bugzilla.redhat.com/1420405

	block-volume: Refactor shrink to optimal size logic
	Currently, shrinkToOptimalSize performs the following:

	1. Prepares the volume
	2. Calls qemuimg-check to get volume actual size
	3. Tears down the volume
	4. Calls volume.reduce

	The steps above will not work in cases where the volume is prepared and
	we don't want to tear it down. In this patch, we introduce optimal_size
	helper to return volume optimal size. With this helper,
	shrinkToOptimalSize helper becomes redundant and thus it is removed.

	Note: the optimal_size calculation is different that the
	calculation performed in the removed shrinkToOptimalSize helper. In
	shrinkToOptimalSize, the volume was reduced to actual size plus 0.5-1.5
	GB depends on the volume size. In optimal_sze, the volume is
	reduced to actual size plus a chunk.

	Bug-Utl: https://bugzilla.redhat.com/1420405

	volume: Introduce optimal_size helper
	This helper returns volume actual size rounded to closest chunk. This
	helper will be needed to reduce volumes to optimal size, for example
	after cold merge.

	Bug-Utl: https://bugzilla.redhat.com/1420405

2017-04-18  Maor Lipchuk  <mlipchuk@redhat.com>

	image: Allocate initial size for converted RAW volume.
	Allocate the initial size of a QCOW2 volume on block domain which was converted
	from RAW volume.

	This code will be used on create template from VM, create VM from template (on
	DC 4.0), import a VM/Template from export domain, and also many trivial use
	cases that includes copy or move.

	Up until this fix was introduced, VDSM used to pre-allocated all the virtual
	size of a RAW volume once it was converted to QCOW2.

	The effect of this fix will be that there will be much less space to allocate
	since it will be dependant on the actual size of the volume.

	Currently this fix will only be supported for source RAW sparse volumes hosted
	on NFS v4.2.  Lower NFS versions than 4.2 will be pre-allocated with the
	virtual size of the volume.  Also source volumes which are pre-allocated will
	be converted to pre-allocated volumes as well.

	For example a RAW disk created on V4.2 NFS server and converted to COW volume:
	The source volume is RAW with actual size of 1.23GB and virtual size of 10GB

	Converting this image to qcow2 allocates now 2.25GB.
	The image itself requires 1.232GB, and we allocate extra chunk (1G by default),
	to make room for growing before the image must be extended.

	Bug-Url: https://bugzilla.redhat.com/1358717

2017-04-16  Milan Zamazal  <mzamazal@redhat.com>

	api: Introduce @guard for API calls
	The new decorator introduces easier and consistent marking of API calls that
	may not be called under certain circumstances.  We use the decorator to replace
	the repeating migration checks.

2017-04-14  Ala Hino  <ahino@redhat.com>

	tests: Remove extra '#' from a comment

2017-04-13  Andrej Krejcir  <akrejcir@redhat.com>

	Qos: Catch exception for disconnected domain
	The libvirt domain may be disconnected when
	a thread tries to get qos from libvirt metadata.
	This patch handles the exception.

	Bug-Url: https://bugzilla.redhat.com/1437375

2017-04-12  Maor Lipchuk  <mlipchuk@redhat.com>

	add extra space in log.

2017-04-11  Nir Soffer  <nsoffer@redhat.com>

	tests: Increase timeouts on time sensitive test
	The tests for blocked workers warning depended on check interval of 0.1
	seconds, and worker delay of 0.15 seconds. This works locally and on
	jenkins, but fail randomly on travis. Increase the timeouts to 0.2 and
	0.3 seconds, which is still short enough that we can always run this
	test, and hopefully less likely to fail on overloaded slave.

2017-04-11  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: ignore CD-ROM drives
	We have to ignore all CD-ROM drives. While Engine does filter out
	CD-ROMs during import this is not good enough. There are at least two
	know issues which require filtering on the VDSM side:

	1)  If the storage with image is not accessible during import it blocks
	    the VM from being imported which is unnecessary.

	2)  When importing from KVM it leads to stray argument in --source that
	    is not matched by any in --destination and kvm2ovirt terminates with
	    error.

	Bug-Url: https://bugzilla.redhat.com/1426144

2017-04-10  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	yml: return type fixes for Host.hostdevListByCaps

	yml: parameter type fixes for StoragePool.connectStorageServer

2017-04-09  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: pass gluster_enabled argument
	JSONRPC client supports also gluster commands, but until
	now we didn't pass it gluster_enabled parameter, indicating if
	we want to call also gluster commands.

2017-04-08  Nadav Goldin  <ngoldin@redhat.com>

	automation: check-merged: use el7.3 VM as test VM
	Backport-To: 4.1
	Backport-To: 4.0

	automation: check-merged: use 'vm-type' instead of 'ovirt-role'
	ovirt-role is deprecated in Lago.

	Backport-To: 4.1
	Backport-To: 4.0

	automation: check-merged: increase RAM size of the test VM to 1GB
	This might improve a little the tests running time. Each Jenkins slave
	has at least 8GB of RAM, so it should be safe.

	Backport-To: 4.1
	Backport-To: 4.0

	automation: check-merged: use 'lago collect' to collect logs
	'lago collect' is more reliable as it already copies the files
	recursively and optionally ignores paths that do not exist.

	Backport-To: 4.1
	Backport-To: 4.0

	automation: check-merged: add '-x' flag to deploy.sh
	To allow easier debugging why deploy.sh failed.

	Backport-To: 4.1
	Backport-To: 4.0

2017-04-08  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	xmlrpc: set http 1.1 as default

2017-04-07  Francesco Romani  <fromani@redhat.com>

	yajsonrpc: add __repr__ for jsonRpcRequest
	Add a proper __repr__ so we can have maningful logs,
	from which we can learn which request caused a JsonRPC
	worker thread to get stuck.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

	yajsonrpc: replace functools.partial with wrapper
	We do this because we want a nice __repr__ for the
	JsonRpc Task, so we can properly log stuck JsonRPC workers.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

	lib: jsonrpc: use periodic warning on stuck worker
	In change 54b79818e17e44ba1acf7d47e79a7e7946b50b4f we added the option
	to check and warn in the logs about stuck executor workers instead
	of discarding them.

	This patch uses this option for the jsonrpc workers, which were
	among the hardest to troubleshoot in case of exausted executor pools.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

2017-04-07  Liron Aravot  <laravot@redhat.com>

	sp: _upgradePoolDomain - upgrade only when needed
	Change I93ef63b7 handled unnecessary attempt to upgrade the master
	domain when executing startSpm as it may wait for storage jobs to end.
	This patch handles the same issue for rest of the pool domains.

	Bug-Url: https://bugzilla.redhat.com/1430122

	sp: _upgradePool - msd update when needed
	_upgradePool is executed during startSpm and a master domain update is
	always initiated during its execution. Other operations (like storage
	jobs such as copy_data/amend_image) that use the same lock may be running
	which will cause the _upgradePool/startSpm operation to wait till those
	operation end. In case of very long storage operation, that time may be
	very long.

	Usually no upgrade is actually being performed, this patch optimizes the
	flow by verifying that a master domain upgrade is actually needed before
	attempting to execute it (The domain version can be only incremented).
	In the following patches I do the same for non master data domains.

	Note that this is an optimization, there may be a case in which upgrade
	will be needed and startSpm will wait for the lock, in that case the
	running jobs should be aborted.

	Bug-Url: https://bugzilla.redhat.com/1430122

2017-04-06  Milan Zamazal  <mzamazal@redhat.com>

	virt: Handle only libvirt errors in VM._changeBlockDev
	We should handle only libvirt errors, not any random errors, there.

	virt: Make changeCD test use the current interface
	The test uses obsolete API arguments.  Let's update it.

	virt: Don't eject CD forcefully
	Changing or ejecting a CDs is performed forcefully, as with using a paperclip
	on a physical device.  The reason for doing that is described in
	https://bugzilla.redhat.com/626334, which doesn't look like something valid
	these days.  Removing a CD forcefully, without notifying the guest OS, is
	hardly a proper action and may cause confusion in the guest OS environment,
	such as the CD being apparently still mounted and producing I/O errors when
	trying to access it.

	This patch makes the CD eject cleanly.  Only if that attempt fails (and is
	signaled as a failure from libvirt) then the CD is ejected forcefully.  When a
	CD is accessed while being ejected, there can still be problems, but at least
	modern RHEL guest OS apparently handles the situation properly: The CD is
	unmounted, no longer accessible, and another CD can be mounted.

	A different situation is with changing the CD.  When something accesses the CD,
	such as a process having its current working directory there, weird things may
	happen with either forceful or clean CD change.  The change may not be properly
	recognized, errors may happen when the CD is accessed, or the CD may not be
	visible at all.  Under such circumstances, when there is no clearly superior
	option, it's better to stick with the current behavior.  So we keep changing
	CDs forceful.

	Bug-Url: https://bugzilla.redhat.com/1428514
	Backport-To: 4.1

	virt: Don't patch *VolumePath in test_change_cd_failures
	There is no need to monkey patch those methods to make the test pass.
	Actually patching prepareVolumePath leads to an XML error that is raised and
	silently swallowed.  In the result, we test for a failure, but a wrong failure:
	Not the libvirt one, but the XML formatting failure.

	We additionally need this fix for a followup patch where XML formatting is
	taken out of the corresponding try...except block.

	Backport-To: 4.1
	Bug-Url: https://bugzilla.redhat.com/1428514

2017-04-06  Francesco Romani  <fromani@redhat.com>

	virt: periodic: HostMonitor: set not-discardable
	Since we made HostMonitor one exclusive operation in change
	I60ccd4e0e239ce5dfa2c90947bd6cd59a23e51b3
	for the same reasons it also makes sense to set the `discard` flag
	to False, so we have periodic reminder that the operation is stuck.

	It works like this: with discard=False we implicitely schedule one
	check after `timeout` seconds. If this fires, and if the worker is
	stuck, one warning is emitted and the check is scheduled again
	after `timeout` seconds.
	This is indeed the behaviour we want there.

	Please note that this change is a partial revert.
	We need this because the executor 'periodic check,
	not discard' feature was added while after the change
	I60ccd4e0e239ce5dfa2c90947bd6cd59a23e51b3

	Related-To: https://bugzilla.redhat.com/1419856
	Backport-To: 4.1
	Backport-To: 4.0

	virt: periodic: expose the `discard` flag
	In commit 54b7981 the executor object gained support
	for `discard` flag in dispatch().

	This patch exposes it in the Operation class, making it possible
	to have not-discardable periodic Operations.

	periodic: docs: document the 'exclusive' parameter
	Document the recently added 'exclusive' parameter
	of periodic.Operation.
	No code change.

2017-04-06  Petr Horáček  <phoracek@redhat.com>

	vmdevices: use default if no displayNetwork
	Fixes a bug introduced in e83e964e8647882d96028fa149ef78f5f0502272.
	If no displayNetwork is selected by Graphics, we should use system
	default. Otherwise we fail trying to concatenate None and str.

2017-04-05  Nir Soffer  <nsoffer@redhat.com>

	tests: Mark slow tests in storage_asyncutils_test.py
	test_loop and test_slow_callback are slow (0.5s per test), and
	test_slow_callback is also failing on travis on every other build.
	Marking the tests as slow decrease build time and avoid false errors on
	overloaded test hosts.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Bug-Url: https://bugzilla.redhat.com/1427782

2017-04-05  Maor Lipchuk  <mlipchuk@redhat.com>

	qcow2: Calculate estimated size for converted qcow volumes.
	Adding a utility module for estimating qcow2 file size once
	converted from raw to qcow2.
	The estimation takes in consider also the qcow header size
	based on the implementation being done in qemu block/qcow2.c

	The following is a test being done on a 10GB QCOW volume
	with compatibility of 1.1.
	The actual size of the disk after executing qemu-convert was 1.00036621
	GB, while the estimated size by the new function was 1.00177 GB

	Bug-Url: https://bugzilla.redhat.com/1358717

2017-04-05  Tomáš Golembiovský  <tgolembi@redhat.com>

	supervdsm: mkimage: expose injectFilesToFs function

	mkimage: injectFilesToFs: fix owner and group
	Make sure the media has owner and group that suits the payload
	directory. Supposing the caller has not taken care of that already.

	mkimage: injectFilesToFs: allow specifying file system type
	The image can potentially come from any source. In some cases it may be
	good idea to constrain the file system to prevent probing.

	mkimage: injectFilesToFs: check image location
	Make sure the image being mounted is in the payload directory. Don't
	allow just any image to be mounted and altered.

	supervdsm: mkimage: expose getFileName function

	mkimage: make sure proper owner/group is set on payload directory
	A minor fix to the creation of payload directory. In RPM package the
	directory has vdsm/qemu as owner/group, but when the directory is
	deleted and later recreated by supervdsm, owner/group remained set to
	root. It is unlikely that this could have caused any real issues as only
	supervdsm writes into that directory at the moment.

	mkimage: add _injectFilesToFs function
	The change is just refactoring. The code for mounting and modifying the
	floppy image is moved into separate function so it can be reused later.

	generate XML files for automatic driver installation
	To get virtio support when installing Windows guest, user has to attach
	floppy with virtio drivers and then manually load the drivers at the
	beginning of the installation. By providing file Autounattend.xml with
	paths to the drivers we can instruct windows to load the drivers
	automatically and thus simplify the process for the user.

	Unfortunately, due to various driver loading bugs in Windows, we cannot
	have single XML file shared by all Windows version. The path to the
	drivers must match only the drivers correct for the specific Windows
	version being installed.

2017-04-04  Dan Kenigsberg  <danken@redhat.com>

	virt: drop unused guests_gateway_ip
	guests_gateway_ip is a prehistoric configurable, that has been
	completely replaced by display network.

	If it is ever used, it renderes a VM non-migratible (as the graphics
	address on one host should not exist on the destination host, too).

	This patch drops something that should have been removed many years ago,
	with the introduction of libvirtvm.py.

2017-04-04  Francesco Romani  <fromani@redhat.com>

	virt: metadata: use errors.Base
	metadata.Error should inherit from errors.Base, to comply
	with the Vdsm best practices.

	virt: metadata: generalize the device search
	until we get client-supplied alias, we must be able to lookup device
	using attribute matching.
	Thus, generalize how we search them.

2017-04-04  Leon Goldberg  <lgoldber@redhat.com>

	test: pass device in preserve_default_route
	Setting default route without device fails due to an
	"invalid argument" error.

	tests: use ipv6 gateway properly in preserve_default_route
	Fixing a typo in preserve_default_route where set_default_route
	received an ipv4 address while trying to set ipv6 default route.

2017-04-04  Francesco Romani  <fromani@redhat.com>

	lib: executor: handle timeout=None in __repr__
	After the change 54b79818e17e44ba1acf7d47e79a7e7946b50b4f we could have
	timeout=None much more often.
	This exposed one bug in the __repr__ method of executor.Task if timeout
	is indeed None, the format string expodes with

	  File "/home/fromani/Projects/upstream/vdsm/lib/vdsm/executor.py", line 377, in __repr__
	    id(self)
	TypeError: %d format: a number is required, not NoneType

	This patch fixes that.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

	virt: metadata: add device support
	Add context manager to handle the per-device metadata.
	We implement this on top of the VM metadata, so rewriting
	any device metadata actually means rewriting *all* the
	VM metadata.

	The client code has to take explicit care of synchronizing
	the accesses to the metadata section.

2017-04-03  Nir Soffer  <nsoffer@redhat.com>

	check: Warn about blocked checker
	Replace the lopping code with new the LoopingCall helper, so now we are
	calling Checker._check every interval seconds, instead of scheduling the
	next call after a check was completed.

	If the checker did not complete the last check when LoopingCall._check
	is called, log a warning about the blocked checker.  Previously we did
	not log anything while a checker was blocked on storage.  This will make
	it trivial to detect slow storage by grepping warnings.

	The linked bugs are not resolved by this change, but are good example
	why we need the new warnings.

	Here is an example log when NFS server was not accessible for 50
	seconds:

	2017-03-16 18:57:53,074+0200 WARN  (check/loop) [storage.check] Checker
	u'/rhev/data-center/mnt/example.com:_path/d6e4a622...b7286757/dom_md/metadata'
	is blocked for 10.00 seconds (check:279)

	2017-03-16 18:58:03,073+0200 WARN  (check/loop) [storage.check] Checker
	u'/rhev/data-center/mnt/example.com:_path/d6e4a622...b7286757/dom_md/metadata'
	is blocked for 20.00 seconds (check:279)

	2017-03-16 18:58:13,073+0200 WARN  (check/loop) [storage.check] Checker
	u'/rhev/data-center/mnt/example.com:_path/d6e4a622...b7286757/dom_md/metadata'
	is blocked for 30.00 seconds (check:279)

	2017-03-16 18:58:23,066+0200 WARN  (check/loop) [storage.check] Checker
	u'/rhev/data-center/mnt/example.com:_path/d6e4a622...b7286757/dom_md/metadata'
	is blocked for 40.00 seconds (check:279)

	2017-03-16 18:58:33,065+0200 WARN  (check/loop) [storage.check] Checker
	u'/rhev/data-center/mnt/example.com:_path/d6e4a622...b7286757/dom_md/metadata'
	is blocked for 50.00 seconds (check:279)

	Bug-Url: https://bugzilla.redhat.com/1428415
	Bug-Url: https://bugzilla.redhat.com/1427782

	storage.asyncutils: Introduce the asyncutils module
	This module provides the LoopingCall class, implementing the common
	pattern of running a callback every interval seconds.

	Example usage:

	    lc = LoopingCall(loop, callback, arg1, arg2)
	    lc.start(10)

	The first call is invoked when calling start; then the callback will be
	invoke every 10 seconds without the need to reschedule the next call on
	each callback.

	To delay the first call, use EventLoop.call_after():

	    loop.call_after(10, lc.start, 10)

	To stop the calls:

	    lc.stop()

	LoopingCall adds two important warnings:

	- Delayed call: if a call miss the expected deadline by more than 0.5
	  seconds (configurable), log a warning about the delay.

	- Missed deadlines: if the next deadline was missed when scheduling the
	  next call, log a warning about the missed deadlines.

	Both warnings mean the event loop was too busy or blocked by a bad
	callback; both cases are not expected and we want to detect them easily
	in the field.

	LoopingCall will replace similar code in the storage check module,
	allowing better logging when a checker is blocked on storage. This may
	also be useful for the new block jobs monitor.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Bug-Url: https://bugzilla.redhat.com/1427782

2017-04-02  Fred Rolland  <frolland@redhat.com>

	image: calculate destination allocation size
	In case of copy-collapse a disk, if the destination is 'cow' and the
	source is 'raw', the destination allocation size should be increased due
	to qcow2 metadata overhead.

	Bug-Url: https://bugzilla.redhat.com/1435967

	image: change chainSizeCalc method name
	Change method __chainSizeCalc to be public and rename to
	estimateChainSize in order to be able to add tests more easily.

	Bug-Url: https://bugzilla.redhat.com/1435967

2017-04-01  Ala Hino  <ahino@redhat.com>

	volume: Introduce max_size helper
	This helper returns the allocation required for the provided virtual
	size. If RAW volume, the provided size is returned. If COW volume, the
	size that returned is aligned to block or file align size.

	Bug-Utl: https://bugzilla.redhat.com/1420405

2017-04-01  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	tests: remove xmlrpc
	We do not need to test xmlrpc in integration tests.

	xmlrpc: remove vdscli

	xmlrpc: stop using during migration
	All supported versions of vdsms use jsonrpc so there is no need to
	fallback to xmlrpc anymore. When we are unable to use jsonrpc we fail
	and let the issue propagate to the caller.

	We want to keep the logic without the changes so it means that we need
	cannonize_host_port which used to be part of vdscli.

	xmlrpc: remove api calls

	xmlrpc: stop detection
	Xmlrpc detector was responsible to detect http post which was used by
	xmlrpc and get and put methods used by image upload and download logic.
	We do not need to detect post anymore but we still need to detect put
	and get methods.

	We want to deal in the same way for all not supported http verbs and the
	default behavior is to drop connection.

	tests: drop xmlrpc
	We do not need to test xmlrpc based code base.

	stomp: make client user aware that no connection available
	When a client looses connection to the server the user is not aware of
	it and as a result there is JsonRpcNoResponseError. We want to make user
	aware by raising NotConnected error.

2017-03-30  Francesco Romani  <fromani@redhat.com>

	virt: metadata: get rid of _XMLWrapper
	We added _XMLWrapper out of necessity, because we possibly
	need to *replace* (or at very least update) the object
	returned by the interal _domain_xml context manager.

	In this patch we reduce the amount of cerimony replacing
	the class with much simpler plain list wrapper.

	Also, we rename the _domain_xml helper to a more correct
	_metadata_xml.
	No changes in behaviour for the clients of the metadata
	module, tests included.

2017-03-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	check-merged: split functions by logic and few nits

2017-03-29  Francesco Romani  <fromani@redhat.com>

	virt: metadata: extract helper for dom metadata
	Extract one helper context manager to take care
	of the get-update-set cycle of the domain metadata.
	It will be used to implement the per-device metadata
	handler code.
	No change in (the current) behaviour.

	containers: fetch image name from metadata
	In commit 46ba88dc557ee53adb8b3d20709a02a678910f6b
	we started to remove smartness from the container domain parser.
	The original plan was to get the image from the outside;
	With the current plans to overhaul the domain metadata, it's
	just simpler to add a new helper which parses it from the metadata.

	This patch effectively restores part of the code removed in 46ba88dc55,
	but now we call this explicitely, so we complete the removal
	of unwanted and implicit smartness.

2017-03-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix flaky picklecopy benchmark
	We have a benchmark for picklecopy, failing randomly on travis, when
	picklecopy was less than twice faster compared with deepcopy. I don't
	think it is useful to fail the test randomly because of this reason, and
	I don't think picklecopy should be significantly faster then deepcopy to
	be useful. This code is much simpler then deepcopy and even if it is not
	significantly faster, I prefer to use picklecopy.

	The tests prints now the results to make this easier to debug. To see
	the timing run the tests with the -s option:

	$ ./run_tests_local.sh utils_tests.py -s
	...
	utils_test.TestPickleCopy
	    test_picklecopy_exact      OK
	    test_picklecopy_faster     deepcopy: 0.194, picklecopy: 0.053 OK
	...

2017-03-29  Martin Polednik  <mpolednik@redhat.com>

	storage: add tests for drive indice generating code
	The code is quite tied to the Vm class and we should eventually
	investigate how to untangle it, but let's start with tests.

	storage: group disk indices of scsi and sata interfaces
	Both interfaces use sd* as a name for their node. We have to make sure
	they don't collide.

2017-03-28  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add artificial delay after migration on destination
	When a migration successfully finishes, we report two different events to
	Engine:

	- VM status change to up status from the destination.
	- Final migration progress with downtime from the source.

	Those events may arrive to Engine in arbitrary order.  But Engine developers
	would like to already know the downtime at the time the migration is finished
	from their view (i.e. they are informed that VM status is changed to up status
	on the destination).

	One solution would be to synchronize the two hosts before setting the VM to up
	status on the destination.  Although that is possible, a simpler solution is
	preferable.  The easiest workaround is to add some fixed delay after migration
	is finished on the destination and before up status is set.  That doesn't
	guarantee the proper order of events, but increases chances that the downtime
	event is received by Engine before the up state event.  If the order of the
	events is still wrong, downtime won't be displayed in Engine.  This is not much
	problem if it happens only rarely.

	Bug-Url: https://bugzilla.redhat.com/1427566
	Backport-To: 4.1

2017-03-28  Martin Polednik  <mpolednik@redhat.com>

	storage: use defaultdict for used indices
	Reduces the amount of boilerplate. No change in functionality.

2017-03-28  Milan Zamazal  <mzamazal@redhat.com>

	virt: Ensure cleanup after failed recovered migration
	We check for migrations in Vdsm recovery.  If we detect that a recovered VM is
	migrating to another host, we put it to Migration Source status, which is a
	right thing to do.  However the other part of that is to make sure the VM gets
	out of Migration Source status once the migration finishes, either successfully
	or unsuccessfully.  This is normally ensured by SourceThread but it doesn't run
	anymore after Vdsm recovery.

	In case of successful migration libvirt will notify us and we do what's needed
	in VM.onJobCompleted.  However in case of a failed migration, we may not
	receive any notification from libvirt.  In order to prevent the VM from
	remaining in Migration Source status “forever” (let's say to the next Vdsm
	restart), we must check the status of the VM ourselves.

	One way to do that is to start a special thread in SourceThread for that
	purpose.  It checks the migration job status in regular intervals; those
	intervals should be not too short to not query libvirt too often and not too
	long to avoid possible interference with possibly following domain jobs.  Once
	the job is finished, we check whether the migration failed and do what's needed
	in such a case.

2017-03-28  Francesco Romani  <fromani@redhat.com>

	periodic: rename: _step -> _reschedule
	Trivial rename for the sake of readability.
	No change in logic.

	virt: host: stats: do not replace HostMonitor
	Some time ago we moved the HostMonitor operation inside the periodic
	framework. This was made out of convenience, to kill one extra thread,
	under the assumption that HostMonitor never blocks.

	But from https://bugzilla.redhat.com/show_bug.cgi?id=1419856#c15
	we learn that indeed HostMonitor can indeed block under rare, still
	not completely clear, circumstances.

	If more than two thread enter the netlink interface, all of them block.
	There is perhaps a bug in libnl, but we should never access concurrently
	this interface in the first place. So, if one HostMonitor is slow, we
	must never replace it, so we can never access the same interface more
	than once.

	This is a partial fix. It is still unclear why the first HostMonitor is
	slow, so why we end up with a timeout in the first place; but still,
	given
	1. the original intentions for moving HostMonitor in the periodic
	framework
	2. the fact that we don't need the host stats in the critical flow
	3. the fact that we should never access concurrently the netlink
	interface

	then it is safe to never replace the HostMonitor operation. If it is
	blocked, it will stay stuck unless it unblocks, or Vdsm is restarted.

	Related-To: https://bugzilla.redhat.com/1419856
	Backport-To: 4.1
	Backport-To: 4.0

2017-03-28  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: add parse_volume_chain method
	__diskXMLGetVolumeChainInfo method was moved
	from vm.py to Drive object. Primary reason to do
	it is that method, mentioned above, relies on
	internal Drive structure and not easily testable in
	situ.

	Now, as a Drive method parse_volume_chain it
	have full access to Drive internals.

2017-03-28  Francesco Romani  <fromani@redhat.com>

	virt: periodic: support for exclusive operations
	One "exclusive operation" is one operation that guarantee
	that any given time either none or exactly one instance of
	the callable are being executed, regardless of its state (perhaps
	running fine, perhaps slow, perhaps blocked).

	Doing like this we can avoid that more than one instance somehow
	enters one critical region, exhausting limited system resources
	(libvirt worker threads, netlink socket connections).

	If we enable this flag, the executor behaves much like a regular thread
	pool. Please also note that the concept of exclusive operation is
	related, but different, to the timeout.

	The timeout controls when a slow worker should be discarded, while
	the exclusive flag controls the new attempt to reschedule one periodic
	operation. You use the timeout to control when/if to give up, and the
	exclusive flag to control how aggressively retry.

	Up until now, there it was no need for this `exclusive` flag, because
	all the periodic operations were considered important enough to deserve
	aggressive rescheduling. The exception is the HostMonitor operations,
	for which we can afford delayed reporting of the state, and for which
	we discovered that, because of a still not confirmed underlying netlink
	issue, aggressively retrying causes more harm than benefits.

	In the future, we may want reevaluate if other periodic operations
	may benefit of less aggressive scheduling.

	Related-To: https://bugzilla.redhat.com/1419856
	Backport-To: 4.1
	Backport-To: 4.0

2017-03-28  Edward Haas  <edwardh@redhat.com>

	net: Expose translation of iface from config to netinfo
	The translation function has been publicly expose from the
	netinfo.cache in order to use it in the following patches.

	net: Do not create libvirt networks for each host network
	Libvirt networks are created by virt on a per need basis (when a VM with
	graphics is instantiated).
	With this patch libvirt networks are no longer created in parallel to
	the vdsm/host network.

	virt net: Create libvirt network only when needed
	The libvirt network is needed only for VM/s with graphics, therefore its
	creation and deletion should be dependent directly on it.

	On each graphic entity setup, the network will be created if it has not
	existed before.
	Deletion will occur on teardown if the current instance is the last
	one which uses the specific network.

	This patch is focused on virt changes, the following patches drops
	libvirt creation and deletion from the host networking code.

	net tests: libvirt_test - extract custom assertions

	virt net: Introduce setup to Graphics and refactor displayNetwork init
	Introducing setup method to Graphics, to provide setup/teardown steps.
	displayIp decoding has been moved to the setup step to allow in the
	following patches to create the libvirt network on demand if missing.

2017-03-27  Francesco Romani  <fromani@redhat.com>

	virt: metadata: update appendMetadataContainer
	remimplement the method using the new metadata.py API.

	virt: metadata: update appendMetadataVDSM
	remimplement the method using the new metadata.py API.

	virt: metadata: update appendMetadataQOS
	reimplement the method using the new metadata.py API.

	virt: add the metadata module
	Add module to act as central facade for the libvirt domain metadata.
	The module provides classes to get/set data from either ElementTree,
	to be used in the VM run flow, or from a libvirt Domain object, to be
	used once the VM is running (e.g. hot(un)plug flows).

	We use a custom serialization formats which tries to be compact and
	readable, while mimicing the current schema as much as we can.

	The code adds type hints to the XML elements to be able
	to unmarshal the correct python types.

	The module intentionally doesn't do any validation.
	Should schema validation be needed, we will add one specific step.

	Notes:
	1. at XML define time, we must take care of namespaces ourselves,
	   and add prefixes to all the elements we add in the metadata area.
	2. once the domain is succesfully started, and we access the metadata
	   elements using dom.metadata() and dom.setMetadata(), libvirt takes
	   care automatically of prefixing elements (including all
	   subelements) with their namespace string; so we must NOT do that
	   ourselves, otherwise we can end up with something illegal like
	   ovirt-vm:ovirt-vm:vm
	   ^        ^        ^
	   |        |        `- the element name the code wants to use
	   |        `- added by this module
	   `- added by libvirt
	3. the API was simplified to only take care of marshalling and
	   unmarshalling python key/values to XML. Since we either
	   disallow or completely control nesting (e.g. device metadata)
	   we don't need anything extra besides our existing XML
	   processing tools (e.g. no dependency on 3rd party complex libs).

2017-03-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding "abrt-cli list" output to sos plugin
	Bug-Url: https://bugzilla.redhat.com/917062

2017-03-27  Nir Soffer  <nsoffer@redhat.com>

	tests: Standard permutations list format
	Format permutations list so adding or removing a permutation require
	modification of a single line and create nicer diffs. This format is
	also consistent with most other tests.

2017-03-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	Changing ntp requirement to chrony
	vdsm.service depends on time-sync.target, which means chronyd or ntpd
	should run in parallel to it. chronyd is installed by default since fc18,
	this requirement is needed for minimal distributions.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1428419

2017-03-26  Nir Soffer  <nsoffer@redhat.com>

	cmdutils: Fix message format
	In commit fb57a5a34adf (errors: Use new errors.Base class) I made a typo
	on cmdutils.Error msg format string. Raising this error will show now
	this error instead of the original error:

	Traceback (most recent call last):
	  File "/home/nsoffer/src/vdsm/tests/cmdutils_test.py", line 119, in test_format
	    str(cmdutils.Error(["cmd"], 1, "out\n", "err\n"))
	  File "/home/nsoffer/src/vdsm/lib/vdsm/common/errors.py", line 35, in __str__
	    return self.msg.format(self=self)
	KeyError: 'sef'

	This patch fixes the typo and add the missing test for this class.

2017-03-25  Yeela Kaplan  <ykaplan@redhat.com>

	Adding abrt dependency and introduce configurator for it
	- Adding spec requirement for abrt addons to replace current coredump
	kernel reports (see RFE for more info)

	- Adding abrt conf files

	- Removing logrotate config for coredump folder - assuming that abrt
	takes care for not flooding in reports (need to be verified)

	- Adding tests

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=917062

	Add confutil to manage properties files easily
	In addition to confmeta [1], this util allows easy to manage files in
	the format of

	key = value
	key2 = value
	..

	This uses configfile and add functionality for easy add and remove
	sections inside the file.

	Those function moved from libvirt configurator and are not introduced in
	this patch. configurators/libvirt.py was the first usage until
	abrt.conf. For later configurators this util might be useful.

	See internal comments to understand usages.

	[1] https://gerrit.ovirt.org/70583

	Related-To: https://bugzilla.redhat.com/917062

2017-03-25  Maor Lipchuk  <mlipchuk@redhat.com>

	fsutils: Add fsutils module for storage with size function.
	Add a new fsutils module for storage,
	and add it a function to get the size of a file.
	Replace the duplicate implementations with call the new function.

2017-03-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	configfile: comment out old configuration when attribute is set by vdsm
	When vdsm configures a key that already exists in conf file, the new key
	will be created in vdsm-config-section. oldentries is a variable that tried to
	do the opposite and leave keys instead of overriding with vdsm content if the
	attribute is already set - the intention should be to use vdsm configuration
	after calling vdsm-tool configure. This patch comment-out fields that
	vdsm adds with a comment above those comments.

	Related-To: https://bugzilla.redhat.com/917062

2017-03-23  Nir Soffer  <nsoffer@redhat.com>

	iscsi: Fix useless info log
	We use to log this useless log in INFO level:

	    [storage.ISCSI] iSCSI iface.net_ifacename not provided. Skipping. (iscsi:590)

	The log was replace with this, and moved to DEBUG level:

	    [storage.ISCSI] iface.net_ifacename not provided, skipping rp filter setup (iscsi:590)

2017-03-23  Milan Zamazal  <mzamazal@redhat.com>

	virt: Handle VIR_ERR_OPERATION_INVALID on destroy
	It may happen that we get VIR_ERR_OPERATION_INVALID from libvirt when we try to
	destroy a VM.  That means that libvirt still holds some inactive remnant of the
	domain object.  According to libvirt developers this error is triggered when
	trying to call destroy on an inactive VM that is shut off or going to be shut
	off very soon.  Indeed, we observed the problem on a VM successfully migrated
	away.  It has been present for very long time, which shouldn't happen.  It's
	probably some libvirt problem but we are not able to reproduce it, we have just
	observed it.

	If the VM can't be destroyed, Vdsm still keeps the VM instance and rejects
	destroy requests from Engine.  As a result Engine sends destroy requests over
	and over and the VM can't be started on or migrated to the given host.

	To deal with that we ignore the error if the VM is in DOWN status.  We just log
	a warning about it and proceed with cleanup.  The basic problem is handled this
	way, if that doesn't help then there is nothing better to do than to restart
	libvirt.

	Bug-Url: https://bugzilla.redhat.com/1432876
	Backport-To: 4.1

2017-03-23  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register: _execute_http_request: adhere to cert_validation
	Before this patch, if self.check_fqdn is set, cert_validation=False was
	ignored.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1422664

2017-03-23  Ala Hino  <ahino@redhat.com>

	tests: Add fake produceVolume
	In patch I94ea20 (Cold Merge: Shrink base volume), we are going
	to invoke shrinkToOptimalSize. This method is defined on the volume
	class and not on the volume manifest. In this patch we define a fake
	volume class that defines a shrinkToOptimalSize method that does nothing but
	pass. Finally, we define a produceVolume on FakeSD class that returns the
	FakeVolume.

	Bug-Utl: https://bugzilla.redhat.com/1420405

2017-03-23  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Add volume_path method
	Duplicating code from vm.py:merge method were extracted
	and replaced with volume_path method. New method was
	covered with unit tests.

	Bug-Url: https://bugzilla.redhat.com/1022961

	volume: Implemented preallocated volume resizing with fallocate
	Bug-Url: https://bugzilla.redhat.com/1391859

	volume: Use fallocate for prellocation of file-based volumes
	Now creation of preallocated images made using call
	to fallocate wrapper (introduced with change
	I5b2cc0b52bfe565b5c1362fe14cc96f87c6ace61)
	thus making creation of preallocated volumes on
	filesystems backed storages much faster.

	Preallocation time measurements
	(1 GB file, comparing old and new
	approach, wall clock time in seconds):

	           old             new
	Local fs:  9.5s          0.03s
	NFSv3:     13.7s         15s
	Gluster:   61s           0.04s

	Measurements were taken by manually calling
	dd and fallocate helper in same way as
	vdsm does it. Execution time was measured
	using time(1) utility.

	Bug-Url: https://bugzilla.redhat.com/1391859

2017-03-23  Nir Soffer  <nsoffer@redhat.com>

	errors: Use new errors.Base class
	This class was duplicated in 5 modules. Using the new errors.Base
	instead of reimplementing it.

	Note: there is another duplicate in vdsm.client, I left this copy so we
	don't have to depend on vdsm-python package, in vdsm-client.

2017-03-23  Ala Hino  <ahino@redhat.com>

	logging: Fix logged helper to show arguments name
	Before this patch, log messages only included arguments value without
	arguments name. See below:

	2017-03-22 11:23:22,352+0200 INFO  (jsonrpc/1) [vdsm.api] START merge
	args=(<virt.vm.Vm object at 0x1fb3cd0>, {u'poolID':
	u'6ca038b9-c582-4bbf-9a38-332a7cf930ee', u'volumeID':
	u'e32aa7f4-5a95-4017-853e-d1d3e93f00e2', u'domainID':
	u'aa6a4ff0-e94c-434b-9933-e9b54238178e', u'imageID':
	u'3ccd7c65-cfac-4156-a834-700d0822c6bf'},
	u'116a7701-b38c-4667-859b-c2b92c36e399',
	u'e32aa7f4-5a95-4017-853e-d1d3e93f00e2', u'0',
	u'11380e6a-6924-4cd1-8211-af1a11dbb753') kwargs={} (api:37)

	With this patch, the log message will contain arguments name and values:

	2017-03-22 17:07:19,386+0200 INFO  (jsonrpc/3) [vdsm.api] START
	merge(driveSpec={u'poolID': u'6ca038b9-c582-4bbf-9a38-332a7cf930ee',
	u'volumeID': u'ad41da18-d235-4719-867b-b295594bd017', u'domainID':
	u'aa6a4ff0-e94c-434b-9933-e9b54238178e', u'imageID':
	u'3ccd7c65-cfac-4156-a834-700d0822c6bf'},
	baseVolUUID=u'116a7701-b38c-4667-859b-c2b92c36e399',
	topVolUUID=u'ad41da18-d235-4719-867b-b295594bd017', bandwidth=u'0',
	jobUUID=u'784ec7d4-b584-45d9-91ac-3bcd4b422dad') (api:39)

	Bug-Url: https://bugzilla.redhat.com/1426440

2017-03-22  Edward Haas  <edwardh@redhat.com>

	net: Replace netinfo dependency on libvirt with running config
	Netinfo report has been using libvirt db for determining which networks
	have been defined on the host.

	As part of the effort to seperate the host networking from the VM
	networking, this patch removes the dependency on libvirt db for
	determining the defined networks.

	This patch queries running config to determine the defined networks,
	replacing the role of libvirt in this regard.

2017-03-22  Nir Soffer  <nsoffer@redhat.com>

	errors: Introduce the common.errors module
	This module will keep error handling facilities. The first class is the
	errors.Base class that is implemented 5 times in various modules.

2017-03-22  Denis Chaplygin  <dchaplyg@redhat.com>

	storage: Add helper for posix_fallocate() call
	python wrapper for posix_fallocate(), used in
	resizing file backed prealocated volumes.

	We are not able to use fallocate utility
	cause it uses fallocate(2) call, which is not
	supported everywhere (e.g. on NFS) and doesn't
	have fallback capability, like posix_fallocate()
	call.

	Bug-Url: https://bugzilla.redhat.com/1391859

2017-03-20  Fred Rolland  <frolland@redhat.com>

	storage: No need to take locks on local storage
	In some of the Job classes, volume leases are taken even in
	case of local storage.

	In this patch, volume leases will not be locked in case that the
	storage domain does not support them.

2017-03-20  Petr Horáček  <phoracek@redhat.com>

	network: os.path.exists already returns bool

	net: use touchFile instead of explicit open

2017-03-19  Francesco Romani  <fromani@redhat.com>

	migration: use libvirt constants
	Previously we could not use them because of rhbz#1222795
	which is fixed since libvirt-python-1.2.17-1.el7

	migration: move params handling in a method
	to declutter the main method
	No intended change in behaviour.

	Related-To: https://bugzilla.redhat.com/1430198

	migration: reorganize the handling of flags
	Move them in a helper property to unclutter a bit the code.
	No intended change in behaviour

	Related-To: https://bugzilla.redhat.com/1430198

2017-03-17  Edward Haas  <edwardh@redhat.com>

	net: Persist the bond slaves config in a sorted manner.
	For consistency and to support the ability of comparing the requested
	and current configuration, the bond slaves need to be persisted in a
	sorted order.

	This issue has been raised after the canonicalization step has been
	moved from the config read to the netupgrade step (which normalizes the
	config on boot and expects the application to maintain it as such from
	that point forward).

	net: Netupgrade unified config creation should include only owned devs
	KernelConfig is creating a config report based on netinfo.
	This report includes both owned and 'external' bonds.
	In case the unified config is missing, it is created at netupgrade
	step based on KernelConfig, but it should not include
	the non owned bonds.

2017-03-16  Milan Zamazal  <mzamazal@redhat.com>

	virt: Spelling fixes of a comment in VM._destroyVmGraceful

2017-03-16  Leon Goldberg  <lgoldber@redhat.com>

	net tests: Split CompatabilityMultipleNetsSameNic: duplicate vlans
	This patch is one of several patches that splits
	testSetupNetworksNetCompatibilityMultipleNetsSameNic into
	several tests and moves them to the new functional tests.

2017-03-16  Edward Haas  <edwardh@redhat.com>

	net: Drop the old unified persistence upgrade
	Following the introduction of netupgrade with the unified configuration
	creation (when missing) and its maintanance through the setup flow, the
	older upgrade-unified-persistence is being removed.

2017-03-16  Francesco Romani  <fromani@redhat.com>

	executor: add support to report blocked workers
	Add one 'discard' flag to Executor.dispatch().
	By default, it behaves like today.
	If we call dispatch with 'discard=False', the executor does not discard
	the worker after a timeout, but periodically dumps in the log the
	state of the blocked worker.

	The logs will look like:
	2017-03-13 15:43:17,174 WARNING (Scheduler) [Executor] Worker blocked:
	  <Worker name=test/2 running <Task ${CALLABLE} timeout=1, duration=2
	    at 0x7f62a4303a90> task#=0 at 0x7f62a8377250> (executor:340)

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

	executor: allow to override the logger
	Add the possibility to override the logger
	used by Executor and its workers.
	With this addition, testing is much easier, as it
	is demonstrated in change
	I07d6b04138fa07f202b961b6ae34a244d0178770

	executor: store scheduled call as  attribute
	We want to add periodic alert of blocked worker;
	to do so, we start generalizing the action to be done on timeout.

	The discard logic is  one-shot and this will not change.
	However, the periodic alert will need to reschedule itself;
	furthermore, when the worker stops we still need to cancel the
	pending action.

	To accomodate those needs, we will store the scheduled call
	in one instance attribute.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

	executor: add task duration in __repr__
	Add information about task duration (time since the start)
	in the Worker __repr__.

2017-03-15  Leon Goldberg  <lgoldber@redhat.com>

	net tests: Split CompatabilityMultipleNetsSameNic: 2 nets 1 nic
	This patch is one of several patches that splits
	testSetupNetworksNetCompatibilityMultipleNetsSameNic into
	several tests and moves them to the new functional tests.

	net: removing redundant assert in getNicsVlanAndBondingForNetwork

2017-03-15  Edward Haas  <edwardh@redhat.com>

	net: Maintain unified config even with ifcfg persistence

2017-03-15  Leon Goldberg  <lgoldber@redhat.com>

	net: bonding.py py3 compatibility

	net: Introducing common switch validations.
	Some validation procedures are switch agnostic and should
	be done before the setup call is dispatched to the relevant
	switch.

	An example for this is that regardless of switch type,
	duplication of networks on a single southbound device
	shouldn't occur -- "_validate_inter_network_compatibility"
	goes to assure that, however it is currently only available
	for legacy switches. The validation was moved up and is
	called via _validate_common for each added network in
	a single transaction.

2017-03-15  Francesco Romani  <fromani@redhat.com>

	migration: do not send URI for tunneled migrations
	libvirt doesn't support it anymore: if we enable the tunnelled
	migration flag, we must not send the migration URI.
	Before libvirt 1.2.17 it was just silently ignored.

	Bug-Url: https://bugzilla.redhat.com/1430198
	Backport-To: 4.1
	Backport-To: 4.0

2017-03-15  Edward Haas  <edwardh@redhat.com>

	net: Remove the redundant Configurator.begin method
	The begin() method included duplicated initializations of the
	configurator instance. It has been called when the configurator
	is used as a context manager.

	As the configurator is always instantiated when used as a context
	manager, the duplication of initialization is redundant and therefore
	the begin() method is removed.

	net: Create unified configuration from current host state
	Create the persistent and running configs based on current host state
	and maintain the configuration files to represent actual configuration.
	The unified configuration is not to be consumed for ifcfg persitent
	mode, but it is to be maintained (written to) from this point on.

	Following this patch, changing the persistence mode from ifcfg to
	unified should be straight forward.

	net: Adjust RunningConfig.store method for re-usability
	Following the change to the store method, setSafeNetworkConfig is
	now using store, passing the implementation details down the stack.

	func helpers, net: Cleanup oVirt Node reference
	There is no longer a need to differentiate between a node and a non-node
	setup.
	This patch cleans up the network code who still used this info and the
	helper function that checked for oVirt Node setup.

	net: Execute canonicalization at netupgrade step
	As part of the networks configuration upgrade step, the canonicalization
	is now executed as well.

	The canonicalization step at each config read (@netconfpersistence) is
	now redundant and therefore removed.

	net: Upgrade running config from volatile to persistent
	This patch fixes 93fde96 by handling the upgrade of the existing running
	config to the persisted location without loosing the content.

	net: Modify unified config clear disk operation
	Config.delete() has been implemented by deleting each network and bond
	individually.
	In order to allow config_exists() to represent if the configuration
	exists or not and to simplify the delete steps, the networks and bonds
	folders are removed with all their content in one shot.

	Note: The save action will use a softer version named clearConfigs,
	which leaves the nets and bonds root folders intact.

	net: Introduce netupgrade module, processing the config upgrade
	netupgrade is to be processed as an oneshot step at boot or during a
	VDSM upgrade in order to reformat the networking configuration to a
	supported format.

	The step is exposed through vdsm-tool "upgrade-networks" command.

	In this patch, the normalization steps once performed at kernelconf are
	now moved here: "defaultRoute" and IFCFG keys.

	Future patches will move to the netupgrade step the canonicalization of
	the configuration and the creation of the unified configuration when
	missing.

2017-03-14  Leon Goldberg  <lgoldber@redhat.com>

	net: Not quering the kernel for vlan information in netinfo
	The information should already be present in the object.

2017-03-13  Leon Goldberg  <lgoldber@redhat.com>

	net: removing kernel query from getNicsVlanAndBondingForNetwork
	We have the information inside the object. Also removed
	redundant assertions.

2017-03-13  Martin Polednik  <mpolednik@redhat.com>

	hostdev: refactor libvirt err checking snippets into helper
	Saves few loc, centralizes error catching logic.

	hostdev: rename list_of_nodedev to libvirt_devices
	Consistent with the rest of the module.

	tests: add hostdev test for device that raises libvirtError

	vmfakecon: raise VIR_ERR_NO_NODE_DEVICE if device file doesn't exist
	Can be used to simulate missing devices in future patches.

	hostdev: add default hostdev flags
	New devices may be added to libvirt. To avoid breaking each time this
	happens, we can simply use default for libvirt flags that maps to
	SYSTEM device.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1429420

	hostdev: handle processing of unknown devices
	New devices may be added to libvirt. To avoid breaking each time this
	happens, we can simply process such devices in generic way without
	going into specifics before we investigate and properly support such
	devices.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1429420

	hostdev: don't process devices that are gone
	Processing the device tree is inherently racy - the initial list of
	devices could've changed, but this is not really reflected in our
	object.

	(Un)luckily, methods on virNodeDev underlying struct are passed to the
	libvirt. That means if the device disappeared, the call will raise
	libvirtError which we can catch and skip the device.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1428692

	hostdev: when calculating hash, skip over devices are gone
	When device disappears after the loop started, we still *do* have the
	representation. On the other hand, libvirt does not and will refuse to
	give us XML for the device.

	We can safely skip over these devices and not use them in the final
	hash.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1428692

2017-03-13  Leon Goldberg  <lgoldber@redhat.com>

	net: kernelconfig py3 compatibility

2017-03-11  Edward Haas  <edwardh@redhat.com>

	net: Refresh OVS service state on connectivity error
	VDSM checks OVS service state once and caches the response to reduce
	overhead.
	In case OVS service is taken down later on, VDSM will frequently fail to
	perform network operations as it will try to access OVS without success.

	With this patch, the OVS status is updated when a connectivity error
	occurs (accessing netinfo).

	Bug-Url: https://bugzilla.redhat.com/1419917

2017-03-10  Edward Haas  <edwardh@redhat.com>

	net: Silent pylint - Configurator.unifiedPersistence
	pylint error: Instance of 'Configurator' has no 'unifiedPersistence'

2017-03-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Use str(e) instead of e.message

2017-03-09  Francesco Romani  <fromani@redhat.com>

	executor: bump the priority of logging
	For executor, discarding workers it is unpleasant but definitely
	possible. We should however not hide this, so we bump the messages
	we emit when we discard one worker from DEBUG to INFO.

	Having one executor exhausted is a different and much serious issue,
	much less likely and much more serious. For this reason we change
	the priority from DEBUG to WARNING.

	Bug-Url: https://bugzilla.redhat.com/1428415
	Backport-To: 4.1

2017-03-08  Nir Soffer  <nsoffer@redhat.com>

	tests: Add helpers for running hsm and spm mailboxes
	Creating SPM and HSM mailboxes is very verbose, and both of them create
	a thread pool so we must stop them and wait until the thread pool is
	destroyed. Add make_hsm_mailbox() and make_spm_mailbox() context
	managers to make it easier to write tests.

	The thread leak test cannot use the helpers because of the evil things
	it does during the test. This tests will be probably be removed soon.

	tests: Add tests for mailbox initialization
	Add tests for inbox and outbox initialization when starting SPM and HSM
	mailboxes.

2017-03-08  Francesco Romani  <fromani@redhat.com>

	tests: import the right module
	We moved the Connection fake in vmfakecon to improve
	our python3 compatibility.
	The hostdev tests just need the fake.Connection, they don't need
	the full vmfakelib.

	Update the imports to pick the right module.

2017-03-07  Petr Horáček  <phoracek@redhat.com>

	contrib: configurable VDSM_DIR in shell_helper

2017-03-07  Francesco Romani  <fromani@redhat.com>

	schema: deprecate the spiceSecureChannels
	We don't use it anymore. We rather use the 'defaultMode'='secure'
	setting, and Engine will not send them anymore.

	Backport-To: 4.1

	vmxml: remove replaceChild
	Remove this helper: it was used in one place, and was not compatible
	with python3. It could have been fixed of course, but overall the
	codebase is simpler without it.

	containers: require image as parameter
	The container code has code to detect the parameters from
	the domain XML. Among other things, it tries to be smart
	and figure out the image to use, if it is not explicitely
	given.

	This patch starts to remove this smartness: the image to
	run is expected to be given as parameter.
	This will make the upcoming transition to the metadata
	module easier.

	We keep the fallback code which guesses the image from
	the first disk drive configured. That will be removed
	in a later patch.

	containers: reduce the parsing
	When starting up a container, we do some preliminary parsing of the
	domain XML to detect the runtime to use.
	This was useful in the ealry stages, when we considered
	supporting more than the docker runtime.
	Nowadays we use it only for logging.

	This patch eliminates this early parsing and updates the log
	accordingly. This way, we save some cpu time and we make the code
	a bit easier to work with for the upcoming patches.

	virt: network: factor out update helper code
	The Vm.setLinkAndNetwork() method is the only client
	of vmxml.Element.replaceChild(), which we want to remove.

	To do that, we start adding one test to cover the existing behaviour.
	In turn to make this easier, we factor out the surrounding chunk of the
	Vm.setLinkAndNetwork() code.

	While this change is self sufficient and actually improves testability,
	it is by no means a clear improvement or smart. We intentionally do
	a dumb cut, because to properly clean this flow we will need a much
	deeper refactoring, which is out of scope now.

	We improve testability and modularity (the code is no worse than
	before), so this change still have some merit.

2017-03-07  Martin Polednik  <mpolednik@redhat.com>

	numa: drop getVmNumaNodeRuntimeInfo
	The functionality is no longer needed as engine doesn't use the
	information nor does it require it.

2017-03-07  Francesco Romani  <fromani@redhat.com>

	api: vm: deprecate the NUMA reporting
	Looking into the Engine soon-to-be 4.2.0, looks like Engine is not
	consuming anymore the NUMA node runtime info.
	A quick scan in the MOM sources seems to suggest the same.

	Therefore, we mark this information as deprecated to make people aware
	we want to get rid of it in 4.2.0.

	Backport-To: 4.1

2017-03-07  Dan Kenigsberg  <danken@redhat.com>

	tool: pylint: do not reuse "args" variable
	Python is dynamically typed, but pylint is confused by this.

2017-03-06  Edward Haas  <edwardh@redhat.com>

	net: Cleanup - Convert netconfpersistence._getConfigs to staticmethod

2017-03-06  Francesco Romani  <fromani@redhat.com>

	vm: network: paramsToBandwidthXML as staticmethod
	Since network.Interface.paramsToBandwidthXML use nothing of the
	instance state, we turn it to a static method, and we rename it
	to be pep8 friendlier.
	No changes in behaviour.

2017-03-06  Edward Haas  <edwardh@redhat.com>

	spec net: During VDSM upgrade, reset vdsm-network service
	vdsm-network is a systemd oneshot service which should be reloaded upon
	vdsm upgrade.

	Currently it performs two actions:
	- Triggers the upgrade-unified-persistence process.
	- Restoration of the persisted networks.

	Both are already "protected" by flags that assure they run only once per
	boot, therefore no logic is suppose to be change with this path.

	Future patches will introduce additional (or replacement) actions that
	will leverage systemd oneshot semantics, instead of internal flag
	implementations.

2017-03-05  Petr Horáček  <phoracek@redhat.com>

	add dhclient to dependencies
	While dhclient is usualy available in minimal server instalation,
	it is not pre-installed inside container images.

2017-03-05  Edward Haas  <edwardh@redhat.com>

	net: Use netinfo iface users check version (instead of ifaceUsed)
	Checking if an iface is used by other devices has two implementetions:
	- Check against existing kernel config: ifaceUsed()
	- Check against a given netinfo instance content: NetInfo.ifaceUsers()

	Both are based on the kernel config with some specific differences:
	- The first is directly checking against the kernel and includes a check
	  against libvirt for the network existance.
	- The second is checking against netinfo content, which was previously
	  collected from the kernel and from libvirt for the networks.

	Note: Networks as entities are collected by netinfo from libvirt at the
	moment. NetInfo acts as an abstraction layer, allowing future patches
	to change the source of the data without affecting its users.

	Future patches will change the network data source from libvirt to
	running config.

	net: Push NetInfo object down the ifcfg setup flow
	In this patch, the transaction NetInfo instance is pushed down through
	the ifcfg configurator setup flow.

	This patch is the first step to use NetInfo.ifaceUsers()
	instead of ifaceUsed(), making NetInfo available where it is needed.

	In the next patch ifaceUsed() is replaced by NetInfo.ifaceUsers()

	net: Normalize network 'ipv6addr' on netinfo to kconfig translation
	'ipv6addr' is being normalized on config read from a string to a list in
	order to correctly compare it to kernelconfig.

	It is more appropriate to perform the opposite translation, from netinfo
	to the config representation.

2017-03-03  Francesco Romani  <fromani@redhat.com>

	virt: devices: redir: declare the 'bus' attribute
	It was not included in __slots__, but we need it.

	virt: devices: rng: declare 'address' attribute
	since we redefine __slots__, we need to declare all the attributes
	we use.

2017-03-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Run job completed actions after recovered migrations
	VM.onJobCompleted checks self._migrationSourceThread.started flag to know
	whether the callback was invoked after a migration.  However if Vdsm was
	restarted during the migration, the flag is not set since the source thread is
	not actually running.  So in such a case onJobCompleted returns immediately
	without performing the post-migration actions.

	We fix it by adding a check for a recovered migration at the place.  We must
	also ensure that SourceThread._recovery is reset after unsuccessful migration,
	otherwise the post-migration actions would be called for all subsequent domain
	jobs.  This doesn't work in all situations since libvirt may not notify us
	after failed migrations so SourceThread._recovery gets reset only when the
	migration is explicitly canceled.

2017-03-03  Francesco Romani  <fromani@redhat.com>

	vmxml: separate vmxml.Element and etree.Element
	Up until now, the vmxml.Element was quite liberal in accepting
	arguments to its append*() methods; same was true for
	vmxml.append_child.
	We had freedom to mix and match vmxml.Element and etree.Elements
	freely, without any apparent harm.

	Things change in python3; if we run the very same code under python3,
	for example because of the tests introduced in
	patch Id1beb214e76c5173de318406fc6208990d33adbb
	we get errors like

	  File "lib/vdsm/virt/vmxml.py", line 334, in appendChild
	    self._elem.append(element)
	TypeError: append() argument must be xml.etree.ElementTree.Element, not Element

	To fix this issue, we must always append etree Elements childs.
	Confusion can arise from a couple od sources; we add a special-purpose
	appendEtree method to mark such places, in order to always append
	the right element.

2017-03-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Make test logs easier to understand
	Previously we create the inbox and outbox with random names, which makes
	it harder to understand the logs when tests fail. Replace the
	mailbox_file() helper with standard make_env() creating a temporary
	directory with "inbox" and "outbox" files.

	Here are example logs with the new setup:

	    DEBUG   [storage.Misc.excCmd] (mailbox-spm) /usr/bin/taskset --cpu-list
	    0-3 dd if=/var/tmp/tmpGVQ6NU/inbox iflag=direct,fullblock count=1
	    bs=40960 (cwd None)

	    DEBUG   [storage.Misc.excCmd] (mailbox-hsm) /usr/bin/taskset --cpu-list
	    0-3 /usr/bin/dd if=/var/tmp/tmpGVQ6NU/outbox iflag=direct,fullblock
	    bs=512 count=8 skip=56 (cwd None)

	    DEBUG   [storage.Misc.excCmd] (mailbox-hsm) /usr/bin/taskset
	    --cpu-list 0-3 /usr/bin/dd of=/var/tmp/tmpGVQ6NU/inbox iflag=fullblock
	    oflag=direct conv=notrunc bs=512 seek=56 (cwd None)

	It is clear now that the mailbox-spm thread is reading from the inbox,
	and the mailabox-hsm thread is reading from the outbox and writing to
	the inbox.

2017-03-02  Edward Haas  <edwardh@redhat.com>

	net: Properly initialize ConfigNetworkError exception

2017-03-02  Leon Goldberg  <lgoldber@redhat.com>

	net tests: migrating testSetupNetworksAddManyVlans to the new func tests

2017-03-02  Dan Kenigsberg  <danken@redhat.com>

	rpmlint: silence warning about zero-length conf files
	rpmlint does not like empty conf files, so we're shipping them with a
	single newline.

2017-03-02  Martin Polednik  <mpolednik@redhat.com>

	sr-iov: expose numa_node if available
	VDSM tries to find the best numa node for VM if host device exists.
	Since the whole point of that feature is to eventually be available
	for SR-IOV, Interface class should also expose it's numa_node.

	Side effect is that since the code is checking *all* hostdevices
	(including SR-IOV), using sr-iov+hostdev currently doesn't work.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1427202

	network: remove is_hostdevice from __slots__
	Already implemented by core.Base, doesn't need to be reimplemented.

2017-03-02  Leon Goldberg  <lgoldber@redhat.com>

	net tests: Add grace/synchronization period for mode4 bonds.
	Although mode 4 bonds may be reported up, they may still not be fully
	synchronized with their partner bond. The rate in which dedicated
	packets are sent to the slaves is set/determined via the "lp_interval"
	option -- wait the interval and some predetermined grace period to allow
	the bonds to become synchronized with their partner bonds.

2017-03-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Limit migration recovery status to previously migrating VMs
	We introduced a check for running migrations in recovery.  We utilize
	migration.ongoing function for the check.

	However migration.ongoing assumes that the domain has already been migrating to
	another host, it doesn't work correctly in the general case, when we don't know
	anything about the VM migration status in advance.  The migration.ongoing check
	is based on checking the presence of a domain job since there is no much better
	way to check for ongoing migrations in libvirt.  However the domain jobs are
	not limited to host-to-host migrations, they can perform other tasks such as
	hibernation or making a snapshot.

	To satisfy the assumption of migration.ongoing we check for MIGRATION_SOURCE
	status in recovery.

2017-03-02  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: add help message per namespace
	help message is now generated from vdsm schema
	and provides information for constructing a command.

	    vdsm-client -h

	usage: vdsm-client [-h] [-a HOST] [-p PORT] [--unsecure] [--timeout TIMEOUT]
	                   [-f FILE]
	                   namespace method [arg=value] ...

	Namespaces:
	  namespace method [arg=value]
	    Host
	    Task
	    LVMVolumeGroup
	    Image
	    VM
	    Volume
	    StorageDomain
	    ISCSIConnection
	    StoragePool
	    SDM
	    Lease

	    vdsm-client Lease -h

	usage: vdsm-client Lease [-h] method [arg=value] ...

	optional arguments:
	  -h, --help          show this help message and exit

	Lease methods:
	  method [arg=value]
	    rebuild_leases    Rebuild external leases index on storage domain
	    status            Return the underlying sanlock lease status
	    info              Return external lease information
	    delete            Delete an external lease (only on the SPM host)
	    create            Create an external lease (only on the SPM host)

	    vdsm-client Lease create -h

	usage: vdsm-client Lease create [-h] [arg=value [arg=value ...]]

	positional arguments:
	  arg=value   lease: The lease to create

	              JSON representation:
	              {
	                  "lease": {
	                      "sd_id": "UUID",
	                      "lease_id": "UUID"
	                  }
	              }

	optional arguments:
	  -h, --help  show this help message and exit

2017-03-02  Shmuel Melamud  <smelamud@redhat.com>

	storage: Do not make volume ILLEGAL before sparsifying it
	Since virt-sparsify tool cannot leave the volume in corrupted state,
	there is no need to mark the volume as ILLEGAL before running the tool.
	Otherwise, if the storage domain becomes unavailable during the
	operation, the volume will be left in ILLEGAL state and its futher usage
	will be impossible. This patch helps to avoid such a scenario.

	This patch introduces VolumeInfo class that is used by sparsify_volume
	job instead of CopyDataDivEndpoint class that doesn't provide the
	functionality needed. The VolumeInfo class is made common for
	sparsify_volume and amend_volume verbs.

	Bug-Url: https://bugzilla.redhat.com/1425161

2017-03-02  Nir Soffer  <nsoffer@redhat.com>

	mailbox: Decrease the chance of checksum failures
	The HSM mailbox is writing 4096 bytes to the SPM inbox. The last 4 bytes
	of this data are the checksum of the first 4092 bytes. We used to write
	this data using block size of 512 bytes, doing 8 writes. From the time
	the first write is complete, until the last write is complete, this host
	mailbox is in invalid state; if the SPM reads the mailbox, the checksum
	verification will fail, and the SPM will ignore the messages from this
	host.

	There is no way to write 4096 bytes atomically, so we cannot fix this
	issue. But we can decrease the chance of the failure by doing one write
	of 4096 bytes, instead of 8 writes of 512 bytes. There is still chance
	of failure since writing on the remote storage is probably done using
	512 blocks, but the chance of reading incomplete write is much lower.

	Since both reading and writing was done using 512 bytes blocks, both
	were modified to use 4096 block size. The SPM mailbox is already writing
	replies using 4096 block size.

	Bug-Url: https://bugzilla.redhat.com/1426762

	mailbox: Improve log when checksum fails
	When a checksum fails, log the mailbox data, the actual checksum and the
	expected checksum.

	Replace the code for extracting the data and checksum with more pythonic
	way, using negative slice index. Since this works only if the mailbox
	string is in the correct length, assert about the length.

	Bug-Url: https://bugzilla.redhat.com/1426762

2017-03-02  Irit Goihman  <igoihman@redhat.com>

	vdsmapi: get complex type representation
	vdsm-api contain some complex method prameter types.
	vdsm-client should use vdsmapi.py knowledge of the schema
	in order to help the users construct these parameters.

	vdsmapi now returns a dictionary represenation of
	given command parameters.
	keys represent the parameter names and dict values are
	the parameter types.
	Note that it's almost perfect: union types aren't fully
	represented and only the union types are being stored.

	usage:
	    from vdsm.api import vdsmapi
	    schema_paths = [vdsmapi.find_schema()]
	    schema = vdsmapi.Schema(schema_paths, False)
	    schema.get_args_dict("Lease", "create")

	{
	    "lease": {
	        "sd_id": "UUID",
	        "lease_id": "UUID"
	    }
	}

2017-03-02  Sharon Gratch  <sgratch@redhat.com>

	v2v: prevent importing of VMware VMs with snapshot
	Since v2v doesn't support importing of VMs with snapshot(s), then we need
	to avoid importing those VMs.

	Since for Xen there is no libvirt API implemented for checking if
	snapshots exist and for 'OVA from VMware' and KVM - the VM is imported
	after all snapshots are collapsed, then the only external provider left
	to handle is VMware.

	Before this fix, trying to import a VMware VM with snapshot caused the import
	to fail while trying to locate the current snapshot delta invalid vmdk disk name for
	copying.

	This solution handle this by skipping those VMS and writing an error to log.
	Skipping means avoid sending the full info (XML, disks, network info etc) on those
	VMs to the engine and therefore avoid displaying them in v2v second dialog
	for importing.

	Bug-Url: https://bugzilla.redhat.com/1336840

2017-03-02  Edward Haas  <edwardh@redhat.com>

	net: Remove ipv4 prefix normalization from kernelconfig
	IPv4 prefix normalization is already performed at the canonicalize step,
	there is no need to do it at kernelconfig normalization.

	It is not expected for both netmask and prefix to exist in the
	configuration and with this patch we embrace the canonicalize logic of
	failing when both exists.

	net: Move bond slaves normalization to canonicalize step

	net: Move dhcp config normalization to canonicalize step

	net: On rollback failure clean running config from removed nets
	When a setup failure occurs during rollback, some networks may have been
	already removed, therefore, this state needs to be expressed in the
	persisted running config.

	net: Drop blockingdhcp persistent config on read and write
	The blockingdhcp network attribute is used to request a specific setup
	implementation behaviour: to block (or not) on a dhcp request.

	This behaviour attribute is supose to be volatile, not saved in any
	persistent config.

	In this patch, attribute filtering is performed to filter out volatile
	attributes (blockingdhcp at the moment) on config write and on config read.
	Replacing the previous normalize blockingdhcp filtering.

	net: Cleanup unused config net attrs filter fields
	When adding a network to a config (running/persistent), some fields have
	been filtered out. This a hack used to adjust the code to the caller
	usage.

	This patch removes fields that are no longer in use by the callers,
	therefore there is no need to filter them out.

2017-03-02  Nir Soffer  <nsoffer@redhat.com>

	mailbox: Add tests for mailbox validation
	When SPM mailbox is reading new mail, it validates the mailbox checksum.
	Add tests before modifying this code.

	Bug-Url: https://bugzilla.redhat.com/1426762

2017-03-01  Shahar Havivi  <shaharh@redhat.com>

	v2v: move QCOW2 setting to vminfo
	patch I846e75e6292c0b249e66b08ceec6b371e9b50f22 added ability for
	setting QCOW2 version while importing by adding a new parameter version
	to the api.
	This change require the engine to have two signatures of
	convertExternalVm and convertExternalVmFromOva verbs for backward
	compatibility.
	moving the setting to the vminfo structure will leave the api as is and
	will not require handling of backward compatibility.

	Bug-Url: https://bugzilla.redhat.com/1412451

	schema: add new type ExternalVmParams and ExternalDiskParams
	currently v2v use ExternalVmInfo and ExternalDiskInfo for all the
	 getExternalVm* methods and for all the convertVm* methods.
	convertVm* uses other values that the engine changes so adding a new
	type ExternalVmParams and ExternalDiskParams for all the convertVm* methods.

2017-03-01  Petr Horáček  <phoracek@redhat.com>

	network: remove Node reference

2017-03-01  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: add missing gluster exception
	GlusterHostStorageDeviceMkfsFailedException is missing in
	gluster/exception.py and wrong arugments are passed in
	gluster/storagedev.py. This patche adds the missing exception \
	and corrects the arguments passed.

	gluster: correct exception name in gluster/cli.py
	cli.py is referring to a non existant exception
	GlusterXmlErrorInfoException. It should be GlusterXmlErrorException.

2017-02-28  Francesco Romani  <fromani@redhat.com>

	API: decorate VM.seal
	add the missing @api.method decorator.

2017-02-28  Irit Goihman  <igoihman@redhat.com>

	janitorial: move vdsm-tool script and man page to static

2017-02-28  Francesco Romani  <fromani@redhat.com>

	virt: network: remove move iteritems() calls
	They have negligible performance impact (we are iterating over
	small dicts!), but prevent the move to python3.

	virt: move vmxml.Domain to its own module
	We move vmxml.Domain into the newly introduced libvirtxml.py module.
	This way we isolate the utility XML processing code from the code which
	uses it to build the libvirt XML. The key benefit is that with this
	patch we can reuse the utility code in the upcoming metadata handling,
	module, avoiding circular dependencies.

	Other lesser benefits are the slightly easier future removal of the XML
	building code, and the fact that 'libvirtxml.Domain' reads a bit nicer.

2017-02-28  Martin Polednik  <mpolednik@redhat.com>

	hostdev: use reattach_detachable in PCI devices
	We can now do that with pci_reattach param. Moves part of the logic to
	hostdev module rather than (soon to be extinct) device class.

	hostdev: rmAppropriateIommuGroup in hostdev_reattach
	We try to always free the device -- even when it's not reattached. We
	should not hold ownership of *any* device that just happens to be
	bound to vfio-pci.

	hostdev: allow hostdev_reattach to actually reattach devices
	We've high-level implementation into low level function. Let's
	parametrize the function to allow the same functionality while default
	is what it should've been in the first place.

2017-02-28  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: fix pylint issues in gluster/tasks.py.
	volumeReplaceBrickStatus API is removed from gluster/cli.py.
	So removing its references from gluster/tasks.py

2017-02-28  Francesco Romani  <fromani@redhat.com>

	vm: tests: add test for initial vcpu limit setup
	We update the vm vcpu limit both on startup - if SLA QOS policy is given
	and after policy updates received from clients (e.g. Engine).
	We had tests for the latter, not for the former cases.

	This patch adds the missing test.
	For the sake of the practicality, we take one shortcut and we test
	a private Vm method. This is bad, but not having tests it is even
	worse, as the related BZ demonstrates.

	Related-To: https://bugzilla.redhat.com/1426727
	Backport-To: 4.1

	vm: fix vcpu limit detection on create
	The code was not update and still called the old name of the
	XML helper, leading to a creation failure. We just use the new name.
	Proper test, to ensure it will not happen again, in a followup patch.

	Bug-Url: https://bugzilla.redhat.com/1426727
	Backport-To: 4.1

2017-02-28  Irit Goihman  <igoihman@redhat.com>

	vdsm-api: missing object type in MemNode

2017-02-27  Nir Soffer  <nsoffer@redhat.com>

	sp: Mark _finalizePoolUpgradeIfNeeded as @unsecure
	StoragePool._finalizePoolUpgradeIfNeeded while a host is not the SPM. In
	this case it will fail with this error:

	    Traceback (most recent call last):
	      File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 372, in wrapper
		return f(*a, **kw)
	      File "/usr/lib/python2.7/site-packages/vdsm/concurrent.py", line 177, in run
		return func(*args, **kwargs)
	      File "/usr/lib/python2.7/site-packages/vdsm/storage/securable.py", line 78, in wrapper
		return method(self, *args, **kwargs)
	      File "/usr/share/vdsm/storage/sp.py", line 207, in _upgradePoolDomain
		self._finalizePoolUpgradeIfNeeded()
	      File "/usr/lib/python2.7/site-packages/vdsm/storage/securable.py", line 76, in wrapper
		raise SecureError("Secured object is not in safe state")
	    SecureError: Secured object is not in safe state

	When this fails, we do not unregister StoragePool._upgradeCallback from domain
	state changes events. Each time a domain changes state to valid, we will try to
	to perform a useless domain upgrade, creating more noise in the log.

	I think this issue was introduced by commit 4677d5b2dbcf (sp:
	deactivateSd - remove domain from pending for upgrade list). Not
	sure why the issue surfaced only recently.

	Bug-Url: https://bugzilla.redhat.com/1400534

2017-02-27  Irit Goihman  <igoihman@redhat.com>

	gluster hooks: fix "no 'GlusterHookReadException' member"
	GlusterHookReadException exception doesn't exist, the actual
	exception is GlusterHookReadFailedException.

2017-02-27  Francesco Romani  <fromani@redhat.com>

	virt: devices: watchdog: switch logic
	The watchdog device had a slightly different update_device_info
	logic, making it unnecessarily different from any other device.
	We switch the logic to make it consistent, with no intended change
	in behaviour.

	sampling: rename VMBulkSampler
	Rename to `VMBulkstatsMonitor` because is a bit nicer and
	more consistent with the rest of the periodic operations.

	No changes in behaviour.

2017-02-27  Milan Zamazal  <mzamazal@redhat.com>

	virt: Run job completed callback only for migrations
	We introduced onJobCompleted callback to handle finished migration statistics
	and other stuff.  However we can't be sure that the callback is run only for
	remote host migration jobs.  We add a check for that.

	We use SourceThread.started flag for that purpose.  Once a migration starts,
	the flag is set.  If the migration finishes successfully, we keep the flag set
	and we know that the callback must be from a migration (assuming it's not a
	delayed callback from another domain job and that we don't run other domain
	jobs in parallel with migrations).  If the migration fails and the VM continues
	to operate then the flag is unset (this is change in handling of the flag but
	it doesn't influence its original use), in which case we disable the callback
	processing.

	We've got a similar problem in _recover_status, but we'll handle that
	separately, since we need more information from libvirt developers there and we
	needn't backport _recover_status changes to 4.1.

	Backport-To: 4.1

2017-02-26  Dan Kenigsberg  <danken@redhat.com>

	pylint: storage: silence errors regarding six.moves.queue
	six.moves is too smart for pylint.

2017-02-26  Leon Goldberg  <lgoldber@redhat.com>

	net tests: Don't compare running to kernel config with ifcfg persistence
	setupModules compares the running config to the kernel config in order 
	to verify the integrity of the host, however if persistence is set to 
	ifcfg the configs aren't available and shouldn't be compared.

2017-02-26  Edward Haas  <edwardh@redhat.com>

	net: Small cleanup of  _add_network and _del_network
	Removed unused arguments and made netinfo argument non optional.

	This patch includes also some cleanup for config_network_test which had
	to change to adjust to the changes.

	net: Persist running config accross reboots
	Relocating running config from /var/run to /var/lib, making it persitent
	accross reboots.

	Running config represents a staging state, between the safe state
	and the actual/current state (read mainly from the kernel).
	As we have done so far, we assume that running config is in sync with
	the actual state.

	In future patches, we will aim to reduce running config content, leaving
	only the information needed to identify which components are owned by
	VDSM networking and possibly some additional metadata that cannot be
	persisted on the device level.

	net: Modify restore-net to remove nets using setupNetworks
	Overview:
	The network restoration flow has a step in which acquired devices which
	have been 'taken' by VDSM are restored.
	When a device is acquired by VDSM, it is backed up, allowing later
	rollback. The backed up data is cleared on setSafe or in case a
	restoration is performed.

	Problem:
	When restoring in this step, an existing network (or partial network) is
	removed by the underlying ifcfg configurator, but not through the proper
	API.

	Therefore, in such a scenario:
	Clean host -> setupNetworks(add A) -> restore-net
	(note that setSate() is missing)
	Network A will be removed using ifcfg backup restoration flow without
	issuing a setupNetworks(remove A).

	One outcome of the missing proper removal of the network is that its
	leftovers remain in the libvirt db.

	This patch changes the restore flow such that it first removes extra
	networks/bonds (which do not appear in the persisted config, but do
	appear on the host) and only then attempts to restore the acquired
	devices.

	net: Expose an existing bug in network restoration
	This patch exposes a bug that exists in the network restoration flow
	but was missed due to a missing step in one test and a missing
	assertion.

	testVolatileConfig test now simulates a reboot by deleting the running
	config (which resides under /var/run/).
	In addition, the assertNetworkDoesntExist assertion should also check
	against the libvirt DB, assuring no leftovers are left there.

	In the next patch this scenario will be solved, passing the failing
	testVolatileConfig functional test.

2017-02-25  Edward Haas  <edwardh@redhat.com>

	net: restore-net now remove nets/bonds that are not safe persisted
	On network restoration, there may be exist nets and/or bonds on the host
	but not in the safe persisted config. For such cases, these extra
	nets/bonds sould be removed, syncing with the safe persisted config.

2017-02-25  Irit Goihman  <igoihman@redhat.com>

	storage: move dispatcher to lib/vdsm/storage

2017-02-24  Milan Zamazal  <mzamazal@redhat.com>

	virt: Raise NoSuchVM instead of returning error codes

2017-02-24  Douglas Schilling Landgraf  <dougsland@redhat.com>

	ngn: grab OS version according with /etc/os-release
	Currently, OS version can be extracted from
	RPM naming like: redhat-release-server-7.3-6.el7.rpm, in this case:

	version: 7.3, release 6.el7

	However, for NGN systems, redhat-release-server rpm is not available,
	only ovirt-release-host-node and redhat-release-virtualization-host.
	Based on that, this patch extract version from /etc/os-release (VERSION_ID).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1368364

2017-02-23  Dan Kenigsberg  <danken@redhat.com>

	storage: move storage_mailbox to lib/vdsm/storage/mailbox.py

2017-02-23  Leon Goldberg  <lgoldber@redhat.com>

	net tests: skip test_setupNetworks_on_external_vlaned_bond with ifcfg persistence
	vdsm-stone-net-config deletes netconfback content and so restoration
	of the externally created bond as it is only stored in netconfback
	at ifcfg persistence.

2017-02-23  Milan Zamazal  <mzamazal@redhat.com>

	virt: Raise MigrationInProgress instead of returning errors

2017-02-23  Nir Soffer  <nsoffer@redhat.com>

	sp: Mark helper method as @unsecured
	In commit 7cf19dafd7cd (storage_mailbox: make inbox/outbox mailbox
	args), we added a helper that is used before the spm is started, but the
	helper was not marked as @unsecure. This cause the call to fail with:

	    File "/usr/share/vdsm/storage/sp.py", line 485, in __createMailboxMonitor
	        outbox = self._master_volume_path("inbox")
	      File "/usr/lib/python2.7/site-packages/vdsm/storage/securable.py",
	    line 77, in wrapper
	        raise SecureError("Secured object is not in safe state")
	    SecureError: Secured object is not in safe state

	As this helper doesn't change the state of the storage pool, there is no
	reason to treat it as a secured method, which is the default for this
	class.

2017-02-22  Dan Kenigsberg  <danken@redhat.com>

	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.

	storage_mailbox: make inbox/outbox mailbox args
	This makes it possible to disentagle mailbox from sd.py

2017-02-22  Maor Lipchuk  <mlipchuk@redhat.com>

	amend: Add a test when qemuimg amend fails.

2017-02-22  Liron Aravot  <laravot@redhat.com>

	lvm: enabling movePV()
	movePV() execution in vdsm because of lvmetad issue caused the execution
	to return before it was actually completed.

	After the issue was resolved by disabling lvmetad in change
	If0e34efbcb2d8c, we can enable the usage of movePV().

	Bug-Url: https://bugzilla.redhat.com/1403839

2017-02-22  Shmuel Melamud  <smelamud@redhat.com>

	virt: Add virt-sysprep support
	virt-sysprep erases all host-specific configuration from the filesystem:
	SSH keys, UDEV rules, MAC addresses, system ID, hostname etc., thus
	making easy to use a VM as template without manual intervention.

	This patch introduces virt jobs - a new subclass of host jobs designed
	to perform virt operations. Jobs infrastructure allows to register
	virt jobs, so the Engine may query their status.

	Currently each virt job is run in a separate thread. Scheduler for virt
	jobs may be added later.

	Bug-Url: https://bugzilla.redhat.com/1335642

2017-02-22  Irit Goihman  <igoihman@redhat.com>

	vdsmapi: get method description
	getting the method description is useful for providing
	vdsm-client help based on the schema.

	usage:

	    from vdsm.api import vdsmapi
	    schema_paths = [vdsmapi.find_schema()]
	    schema = vdsmapi.Schema(schema_paths, False)

	    schema.get_method_description(vdsmapi.MethodRep("VM", "create"))
	        'Create a new virtual machine.'

	    schema.get_method_description(vdsmapi.MethodRep("Host", "getCapabilities"))
	    'Get host capabilities.'

2017-02-21  Simone Tiraboschi  <stirabos@redhat.com>

	he_upgrade: add commands for 3.5 -> 3.6 upgrade with jsonrpc
	Bug-Url: https://bugzilla.redhat.com/1425233

2017-02-21  Milan Zamazal  <mzamazal@redhat.com>

	virt: Use helper functions to find devices
	Refactoring of device lookup in vm.py to remove duplicate code and to make some
	cleanup.

2017-02-21  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: avoid over allocation in lvs
	While provisioning gluster bricks, 16GB or 0.005% is reserved
	for thin pool meta data. But lvs is created with actual disk size.
	It results in over allocation of LV than what is available in
	thinpool. This configuration can lead to storage corruption when
	thinpool is fully utilized and xfs thinks still there is a space in lv.

	Fixing this issue by avoiding over allocation. Now thin lv
	will be created with the size same as thin pool without
	over commiting.

	Bug-Url: https://bugzilla.redhat.com/1412455

2017-02-21  Francesco Romani  <fromani@redhat.com>

	tests: migration: add test to exercise retry
	Due the shape of the code, it is hard to test the migration
	retry logic, we require a good chunk of boilerplate and faking.

	This patch tries to be minimal and add those tests.

	Related-To: https://bugzilla.redhat.com/1414626

2017-02-21  Irit Goihman  <igoihman@redhat.com>

	vdsm: update man page
	updated reference to vdsm wiki and the updated license
	file.

2017-02-20  Irit Goihman  <igoihman@redhat.com>

	runvm: migrate to new vdsm client
	jsonrpcvdscli is deprecated and should be replaced with the
	new vdsm client.

2017-02-19  Irit Goihman  <igoihman@redhat.com>

	caps: silence pylint distutils errors
	pylint throws these errors:
	E:218, 4: No name 'version' in module 'distutils' (no-name-in-module)
	E:218, 4: Unable to import 'distutils.version' (import-error)

	It happens because distutils version is created dynamically
	and not being recognized by pylint.
	It's also a good practice to import modules and not member
	from modules so the import statement now imports version
	module and not a member from 'version'.

2017-02-19  Edward Haas  <edwardh@redhat.com>

	net: restore-net greedy setup small refactoring
	Simplify the greedy setup networks code to allow in the next patches to
	include greedy remove networks.

2017-02-18  Francesco Romani  <fromani@redhat.com>

	virt: move metadata constants in xmlconstants
	Preparation for the metadata.Instance class addition.
	Only code movement + trivial rename.

2017-02-18  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	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.

	api: ignore generated html

2017-02-17  Milan Zamazal  <mzamazal@redhat.com>

	jsonrpcvdscli: Add deprecation comment
	So all of us know that it shouldn't be touched anymore.

2017-02-17  Francesco Romani  <fromani@redhat.com>

	virt: storage: validate iotune params on update
	The current storage.Drive code does attribute validation
	and sanity check at the beginning of the getXML() method.
	This is quite late in the game.

	The right place to do validation is before setting the new values.
	Since we just refactored the `iotune` access, we move this check
	in the mutator (property setter).

	API: modernize VM methods
	This patch adds the wrapping using @api.method around most VM methods.
	It also refactors how VM instances are obtained, saving quite a lot
	of repetitive boilerplate code.
	Few VM methods are left out, and those are the one which have special
	cases which could not be trivially refactored yet.

2017-02-16  Irit Goihman  <igoihman@redhat.com>

	JsonRpcTest: add a test for client notify

2017-02-16  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	m2c: reduce log level for ssl errors
	m2crypto tends to be verbose when a client closes connection. I tested
	this behavior using ssl debug and noticed that those error messages are
	harmless. They only appear when using m2crypto. We want to reduce
	confusion so it is better to log those in debug.


	Bug-Url: https://bugzilla.redhat.com/1412583

2017-02-16  Francesco Romani  <fromani@redhat.com>

	tests: avoid to return lambda
	The MockedProxy (which looks more like a fake) in device_test
	may return a lambda. This will lead to a ETree serialization error,
	should the XML be needed in the test code.

	This doesn't actually trigger because we never need to recover
	the device state, but it is wrong anyway, so this patch removes
	the lambda to avoid future headaches.

	tests: network: fix brokentest
	We fix test_interface_update adding the missing device parameter.
	Now the test completes correctly, so it is unmarked broken.

	tests: uncover test_interface_update is broken
	We have a silently broken test. device_tests.test_interface_update is
	broken because the success condition was too lax.

	The test was deemed succesfull if the update XML is *sent* to the
	fake libvirt domain, but this is just part of the flow.
	The test actually fails just later when attempting to do port mirroring.
	We do not have port mirroring, so the method is supposed to exit
	quickly; but it fails right at the beginning, while checking what to do.

	Since this test is checking the whole flow, and not just the XML update,
	this means the test is broken.

	This patch adds:
	1. one check uncovering the real status of the test
	2. the @brokentest decorator to signal this without breaking CI.

2017-02-16  Fred Rolland  <frolland@redhat.com>

	hooks: prevent VM migrate with local disk hook
	The migration of a VM configured to use local disks is prevented as the
	disks are not available on other hosts.

2017-02-16  Francesco Romani  <fromani@redhat.com>

	vm: storage: avoid pointless XML processing
	Vm.setIoTune() used to
	1. extract the current ioTune settings from the device XML
	2. update the device XML - just before to recreate it

	Point #2 was pointless and wasteful, and point #1 was cumbersome
	and error prone.

	It is responsability of the storage.Device class to return its
	up-to-date ioTune settings; how it stores them, how it makes the
	XML representation consistent and how it manage its state
	are all implementation details which must be kept private.

	This patch makes the vm.py code use the helpers introduced into
	the parent patch, separating the responsabilities, reducing the
	coupling, avoiding pointless (and misleading) work.

2017-02-16  Liron Aravot  <laravot@redhat.com>

	getVGInfo - updated pv information
	When executing getVGInfo we aren't guaranteed that the cache data
	is up to date as the cache isn't synchornized between the dc hosts
	while getVGInfo is a HSM operation (and therefore can be executed on any
	of the hosts).
	This patch adds refresh of the vg and its pvs when executing getVGInfo.

	Bug-Url: https://bugzilla.redhat.com/1414862

2017-02-16  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: move vdsmapi to lib
	We are going to move all the files from lib/api to lib/vdsm/api.


	Bug-Url: https://bugzilla.redhat.com/1376116

2017-02-16  Edward Haas  <edwardh@redhat.com>

	net: Remove unused property from Configurator (_libvirtAdded)

2017-02-16  Irit Goihman  <igoihman@redhat.com>

	yajsonrpc: client should support notify event
	JsonRpcClient used to send only Requests containing
	commands and receive repsonses and events.
	Now, it's able to send events as well using `notify`
	function.

2017-02-15  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: handle requests to abort non-existing process
	In situations when a child job fails to start properly (often due to
	some internal vdsm problem) we would then raise an AttributeError
	exception when trying to _abort() the job. This is because the _proc
	attribute is None.

	It is wiser not try to abort the process at all if there's nothing to
	abort.

2017-02-15  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Refactor name vmchannels.{,LEGACY_}DEVICE_NAME
	Bug-Url: https://bugzilla.redhat.com/1405378

	virt: Configurable name for guest agent channel
	The channel name com.redhat.rhevm.vdsm for the communication
	with the guest agent has been deprecated in favor of naming it
	aligned with the upstream project name.

	Since there is still the possibility that the legacy channel
	name is still required, it will be now the responsibility of
	the VM creator (caller of the VM.create API call) to specify
	the name of the channel.

	Bug-Url: https://bugzilla.redhat.com/1405378

	virt: Identify new VDSM VMs by metadata
	use metadata to identify oVirt VMs instead of obscure guest agent
	channel device name

	Bug-Url: https://bugzilla.redhat.com/1405378

2017-02-15  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: decode capacity units from OVA
	When importing from OVA, we mistakenly assume that the disk capacity is
	always stored in GB. This is untrue and can mean that the disk capacity
	reported to engine is incorrect. This can is some cases cause the import
	to fail on storage errors because engine tries to prepare image in
	orders of magnitude larger than is necessary.

	The correct units of the ovf:capacity attribute are stored in
	ovf:capacityAllocationUnits attribute. The correct flow is to parse the
	units and then properly scale the reported capacity.

	Parsing routine was introduced that decodes the programatical units. The
	routine is intentionaly kept simple. It does not decode all possible
	values described in specification and focuses only on values we can
	expect in OVA/OVF.

	Bug-Url: https://bugzilla.redhat.com/1422087
	Backport-To: 4.1

2017-02-15  Francesco Romani  <fromani@redhat.com>

	virt: drop iteritems()
	We use iteritems() inside virt modules, and this prevents
	easy forward compatibility with python3, also for client modules, like
	metadata_test.py.

	In this case we use only some functionalities of the vmxml module, but
	the run under python3 fails just because of iteritems().

2017-02-15  Nir Soffer  <nsoffer@redhat.com>

	localdisk: Use sparse images for lvmthin backend
	qemu-img convert writes holes using BLKZEROOUT ioctl; and thin lvs
	implement this by allocating blocks and feeling them with zeros. This
	cause a thin lv to be fully allocated after creating local disk.
	https://bugzilla.redhat.com/835622.

	LVM thin pool zeros allocated blocks by default, so we can safely seek
	over holes in files instead of writing zeros, using dd conv=nosparse
	option.

	For "lvmthin" backend, we copy images now in two steps:

	1. Covert image to raw sparse file in /var/tmp
	2. Write sparse file to lv using dd

	The system administrator must provide enough space in /var/tmp or image
	conversion will fail.

	Here is a 40G pool with 3 20G disks:

	    # lvs -o name,attr,size,data_percent ovirt-local
	    LV                                   Attr       LSize  Data%
	    029060ab-41ef-4dfd-9a3e-4c716c01db06 Vwi-aotz-- 20.00g 6.72
	    7aed605e-c74c-40d8-b449-8a1bf7228b8b Vwi-aotz-- 20.00g 6.98
	    ce6d08d3-350f-4afa-a0e7-7b492a1a7744 Vwi-aotz-- 20.00g 6.86
	    pool0                                twi---tz-- 40.00g 10.28

	Here is example timings for creating a VM using localdisk hook on my
	development setup. These numbers represent the trends, using real hosts
	with decent networking and real storage should be much faster.

	Copying 20G empty image using lvmthin backend:

	- nfs v4.2 thin[1]:   2.7 seconds
	- nfs v4.1 thin:      201.2 seconds
	- iscsi thin:         2.7 seconds
	- iscsi preallocated: 208.4 seconds

	The next timings show the time to copy a disk based on a template. This
	is the delay when starting a VM based on a template.

	Copying 1.7G qcow2 template using lvmthin backend:

	- nfs v4.2 thin[1]:   49.4 seconds
	- nfs v4.1 thin:      50.6 seconds
	- iscsi thin:         43.8 seconds

	Copying 1.7G raw template using lvmthin backend:

	- nfs v4.2 thin[1]:   226.5 seconds
	- nfs v4.1 thin:      242.6 seconds

	[1] Using POSIX domain with custom mount options.

	localdisk: Rename lvm-thin to lvmthin
	Using "lvmthin" engine display a easy to use pop up menu instead of an
	error prone text box.

2017-02-15  Fred Rolland  <frolland@redhat.com>

	hooks: support thin LVM on localdisk
	This patch adds support for thin LVM as backend for the localdisk hook.

	In order to use thin LVM, the system operator needs to create a thin
	pool named "pool0" in the "ovirt-local" volume group.

	In addition, the VM custom property of 'localdisk' should be set to
	"lvm-thin".

2017-02-14  Dan Kenigsberg  <danken@redhat.com>

	virt-net: attempt to unset port mirroring only if the VM was properly initialized
	If qemu crashed before we read the libvirt-allocated device names, the
	VM moves to Down state. However, when we are asked to destroy() the VM
	object, we attempt to unset port mirroring on a vNIC that was never
	properly initialized.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1419931

2017-02-14  Leon Goldberg  <lgoldber@redhat.com>

	net: Generalize igb sriov driver bug workaround
	Generalize the workaround (https://gerrit.ovirt.org/#/c/71029/)
	to unrestorable virtual functions of igb, now handling a tuple
	of faulty drivers (currently consisting of igb and ixgbe).

2017-02-14  Francesco Romani  <fromani@redhat.com>

	vm: adapt to new clientIF.notify() API
	After change I08062950c3117f647944b4ff15c068853f29a463
	we need to update also the calling sites to make sure to avoid

	TypeError: notify() got an unexpected keyword argument '$VMID'

	please note that this is not just cosmetic/noise in the logs:
	it prevents VM to start.

	virt: storage: iotune property
	Add one property to the storage.Drive device to
	get and set the current ioTune settings.

	It is not business of the outside code where and how the storage.Drive
	stores its ioTune settings, so this patch makes this detail opaque.

2017-02-14  Irit Goihman  <igoihman@redhat.com>

	yajsonrpc: notify should get dict instead of kwargs
	notify will fail if kwargs contains the key 'event_id'.
	Better accept a dict with the notification details, and
	not a **kwargs.

2017-02-12  Irit Goihman  <igoihman@redhat.com>

	config: remove functional_jsonrpc_enable
	this configurable was introduced in commit 6fe59aa7 that
	added ability to run functional tests over jsonrpc.
	Since we removed support for xmlrpc we don't need a
	configurable for enabling jsonrpc, since it's the default (and only!)
	protocol now.

2017-02-11  Milan Zamazal  <mzamazal@redhat.com>

	virt: Set proper migration status in recovery
	Recovery currently doesn't check for migrations and that may confuse
	Engine.  For instance, a migrating HA VM on the source may end up in UP
	status (instead of MIGRATION_SOURCE) after recovery and Engine may
	interpret it as migration failure.  When the migration completes and
	Engine sees the VM down on the source before finding it on the
	destination, it may start it again on the source, resulting in split
	brain.

	So ignoring migrations in recovery is dangerous, even more with
	post-copy migrations.  This patch tries to identify migration states
	during recovery.  It's not a complete remedy, e.g. we don't start
	migration source thread (so we must ensure that we get out of
	MIGRATION_SOURCE state for that reason).  But we at least no longer lie
	to Engine about the VM status.

	The patch tries not to make things worse while making some things better,
	without the ambition to make everything working perfectly.  After some
	migrations that were recovered on Vdsm startup and then failed, it may happen
	that the migration failure is not detected and the VM remains in the migrating
	status on the source.  We might need better cooperation from libvirt (sending
	proper events) or larger refactoring around the source thread to handle those,
	supposedly rare, situations.  But just another Vdsm restart should be a good
	enough remedy.  We may prepare more patches if it ever happens be a problem.

2017-02-11  Irit Goihman  <igoihman@redhat.com>

	functional tests: remove xmlrpc support
	This is the first step of moving functional tests to
	use the new vdsm client.
	So far tests were running using vdscli which is deprecated.
	After _JSONRPC_ENABLED was set to true, tests moved to JSONRPC
	so vdscli code is unnecessary.

2017-02-10  Edward Haas  <edwardh@redhat.com>

	net: QoS - preserve explicit default class link share
	This patch fixes 7446f9365bd3cf9bd55446281251be33aa6f16cb, default
	classes that have been explicitly set through a non-vlan network should
	not be overriden by the VLAN networks (sharing the same device).

	Bug-Url: https://bugzilla.redhat.com/1302020

	net test: Add net qos test to the new func tests.
	This patch mimics testSetupNetworkOutboundQos from the legacy func tests
	and adds it to the new functional tests.

	It also fixes a problem in the qos assertion.

	Note: the older functional test is not yet removed as it also tests the
	nic qos configuration after the network is removed. For that check, an
	integration test is in order (as the VDSM api does not report qos on
	nics, just on networks).

2017-02-10  Dan Kenigsberg  <danken@redhat.com>

	Revert "vdsm: remove 3.6 supported engine"
	This reverts commit 7a173cc62e5b0fc79ab68198c75896e4ac751a37

	I am not familiar with a specific bug showing up when Engine is 3.6 and
	host is 4.y. This combination is actually very important for
	hosted-engine upgrade from 3.6 to 4.1.

	We must test and support 3.6 Engine and 4.1 hosts, fix specific bugs
	that might pop up; not to disable this combination in its entirety.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1403846

2017-02-10  Francesco Romani  <fromani@redhat.com>

	tests: make vmfakelib independent from clientIF
	We don't actually need to subclass clientIF, except
	in clientIF tests proper.
	This removes one useless dependency, making the tests
	less coupled.

2017-02-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make Memory device XML more complete
	Memory.getXML() doesn't identify the memory device completely.  This may in
	theory cause problems with memory hotunplug.  According to libvirt
	documentation, complete device definition is required for hotunplug.  Although
	the current definition is actually accepted, it doesn't identify the memory
	device uniquely.

	Assume there are two memory devices with the same size and on the same node.
	One of them can't be hotunplugged for some reason, e.g. it hasn't been onlined
	as movable, while the other one is fine.  However, if libvirt selects the first
	device on the hotunplug request then the second device can never be
	hotunplugged.

	This patch adds the missing information to the Memory device XML to make it
	uniquely identified and the information for libvirt complete.  Since the
	additional device attributes are not available before memory hotplug, they are
	inserted only if they are available.

	Backport-To: 4.1
	Bug-Url: https://bugzilla.redhat.com/1228543

	virt: Fix of NoSuchVM misspelling in memory hotunplug
	Bug-Url: https://bugzilla.redhat.com/1228543
	Backport-To: 4.1

2017-02-09  Dan Kenigsberg  <danken@redhat.com>

	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.

2017-02-09  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Fix of wrong exit code on host shutdown
	In case of a host shutdown previously we did not send the ERROR
	exit_code however NORMAL which was incorrect.
	Due to a bug in the ovirt-engine the behavior was coincidentally
	restored and the issue hasn't been uncovered during the implementation
	of the host shutdown detection.
	This patch will no ensure that the ERROR exit_code is sent on a detected
	host shutdown.

	Backport-To: 4.1
	Bug-Url: https://bugzilla.redhat.com/1341106

2017-02-09  Fred Rolland  <frolland@redhat.com>

	hooks: Add localdisk hook
	This hook add the ability to use fast local storage instead of shared
	storage, while using shared storage for managing VM templates.

	A user will create a VM normally on shared storage of any type.
	To use the VM with local storage, the user will have to pin the VM to a
	certain host, and enable the localdisk hook.

	When starting the VM on the pinned host, the localdisk hook will copy
	the VM disks from shared storage into the host local storage, and modify the
	disk path to use the local copy of the disk.

	The original disk may be a single volume or a chain of volumes based
	on a template. The local copy is a raw preallocated volume using a LVM
	logical volume on the special "ovirt-local" volume group.

	Most operations are not supported on a VM using the localdisk hook.
	For example, the VM cannot be migrated to another host, cannot create
	snapshots, copy the local disk to other storage, etc.

	An LV tag "UPDATING" is used to make sure that the copy operation
	succeeded.

	Here a description of the hook flow:
	- If a matching local LV exists without the "UPDATING" tag:
	  - activate the LV
	  - update the disk path and format and return.
	- If no matching local LV exists:
	  - create a new LV with "UPDATING" tag.
	  - copy the data from the shared storage disk/template.
	  - once the copy operation is done, remove the "UPDATING" tag.
	  - update the disk path and format and return.
	- If a matching local LV exists with the "UPDATING":
	  - delete the LV
	  - create a new LV with "UPDATING" tag.
	  - copy the data from the shared storage disk/template.
	  - once the copy operation is done, remove the "UPDATING" tag.
	  - update the disk path and format and return.

2017-02-09  Nir Soffer  <nsoffer@redhat.com>

	after_disk_prepare: Add new hook point
	Add new after_disk_prepare hook point, called after preparing a vdsm
	image. If the hook modifies the path to the image, vdsm will use the new
	path.

	This hook point is required for the new localdisk hook. The hook will
	copy a disk from shared storage to local host storage, practically
	pinning a VM disk to the host.

	The hook is supported only when preparing images when starting a vm.
	Other flows preparing drives are not supported.

	A hook can use hooking.read_json() to get a dict with the disk
	info in this format:

	{
	    "disk": {
	        "device": "disk",
	        "domainID": "17827a49-c2fd-479a-bc63-8d2a73e1d42f",
	        "format": "cow",
	        "imageID": "8988df9b-5d5b-445c-8150-26bbccc020dd",
	        "path": "/path/to/disk",
	        "volumeID": "143e2e28-b2bb-42d4-93c6-835368d3d0ae"
	        ...
	    }
	}

	See the VmDiskDevice in vdsm schema for the complete contents of the
	disk info dict.

	The VM uuid and custom properties are available via environment
	variables.

	If the hook wants to change the disk, it must write the modified disk
	info using hooking.write_json(). Vdsm will use the modified disk as
	returned by the hook instead of the original disk.

	Here is an example hook using this hook point:

	    #!/usr/bin/python2
	    import os
	    import sys
	    import hooking

	    if "hookname" not in os.environ:
	        sys.exit(0)

	    disk = hooking.read_json()
	    disk["path"] = "/no/disk/for/you!"
	    hooking.write_json(disk)

	Hooks using this hook point must be installed in:

	    /usr/libexec/vdsm/hooks/after_disk_prepare/

	xmlrpc: Fail xmlrpc requests
	As first step in xmlrpc removal, override POST handler to send an error
	for any xmlrpc request. We belive that all xmlrpc users were fixed to
	use jsonrpc, but it we are wrong it will be easy to revert this patch.

2017-02-08  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Replace commands.watchCmd with operation
	qemuimg.rebase() returns now an operation object, similar to convert()
	and commit(). The caller should run the returned operation. To abort the
	operation, the caller can call the operation.abort() method, instead of
	passing "stop" argumnet to qemuimg.rebase().

	The return operation object is little different from QemuimgOperation.
	We have another patch for unifying the interfaces of the operations.

	operation: Start storage operation module
	This module provide the Command class, used to run simple storage
	commands that may take lot of time and may need to be aborted.  This is
	a thread-safe python 3 compatible replacement for commands.watchCmd.

	Example usage - legacy SPM tasks:

	    op = operation.Command(
	        ["/usr/libexec/vdsm/fallocate", "10737418240", vol_path])
	    with vars.task.abort_callback(op.abort):
	        op.run()

	Example usage - storage jobs:

	    self.op = operation.Command(
	        ["/usr/libexec/vdsm/fallocate", "10737418240", vol_path])
	    self.op.run()

	Storage jobs supporting abort will invoke self.op.abort().

	The command will run by default on all cpus, using high nice value, and
	idle ioclass. If the command fails, cmdutils.Error is raised.

	Progress reporting is not supported yet.

2017-02-07  Ala Hino  <ahino@redhat.com>

	clientIF: libvirt events logging
	When logging libvirt events, show event name instead event id.

2017-02-07  Barak Korren  <bkorren@redhat.com>

	Freeze version of python2-crypto in check-merged
	Newer version of python2-crypto break python2-paramiko which is required
	by Lago.  This patch adds an EPEL snapshot that contains an older
	version of python2-crypto and tries to enforce installing the older
	version to make Lago work.

	This patch also removes the link to EPEL in the *.repos file because
	EPEL is provided natively by Standard-CI

2017-02-07  Dan Kenigsberg  <danken@redhat.com>

	check-merged: give a significant name to lago_ovirt_http_pid

2017-02-07  Francesco Romani  <fromani@redhat.com>

	lib: do not use virt-prefixed logger for utilities
	The @api.method code was born in the virt vertical,
	but was later placed in the common area, hoping to be useful
	for other verticals and used across the codebase.

	However, it still incorrectly uses a virt-prefixed logger, and this
	is conflicting with its stated goal: this is no more virt-specific code.

	This patch replaces the 'virt' prefix with the 'vdsm' one.

2017-02-07  Dan Kenigsberg  <danken@redhat.com>

	check-merged: define a var as local
	bash's default is ugly. variables should be defined as local unless
	there's a good reason to expose them.

2017-02-06  Nir Soffer  <nsoffer@redhat.com>

	lvm-conf: Handle lvmetad failed state
	When configuring lvmetad, we stop the units. If the unit fail to stop
	after a timeout, systemd will kill the unit, and it will move to
	"failed" state instead of "stopped". This looks like a bug in systemd,
	since we just asked to stop the service, but it is possible that the
	service was in failed state before we stopped it, so we should support
	this.

	The current code will fail to start vdsm since vdsm-tool is-configured
	fails, and running vdsm-tool configure does not change the service
	state.

	Now we check that the unit is not "active" instead of "inactive".

	Bug-Url: https://bugzilla.redhat.com/1374545

2017-02-06  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: unbreak vdsm upgrade
	mark vdsm-cli as obsolete when upgrading vdsm.
	According to https://fedoraproject.org/wiki/Packaging:Guidelines
	in "Renaming/Replacing Existing Packages" section:
	In case a new package replaces an old one we should mark
	Provides: oldpackagename = $provEVR
	Obsoletes: oldpackagename < $obsEVR

	automation: replace snapshot repo with 'tested'
	tested repo provides more reliable dependencies, rather than
	the nightly snapshot.

2017-02-05  Nir Soffer  <nsoffer@redhat.com>

	vdsm-tool: Add lvm configurator
	This configurator masks, disables, and stops lvm2-lvmetad service and
	socket, and install vdsm managed lvmlocal.conf. The installed
	lvmlocal.conf is owned by vdsm and will be replaced automatically on
	upgrades, unless the system administrator has marked this file as
	private. Vdsm will not start now if lvmetad service or socket are not
	stopped and masked.

	Lvmetad was never compatible with ovirt clustered LVM solution. When we
	ported ovirt to EL7, we added the use_lvmetad = 0 option in vdsm command
	line lvm configuration (--config). Recently we discovered several issues
	with this approach, and LVM developers advice is to disable this
	service.

	This patch is the first step in solving lvm auto activation issues:

	1. All ovirt lvs are activated; during boot when using FC storage, and
	   after connecting to storage server when using iSCSI storage.
	2. Guest lvs created inside a VM using ovirt raw volume as a pv are
	   activated on a host. This prevent vdsm from deactivating ovirt lvs on
	   startup and when stopping a vm, and may lead to data corruption of
	   the stale lv later.
	3. Lvs on LUNs not used for storage domains are active on a host
	4. Some LUNs are not visible to vdsm because LVM activated lvs inside a
	   LUN's before multipath created the map.

	This patch solves issues 1 and 2 - auto activation of ovirt logical
	volumes and guest logical volumes inside ovirt raw volumes when using
	iSCSI storage. The lvs are activated because by default LVM is using
	event based activation via the lvmetad daemon. Disabling lvmetad
	disables event based auto activation.

	The patch does not solve issues 1 and 2 when using FC storage. These
	issues can be fixed only using LVM filter allowing LVM to access only
	the devices needed by the host. This filter must be generated on each
	host, depending on the particular devices needed by this host. We cannot
	do this as part of the automatic host deploy flow.  See
	https://gerrit.ovirt.org/70899 for more info on generating lvm filter.

	Note: We backup an existing lvmlocal.conf file, typically the example
	installed by LVM without any settings, and replace it with vdsm
	configuration. The system administrator should merge settings from the
	backup of the file manually if needed. This is the same way we handle
	multipath.conf. It would be better to merge the existing file with vdsm
	configuration, we need to explore this direction later.

	Bug-Url: https://bugzilla.redhat.com/1374545

	lvmlocal.conf: Remove devices filter
	We want to disable lvmetad on all installations and upgrades. For this
	we will add lvm configurator that install static lvmlocal.conf shipped
	with vdsm.

	This file cannot contain the blacklist filter, since adding such filter
	when the machine has a previous filter is not safe. This cannot be part
	of the vdsm-configure flow, since it will may fail vdsm installation or
	upgrade even if the user is not using lvm based storage.

	We should use a whitelist filter, that solve both the issue with guest
	lvs, ovirt lvs and direct luns. This filter will be generated per host
	and configured by a separate vdsm tool command, not part of the host
	deploy flows. See https://gerrit.ovirt.org/70899.

	Bug-Url: https://bugzilla.redhat.com/1374545

2017-02-05  Ala Hino  <ahino@redhat.com>

	clientIF: Change log level
	There are events that are fired by libvirt but are not handled.
	Currently, there is a warning about these events. This patch changes the
	warning to debug and enhance the logging message.

2017-02-05  Edward Haas  <edwardh@redhat.com>

	net: Modify bonding.permanent_address to use non filtered bonds
	Some minor modifications have been included in this patch on how
	/proc/net/bonding/* are parsed.

	net: Centralize permhwaddr report handling

	net: Drop bondings._active_slave function

2017-02-05  Dan Kenigsberg  <danken@redhat.com>

	check-patch: retire snapshot repo in favor of 'tested'
	We should test if a patch builds agains a set of known-good dependcies
	("tested"), rather than a random nightly snapshot.

	Hopefully, with this patch, check-patch would pass, as ovirt-imageio for
	fc25 is to be found in the currently-referred repository.

2017-02-04  Nir Soffer  <nsoffer@redhat.com>

	vm: Add or remove a lease when a VM is running
	Add the capability to plug or unplug a lease while a VM is running. This
	will be used to move the lease to another domain if the current domain
	need to be put in maintenance.

	I stole the vm property from https://gerrit.ovirt.org/61475 since it is
	too late to backport it to 4.1, and I fell too dirty to copy and paste
	the vm fetching code in the new verbs.

	Bug-Url: https://bugzilla.redhat.com/1408825

2017-02-03  Nir Soffer  <nsoffer@redhat.com>

	lease: Add lease.find_conf helper
	Add a helper to find lease conf dict in VM conf dict, similar to the
	helper from drives conf. This helper is needed when hot-unplugging lease
	device.

	Bug-Url: https://bugzilla.redhat.com/1408825

	lease: Implement lease.Device.is_attached_to
	When hot-unplugging a lease, we need to wait until the device is
	removed, so we must implement is_attached_to method.

	Implemented using the lease id and the domain id, which define the lease
	identity. Not clear if we should check also the lease path and offset,
	and how (impossible) mismatch should be handled.

	Bug-Url: https://bugzilla.redhat.com/1408825

	lease: Add lease.find_device helper
	Add a helper to lookup a lease device, similar to the helper for looking
	up drives. This will be needed to located a lease device when hot
	unplugging a lease.

	Bug-Url: https://bugzilla.redhat.com/1408825

	lease: Check for six.PY2 instead of six.PY3
	We used to check for six.PY3 for skipping the tests on python 3. This
	test may fail and run the tests on python 4, if python 4 will be
	released before we port the code to python 3.

	vm: Log device __repr__ instead of name
	When waiting for device removal, we assume that the device has a name,
	but lease devices do not have a name. Replace name with the device
	__repr__ implementation, providing more useful info, and supporting any
	device.

	Implement __repr__ for Drive and Interface devices so we get useful log
	when waiting for removal of these devices. Other devices will have the
	default __repr__ ("<ClassName object at 0x123456789>").

	Here are example __repr__ output:

	    <Drive name=hda, type=file, path=/block_path at 0x7f1a62934bb0>
	    <Interface name=, type=bridge, mac=macAddr at 0x7f1a6214a850>

	Bug-Url: https://bugzilla.redhat.com/1408825

2017-02-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Support for memory hotunplug
	With this patch we introduce support for DIMM based memory hotunplug.
	Memory hotunplug is not guaranteed to succeed (or fail) after any amount of
	time.  For that reason we introduce asynchronous device removal in this patch.
	We react to the libvirt event rather than waiting for possible success
	synchronously with some timeout.  Engine is supposed to detect contingent
	disappearance of the memory device in its regular device polling.

	Bug-Url: https://bugzilla.redhat.com/1228543

2017-02-03  Francesco Romani  <fromani@redhat.com>

	migration: add boolean to control retries
	We added logic to automatically retry migrations if the
	destination Vdsm is over capacity.
	The current logic uses the progress to learn if a retry must be
	attempted.
	For this purposes, it is just safer and clearer to add one new boolean
	value, to be set once migration actually started.
	This flag is never accessed concurrently, so we don't need a full-blown
	threading.Event object.

	We should never retry failed migrations without Engine's instructions,
	and with the old, progress-based code, that could mistakenly happen.
	With the new event-based code, we make sure this is not possible
	anymore.

	Related-To: https://bugzilla.redhat.com/1414626
	Backport-To: 4.1
	Backport-To: 4.0

	migration: make progress reporting reliable
	The rhbz#1414626 demonstrates some issues in our current progress
	handling. Since we use the progress also for logic inside the
	SourceThread class, this is a more serious issue than just showing
	a value.

	The first issue is that we update the progress percentage in two
	places: getStat(), just before reporting it, and finishSuccesfully,
	to make sure the progress is 100% after migration ended (rounding
	errors or missing updates may case it to stay at 99%).
	Unfortunately, getStat() can run concurrently to the migration code,
	so nothing prevents it from overwrite the value finishSuccessfully set.

	The second issue is more complex. First let's point out that
	there could be legitimate cases for progress going
	backwards. If a migration is stalling because the guess is making pages
	dirty too fast, the amount of data_remaining could increase.

	However, because both lack of guarantees about
	monotonic increase and the race on write, we could end up with
	progress = 99 after migration ended, and this could mistakenly trigger
	another migration attempt - which indeed happen in rhbz#1414626.

	The definitive fix for this harmful retry is provided in change
	Ie45553bf3ec3db76e520d11a68c67b5b9664dc32

	Bug-Url: https://bugzilla.redhat.com/1414626
	Backport-To: 4.1
	Backport-To: 4.0

2017-02-03  Nir Soffer  <nsoffer@redhat.com>

	confmeta: Add confmeta module
	This module handles configuration files managed by vdsm, using a
	metadata comments header.

	Example file:

	    # This file is managed by vdsm
	    # description...
	    #REVISION: 3
	    #PRIVATE: NO

	    file contents...

	Example usage:

	    >>> from vdsm.tool import confmeta
	    >>>> confmeta.read_metadata(path)
	    ConfigMetadata(revision=3, private=False)

	This module will be used to manage lvmlocal.conf file, and later will
	replace the system used to manage multiapth.conf.

	Bug-Url: https://bugzilla.redhat.com/1374545

2017-02-03  Milan Zamazal  <mzamazal@redhat.com>

	virt: Handle the result of switching to post-copy properly
	When migrateStartPostCopy fails, it raises an exception.  So we should catch
	the exception and not examine the result.

	Backport-To: 4.1

2017-02-02  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: change protocol to tlsv1.2
	In order to support v1.2 we need to update the protocol version to
	'sslv23' which supports the most protocols [1] and it is supported by
	ssl and m2c.


	[1] https://docs.python.org/2/library/ssl.html#socket-creation

	Bug-Url: https://bugzilla.redhat.com/1412552

2017-02-02  Fred Rolland  <frolland@redhat.com>

	storage: cleanup logs on new domain flow
	When adding a new storage domain, the flow verifies that
	the provided UUID does not exists.
	In order to validate this, all domain types searching algorithms are
	used.

	During the flow, some logs were printed in ERROR or WARNING level, even in the
	positive scenario.

	In order to clean the logs from unneeded noise, the following changes
	were made:

	lvm.py - remove unneeded warning, failure to get a vg is expected
	         when the vg does not exist, and we raise an exception in this case
	sdc.py - remove duplicate logs about searching for an unfetched domain
	sdc.py - looking for an unfetched domain is not an error, this is a normal
	         condition when creating  a storage domain
	sdc.py - if an unfetched domain is not found we raise, so we must not log
	         the exception. This leads to logging the same exception twice.

	Bug-Url: https://bugzilla.redhat.com/1223538

2017-02-02  Edward Haas  <edwardh@redhat.com>

	net: Introduce bond properties and refactoring options handling
	Bond properties are introduced, acting as a superset of bond options.
	Bond options are properties that affect bond operation and can be
	modified, where the properties include the options and other
	informative details (read only ones).

	The existing options handling has been adjusted to fit the new
	introduced properties with an aim to simplify and remove duplication.

2017-02-01  Leon Goldberg  <lgoldber@redhat.com>

	net: Extracting SRIOV functionality
	Extracting SRIOV functionality from api to a separate module.

	net: modify VF MAC addresses on creation to a valid address
	When a guest releases an SR-IOV virtual function, the virtual function's
	previous MAC address is being restored in host. There is currently an
	unresolved bug in igb driver's where it fails to reallocate the virtual
	function back to the host as it doesn't accept the factory (00:00:00:00:00:00)
	MAC address.

	Until the issue is resolved on the driver level, this patch implements
	a hack modifying the VF's MAC addresses on creation to valid addressess that
	will be accepted upon reallocation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1410076

2017-02-01  Idan Shaby  <ishaby@redhat.com>

	fileSD: escape values passed to glob.glob
	Since glob treats *, ?, and values between [] as special characters, we
	need to first escape the string before passing it to glob.
	Since this patch escapes the string in such cases, it also fixes the bug
	where an IPV6 address is treated as a character range.
	For example: "[201::1]:/path" will now be first escaped to
	"[[]201::1]:/path" and only then passed to glob.

	Bug-Url: https://bugzilla.redhat.com/1302358

2017-02-01  Nir Soffer  <nsoffer@redhat.com>

	tests: add tests for file domains' lookup
	This patch adds some tests for file domains' lookup, plus one failing
	test for ipv6 mount, which will be fixed in the next patch.

	Related-To: https://bugzilla.redhat.com/1302358

2017-02-01  Dominik Holler  <dholler@redhat.com>

	net: link.bond - handling of arp_ip_target
	Reading: To enable an unified handling of all bonding options,
	the bond option arp_ip_target is internally converted in the
	representation which is accepted by the ifcfg-bond* files.
	In details, the bond option arp_ip_target could contain multiple
	values, which are separated by space in
	/sys/class/net/%s/bonding/arp_ip_target.
	Separate this values inside vdsm by comma, to enable an unified
	handling for all bonding options.

	Setting: Enable the bond option arp_ip_target to be set by
	BondSysFS.set_options.  Adding and removing values by writing to
	/sys/class/net/%s/bonding/arp_ip_target requires a command-like
	interface. Extend link.bond to handle this interface.

	Add an unit and a functional test for setting and reading
	arp_ip_target.

	Bug-Url: https://bugzilla.redhat.com/1412563

2017-02-01  Edward Haas  <edwardh@redhat.com>

	net: vlan@bond config with ifcfg requires hwaddrs sync check
	Bonds are expected to inherit one of its slaves mac address, but in some
	cases (mainly when its slaves are detached temporary) the bond is left
	with its own generated address. In such scenarios, a VLAN which may be
	configured over it will inherit its temporary address and stick with it.
	At the time the slaves re-attach to the bond, the VLAN interface will
	not have the same address as the bond.

	This has been identified as a problem when adding a network over an
	existing vlan@bond NM setup.

	With this patch, when the ifcfg configurator attempts to configure
	a vlan over a bond, it will check post the ifup if the slave-bond-vlan
	mac addresses are in sync.
	In case they are not, the vlan is taken down (ifdown) and recreated.

	Bug-Url: https://bugzilla.redhat.com/1414323

	net test: Add network over a configured NM bond+vlan.
	Includes checks of hwaddress (mac) between the bond, vlan and
	the bridge (requiring them to be identical).

2017-02-01  Irit Goihman  <igoihman@redhat.com>

	JsonRpcTests: add test for client subscribe

	JsonRpcTests: add dest parameter to constructClient
	In order to support new subscription tests, constructClient
	should get destination parameter, allowing to add more
	subscriptions.

2017-02-01  Shahar Havivi  <shaharh@redhat.com>

	tests: add optional username test to kvm2ovirt
	kvm2ovirt have optional username and password,
	adding test to cover missing username and password

2017-02-01  Shmuel Melamud  <smelamud@redhat.com>

	virt: Added 'prepared' context manager
	Added context manager to prepare a group of objects (for example, disk images)
	for an operation. Each images must implement prepare() and teardown() methods.

	When entering the context, all images are prepared in the order they are
	passed. When exiting the context (or upon error) the images are torn
	down in reverse order. If an exception was raised inside the context,
	that exception will be propagated regardless of any exceptions that may
	be thrown by teardown() methods.

	Usage example:

	with prepared(images):
	    do_some_operation(images)

2017-02-01  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: fix integration tests
	This patch fixes an issue with integration tests which are not part of
	general build process, getting the following error:
	AttributeError: '_DummyBridge' object has no attribute 'dispatch'
	We use to use __getattr__ method but we replaced
	it with dispatch not to swap '.' with '_'.

	Related-To: https://gerrit.ovirt.org/53472

2017-02-01  Dominik Holler  <dholler@redhat.com>

	net: Enable bond to handle empty defaults for options
	If an option of a bonding is not touched during setting the options
	of the bonding, the option is reset to its default value, even if the
	default value is empty.

2017-02-01  Irit Goihman  <igoihman@redhat.com>

	jsonRpcTests: add missing event schema
	doubleResponse test is failing because of missing
	event schema in bridge object.

	JsonRpcClient: add subcribe and unsubscribe
	Until now, we were only able to send jsonrpc commands
	in request queue and get responses in response queue.
	Now we are able to subscribe/unsubscribe to/from specific
	queue and receive notifications.

2017-01-31  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	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/6ffc9561a6cf3b5e1f4002d5cd2beef69023df56


	Bug-Url: https://bugzilla.redhat.com/1414075

2017-01-31  Irit Goihman  <igoihman@redhat.com>

	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.

	jsonrpcvdscli: pop timeout before preparing args
	We get this error every time we add custom timeout:
	Following parameters [u'_transport_timeout'] were not recognized.

	_transport_timeout is no a command parameter but an indicator to
	change default timeout to a new value.
	So, it shouldn't be added to params and should be removed from kwargs
	before that.

2017-01-30  Idan Shaby  <ishaby@redhat.com>

	compat: add glob.escape from Python 3.6
	glob.escape was added in Python 3.6.
	Since we need it for escaping values that are passed to glob.glob,
	this patch adds it to glob.py.

	Related-To: https://bugzilla.redhat.com/1302358

2017-01-30  Leon Goldberg  <lgoldber@redhat.com>

	net: Set and report device mac address through link.iface

2017-01-30  Irit Goihman  <igoihman@redhat.com>

	check-merged: unbreak network functional tests
	network functional tests are running setupNetworks using
	jsonrpcvdscli.
	This results in JsonRpcNoResponseError, which means the operation
	takes too long and we receive a timeout before we get a response back.
	jsonrpc timeout was changed for all setupNetworks calls in tests,
	ensuring the commands will finish before the short timeout.

2017-01-30  Ala Hino  <ahino@redhat.com>

	Cold Merge: Deprecate mergeSnapshots vreb
	In 4.1, a new cold merge flow is introduced. For more details, refer to
	commit f3d0a2ce (Cold Merge: Introduce cold merge related verbs). This
	patch deprecates the old cold merge verb, mergeSnapshots.

2017-01-30  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	ssl: trust ipv6 localhost addresses
	compare_names trusts connections from localhost regardless of the
	certificate presented by them. This should take place with ipv6 and ipv4
	alike.

	This patch adds ipv6 local addresses to the trusted set.

	Bug-Url: https://bugzilla.redhat.com/1412550

2017-01-30  Dan Kenigsberg  <danken@redhat.com>

	sslutils: _compare_names: fix arg names and add tests
	_compare_names needs to return True if the TCP stream originates from a
	source address that matches the certificate presented by the client.
	This patch makes the method args clearer. Since the method does not need
	to use `self`, it is declared a @staticmethod. Tests are added to
	document its expected behavior and make sure the behavior is maintained
	in a following patch.

2017-01-30  Maor Lipchuk  <mlipchuk@redhat.com>

	amend_volume: Prepare the entire volume chain on amend.
	When calling qemu-img amend on a QCOW volume based on a block storage
	all the backing files should be prepared as well so their LVs will be
	activated for the command to succeed.

	Therefore this patch fixes the issue that was introduced in patch
	https://gerrit.ovirt.org/#/c/68987
	and prepare the volume by initializong the justme flag as false.

	Bug-Url: https://bugzilla.redhat.com/1417460

2017-01-29  Irit Goihman  <igoihman@redhat.com>

	automation: add missing python-dateutil package
	patch https://gerrit.ovirt.org/#/c/69846 added
	python-dateutil to jenkins jobs but some jobs
	weren't updated: check-patch-fc24 and build-artifacts-fc24

	We must keep fc24 build workable until
	https://gerrit.ovirt.org/#/c/71246/ is merged or our fc25 build
	is otherwise fixed.

2017-01-29  Nir Soffer  <nsoffer@redhat.com>

	exception: Add context to some virt errors
	Change NoSuchVM and MigrationInProgress to inherit from
	ContextException, so we can raise these errors with context in new code
	for plugging and unplugging leases.

	Nobody is raising these errors yet, since virt code is still using the
	define module, using same instance of the exception for all errors.

	Bug-Url: https://bugzilla.redhat.com/1408825

	tests: Remove last assertEquals instance
	We recently replaced all assertEauals, with assertEqual, but after that
	new patch sneaked in another instance.

	tests: Ensure that nobody uses assertEquals
	assertEquals is depracated, we should use assertEqual instead.
	See https://docs.python.org/2/library/unittest.html#deprecated-aliases

	exception: Add ContextException
	VdsmExcpetion subclasses generate unhelpful error messages with no
	context about the error, making debugging harder on both vdsm and its
	clients.

	GeneralException attempts to improve this by adding *value argument, and
	rendering the value with the message, but this create unclear error
	messages:

	    Storage pool not connected: ("d607ab66-6733-4ab4-9dcd-32e7fe61fa87",)

	Some exceptions are overriding __init__ to add specific arguments and
	formatting; this creates better messages, but it does not scale.

	This patch adds a new ContextException with a reason and **kwargs
	arguments.  The arguments are stored into a context dict, and formatted
	with the static message.

	Example usage:

	    raise HotplugLeaseFailed(reason="Not hot enough", temperature=42)

	Would render this message:

	    Failed to hotplug lease: {"reason": "Not hot enough", "temperature": 42}

	The real error should include more useful information, like the lease
	details and the error message from libvirt.

	When all exceptions are converted to use ContextException, we can merge
	it back into VdsmException.

	https://bugzilla.redhat.com/1408825

2017-01-26  Nir Soffer  <nsoffer@redhat.com>

	dockerfile: Add missing python3-dateutil
	Fedora 24 image was missing the python3-dateutil package, failing the
	travis builds.

2017-01-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	check-merged: Removed an hack flag in lago reposetup call
	Fixed since lago v0.33

2017-01-26  Francesco Romani  <fromani@redhat.com>

	spec: bump QEMU requirement
	Consume the fix for rhbz#1408122

	Bug-Url: https://bugzilla.redhat.com/1408230
	Backport-To: 4.1
	Backport-To: 4.0

2017-01-26  Irit Goihman  <igoihman@redhat.com>

	yajsonrpc: silence import-error
	when running pylint checks, we get import-error message
	saying module "six.moves.queue" wasn't found.
	This happens because six.moves modules are added dynamically
	and pylint can't handle dynamically created modules.
	We can change `from six.moves.queue import Queue` to
	`from six.moves import queue` and call queue.Queue() instead.

2017-01-26  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: allow setting of QCOW2 image version during import
	Since 4.1 it should be possible to use also newer version of QCOW2
	images. Also this commit [1] adds option to virt-v2v to chose which
	version to use in imported image.

	First, this change makes use of the newly added option in virt-v2v
	(if the installed version of virt-v2v supports it). Second, the API
	commands for importing VMs from VMware/Xen/OVA are enhanced so that
	engine can tell us which version to use.

	[1] https://github.com/libguestfs/libguestfs/commit/bdaeeb4e606f3828

	Bug-Url: https://bugzilla.redhat.com/1412451

	v2v: detect capabilities of virt-v2v
	virt-v2v has a mechanism of reporting its capabilities. That includes not
	only general features but also input and output backends. This will come
	in handy once we need to support various features of different versions
	of virt-v2v.

	tests: fake-virt-v2v: remove superfluous argument
	Removed superfluous argument used in argument parsing code. All it did
	is to swallow argv[0] (command name). This can be avoided by not passing
	argument list to parse() function and letting argparse to process
	sys.argv on it's own.

2017-01-26  Francesco Romani  <fromani@redhat.com>

	migration: don't require optional jobStats fields
	In the migration monitor thread, we fetch the jobStats to
	report the migration progress. We just log some data,
	and we do logic on a small subset of this data.

	We incorrectly thought some fields will always be present,
	but it turns out that libvirt may omit them (after reading
	the libvirt sources).

	Since we use those fields only for logging, we consider them
	optional too.
	The fields on which we make logic will always be returned after
	a succesfull jobStats() call, so no further changes are needed.

	Bug-Url: https://bugzilla.redhat.com/1414626
	Backport-To: 4.1
	Backport-To: 4.0

2017-01-26  Shahar Havivi  <shaharh@redhat.com>

	add missing attributes for vdsm-api.yml
	commit 6e54e1e2be79ff25f3f55e0a68c1b378220eaf35 didn't add type and
	model to v2v disk and network device.

2017-01-26  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: log path to the import log file
	When importing external VM we are storing complete output of virt-v2v
	and kvm2ovirt in external log file under /var/log/vdsm/import/ however
	the path (espcially the log file name) is not present in vdsm.log. This
	makes it harder to find the relevant log after failed import.

	This patch fixes this.

2017-01-26  Edward Haas  <edwardh@redhat.com>

	tests: Change functional_jsonrpc_enable default to true
	By default, the functional tests should  run with jsonrpc (and not
	xmlrpc).

2017-01-26  Tomáš Golembiovský  <tgolembi@redhat.com>

	spec: Bump requirement on python-cpopen
	In order to support redirection of stderr to stdout we need to bump
	version requirement on python-cpopen. This feature is broken in previous
	versions.

	The requirement was introduced by commits [1][2]:
	985cbe87  v2v: Log detailed output of virt-v2v [Tomáš Golembiovský]
	22d665c7  v2v: Add PipelineProc, pipeline wrapper object [Tomáš Golembiovský]

	There was a previous attempt to bump the version requirement here [3]:
	fa1e3804  v2v: Bump version requirement on python-cpopen [Tomáš Golembiovský]

	But it was badly positioned in the first place (would still cause
	breakage in runtime) and it disappeared later because of commits [4][5]:
	eb803052  build: Remove build requires needed for the tests [Nir Soffer]
	777f386e  build: Require python-cpopen for build [Yaniv Bronhaim]

	[1] https://gerrit.ovirt.org/59834
	[2] https://gerrit.ovirt.org/62094
	[3] https://gerrit.ovirt.org/62093
	[4] https://gerrit.ovirt.org/65500
	[5] https://gerrit.ovirt.org/68986

	Bug-Url: https://bugzilla.redhat.com/1416112

2017-01-26  Irit Goihman  <igoihman@redhat.com>

	virt: move vmdevices to lib/vdsm/virt

2017-01-26  Denis Chaplygin  <dchaplyg@redhat.com>

	hc: Added GLUSTERFS to the API schema.
	Bug-Url: https://bugzilla.redhat.com/1215039

2017-01-26  Edward Haas  <edwardh@redhat.com>

	net: rename dhclient-monitor working folder and script

	net: Notify Engine when a new dynamic IP is added on the host

	net: move dhclient-monitor thread from supervdsm to vdsm
	With this patch, the dhclient-monitor module is now running under the
	vdsm process, sending updates through the supervdsm proxy to the
	sourceroute module.

	net: Introduce network initializer module
	Several network initializations have been called from supervdsm
	and some are expected to move to vdsm.
	Therefore, it would be preferable to cetralize these initializations
	under the network package.

	This patch moves all network init from supervdsm_server to
	network.initializer under the init_privileged_network_components func.

2017-01-25  Nir Soffer  <nsoffer@redhat.com>

	logUtils: Support log level aliases
	We are documenting the shorter "WARN" log level, but the actual
	code failed to support them. Use logging.getLevelName to support the log
	level we added using logging.addLevelName.
	The new log levels were added to vdsm schema as well.

	The code was also not tested, add tests checking that it actually works.

2017-01-25  Irit Goihman  <igoihman@redhat.com>

	vdsm: replace vdsClient occurrences with vdsm-client
	vdsClient will be removed soon so it should be removed from
	vdsm documentation and scripts.

2017-01-25  Irit goihman  <igoihman@redhat.com>

	vdsClient: remove all related files and delete package
	vdsClient uses XMLRPC which is deprecated, and has been replaced
	by the new vdsm-client.

	All vdsClient files were removed (including tests), cli package
	was deleted and marked as obsolete.

2017-01-25  Edward Haas  <edwardh@redhat.com>

	net: replace ifcfg bond options defaults hanlding
	During bond editation with ifcfg, bond options defaults have a
	dedicated handling, overcoming initscripts limitations (of restoring the
	bond options defaults).

	This patch replaces the special handling in ifcfg and reuses the
	identical handling that is done when bond options are updated with
	link.bond.

2017-01-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding TimezoneFormatter to logUtils and use it for default log format
	2017-01-11 13:32:20,870+0000 INFO  (jsonrpc/2) [jsonrpc.JsonRpcServer] RPC call Host.getAllVmStats succeeded in 0.00 seconds (__init__:515)
	2017-01-11 13:32:22,855+0000 INFO  (jsonrpc/4) [dispatcher] Run and protect: repoStats(options=None) (logUtils:66)
	2017-01-11 13:32:22,855+0000 INFO  (jsonrpc/4) [dispatcher] Run and protect: repoStats, Return response: {'33d5731d-665e-4a70-bb0d-84cd160a3620': {'code': 0, 'actual': True, 'version': 3, 'acquired': True, 'delay': '0.000400885', 'lastCheck': '7.3', 'valid': True}} (logUtils:69)
	2017-01-11 13:32:22,865+0000 INFO  (jsonrpc/4) [jsonrpc.JsonRpcServer] RPC call Host.getStats succeeded in 0.01 seconds (__init__:515)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1408190

2017-01-24  Milan Zamazal  <mzamazal@redhat.com>

	virt: Update VM memory in Vm, not vmdevices
	VM memory is a property of the VM, not of a particular device.  When memory
	devices change, VM memory can change as well.  We currently update VM memory
	from the device code.  This way VM memory can be updated automatically on
	memory device updates, but then we handle a VM property from device code and
	the Vm instance must be available to the updating code.

	Let's keep the responsibilities separated and update VM memory only within Vm,
	for the price of having to be careful not to forget about the call at all the
	places where memory devices can change.

	Bug-Url: https://bugzilla.redhat.com/1228543

	virt: Update vmdevices `teardown' docstring
	According to `teardown' documentation, the method is called after the VM was
	destroyed.  This is actually only half of the true because the method should
	also be called after device hotunplug.  Let's clarify the docstring.

	virt: Update memory devices correctly
	The current algorithm of assigning aliases and addresses to memory devices in
	Memory.update_device_info works basically as follows: Take the first memory
	device from domain XML and match it with all unassigned memory devices.  In the
	result all the memory devices get (incorrectly) the same alias and address.

	This patch fixes two problems:

	- It doesn't assign already assigned memory devices from domain XML.
	- It checks memory node and size before considering the devices as matching.

	The same problem is apparently present in other device updates as well.  Since
	we may not come to a clear agreement how to generalize the fix, we fix just
	Memory for now and postpone fixing the other devices.

	Bug-Url: https://bugzilla.redhat.com/1402880

2017-01-24  Francesco Romani  <fromani@redhat.com>

	vm: tests: actually set existing ioTune settings
	Reading the source code in vm.py _and_ vmdevices/storage.py
	reveals that the storage code was using and storing the ioTune
	settings under self.specParams, not under self.conf['specParams'].

	This is fine, but the test code feed the storage device with
	pre-existing ioTune settings using self.conf['specParams'].

	This is misleading in the best case, wrong in the worst case.
	This patch actually sets the old ioTune settings using the right
	field - specParams.

	Doing so we discover that the code is indeed broken if it has
	to update the existing ioTune settings - exactly because
	the testcase never covered such scenario.

	For the (short) time being, we mark the test broken until we fix
	the code.

	virt: storage: add iotune attrs in fixed order
	Always add the iotune attributes to the device XML in
	the order provided by sorted().
	Doesn't change a bit for libvirt, but makes testing easier.

2017-01-24  Irit Goihman  <igoihman@redhat.com>

	vdsm-client: add a man page

2017-01-24  Edward Haas  <edwardh@redhat.com>

	net: Drop netinfo.bonding.slaves function
	Use link.bond driver to fetch the current slaves of a bond, replacing
	netinfo.bonding.

	This is the first patch in a series of patches that aim to cleanup
	netinfo.bonding and use the bond driver instead.

2017-01-24  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	stomp: handle no active connection during send
	We can't send frames when connection is not healthy so we need to make
	sure to raise stomp error. We add a test to cover this situation.

2017-01-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removed unused VDSM_CLIENT constant from spmprotect script

2017-01-24  Arik Hadas  <ahadas@redhat.com>

	update documentation of appendSysinfo
	The element 'bios' is never written as part of the 'sysinfo'
	element in the domxml. The documentation of vmxml#appendSysinfo
	is updated accordingly.

2017-01-23  Nir Soffer  <nsoffer@redhat.com>

	spec: Update libvirt requirement on EL7
	Live snapshot is broken when using a VM lease, causing the snapshot to
	fail. This breaks live snapshot and live storage migration when using a
	VM lease.

	The issue was fixed in libvirt-2.0.0-10.el7_3.4, we require now this
	version.

	A fix for Fedora is not available yet, this is tracked in
	https://bugzilla.redhat.com/1415488.

	Bug-Url: https://bugzilla.redhat.com/1317429

2017-01-23  Ala Hino  <ahino@redhat.com>

	Live Merge: Improve logging

2017-01-23  Tomáš Golembiovský  <tgolembi@redhat.com>

	tests: Clean up child processes in v2v tests
	Do proper clean up of child processes in PipelineProcTests.

2017-01-21  Francesco Romani  <fromani@redhat.com>

	virt: move iotune validation to the vmtune module
	Storage devices support iotune settings, and they have validation code.
	However, that code is completely independent from the storage device
	state (the methods never use `self').

	So we move them out of the storage device, and we put them in the
	`vmtune' module. We also make free functions and more pep8 friendly.

	A future patch will add tests for this code.

2017-01-21  Nir Soffer  <nsoffer@redhat.com>

	concurrent: Log threads life cycle
	We have many threads without any logging, starting and finishing
	silently, and adding logging to all code starting threads is too much
	work and error prone.

	This patch adds standard logs for thread life cycle. Now each thread
	will have these debug logs:

	    2017-01-08 15:14:15,880 DEBUG (Thread-520) [root] START thread
	    <Thread(Thread-520, started daemon 140257637971712)>
	    (func=<function run at 0x7f9047b0ade8>, args=(1, 2), kwargs={'a': 3, 'b': 4})
	    (concurrent:183)

	    2017-01-08 15:14:15,880 DEBUG (Thread-520) [root] FINISH thread
	    <Thread(Thread-520, started daemon 140257637971712)> (concurrent:186)

	If a thread function raises, we will have this traceback:

	    2017-01-08 15:22:01,034 ERROR (Thread-7) [root] FINISH thread
	    <Thread(Thread-7, started daemon 140366796183296)> failed (concurrent:189)
	    Traceback (most recent call last):
	      File "/home/nsoffer/src/vdsm/lib/vdsm/concurrent.py", line 185, in run
		ret = func(*args, **kwargs)
	      File "/home/nsoffer/src/vdsm/tests/concurrentTests.py", line 264, in run
		raise RuntimeError("Threads are evil")
	    RuntimeError: Threads are evil

	We are not using utils.traceback now, so the noisy test showing a
	traceback on stderr was fixed, and we are also testing logging during
	successful run.

2017-01-21  Milan Zamazal  <mzamazal@redhat.com>

	virtTests: Add missing `devices' parameter
	'devices' are not passed to some of the VMs run in virt functional tests,
	resulting in that the given VMs don't start.  Let's add them and make the tests
	working again.

2017-01-19  Dan Kenigsberg  <danken@redhat.com>

	init: place preset files where they should be
	systemd.preset(5) states that preset files should sit in
	/usr/lib/systemd/system-preset/*.preset and not under /usr/lib64 as we
	place them.

	Bug-Url: https://bugzilla.redhat.com/1414299

2017-01-19  Irit Goihman  <igoihman@redhat.com>

	yajsonrpc: remove bridge from Notification
	As part of adding notification support in JsonRpcClient,
	Notification class should stop getting bridge as a parameter to
	its constructor.
	Bridge is related to the server and not to the client, and since
	it only provides the event schema, it can be replaced with the
	event_schema parameter.

2017-01-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	check-merged: adding cleanup and globelize VM_NAME

	check_merged: placing logic in functions
	trying to keep the small changes - this patch only wrap some global
	parts into prepare and run functions.

2017-01-18  Nir Soffer  <nsoffer@redhat.com>

	lvm: Add vdsm local lvm configuration
	Add lvmlocal.conf with vdsm specific configuration:

	- devices/global_filter - filter out ovirt lvs from all lvm commands on
	  the host.

	  This change is expected to prevent discovery and auto-activation of
	  guest lvs on raw ovirt volumes. This problem is causing performance
	  issues and may lead to data corruption.

	  This change does not effect discovery and auto-activation of guest lvs
	  on direct luns. There is no way vdsm can filter direct since we don't
	  know which luns should be filtered.

	- global/use_lvmetad - disable lvmetad usage in lvm commands

	This first comments on the file contains vdsm metadata, used by vdsm
	during upgrades. The default configuration looks like this:

	   #REVISION: 1
	   #PRIVATE: NO

	With this configuration, vdsm will upgrade this file when running:

	    vdsm-tool configure --module lvm

	To control the local lvm configuration, the system administrator can
	mark the file as private by modifying this line:

	    #PRIVATE: YES

	If the file is private, vdsm will never upgrade the file.

	The vdsm metadata header starts at the first line and ends on the first
	non-comment line.

	This patch adds the default configuration.

	Bug-Url: https://bugzilla.redhat.com/1374545

2017-01-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	check-merged: rename function name

	check-merged: phase 1 for making file more readable
	only comments removal and some lines separation for readability

2017-01-18  Fred Rolland  <frolland@redhat.com>

	storage: Support colon in PV name
	If a PV name contains a colon, the decodePVInfo was splitting the info
	wrongly.

	Bug-Url: https://bugzilla.redhat.com/1413867

	storage: add tests for decodePVInfo
	Add tests for decodePVInfo in blockSD

	Bug-Url: https://bugzilla.redhat.com/1413867

2017-01-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	check_merged: remove redundant vars

2017-01-18  Edward Haas  <edwardh@redhat.com>

	automation: Add iproute-tc package to fc25
	On recent fedora25, the tc tool has been extracted out of iproute
	package and moved to its own package.
	Due to a failure seen on jenkins CI, this package is now added as a
	VDSM dependency (used by vdsm-networking for QoS).

2017-01-18  Shahar Havivi  <shaharh@redhat.com>

	v2v: kvm --source argument can be ignored if usrename not supply
	if optional username is not present when trying to import from kvm
	source we don't send --source disks argument to kvm2ovirt which cause
	the import to fail.

	this bug from 316a3a9dc6240a54084dd107c213409d7c00e8c5 patch.

	Bug-Url: https://bugzilla.redhat.com/1414256

2017-01-17  Fred Rolland  <frolland@redhat.com>

	storage: change import of test class
	Change import VdsmTestCase to be used as is.

2017-01-17  Nir Soffer  <nsoffer@redhat.com>

	executor: Don't start thread in __init__
	Starting a thread in __init__ is easy but always a bad idea, in
	particular when starting the thread in the middle of __init__. Here it
	causes a deadlock in the executor tests, if we add logging in
	concurrent.thread() when a thread is started.

	The failure flow is this:

	1. Worker starts thread in the middle of __init__, before self._task is
	   initialized.
	2. Thread function wrapper logs start message with the target function,
	   Worker._run.
	3. Worker._run function __repr__ invokes Worker.__repr__
	4. Worker.__repr__ tries to access non-existing self._task and raises
	   AttributeError.
	5. Thread fails, never calling Barrier.wait()
	6. Test deadlocks waiting on the barrier

	Fixed by extracting Worker.start() method, and calling when creating a
	new worker, *after* the worker is completely constructed.

2017-01-17  Ala Hino  <ahino@redhat.com>

	Cold Merge: Prepare top's volume child
	During finalizeMerge, if the top volume has a child, we need to rebase
	that chlid on the base volume, hence we have to prepare the child
	volume.

	Bug-Url: https://bugzilla.redhat.com/1410428

2017-01-17  Fred Rolland  <frolland@redhat.com>

	storage: fix typo in class name
	Fix typo in MetadataValidityTests

2017-01-17  Francesco Romani  <fromani@redhat.com>

	tests: bootstrap the virt subdirectory
	Start to move all the virt tests into its own subdirectory.

	WARNING: up until the move of real virt code under lib/ is completed,
	we are forced to use the ugly tests/virttests name in place of the much
	nicer tests/virt to avoid to confuse the python importer during the
	test run.

2017-01-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	check-merged: removing redundant loop
	For testing different distros we will run separate mock environment in
	jenkins.

2017-01-17  Irit Goihman  <igoihman@redhat.com>

	virt: move vmtune.py to lib/vdsm/virt

	virt: move recovery.py to lib/vdsm/virt

	virt: move domain_descriptor.py to lib/vdsm/virt

2017-01-17  Ala Hino  <ahino@redhat.com>

	Cold Merge: Support merge of shared base parent
	When the VM is cloned from a template and the storage allocation is
	thin, the root volume of the VM is a shared volume. As shared volumes
	are not returned when calling Image.getChain, it is impossible to rely
	on that call when preparing the chain for merge. To handle this use
	case, we manually add the template volume to the volumes chain if
	exists.

	Note: This patch is missing unit tests because storage-tests infra
	doesn't activate the LVs so there it isn't possible to test volumes
	prepare and teardown. This missing functionality is reported here:
	https://bugzilla.redhat.com/1411103

	Bug-Url: https://bugzilla.redhat.com/1408977

	Cold Merge: Fix backing format when executing qemuimg rebase
	In commit 91dc966d (Cold Merge: Implement StoragePool.finalizeMerge) the
	backing format wasn't set correctly when calling qemuimg.rebase, it was
	hard-codedly set to 'qcow2' instead of the correct backing volume format.
	This patch sets the backing format as the base volume format.

	Cold Merge: Use volume.getBackingVolumePath when calling qemuimg rebase
	In commit 91dc966d (Cold Merge: Implement StoragePool.finalizeMerge),
	the backing wasn't set correctly when calling qemuimg.rebase, it was set
	as the volume path. In this patch we change that to use
	volume.getBackingVolumePath.

2017-01-17  Nir Soffer  <nsoffer@redhat.com>

	utils: Accept logger instead of logger name
	Accepting a logger in utils.traceback is easier for callers, more
	robust, and easier to test.  Now we can easily test that a thread is
	logging a traceback if the thread function raises.

	Note: since utils.traceback raises after logging the traceback to the
	requested logger, the new test is logging unwanted traceback to
	stderror. We can hide this traceback by monkeypatcing stderr during the
	test but it will be handled in a better way in the next patch.

2017-01-16  Ala Hino  <ahino@redhat.com>

	tests: Handle errors when qemu chain isn't valid
	When qemu chain isn't valid, e.g. volume format isn't as expected (could happen
	as a result of missing volumes format when running qemu rebase), qemu-io fails
	to read data from the chain, but doesn't raise an exception (!), return code is
	0, out is empty *but* err contains a description of the error. In this patch,
	we check the returned err and raise exception if it is not empty.

2017-01-16  Dan Kenigsberg  <danken@redhat.com>

	tests: remove remaining assertEquals
	fixes done with

	    /tmp/q0: q0/assertEquals<^M>lllllllllllx%mn%:.+1,'ns/^ //<^M>q20@0:wq
	    for f in `git grep -l assertEquals`; do vim -s /tmp/q0 $f; done
	    for f in `git diff --name-only`; do flake8 $f && git add $f; done

	and few manual fixes

2017-01-15  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: don't use BaseException.message attribute
	The use of BaseException.message has been deprecated as of Python 2.6
	and is kept available only for backward compatibility. So let's get rid
	of it.

2017-01-15  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't crash on external VMs in sampling
	When retrieving VM stats, we get information about all running VMs from
	libvirt, including external VMs.  We then add information from a Vdsm Vm object
	to the metrics stats.  However in case of external VMs there is no
	corresponding Vdsm Vm object and the VMBulkSampler call crashes with KeyError
	when trying to get the object.

	We fix the problem by simply skipping unknown VMs when making metrics in the
	sampling.

	Bug-Url: https://bugzilla.redhat.com/1412198
	Backport-To: 4.1
	Backport-To: 4.0

	virt: Don't crash in Vm.getIoTunePolicy when ioTune is unavailable
	The cases when VM metadata can't be fetched from libvirt or <ioTune> is not
	present in the domain XML were not handled and raised unhandled exceptions.
	This patch fixes it.

	Bug-Url: https://bugzilla.redhat.com/1409834
	Backport-To: 4.1

2017-01-15  Leon Goldberg  <lgoldber@redhat.com>

	automation: prepare yum.conf before copying to lago guest
	The host's yum.conf sets reposdir to /dev/null/, causing
	localsync to be ignored which en route causes vdsm to be installed
	via the nightly repository.

	This patch both excludes vdsm the rest of the repositories configured
	in yum.conf and removes reposdir from yum.conf (resulting in the default
	destination which holds localsync) by modifying and copying
	over a temporary copy of yum.conf.

2017-01-15  Edward Haas  <edwardh@redhat.com>

	net: Support multiple dhclient-monitor clients through registration
	dhclient-monitor has been used so far by a single client: sourceroute.

	In order to support mutiple clients and decouple even further the
	modules involved, an observer pattern approach has been taken.
	It consists of a single publisher (dhclient-monitor) and multiple
	subsribers (sourceroute for now, events later on).
	A subsciber registers to the publisher, asking it to notify it when a
	specific action has occured through a callback function.

	Both the dhclient_monitor and the sourceroute are unaware of each other,
	only at the initialization phase (currently, supervdsm_server) they are
	being linked through the registration step.

2017-01-15  Leon Goldberg  <lgoldber@redhat.com>

	tests: Moving "test_bond_mode_change" to BondOptionsTestTemplate
	Moving test_bond_mode_change to BondOptionsTestTemplate which is the
	dedicated bond options testing template.

	tests: adding BondOptionsTestTemplate to func_bond_basic_test.py
	moving a a test testing bond mode 1 to the new functional tests

	automation: check-merged: dedicate a variable for automation dir
	The directory is reused in different ways throughout the script.
	Dedicate an absolute path variable for it; it will additionally be used
	in future patches addressing the stale vdsm installation.

	automation: disable proxy usage for localsync repo
	As per the CI enviornment's routing rules, access to the port the 
	repository's web server listens on is not allowed via the CI's proxy.

	Disabling proxy usage for the repository to allow direct access to 
	the repository as intended.

2017-01-15  Irit Goihman  <igoihman@redhat.com>

	protocoldetector: fix no-member error
	socket.EWOULDBLOCK doesn't exist.
	EWOULDBLOCK is part of errno library.

2017-01-15  Edward Haas  <edwardh@redhat.com>

	net tests: refactor test_ip_info test
	test_ip_info has been seen failing randomly on jenkins CI without any
	special reason.
	It has been refactored to include private range addresses and non
	overlapping subnets.

2017-01-15  Nir Soffer  <nsoffer@redhat.com>

	concurrent: Accept a logger instead of logger name
	Accepting a logger is easier for the callers (all code is passing
	log.name), more robust (now way to fail getting the logger), and
	easier to test (can use fake logger to check logged messages).

	tests: Complete FakeLogger helper
	Complete the fake logger so it supports all used logging methods, so we
	can use it to test also utils.traceback() and concurrent.thread() in the
	next patches.

	Move it to fakelib so we can use it for testing other modules.

2017-01-15  Shahar Havivi  <shaharh@redhat.com>

	v2v: dont return vm if we fail to add its disks
	if storageVolLookupByPath(path), blockInfo(path) fail we cannot import
	the VM.

	Bug-Url: https://bugzilla.redhat.com/1405058

2017-01-13  Leon Goldberg  <lgoldber@redhat.com>

	automation: don't skip localsync if it is unavailable
	if localsync is for whatever reason unaccessible, check-merged
	should fail as that means that the very essence of the operation
	fails; a relevant vdsm version won't be able to be built and
	tested

	automation: fix localsync's repository name
	localsync contains the artifacts; it doesn't and shouldn't
	contain the nightly repository.

	automation: fixing check-merged's incorrect local repo source path.
	Fixing the incorrect path that was used to determine the source for
	check-merged's local repository.

2017-01-13  Nir Soffer  <nsoffer@redhat.com>

	bridge: Remove unused typefixups
	Remove unused code for "fixing" some keys in vdsm response. I think this
	was added in the past when Adam tried to create language bindings for
	vdsm, and the motivation was to avoid reserved keywords like "type" and
	"class", and replace them with safe words like "domainClass" and
	"domainType". I don't think that these fixups belong to vdsm, they
	should be part of the language binding.

2017-01-13  Daniel Erez  <derez@redhat.com>

	vdsm-api: StorageDomainInfo - rename domainClass to class
	vdsm-api.yml -> StorageDomainInfo:
	renaming domainClass to class in order to correlate
	with 'StorageDomainInfo' object.

	Url: https://bugzilla.redhat.com/1214346

	vdsm-api: StorageDomainInfo - rename domainType to type
	vdsm-api.yml -> StorageDomainInfo:
	renaming domainType to type in order to correlate
	with 'StorageDomainInfo' object.

	Url: https://bugzilla.redhat.com/1214346

2017-01-13  Ala Hino  <ahino@redhat.com>

	tests: Fix test_merge_subchain
	Use correct base format when verifying reading from it.

	tests: Fix qemuimg_test.TestCommit
	In commit 5bf3ca26 (core: Expose API for qemuimg commit), the unit test
	used wrong base volume format when verified pattern. This patches fixes
	that.

	tests: Add storage_merge_test.py to make file
	In commit 16ed655a2811 (Cold Merge: Implement StoragePool.prepareMerge)
	we added this test module but forgot to add it to the makefile.

2017-01-13  Dan Kenigsberg  <danken@redhat.com>

	storage: move task and taskManager to lib

2017-01-12  Edward Haas  <edwardh@redhat.com>

	net tests: Mark several new tests that they require root
	ip_route
	ip_rule
	sourceroute

2017-01-12  Dan Kenigsberg  <danken@redhat.com>

	storage: move resourceManager to lib

	storage: move lvm.py to lib

2017-01-12  Irit Goihman  <igoihman@redhat.com>

	virt: move vmxml.py to lib/vdsm/virt
	This movement is part of the effort of cleaning vdsm
	directory and move all its content to lib/vdsm

2017-01-12  Milan Zamazal  <mzamazal@redhat.com>

	virt: Use `devices' instead of _devices in MutableDomainDescriptor
	_devices is undefined in the class.

	Backport-To: 4.1

2017-01-12  Shahar Havivi  <shaharh@redhat.com>

	kvm2ovirt: Support for downloading block devices
	Added support for block devices via blockAdapter.
	vol.download support only file based formats.

	blockAdapter can handle file as well.

	Bug-Url: https://bugzilla.redhat.com/1378340

	add tests for kvm2ovirt

	v2v: move kvm2ovirt to lib/vdsm/
	needed for mock tests in future patch

2017-01-12  Nir Soffer  <nsoffer@redhat.com>

	sp: Fix attaching of live storage domain
	When attaching a live storage domain, like the hosted engine storage
	domain, the host id is already acquired, and must not be released after
	attaching the domain.

	Releasing the host id will cause sanlock to expire the leases on this
	domain and kill the hosted engine VM, holding a volume lease on this
	domain.

	We already had protection for live storage domain monitored by vdsm.
	However after restarting vdsm (e.g. by host-deploy), there is a window
	where vdsm does not know about the hosted engine storage domain, and if
	engine was trying to auto-import the hosted engine storage domain at
	this point vdsm was acquiring and releasing the host id, killing the
	hosted engine VM.

	Bug-Url: https://bugzilla.redhat.com/1409112

2017-01-12  Edward Haas  <edwardh@redhat.com>

	net: Introduce add/remove sourceroute api
	sourceroutes have been configured by the existing configurators, using
	the sourceroute module to generate the correct configuration details.

	There are users of sourceroute that do not really need the
	configurators (dhclient_monitor), but had to use it as there was no
	other option to add or remove a sourceroute.

	This patch introduces the ability to add sourceroutes and remove them
	through the sourceroute module, without the need to pass through the
	configurators.
	This step will allow supporting sourceroute with OVS and follows the
	'driver' pattern, where each component has its own drivers.

	The add/remove functionality is using the ip.rule and ip.route modules.

	net: Introduce ip.rule module with an iproute2 driver
	As part of the effort to partition the existing configurators into
	focused topic drivers, ip.rule is introduced.

	It includes a basic abstration api with an iproute2 implemented
	using the ipwrapper module.

	It is aimed to be intially used by the sourceroute module as the
	default way to configure a sourceroute.
	(It cannot replace the ifcfg configurator, but can now replace the
	iproute2 configurator when configuring sourceroute)

	net: Introduce ip.route module with an iproute2 driver
	As part of the effort to partition the existing configurators into
	focused topic drivers, ip.route is introduced.

	It includes a basic abstration api with an iproute2 implemented using
	the ipwrapper module.

	It is aimed to be intially used by the sourceroute module as the default
	way to configure a sourceroute.
	(It cannot replace the ifcfg configurator, but has a potential to
	replace the iproute2 configurator when configuring sourceroute, given we
	introduce ip.rule module in the following patch)

	net: Introduce ifacetracking module
	Extracting the interface tracking handling from sourceroute module and
	placing it in its own module.

	net: Relocate (libvirt) code from sourceroute to libvirt

	net: remove sourceroute dependency on the configurators
	Extracting the remove action from sourceroute as done with the config
	action.

	As a result, sourceroute no longer is dependent on the configurators and
	no longer needs to call one.
	A user fetches the current sourceroute configuration from the module and
	uses it to call the relevant configurator remove method.

2017-01-11  Leon Goldberg  <lgoldber@redhat.com>

	Revert "tests: move testFailWithInvalidBondingName to the new functional tests"
	This reverts commit 4e08396936d69baebb64b94c8005720f19306c04 as it
	breaks ovs tests.

2017-01-11  Martin Perina  <mperina@redhat.com>

	core: Add support for ovirt-engine 4.2
	- Adds 4.2 to supported engine versions
	- Adds 4.2 to supported cluster levels

2017-01-11  Dan Kenigsberg  <danken@redhat.com>

	tests: replace assertTrue with assertEqual
	The latter gives more verbose message in case of a failure.

	py3: tests models_tests
	In commit ad5ae9bf I've added models_tests to the python3 blacklist in
	order to ignore an error on Fedora 25. This patch returns the tests,
	after a recent fix to the network.netinfo.bonding module in
	https://gerrit.ovirt.org/#/q/I4487b787c .

	py3: make toolbonding_tests pass
	I don't really know why, but under Python 3, file.close() seems to issue
	another attempt to flush "invalid" data. This patch opens
	/sys/class/net/bond0/bonding/option in a binary non-buffered mode, in
	order to avoid this hassle.

2017-01-10  Leon Goldberg  <lgoldber@redhat.com>

	set-conf-item: replacing "dummy" with underscore for unused variable

2017-01-10  Nir Soffer  <nsoffer@redhat.com>

	tests: Rename all tests module to *_test.py
	Tests names like *_test.py are detected automatically by pytest, so we
	don't need to maintain test lists.

	Most of the test modules are already named using this style, this patch
	convert the rest of the modules to this style.

2017-01-10  Dan Kenigsberg  <danken@redhat.com>

	pylint: drop awkward logging.TRACE level
	Writing into the logging module is rude, and not really helpful. Our
	default log level is INFO, so the few places that were using TRACE can
	safely use DEBUG.

	pylint: fix super() calls
	In normal cases, super() should not produce a proxy to a grandparent
	class, but to an immediate parent class.

	pylint: fix format string to support two args

	pylint: net configurator: silence errors about unknown methods
	The Configurator abstract base class uses begin, commit and
	runningConfig, but never defines them, relying on derived classes to do
	so. pylint does not like this, ending with:

	E: 40, 8: Instance of 'Configurator' has no 'begin' member (no-member)
	E: 45,12: Instance of 'Configurator' has no 'commit' member (no-member)
	E: 64,40: Instance of 'Configurator' has no 'runningConfig' member (no-member)

	With this patch, these methods and data memebers are explicitly declared
	in the base class.

2017-01-10  Francesco Romani  <fromani@redhat.com>

	vm: migration: handle destroy on startup on dest
	When a pre-copy migration is not converging, the
	source Vdsm may decide to abort the operation, and
	during this process it destroys the destination side Vm.

	This is part of the normal flow of operations, and one
	of the expected and supported outcomes of the pre-copy
	migrations.

	What should not happen, however, is that the destination
	side VM reports error in the logs. This is wrong for users,
	which see a scary and pointless stacktrace, and may
	confuse Engine if it sees a VM down in Error.

	With this patch, we add explicit check for this condition,
	and we let the destination VM to be down without error.

	See
	http://lists.ovirt.org/pipermail/users/2016-December/044477.html
	For a recent case.

	Bug-Url: https://bugzilla.redhat.com/1134974

	vm: set _destroy_requested event onQemuDeath
	We set the _destroy_requested event on externally-triggered
	destroy requests, like VM.destroy() calls.

	Actually, also the onQemuDeath is an externally-triggered
	destruction request: it just comes from the system, not from the
	Engine.

	Uniform handling of the destruction requests allow us
	to better react to complex events, like it is done in the
	followup patch.

	Related-To: https://bugzilla.redhat.com/1134974

2017-01-10  Martin Polednik  <mpolednik@redhat.com>

	changeCD: correctly propagate bus interface
	As q35 requires non-ide bus, we have to make sure we propagate the
	desired interface into changeCD XML.

	Bug-Url: https://bugzilla.redhat.com/1400168

2017-01-10  Petr Horáček  <phoracek@redhat.com>

	network: remove ovs hook

2017-01-09  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix MutableDomainDescriptor.xml
	XML parsing instead of XML formatting was used there by mistake.

	Backport-To: 4.1

2017-01-09  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: add ppc64le repo
	yum should be able to decide which package should be
	installed based on basearch even if both x86_64 and ppc64le
	repos are available at the same time.

2017-01-09  Maor Lipchuk  <mlipchuk@redhat.com>

	amend: Replace the use of CopyData in internal management.
	Update the amend operation to manage the volume instead
	of using the CopyData

	Bug-url: https://bugzilla.redhat.com/1408143

2017-01-09  Fred Rolland  <frolland@redhat.com>

	Revert "sdm: Add set_volume_generation verb"
	This reverts commit a4902de5cef98fce230ad7c3159f82c8bc56be44.

	This verb was replaced by SDM.update_volume, including this
	functionality and more.
	The engine is not using the removed verb.

	See SDM.update_volume commit:
	c081e99b698712b661277b4af9b033c8b6b5578b

	storage: deprecate setDescription and  setLegality
	Mark as deprecated setDescription and setLegality Volume and
	VolumeManifest methods since 4.1.

	These attributes should be changed now using SDM.update_volume.

2017-01-09  Irit goihman  <igoihman@redhat.com>

	vdsm script: rename to vdsmd
	vdsm renaming to vdsmd is consistent with the change of 
	supervdsmServer script to supervdsmd.
	The name also implies better about the script functionality.

2017-01-09  Leon Goldberg  <lgoldber@redhat.com>

	automation: check-merged: collect lago logs
	In addition to the already collected test logs, collect
	/var/logs as well.

2017-01-09  Martin Polednik  <mpolednik@redhat.com>

	vm: use proper log level for _changeBlockDev
	We should not swallow exception-level log messages under debug level.

2017-01-08  Irit Goihman  <igoihman@redhat.com>

	spec: require python-blivet1
	fedora 25 introduced python-blivet1 package which offers
	the python2 API, while python-blivet has moved to python3, which
	isn't supported yet in vdsm.

2017-01-07  Martin Polednik  <mpolednik@redhat.com>

	devices: make iothreadid in controller always serializable
	The controller's iothread ID is an integer. We should force
	conversion to string in order to avoid etree explosion if we receive
	integer from engine.

2017-01-07  Edward Haas  <edwardh@redhat.com>

	net: Networking restoration done in a greedy mode
	The networking restoration has been done in an 'all or nothing' mode:
	In case a network/bond setup failed, it failed all networks and did not
	continue trying other networks.
	The end result: VDSM failed to come up on boot.

	With this patch, the restoration process is done in a greedy mode,
	trying setting each network/bond and continue even if one fails.

	Note that with this new restoration mode, VDSM may come up with partial
	networks configured (even with none).

	Bug-Url: https://bugzilla.redhat.com/1242532

	net: Refactor unified_restoration
	This patch is a step towards allowing the unified restoration process
	to restore networks and bonds in a greedy manner.

	The patch focuses on performing syntactic changes, with minimal logical
	changes in the flow.

2017-01-07  Nir Soffer  <nsoffer@redhat.com>

	mailbox: Allow shorter wait timeout for testing
	The storage thread pool uses a crappy method for checking if threads
	should exit; each thread is waiting on the message queue op to
	waitTimeout seconds and check if the thread was terminated.

	For mailbox testing, we are using 0.1 seconds monitorInterval, to avoid
	unneeded delays during the test, but when we stop the test, we wait
	about 6 seconds until the mailbox thread pools are stopped. This is
	cause by using constant 3 seconds wait time in the thread pool.

	Compute the wait timeout using the monitor interval, so we keep the
	runtime behavior the same, but can use shorter timeouts for testing,
	speeding up the mailbox tests:

	$ ./run_tests_local.sh storage_mailbox_test.py
	tests.storage_mailbox_test.SPM_MailMonitorTests
	    testThreadLeak                                              OK
	tests.storage_mailbox_test.TestMailbox
	    test_send_receive                                           OK

	----------------------------------------------------------------------
	Ran 2 tests in 0.608s

	Before this change, the tests needed more then 6 seconds, and were
	marked as slowtest.

2017-01-07  Dan Kenigsberg  <danken@redhat.com>

	tests: network: dhcp: wait for dnsmasq
	--with-process-leak-check revealed that after exiting dnsmasq_run
	context, we could still find a zombie dnsmasq process. With this patch,
	stop not only kills the process and reads its output, but actually waits
	for it to die.

2017-01-06  Dan Kenigsberg  <danken@redhat.com>

	network: drop pyroute_two configurator
	Few years back, we had a nice idea, to configure networking via the
	pyroute2 package. The work was never completed, never used, and is not
	currently needed. There is no point to carry and maintain that code
	anymore.

	netlink: silence pylint import-error
	I do not know why pylint does not like

	    from six.moves.queue import Empty, Queue

	but I do not mind going its way; queue.Empty may be clearer than an
	unqualified Empty for humans, too.

	pylint: disable pyinotify warning
	pyinotify is "too smart" for pylint. we are not responsible for

	E:119,43: Module 'pyinotify' has no 'IN_CLOSE_WRITE' member (no-member)

	cannot really solve it, and would not like to see it.

2017-01-06  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix process leak in outOfProcess tests
	The test did not close started ioprocesses child processes on tearDown,
	causing the buidl to fail randomly with this error:

	    IOError: [Errno 4] Interrupted system call

	Running with --with-process-leak-check show that we are not leaking
	processes now:

	$ ./run_tests_local.sh storage_outofprocess_test.py --with-process-leak-check
	tests.storage_outofprocess_test.OopWrapperTests
	    testAmountOfInstancesPerPoolName                            OK
	    testDifferentPoolName                                       OK
	    testEcho                                                    OK
	    testFileUtilsCall                                           OK
	    testSamePoolName                                            OK
	    testSubModuleCall                                           OK
	    testUtilsFuncs                                              OK

	----------------------------------------------------------------------
	Ran 7 tests in 7.173s

2017-01-06  Ala Hino  <ahino@redhat.com>

	Live Merge: Handle block copy still active error
	When there is high I/O during live merge, pivot could fail at libvirt
	side because block copy still active. In this case we don't want print
	an exception but rather we want to print a warning and continue trying
	to pivot.

	Bug-Url: https://bugzilla.redhat.com/1376580

2017-01-06  Nir Soffer  <nsoffer@redhat.com>

	vm: Add the missing VmLeaseDevice type
	In commit 75ed95bc9420 (vm: Support vm leases) we added a new device
	type, but forgot to add it to the schema. The code works without this
	but this confuses engine developers and prevents request input
	validation using the schema.

	Bug-Url: https://bugzilla.redhat.com/1317429

2017-01-05  Edward Haas  <edwardh@redhat.com>

	net test: Bonds need a slave to be considered operational up
	The NM functional test while NM is running started failing.
	Investigation revealed that the bond it uses (replacing dummy ones that
	are not supported by NM at the moment) is not operational UP when
	network is asserted.

	To overcome this issue, a dummy slave is added post bond creation.

2017-01-05  Dan Kenigsberg  <danken@redhat.com>

	netlink: monitor: join scanner thread on __exit__
	In case a timeout occurs, the _scan() function ultimately ends, but
	nothing explicitly waits on its control thread. It is harmless in the
	case of netlink.monitor, but it is impolite to leak threads, even for a
	short while.

	This patch explicitly waits for the scan thread to finish before exiting
	from an event monitor context manager.

	The issue was spotted by running the tests with --with-thread-leak-check.

2017-01-05  Leon Goldberg  <lgoldber@redhat.com>

	tests: move testSetupNetworksAddBondWithManyVlans to the new functional tests

	tests: move testFailWithInvalidBondingName to the new functional tests

2017-01-05  Edward Haas  <edwardh@redhat.com>

	net test: Provide a helper to fetch the bonding defaults file
	During tests, the bonding default options file (BONDING_DEFAULTS) has
	been occasionally patched, depending on the file availability.
	In order to cleanup the noise at the test level, the logic of what file
	path is to be used for patching has been moved to the nettestlib module.

2017-01-05  Irit Goihman  <igoihman@redhat.com>

	introduce pylint check
	pylint is a static code checker.
	Run `make pylint` to see if your new code has not introduced new errors.

	Note that currently, pylint does not pass quietly on our code base.
	There are some known issues and expect to encounter them when you run
	pylint targets.

	Further note that `make pylint` is very slow, and then was not added to
	`make check`. You have to run it excplicitly to enjoy it. But please do.
	I can find simple, but painful, glitches.

2017-01-05  Nir Soffer  <nsoffer@redhat.com>

	xleases: Add VolumeIndex.updating context manager
	VolumeIndex.updating marks an index as updating before entering the
	context, and clear the updating upon successful exit from the context.
	If the user code failed, the index is left in the updating state.  This
	was part of format_index, and is needed also for rebuild_index.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Add DirectFile.size() method
	For reading resources from existing external leases volume we need to
	know the volume size. Add generic implementation that works for both
	files and block devices.

	We may need a smarter version later to detect a logical volume that
	needs a refresh, or to optimize the file storage version to use
	os.stat(), but for now this is good enough.

	Fix the tests to create a more typical volume size, matching the way we
	create the external leases volume for both block and file storage.

	Bug-Url: https://bugzilla.redhat.com/1317429

2017-01-05  Irit Goihman  <igoihman@redhat.com>

	sos: collect error and exit if client.connect fails
	if vdsmd is down, client.connect fails and raises an exception.
	This leads to an annoying print in sos plugin run:
		caught exception in plugin method "vdsm.setup()"
		writing traceback to sos_logs/vdsm-plugin-errors.txt

	Now, exception is collected and the plugin exits after getting
	connection failure, since the rest of the commands depend on
	existing vdsm connection.

2017-01-04  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove unused import
	We were importing print_function but print() was not used.

	tests: Insert search path at start of sys.path
	We used to append the search path to the end of sys.path, slowing down
	the import for no reason.

	tests: Remove useless permutation
	We tested import of ("a.py", "b.py") and ("a.py", "b.py", "a.py"). The
	later is useless since both list create the same files.

2017-01-04  Dan Kenigsberg  <danken@redhat.com>

	rpmlint: ignore only limited set of errors
	Currently, our rpms fail in 5 tests:

	    explicit-lib-dependency
	    no-binary
	    zero-length
	    non-readable
	    non-standard-dir-perm

	We do not have the time to fix these failures right now, but we want to
	make sure that no new failure is added in the mean while.

	This patch makes rpmlint ignore the currently-broken tests, and fail
	loudly if a new one pops in.

2017-01-04  Edward Haas  <edwardh@redhat.com>

	supervdsm api: Relocate set_rp_filter_* verbs
	Moving set_rp_filter_* verbs under supervdsm_api.network.

2017-01-04  Ala Hino  <ahino@redhat.com>

	tests: Add deactivaLVs method to storagefakelib.py

2017-01-04  Edward Haas  <edwardh@redhat.com>

	net: extract the configuration action from sourceroute
	sourceroute and the configurators expose a dependency loop which is best
	to drop.
	In this patch, the sourceroute configure action is re-organized, such
	that sourceroute will no longer be aware of the configurator. It will
	just return the values that need to be used for the configuration and
	the caller will forward them to the relevant configurator.

	In the following patch, the remove action will also take a similar
	approach and the module level dependency will be completely removed.

2017-01-04  Nir Soffer  <nsoffer@redhat.com>

	vdsm-client: Refine complex argument examples
	Use Lease info instead of StorageDomain activate, which can be used with
	the key=value convention.

	For the example of reading from standard input, use Here Document which
	is more idiomatic and easier to use (not having to type Ctrl+D).

	vdsm-client: Make executable in the source
	Having an executable script we can run it directly from the source
	directory without installing it:

	    $ PYTHONPATH=lib static/usr/bin/vdsm-client -h
	    usage: vdsm-client [-h] [-a HOST] [-p PORT] [--unsecure] [--timeout TIMEOUT]
	                       [-f FILE]
	                       namespace method [method_args [method_args ...]]
	    ...

	vdsm-client: Use passed arguments
	client.main() accept arguments and should pass them to the arguments
	parser; this allow testing of the client main function.

	To simplify the vdsm-client script, use args=None, using the default
	parsing behavior in runtime, but still allowing testing of the main
	function by passing arguments to main.

2017-01-04  Petr Horáček  <phoracek@redhat.com>

	network: fix invalid argument names in __exit__

2017-01-04  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix EINTR errors in checker tests
	This patch fixes this random failure seen both locally and in travis:

	======================================================================
	ERROR: test_stopping_repr (storage_check_test.TestDirectioChecker)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
	    self.runTest(result)
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
	    test(result)
	  File "/usr/lib64/python2.7/unittest/case.py", line 431, in __call__
	    return self.run(*args, **kwds)
	  File "/usr/lib64/python2.7/unittest/case.py", line 406, in run
	    result.addSuccess(self)
	  File "/usr/lib/python2.7/site-packages/nose/proxy.py", line 165, in addSuccess
	    self.result.addSuccess(self.test)
	  File "/vdsm/tests/testlib.py", line 362, in addSuccess
	    self._writeResult(test, 'OK', TermColor.green, '.', True)
	  File "/vdsm/tests/testlib.py", line 355, in _writeResult
	    self.stream.writeln()
	  File "/usr/lib64/python2.7/unittest/runner.py", line 25, in writeln
	    self.write('\n') # text-mode streams translate to \r\n if needed
	IOError: [Errno 4] Interrupted system call
	-------------------- >> begin captured stdout << ---------------------
	<DirectioChecker /path stopping at 0x7f9f6a46e450>

	--------------------- >> end captured stdout << ----------------------
	-------------------- >> begin captured logging << --------------------
	2016-12-02 21:52:33,048 DEBUG (MainThread) [storage.check] Checker '/path' started (check:233)
	2016-12-02 21:52:33,048 DEBUG (MainThread) [storage.check] START check '/path' (delay=0.00) (check:283)
	2016-12-02 21:52:33,052 DEBUG (MainThread) [storage.check] Checker '/path' stopping (check:250)
	2016-12-02 21:52:33,053 DEBUG (MainThread) [storage.asyncevent] Closing <EventLoop running=False closed=False at 0x140322659557456> (asyncevent:215)
	--------------------- >> end captured logging << ---------------------

	The issue was not waiting for a checker underlying process. If the
	process finished when the test framework was trying to write to stderr,
	the write was interrupted by the SIGCHLD signal.

	One of the idle tests was starting a checker, repeating the running
	checker tests. The test was simplified to not start the checker.

	The running checker tests were fixed by running the event loop after
	starting the checker. The checker complete method stop the event loop
	after the checker reaped the child process.

	In the stopping tests, the checker was switched to STOPPING state. In
	this state, it does not invoke the complete callback. The tests were
	fixed by waiting until the checker was stopped in a helper thread.

2017-01-03  Ala Hino  <ahino@redhat.com>

	tests: Remove unneeded mocking
	Mocking of volume.Manifest.isShared method isn't required because it is
	possible to directly invoke volume.Manifest.setShared. This patch
	removes the mocking and update the test accordingly.

2017-01-03  Edward Haas  <edwardh@redhat.com>

	net: configurators - refactor source route flow (no logic change)
	In the current state, the configurators package init module is
	depending on the sourceroute module.
	This is causing uneeded complexity and is design wide wrong.

	This patch reorganize the calls to source route (with no logic change)
	and moves it to the concrete classes (ifcfg and iproute2).

	net: rename sourceroutethread module to dhclient_monitor
	The module is monitoring dhclient responses and triggers sourceroute
	actions per the data.

	As we intend to use this mechanism for other actions as well, it has
	been renamed to a name that describes better its functionality.

2017-01-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	automation: adding fc25 conf files
	added conf files for build artifacts and build
	artifacts manual jobs.

2017-01-03  Irit Goihman  <igoihman@redhat.com>

	vdsm.spec: ship vdsm-client with vdsm-cli package
	required vdsm-client package within vdsm-cli.
	This will ensure vdsm-client will be installed whenever vdsm-cli
	will be installed, having an easier way to drop vdsClient in
	the future.

2017-01-03  Irit goihman  <igoihman@redhat.com>

	shell_helper: change vdsClient reference to vdsm-client
	vdsClient is deprecated and replaced by vdsm-client

2017-01-03  Irit Goihman  <igoihman@redhat.com>

	vdsm: move logic to python module and create wrapper
	vdsmd.py was created in vdsm library. It can't be moved
	to lib directory because it imports storage.dispatcher
	module.

2017-01-03  Edward Haas  <edwardh@redhat.com>

	test: Fix misuse of @brokentest in vmApiTests module

	test: Remove testEmptyAddress test which does not ran
	The test used the @brokentest decorator wrongly and never run.
	As xmlrpc is decprecated, we can remove this test.

	testValidation: Raise TypeError on decorator misuse
	Protect test validation decorators which require the decorator to be
	used as a function call.

	If such a decorator is used differently, a TypeError is raised.

2017-01-03  Nir Soffer  <nsoffer@redhat.com>

	testValidation: Add @xfail decorator
	This decorator should be used to mark good tests as expected failure. In
	this case the test is good, but the code is broken, and cannot be fix
	yet.

	The test will skip with the reason message if the test fail, and fail if
	the test succeeds, since this means the code is working and we can
	remove this decorator.

	This is a poor man implementation of pytest.mark.xfail, see
	http://doc.pytest.org/en/latest/skipping.html

	Usage::

	    @xfail("why this test canonot pass now...")
	    def test_broken_code(self):
		...

2017-01-03  Irit Goihman  <igoihman@redhat.com>

	vdsm: remove os.setgrp() call
	This is a leftover from rhel6 and not needed anymore.

2017-01-03  Dan Kenigsberg  <danken@redhat.com>

	rpmlint: silence isolatedprivatevlan-related error
	This hook was hardly ever used, but regardless of its destiny, it should
	not produce rpmlint errors.

2017-01-03  Irit Goihman  <igoihman@redhat.com>

	vdsm: move try except block inside main function
	This change is part of the effort of moving python scripts to
	modules containing the actual code.
	having try except block inside __main__ prevents us from
	getting rid of this block.

2017-01-02  Leon Goldberg  <lgoldber@redhat.com>

	virt: bugfix: use normalized literal ip addresses for migration
	Destination/migration qemu uris require valid literal ip
	addresses (in accordance with rfc2732).

	While ipv4 addresses don't require any modification,
	ipv6 addresses may need to be enclosed with square brackets.

	During the formation of the uri's, use normalize_literal_addr to
	ensure that the uri's are formatted properly.

2017-01-02  Maor Lipchuk  <mlipchuk@redhat.com>

	formatConverter: Add module doc string for format converter class.

2017-01-02  Dan Kenigsberg  <danken@redhat.com>

	tests: FileLeakPlugin
	A proper test should clean after itself, and close all the files it had
	opened. Enabling this plugin, with --with-file-leak-check, shows which
	test (or its tested code), fail to do so.

2017-01-02  Leon Goldberg  <lgoldber@redhat.com>

	virt: reformating of duri/muri creation
	Favoring format over modulo operator; using a local variable over
	accessing a nested dictionary entry twice

2017-01-02  Dan Kenigsberg  <danken@redhat.com>

	spec: rpmlint: clean non-executable-script
	This patch removes the shebang from python modules that are not
	executable. It makes sure that python scripts are marked as such by
	autoconf, and that no python file is listed as both a script and a
	module.

	spec: rpmlint: clean wrong-script-interpreter
	Some of our scripts used /usr/bin/env as an interpreter, which is not
	allowed by Fedora.

	This patch also fixes a couple of ambiguous references to "python" which
	were hidden from commit 82bcde2's sed.

	check-merged: collect lago logs

2017-01-02  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: fix import issue in gfapi module.
	gluster module is moved vdsm module under site-packages. So
	all usage of gluster modules should be qualified with vdsm but
	it is missing in gfapi.py.

	Bug-Url: https://bugzilla.redhat.com/1409052

2017-01-02  Dan Kenigsberg  <danken@redhat.com>

	pylint: fix storage.sd.SDManifest
	declare special_volumes() as the classmethod it is

	Bug-Url: https://bugzilla.redhat.com/1317429

	tests_child: drop odd mangling od sys.path
	The dropped line might have meant something when we had an infra
	subpackage. Now it serves nothing.

2017-01-02  Petr Horáček  <phoracek@redhat.com>

	net: drop special ovirt-node handling from netconfpersistence
	The removed code was introduced in https://gerrit.ovirt.org/50984
	to solve https://bugzilla.redhat.com/1293617 in vintage ovirt-node

	In current ovirt-node implementation, files do not have any different
	owneership or permission. So this code can be dropped.

	Bug-Url: https://bugzilla.redhat.com/1349391

2017-01-02  Dan Kenigsberg  <danken@redhat.com>

	pylint: hostdevTests: rename a couple of variables
	pylint complains that we use the same variable name to hold a device
	name, and late a device object. This patch uses a properly-named
	variable for each type.

	pylint: bindingxmlrpc: exception should inherit from Exception

	pylint: panic.panic() accepts a single string arg

	pylint: vdsClientGluster: get dictionary element properly

2017-01-01  Nir Soffer  <nsoffer@redhat.com>

	tests: Add ProcessLeakPlugin
	Add plugin for detecting leaked child processes.

	Running with --with-process-leak-check will fail any test that leaked a
	child process.

	Example test that leak child processes:

	    def test_leak(self):
	        subprocess.Popen(["sleep", "60"])

	Example run:

	    ======================================================================
	    ERROR: test_leak (leak_test.TestLeak)
	    ----------------------------------------------------------------------
	    Traceback (most recent call last):
	      File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
		self.runTest(result)
	      File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
		test(result)
	    AssertionError: Test leaked child processes:
	    [
		{
		    "cmdline": [
			"sleep",
			"60"
		    ],
		    "pid": 29386
		}
	    ]

	To enable the plugin with make check:

	    make check NOSE_WITH_PROCESS_LEAK_CHECK=1

	tests: Document usage of new thread leak checker

2017-01-01  Dan Kenigsberg  <danken@redhat.com>

	tests: ThreadLeakPlugin
	Enable this test plugin (via --with-thread-leak-check) to verify that
	neither your test, nor the code it tests, leak threads. Unfortunately,
	this plugin cannot be enabled by default, since we do have buggy test
	and code that do leak.

	pylint: ResourceException requires an argument

2017-01-01  Edward Haas  <edwardh@redhat.com>

	net test: Cover and fix ip.address module with integration tests

2017-01-01  Dan Kenigsberg  <danken@redhat.com>

	automation: avoid yappi skips
	I don't like seeing multiple
	    SKIP: yappi is not installed
	messages on test stdout. Pulling yappi into the build takes some time,
	but let us do it since SKIPs should be as rare as we can.

2017-01-01  Fred Rolland  <frolland@redhat.com>

	storage: Add API for SDM update_volume
	Add API for SDM.update_volume verb that allows to change
	volume metadata from any host.

	The supported metadata that can be changed:
	- description of the volume
	- volume type (allow making a leaf volume shared)
	- legality (legal/illegal)
	- generation

2017-01-01  Edward Haas  <edwardh@redhat.com>

	net: Raise IPRoute2Error from ipwrapper with the return code
	It has been found useful in the debugging process and it may help upper
	layers to catch/handle a more specific error.

	net: fix set_default_route call to routeDel

	net: For route deletion, specify the relevant family
	Deleting a route without specifing the family may result in a deletion
	of both IPv4 and IPv6 routes.
	Such a scenario explicitly occurs when deleting the 'default' route.

	This patch allows the caller to specify an explicit family for the route
	deletion.
	iproute2 module is the only caller at the moment.

	net test: Provide the ability to preserve the default route
	Introducing preserve_default_route under nettestlib module, to assist
	tests to preserve the system original default route and properly cleanup
	the test.

	With this patch, it is now possible to add a default route and query the
	existing one for both IPv4 and IPv6.

2017-01-01  Dan Kenigsberg  <danken@redhat.com>

	pytlint: drop ivdsm
	Not used for years, completely replaceable by "manhole".

2017-01-01  Edward Haas  <edwardh@redhat.com>

	net: sourceroutethread module refactoring

2017-01-01  Dan Kenigsberg  <danken@redhat.com>

	pylint: storageServer: ExampleConnection: improve documented interface
	ExampleConnection serves as a "documentation class". This patch fixes
	the signature of its __eq__ and __ne__ methods.

	Signed-off-by Dan Kenigsberg <danken@redhat.com>

	pylint: storage/fileSD: fix typo
	commit 166bda1 introduced a typo that is hereby fixed.
	It's time we introduce static checkers to the project, to avoid similar
	cases.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-31  Nir Soffer  <nsoffer@redhat.com>

	profiling: Rename cpuProfileTests.py
	Use new naming convention for tests modules: cpu_profile_test.py

2016-12-30  Fred Rolland  <frolland@redhat.com>

	storage: rename volume attributes class
	amend_volume should change only qcow2 metadata, and we want to add
	update_volume for updating ovirt volume metadata. The new verb will use
	VolumeAttributes for volume metadata.

	See engine patch: Ibbfbf32d3bd46437e84dfad45987b738e280f0e6

2016-12-30  Nir Soffer  <nsoffer@redhat.com>

	vdsm-client: Remove unused code
	The vdsmclient/client.py module is not a script any more, and does not
	need the #!/usr/bin/python or handling of __main__.

	The module is used by importing and calling the main() function.

2016-12-30  Dan Kenigsberg  <danken@redhat.com>

	testValidation: tidy import order

2016-12-30  Nir Soffer  <nsoffer@redhat.com>

	resourceManager: Use log.debug for unimportant messages
	Registering an existing namespace is neither an interesting event nor
	a state change that should be logged in info log level. This is
	unfortunate debug message that we see each time a domain is refreshed,
	because of the horrible way domain objects are managed.

	This change removes these useless logs from the default log level:

	    Resource namespace 01_img_93404146-0d02-4d98-8310-f356733d7176 already registered (sd:658)
	    Resource namespace 02_vol_93404146-0d02-4d98-8310-f356733d7176 already registered (sd:667)
	    Resource namespace 03_lvm_93404146-0d02-4d98-8310-f356733d7176 already registered (blockSD:874)

	We need to check later if it is possible to avoid the registration in this
	case, or maybe fix domain life cycle handling so we can register the namespace
	after the previous instance unregistered it.

	resourceManager: Add NamespaceRegistered exception
	We used to raise KeyError when trying to register existing namespace.
	This is a horrible idea, possibly hiding bugs in the underlying code.
	Replace it with new exception.

2016-12-29  Edward Haas  <edwardh@redhat.com>

	net: reformat dhcp response data and always report it
	DHCP response has been collected through the dhclient options handler.
	The VDSM handler, located at /etc/dhcp/dhclient.d/sourceRoute.sh is
	creating an unique file under /var/run/vdsm/sourceRoutes that contains
	the IP information from the DHCP response.

	This patch reformats the data representation and always reports it even
	with partial data (e.g. even when the route is missing), leaving it up
	to the event handler at the sourceroutethread.

	This patch aims to allow (in future patches) to add actions beyond the
	existing sourceroute one.

2016-12-29  Dan Kenigsberg  <danken@redhat.com>

	storage_mailbox_test: add informative msg on timeout
	Give a better hint to developer in the threadpool of the mailer object
	does not shut down aftr MAILER_TIMEOUT expired.

	storage_mailbox: introduce HSM_MailboxMonitor.wait()
	Much like its SPM counterpart of commit c0f0475, we would like to wait
	until HSM_MailboxMonitor is stopped, or a timeout occurs.

2016-12-29  Fred Rolland  <frolland@redhat.com>

	storage: add missing test in make file
	Some storage tests are missing from makefile

2016-12-29  Irit Goihman  <igoihman@redhat.com>

	automation: change check-patch repos file
	changed lago repo url to contain $distro variable instead
	of fc24.

2016-12-29  Leon Goldberg  <lgoldber@redhat.com>

	automation: resolving test output being printed twice
	currently test output in check-merged is being duplicated due to both
	printing results on the fly and then printing the same results
	after they're saved to a file with a cat call.

	removing the cat call.

2016-12-29  Edward Haas  <edwardh@redhat.com>

	net test: Fix test_ipv4_default_route default route assertion
	On some functional test runs, the test fails on the default route
	assertion, which checks that there is no default route at the end of
	the test.

	The checks is wrong, as it should actually check that the configured
	default route is not the one on the setup.
	The setup itself may have an original default route already or none.

	Note: It seems that we do not (always) preserve the default route that
	was originally set on the host. This should be fixed in future patches.

	net: drop bond-slaves ipv6 addresses
	The test_drop_initial_bond_slaves_ip_config test has started failing
	without any apparent reason.
	This may be related to the Centos7 update, but it was not confirmed.

	supervdsm net: Fix supervdsm_server, restoring NM init call
	Patch 27023f32197f22445a23710e689455df164e687e has dropped the NM
	initialization.
	Restoring the NM init call.

2016-12-29  Douglas Schilling Landgraf  <dougsland@redhat.com>

	utils: remove remaining ovirt node legacy code
	isOvirtNode, persist and unpersist are legacy code.
	oVirt Node Next should be like any other distro.
	This patch removes the legacy code.

2016-12-29  Leon Goldberg  <lgoldber@redhat.com>

	net: introducing normalize_literal_addr
	the method receives a valid ip address, and returns it in its literal
	form.

	ipv4 addresses are effectively remaining unchanged, however ipv6
	addresses may need to be enclosed with square brackets (in accordance
	with rfc2732) in order to able to be used in uri/urls.

	an immediate use for this method is making sure qemu uri's will hold
	valid addresses.

2016-12-28  Irit Goihman  <igoihman@redhat.com>

	supervdsmd: move to static/usr/sbin

	supervdsmServer: rename to supervdsmd

2016-12-28  Dan Kenigsberg  <danken@redhat.com>

	storage_mailbox_test: test send/receive
	The added test sends an xtnd message from to an hsm mailbox, and waits
	until the spm mailbox processes it (or timeout expires). It then asserts
	that the expected message arrived, and only it.

	In order to add the test, this patch sets the proper size and content to
	the empty inbox and outbox. It also avoided randomness, to have an
	expectable message.

2016-12-28  Fred Rolland  <frolland@redhat.com>

	storage: fix typos
	Fix typos in amend_volume.py

2016-12-28  Nir Soffer  <nsoffer@redhat.com>

	travis: Add Fedora 25  build

	docker: Add Fedora 25 image
	This is mostly the same as the Fedora 24 dockerfile, replacing
	python-blivet with python-blivet1 (legacy version created for us).

	resourceManager: Remove unused force option
	Remove unused option to force-register a namespace, replacing the
	previous namespace if it was not used.

2016-12-28  Dan Kenigsberg  <danken@redhat.com>

	storage_mailbox: introduce SPM_MailMonitor.wait()
	Keep track of the mailbox-spm thread that is created by SPM_MailMonitor
	during its initialization, and let SPM_MailMonitor users join on it.

	This allows testThreadLeak to politely wait on the the thread that it
	implictly created.

2016-12-28  Nir Soffer  <nsoffer@redhat.com>

	dockerfile: Install pip using the official package
	The Fedora dockerfile was copied from the CentOS dockerfile, installing
	python-setuptools and then installing pip using easy_install. However on
	Fedora pip is available and we don't need the easy_install dance.

	docker: Move docker files to new docker directory

2016-12-28  Leon Goldberg  <lgoldber@redhat.com>

	check-merged: experimenting functional tests without NM
	it is a suspicion NM causes functional tests to be slow.
	this patch will be used as check-merged job to test this
	suspicion.

2016-12-28  Nir Soffer  <nsoffer@redhat.com>

	docker: Add gcc and redhat-rpm-config
	These packages are required to build yappi. They are included in the
	current images in docker hub but not in vdsm source, probably because I
	forgot to submit the patch adding them.

2016-12-28  Fred Rolland  <frolland@redhat.com>

	storage: sort sdm files in spec and make

2016-12-28  Irit Goihman  <igoihman@redhat.com>

	automation: add fc25 check-patch repos and packages

2016-12-28  Leon Goldberg  <lgoldber@redhat.com>

	net: adding "literal" to _is_ipv6_addr_soft_check
	an ipv6 address not in compliance with rfc2732 won't start with
	square brackets; "literal" is the formal term to an ipv6 address
	enclosed by square brackets.

2016-12-28  Irit Goihman  <igoihman@redhat.com>

	supervdsmServer: create python module and script wrapper
	All supervdsmServer logic was implemented inside a python script
	which is a bad practice.
	The logic was moved to a python module under lib/vdsm and the script
	now invokes supervdsmServer.py.

2016-12-27  Dan Kenigsberg  <danken@redhat.com>

	storage: move multipath to lib

	storage: correct number of logging args

2016-12-27  Edward Haas  <edwardh@redhat.com>

	net: Adding debug logging for sourceroute and sourceroutethread

2016-12-27  Allon Mureinik  <amureini@redhat.com>

	spec: Require sanlock version handling EINTR
	libsanlock was not handling EINTR, causing failures in sanlock calls
	if vdsm received a signal while libsnalock was blocked in a syscall.
	A typical case is when a child process terminates and vdsm receives a
	SIGCHLD signal.

	When this happens, the vdsm operation fails with this error:

	    SanlockException: (4, 'Sanlock ...', 'Interrupted system call')

	Bug-Url: https://bugzilla.redhat.com/1356676

2016-12-27  Liron Aravot  <laravot@redhat.com>

	hsm: adding pe_alloc_count/pe_count to getVgInfo
	This patch adds to pe_alloc_count/pe_count fields to getVgInfo.
	The engine accepts a list of devices to reduce from the domain from the user.
	In order to validate that there's enough space to reduce all those
	devices (all or nothing), we need to determine how much free PEs there
	are in all the other devices of the vg.
	Adding pe_alloc_count/pe_count to each reported  pv will provide the engine the
	ability to determine how much space there is and to either allow or
	block the operation.

2016-12-27  Irit Goihman  <igoihman@redhat.com>

	shell_helper: add vdsm-client package

2016-12-27  Dan Kenigsberg  <danken@redhat.com>

	tmpfiles: let qemu read payload
	My commit a2ddda causes systemd to create /var/run/vdsm/payload with
	very limited permissions. This patch lets qemu (and anybody else) to
	change into that directory and list its content.

	Bug-Url: https://bugzilla.redhat.com/1408672

	configure.ac: drop unused PGREP

2016-12-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix in check-merged - using mock repos
	Instead of using epel repo this patch copies the repos from the mock
	env using /etc/yum/yum.conf

2016-12-26  Leon Goldberg  <lgoldber@redhat.com>

	check-merged bugfix: wrong shell variable
	PID=$! was modified to PID=$? accidently, reverting

2016-12-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Enable kvm module in mock env - accelerate the run for check-merged

2016-12-26  Edward Haas  <edwardh@redhat.com>

	net build: Correctly include nmnettestlib in the build
	nmnettestlib module has not been installed in the installation
	patch with all the other modules. Causing functional tests that
	have been run from the installation path to fail importing it.

2016-12-26  Idan Shaby  <ishaby@redhat.com>

	storagetestlib: introduce the Aborting tests tool
	By using the Aborting tests tool, one can create an object that when
	called for the first N times it returns False, and from the N+1 call and
	on it returns True.

	It is handy when testing tools that use commands.watchCmd, that can wait
	for a stop signal and then kill the execution of the new process.

	Here's an example of a test to assert that cmd aborts on the third poll:
	with self.assertRaises(ActionStopped):
	    commands.watchCmd(cmd, stop=Aborting(2))

	Related-To: https://bugzilla.redhat.com/1367806

2016-12-25  Dan Kenigsberg  <danken@redhat.com>

	check-merged: comment out network tests
	It is not clear why or how, but it might be that running the network
	tests causes jenkins to disconnect from the slave. Let us comment them
	out to see if this is the case.

2016-12-25  Maor Lipchuk  <mlipchuk@redhat.com>

	merge: fix typo in log message.

	amend_volume: Format fix, use one liner.

2016-12-25  Dan Kenigsberg  <danken@redhat.com>

	spec: create our tmpfiles.d before next boot
	commit a2ddda9ba83 removed /var/run from the spec file, but we do need
	to create these files right after installation.

2016-12-25  Nir Soffer  <nsoffer@redhat.com>

	vdsm-client: Fix references to jsonrpc
	The client was renamed lately to vdsm-client, so the example usage
	should mention the new client name.

2016-12-24  Nir Soffer  <nsoffer@redhat.com>

	betterasynccore: Prevent double close
	asyncore.dispatcher is defining a closing attribute, but never use it.
	This make it possible to close a dispatcher multiple times, failing with
	KeyError after the first call.

	Because of the asynchronous nature of the reactor, it is very hard to
	ensure that all dispatchers are closed before the reactor, so we need a
	more robust close method.

	This patch uses the closing attribute to eliminate double close errors.

	protocoldetector: Fix random double close
	Previously we stopped the reactor before closing the acceptor. This
	works most of the time, but once in a while, it fails with this error:

	    Traceback (most recent call last):
	      File "vdsm/tests/protocoldetectorTests.py", line 113, in tearDown
	        self.acceptor.stop()
	      File "vdsm/lib/vdsm/protocoldetector.py", line 211, in stop
	        self._acceptor.close()
	      File "/usr/lib64/python2.7/asyncore.py", line 407, in close
	        self.del_channel()
	      File "vdsm/lib/yajsonrpc/betterAsyncore.py", line 137, in del_channel
	        asyncore.dispatcher.del_channel(self, map)
	      File "/usr/lib64/python2.7/asyncore.py", line 292, in del_channel
	        del map[fd]
	    KeyError: 63

	The flow of events leading to this error is:

	1. Stooping reactor, signaling the reactor thread via eventfd
	2. Context switch to the reactor thread
	3. Reactor find it it was closed and close all dispatchers
	4. Context switch to the original thread
	5. Closing acceptor, fd is not in asyncore map

	This patch fixes this issue by closing the acceptor before stopping the
	reactor.

	protocoldector: Handle fatal errors in acceptor
	Every asyncore.dispatcher must implement handle_error, otherwise the
	default implementation will be called, closing the dispatcher - even if
	the error is not related to the dispatcher.

	This patch implements handle_error logging the exception and closing the
	socket if the error is related to the socket.

	In handle_close, we panic instead of closing the dispatcher silently.
	This is highly unexpected and the best thing we can do is die loudly.

2016-12-24  Irit Goihman  <igoihman@redhat.com>

	supervdsmServer: handle arguments with argparse

2016-12-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	move alignmentScan to lib

2016-12-24  Dan Kenigsberg  <danken@redhat.com>

	netinfo_test: simplify three asserts

	py3: fix remaining references to monitor.MonitorError as iterable

2016-12-23  Allon Mureinik  <amureini@redhat.com>

	spec: Clean up initscripts requirement
	Fedora 23  delivers initscripts-9.65-1 and EL 7.2 delivers
	initscripts-9.49.37-1, so any supported platform can now
	require initscripts >= 9.49.31, allowing us to clean up the spec
	file.

	spec: Clean up systemd requirement
	Fedora 23  delivers systemd-222-17, so any supported platform can now
	require systemd >= 219-11, allowing us to clean up the spec file.

	spec: Extract common requirements from condition
	Over time, the spec file developed duplicate requirements in
	different branches of conditions:

	%if 0%{rhel}
	Requires: some-package
	%else
	Require: some-package
	%endif

	This has no merit, and just makes the spec file harder to maintain.

	This patch extracts these commonalities so they can be maintained in a
	single place.
	If any specific platform needs to introduce a specific version
	requirement (Requires: some-package > 1.2.3), that package can always be
	moved back to the condition.

	spec: clean up policycoreutils-python-utils req
	Since Fedora 23 was declared EOL, any Fedora version we support would
	be greater than 23, so the condition guarding
	policycoreutils-python-utils requirement is redundant, and can be
	cleaned up.

2016-12-23  Dan Kenigsberg  <danken@redhat.com>

	tests: replace many occurrences of deprecated assertEquals
	According to
	https://docs.python.org/2/library/unittest.html#deprecated-aliases
	we should use assertEqual() instead of assertEquals().

	assertEquals with multiline arguments are harder to replace
	automatically due to pep8 whitespace liberalism, so they have not been
	touched by this patch.

	sed -i 's/assertEquals(\(.*\))$/assertEqual(\1)/' `git grep assertEquals`
	for f in `git diff --name-only`; do flake8 $f && git add $f; done

2016-12-23  Irit goihman  <igoihman@redhat.com>

	vdsm client: add vdsm-client script
	vdsm API can be accessed with vdsm-client script. This is a
	wrapper for vdsm client module.

	The script has been added to static/usr/bin directory,
	and it is installed in /usr/bin/ directory.

	Invoking vdsm API:

	    # vdsm-client Host getVMList
	    ['b3f6fa00-b315-4ad4-8108-f73da817b5c5']

	Invoking methods with simple parameters:

	    # vdsm-client VM getStats vmID=b3f6fa00-b315-4ad4-8108-f73da817b5c5
	    ...

	For invokinng methods with many or complex parameters, you can read the
	parameters from a file:

	    # vdsm-client StorageDomain activate -f sd-activate
	    ...

	    where sd-activate file content is:
	    {
	        "storagedomainID": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
	        "storagepoolID": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
	    }

	It is also possible to read parameters from standard input, creating
	complex parameters interactively:

	    # vdsm-client StorageDomain activate -f -
	    {
	        "storagedomainID": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
	        "storagepoolID": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
	    }
	    (Press Ctrl + D to finish)

2016-12-23  Tomáš Golembiovský  <tgolembi@redhat.com>

	build: exclude lines with directories from checks
	In commit cdcf1604d62e7f4e8febebe9e77c862df166c72e flake8 replaced pep8
	and pyflakes and configuration was moved to tox.ini. In this process the
	excluded files were dropped from the configuration.

	However, several generated *.py files contain directories that depend on
	the location of the build tree. This causes problem because the lines with
	the directories can easily become too long and cause PEP8 check to fail
	with 'E501: line too long'.

	Rather than reintroducing the list of excluded files we prevent these
	errors by excluding only the affected lines from checks.

2016-12-22  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Use asyncore.dispatcher.accept()
	We used to bypass dispatcher.accept() and used
	dispatcher.socket.accept() directly. Then we ignored the socket.error
	silently, hiding fatal failures. Unlike socket.accept(),
	dispatcher.accept() return None if the socket is not ready, and
	raise socket.error only for unrecoverable errors.

	This patch switches to dispatcher.accept() and remove the wrong try
	except hiding fatal errors. Now these errors are propagated to asyncore
	and handled by calling hadle_error or handle_close.

2016-12-22  Dan Kenigsberg  <danken@redhat.com>

	storage_mailbox_test: tidy up import order

2016-12-22  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Close properly qemuimg operations
	This is mainly important for jobs which are kept in the jobs map for an
	hour by default. Until the job is deleted, all the objects referenced by
	the job are a live, including the epoll file descriptor used by
	CommandStream.

	copy_data: Simplify volume_operation
	We used partial to provide a volume_operation property, and after all
	the effort called. Replace with a method returning a context manager.

	vm: Support vm leases
	Add support for VM leases which are not attached to a drive.

	Add "lease" hwclass entry in the VM devices for keeping lease devices
	sent from engine. We will use this now for a VM lease, and may use the
	same mechanism for drive leases, also sent from engine.

	Engine sends only partial information about a lease; the lease id and
	the domain id where the lease is stored. We fetch the missing
	information using new storage `Lease.info` API.

	Add virt.vmdevices.lease.Device class for formatting lease device XML.
	This class is also used by `virt.vmdevices.storage.Drive` to format drive
	leases xml.

	This is the lease device format:

	    {
	        "type": "lease"
	        "sd_id": "a7ddf75b-02a6-4d07-9ad4-c7e213f8d24d",
	        "lease_id": "9ececbfd-d351-4d93-8cf5-538c53e3a174"
	    }

	For VM lease, the lease_id must be the VM UUID.

	Note that when using vm lease live snapshot and live storage migration
	are broken because of libvirt bug:
	https://bugzilla.redhat.com/1403691

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Implement basic leases APIs
	Implement the basic APIs required by engine to implement VM leases:
	- Lease.create
	- Lease.delete
	- Lease.info

	Lease.status and Lease.rebuild will be implemented later, as engine does
	not need them right now. They may be useful for debugging and repairing
	the external leases volume.

	Creating and deleting a lease is implemented in the StorageDomain class,
	since these operations must be called on the SPM. Getting lease info is
	implemented on the StorageDomainManifest class so we don't have to
	produce a (risky) StorageDomain on any host.

	Creating and deleting a lease does not fail if the lease exists or was
	already removed, since engine does not check SPM tasks errors. This can
	be improved later when we switch this verbs to storage jobs.

	Getting lease info require reading the external leases index on any
	call, in case the SPM added or removed leases. On the SPM we can read
	the index once and only write changes to storage, but this optimization
	is not implemented yet, and I'm not sure that it is needed.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Introduce the Lease API's
	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Create and activate the external leases volume
	Create the external leases volume when creating a new storage domain, or
	upgrading storage domain from version 3 to version 4. Activate the new
	volume in the flows activating the other special volumes.

	This change introduce a new special volume, that must be created and
	activated only on file and block storage domain v4. To support this we
	use now helper functions to return the special volumes for the current
	domain version and type.

	StorageDomainManifest gained these APIs:

	- supports_external_leases(version) - tell if the storage domain type
	  can use external leases at that version.

	- special_volumes(version) - the special volumes used by the storage
	  domain.

	StorageDomain gained these APIs:

	- supports_external_leases(version) - redirect to the manifest class.

	- external_leases_path() - return the path to the external lease volume

	- create_external_leases() - create the special external leases volume
	  or reuse existing volume. Called during upgrade to version 4.  This
	  should be used also when creating a new storage domain, but this
	  requires a risky refactoring.

	- format_external_leases(lockspace, path) - format the external leases
	  volume index, destroying existing information. Called when creating a
	  new storage domain or when upgrading to storage domain version 4.

	The new "xleases" lv was added to the vdsm lvm.rules udev rule, ensuring
	correct ownership and permissions of the device.

	In the upgrade flow we attempt to create and format the new volume. If
	creating or formatting fail, we do not attempt to clean up anything
	since removing a partly created volume will likely fail if storage
	cannot be accessed. A partly created volume will be reused and
	reformatted on the next upgrade attempt.

	Currently we use xlease.DirectFile for both file and block storage.
	This should be replaced later with storage type specific backend to
	protect from blocking entire vdsm process if storage become
	inaccessible.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	build: Require python-cpopen for build
	We recently removed cpopen from the build requirements ([1]), since it
	was used only during the tests, and we do not run the tests during the
	build.

	However after this we merged a patch creating html version of the
	schema. This code does not use cpopen, but depends on the vdsm.compat
	module which requires cpopen on Python 2.

	This patch fixes the following exception when running:

	   /usr/bin/python schema_to_html.py vdsm-api.yml vdsm-api.html

	Traceback (most recent call last):
	   File "schema_to_html.py", line 29, in <module>
	     from api import vdsmapi
	   File "/builddir/build/BUILD/vdsm-4.19.1/lib/api/vdsmapi.py", line 28, in <module>
	     from vdsm import utils
	   File "/builddir/build/BUILD/vdsm-4.19.1/lib/vdsm/utils.py", line 33, in <module>
	     from .compat import pickle
	   File "/builddir/build/BUILD/vdsm-4.19.1/lib/vdsm/compat.py", line 44, in <module>
	     from cpopen import CPopen
	ImportError: No module named cpopen

	[1] https://gerrit.ovirt.org/#/c/65500

2016-12-22  Dan Kenigsberg  <danken@redhat.com>

	spec: rpmlint: clean dir-or-file-in-var-run
	Remove /var/run/* files from spec, as they do not survive reboot. One of
	the files was missing from systemd's tmpfiles, so it was added there, to
	be recreated on each reboot.

	The patch runs rpmlint on any change of the spec file to make sure that
	this rpmlint error would not return.

2016-12-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding back PyYAML as build requirement
	https://gerrit.ovirt.org/#/c/65500 removed it, but it is required while
	running schema_to_html.py in lib/api/makefile.

2016-12-22  Dan Kenigsberg  <danken@redhat.com>

	automation: rpmlint src.rpm
	vdsm.rpm is not up to standards. But at least its src rpm passes rpmlint
	with no errors. Let's make sure this does not change to the worse by
	adding this additional test.

2016-12-22  Allon Mureinik  <amureini@redhat.com>

	spec: Clean up iscsi-initiator-utils requirements
	With Fedora 23 being declared EOL, we now only support EL 7.3 and Fedora
	24 and 25.
	EL 7.3 delivers iscsi-initiator-utils-6.2.0.873-35.
	Fedora 24 delivers iscsi-initiator-utils-6.2.0.873-34.

	In other words, they both have iscsi-initiator-utils >= 6.2.0.873-21, so
	the conditional requirement in the spec file can be cleaned up.

2016-12-21  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: exclude only disks on block device on Xen
	Commit 7bd6658c9a5e06fa29d6bcd4cb45c37b22f6bb5d introduced filtering of
	disks on block device from Xen imports. This is because we don't
	support that at the moment.

	The filtering expression is however too broad and can exclude also VMs
	that contain CD-ROM devices or floppy disk drives. Since we don't realy
	care about those devices the VMs should be considered OK from our point
	of view.

	Bug-Url: https://bugzilla.redhat.com/1400412

2016-12-21  Irit Goihman  <igoihman@redhat.com>

	client: create a package
	move contrib/jsonrpc to vdsmclient directory and
	package it

2016-12-21  Milan Zamazal  <mzamazal@redhat.com>

	tests: Add timing test on pretty XML formatting
	The test outputs information like this:

	  slowdown: 214% (0.003 s per one domain)

2016-12-20  Edward Haas  <edwardh@redhat.com>

	net: Optimize DHCP information reporting
	A performance degradation has been introduced by DHCP state checks in
	4.0.
	This patch attempts to resolve the performance issue by collecting the
	DHCP information in bulks, collecting it on a collection of devices in
	one pass.

	The DHCP information is collected for all detected devices on the host
	and from the networks ifaces.

	The networks ifaces are actually pointing to one of the system devices,
	therefore, in a following path, the second dhcp info collection can be
	removed and just copied from the correct device.

2016-12-20  Nir Soffer  <nsoffer@redhat.com>

	xleases: Prevent use of index during update
	If the index metadata updating flag is set, loading an index from
	storage must fail. This means that the index is in the middle of an
	update, or an update operation was aborted. In this case the index must
	be formatted or rebuilt from storage.

	Users creating a LeasesVolume need to check for the new InvalidIndex
	exception, matching either InvalidMetadata, or IndexIsUpdating
	exceptions. Both exceptions has now a detailed error message explaining
	how to recover from this situation.

	Here is an example error when an index is updating:

	    vdsm.storage.xlease.IndexIsUpdating: Index is updating or an update operation
	    was aborted, the index must be formatted or rebuilt from storage:
	    <IndexMetadata version=1, lockspace='lockspace', mtime=1481306351,
	    updating=True at 0x7f4ee90a09b0>

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Remove unused argument in test helper

	xleases: Separate VolumeIndex loading from file
	Previously VolumeIndex was created with a file, and loaded data from the
	file when creating an index. This is not needed when formatting a new
	index.

	Extract VolumeIndex.load() for loading data into the index and use it
	when creating a VolumeIndex from existing volume.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Cleanup free records writing and lookup
	Previously free records contained the offset of the lease which is not
	needed when there is no lease, and creation of free records was
	duplicated in 3 places.

	Change the free record format to have also an invalid offset (0), and
	use a special EMPTY_RECORD constant for writing and searching free
	records.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Read and write index metadata
	The metadata block contains:
	- magic number for identifying the index slot
	- version number for future format upgrades
	- lockspace name, used for all leases
	- modification time for debugging

	Since the lockspace is written to the index metadata, remove the
	lockspace argument. This make it impossible to creating an instance with
	wrong lockspace name.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: 100 iterations are enough for timing
	Decrease the lookup timing test to 100 iterations, the extra 900
	iterations just waste developer time waiting for the test.

2016-12-20  Edward Haas  <edwardh@redhat.com>

	net: Enable VDSM to acquire NM ifaces while NM is operational
	In case NM service is running, on a setup network, VDSM will attempt to
	acquire an interface from NM.

	If the NM service is down, the previous static acquire will be
	attempted.

2016-12-20  Nir Soffer  <nsoffer@redhat.com>

	clusterlock: Handle invalid lease name
	Old cold merge flow used to create a temporary volume for the merge, and
	once the merge is done, rename the temporary volume to the final volume
	name. Unfortunately, this rename did not include renaming of the volume
	lease, leaving invalid lease name on storage.

	This issue is probably old as vdsm, but because we never used or queried
	volume leases, the issue was hidden. In 4.1 we use volume leases in many
	storage flows, and we report volume lease status in getVolumeInfo. When
	querying lease status on a cold merge volume after the merge, sanlock is
	raising an exception, failing the cold merge flow.

	    SanlockException: (-227, 'Unable to read resource owners')

	We plan to fix the old code merge flow, but the bad leases are out in
	the wild, so we must handle them in a robust way when querying volume
	lease status.

	This patch adds the cluserlock.InvalidLeaseName exception for reporting
	this error.  In getVolumeInfo, we log this exception and report that
	this volume does not support lease.

	Bug-Url: https://bugzilla.redhat.com/1405817

2016-12-20  Ala Hino  <ahino@redhat.com>

	volume: Don't return 'lease' if it is none
	'lease' property is defined as optonal in the schema. Hence, if lease
	status is none, we don't want to include it the volume info.

	Cold Merge: Use volume generation
	Generation support is used to enhance error handling for jobs on
	non-responsive hosts and decide about job status: started, didn't start,
	failed or completed. Based on generation and volume lease, we could
	decide whether to fence job.

2016-12-20  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove duplication when creating fake volume
	Extract a context manager for creating a fake volume during tests
	replacing duplicate implementation in each test.

	volume: Improve logs during volume operations
	Use the format we use in some other logs:

	    Message (var=value, ...)

	volume: Operation without modifying legality
	During some operations we are not interested in modifying volume
	legality. For example, in cold merge and image upload, we set the
	volume to illegal in the beginning of the flow, and set it to legal on
	the end on the flow. The volume operation runs on another host when the
	volume is illegal, and it should be left illegal after the volume
	operation completed.

	Add set_illegal flag, set to True by default. If the flag is set to
	False, we don't modify volume legality during the operation. This make
	it possible to use volume operations in cold merge.

	Bug-Url: https://bugzilla.redhat.com/1405938

2016-12-20  Edward Haas  <edwardh@redhat.com>

	net: Extract dhcp info processing from libvirtNets2vdsm
	DHCP info report processing has been moved one layer up the stack from
	libvirtNets2vdsm to _networks_report.

	net: refactor netinfo._get function

	net: Centralize dhcp info collection in netinfo.cache
	With the aim to optimize dhcp state check in future patches, this patch
	centralizes the dhcp info collection under a single function.

2016-12-19  Fred Rolland  <frolland@redhat.com>

	storage: improve worker logs
	In this patch, the worker logs are improved in order to ease debugging.
	The correlation between the task ID and the thread running it, is now easy
	to find.

	When a task is started an info level log is printed with this format:
	"<date> INFO (<thread-name>) START task <task-id> (cmd=<cmd>, args=<args>)"

	When the task finishes an info level log is printed with this format:
	"<date> INFO (<thread-name>) FINISH task <task-id>"

	For example:
	2016-12-19 17:38:13,149 INFO  (tasks/0)
	[storage.ThreadPool.WorkerThread] START task
	4c85331d-b424-40e5-80d8-ae0f57d092ed (cmd=<bound method Task.commit of
	<storage.task.Task instance at 0x283d440>>, args=None) (threadPool:208)

	2016-12-19 17:38:37,228 INFO  (tasks/0)
	[storage.ThreadPool.WorkerThread] FINISH task
	4c85331d-b424-40e5-80d8-ae0f57d092ed (threadPool:210)

2016-12-19  Irit goihman  <igoihman@redhat.com>

	vdsm client: fix a typo
	"unsecure" connection parameter had a typo and was
	fixed.

2016-12-19  Edward Haas  <edwardh@redhat.com>

	net test: NM - iface test name should pass VDSM validation
	VDSM networking restricts some iface types with a specific name format.
	Currently, as dummy interfaces are not supported by NM, bond interfaces
	are used.
	In order to support the same helpers for the functiona tests, the iface
	name has been formated per the VDSM validation requirement
	(bond<number>).

	net: Extract ifcfg acquire to its own module
	Ifcfg acquire has been handled in the ifcfg module.
	This patch extracts it to its own module so future patches can add
	functionality.
	(Supporting ifcfg acquire from a live NM)

2016-12-19  Nir Soffer  <nsoffer@redhat.com>

	build: Disable implicit rule for .out files
	For some reason make has a builtin rule for .out files, overwriting the
	contents of fake-virt-v2v.out data file with with the contents of
	fake-virt-v2v script, failing v2v tests randomly.

	Disable this useless and harmful rule using empty recipe.
	https://www.gnu.org/software/make/manual/html_node/Empty-Recipes.html

2016-12-19  Irit Goihman  <igoihman@redhat.com>

	after_vm_start hook: migrate to the new jsonrpc client
	remove jsonrpcvdscli commands from the hook and
	migrate to the new jsonrpc client

2016-12-19  Idan Shaby  <ishaby@redhat.com>

	storage: add missing discard parameter
	In commit 67bac28162c6 (storage: add discard argument to all related
	flows) I added the discard parameter to fileVolume.delete and to
	blockVolume.delete, but forgot to update one call to these methods,
	which is a part of the rollback flow when creating a volume.

	This patch fixes this method call by adding the new argument to it.

2016-12-19  Edward Haas  <edwardh@redhat.com>

	net test: Provide reasons for broken_on_ci markings

2016-12-18  Nir Soffer  <nsoffer@redhat.com>

	build: Require tox 2.5.0
	There is no reason to require ancient version of tox. Version 2.5.0 is
	available via pip.

	travis: Pull docker images from ovirtorg repo
	Pull the images from the official ovirtorg repository:
	https://hub.docker.com/u/ovirtorg/dashboard/

	Previously we pulled the images from my private repo.

	dockerfile: Preinstall yappi
	Pre-install yappi so we don't waste time on installing it during the
	tests.

2016-12-17  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Add missing QemuImgOperation.close()
	QemuImgOperation creates and keep a CommandStream instance, creating
	epoll file descriptor, and a Popen instance, creating and keeping 3
	pipes (6 file descriptors). Holding an operation instance keeps 7 file
	descriptors open even if the operation was completed.

	Add a close method so users can close the operation properly.  A lock
	was added so calling abort from any thread even after the operation was
	closed is safe.

	qemuimg: Document thread safe methods
	Document the thread safe method in QemuImgOpeartion.

	utils: Don't keep reference to command
	CommandStream receive a Popen instance and watch its stdout and stderr
	streams. However it does not use the instance itself and there is no
	reason to keep a reference to this object. Keeping reference prevent
	garbage collection of the instance and the underling pipes, if some
	other code is keeping reference to the CommandStream instance.

	utils: Add missing CommandStream.close()
	CommandStream creates a epoll object but never close it. Add close()
	method so users can close it properly.

2016-12-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	move supervdsm_api to lib

	move mkimage to lib

2016-12-16  Dan Kenigsberg  <danken@redhat.com>

	storage_mailbox_test: replace __del__ with a context manager
	The sematics of a context manager is much clearer than that of __del__.

2016-12-16  Nir Soffer  <nsoffer@redhat.com>

	volume: Remove LeaseStatus shared flag
	Sanlock supports shared leases, but the python binding does not expose
	the shared status of a lease, so we better not expose this value. Engine
	is using only the owners field currently, so this change is safe.

	This should have been part of https://gerrit.ovirt.org/67610 but it was
	lost by mistake.

2016-12-16  Denis Chaplygin  <dchaplyg@redhat.com>

	vdsm: allow rpm build with PyYAML built without LibYAML
	vdsm-api.html generation script (schema_to_html.py) uses PyYAML
	module to parse vdsm-api.yml. This script also assumes,
	that PyYAML module is built with LibYAML support and
	fails if it is not. This patch adds compatibility
	for PyYAML without LibYAML.

	Easiest way to fall into that situation is to
	pip install pyaml. For example on RHEL7.3 PyYAML
	package doesn't includes dependency on libyaml-devel,
	so pip will build it's PyYAML without libyaml and
	that custom installed PyYAML will override system one.

2016-12-16  Irit Goihman  <igoihman@redhat.com>

	vdsm: remove 3.6 supported engine
	vdsm 4.0 and above doesn't support 3.6 engine, although it reports
	it as supported, causing failures to appear.
	3.6 cluster level shouldn't be removed for now.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1403846

2016-12-16  Shahar Havivi  <shaharh@redhat.com>

	v2v: ova reads the wrong size on disk
	we use the size attribute for the actual size of the ova which is the
	size on disk.
	when converted via qemu-img the actual size is bigger since vmdk came
	zipped.

	Bug-Url: https://bugzilla.redhat.com/1382404

2016-12-16  Francesco Romani  <fromani@redhat.com>

	tests: spec: actually ship test data
	Remove ugly FIXME in the spec file and ship the container
	test data in the tests package.

2016-12-16  Shahar Havivi  <shaharh@redhat.com>

	v2v: support for block devices
	extended support for block devices for KVM and VMWare.
	currently we do support block devices that exported as file in libvirt:
	<disk type='file' device='disk'>
	  <source file='...'/>
	  ...

	Added support for type block:
	<disk type='block' device='disk'>
	  <source dev='/dev/mapper/...'/>
	  ...

	Bug-Url: https://bugzilla.redhat.com/1378340

2016-12-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Checking if stat[balloonInfo] is not empty in vmstat metrics
	Fixing KeyError when memory balloon device is not enable. Apparently the
	key always exists, but when disabled its value is empty dict.

2016-12-15  Nir Soffer  <nsoffer@redhat.com>

	hsm: Fix SDM.set_volume_generation
	When SDM.set_volume_generation was written the way to get the pool id in
	sdm verbs was self._get_hostid(), but recently this helper was removed
	and now the pool id is access using self._pool.id. Fixing pool id
	revealed that the new api module was not imported.

	tests: Add tests for poll and wait failures
	Any failure in terminating context manager should raise
	TerminatingFailure. Add tests for poll() and wait() failures.

	Since we may monkeypatch poll, wait, and kill, save the original methods
	in setUp and use only the saved methods in the tests.

	tests: Add test for terminating a terminated process
	In this case we should find that the process has terminated and waited,
	and do not invoke kill().

	tests: Add tests for waiting on a zombie process
	If a process was terminated but not waited, terminating context manager
	should wait for the process.  Add a test and a helper for waiting until
	process becomes a zombie.

	tests: Refine TerminationTests names
	- All the test are testing termination, there is no need to repeat
	  the class name in the test names.
	- Use the tests name to describe the situation tested; terminating a
	  running process, or kill failure.
	- Rename fake_kill to fail, describing better what this function is
	  doing.

	blockSD: Fix error in error handler
	Unfortunate misspelling was hiding the real error if a volume run link
	cannot be removed. Fix the wrong attribute name.

	    if e.error != errno.ENOENT:
	    AttributeError: 'exceptions.OSError' object has no attribute 'error'

	This fix will reveal the real error found in the system tests, which may
	be an expected condition (link does not exists) or something else.

	Bug-Url: https://bugzilla.redhat.com/1405115

2016-12-15  Francesco Romani  <fromani@redhat.com>

	hostdev: fix libvirt device hashing
	Due to one overlook, we used to hash one genexpr object,
	not the actual libvirt content. This caused MUCH more frequent
	hash collisions.

2016-12-15  Ala Hino  <ahino@redhat.com>

	Cold Merge: Implement SDM.merge verb
	Use qemuimg commit to do the merge.  This is an SDM job that runs on any
	host.

	Bug-Url: https://bugzilla.redhat.com/1246114

	Cold Merge: Implement StoragePool.finalizeMerge
	This operation is required after (cold) merge completes.  Finalize will
	update qcow metadata and the vdsm volume metadata to reflect that a
	volume is being removed from the chain.

	Bug-Url: https://bugzilla.redhat.com/1246114

	Cold Merge: Implement StoragePool.prepareMerge
	This operation is required before performing (cold) merge.  Prepare
	merge will calculate the required allocation for base volume, extend the
	base volume or enlarge it (if the size of volume being removed is larger
	than the base size), and mark it as ILLEGAL.

	Note that testing extending of raw volumes is broken now, since we
	cannot create a storage domain object in the tests. We will have to fix
	this later, and currently this mus the verified manually.

	Bug-Url: https://bugzilla.redhat.com/1246114

2016-12-15  Adam Litke  <alitke@redhat.com>

	sdm: Add set_volume_generation verb
	In certain error scenarios we may want to update a volume's generation
	ID before doing something else with the volume.  For example, we may
	want to bump the generation before deleting a volume when we think there
	may be an outstanding job related to this volume on an unresponsive
	host.  Bumping the generation will effectively "fence" that outstanding
	job since the job will fail when attempting to use a stale generation
	value at any time in the future.

2016-12-15  Michal Skrivanek  <michal.skrivanek@redhat.com>

	libvirtconnection: revert temporary CentOS workaround
	Revert temporary CentOS workaround 4ce65551db9 (libvirt: Workaround
	missing VIR_DOMAIN_EVENT_ID_JOB_COMPLETED).

	The workaround is not needed with the current libvirt version.

2016-12-14  Adam Litke  <alitke@redhat.com>

	storage: Add is_block() helper to VolumeManifest objects
	The cold merge verb needs to understand if it is working with a file
	volume in order to avoid some calculations that are necessary only for
	block volumes.  Add a simple is_block helper function to the
	VolumeManifest objects to enable this checking.

2016-12-14  Dan Kenigsberg  <danken@redhat.com>

	py3: storage.persistent: take ifilter from six

2016-12-14  Martin Polednik  <mpolednik@redhat.com>

	hostdev: cache parsed device tree
	Even after optimizations, parsing the whole device tree does consume
	nontrivial amount of time. Engine asks for it on VM start, maintenance
	etc. but it rarely changes.

	We therefore hash our libvirt result and only parse the tree if the
	result has somehow changed.

	Bug-Url: https://bugzilla.redhat.com/1398572

2016-12-14  Ala Hino  <ahino@redhat.com>

	Cold Merge: Replace self._get_hostid() with self._pool.id

2016-12-14  Edward Haas  <edwardh@redhat.com>

	net: NM - Introduce ifcfg2connection mapper
	Given an ifcfg file, return the corresponding NM connection info.
	The connection info includes the UUID and the connection path.

	Note: The underlying dbus interface used is not documented. However, it
	is used in the ifcfg initscripts, therefore we expect it to be supported
	in the future.
	The integration tests give an initial protection in case this API is
	changed.

	net: Move prefix2netmask from netinfo to ip package

	net: NM - Introduce a higher level abstraction layer
	Introducing nm.networkmanager as another abstraction layer, hiding the
	implementation details (currently through dbus).

	In this patch, a device class is exposed, enabling the caller to fetch a
	device connections, the active connection and cleanup the connection by
	deleting all non-active connections.

	The initialization of the NM package is also exposed: Opening a
	connection to the system bus.

	net test: Rename ip_test module to ip_validator_test

2016-12-14  Nir Soffer  <nsoffer@redhat.com>

	xleases: Make VolumeLeaseStatus more general
	VolumeLeaseStatus was a simple enum, hiding useful information about a
	sanlock lease, such as the host ids owning the lease, the lease mode
	(shared or exclusive), and the lease version. The additional information
	can be used for better error handling, easier debugging, or improved
	logging.

	Note that currently we use only exclusive leases, and sanlock python
	binding does not report the lease mode, so the reported "shared" state
	is always False.

	Replace the enum with a map exposing the lease details, and rename to
	LeaseStatus so we can use it also for external leases.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-14  Milan Zamazal  <mzamazal@redhat.com>

	virt: Prettify domain and some other XMLs
	etree formats XML on a single line, unless there are newlines in the parsed XML
	(which is handled as text content by etree).  The compact form is not very
	readable and there is apparently no way to make the output different with
	etree.

	This patch adds an option to make the XML output multiline and indented.
	We use the already available manual formatting since it's probably not worth
	using external libraries (such as bs4 or lxml) just for that and it seems to be
	at least one order of magnitude faster than reformatting using minidom.

	We use the pretty formatting at some places where minidom `toprettyxml' was
	previously used: domain XML (to make it formatted in the log) and where passed
	to hooks (in case someone assumes formatted XML in them).

2016-12-14  Nir Soffer  <nsoffer@redhat.com>

	blockSD: Improve logging when extending lv

	storagefakelib: Add support for extending lvs
	Add support for FakeLVM.extendLV, required for testing cold merge.

2016-12-14  Adam Litke  <alitke@redhat.com>

	tests: Fix make_block_volume initial lv size
	Our fake block volume creation function has been ignoring the prealloc
	parameter by always creating an LV the full size of the volume.  We want
	to use this code to test situations where the volume might be
	thin-provisioned.  Use BlockVolumeManifest.calculate_volume_alloc_size()
	to get the proper lv size based on the given parameters.

2016-12-14  Nir Soffer  <nsoffer@redhat.com>

	image: Pass discard when merging base cow volume
	Commit 67bac28162c6 (storage: add discard argument to all related flows)
	missed the flow deleting the temporary volume when merging a base cow
	volume. Add the missing parameter discard argument.

2016-12-14  Edward Haas  <edwardh@redhat.com>

	net: Extract ip.address tests to its own test module
	Splitting the ip_test module in order to expand ip related tests.
	This patch extracts the ip address tests to their own module.

2016-12-13  Ala Hino  <ahino@redhat.com>

	Cold Merge: Add base_generation parameter to SubchainInfo
	Generation support is used to enhance error handling for jobs on
	non-responsive hosts and decide about job status: started, didn't start,
	failed or completed. Based on generation and volume lease, we could
	decide whether to fence job.

2016-12-13  Francesco Romani  <fromani@redhat.com>

	virt: log state-changing methods
	Add explicit logging for the virt verbs that change the state
	of the system.

	We do NOT piggyback on api.method because:
	1. api.method's main job is to translate return values and
	   exception in response objects, not to log.
	   Log is a secondary task in api.method, while here is the mai
	   one.
	2. we need a separate log target (potentially per-method),
	   and we don't want to make api.method more complex.
	3. we need a different log level with respect to api.method.
	   api.method logs debug/devel-oriented information, here
	   we want to log information that devels *and* admins could
	   benefit from.

2016-12-13  Leon Goldberg  <lgoldber@redhat.com>

	check-merged: global variable left unchanged due to tee pipe
	components of a pipeline are executed in a subshell, causing any global
	variable assignments to remain unchanged in the main shell.

	as such, modifications to the global variable "failed" (which dictates
	check-merged's return value) in the main shell were failing to occur.

	instead of relying on a global variable, run_func_tests returns its own
	return code which is later used to determine the return code of
	check-merged.

	additionally, the two test batches were separated into two lago shells;
	running in a single shell caused the latter batch to override the result
	of the former, consequently causing the return value of the entire
	testing process to be solely determined by it.

2016-12-13  Idan Shaby  <ishaby@redhat.com>

	storage: add discard argument to all related flows
	This patch adds the possibility to pass a new argument, "discard", to
	flows that might remove a logical volume.

	Up until now, these flows got the argument "postZero" which caused vdsm
	to post zeros on the lv right before removing it. From now and on, these
	flows will also get the discard parameter, so that the lv can now be
	discarded after it is zeroed (if postZero is true) and only then removed.

	Note that the config value discard_enable that was added in patch
	33af18b16 will still function, but the recommendation is to use the new
	parameter rather than this config value as it will be removed in the
	future.

	Bug-Url: https://bugzilla.redhat.com/1342919

2016-12-13  Liron Aravot  <laravot@redhat.com>

	Adding the SDM.reduce_domain verb
	This patch defines the SDM.reduce_domain verb that will be
	used to reduce a device from a block domain.
	This API should be used after the data has been moved from the device
	using the SDM.move_domain_device verb.

2016-12-13  Maor Lipchuk  <mlipchuk@redhat.com>

	image: Change attribute name qcow2Compat to dstQcow2Compat.

2016-12-13  Liron Aravot  <laravot@redhat.com>

	Adding the SDM.move_domain_device verb
	This patch defines the SDM.move_domain_device verb that will
	be used to move data from a block domain device to other devices
	that are part of the domain.
	This verb will be used currently prior to reducing a device from a
	storage domain.

	Currently throws UnsupportedOperation exception till BZ 1403836 will be
	resolved.

	StorageDomain.getInfo - report vg metadata device for block sd
	When a block storage domain is created, we disable the lvm metadata
	on all the domain pvs except to the first one.

	As we intend to add support for operations that modify the vg
	stracture (like reducing devices) - we want to prevent those
	operations from being made on the device containing the vg metadata.

	This patch adds the reporting of that info, so that the engine can
	leverage the info to block such operations from being performed.

	StorageDomain.getInfo - report the first pv of the metadata lv
	This patch adds the report of the first pv of the domain metadata lv
	(for block domains) to StorageDomain.getInfo().
	Currently we assume that the metadata lv is created on the first extant
	of the device and verify that when performing different operations on
	the domain.

	As we intend to add support for operations that modify the vg
	stracture (like reducing devices) - we want to prevent those
	operations from being made on the first device of the metadata lv
	as they might cause the metadata lv first extant to be changed from
	0.

	This patch adds the reporting of that info, so that the engine can
	leverage the info to block such operations.

2016-12-12  Ala Hino  <ahino@redhat.com>

	Cold Merge: Remove SDM.prepare_merge and SDM.finalize_merge
	Initially, we thought we could run these verbs on the SPM as SDM jobs,
	but the infrastructure both at vdsm and engine side doesn't support this
	now. These verbs will be defined as SPM verbs. See I2689e56 (Cold Merge:
	Change prepare and finalize merge verbs definition).

	Cold Merge: Change prepare and finalize merge verbs definition
	Initially, we thought we could add the prepare and finalize verbs as SDM
	jobs and run these jobs on the SPM. See commit f3d0a2ce (Cold Merge:
	Introduce cold merge related verbs). However, the current infrastructure
	both at engine side and at vdsm side doesn't support running SDM jobs on
	the SPM. Thus, in this patch we define prepare and finalize verbs as SPM
	verbs.

	Following is a description of the cold merge related verbs:
	1. StoragePool.prepareMerge (runs on SPM)
	   a. Calculates required allocation for base volume
	   b. Extends the base volume
	   c. Mark the base volume as ILLEGAL

	2. SDM.merge (runs on any host)
	   Executes qemuimg commit to perform the merge

	3. StoragePool.finalizeMerge (runs on SPM)
	   a. Updates qemu chain using qemuimg rebase -u
	   b. Updates vdsm chain (similar to Image.syncVolumeChain)
	   c. Mark the volume as LEGAL

	Bug-Url: https://bugzilla.redhat.com/1246114

2016-12-12  Francesco Romani  <fromani@redhat.com>

	vmxml: test surprising behaviour of find_first
	During the resolution of rhbz#1400137 , we stumbled on
	a possibly surprising behaviour of vmxml.find_first:
	We needed to traverse a nested structure like

	  <disk>
	    <source ... >...</source>
	    <backingStore>
	      <source ... >...</source>
	      </backingStore/>
	    </backingStore>
	  </disk>

	If we use vmxml.find_first, all worked fine until we run it
	again in the innermost element, like

	  new_elem = vmxml.find_first(elem, 'backingStore')

	in this case we always had as result the innermost element itself,
	instead of None or one exception. This lead to an infinite loop.

	In this patch we add a @brokentest to document this behaviour.

	Related-To: https://bugzilla.redhat.com/1400707

	vm: storage: fix _diskXMLGetVolumeChainInfo
	During the transition to etree, _diskXMLGetVolumeChainInfo
	broke, and now it stuck in one infinite loop.
	This patch fixes that.

	Related-To: https://bugzilla.redhat.com/1400137
	Bug-Url: https://bugzilla.redhat.com/1400707

2016-12-12  Martin Polednik  <mpolednik@redhat.com>

	hostdev: properly utilize memoization
	Previously, memoization would've failed due to different 'self' arg
	passed as Connection class is re-instantiated for each get() call.

	By providing similar get classmethod, we can work around that and add
	more accurate caching tests.

2016-12-12  Dan Kenigsberg  <danken@redhat.com>

	flake8: E123 closing bracket does not match indentation of opening bracket's line

	flake8: W503 line break before binary operator

	flake8: E241 multiple spaces after ','
	This patch makes it necessary to abide with pep8 E241, even though it
	makes a couple of tests a bit more ugly.

	flake8: E226 missing whitespace around arithmetic operator
	This patch makes it compulsory to abide to pep8 when it comes to
	whitespace around arithmetic operators. Most of the code is already
	compliant, but this patch fixes a few glitches.

	v2vTests: drop dead and broken function

2016-12-11  Douglas Schilling Landgraf  <dougsland@redhat.com>

	certificates: Remove persist/unpersist calls
	persist/unpersist calls are only needed in oVirt Node Vintage.
	Currently, oVirt Node Next doesn't require such approach.

2016-12-11  Petr Horáček  <phoracek@redhat.com>

	net: do not start openvswitch
	With this patch we do not try to start openvswitch.service before
	vdsm-network-init.service anymore. If a user wants to use OVS
	switch, it is required to enable openvswitch.service explicitly.

2016-12-11  Leon Goldberg  <lgoldber@redhat.com>

	automation: extracting lago serve/run tests portion to a separate function
	improving readability by dedicating a function to the testing process.

2016-12-10  Irit Goihman  <igoihman@redhat.com>

	after_vm_destroy.py: migrate to jsonrpc
	vdscli is deprecated and replaced by jsonrpc client

2016-12-10  Martin Polednik  <mpolednik@redhat.com>

	tests: mark test_signal_timeout as failing on CI
	The test is not reliable and sometimes causes jenkins failure.

2016-12-10  Nir Soffer  <nsoffer@redhat.com>

	xleases: Move LeasesVolume.format to format_index
	Formatting an index should not be part of the LeasesVolume API because
	of two reasons:
	- It is dangerous operation, needed only when creating a volume
	- If is not atomic operation, writing the whole index at once, while
	  other VolumeIndex operation are writing single sector at a time.

	Use the new function in the tests instead of reinventing it.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-10  Petr Horáček  <phoracek@redhat.com>

	vm_migrate_hook: skip interface handling for customized VMs
	If VM has one of blacklisted 'custom' properties, we should skip
	interface migration translation. Migration specifics must be handled
	by external provider itself.

	Based on https://gerrit.ovirt.org/#/c/63686/1

2016-12-09  Edward Haas  <edwardh@redhat.com>

	net test: Marking nmdbus tests as functional
	The nmdbus tests are integration tests that require access to dbus
	and a running NM.
	Unfortunatly, dbus socket or the NM service may not be available on
	CI machines. Therefore, these tests are taken out from the 'check' run
	and moved to the functional run.

2016-12-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configurators: remove persist call
	persist and unpersist calls are deprecated.
	oVirt Node Next doesn't require such approach.

	upgrade: remove persist call
	persist and unpersist calls are deprecated.
	oVirt Node Next doesn't require such approach.

2016-12-09  Edward Haas  <edwardh@redhat.com>

	build: Fix check-unit to run only unit tests

	net: NM - Support the deletion of a connection

2016-12-09  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make sure to report 100% progress on completed migrations
	We set migration progress to 100 in SourceThread when the migration is
	successfully completed.  However there are timing issues and we can report less
	than 100 when we report downtime from onJobCompleted.  Moreover the source
	thread is not running if Vdsm got restarted during the migration and then 0
	progress is reported.

	This patch ensures that we always report 100% progress when downtime is
	reported.

	virt: Retrieve migration downtime from onJobCompleted
	We used to retrieve migration downtime from jobStats call performed each time
	migration stats were requested.  This had several problems:

	- Races, since nothing prevented multiple getStat calls after a finished
	  migration and the domain might no longer exist.
	- Unnecessary libvirt calls on each getStat call.
	- We didn't distinguish between pre-copy and post-copy migrations in getStat,
	  possibly resulting in overwriting the downtime value for post-copy
	  migrations.

	We have a better mechanism from libvirt now: onJobCompleted callback that
	passes the needed information to us directly.  We already use it for post-copy
	migrations, let's use it for pre-copy-only migrations as well.

	We send an updated migration progress event from there immediately.  Engine is
	going to use the migration progress events exclusively instead of
	getMigrationStatus API call starting from 4.1.  We add a comment to
	getMigrationStatus about that.

2016-12-09  Edward Haas  <edwardh@redhat.com>

	net: NM - Introduce nm.nmerrors to expose well defined errors

2016-12-09  Leon Goldberg  <lgoldber@redhat.com>

	tests: decorating test_repeating_if_raises with broken_on_ci
	at times, the test inexplicably fails during ci:

	FAIL: test_repeating_if_raises (periodicTests.PeriodicOperationTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	"...periodicTests.py", line 135, in test_repeating_if_raises
	self.assertTrue(completed)
	AssertionError: False is not true

2016-12-09  Petr Horáček  <phoracek@redhat.com>

	net: mark netlink test_events_keys as broken on CI
	This test is known to be fragile on Jenkins CI. Marking it as
	broken_on_ci, since we are not hard dependent on the events order
	anymore.

	net: drop special ovirt-node handling from ifcfg
	Bug-Url: https://bugzilla.redhat.com/1349391

2016-12-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configurators: multipath - remove persist/unpersist calls
	persist and unpersist calls are deprecated.
	oVirt Node Next doesn't require such approach.

	toolTests: Remove isOvirt test
	At this moment, we should not have differences between
	oVirt Node Next and CentOS and RHEL.

2016-12-08  Nir Soffer  <nsoffer@redhat.com>

	dockerfile: Add dbus-python
	This package is required now for nmdbus tests. The package was added to
	automation/check-patch.packages.* but not to the docker files.

	This should fix the travis build on Fedora.

	xleases: Support SPM verbs without pool uuid
	Legacy SPM verbs required a pool uuid and used to access the single pool
	object. Replace the HSM.pools dict used to keep the one and only pool
	with a HSM._pool class attribute.

	To avoid the ugliness and racy self._pool is None checks, the pool is
	always set; when we are connected to a storage pool, it will be a
	StoragePool instance, and when we are disconnected, a DisconnectedPool
	instance.

	A DisconnectedPool object is a dummy storage pool that raises
	StoragePoolNotConnected to make sure code is not calling the storage
	pool when not connected.

	Remove HSM._get_hostid helper since now self._pool.id have the same
	effect.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-08  Douglas Schilling Landgraf  <dougsland@redhat.com>

	storage: hba add EnvironmentError exception
	On CentOS 7.2, oVirt Node Next is not getting UP due
	missing file /etc/iscsi/initiatorname.iscsi.
	Replacing OSError with EnvironmentError as in Python2 IOError
	and OSError inherance from it. In Python3, EnvironmentError was
	merged in OSError and IOError is an alias to OSError.

2016-12-08  Maor Lipchuk  <mlipchuk@redhat.com>

	Introduce sdm.api.amend_volume
	Introduce the sdm amend opertion for a volume.

	The operation amends the volume with specific parameters described
	in the vol_attr.
	Currently the only possible attribute that is allowed to be changed
	is the volume qcow2 compat version.

	The volume that is allowed to be amended is a qcow volume which is
	not a SHARED volume (A template volume) and it is on a V4
	storage domain.

	Bug-Url: https://bugzilla.redhat.com/827529

2016-12-08  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: encode mount point to utf-8 string
	selinux python bindings take only a char * as input, not a unicode
	string (C.f. https://bugzilla.redhat.com/908916). For this reason, we
	need to encode a potential unicode string into a utf-8 char string.

	Note: Strings are encoded as unicode strings in jsonrpc. It works
	fine with xmlrpc.

	Bug-Url: https://bugzilla.redhat.com/1402248

2016-12-07  Irit Goihman  <igoihman@redhat.com>

	client: prettify results
	results are returned as json dictionary so there is no
	need to print them with pprint, since it causes the result to be
	printed with u' preffix:
	    {u'acpiEnable': u'true',
	    u'appsList': [],
	    ...

	While json.dumps prints the dictionary in a better format:
	    "displayInfo": [
	            {
	                "tlsPort": "5900",
	                "ipAddress": "10.35.1.70",
	                "port": "-1",
	                "type": "spice"
	            }
	        ],

2016-12-07  Martin Polednik  <mpolednik@redhat.com>

	tests: mark test_abort_during_copy as failing on CI
	The test is not reliable and sometimes causes jenkins failure. The
	cause seems to be dependency on storage operation completing within
	given time.

2016-12-07  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove invalid pyc file tests
	moduleloader test was creating empty (invalid) "a.pyc" file. Existance
	of an invalid "a.pyc" file may casue the test to fail if "a.pyc" file is
	newer then the "a.py". This depends on the resolution of the file system
	timestamps and the timing.

	Since import of pyc files is not the subject of this test, I removed the
	pyc file from the test data.

2016-12-07  Douglas Schilling Landgraf  <dougsland@redhat.com>

	hooks: remove persist/unpersist calls
	All persist/unpersist calls are deprecated now from the
	oVirt Node Legacy days. This patch removes the calls
	from hooks perspective.

2016-12-07  Edward Haas  <edwardh@redhat.com>

	net test: NetworkManager - Connection lifetime
	Examine a connection lifetime, from its creation to how it affects the
	virtual device it controls.

	Bond has been used as the virtual device for which the connection is
	defined.
	(dummy devices cannot be created by NM explicitly)

	net: NetworkManager python binding - Device
	Expose the Device (DBUS) interface.

	net: NetworkManager python binding - Active Connections
	Expose the active connections (DBUS) interface.

	net: NetworkManager python binding - Connection Settings
	Introducing NM python binding through DBUS for VDSM.
	Starting by exposing the connection settings interface, through which
	it is possible to list and iterate through the available connections.

	In NM terms, a connection is a configuration setting instance of a given
	device.

	The driver implementation uses dbus-python package (based on DBus-GLib).
	It is an obsolete package, new applications should use pydbus, txdbus or
	GDBus/QtDBus bindings.
	Nevertheless, it has been chosen for the time being due to its
	availability under most distros (RHEL7 as an example).

2016-12-07  Nir Soffer  <nsoffer@redhat.com>

	xleases: Update leases volume format
	The new format will allow a future sanlock version implementing an index
	to use current xleases volumes. The volume format includes now lockspace
	area and private sanlock resource for synchronizing access from multiple
	hosts.

	The modified field was replaced with the offset of the lease to make it
	easy to inspect storage using standard tools such as less and grep.

	Record format uses now fixed width strings with padding, and formatting
	and parsing use the struct module, simplifying the code and avoiding
	stupid errors.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-06  Francesco Romani  <fromani@redhat.com>

	containers: never mark them as unresponsive
	Let's avoid false positives until we have proper monitoring in place.

	containers: docker_net_inspect requires raw=True
	We expect the output of any *inspect* command to be
	a valid JSON string, not a list of strings.
	So, let's require raw output from execCmd.

	containers: return known error on metadata()
	container "domains" will not support metadata.
	So, instead of return unexpected "unsupported" error,
	let's always respond there is no metadata.

	Vdsm already knows how to gracefully handle this error.

	container: downgrade log message to debug
	This information is useful only for developers.

2016-12-06  Phillip Bailey  <phbailey@redhat.com>

	caps: Report hosted engine deployment status
	Report whether hosted engine has been deployed on the host by
	checking for the presence of the hosted engine configuration file via
	ovirt-hosted-engine-ha.

	Bug-Url: https://bugzilla.redhat.com/1392957

2016-12-06  Martin Polednik  <mpolednik@redhat.com>

	hostdev: optimize _process_productinfo
	Processing of productinfo is currently one of the slower tasks.
	Biggest reason for that is the number of XML lookups. We optimize the
	function to do a single lookup for element's children and iterate over
	these.

	The result is approximately 1/3 of the original computing power
	required; profiling done with 30127 devices to process:

	before:
	ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	30127    0.093    0.000    0.976    0.000 /usr/lib/python2.7/site-packages/vdsm/hostdev.py:311(_process_productinfo)
	after:
	ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	30127    0.054    0.000    0.356    0.000 /usr/lib/python2.7/site-packages/vdsm/hostdev.py:311(_process_productinfo)

	Bug-Url: https://bugzilla.redhat.com/1398572

	hostdev: optimize _process_numa
	Only PCI MMIO space resides on specific NUMA nodes. Not relevant for
	other devices.

	Bug-Url: https://bugzilla.redhat.com/1398572

	hostdev: optimize _process_assignability
	We only properly process assignability for PCI devices while pretty
	much ignoring others.

	Before:
	ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	3127    0.008    0.000    0.044    0.000 /usr/lib/python2.7/site-packages/vdsm/hostdev.py:235(_process_assignability)

	After:
	ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	97    0.000    0.000    0.001    0.000 /usr/lib/python2.7/site-packages/vdsm/hostdev.py:235(_process_assignability)

	Bug-Url: https://bugzilla.redhat.com/1398572

	hostdev: precompute processor map
	The processor map is computed for each device individually. Since it
	doesn't change at runtime, we can precompute it and saves precious CPU
	time.

	Bug-Url: https://bugzilla.redhat.com/1398572

	hostdev: unmark slowtest
	The test is no longer slow.

	time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
	test_3k_storage_devices hostdevTests.py
	nose.config: INFO: Ignoring files matching ['^\\.', '^_',
	'^setup\\.py$']
	hostdevTests.HostdevPerformanceTests
	    test_3k_storage_devices                                     OK

	----------------------------------------------------------------------
	Ran 1 test in 0.337s

	OK

	real    0m0.696s
	user    0m0.640s
	sys     0m0.056s

	Bug-Url: https://bugzilla.redhat.com/1398572

2016-12-06  Francesco Romani  <fromani@redhat.com>

	config: docs: container tunables are provisional
	Document that container-related config options
	are provisional - not part of the stable contract
	and can change in the future releases.

2016-12-06  Leon Goldberg  <lgoldber@redhat.com>

	tests: run functional tests on check-merged

2016-12-06  Dan Kenigsberg  <danken@redhat.com>

	janitorial: trim py3 blacklist
	schemaTest was dropped in commit f11b92, but was reintroduced in fa75b0
	due to a rebase glitch, probably.

	py3: make some of network/tc_test pass
	Non-privileged tests of this module now pass under Python 3. root-only
	tests still fail due to a bigger problem in our netlink package.

2016-12-06  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add caching of device tree
	Previously, we've kept asking libvirt about devices and parsed them as
	we went. This had unfortunate effect of O(n^2) complexity with O(n)
	libvirt calls.

	Now, we are able to accomplish what we previously did in O(n) time
	with a O(1) calls.

	Previous run: (interrupted, too boring)

	time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
	test_3k_storage_devices hostdevTests.py
	nose.config: INFO: Ignoring files matching ['^\\.', '^_',
	'^setup\\.py$']
	hostdevTests.HostdevPerformanceTests
	    test_3k_storage_devices                                     ^C
	----------------------------------------------------------------------
	Ran 1 test in 506.604s

	OK

	real    8m26.956s
	user    8m26.572s
	sys     0m0.385s

	Run after caching:

	time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
	test_3k_storage_devices hostdevTests.py
	nose.config: INFO: Ignoring files matching ['^\\.', '^_',
	'^setup\\.py$']
	hostdevTests.HostdevPerformanceTests
	    test_3k_storage_devices                                     OK

	----------------------------------------------------------------------
	Ran 1 test in 2.656s

	OK

	real    0m3.010s
	user    0m2.951s
	sys     0m0.060s

	(approx ~1.9s for the call itself)

	Bug-Url: https://bugzilla.redhat.com/1398572

2016-12-06  Francesco Romani  <fromani@redhat.com>

	containers: config: drop unused tunable
	We don't use this tunable, it's a relic of the rkt days.

2016-12-06  Leon Goldberg  <lgoldber@redhat.com>

	autoconf: added missing test module to spec file
	python-ipaddress was missing causing multiple tests to be skipped

2016-12-06  Petr Horáček  <phoracek@redhat.com>

	virt network: correctly check if element is present
	We must compare found element to None, as XML element without a body
	is evaluated as zero.

2016-12-06  Dan Kenigsberg  <danken@redhat.com>

	net test: ci is fine, link_bond_test fails on py3
	I mistakenly removed it from the python3 blacklist, and mistakenly
	marked it as broken on ci. Where in fact it is broken since our netlink
	subpackage does not support python 3.

2016-12-05  Nir Soffer  <nsoffer@redhat.com>

	tests: Increase timeouts for tmap tests
	The CI slaves are so overloaded that 0.1 second is not enough for timing
	sensitive tests. Increase the timeout grace time to 0.5 seconds.

	Replace assertTrue(low < value < high) with assertLess(vale, hit) and
	assertGreater(value, low), having more useful error message when they
	fail.

2016-12-05  Dan Kenigsberg  <danken@redhat.com>

	py3: tests: jsonRpcHelper: minor modernization
	Take xmlrpclib and httplib from six.

	py3: v2vTests: replace StringIO.StringIO
	io.StringIO is the python3-compatible class, let's use it. The module is
	still not importable under Python 3.

	py3: vmMigrationTests: minor modernization
	One instance of izip was not taken from six. Test still fails under
	Python 3 due to much bigger issues with our clientIF.

2016-12-05  Martin Polednik  <mpolednik@redhat.com>

	config: only sample numa every 10 minutes
	As of engine change I61c2e5aea1a76f6a629842e6e912b147b9cbb8be[1],
	the information is no longer even used in engine. To keep backwards
	compatibility, we change the sample rate to 10 minutes (600 seconds).

	This serves as easy, safe and backportable change - we can remove the
	code later.

	[1] https://gerrit.ovirt.org/#/c/60881/

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1396910

2016-12-05  Nir Soffer  <nsoffer@redhat.com>

	tests: Terminate running jobs on exit
	When the test runner terminated, we terminated the test watcher, but
	forget to terminate the watcher sleep child process. This caused a delay
	of more than 9 minutes after the tests completed when running in mock.

	Now we register exit trap handler to terminate all jobs in both the main
	test process and the watcher sub process.

	Registering trap handler in a subshell does not work on EL7, so the
	watcher code was extracted into a py-watch program.

	With this change, vdsm check-patch builds takes 9 minutes instead of 19.

	xleases: Robust sanlock resources management
	Treat sanlock resources on storage as the one and only truth.  Before
	creating or removing sanlock resources, mark the lease record as stale.
	If sanlock operation succeeded, mark the lease record as used or free.

	If vdsm is killed, the host loses power or sanlock operation fails,
	storage can be in this state:

	- No change on storage
	- Stale lease record, sanlock resource may exists or not
	- Used lease record, sanlock resource exists
	- Free lease record, sanlock resource does not exist

	The next time we try to create or remove the same lease_id we can repair
	the stale lease record by reading the sanlock resource from storage.
	Repairing stale record is not implemented yet.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-05  Michal Skrivanek  <michal.skrivanek@redhat.com>

	gitignore: Add tests/.cache
	commit 9babd7ee8dfd (tests: Add working import check) introduced a
	leftover directory. This directory is created by pytest when run the new
	import tox env

2016-12-05  Francesco Romani  <fromani@redhat.com>

	vm: snapshot: fix xml formatting
	This flow was left unupdated during the etree conversion.

2016-12-04  Nir Soffer  <nsoffer@redhat.com>

	xleases: Add failing tests for storage operations
	To handle failures during lease storage operations, we need to mark a
	lease record in the index a stale before we try to change storage.  This
	patch add the failing tests and mark them as broken.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Use six.PY2 instead of reinventing it
	We used our own PY2 constant, but we are using now six.

	Bug-Url: https://bugzilla.redhat.com/1317429

	xleases: Add and remove sanlock resource
	When adding a lease, write a sanlock resource. When removing a lease,
	since we don't have yet a sanlock API for removing a resource, write a
	dummy resource with empty lockspace and resource name.

	Sanlock is not available yet on python 3, but this module and the tests
	are compatible with python 3 using fakesanlock.

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix gluster files installation after upgrade
	The installation of gluster cli is under vdsm-python.rpm only (this
	fixes conflict in [1] which installs the files partially in vdsm.rpm),
	the rest of gluster installation still in vdsm-gluster.rpm

	[1] https://gerrit.ovirt.org/#/c/57530/15/vdsm.spec.in

2016-12-04  Dan Kenigsberg  <danken@redhat.com>

	py3: storage_resourcemanager_test: take _thread from six
	The module is yet far from passing under Python 3.

2016-12-04  Francesco Romani  <fromani@redhat.com>

	docker: configuration: factor in a method
	To make the code tidier with no changes in behaviour.

2016-12-04  Dan Kenigsberg  <danken@redhat.com>

	py3: make fileUtilsTests pass on Python 3
	This patch takes StringTypes from six.

2016-12-03  Michal Skrivanek  <michal.skrivanek@redhat.com>

	autoconf: drop unused options from autoconf and spec
	They used to be needed in downstream builds, they're not anymore. These
	options cannot be used as they are right now and are not read anywhere.

2016-12-03  Phillip Bailey  <phbailey@redhat.com>

	Add ovirt-hosted-engine-ha package to key packages
	Add the ovirt-hosted-engine-ha package to the list of key packages
	whose installation status is reported in capabilities.

	Bug-Url: https://bugzilla.redhat.com/1392957

2016-12-03  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configfile: remove unpersist/persist calls
	persist/unpersist calls are only needed in oVirt Node Vintage.
	Currently, oVirt Node Next doesn't require such approach.

2016-12-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Move caps module to vdsm.host.caps
	This patch moves caps under lib.vdsm

2016-12-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Mark loop mount tests as broken on travis
	These tests fail now consistently on travis-ci although we did not
	change anything in the relevant code. Locally these tests pass
	consistently, and we did not see failure on jenkins for ages.

	Mark the test as broken on travis to unbreak the build. We will
	investigate this failure later.

	testValidation: Support @broken_on_ci for travis-ci
	Add a name argument to @broken_on_ci, so we can use it for both ovirt
	and travis CI.

	By default, @broken_on_ci(reason) will match ovirt CI, where the
	OVIRT_CI environment variable is defined (in check-patch.sh).

	To mark tests as broken on travis-ci, use:

	    @broken_on_ci("reason...", name=TRAVIS_CI)
	    def test_will_skip_on_failures_in_travis(self):
	        ...

	testValidation: Document brokentest and broken_on_ci
	Add docstring explaining how to use them correctly and warning about
	incorrect usage. This should fix the issue of using @brokentest without
	calling it for developers reading documentation, and will help to find
	and ban those who do not.

2016-12-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Destroy VM after post-copy migration failure
	As explained in the source code comment, we don't have currently a
	better option than to destroy the VM remnants after a failed post-copy
	migration.  This may change in future, if a failed post-copy migration
	recovery is available in libvirt/QEMU.

	How do we know that a post-copy migration failed?  On the source, the migration
	simply fails and the VM either remains in a paused status with a post-copy
	reason or it disappears.  On the destination, the VM can end up in the same
	states, but there are two more things to consider: 1. we may not be aware that
	we are in post-copy (if the corresponding event is not sent from libvirt before
	the migration fails); 2. if the VM gets paused, we receive
	VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED event.

	Disappeared VMs are already handled as general QEMU crashes.  We must
	specifically handle the paused case on both the ends, since this is a new
	situation and we want to destroy the VM immediately.  We also delete the VM
	object on the source, since Engine handles only the destination in post-copy
	migrations.

	Bug-Url: https://bugzilla.redhat.com/1354343

2016-12-02  Dan Kenigsberg  <danken@redhat.com>

	dockerfile: add magic and blivet
	Recent commit 4b8ce058 added new requirements to the import test, which
	broke travis tests. We need to rebuild our images.

2016-12-02  Adam Litke  <alitke@redhat.com>

	storage: Fix SDM indirection for StorageDomain.releaseHostId
	StorageDomain.releaseHostId has an awfully named parameter 'unused'
	which controls whether a hostId should be released when there are still
	active resource leases.  During the SDM indirection work I mistook this
	name as convention for a deprecated parameter and did not pass it along.
	This led to the default 'False' being used which is not always what we
	want.  This patch fixes that issue and should resolve issues with Hosted
	Engine and storage maintenance.

2016-12-02  Petr Horáček  <phoracek@redhat.com>

	virt: drop reasignment of 'driver'
	Fix a rebase problem introduced in
	Ia31d71f686aaa15e2b1f3064f700398fd4d6a5db.

2016-12-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't crash on migration stats retrieval after a finished job
	Nothing prevents asking SourceThread for migration stats any time.  Part of the
	migration stats retrieval is asking libvirt for completed job stats.  This is a
	racy situation after a migration completes and multiple invocations of that
	call may result in an exception when the VM is already gone.

	The libvirt call result is not critical and its unavailability shouldn't
	prevent us from getting other stats.  So let's catch the exception and just log
	it.

2016-12-02  Francesco Romani  <fromani@redhat.com>

	docker: network: use fallback for networking
	Add fallback option to use a network from per-host configuration
	if Engine doesn't send any explicit data.
	It is also useful to have some functionality until we figure out
	how to properly integrate the network configuration.
	With this patch, granted the docker network was configured before,
	container could use the networks.

2016-12-02  Nir Soffer  <nsoffer@redhat.com>

	testsValidation: Require a reason for broken tests
	Add reason positional argument to @brokentest and @broken_on_ci
	enforcing a reason for marking test as broken, and making it
	easier to specify one.

2016-12-02  Milan Zamazal  <mzamazal@redhat.com>

	virt: Destroy VM after a successful post-copy migration
	When we switch to post-copy migration, Engine starts monitoring the
	destination (once it receives the appropriate notification).  After the
	migration succeeds, Engine doesn't handle the source anymore and doesn't need
	information about VM status from it.  So when the post-copy migration finishes,
	we no longer keep the VM object and destroy it immediately.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Prevent hook races after a successful migration
	When a migration is successfully finished, it's handled in two places:

	1. In the source thread, where setDownStatus is called.
	2. In the life cycle event handling thread where post-migration hooks are
	   called.

	libvirt documentation doesn't specify when the life cycle event is emitted,
	whether before or after migrateToURI3 finishes.  This creates a possible source
	of races, when a VM may be destroyed before the hooks are run or finished.  The
	risk may be higher when we introduce (in a followup patch) automatic destroying
	of a VM on the source after a successful post-copy migration.

	We could solve the problem by moving the hooks to
	SourceThread._finishSuccessfully.  But then we could still miss other life
	cycle events, such as a notification about switching to post-copy migration,
	that must be processed in order to handle and finish the migration correctly.

	So a safer and simpler solution for now is introducing a synchronizing object
	ensuring that we don't finish the migration in the source thread until the
	final life cycle event is received and processed.

	Bug-Url: https://bugzilla.redhat.com/1354343

2016-12-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Avoid global state modification using forked
	moduleloader tests modify global state such as sys.path and sys.modules,
	and there is no way to restore the state using monkey-patching due to
	the complexity of import mechanism. Run the import modules tests in a
	sub process so they cannot modify the main process global state.

2016-12-01  Douglas Schilling Landgraf  <dougsland@redhat.com>

	rwtab.d: Remove vdsm entry
	oVirt Node Legacy is read-only file system, which required services
	to speficy writable dirs into /etc/rwtab.d schema.
	Currently, oVirt Node Next do not required such approach and can be
	removed.

2016-12-01  Nir Soffer  <nsoffer@redhat.com>

	xleases: Rename classes
	Rename Index to LeasesVolume as this class must also create and remove
	sanlock leases when updating the index.

	Rename IndexBuffer to VolumeIndex as this this the class that manage the
	index.

	xleases: Add fakesanlock module
	This module provides the FakeSanlock class, faking the sanlock module.
	This allows reading and writing resources without running a sanlock
	daemon.

	Example usage:

	    from fakesanlock import FakeSanlock

	    @MonkeyPatch(module, "sanlock", FakeSanlock())
	    def test_module(self):
	        ...

	xleases: Update index atomically
	When updating the index, first write changes to storage, and write the
	change the index only if the write was successful.

	When adding and removing a lease to the index, we use this flow:

	- copy the block where the record is located
	- write record to the block
	- dump block to storage (atomic operation)
	- write record to index

	This keeps the index valid after storage write errors.

	xleases: Add failing tests for negative flows
	Add tests for read and write failures. The write failure tests are
	broken since we don't implement updates atomically yet.

	xleases: Improve testing helpers
	Add an option to create records in a new index, so the test can minimize
	assumptions about the implementation such as record format.

	xleases: Report record info in Index.leases()
	This is mainly for the tests and may be be useful for debugging.

	xleases: Introduce the xlease module
	This module manage external leases which are not attached to a volume.
	These leases will be used for vm leases. External leases can also be
	used for other scenarios when you don't have a volume or a volume is
	on a storage not supporting leases.

	External leases are stored in the xleases special volume. This module
	manage allocation and querying of leases via a lease id. The module
	maintains the mapping from lease id to lease offset.

	Adding and removing leases will be performed only on the SPM, but once a
	lease is created, any host can lookup the lease info and use it to
	acquire the lease via sanlock.

	Only index management is implemented. This module must also create the
	sanlock leases in an atomic way.

	Please check the feature page for more info:
	http://www.ovirt.org/develop/release-management/features/storage/vm-leases/

	Bug-Url: https://bugzilla.redhat.com/1317429

2016-12-01  Ramesh Nachimuthu  <rnachimu@redhat.com>

	Move gluster package to vdsm.gluster

2016-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Enable metrics by default
	To avoid restart of vdsm service after first engine deploy to enable
	metrics we set the metrics to enabled by default.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1392784

2016-12-01  Irit Goihman  <igoihman@redhat.com>

	client: add gluster namespace as well
	added gluster_enabled optional parameter for client. This enables
	adding gluster related namespace and methods.
	if gluster_enabled=True and gluster schema isn't available,
	api.vdsmapi.SchemaNotFound exception will be raised.

	client: introduce MissingSchemaError exception
	As part of adding schema support to the client we need
	to support schema related exceptions.
	MissingSchemaError will be raised when schema not found.

	vdsmapi: fix a typo in string formatting
	There was a typo in SchemaNotFound error message: "%"
	was replaced with "," - causing bad exception message display.

2016-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding simple client for sending gauge metrics to statsd port using udp
	Introducing simple udp client. The client sends gauge metric statistics in
	the metric 2.0 spec format - key:value|g.

	Prior to this implementation we used python-statsd package which  is not built
	out side epel. The code we used to use from python-statsd is only the part
	that sends gauge by udp, we don't have any use for the rest currently.

2016-12-01  Francesco Romani  <fromani@redhat.com>

	API: move vm parameters fixup in a method
	After the VM parameter validation, the API.VM.create
	method does some parameter fixing, meaning it adds
	back some optional parameters if they are not provided
	explicitely.
	This patch moves this code on its own submethod.

2016-12-01  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add test for massive number of devices
	We have not really tested the most perf-wise fragile part of the code.
	We therefore add a test case which iterates over ~3k devices.

	Bug-Url: https://bugzilla.redhat.com/1398572

2016-12-01  Ramesh Nachimuthu  <rnachimu@redhat.com>

	Remove the usage of  clientIF from GlusterApi

	rename method wrapApiMethod to  _wrap_api_method
	Since method wrapApiMethod() in bindingxmlrpc.py is private,
	renaming this to _wrap_api_method()

2016-12-01  Martin Polednik  <mpolednik@redhat.com>

	vmfakecon: optimize HostDeviceStub
	HostDeviceStub processed the XML only to grab few pieces of
	information. The process roughly went as follows:
	str->xml (get few values)->str->xml.

	We aim to remove the intermediate XML parsing, leaving much nicer
	flow: str->xml. The optimization helps us further down the series when
	working with large number of devices.

	Bug-Url: https://bugzilla.redhat.com/1398572

	hostdev: use *c*ElementTree
	cElementTree is *the* recommended ETree implementation on platforms
	that support C. It delivers nice performance improvement over previous
	implementation.

	ElementTree:

	time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
	test_3k_storage_devices hostdevTests.py
	nose.config: INFO: Ignoring files matching ['^\\.', '^_',
	'^setup\\.py$']
	hostdevTests.HostdevPerformanceTests
	    test_3k_storage_devices                                     OK

	----------------------------------------------------------------------
	Ran 1 test in 2.656s

	OK

	real    0m3.010s
	user    0m2.951s
	sys     0m0.060s

	cElementTree:

	time PYTHONPATH="../" NOSE_SLOW_TESTS=true ./run_tests.sh -s -m
	test_3k_storage_devices hostdevTests.py
	nose.config: INFO: Ignoring files matching ['^\\.', '^_',
	'^setup\\.py$']
	hostdevTests.HostdevPerformanceTests
	    test_3k_storage_devices                                     OK

	----------------------------------------------------------------------
	Ran 1 test in 0.432s

	OK

	real    0m0.789s
	user    0m0.730s
	sys     0m0.060s

	Bug-Url: https://bugzilla.redhat.com/1398572

2016-12-01  Irit Goihman  <igoihman@redhat.com>

	client: document ConnectionError exception
	ConnectionError exception was added to the client but
	information regarding it wasn't added to the module
	documentation.

2016-12-01  Dan Kenigsberg  <danken@redhat.com>

	py3: take Queue from six.moves
	Affected modules are still not complient with Python 3, but this cleanup
	is simple and takes us one tiny step forward.

2016-12-01  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register: remove persist/unpersist calls for legacy node
	This patch removes all related to unpersist and persist
	calls exclusive for oVirt Node Legacy. oVirt Node Next doesn't
	require such approach.

2016-11-30  Adam Litke  <alitke@redhat.com>

	storage: Prepare the full chain for copy_data operation
	This patch is a proposed fix for an issue with copy_data.

	When performing a copy_data operation involving block storage where a
	volume has a parent on block storage we must prepare the entire chain
	otherwise qemu will complain about not finding the backing file.

2016-11-30  Irit Goihman  <igoihman@redhat.com>

	python: change python scripts to python2
	starting from fc25, python3 will be default, and
	/usr/bin/python path will point to python3.
	All interpreter paths in python scripts were changed
	to python2.
	This is a quick fix in order to ensure the scripts will
	continue to run without errors.
	All scripts should be py3 compatible in the future.

2016-11-30  Irit goihman  <igoihman@redhat.com>

	contrib: Simple jsonrpc client
	This is a simple generic client that does not know anything about the
	available methods and parameters. The user should consult the schema to
	construct request that makes sense. Future version should parse the
	schema and provide online help.

	Invoking simple methods:

	    # jsonrpc Host getVMList
	    ['b3f6fa00-b315-4ad4-8108-f73da817b5c5']

	Invoking methods with simple parameters::

	    # jsonrpc VM getStats vmID=b3f6fa00-b315-4ad4-8108-f73da817b5c5
	    ...

	For invokinng methods with many or complex parameters, you can read the
	parameters from a file:

	    # jsonrpc StorageDomain activate -f sd-activate
	    ...

	    where sd-activate file content is:
	    {
	        "storagedomainID": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
	        "storagepoolID": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
	    }

	It is also possible to read parameters from standard input, creating
	complex parameters interactively:

	    # jsonrpc StorageDomain activate -f -
	    {
	        "storagedomainID": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
	        "storagepoolID": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
	    }
	    (Press Ctrl + D to finish)

2016-11-29  Ala Hino  <ahino@redhat.com>

	tests: fix setting a fake block volume's parent
	This patch fixes setting a fake block volume's parent by setting the
	parent uuid in the lv tag in addition to the metadata lv.

2016-11-29  Allon Mureinik  <amureini@redhat.com>

	localFsSD.py: Add lock class for V4 domains
	Commit 8c5f53 added the key 4 to
	StorageDomainManifest._domainLockTable, but neglected to do the same
	for LocalFsStorageDomainManifest._domainLockTable, thus preventing
	local storage domains from using the V4 format (and failing attempts to
	create/upgrade a local DC to the 4.1 compatibility level).

	This patch adds the missing entry to the dictionary in order to rectify
	this problem.

	Bug-Url: https://bugzilla.redhat.com/1399493

2016-11-29  Leon Goldberg  <lgoldber@redhat.com>

	autoconf: make data-center location customizable
	configure.ac now accepts a parameter (--with-data-center)
	which sets the location of data-center.

	changing the default data-center location will break backward
	compatibility with existing ovirt installation, and is not supported.
	We are adding this to be compatible with fedora file system layout.

	Bug-Id: https://bugzilla.redhat.com/1260743

2016-11-29  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't crash on missing <memory> in MutableDomainDescriptor
	During minidom->etree conversion changes and rebases, <memory> element stopped
	being optional in MutableDomainDescriptor.get_memory_size.  This patch restores
	the original behavior and adds a test for it.

2016-11-29  Amit Aviram  <aaviram@redhat.com>

	storage: move outOfProcess module to vdsm storage lib
	This patch moves the module storage/outOfProcess.py to
	vdsm/storage/outOfProcess.py.

	storage: move threadPool module to vdsm storage lib
	This patch moves the module storage/threadPool.py to
	vdsm/storage/threadPool.py.

2016-11-29  Idan Shaby  <ishaby@redhat.com>

	storage: move iscsi.py to vdsm storage lib
	This patch moves the module vdsm/storage/iscsi.py to
	lib/vdsm/storage/iscsi.py.

	storage: move iscsiadm.py to vdsm storage lib
	This patch moves the module vdsm/storage/iscsiadm.py to
	lib/vdsm/storage/iscsiadm.py.

	storage: move imagetickets.py to vdsm storage lib
	This patch moves the module vdsm/storage/imagetickets.py to
	lib/vdsm/storage/imagetickets.py.

	storage: move imageSharing.py to vdsm storage lib
	This patch moves the module vdsm/storage/imageSharing.py to
	lib/vdsm/storage/imageSharing.py.

2016-11-29  Francesco Romani  <fromani@redhat.com>

	containers: tests: reduce duplication
	Kill some leftovers from the time convirt was an external package.
	Instead of borrowing code, let's just use facilities from testlib.

2016-11-29  Martin Polednik  <mpolednik@redhat.com>

	virtio-scsi: add support for IO threads
	virtio-scsi supports per-controller IO threads instead of per-disk.
	We therefore have to manually extend virtio-scsi controller (or our
	Controller device in other words) to handle engine's communication
	regarding IO threads [1].

	[1] https://gerrit.ovirt.org/#/c/64948/

2016-11-28  Irit Goihman  <igoihman@redhat.com>

	client: construct namespaces from schema
	namepaces are now constructed from vdsm schema and
	each namespace holds a list of available methods.
	This will allow method name verification in the future.

2016-11-28  Michal Skrivanek  <michal.skrivanek@redhat.com>

	spec: bump up to RHEL 7.3 GA version of qemu and libvirt
	keep CentOS 7.2 support until 7.3 is out.
	Dropping Fedora 23. Now requires virt-preview repo in Fedora 24

2016-11-28  Petr Horáček  <phoracek@redhat.com>

	net test: increase monitor timeout
	Monitor tests sometimes fail with E_TIMEOUT on CI. With this patch
	we increase timeout limit to see if response is just slow or if there
	is a more serious problem.

2016-11-28  Maor Lipchuk  <mlipchuk@redhat.com>

	API: Introduce SDM.amend_volume.
	Introduce the amend verb used for qcow volume
	to amend its qcow compat version.

	Bug-Url: https://bugzilla.redhat.com/827529

	Revert "hsm: Refactor get_hostid as pool attribute"
	This reverts commit ccf5e8b9b09aa48ea2c08618d67600de901c0cb8.

	vdsm-api: Rename ImageInfo to PreparedImageInfo
	ImageInfo is only being used for prepared volume therefore
	rename it to PreparedImageInfo.

	Bug-Url: https://bugzilla.redhat.com/827529

	hsm: Refactor get_hostid as pool attribute
	Add a pool attribute instead of using get_hostid method,
	since the use of the hostid is for getting the pool id.

	Bug-Url: https://bugzilla.redhat.com/827529

2016-11-28  Francesco Romani  <fromani@redhat.com>

	tests: rename api_test.py -> api_response_test.py
	Cosmetic only change. We now have two test modules
	which test related but different things, whose name
	differs only by case.

	This could be confusing for humans, and surely
	confuses the Apple FS -with default settings.

	Since we are very near to name shortage again[1],
	we just rename api_test.py to api_response_test.py
	to avoid the confusion.

	+++

	[1] $ git grep -i api Makefile.am
	Makefile.am:47: API_test.py \
	Makefile.am:49: api_response_test.py \
	Makefile.am:153:        vdsmapi_test.py \
	Makefile.am:156:        vmApiTests.py \
	Makefile.am:173:        API_test.py \
	Makefile.am:243:        vmApiTests.py \
	Makefile.am:329:        apiData.py \

2016-11-28  Irit goihman  <igoihman@redhat.com>

	dumpStorageTable: remove module and all references
	dumpStorageTable has been used only by sos report. patch
	https://gerrit.ovirt.org/#/c/62628/ replaced it with
	dump_volume_chains since dumpStorageTable was using vdscli and
	not jsonrpc. Since sos report was its only use, there is no point
	keeping it.
	dumpStorageTable was removed and all references to it were deleted.

2016-11-28  Nir Soffer  <nsoffer@redhat.com>

	tests: Use assertIn for better error message
	If the pid was not found the failure will include now the contents of
	the list, hopefully making it easier to debug.

	tests: Fix flaky test on travis
	TestPgrep is failing from time to time on traivs, but not on jenkins.
	Looking at the test, it seems that starting 3 child processes and
	pgreping for them immediately is racy, since we don't have a guarantee
	that a child process is running when execCmd returns.

	Attempt to fix by adding fragile timeout, this should be good enough for
	this test.

	tests: Fix incorrect test cleanup
	If TestPgrep failed, it was leaving zombie processes. Because the test
	did not wait the child processes, we would get a SIGCHLD singal when
	they terminated, 3 seconds after the test. If the signal was received
	when the test framework try to write to stderr, another unrelated test
	would fail with interrupted system call.

	We see EINTR failures from time to time both in travis and when running
	tests locally.

2016-11-27  Nir Soffer  <nsoffer@redhat.com>

	utils: Remove last unneeded sudo=False usage
	We changed the sudo argument to execCmd to be False by default about 3
	years ago, but we had few instances using it.

2016-11-27  Dan Kenigsberg  <danken@redhat.com>

	readme: fix markdown

	spbackends: simplify over-general evaluation
	The removed code is too clever for the use case of only two values.

2016-11-26  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix wrong usage of @broken_on_ci
	Both @brokentest and @broken_on_ci must be actually called. If they are
	not called, the test is practically disabled and will never run.

	The recommend usage is:

	    @broken_on_ci(msg="why this test is disabled on ci...")
	    def test_flaky(self):
	        ...

	Fixes commit b2ee97f30c9f (tests: Mark some scheduler tests as broken on
	CI) to use @broken_on_ci() with a descriptive message.

2016-11-26  Francesco Romani  <fromani@redhat.com>

	API: move vmParams validation in a method
	API.VM.create does some parameter validation, raising
	errors if some key parameter are missing.
	This patch moves this code on its own submethod.

	API: use exceptions in the VM.create flow
	This is possible using the recently added api.method decorator,
	and makes the code tidier.

	tests: add tests for API.VM.create()
	The API.VM.create() method has a pretty complex flow.
	Let's add some tests to allow refactoring, and for added safety.

2016-11-25  Milan Zamazal  <mzamazal@redhat.com>

	tests: Mark some scheduler tests as broken on CI
	SchedulerTests.GRACETIME timeout value is set to 0.1, which seems to be too
	short under some circumstances.  Some tests check that a task is not invoked,
	those tests still pass if the timeout occurs.  But positive tests fail in such
	a case.  We can't simply increase GRACETIME because it would delay the negative
	tests execution.  We could use longer timeouts for the positive tests (it
	wouldn't make them run longer if they pass) but that wouldn't necessarily
	improve the tests.

	Let's simply mark the positive tests with broken_on_ci for now, they should
	work well under normal conditions.

2016-11-25  Dan Kenigsberg  <danken@redhat.com>

	virt: drop remains of vm-level nicModel
	Commit c264b600 has dropped the ancient support for vm-level nicModel.
	However, some dead code remains.

2016-11-25  Francesco Romani  <fromani@redhat.com>

	tests: add containersconnection tests
	They were missing before for no real good reason.

2016-11-25  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Method not found should return proper code
	When a method is not found we should return -32601 code.

2016-11-25  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: make sure that stomp connection is active before sending messages
	In may happen that client sends SEND frame before CONNECT and SUBSCRIBE
	frames are processed by the server which can lead to server having no
	knowledge to whom send response because subscription is not finalized
	yet. We need to wait for server to respond with CONNECTED frame before
	sending any rpc requests.

	Here is the flow how the issue happens:
	1. Client connects to the server
	2. Client sends CONNECT and SUBSCRIBE frames
	3. Client sends SEND fame
	4. Server receives all 3 frames and starts to process them
	5. Server attempts to send MESSAGE frame
	6. Server sends CONNECTED

2016-11-25  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: handle password-less login properly
	Import methods from KVM that do not require password were not handled
	properly. We receive None from the engine in user name/password fields
	which caused unhandled exception when writing the password file.
	Further, in case of KVM import, there is no reason to pass the empty
	user name/password to kvm2ovirt tool at all.

	Bug-Url: https://bugzilla.redhat.com/1388596

2016-11-24  Dan Kenigsberg  <danken@redhat.com>

	shell_helper: allow nondefault rpmdir

2016-11-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using vm_name instead of uuid in vm metrics report
	The name is reported by libvirt and more useful for metrics. The uuid
	has no meaning for the user, it is an engine's internal value.
	We are aware that for vm name to update libvirtd must be restarted.
	This is not harmful for the metrics presentation.

2016-11-24  Tomáš Golembiovský  <tgolembi@redhat.com>

	vdsm: log proper tag for messages coming from vdsm-logrotate
	The log messages coming from vdsm-logrotate were improperly tagged as
	'logrotate'. To avoid confusion with real logrotate we should properly
	tag messages as 'vdsm-logrotate'.

	vdsm: report correct exit value in vdsm-logrotate
	The exit code was reported improperly. When all but the last command had
	failed, we would still return 0.

	Let's return 1 when any number of commands fails and 0 if all succeed.

2016-11-23  Milan Zamazal  <mzamazal@redhat.com>

	libvirt: Workaround missing VIR_DOMAIN_EVENT_ID_JOB_COMPLETED
	In a previous patch, we assigned a callback to
	VIR_DOMAIN_EVENT_ID_JOB_COMPLETED.  However, that constant is not available in
	libvirt versions used in RHEL/CentOS 7.2 and the callback registration crashes
	there.  So we must fake the constant until we depend on libvirt 2.0.

2016-11-23  Petr Horáček  <phoracek@redhat.com>

	net: support the ability to change the switch type for a host
	Mixing of switch types is not allowed. The only way how to change
	from one switch type to another is to executed setupNetworks command,
	that will change all currently configured network and bonds to another
	switch type.

	Bug-Url: https://bugzilla.redhat.com/1362399

	net: restore ovs switch bonds early
	OVS switch uses SysFS handled linux bondings. SysFS are not persisted
	across reboots, therefore we need to restore OVS bonds manually.

	Bug-Url: https://bugzilla.redhat.com/1379115

2016-11-23  Martin Sivak  <msivak@redhat.com>

	Configure mom restart rules
	MOM is not supposed to quit by itself so Restart=always is
	better suited to handle unexpected quits.

	A rate limiting is also updated to start at most once per 5 seconds,
	but no more than 10 times in a row (10 times within 2 minutes).

	This change should also workaround the race condition between
	MOM trying to connect to VDSM and VDSM actually opening the
	socket.

	Bug-Url: https://bugzilla.redhat.com/1393012

2016-11-23  Francesco Romani  <fromani@redhat.com>

	tests: properly fake in vmRecoveryTests
	Avoid those failures:
	  File "/vdsm/lib/vdsm/virt/containers/command.py", line 86, in _result

	    raise Failed(err)

	Failed: Failed to get D-Bus connection: Operation not permitted

	The container-specific recovery is tested in the containers tests,
	no need to duplicate it here.

2016-11-22  Petr Horáček  <phoracek@redhat.com>

	virt: enable migration hook only when asked to
	OVS is not in a stable state yet. In order to not harm VM migration,
	migration hook will not be used unless explicitly enabled in vdsm
	config.

2016-11-22  Ala Hino  <ahino@redhat.com>

	Cold Merge: Introduce cold merge related verbs
	This patch introduces cold merge related verbs:
	1. SDM.prepare_merge (runs on SPM)
	   a. Calculates required allocation for base volume
	   b. Extends the base volume
	   c. Mark the base volume as ILLEGAL

	2. SDM.merge (runs on any host)
	   Executes qemuimg commit to perform the merge

	3. SDM.finalize_merge (runs on SPM)
	   a. Updates qemu chain using qemuimg rebase -u
	   b. Updates vdsm chain (similar to Image.syncVolumeChain)
	   c. Mark the volume as LEGAL

	Bug-Url: https://bugzilla.redhat.com/1246114

	api: Introduce SubchainInfo type
	This type represents a merge volumes operation info that includes top
	volume UUID and base volume UUID. This type will be used in future APIs
	that will be introduced to support (cold) volumes merge.

2016-11-22  Arik Hadas  <ahadas@redhat.com>

	remove unused graphics property disableTicketing
	This property cannot be set by the supported versions of the engine.

2016-11-22  Milan Zamazal  <mzamazal@redhat.com>

	virt: Send migration status events
	Migration progress is currently available in stats.  Engine fetches the stats
	from the host where a migrating VM is running, which is the source host during
	pre-copy migration and the destination host during post-copy migration.
	However the progress information is always available only on the source host,
	so it's not available to Engine during the post-copy phase.

	For this and other reasons Engine would like to receive events about migration
	progress and the downtime of a completed migration. We introduce a new event
	for that purpose containing that information and additionally information about
	the pre-copy or post-copy mode of the migration (since downtime value
	interpretation is inherently different in the two cases).

	virt: Report downtime after a post-copy migration
	There are two migration downtime length values provided by libvirt after
	a completed migration: `downtime' and `downtime_net'.  Ideally,
	`downtime' provides the complete downtime length, but only under the
	assumption that the clocks on the hosts are perfectly synchronized.  If
	they are not, the value may be screwed by the clock differences.

	For this reason, we report `downtime_net' for pre-copy migrations, which
	includes only the time needed to transfer the data (and not other
	overheads), but is correct even when the clocks are not perfectly
	synchronized.

	`downtime_net' is not reported for post-copy migrations as it is always
	zero.  So only `downtime' can be reported for post-copy migrations,
	regardless of the potential problem with the clocks.

	Engine and other tools reporting the downtime must take into account the
	differences of the downtime value in pre-copy and post-copy.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Inform Engine about switching to post-copy
	Engine must be informed when a migration switches to post-copy mode (to
	know where to get further events and stats from).  We use status event
	for that purpose.  We report paused state for VMs in post-copy migration
	mode on the source, so we must distinguish between paused state in
	post-copy migration and paused state for other reasons.  We use
	pauseCode for that purpose.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Report paused VM status in post-copy
	When a migration enters a post-copy mode, it gets paused.  While we are
	still in migration source status from the point of view of Vdsm, Engine
	wants to know the actual libvirt status, i.e. paused.  Thus we report
	the VM as paused when it is in post-copy mode.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Prevent monitoring of VMs in post-copy
	Migrating VMs in post-copy mode on the source end are paused.  It makes
	no sense to monitor them and we don't want to get error messages in the
	log or experience other problems.  So we skip VMs in that state in
	periodic operations.

	We also skip the VMs that just successfully initiated switching to
	post-copy mode.  Under normal circumstances, they should enter post-copy
	mode shortly afterwards, so it's better to skip them immediately.

	We still can't guarantee (without excessive locking) that VM doesn't
	switch to post-copy (and gets paused), so we handle the corresponding
	contingent failure as well.

	Note that we still gather stats, since we need to know the migration
	progress.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Move migration.py to lib/vdsm/
	We need this change for a following patch, in order to access
	migration.PostCopyPhase constants from lib/vdsm/.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Stop guest agent before switching to post-copy
	Post-copy migration pauses the VM on the source.  We don't want to get
	spurious log messages from the guest agent about not being able to talk
	to the VM or being disconnected from the communication socket.  So we
	stop the guest agent before switching to post-copy mode.

	If switching to post-copy fails (which should rarely happen), we start
	the agent again.  Starting the agent may fail, e.g. in case the VM got
	destroyed in the meantime.  So we catch the contingent exception.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Distinguish between switching to and entering post-copy migration
	Switching to migration post-copy mode has two phases: Asking for
	switching to post-copy and actually switching to post-copy.  The
	transition period should be short (if it is not then it is a
	QEMU/libvirt bug), so we needn't care about it much.

	But on various checks we should distinguish between the post-copy
	request phase and the post-copy switch phase.  For instance, we should
	block canceling migrations very early to avoid timing issues and
	possibly canceling a post-copy migration.  On the other hand we should
	report a true VM state to Engine, so we can report post-copy only after
	the VM actually enters it.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Log post-copy migration cancellation failure
	A VM in post-copy migration is split between the source and the
	destination, with inconsistent memory state on both the ends of the
	migration.  Stopping the migration in that phase is not a good idea, it
	loses the VM and leaves it in the pause state on the source and may lead
	to data loss.

	For those reasons libvirt prevents aborting a migration in the post-copy
	mode.  Engine prevents canceling post-copy migrations too, but it may
	still request aborting them during the moments it's not (yet) aware
	about the post-copy mode.  In such a situation, the cancel request fails
	and we should at least log the reason.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Use a variable for self._vm in MonitorThread action handling
	This is a reformatting patch to prevent further line breaking in a
	followup patch.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Fetch only minimum VM stats during post-copy migration
	When a migration switches to post-copy mode, the VM starts running on
	the destination.  Libvirt no longer provides actual stats on the source,
	with the exception of progress, which is still available on the source
	and only on the source.

	This patch stops reporting stats other than progress from libvirt during
	post-copy migration.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Cleanup of _waitForUnderlyingMigration call
	We should inform the caller about the migration success directly and not to let
	it to look at the proper synchronization variable itself.

	virt: Start all VM related stuff after switching to post-copy migration
	On the migration destination, we perform running-VM actions only after
	the migration completes.  But when the migration switches to post-copy
	mode, the VM starts fully running on the destination.  So switching to
	post-copy should be considered as the actual start of the VM and
	appropriate actions should be performed.

	This patch implements unblocking the start up actions after switching to
	post-copy mode.

	The only exception is VM status, which must still signal migration until
	the migration completes.

	Bug-Url: https://bugzilla.redhat.com/1354343

	virt: Initial support for post-copy migration
	This patch introduces the basics of switching to post-copy migration
	when present in the convergence schedule.  It is an initial step towards
	post-copy migration feature in oVirt.  Further changes, most notably
	support in Engine, are needed.

	As for Vdsm itself, there are several problems to solve in the followup
	patches, especially:

	- Destination actions that are be performed after pre-copy migration
	  finishes should be also performed when pre-copy migration switches to
	  post-copy.  The VM is already running on the destination at the moment
	  so it must be properly set up immediately, without waiting for
	  migration completion.

	- The source host doesn't provide (real) stats after switching to
	  post-copy mode.  The stats are available on the destination host, with
	  the exception of migration progress and migration downtime, after
	  switching to post-copy so they must be retrieved from there.
	  Additionally, downtime is reported in a bit different way than for
	  pre-copy migrations.  We must inform Engine what's happening so that
	  it knows where and how to get all the data.

	There are some circumstances under which post-copy migration doesn't
	work, such as when using (non-transparent) huge pages or RDMA.  If
	libvirt can detect it, it may fail already at the start of the migration
	when VIR_MIGRATE_POSTCOPY flag is present.

	We don't want to block migrations completely if something like that
	happens unexpectedly.  So we add VIR_MIGRATE_POSTCOPY flag only when
	post-copy migration is actually requested.  This way, if the migration
	can't be started with post-copy, another schedule may be attempted.

	Please note that (correctly working) post-copy migration requires recent
	QEMU and sufficiently new libvirt.  The crucial dependencies are handled
	in another patch.

	Bug-Url: https://bugzilla.redhat.com/1354343

2016-11-22  Irit Goihman  <igoihman@redhat.com>

	sos: replace dumpStorageTable with dump_volume_chains
	dumpStorageTable is old and uses vdscli and has been replaced with
	dump_volume_chains which uses jsonrpc

	sos: migrate to new jsonrpc client
	remove jsonrpcvdscli commands and migrate to the
	new jsonrpc client

	client: add default value for port parameter
	most of the time we call client.connect with port 54321
	so better add it as default value for port parameter.

2016-11-22  Martin Polednik  <mpolednik@redhat.com>

	arm: add to faqemu

	arm: handle cpuinfo

	arm: add aarch64 as supported arch

	domain_descriptor: correctly check if element is present
	As per Python ETree documentation:

	Caution: Elements with no subelements will test as False. This
	behavior will change in future versions. Use specific len(elem) or
	elem is None test instead.

	This caused the expression to evaluate to None instead of VM's memory,
	overwriting the VM's conf with invalid value.

	Bug-Url: https://bugzilla.redhat.com/1396816

2016-11-22  Francesco Romani  <fromani@redhat.com>

	vdsm: daemon: ensure the container state dir exists
	We need to call containersconnection.prepare()
	when the daemon starts, to make sure $RUN_DIR/containers
	exists and is available.

	By default, RUN_DIR is /var/run/vdsm.

	build: create the container rpm only if requested
	We enable it only for koji builds.

	tests: containers: add testsuite

	core: containers: add the container support module
	Add module to run containers using the libvirt API.

2016-11-21  Shmuel Melamud  <smelamud@redhat.com>

	storage: Add inplace virt-sparsify support
	Added support of sparsify operation (removing unused space from a disk
	image) that is performed in-place (without copying content of an input
	disk to an output disk) using virt-sparsify tool.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=734120

2016-11-21  Maor Lipchuk  <mlipchuk@redhat.com>

	qemuimg: Expose API for qemuimg amend

2016-11-21  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add Element.replaceChild method
	There is a single occurrence of replaceChild method call in Vdsm and it hasn't
	been noticed during minidom -> etree conversion, resulting in possible crash on
	network interface update.  This patch fixes the problem by providing new
	Element.replaceChild method.

	Bug-Url: https://bugzilla.redhat.com/1396996

2016-11-21  Dominik Holler  <dholler@redhat.com>

	net virt: Network Filter Parameters
	Enables to set parameters of VM's network filters by VDSM explicitly.

	Bug-Url: https://bugzilla.redhat.com/1366905

2016-11-21  Francesco Romani  <fromani@redhat.com>

	vmxml: export container metadata
	Add a metadata tags to let Engine specifiy the container
	specific parameters, using custom properties.

	This way we don't require changes to the Engine UI.

	The metadata we add is about:
	- container runtime type to use (so far only docker).
	- mapping between VM drives and container volumes
	- the image to run, to let users freely
	  experiment with the public repositories.

2016-11-21  Petr Horáček  <phoracek@redhat.com>

	net: save switch type and options while changing bond
	In network/link/setup.py when we edit a bond and save it to running
	config with partially changed slaves, we do not specify switch type.
	network/netswitch.py:_split_switch_type_entries then can assume that
	the bond is legacy.

	This patch saves not only partially changed nics, but also used
	switch type and options.

	Bug-Url: https://bugzilla.redhat.com/1379115

	net: support bond options in link.setup
	Bug-Url: https://bugzilla.redhat.com/1379115

	net: enable link.bond to handle options
	Note that this change also requires change in slaves editation
	(in _revert_transaction) since we cannot edit options of a bonding
	with attached slaves.

	Bug-Url: https://bugzilla.redhat.com/1379115

2016-11-21  Maor Lipchuk  <mlipchuk@redhat.com>

	API: Introduce getQemuImageInfo API.
	The new API suppose to return information fetched using qemuimg info.
	This should be usable to get the compat version of the volume.

	This API will not use a job since it only returns information
	about the volume and do not change it.
	It is similar to how getVolumeInfo is working.

	Continuous-Integration: Jenkins CI

2016-11-21  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Avoid unneeded getpeername()
	When accepting connection, we get the client address from accept, so we
	don't need to call client.getpeername(). Show the client address also in
	the exception if creating a dispatcher failed.

	Continuous-Integration: Jenkins CI

	protocoldetector: Handle socket.error in handle_accept
	If socket.error is not handled in handle_accept, asyncore assumes that
	the error is related to the listen socket and close it. However, a
	socket.error may be raised by client socket if the remote side closed
	the socket immediately, for example, during port scanning.

	This is a regression introduced by commit b25dbdcce417 (Have the
	protocol detector use the Reactor), replacing the previous
	implementation with "better" asyncore base solution.

	This patch fixes this issue by handling socket.error in handle_accept,
	closing the client socket.

	Bug-Url: https://bugzilla.redhat.com/1326940
	Continuous-Integration: Jenkins CI

2016-11-21  Irit Goihman  <igoihman@redhat.com>

	dump_volume_chains: change server to cli
	client.connect returns cli for vdsm and not a server.
	server variable was changed to cli in order to reflect this.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1365007
	Continuous-Integration: Jenkins CI

	dump_volume_chains: migrate to jsonrpc
	dump_volume_chains is using vdscli which is deprecated and was
	replaced with jsonrpc client
	all vdscli commands were coverted to jsonrpc commands.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1365007
	Continuous-Integration: Jenkins CI

2016-11-20  Idan Shaby  <ishaby@redhat.com>

	storage: add discard support for vm disks
	When the engine sends the field 'discard' with the value true as
	one of the parameters of the vm's disk's drive, vdsm adds
	discard='unmap' to the disk's drive.
	With that, vdsm gives the vm disk the ability to support discard.

	Note that vdsm can handle scenarios of sending discard with the
	values true or false, alongside not sending it at all, which makes
	it possible to work with old engines that don't support this feature.

	For more information about the "Pass Discard" feature, please refer to
	the feature page:
	http://www.ovirt.org/develop/release-management/features/storage/pass-discard-from-guest-to-underlying-storage/

	Bug-Url: https://bugzilla.redhat.com/1241106
	Continuous-Integration: Jenkins CI

2016-11-20  Edward Haas  <edwardh@redhat.com>

	net: Ignore missing graphics from VM conf on target host
	The new VM migration libvirt hook handling, recreates the interface and
	graphics devices of the domxml to fit the target host. It does so using
	the VM conf data.

	Unfortunate, there was a bug in Engine that did not pushed the graphics
	configuration to VDSM, leaving VM conf without the display information.
	VDSM on the other hand, used a default, listen to all, when this data
	has not been received from Engine.

	On migration, the domxml includes the graphics section while the target
	VM conf does not, causing an exception that fails the action.

	This patch silently ignores such scenarios, leaving the source domxml as
	is in the graphics section.

	Continuous-Integration: Jenkins CI

2016-11-20  Leon Goldberg  <lgoldber@redhat.com>

	net: getIfaceCfg: logging a warning on missing ifcfg file
	additionally added a test for a missing ifcfg file

	Bug-Url: https://bugzilla.redhat.com/1141267
	Continuous-Integration: Jenkins CI

2016-11-20  Edward Haas  <edwardh@redhat.com>

	net: Remove wrong contextmanager decorator from ip.address
	Removing contextmanager decorator from a private function in
	ip.address module.

	Continuous-Integration: Jenkins CI

	net tests: testing ip.validator requires now to patch RunningConfig
	This patch fixes unit tests that run on the ip.validator module.
	The problem has been introduced on commit
	2ebb4f44aa90e10339ea7172573016160dfb5774

	Continuous-Integration: Jenkins CI

2016-11-20  Petr Horáček  <phoracek@redhat.com>

	net tests: assert network/bond switch type
	Continuous-Integration: Jenkins CI

2016-11-20  Edward Haas  <edwardh@redhat.com>

	net: link.bond - relocate netinfo.bonding options code
	Relocate code from netinfo.bonding to link.bond.sysfs_options and
	link.setup.
	Keep users of netinfo.bonding happy by preserving a proxy to the new
	location. Future patches should fix the users by pointing them to the
	link.bond package.

	Continuous-Integration: Jenkins CI

	net: link.bond - introduce sysfs options module
	Sysfs options is created to handle all bond option processing.
	This patch extracted the minimal reference to bond options from the
	sysfs driver module.

	Future patches will start moving the bond options handling from
	netinfo.bonding to this new module.

	Continuous-Integration: Jenkins CI

	net: link.bond - splitting the api from the implementation
	The bond has been converted to a package to expand its capabilities in
	the next patches.
	This patch seperated between the bond api and the driver used.

	Continuous-Integration: Jenkins CI

2016-11-18  Milan Zamazal  <mzamazal@redhat.com>

	tests: Make ExecutorTests.test_discarded_workers less shaky
	The test relies on timeouts and sometimes fails on checking that all
	tasks are executed.  This patch tries to replace some of the timeouts
	with explicit synchronization to avoid that problem.

	Continuous-Integration: Jenkins CI

	tests: Make ExecutorTests.test_discarded_workers easier to debug
	In case the assertions on executed tasks fail, we don't get any useful
	feedback.  This patch improves the situation by checking (and outputting
	in case of failure) the whole list of non-executed tasks.

	Continuous-Integration: Jenkins CI

	virt: Switch to etree in vmxml.py and tests
	This is the final step of the minidom -> etree conversion.

	It includes updating the tests that are dependent on particular XML
	library.

	Continuous-Integration: Jenkins CI

	tests: Use assertXMLEqual instead of _xml_sanitizer in vmTests
	Continuous-Integration: Jenkins CI

	tests: Use assertXMLEqual for XML comparison in vmOperationsTests
	Continuous-Integration: Jenkins CI

	virt: Don't use minidom directly in vmxml.Domain
	Continuous-Integration: Jenkins CI

	virt: Return first child from vmxml.xml_to_dom
	Generally we don't want to work with Document instances, we want to work with
	Element instances.  There is no need to return Document instead of the top
	Element from vmxml.xml_to_dom.  And etree behaves this way anyway, so we should
	be ready for that change.  We just must be careful that getElementsByTagName
	doesn't return the element it's applied on, but vmxml.dom_find_all handles
	that (and again, the similar applies to etree).

	parse_xml is used only in a few places and using Element instance instead of
	Document is fine everywhere.

	We need this change in the following patch converting vmxml.Domain to
	DOM helpers.

	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in Vm vcpuLimit processing
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in Vm iotune processing
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers instead of toxml calls
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in Vm.setLinkAndNetwork
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in _diskXMLGetVolumeChainInfo
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in Vm._updateDevicesDomxmlCache
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in graphics ticket handling
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in Vm disk device handling
	Continuous-Integration: Jenkins CI

	virt: Introduce MutableDomainDescriptor
	DomainDescriptor is a useful utility for handling domain XML and we
	would like to use it more.  An important property of DomainDescriptor is
	that it assumes to be used read only and so it caches some of its data
	and doesn't expect changes to them.

	In Vm._correctDiskVolumes, we process domain XML "manually".  But we
	already have the corresponding functionality available in
	DomainDescriptor.  The only problem is we want to modify the parsed DOM
	in place.  For this purpose, we introduce a new class
	MutableDomainDescriptor in the form of a mutable base class for
	DomainDescriptor.  The class is going to be used in the followup patch.

	Continuous-Integration: Jenkins CI

2016-11-17  Adam Litke  <alitke@redhat.com>

	storage: Add volume property to CopyDataDivEndpoint
	Add a property to CopyDataDivEndpoint which produces the volume
	object described by the endpoint.  This limits the dependencies on
	sdCache and StorageDomain objects to this class and makes this endpoint
	object easier to use for other verbs.

	Continuous-Integration: Jenkins CI

2016-11-17  Francesco Romani  <fromani@redhat.com>

	containers: we don't need machinectl
	`systemctl stop` fit our needs.
	machinectl support was added while experimenting with the support for
	rkt,
	where it was the recommended way to poweroff a container.

	Continuous-Integration: Jenkins CI

2016-11-17  Irit Goihman  <igoihman@redhat.com>

	client: add ConnectionError exception
	We've used ClientError for commands failures that didn't reach vdsm
	but we need a different exception for connectivity issues.

	Continuous-Integration: Jenkins CI

2016-11-17  Nir Soffer  <nsoffer@redhat.com>

	threadPool: Name threadpool worker threads
	Add required name argument to ThreadPool, and name the worker threads
	name/N, similar to how executor threads are named.

	The workers were changing the thread name to the task name, trying to
	make it easier to follow tasks. Instead of renaming the thread for each
	task, the logs when starting and ending a task were improved. Once task
	is running, it is easy to follow the thread running the task until the
	task finish or fail.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2016-11-17  Adam Litke  <alitke@redhat.com>

	storage: Log volume state changes when exiting operation
	When exiting the VolumeManifest.operation we update the volume legality
	and generation using setMetadata which does not log.  This is an
	important state change for a volume which must be logged.

	Continuous-Integration: Jenkins CI

2016-11-17  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: add support for arbiter volumes
	   Add support for arbiter gluster volume creations. Also
	include arbiter count and arbiter flag in volume and bricks
	details in volume info output.

	Continuous-Integration: Jenkins CI

2016-11-17  Edward Haas  <edwardh@redhat.com>

	net: DEFROUTE should not be set when no GW is provided
	Setting DEFROUTE without the GATEWAY or DHCP in ifcfg has no real
	meaning.
	For the ifcfg configurator, DEFROUTE is set to 'no' when
	GATEWAY is absent.

	Continuous-Integration: Jenkins CI

2016-11-17  Shirly Radco  <sradco@redhat.com>

	replace dots with underline in vm metrics names
	Underline makes the name in the metric a leaf. Using dot creates a
	metric sub tree.
	For better view and useful usages this patch modify long subtrees to
	long names.


	Continuous-Integration: Jenkins CI

2016-11-17  Irit Goihman  <igoihman@redhat.com>

	client: add namespaces for methods
	namespace object represents a schema object that holds a set
	of methods.

	This gives up the ability to invoke methods with:
	    cli.namespace.method(**kwargs)
	instead of:
	    cli.call(namespace.method, args).

	For example:
	    cli.Host.getVMList()

	Continuous-Integration: Jenkins CI

2016-11-16  Maor Lipchuk  <mlipchuk@redhat.com>

	copy_data: Add qcow2_compat on convert.
	Pass qcow2 compat on convert.

	Continuous-Integration: Jenkins CI

	storage_sdm_copy_data: Refactor test.
	Continuous-Integration: Jenkins CI

2016-11-16  Edward Haas  <edwardh@redhat.com>

	net tests: Remove redundant label from func test template.
	The new functional test format are using a template test class with two
	sublasses, one for each switch type (legacy, ovs).

	With NOSE 1.3.0 there was a need to overcome a bug, that did not pass
	correctly the NOSE test labels, by labeling the template class in
	addition to the subclasses.

	As we are now requiring NOSE 1.3.7 for the test run, the template class
	tests have been cleaned.

	Continuous-Integration: Jenkins CI

2016-11-16  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: removing redundant tests
	test_bondmode_in_capabilities tests what's already practically tested in
	func_bond_basic_test.py:

	default mode is implicitly tested throughout func_bond_basic_test.py, 
	and non-default modes are tested as well in func_bond_basic_test.py 
	test_bond_mode_change (#66697)

	Continuous-Integration: Jenkins CI

2016-11-16  Irit Goihman  <igoihman@redhat.com>

	jsonrpc: introduce new client
	This is a simple jsonrpc client which is not aware of the available
	methods and parameters.

	The user should consult the schema to construct the wanted command.

	The client is invoked with:

	   cli = client.connect(host, port, ssl)

	For example:

	   cli = client.connect('localhost', 54321, True)

	Failure will result in ClientError exception.

	Invoking commands:

	    cli.call('Host.getVMList')

	    cli.call('VM.getStats', {'vmID': 'bc26bd11-ee3b-4a56-80d4-770f383a47b9'})

	The call method expects method name and a dictionary containing all mandatory
	parameters, as they appear in the schema.

	Complex parameters are also supported and share the same behavior.

	Continuous-Integration: Jenkins CI

2016-11-16  Irit goihman  <igoihman@redhat.com>

	build: add six and openssl to buildrequires
	six and openssl are currently required to build vdsm.
	Let's unbreak the build now and ask questions later.

	Continuous-Integration: Jenkins CI

2016-11-16  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	schema: fix html generation
	After rebasing html generation for schema I noticed two issues with
	schema:
	- missing name CopyDataDIVEndpoint
	- unknown ulong type


	Continuous-Integration: Jenkins CI

2016-11-15  pkliczewski  <piotr.kliczewski@gmail.com>

	yml: generate api doc from the schema
	Continuous-Integration: Jenkins CI

2016-11-15  Adam Litke  <alitke@redhat.com>

	tests: remove dead code
	Continuous-Integration: Jenkins CI

2016-11-15  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: refactored/moved bond resize tests
	old variation at networkTests.py uses _assert_exact_bond_opts which is
	currently broken and should be addressed in a future patch (default bond
	mode is assumed incorrectly).

	refactored the tests using the newer format of func_* tests and
	consequently removing the dependency on _assert_exact_bond_opts

	Continuous-Integration: Jenkins CI

2016-11-15  Adam Litke  <alitke@redhat.com>

	tests: share fake_guarded_context
	The contextmanager fake_guarded_context will be useful to other sdm verb
	tests.  Move it to storagefakelib.

	Continuous-Integration: Jenkins CI

2016-11-15  Dan Kenigsberg  <danken@redhat.com>

	vmTestsData, hostdevTests: drop repeated keys
	flake8 justly complains about keys repeating twice in dictionaries.

	Continuous-Integration: Jenkins CI

2016-11-15  Milan Zamazal  <mzamazal@redhat.com>

	virt: Use DOM helpers in Vm._findGraphicsDeviceXMLByType etc.
	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in Vm._getVmPolicy
	Continuous-Integration: Jenkins CI

	virt: vmxml.all_devices removed
	We can easily use DomainDescriptor instead of this helper.

	Continuous-Integration: Jenkins CI

	virt: Use DOM helpers in vmxml.device_address
	Continuous-Integration: Jenkins CI

	virt: Remove vmxml.filter_devices_with_alias helper
	This helper is used only once and its usage can be replaced by the new
	DOM helpers, making the code overall simpler.

	Continuous-Integration: Jenkins CI

	virt: Use vmxml DOM helpers in storage devices
	Continuous-Integration: Jenkins CI

	virt: Fix in vmxml.attr docstring
	Continuous-Integration: Jenkins CI

	virt: Use vmxml DOM helpers in network devices
	Continuous-Integration: Jenkins CI

	virt: Use vmxml DOM helpers in host devices
	Continuous-Integration: Jenkins CI

	virt: Use vmxml DOM helpers in graphics devices
	Continuous-Integration: Jenkins CI

	virt: Use vmxml DOM helpers in core devices
	Continuous-Integration: Jenkins CI

	virt: Use vmxml DOM helpers in vmdevices/common.py
	This is the next preparation step for the switch from minidom to etree.
	It conforms to the abstract XML processing strategy in order to make the
	switch possible.

	Continuous-Integration: Jenkins CI

2016-11-15  Dominik Holler  <dholler@redhat.com>

	schema: added parameter for network filters
	The yml schema is extended to align with runtime, which builds
	interface xml specification based on it, as seen in 
	vdsm/virt/vmdevices/network.py line 148.

	Continuous-Integration: Jenkins CI

2016-11-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Unify storage test names
	- Prefix with storage_
	- Use new test name convention modulename_test.py

	Continuous-Integration: Jenkins CI

	utils: Raise special error if termination fail
	If terminating process failed because of unexpected error (for example
	Popen.poll() raised), we use to log the exception and return silently.

	This is a disastrous behavior for storage, when we want to ensure that a
	process was terminated. If we could not terminate the process, a storage
	job running the process must stay in running state to prevent engine
	from starting the same operation on another machine.

	Typically when we cannot handle an error we should not handle it. But
	in this special case, letting the caller handle the original error (e.g.
	OSError) is not useful since it does not have any context about this
	error.

	To allow the caller to handle this error, we raise TerminatingFailure
	exception, including the process pid and the original error.

	Storage code may like to panic or move the job into ABORTING state to
	signal engine that an operation was not completed. Other code may just
	log this error and continue.

	Continuous-Integration: Jenkins CI

	dockerfile: Add python-requests
	The new import tests exposed a missing package; we added the package in
	automation/check-patch.packages.*, but it is still missing in the docker
	images, failing the travis build.

	Continuous-Integration: Jenkins CI

2016-11-14  Dan Kenigsberg  <danken@redhat.com>

	net: tc: qdisc: clean repeated line
	flake8 suddenly noticed a repeated line in a dictionary

	Continuous-Integration: Jenkins CI

2016-11-14  Nir Soffer  <nsoffer@redhat.com>

	tox: Require specific version of flake8
	Not requiring specific version of flake8 means we get the latest version
	of flake8 and the latest version of the checkers (e.g. pycodestyle,
	pyflakes), which means any update may break the build as new
	style checks are added to the underlying tools.

	I'm using flake8 3.0.4 (depending on pycodestyle 2.0.0) since this is
	the version I have on Fedora 24, and the current ocde works fine with
	it. Previously we got flake8 3.1.1 (depending on pycodestyle 2.1.1).

	Upgrading flake8 must be done in a controlled way, checking the errors
	exposed by each version and fixing them before upgrading the version.

	Continuous-Integration: Jenkins CI

	doc: Document PYTHONPATH manipulation
	We include ../vdsm in python search path since vdsm.rpc.Bridge and
	vdsm.rpc.bindingxmlrpc are depeding on API from vdsm directory.

	Continuous-Integration: Jenkins CI

2016-11-14  Dan Kenigsberg  <danken@redhat.com>

	hooks: tighten exception handling
	Catch-all "pass:" is evil. _getScriptInfo should return an empty
	hexdigest only if the underlying hook is not readable. It should not
	ignore other exceptions.

	EnvironmentError was chosen instead of OSError because the former one
	behaves the same on Python 3 and Python 2.

	Continuous-Integration: Jenkins CI

2016-11-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Add working import check
	Add a working import tests using pytest. The script find all the modules
	in the vdsm package and generate pytest parametried test for each
	module. Running the tests using pytest show detailed traceback for
	module using forbidden imports.

	This test run separately from the other tests with clean python search
	path including only the lib directory.

	To run the only the import check:

	    make imports

	Modules with bad imports (vdsm.rpc.Bridge and vdsm.rpc.bindingxmlrpc)
	are mark as expected failures.

	Modules using soft dependency that are not supported on the current
	platform are expected to raise compat.Unsupported exception on import.
	These modules are skipped.

	Here is an example test summary for currnet code:

	==================================================================================
	short test summary info
	==================================================================================
	XFAIL check_imports.py::test_import[vdsm.rpc.Bridge]
	XFAIL check_imports.py::test_import[vdsm.rpc.bindingxmlrpc]
	SKIP [1] /home/nsoffer/src/vdsm/tests/check_imports.py:59: No module named statsd
	SKIP [1] /home/nsoffer/src/vdsm/tests/check_imports.py:59: No module named hawkular

	Continuous-Integration: Jenkins CI

	compat: Introduce the Unsupported exception
	Some modules have soft dependency that may not be available on the
	current platform. To make it possible to import these modules during the
	tests, introduce compat.Unsupported exception.

	Continuous-Integration: Jenkins CI

	tool: Add missing python-requests to automation
	The register module requires python-requests but the requirement was not
	added to the automation packages.

	This module does not have any tests but with the new import check tests,
	importing the module fail when the package is not installed.

	Continuous-Integration: Jenkins CI

	tests: Remove wrong crossImportTests.py
	This tests is broken, promising to detect illegal imports in lib/vdsm,
	but failing to detect wrong import such as "import API" in
	vdsm.rpc.Bridge and vdsm.rpc.bindingxmlrpc. It also fail to detect
	missing packages since it does not try to import any module from the
	vdsm package.

	This tests also complicates the build, having to run it separately from
	the other tests, and this generate useless coverage noise in the CI.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-11-14  Francesco Romani  <fromani@redhat.com>

	containers: bootstrap the containers subpackage
	The container support code, previously known with codename `convirt`,
	adds another subpackage to Vdsm.
	This subpackage will contain all the code needed to run docker images
	as VMs. If the subpackage is not installed, no changes will be made
	to Vdsm.

	This patch bootstrap this subpackage shipping the supervdsm part.
	Please note that this code is currently unused, a later patch will
	make use of it.

	We need this patch to complete the user-visible changes needed
	by project `convirt`.

	Continuous-Integration: Jenkins CI

	vdsm: virt: add optional container support
	We add an additional pluggable package for
	container support in Vdsm.

	This package, previously known with the codename `convirt`[1],
	allows Vdsm to run container images alongside VMs, invoking
	and managing docker directly. The supervision is done
	by systemd and by docker daemon, so no extra packages are needed.

	The user will run a container by creating a VM using unmodifed
	Engine >= 3.6, adding a few extra custom variables.
	Those variables will inform Vdsm to treat the VM as container,
	but from Engine perspective there will be no observable change.

	For the same reason, no Engine changes are needed at all; actions
	not supported by containers (e.g. live migration) will fail using
	standard Vdsm errors. In the future, the unsupported actions will
	be grayed out in the Engine UI, to prevent confusion.

	+++

	[1] https://github.com/mojaves/convirt

	Continuous-Integration: Jenkins CI

2016-11-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Rename utilsTests.py to utils_test.py
	module_test.py is automatically discoverable by pytest and nosetests.

	Continuous-Integration: Jenkins CI

	tests: Use TestClassname instead of ClassnameTests
	Using TestClassname make a test class automatically discovered by pytest
	without subclassing from unittest.TestCase.

	Continuous-Integration: Jenkins CI

2016-11-14  Dan Kenigsberg  <danken@redhat.com>

	v2vTests: janitorial: use string literals
	The code is nicer and shorter if we avoid the call to str.join().

	Continuous-Integration: Jenkins CI

	py3: vdscliTests: minor modernization
	Take SimpleXMLRPCServer from six. One of the tests in this module
	(testTimeout) does not yet pass under Python 3.

	Continuous-Integration: Jenkins CI

2016-11-14  Irit Goihman  <igoihman@redhat.com>

	automation: openssl package is missing
	openssl is required for running make_certificates target during 'make'

	Continuous-Integration: Jenkins CI

2016-11-13  Irit goihman  <igoihman@redhat.com>

	build: remove unnecessary configure checks
	patch https://gerrit.ovirt.org/#/c/65500/ removed some packages
	needed by the tests.
	Since tests are not running anymore during the build it's also
	unnecessary to check these packages exist in configure.ac

	Continuous-Integration: Jenkins CI

2016-11-13  Nir Soffer  <nsoffer@redhat.com>

	tests: Cleanup qemuimg.map tests
	- Remove unneeded permutations, since we test only qcow2 files
	- Document why we test only qcow2 files
	- Cleanup tests names

	Continuous-Integration: Jenkins CI

2016-11-13  Ala Hino  <ahino@redhat.com>

	qemuimg: Remove tests using raw format from TestMap
	Tests when format is raw are failing on Travis. However, these are tests
	are not really needed because when merging into raw base, the base image
	is always preallocated so we don't need to calculate anything.

	Continuous-Integration: Jenkins CI

2016-11-13  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: refactored testGetIfaceCfg
	underscores over camel-case as signature and structural changes
	to comply with the rest of the tests;

	instead of calling the tested function twice (once for gateway,
	twice for netmask), store the result once; declare the input/expected
	output data once; simplify string data format

	Continuous-Integration: Jenkins CI

2016-11-13  Petr Horáček  <phoracek@redhat.com>

	net: only set values once with ifacquire
	Bug-Url: https://bugzilla.redhat.com/1379115
	Continuous-Integration: Jenkins CI

2016-11-13  Irit Goihman  <igoihman@redhat.com>

	py3 tests: imagetickets_test.py now uses six.http_client
	replaced httlib with six.http_client in imagetickets.py
	and imagetickets_test.py

	Continuous-Integration: Jenkins CI

2016-11-13  Nir Soffer  <nsoffer@redhat.com>

	alignmentScan: Use proper environment
	In commit f9d12864a404 (v2v: Running virt-v2v with some sane
	environment) we learned that we should not use bare environment
	dict.

	This patch fixes the environment when running virt-alignment-scan.

	Continuous-Integration: Jenkins CI

	docs: Fix code example syntax
	To get nicely rendered code block, use this format:

	Example usage::

	   class Foobar(object):
	       bar = 1

	Note the double ::, this what makes the indented block a code block.

	For more info see:
	- reStructuredText markup specification
	  http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks
	- Example from python documentation:
	  https://docs.python.org/2/_sources/library/contextlib.txt

	Continuous-Integration: Jenkins CI

	iscsi: Remove unused constant
	We have been using iscsiadmm for scanning iSCSI devices since 2013.
	This constant should have been removed in commit 66c24c1996 (iscsi:
	Iscsi rescan cleanup).

	Continuous-Integration: Jenkins CI

	sudoers: Remove uneeded rules
	- We don't run cat as root
	- We don't scan devices using dd
	- We don't run dd as root
	- We don't run multipath in vdsm (only in vdsm-tool)

	All these changes should have been part of the patches removing the last usage.

	Continuous-Integration: Jenkins CI

2016-11-12  Nir Soffer  <nsoffer@redhat.com>

	doc: Remove unused _static directory
	Continuous-Integration: Jenkins CI

2016-11-11  Francesco Romani  <fromani@redhat.com>

	API: remove now-useless _getStats method
	We just don't need this anymore, and we have exactly one caller now.
	The default argument is never overridden, so it is removed as well.

	Continuous-Integration: Jenkins CI

2016-11-11  Dan Kenigsberg  <danken@redhat.com>

	janitorial: remove hook_ovs_test from blacklist
	commit 8d8e3fe0 dropped the test module, but did not remove it from the
	blacklist.

	Continuous-Integration: Jenkins CI

2016-11-11  Nir Soffer  <nsoffer@redhat.com>

	exception: Fix bad error code
	A comma sneaked after the error code, making the error code a tuple
	instead of int.

	The error was introduced in commit e84aaadc3c9e (exception: Add
	exceptions for vdsm.define errors).

	Continuous-Integration: Jenkins CI

2016-11-11  Dan Kenigsberg  <danken@redhat.com>

	network/conf_test: no need to reinvent six.StringIO
	Continuous-Integration: Jenkins CI

2016-11-11  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	stomp: broker cleanup
	We can remove engine 3.5 supported queue names since we do not support
	this version anymore.


	Continuous-Integration: Jenkins CI

2016-11-11  Nir Soffer  <nsoffer@redhat.com>

	doc: Speed up "make html"
	Using parallel builds with 4 workers speed up the build from 21 seconds
	to 13.

	Continuous-Integration: Jenkins CI

2016-11-11  Leon Goldberg  <lgoldber@redhat.com>

	net: tests: renamed tests signatures to undercores
	Continuous-Integration: Jenkins CI

	net: tests: mock resolv.conf
	testGetHostNameservers to use a mocked resolv.conf over
	a temp file; function renamed to underscores

	Continuous-Integration: Jenkins CI

	net: handle unavailability of resolv.conf
	get_host_nameservers to return an empty list on failure
	to read from /etc/resolv.conf

	Bug-Url: https://bugzilla.redhat.com/1392989
	Continuous-Integration: Jenkins CI

2016-11-11  Edward Haas  <edwardh@redhat.com>

	net: Validate that default route is set for a single network.
	https://gerrit.ovirt.org/#/c/66127 adds the ability for users to control
	on which network the default route is set.
	This patch adds VDSM validation, checking that the default route is not
	marked on more than one network.

	Continuous-Integration: Jenkins CI

2016-11-11  Dan Kenigsberg  <danken@redhat.com>

	net: let users override Engine's default route
	oVirt Engine sets default=True on the management network an on it alone.

	Users may want to use another network for their host's default routing.

	With this patch, they can modify this behavior by setting the custom
	propery default_route to False on the management network attachement,
	and to True on the would-be default route network.

	Note that prior to using a custom property, one has to define it on
	Engine by:
	  sudo engine-config -g CustomDeviceProperties
	  sudo engine-config -s CustomDeviceProperties='{type=interface;prop={default_reoute=^(true|false)$}}' --cver=4.0
	and restart of ovirt-engine.

	(Cf. https://bugzilla.redhat.com/show_bug.cgi?id=1200963#c42 )

	Continuous-Integration: Jenkins CI

2016-11-11  Nir Soffer  <nsoffer@redhat.com>

	doc: Fix stale configuration values
	Update Vdsm name, copyright years, version.

	Continuous-Integration: Jenkins CI

2016-11-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing wrong parameter
	We removed the parameter in https://gerrit.ovirt.org/54384 and never
	updated vdsm-id function

	Continuous-Integration: Jenkins CI

2016-11-10  Milan Zamazal  <mzamazal@redhat.com>

	doc: Generate documentation for the whole Vdsm library
	The current content of doc/ is not useful.  But we can improve it a bit
	with this patch to generate documentation for the whole Vdsm library.

	Continuous-Integration: Jenkins CI

2016-11-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove rx\txRate metrics
	Those values were removed from host stats

	Continuous-Integration: Jenkins CI

2016-11-09  Leon Goldberg  <leon.otium@gmail.com>

	yajsonrpc: py3: stomp.py string/unicode compliance
	Continuous-Integration: Jenkins CI

2016-11-09  Francesco Romani  <fromani@redhat.com>

	automation: require virt-preview again on fedora
	We need it again for the 4.1 features.

	Continuous-Integration: Jenkins CI

2016-11-09  Milan Zamazal  <mzamazal@redhat.com>

	logging: Remove connectivity log
	There is no known use or user of this log.  So the log just
	unnecessarily produces another log file.  Let's remove it.

	Continuous-Integration: Jenkins CI

	virt: Make DomainDescriptor use XML helpers
	We are going to stop using xml.dom.minidom and to use xml.etree instead.
	XML processing is currently spread across several places and we use both
	minidom and etree, so we must be careful with the conversion.  The
	overall strategy is as follows:

	1. Create XML helpers abstracting common XML operations.
	2. Use the helpers everywhere where minidom is currently used.  Avoid
	   using minidom anywhere outside the XML helpers.
	3. Switch from minidom to etree in the XML helpers.

	We avoid using XML directly in many places as a side effect.  It is
	debatable whether it is a good or bad thing.  If we decide it is a good
	thing, we may want to replace direct etree base XML processing with the
	helpers as well in a followup patch series.  If we decide it is a bad
	thing, we can unfold the helpers in a followup patch series (note we
	need the helpers as an intermediate step and can't avoid them from the
	beginning).  Keeping status quo after this series is also an option.

	There's also duplicate XML code and processing present in some places,
	especially in core devices.  We keep it duplicated as it is in this
	series, in order not to mix etree conversion with refactoring.  Device
	XML processing refactoring is planned in a followup patch series.

	This patch implements the first step of the whole process.  It converts
	DomainDescriptor class from minidom to XML helpers.  The reason for this
	start is that DomainDescriptor class is simple while it requires most of
	the needed XML helpers.  So we can start with a small change of the
	existent code while becoming equipped with a nice set XML helpers for
	the following, perhaps more complicated, patches.

	Continuous-Integration: Jenkins CI

2016-11-09  Maor Lipchuk  <mlipchuk@redhat.com>

	hsm:Use sd compat instead of qemu conf compat.
	Continuous-Integration: Jenkins CI

2016-11-09  Nir Soffer  <nsoffer@redhat.com>

	blockSD: Fix off-by-one error in slot allocation
	If one slot was free between two occupied slots it was skipped during
	allocation.  The error was introduced in commit 5d92c4c92f6f (Volume
	metadata for tag-based domains should not rely on pv mapping).

	This patch fixes the calculation and adds missing tests cases.

	Bug-Url: https://bugzilla.redhat.com/1393458
	Reported-By: nijin ashok <nashok@redhat.com>
	Continuous-Integration: Jenkins CI

	tests: Actually use qcow2 compat as promised
	2 new qemuimg.map tests used permutations to test both compat 0.10 and
	1.1 but the test did not use the permutation, using instead the default
	qcow2_compat.

	Continuous-Integration: Jenkins CI

2016-11-09  Edward Haas  <edwardh@redhat.com>

	net: Use getIfaceCfg in IfcfgAcquire
	getIfaceCfg is an existing implementation that takes an ifcfg file and
	translates it to a dict. It is prefered to use it instead of a new
	possibly buggy implementation.

	Bug-Url: https://bugzilla.redhat.com/1390474
	Continuous-Integration: Jenkins CI

	net: Extend the acquire of ifcfg files to include VLANs
	Extending the handling of acquiring ifcfg files that describe VLAN
	devices.
	The generic acquire handler expects the 'DEVICE' key to exist and
	match the device name, but with some VLAN config syntax (which NM uses)
	it does not appear, instead other alternative keys are used (PHYSDEV).

	This patch also includes unit tests to cover the ifcfg acquire steps.

	Bug-Url: https://bugzilla.redhat.com/1390474
	Continuous-Integration: Jenkins CI

2016-11-09  Nir Soffer  <nsoffer@redhat.com>

	Revert "stomp: broker cleanup"
	Since commit 7a306d6c56b43 (broker cleanup) engine 3.6 cannot connect to
	vdsm.

	This reverts commit 7a306d6c56b436e7a4cbbf7b3ef04b31e63ea360.

	Continuous-Integration: Jenkins CI

	vm: Name vm creation and live merge cleanup thread
	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	concurrent: Name tmap threads
	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	misc: Name itmap threads
	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	netlink: Name netlink monitor thread
	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	health: Name health monitor thread
	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2016-11-08  Nir Soffer  <nsoffer@redhat.com>

	v2v: Name v2v import threads
	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2016-11-08  Edward Haas  <edwardh@redhat.com>

	net: acquire ifcfg files to be used by VDSM - refactoring
	Refactoring the ifcfg file name normalization, in order to add special
	handling for ifcfg files that represent VLAN devices in a future patch.

	Bug-Url: https://bugzilla.redhat.com/1390474
	Continuous-Integration: Jenkins CI

2016-11-08  Irit Goihman  <igoihman@redhat.com>

	utils: add custom closing context manager
	We often use context managers that are responsible for calling
	their own close method, and handle exceptions raised during their
	lifetime and while calling close method.
	In order to avoid duplicated code, 'closing' context manager has been
	added to utils module.

	Continuous-Integration: Jenkins CI

2016-11-08  Dan Kenigsberg  <danken@redhat.com>

	automation: no one needs python-rtslib
	commit df5ebfd removed all reference to rtslib. There is no need to pull
	the package any more.

	Continuous-Integration: Jenkins CI

	automation: check-patch.el7 does not require py3
	We do not run py3 tests on el7, so we should not pull the related
	packages.

	Continuous-Integration: Jenkins CI

	automation: lago not required for check-patch
	in commit f247a0cff3 I've mistakenly copied lago dependencies from
	check-merged.packages.el7 to check-patch.packages.el7.

	This patch removes the redundant requirements, and adds an
	explictly-needed PyYAML requirement.

	Continuous-Integration: Jenkins CI

2016-11-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Revert "Enable metrics by default"
	This reverts commit b892ccece0e3c4b050b4bee80f4705978a80fa82.

	This requires python-statsd first as part of vdsm requirements.

	Continuous-Integration: Jenkins CI

	Rename vm rx tx metric names to align with host report
	In host/api.py we report all rx* tx* fields in the format rx_* tx_*

	Continuous-Integration: Jenkins CI

	Rename vm_disk to disk to shorten metric length
	Continuous-Integration: Jenkins CI

	Rename network-interface prefix to nic
	To avoid report of long metric names. We are limited to 63 chars

	Continuous-Integration: Jenkins CI

	Remove host uuid from metrics
	The uuid string is not required as it comes to the metrics store from
	the collectd service.

	Continuous-Integration: Jenkins CI

	Enable metrics by default
	To avoid restart of vdsm service after first engine deploy to enable metrics
	we set the metrics to enabled by default

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1392784
	Continuous-Integration: Jenkins CI

2016-11-08  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	stomp: broker cleanup
	We can remove engine 3.5 supported queue names since we do not support
	this version anymore.

	Continuous-Integration: Jenkins CI

2016-11-07  Vinzenz Feenstra  <vfeenstr@redhat.com>

	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.

	Bug-Url: https://bugzilla.redhat.com/1349907
	Continuous-Integration: Jenkins CI

2016-11-07  Milan Zamazal  <mzamazal@redhat.com>

	numa: Test NUMA crash fix
	In a previous patch, we fixed KeyError in getVmNumaNodeRuntimeInfo on
	CPUs not pinned to any node in the Engine NUMA mapping.  This patch adds
	such a CPU to an already existent test, to ensure the error won't occur
	anymore.

	Continuous-Integration: Jenkins CI

2016-11-06  Ala Hino  <ahino@redhat.com>

	qemuimg: Add debug message for TestMap
	Show detailed error message when actual map differ from expected map.

	Here is example failure:

	    MapMismatch: Value mismatch for 'length': {'start': 0, 'length': 0, 'data':
	    False, 'zero': True} != {u'start': 0, u'length': 65536, u'data': False,
	    u'depth': 0, u'zero': True}

	    Expected map:
	    [{'data': False, 'length': 0, 'start': 0, 'zero': True},
	     {'data': True, 'length': 131072, 'start': 65536, 'zero': False},
	     {'data': False, 'length': 851968, 'start': 196608, 'zero': True}]

	    Actual map:
	    [{u'data': False, u'depth': 0, u'length': 65536, u'start': 0, u'zero': True},
	     {u'data': True,
	      u'depth': 0,
	      u'length': 131072,
	      u'offset': 327680,
	      u'start': 65536,
	      u'zero': False},
	     {u'data': False,
	      u'depth': 0,
	      u'length': 851968,
	      u'start': 196608,
	      u'zero': True}]

	Continuous-Integration: Jenkins CI

2016-11-05  Dominik Holler  <dholler@redhat.com>

	storage: iscsiadm parses IPv6 iSCSI addresses
	Enables parsing of IPv6 iSCSI addresses during discovery.

	Bug-Url: https://bugzilla.redhat.com/1308306
	Continuous-Integration: Jenkins CI

	storage: Extend the API for IPv6 iSCSI targets
	A new parameter is introduced in the API, to explicitly indicate the
	capability of the client to handle IPv6 iSCSI targets. This parameter
	is used to present IPv6 iSCSI targets only to clients, which has this
	capability.

	Bug-Url: https://bugzilla.redhat.com/1308306
	Continuous-Integration: Jenkins CI

2016-11-04  Nir Soffer  <nsoffer@redhat.com>

	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.

	Continuous-Integration: Jenkins CI

	tests: Avoid warning about make
	Tox warns about tools which are not installed in the virtual
	environment.  Use whitelist_externals to avoid the warning.

	Continuous-Integration: Jenkins CI

2016-11-04  Milan Zamazal  <mzamazal@redhat.com>

	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.

	Continuous-Integration: Jenkins CI

2016-11-04  Nir Soffer  <nsoffer@redhat.com>

	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 creating the coverage reports sometimes
	fails after building the artifacts.

	I don't know why coverage fail, and it is very hard to debug such issues
	on jenkins. Creating coverage report just after running the tests will
	make it easier to debug such issue.

	Continuous-Integration: Jenkins CI

2016-11-03  Tomáš Golembiovský  <tgolembi@redhat.com>

	vdsm: document why we prefer running logrotate manually
	We don't rely on system running logrortate on purpose. It is better to
	document why we actually do this.

	Bug-Url: https://bugzilla.redhat.com/1113264
	Continuous-Integration: Jenkins CI

2016-11-03  Dominik Holler  <dholler@redhat.com>

	storage: HSM uses serialization of iscsi
	HSM.discoverSendTargets uses the serialization of iSCSI targets of the
	module iscsi.

	Bug-Url: https://bugzilla.redhat.com/1308306
	Continuous-Integration: Jenkins CI

	storage: Centralize serialization of iSCSI addresses
	The serialization of iSCSI addresses and targets is centralized.
	By using vdsm.common.network.address.hosttail_join, even IPv6 addresses
	as hostnames in iSCSI addresses and targets are supported.

	Bug-Url: https://bugzilla.redhat.com/1308306
	Continuous-Integration: Jenkins CI

2016-11-03  Jenny Tokar  <jtokar@redhat.com>

	Update required mom version and interface
	Updated the required mom version to 0.5.8 and the mom
	interface to vdsmjsonrpcbulk interface.

	Bug-Url: https://bugzilla.redhat.com/1374988 https://bugzilla.redhat.com/1346926
	Continuous-Integration: Jenkins CI

2016-11-03  Francesco Romani  <fromani@redhat.com>

	migration: use system thread names
	Add migration thread names.
	Unfortunately, we need to shorten 'migration' - which is going to
	eat 10 out of 15 ASCII chars available for the name.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2016-11-02  Maor Lipchuk  <mlipchuk@redhat.com>

	storagetestlib: Add sd_version param to fake_env
	Add a storage domain version when creating a mock for
	the storage domain, so we can determine if the sd is
	of version 4 or version 3.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-11-02  Dan Kenigsberg  <danken@redhat.com>

	build: use tox's python during `make check`
	This commit
	- simplifies run_tests*.sh to use python2 from the PATH created by
	  tox
	- requests tox to inherite site packages already pulled via RPMs
	- reverts commit 2165bd0a399bbff as there is no longer need to pull nose
	  RPM

	Continuous-Integration: Jenkins CI

2016-11-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Require python-nose for automation
	In commit 195937c2da59 (build: Disable tests during build) we removed
	python-nose requirement, because we install nose using tox. Turns out
	that we still need nose, since our testing infrastructure is not using
	the virtual environment created by tox, and the nose version we install
	with tox is actually unused.

	The issue was probably hidden because we merged a patch without rebasing
	in and running the tests again.

	This patch is only the minimal fix to get the build working again, we
	need more work to run the tests using tox virtual environment.

	Continuous-Integration: Jenkins CI

	build: Run the tests with tox
	Run the tests via tox, installing the correct version of nose in a
	virtual environment.  Since correct version is nose is always available,
	the warning about nose version is not needed now.

	By default, tox uses random PYTHONAHSHSEED on each run. This exposes bad
	code assuming that unordered things are ordered. Turns out we have some
	tests with this issue. To keep the build working, this option is
	disabled now (PYTHONHASHSEED = 0). We should remove this option when the
	bad tests are fixed.

	Continuous-Integration: Jenkins CI

2016-11-01  Nir Soffer  <nsoffer@redhat.com>

	build: Remove build requires needed for the tests
	We are not running the tests during the build, so we don't need to pull
	these packages. These packages are installed in the CI using
	automation/check-patch.packages. Developers should also use the same
	file for setting up a development environment.

	Continuous-Integration: Jenkins CI

	build: Disable tests during build
	Tests are needed for development, not for building a package. This
	allows us to use latest and greatest development tools, which are not
	available in brew or koji.

	Since we install nose using pip, remove the build requires - we don't
	need now nose to build rpms.

	Also remove nose from the automation *.packages files, since we install
	it from pip.

	Finally remove the nose check from configure, since configure is run
	during the build, and we cannot require nose at this point. We are
	checking nose when running the tests.

	We still install python 3 nose using the distribution packages, since it
	is new enough, and mixing pip and pip3 on same machine does not work
	well.

	Continuous-Integration: Jenkins CI

	utils: Wait for terminated process
	utils.terminating was not waiting for a terminated process, passing the
	process to zombiereaper. This behavior may be disastrous storage and
	mostly unwanted for other code.

	When we run a child process touching shared storage, we must wait for
	the child process. If we kill the child process without waiting, engine
	may start the same operation on another host, while the original child
	process is still running, possibly in interruptible state, trying to
	write to storage.

	To avoid this issue, we always invoke wait() after killing the process.

	Special code that do not want to wait for the child process should not
	use this context manager.

	Continuous-Integration: Jenkins CI

2016-11-01  Nir Soffer  <nirsof@gmail.com>

	readme: Fix build status url
	Previously we pointed to Nir's private fork, now that oVirt's github is
	triggering builds we should point to the correct builds.

	Continuous-Integration: Jenkins CI

2016-10-31  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	stomp: simplified client
	Continuous-Integration: Jenkins CI

2016-10-31  pkliczewski  <piotr.kliczewski@gmail.com>

	utils: build cert paths in single place
	We make sure that all the references to certificates location are in
	single place. As part of this fix we remove trust store path from
	configuration which is not needed anymore.

	Continuous-Integration: Jenkins CI

2016-10-31  Andrej Krejcir  <akrejcir@redhat.com>

	Allow pinning of VM NUMA nodes to host NUMA nodes.
	Adds <memnode> elements to the <numatune> element
	in the libvirt domain XML.

	Bug-Url: https://bugzilla.redhat.com/1306698
	Continuous-Integration: Jenkins CI

2016-10-30  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	tests: inspect.getargspec() is deprecated in py3
	We do not want to see following warning during running tests:

	DeprecationWarning: inspect.getargspec() is deprecated, use
	inspect.signature() instead

	In order to replace getargspec with signature we need compatibility
	object due to significant differences between both functions.


	Continuous-Integration: Jenkins CI

2016-10-28  Edward Haas  <edwardh@redhat.com>

	net: support nameserver address with %iface tail
	The nameserver address may include an %<iface> tail, to specify on which
	iface the address is to be reached.

	The patch fixes the validation of the nameserver address when this tail
	exists.
	In addition, unit tests have been placed to cover the ip validation
	scenarios.

	Continuous-Integration: Jenkins CI

2016-10-27  Francesco Romani  <fromani@redhat.com>

	lib: shorten name of libvirt event thread
	We need to fit in 15 ASCII chars because of the limitations
	of the system; plus, we use a name more akin to the
	formatting/schema we choose.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	clientIF: rename recovery thread
	make the thread name more explicit; "clientIFInit" was
	quite opaque. The real purpose is to recover VMs.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2016-10-27  Martin Sivak  <msivak@redhat.com>

	Add new api to get the IO tune policies for all vms
	This patch adds a new api to vdsm that allows retrieval
	of the io tune policy and its' values for all the vms via
	a single api thus removing the need to query vdsm for that
	info for every present vm.

	Bug-Url: https://bugzilla.redhat.com/1374988
	Continuous-Integration: Jenkins CI

2016-10-27  Francesco Romani  <fromani@redhat.com>

	vm: ignore more errors in isDomainReadyForCommands
	Due to race on domain shutdown, and after migration end,
	we may receive errors from libvirt which makes
	the Vm.isDomainReadyForCommands() method fail with scary stacktrace.

	This patch makes the method cope with VIR_ERR_OPERATION_UNSUPPORTED.
	In the context of this method, this error can come only if the
	domain is shutting down, so it is safe to swallow it in this case.

	The real, big issue is how to properly handle the shutdown of a
	domain. Currently, we have to deal with domains which are partially
	shut down, so they are reported by libvirt and can return error
	(like VIR_ERR_OPERATION_UNSUPPORTED) to methods which normally succeed.

	One way to solve this is to make the shutdown (more) atomic:
	either a domain is completely operative, or it is gone.
	It is still to be decided if this could be done without libvirt changes.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1382578
	Continuous-Integration: Jenkins CI

	vm: introduce a `monitorable' attribute
	In the change I3e61626625a2e0517d55dc61e361f3f5eb690c00
	we fixed the stats_age reporting, in order to correctly report
	the real age of VM monitoring samples.

	In the same change we acknowledged a possible change in behaviour:
	depending on the timing of operations and on the load of the host,
	VMs could be reported 'Unresponsive' for a little time while
	starting up or shutting down.

	This information is tecnhically correct: the monitoring subsystem
	dutifully reports unknown sampling data, which is translated into
	outdated values, thus unresponsive VM, but it is misleading for
	both Engine and users.

	There are two root causes here:
	1. creation, destruction and monitoring of a VM are all operations
	   which are asynchronous to each other, for both performance and
	   historical reasons - and both reasons are still relevant today.
	2. the semantic of this reporting (VM unresponsive for stats too old)
	   is poorly defined, so the right thing is to keep backward
	   compatibility, lacking better description.

	To solve this issue we generalize the old VM.incomingMigrationPending
	attribute into a 'monitorable' attribute.
	A VM is monitorable if it is in a meaningful state, so after the
	creation process is completed, or before the shutdown process is
	initiated.

	We should adjust responsiveness for stats too old
	only if a VM is monitorable, not inconditionally.
	Otherwise we can have misreports on slow startup
	or slow shutdowns.

	Please note that the `monitorable' state share similarities with
	the VM state (VM.lastStatus attribute), but the two concepts
	overlap only for a small part.
	Lacking a precise definition, we use two independent variables
	to track those attributes.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1382578
	Bug-Url: https://bugzilla.redhat.com/1382583
	Continuous-Integration: Jenkins CI

2016-10-27  Martin Polednik  <mpolednik@redhat.com>

	caps: return kernelArgs
	989a73f5 accidentaly removed kernelArgs from caps with a bad rebase.
	We still want to report it.

	Continuous-Integration: Jenkins CI

2016-10-27  Irit Goihman  <igoihman@redhat.com>

	infra tests: added functional test for upgrading vdsm
	the tests checks if vdsmd is active after vdsm upgrade

	Continuous-Integration: Jenkins CI

2016-10-27  Martin Polednik  <mpolednik@redhat.com>

	osinfo: memoize runtime_kernel_flags
	Unless magic is involved, we don't expect the underlying kernel to
	change. Memoize to save uname calls.

	Continuous-Integration: Jenkins CI

	caps: report realtime kernel status
	Determining whether system is suitable for RT operation is complex
	task consisting of multiple variables. One of the necessary but
	insufficient indications is RT_PREEMPT patch within running kernel,
	as shown by "RT" string within kernel's release string.

	We now report realtimeKernel in caps, using os.uname() to gather
	information about runtime kernel; allowing engine to act based on
	this information.

	Continuous-Integration: Jenkins CI

2016-10-26  Francesco Romani  <fromani@redhat.com>

	vm: rename statsAge parameter
	rename `statsAge' to `stats_age'.
	Now it is pep8 friendlier, and it is easier to follow the code flow:
	it is now possible to follow this flow end to end using
	'git grep stats_age'.

	It used to be called `statsAge' in camelCase only for legacy reasons.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1382578
	Bug-Url: https://bugzilla.redhat.com/1382583
	Continuous-Integration: Jenkins CI

	vm: reformat setUnresponsiveIfTimeout
	Reformat the order of operations to make clear
	on which cases we don't care about timeouts.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1382578
	Bug-Url: https://bugzilla.redhat.com/1382583
	Continuous-Integration: Jenkins CI

2016-10-25  Nir Soffer  <nsoffer@redhat.com>

	tests: Use Popen.poll() for running state
	Checking if /proc/pid exists works, but using poll() is simpler and more
	clear.

	Since proc_path is used only in one test, move it the test using it.

	Continuous-Integration: Jenkins CI

2016-10-23  Ondřej Svoboda  <osvoboda@redhat.com>

	legacy_switch: quote bonding options and stop repeating "bond Bond()"
	Continuous-Integration: Jenkins CI

2016-10-23  Andrej Krejcir  <akrejcir@redhat.com>

	schema: Change description of io tune parameters.
	Continuous-Integration: Jenkins CI

2016-10-22  Nir Soffer  <nsoffer@redhat.com>

	tests: Wait for child process in tearDown
	If the code fail to terminate a child process, we must wait for child
	process before exiting from the test. Not waiting may cause the SIGCHLD
	singal received when the test framework write to stderror, which fails
	with EINTR.

	Here is an example failure caused the missing wait, easily reproduced
	using:

	    for i in `seq 50`; do ./run_tests_local.sh utilsTests.py:TerminatingTests; done

	======================================================================
	ERROR: test_terminating_with_kill_exception (utilsTests.TerminatingTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
	    self.runTest(result)
	  File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
	    test(result)
	  File "/usr/lib64/python2.7/unittest/case.py", line 431, in __call__
	    return self.run(*args, **kwds)
	  File "/usr/lib64/python2.7/unittest/case.py", line 406, in run
	    result.addSuccess(self)
	  File "/usr/lib/python2.7/site-packages/nose/proxy.py", line 165, in addSuccess
	    self.result.addSuccess(self.test)
	  File "/home/nsoffer/src/vdsm/tests/testlib.py", line 309, in addSuccess
	    self._writeResult(test, 'OK', TermColor.green, '.', True)
	  File "/home/nsoffer/src/vdsm/tests/testlib.py", line 302, in _writeResult
	    self.stream.writeln()
	  File "/usr/lib64/python2.7/unittest/runner.py", line 25, in writeln
	    self.write('\n') # text-mode streams translate to \r\n if needed
	IOError: [Errno 4] Interrupted system call
	-------------------- >> begin captured logging << --------------------
	2016-10-10 20:01:08,738 DEBUG   [root] (MainThread) /usr/bin/taskset --cpu-list 0-3 sleep 2 (cwd None)
	2016-10-10 20:01:08,739 DEBUG   [root] (MainThread) Terminating process pid=5854
	2016-10-10 20:01:08,739 ERROR   [root] (MainThread) Failed to kill process 5854
	Traceback (most recent call last):
	  File "/home/nsoffer/src/vdsm/lib/vdsm/utils.py", line 740, in terminating
	    proc.kill()
	  File "/home/nsoffer/src/vdsm/tests/utilsTests.py", line 119, in fake_kill
	    raise FakeKillError("fake kill exception")
	FakeKillError: fake kill exception
	--------------------- >> end captured logging << ---------------------

	Continuous-Integration: Jenkins CI

	utils: Add missing Popen methods
	AsyncProc should have a Popen like interface, but it is missing
	terminate() and send_signal() methods. These methods are useful for
	testing and for implementing graceful termination.

	Continuous-Integration: Jenkins CI

2016-10-22  Petr Horáček  <phoracek@redhat.com>

	net: edit nic detached from bridge but still attached to a vlan
	We do not understand why, but the problem does not reproduce with dummy
	devices. Therefore, we cannot easily test it. Trying to reproduce the
	issue with a veth pair was deemed to much of a hassle. We test this
	fix manually and do not include a regression test for it.

	Bug-Url: https://bugzilla.redhat.com/1372798
	Continuous-Integration: Jenkins CI

2016-10-22  Nir Soffer  <nsoffer@redhat.com>

	travis: Add Fedora 24 build
	The previous CentOS build cannot run the python 3 tests because some
	packages are missing; Add Fedora 24 build that can run all tests.

	Using env matrix, two sub-builds are created for each build, each using
	a different docker image.

	Continuous-Integration: Jenkins CI

	github: Add travis build status image
	Since travis build is working now, we can show the build status in
	github like a decent project.

	Continuous-Integration: Jenkins CI

2016-10-22  Arik Hadas  <ahadas@redhat.com>

	fix comment
	The comment on _getConfigVmStats mention the 'display' field
	but this field is no longer set in this method, thus this
	part is removed.

	Continuous-Integration: Jenkins CI

2016-10-22  Nir Soffer  <nsoffer@redhat.com>

	properties: Make password test data more clear
	The old test used the value b"12345678", which may confuse the
	maintainer of this file about to think that this may be a Unicode
	string. Replace with b"\x80\x81\x82\x83", which is clearly binary data,
	and also will fail to decode to Unicode using many encodings.

	Continuous-Integration: Jenkins CI

2016-10-21  Nir Soffer  <nsoffer@redhat.com>

	logging: Unify SimpleLogAdapter format
	SimpleLogAdapter was prefixing the log message with context info, using
	"::" as message separator. This made sense when the log was using "::"
	as field separator, but now we are using spaces.

	Additionally the old format use strange quoting and no spacing between
	pairs, making the format harder to read:

	    task=`xxxyyy`res=`foo.bar.baz`::Message text ...

	The new format fixes these issues and enclose the context info in
	parenthesis to match the new log format:

	    (task='xxxyyy', res='foo.bar.baz') Message text ...

	This matches the format we used lately in many logs for adding message
	details.

	Here is an example line using the format:

	2016-09-23 02:21:57,965 INFO  (Thread-11) [virt.vm] (vmId='45b59cae-f2a0-4d83-8da8-b7c0a21fbe14') VM wrapper has started (vm:1751)

	Continuous-Integration: Jenkins CI

	logging: Improve log level alignment
	Shorten WARNING to WARN and CRITICAL to CRIT to make log messages align
	nicer.

	Here is an example log:

	2016-09-23 02:18:32,060 INFO  (MainThread) [vds] (PID: 26597) I am the actual vdsm 4.18.999-606.gitd60b2e8.el7 voodoo6.tlv.redhat.com (3.10.0-489.el7.x86_64) (vdsm:150)
	2016-09-23 02:18:32,060 INFO  (MainThread) [vds] VDSM will run with cpu affinity: frozenset([1]) (vdsm:256)
	2016-09-23 02:18:32,126 INFO  (MainThread) [storage.check] Starting check service (check:91)
	2016-09-23 02:18:32,130 INFO  (MainThread) [storage.Dispatcher] Starting StorageDispatcher... (dispatcher:47)
	2016-09-23 02:18:32,130 INFO  (check/loop) [storage.asyncevent] Starting <EventLoop running=True closed=False at 0x33217616> (asyncevent:122)
	2016-09-23 02:18:32,218 INFO  (MainThread) [dispatcher] Run and protect: registerDomainStateChangeCallback(callbackFunc=<functools.partial object at 0x2809a48>) (logUtils:49)
	2016-09-23 02:18:32,218 INFO  (MainThread) [dispatcher] Run and protect: registerDomainStateChangeCallback, Return response: None (logUtils:52)
	2016-09-23 02:18:32,218 INFO  (MainThread) [MOM] Preparing MOM interface (momIF:49)
	2016-09-23 02:18:32,219 INFO  (MainThread) [MOM] Using named unix socket /var/run/vdsm/mom-vdsm.sock (momIF:58)
	2016-09-23 02:18:32,219 INFO  (MainThread) [root] Unregistering all secrets (secret:91)
	2016-09-23 02:18:32,224 INFO  (MainThread) [vds] Setting channels' timeout to 30 seconds. (vmchannels:223)
	2016-09-23 02:18:32,226 INFO  (MainThread) [vds.MultiProtocolAcceptor] Listening at :::54321 (protocoldetector:178)
	2016-09-23 02:18:32,424 INFO  (clientIFinit) [vds] recovery [1:1/1]: recovered domain 45b59cae-f2a0-4d83-8da8-b7c0a21fbe14 from libvirt (recovery:178)
	2016-09-23 02:18:32,424 INFO  (clientIFinit) [vds] recovery: waiting for 1 domains to go up (clientIF:545)
	2016-09-23 02:18:32,424 INFO  (Thread-11) [virt.vm] vmId=`45b59cae-f2a0-4d83-8da8-b7c0a21fbe14`::VM wrapper has started (vm:1751)
	2016-09-23 02:18:32,425 INFO  (Thread-11) [dispatcher] Run and protect: getVolumeSize(sdUUID=u'5f35b5c0-17d7-4475-9125-e97f1cdb06f9', spUUID=u'f9374c0e-ae24-4bc1-a596-f61d5f05bc5f', imgUUID=u'3bdc1ff7-22f9-4263-8955-7e3bfa540edc', volUUID=u'7e159928-0e2f-423a-a02d-3faddbf55585', options=None) (logUtils:49)
	2016-09-23 02:18:33,022 ERROR (Thread-11) [storage.StorageDomainCache] looking for unfetched domain 5f35b5c0-17d7-4475-9125-e97f1cdb06f9 (sdc:151)
	2016-09-23 02:18:33,022 ERROR (Thread-11) [storage.StorageDomainCache] looking for domain 5f35b5c0-17d7-4475-9125-e97f1cdb06f9 (sdc:168)
	2016-09-23 02:18:33,153 INFO  (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['metadata'] (lvm:1226)
	2016-09-23 02:18:33,425 INFO  (clientIFinit) [vds] recovery: waiting for 1 domains to go up (clientIF:545)
	2016-09-23 02:18:33,445 INFO  (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['ids'] (lvm:1226)
	2016-09-23 02:18:33,470 INFO  (hsm/init) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['ids', 'master', 'inbox', 'metadata', 'outbox', 'leases'] (lvm:677)
	2016-09-23 02:18:33,547 INFO  (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['leases'] (lvm:1226)
	2016-09-23 02:18:33,670 INFO  (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['metadata', 'leases', 'ids', 'inbox', 'outbox', 'master'] (lvm:1226)
	2016-09-23 02:18:33,829 INFO  (Thread-11) [dispatcher] Run and protect: getVolumeSize, Return response: {'truesize': '1073741824', 'apparentsize': '1073741824'} (logUtils:52)
	2016-09-23 02:18:33,829 INFO  (Thread-11) [dispatcher] Run and protect: getVolumeSize(sdUUID=u'5f35b5c0-17d7-4475-9125-e97f1cdb06f9', spUUID=u'f9374c0e-ae24-4bc1-a596-f61d5f05bc5f', imgUUID=u'65e74f9f-a41b-4636-8e72-db3dd7d73055', volUUID=u'3a9f341b-4149-4794-88d6-4fd12ff84307', options=None) (logUtils:49)
	2016-09-23 02:18:33,830 INFO  (Thread-11) [dispatcher] Run and protect: getVolumeSize, Return response: {'truesize': '7650410496', 'apparentsize': '7650410496'} (logUtils:52)
	2016-09-23 02:18:33,830 INFO  (Thread-11) [dispatcher] Run and protect: getVolumeSize(sdUUID=u'5f35b5c0-17d7-4475-9125-e97f1cdb06f9', spUUID=u'f9374c0e-ae24-4bc1-a596-f61d5f05bc5f', imgUUID=u'69107a7c-acd6-44b0-a481-e7ec13486847', volUUID=u'88816475-3ea1-4d1f-ac93-7767cf9a2d2c', options=None) (logUtils:49)
	2016-09-23 02:18:33,830 INFO  (Thread-11) [dispatcher] Run and protect: getVolumeSize, Return response: {'truesize': '1073741824', 'apparentsize': '1073741824'} (logUtils:52)
	2016-09-23 02:18:33,848 INFO  (Thread-11) [virt.vm] vmId=`45b59cae-f2a0-4d83-8da8-b7c0a21fbe14`::Starting connection (guestagent:234)
	2016-09-23 02:18:33,849 INFO  (Thread-11) [virt.vm] vmId=`45b59cae-f2a0-4d83-8da8-b7c0a21fbe14`::CPU running: domain initialization (vm:4653)
	2016-09-23 02:18:33,873 WARN  (Thread-11) [vds] Not ready yet, ignoring event u'|virt|VM_status|45b59cae-f2a0-4d83-8da8-b7c0a21fbe14' args={u'45b59cae-f2a0-4d83-8da8-b7c0a21fbe14': {'status': 'Up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '10.35.0.110', 'type': u'spice', 'port': '-1'}], 'hash': '-6596881514735067770', 'displayIp': '10.35.0.110', 'displayPort': '-1', 'displaySecurePort': u'5900', 'timeOffset': u'0', 'pauseCode': 'NOERR', 'vcpuQuota': '-1', 'cpuUser': '0.00', 'monitorResponse': '0', 'elapsedTime': '199491', 'displayType': 'qxl', 'cpuSys': '0.00', 'clientIp': '', 'vcpuPeriod': 100000L}} (clientIF:157)
	2016-09-23 02:18:34,276 INFO  (hsm/init) [storage.LVM] Refreshing lvs: vg=bb85ee2f-d674-489f-9377-3eb1f176e8fb lvs=['metadata', 'outbox', 'ids', 'leases', 'master', 'inbox'] (lvm:677)
	2016-09-23 02:18:34,320 INFO  (BindingXMLRPC) [vds] XMLRPC server running (bindingxmlrpc:63)
	2016-09-23 02:18:34,321 INFO  (Reactor thread) [ProtocolDetector.AcceptorImpl] Accepting connection from ::ffff:10.35.0.102:50389 (protocoldetector:71)
	2016-09-23 02:18:34,324 INFO  (MainThread) [health] Starting health monitor (interval=60) (health:64)
	2016-09-23 02:18:34,333 INFO  (Reactor thread) [ProtocolDetector.Detector] Detected protocol stomp from ::ffff:10.35.0.102:50389 (protocoldetector:120)
	2016-09-23 02:18:34,334 INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer] In recovery, ignoring 'Host.getAllVmStats' in bridge with {} (__init__:527)
	2016-09-23 02:18:34,334 INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer] RPC call Host.getAllVmStats failed (error 99) in 0.00 seconds (__init__:515)
	2016-09-23 02:18:34,427 INFO  (clientIFinit) [dispatcher] Run and protect: getConnectedStoragePoolsList(options=None) (logUtils:49)

	Continuous-Integration: Jenkins CI

2016-10-21  Edward Haas  <edwardh@redhat.com>

	net: Validate nameservers setup
	Add address validation for the nameservers setup.

	Continuous-Integration: Jenkins CI

	net: Change classmethod to staticmethod in IPv4 and IPv6 classes
	Several validation methods have been defined as classmethods where
	staticmethods seems to fit better.

	Using a classmethod usually implies the need to instantiate or use the
	class inside the method. This is not the case here, making the reader
	raising uneeded questions.

	Continuous-Integration: Jenkins CI

2016-10-21  Dan Kenigsberg  <danken@redhat.com>

	py3: make ovs_test pass
	Continuous-Integration: Jenkins CI

2016-10-19  Irit Goihman  <igoihman@redhat.com>

	after_vm_start: migrate to jsonrpcvdsli
	vdscli is deprecated and was replaced by jsonrpcvdsli

	Continuous-Integration: Jenkins CI

2016-10-18  Dan Kenigsberg  <danken@redhat.com>

	py3: let bulk_sampling_test pass under py3
	Continuous-Integration: Jenkins CI

2016-10-17  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove cPopenTests.py
	We kept an old and broken version of cpopen tests in vdsm when cpopen
	was separated into a standalone project. People who like to test cpopen
	are invited to send patches that that project.

	For reference, here are CPopen tests:
	https://github.com/oVirt/cpopen/blob/master/tests/tests.py

	Continuous-Integration: Jenkins CI

	build: Replace pep8 and pyflakes with flake8
	flake8 is an extensible and configurable tool combining pep8, pyflakes
	and other plugins.

	This patch replace the pep8 and pyflakes targets with single flake8
	target, and remove the complex and ugly tox.sh. Everyting is configured
	in a simple way in tox.ini.

	Since this version includes the newers versions of pyflakes and pep8, we are
	ignoring some new errors and warnings. See tox.ini for the details.

	To disable ignored warnings and errors, you can:

	    tox -- --ignore=''

	I enabled the --show-source option by default, so now we see exactly
	where is the error:

	    ./tests/functional/networkTests.py:465:29: W503 line break before binary operator
					<= (ARP_REQUEST_SIZE + DHCP_PACKET_SIZE),

	I also enabled the --statistics option, showing:

	    26    E123 closing bracket does not match indentation of opening bracket's line
	    32    E226 missing whitespace around arithmetic operator
	    45    E241 multiple spaces after ','
	    31    E402 module level import not at top of file
	    25    E731 do not assign a lambda expression, use a def
	    24    W503 line break before binary operator

	For more info see http://flake8.pycqa.org

	Continuous-Integration: Jenkins CI

2016-10-17  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Try to detect non guest iniated shutdowns
	When a host system shutsdown due to a variety of reasons (UPS, fencing...)
	VMs running on that system get stopped before VDSM and libvirtd services
	are stopped. This is due to the way how they are registerd with machined.

	This results in the qemu processes being signaled with SIG_TERM and them
	exiting. To libvirt this looks the same as if the shutdown would have been
	initiated from within the VM and therefore emits a lifecycle event that
	looks to VDSM as if the VM was stopped from within. VDSM in this case
	reports the exit reason as user shutdown. This is a problem for HA VMs
	which will not be automatically rescheduled when they see a user shutdown
	exit reason.

	This patch attempts to detect non user shutdowns. This requires the VM to
	have the ovirt guest agent running to detect these scenarios properly.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1341106
	Continuous-Integration: Jenkins CI

2016-10-15  Francesco Romani  <fromani@redhat.com>

	supervdsm: expose systemd utilities
	Instead of adding sudo permissions to allow to run those commands,
	we expose them as supervdsm APIs.

	Those systemd facilities are needed to start and stop containers.

	Continuous-Integration: Jenkins CI

2016-10-14  Petr Horáček  <phoracek@redhat.com>

	net tests: minor libvirt_tests style refactoring
	Continuous-Integration: Jenkins CI

	net tests: separate ifcfg and libvirt unit tests
	Continuous-Integration: Jenkins CI

	net test: fix ovs_test:test_dry_run
	The test was using NetsAdditionSetup.add() as a standard function
	although it is a context manager. Therefore it only returned context
	manager object and no underlying code was executed.

	Bug-Url: https://bugzilla.redhat.com/1379115
	Continuous-Integration: Jenkins CI

2016-10-14  Francesco Romani  <fromani@redhat.com>

	tests: use assertXMLEqual in vmTests
	switch to assertXMLEqual to have better error messages.

	Continuous-Integration: Jenkins CI

2016-10-14  Martin Polednik  <mpolednik@redhat.com>

	static: move man under static
	Part of the move of static files to new directory. The files are
	moved to corresponding *expected* path under static
	(static/usr/share/man/man8).

	Continuous-Integration: Jenkins CI

	static: move vdsm bonding defaults under static
	Part of the move of static files to new directory. The files are
	moved to corresponding *expected* path under static
	(/usr/share/vdsm).

	Continuous-Integration: Jenkins CI

2016-10-14  Adam Litke  <alitke@redhat.com>

	jobs: Fix abort semantics
	Prior to this commit jobs.abort was treated as an synchronous operation
	and if it returned successfully the caller could assume that no
	operations related to the job were still running.  Unforatunately this
	assumption is wrong since most underlying operations are aborted
	asynchronously (ie. by sending a signal to a process).

	To fix this we must adopt async abort sementics in the jobs API.  If a
	job is pending and abort is called we can simply move it to aborted
	state.  If the job is running we move it to aborting state, call the
	abort helper (_abort) and return.  When run() finishes it will move an
	aborting job to aborted.  We must not autodelete or otherwise change the
	state of jobs with aborting status because it could mask the fact that a
	process is still changing the host or storage.

	Continuous-Integration: Jenkins CI

2016-10-14  Milan Zamazal  <mzamazal@redhat.com>

	virt: Minor typo fixes in Vm.getStats docstring
	Continuous-Integration: Jenkins CI

2016-10-13  Ala Hino  <ahino@redhat.com>

	qemuimg: Expose API for qemuimg map
	Continuous-Integration: Jenkins CI

2016-10-13  Martin Polednik  <mpolednik@redhat.com>

	osinfo: un-nest kernel version gathering function
	Previous function, kernelDict, had unclear naming and was needlessly
	nested within package_versions function. This patch un-nests the
	function and renames it to _runtime_kernel_version. The new name
	hints why we don't look up the version via rpmdb.

	Continuous-Integration: Jenkins CI

	osinfo: drop package buildtime
	Buildtime of host packages was never used and only causes us problems
	w/ parsing kernel cmdline. We are safe to drop it.

	Continuous-Integration: Jenkins CI

2016-10-13  Dan Kenigsberg  <danken@redhat.com>

	py3: make gluster_cli_tests pass
	Continuous-Integration: Jenkins CI

2016-10-13  Nir Soffer  <nsoffer@redhat.com>

	pep8: Fix long line in vdsm sos plugin
	Continuous-Integration: Jenkins CI

2016-10-10  Nir Soffer  <nsoffer@redhat.com>

	sp: Remove vol_extend_policy option
	We had a vol_extend_policy option disabling the mailbox. This option is
	not useful for anything but causing vms using thin block disks to pause
	without a way to recover.

	This option was added in commit 73adfc489e6e (Add spmProtect, release
	lock and toggle lock functionality.  Add toggle lvextend functionality)
	in 2009. I did not find why this option was added.

	sp: Sort dict literal by key
	With more than few items, it is easier to work with sorted items, and
	people are less likely to add duplicate keys at the end, as seen in
	commit f9cf58b7bced.

	Continuous-Integration: Jenkins CI

	sp: Remove double dict key
	Commit f9cf58b7bced (Make getRepoStats() a hsm method) added a second
	"pool_status" key in the same dictionary. Turns out that this is well
	defined, and the second key overrides the first one. This patch removes
	the old unused key.

	For more info see:
	https://docs.python.org/2/reference/expressions.html#dictionary-displays

	Continuous-Integration: Jenkins CI

	sp: pep8 1.6.2 fix
	Both pep8 tool and me do not like line breaks before binary operators.

	Continuous-Integration: Jenkins CI

	sp: Streamline usage of image.Image class
	We used to create an image.Image an call a method in one line, making
	the code hard to read for no benefit. Separate creation of the image
	from the call.

	Continuous-Integration: Jenkins CI

	sp: Fix positional args calling convention
	StorageDomain.setDescription and Volume.setLegality accept one
	positional argument. Using kwarg calling style is pointless.

	Continuous-Integration: Jenkins CI

	sp: Streamline calls to volume methods
	When calling volume methods, we typically produce the domain, produce
	the volume, and calling the method. Adding a temporary variable for the
	volume makes the code easier to read.

	Continuous-Integration: Jenkins CI

	sp: Fix domain.produceVolume calling convention
	As a general rule positional args should be called as positional args
	(arg), and kwargs as kwargs (arg=value). In some cases using kwarg call
	style for positional argument makes the code more clear, but not in the
	case of domain.produceVolume.

	Continuous-Integration: Jenkins CI

	sp: Simplify long lines using continuation \
	Eliminate fragile and hard to read continuation \ with temporary
	variable.

	Continuous-Integration: Jenkins CI

	sp: Remove useless continuation to a commented line
	Continuous-Integration: Jenkins CI

	sp: Streamline building domains list for upgrade
	Instead of creating a list of domain uuids, and removing the master
	domain uuid, remove the master the domain uuid from the domains dict.
	This avoids noisy exception handler and using \ continuation.

	While touching this code, also fix the log, we are not marking *all*
	domains for upgrade but only active domains.

	Continuous-Integration: Jenkins CI

	sp: Do not use rm.acquireResource return value
	resourceManager.acquireResource is returning now a Resource object,
	which can be used as a context manager. This usage is deprecated, as we
	want to replace resourceManager with something much simpler.

	Replace such code with usage of rm.acquireResource as a context manger.
	This usage will be the only usage allowed in the future.

	Continuous-Integration: Jenkins CI

	sp: Streamline acquiring of multiple images locks
	Replace srcImageResourcesNamespace and dstImageResourcesNamespace with
	src_img_ns and dst_img_ns, streamlining code creating the namespace and
	using them.

	Continuous-Integration: Jenkins CI

	logging: Use same log format in the tests
	Using the same format as in vdsm logs may make it easier to debug
	failing tests. In particular, the old format was missing the module and
	line number.

	Continuous-Integration: Jenkins CI

	logging: More standard logging format
	Use nicer and more standard logging format, similar to engine log
	format. Having similar logging formats in the oVirt project should make
	it easier to debug and support.

	Changes compared to engine log:
	- (thread-name) is displayed before the [logger-name] so it is always
	  aligned.
	- Add (module:lineno) at the end of the message.

	Here is example log during vdsm startup:

	2016-09-23 02:11:43,319 INFO    (MainThread) [vds] (PID: 19841) I am the actual vdsm 4.18.999-604.gitf69ba3a.el7 voodoo6.tlv.redhat.com (3.10.0-489.el7.x86_64) (vdsm:145)
	2016-09-23 02:11:43,319 INFO    (MainThread) [vds] VDSM will run with cpu affinity: frozenset([1]) (vdsm:251)
	2016-09-23 02:11:43,385 INFO    (MainThread) [storage.check] Starting check service (check:91)
	2016-09-23 02:11:43,389 INFO    (MainThread) [storage.Dispatcher] Starting StorageDispatcher... (dispatcher:47)
	2016-09-23 02:11:43,389 INFO    (check/loop) [storage.asyncevent] Starting <EventLoop running=True closed=False at 0x50437200> (asyncevent:122)
	2016-09-23 02:11:43,480 INFO    (MainThread) [dispatcher] Run and protect: registerDomainStateChangeCallback(callbackFunc=<functools.partial object at 0x3877a48>) (logUtils:49)
	2016-09-23 02:11:43,480 INFO    (MainThread) [dispatcher] Run and protect: registerDomainStateChangeCallback, Return response: None (logUtils:52)
	2016-09-23 02:11:43,481 INFO    (MainThread) [MOM] Preparing MOM interface (momIF:49)
	2016-09-23 02:11:43,481 INFO    (MainThread) [MOM] Using named unix socket /var/run/vdsm/mom-vdsm.sock (momIF:58)
	2016-09-23 02:11:43,482 INFO    (MainThread) [root] Unregistering all secrets (secret:91)
	2016-09-23 02:11:43,488 INFO    (MainThread) [vds] Setting channels' timeout to 30 seconds. (vmchannels:223)
	2016-09-23 02:11:43,492 INFO    (MainThread) [vds.MultiProtocolAcceptor] Listening at :::54321 (protocoldetector:178)
	2016-09-23 02:11:44,543 INFO    (clientIFinit) [vds] recovery [1:1/1]: recovered domain 45b59cae-f2a0-4d83-8da8-b7c0a21fbe14 from libvirt (recovery:178)
	2016-09-23 02:11:44,543 INFO    (clientIFinit) [vds] recovery: waiting for 1 domains to go up (clientIF:545)
	2016-09-23 02:11:44,543 INFO    (Thread-11) [virt.vm] vmId=`45b59cae-f2a0-4d83-8da8-b7c0a21fbe14`::VM wrapper has started (vm:1751)
	2016-09-23 02:11:44,544 INFO    (Thread-11) [dispatcher] Run and protect: getVolumeSize(sdUUID=u'5f35b5c0-17d7-4475-9125-e97f1cdb06f9', spUUID=u'f9374c0e-ae24-4bc1-a596-f61d5f05bc5f', imgUUID=u'3bdc1ff7-22f9-4263-8955-7e3bfa540edc', volUUID=u'7e159928-0e2f-423a-a02d-3faddbf55585', options=None) (logUtils:49)
	2016-09-23 02:11:44,544 ERROR   (Thread-11) [storage.StorageDomainCache] looking for unfetched domain 5f35b5c0-17d7-4475-9125-e97f1cdb06f9 (sdc:151)
	2016-09-23 02:11:44,544 ERROR   (Thread-11) [storage.StorageDomainCache] looking for domain 5f35b5c0-17d7-4475-9125-e97f1cdb06f9 (sdc:168)
	2016-09-23 02:11:44,673 INFO    (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['metadata'] (lvm:1226)
	2016-09-23 02:11:44,947 INFO    (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['ids'] (lvm:1226)
	2016-09-23 02:11:45,074 INFO    (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['leases'] (lvm:1226)
	2016-09-23 02:11:45,210 INFO    (Thread-11) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['metadata', 'leases', 'ids', 'inbox', 'outbox', 'master'] (lvm:1226)
	2016-09-23 02:11:45,219 INFO    (hsm/init) [storage.LVM] Refreshing lvs: vg=bb85ee2f-d674-489f-9377-3eb1f176e8fb lvs=['inbox', 'outbox', 'metadata', 'ids', 'leases', 'master'] (lvm:677)
	2016-09-23 02:11:45,386 INFO    (Thread-11) [dispatcher] Run and protect: getVolumeSize, Return response: {'truesize': '1073741824', 'apparentsize': '1073741824'} (logUtils:52)
	2016-09-23 02:11:45,387 INFO    (Thread-11) [dispatcher] Run and protect: getVolumeSize(sdUUID=u'5f35b5c0-17d7-4475-9125-e97f1cdb06f9', spUUID=u'f9374c0e-ae24-4bc1-a596-f61d5f05bc5f', imgUUID=u'65e74f9f-a41b-4636-8e72-db3dd7d73055', volUUID=u'3a9f341b-4149-4794-88d6-4fd12ff84307', options=None) (logUtils:49)
	2016-09-23 02:11:45,387 INFO    (Thread-11) [dispatcher] Run and protect: getVolumeSize, Return response: {'truesize': '7650410496', 'apparentsize': '7650410496'} (logUtils:52)
	2016-09-23 02:11:45,387 INFO    (Thread-11) [dispatcher] Run and protect: getVolumeSize(sdUUID=u'5f35b5c0-17d7-4475-9125-e97f1cdb06f9', spUUID=u'f9374c0e-ae24-4bc1-a596-f61d5f05bc5f', imgUUID=u'69107a7c-acd6-44b0-a481-e7ec13486847', volUUID=u'88816475-3ea1-4d1f-ac93-7767cf9a2d2c', options=None) (logUtils:49)
	2016-09-23 02:11:45,388 INFO    (Thread-11) [dispatcher] Run and protect: getVolumeSize, Return response: {'truesize': '1073741824', 'apparentsize': '1073741824'} (logUtils:52)
	2016-09-23 02:11:45,410 INFO    (Thread-11) [virt.vm] vmId=`45b59cae-f2a0-4d83-8da8-b7c0a21fbe14`::Starting connection (guestagent:234)
	2016-09-23 02:11:45,418 INFO    (Thread-11) [virt.vm] vmId=`45b59cae-f2a0-4d83-8da8-b7c0a21fbe14`::CPU running: domain initialization (vm:4653)
	2016-09-23 02:11:45,465 WARNING (Thread-11) [vds] Not ready yet, ignoring event u'|virt|VM_status|45b59cae-f2a0-4d83-8da8-b7c0a21fbe14' args={u'45b59cae-f2a0-4d83-8da8-b7c0a21fbe14': {'status': 'Up', 'displayInfo': [{'tlsPort': u'5900', 'ipAddress': '10.35.0.110', 'type': u'spice', 'port': '-1'}], 'hash': '-6596881514735067770', 'displayIp': '10.35.0.110', 'displayPort': '-1', 'displaySecurePort': u'5900', 'timeOffset': u'0', 'pauseCode': 'NOERR', 'vcpuQuota': '-1', 'cpuUser': '0.00', 'monitorResponse': '0', 'elapsedTime': '199082', 'displayType': 'qxl', 'cpuSys': '0.00', 'clientIp': '', 'vcpuPeriod': 100000L}} (clientIF:157)
	2016-09-23 02:11:45,475 INFO    (BindingXMLRPC) [vds] XMLRPC server running (bindingxmlrpc:63)
	2016-09-23 02:11:45,476 INFO    (MainThread) [health] Starting health monitor (interval=60) (health:64)
	2016-09-23 02:11:45,525 INFO    (hsm/init) [storage.LVM] Refreshing lvs: vg=5f35b5c0-17d7-4475-9125-e97f1cdb06f9 lvs=['ids', 'master', 'inbox', 'metadata', 'outbox', 'leases'] (lvm:677)
	2016-09-23 02:11:45,544 INFO    (clientIFinit) [dispatcher] Run and protect: getConnectedStoragePoolsList(options=None) (logUtils:49)
	2016-09-23 02:11:45,544 INFO    (clientIFinit) [dispatcher] Run and protect: getConnectedStoragePoolsList, Return response: {'poollist': []} (logUtils:52)
	2016-09-23 02:11:45,544 INFO    (clientIFinit) [vds] recovery: waiting for storage pool to go up (clientIF:551)
	2016-09-23 02:11:45,572 INFO    (Reactor thread) [ProtocolDetector.AcceptorImpl] Accepting connection from ::ffff:10.35.0.102:50379 (protocoldetector:71)
	2016-09-23 02:11:45,635 INFO    (Reactor thread) [ProtocolDetector.Detector] Detected protocol stomp from ::ffff:10.35.0.102:50379 (protocoldetector:120)
	2016-09-23 02:11:45,636 INFO    (Reactor thread) [Broker.StompAdapter] Subscribe command received (stompreactor:128)

	Continuous-Integration: Jenkins CI

	dockerfile: Minimize docker images
	Cleaning dnf caches remove 145MiB of useless data slowing down pushing
	and pulling:

	    # du -sh /var/cache/*
	    145M	/var/cache/dnf
	    20K	/var/cache/ldconfig
	    0	/var/cache/libvirt

	    # dnf clean all
	    72 files removed

	    # du -sh /var/cache/*
	    12K	/var/cache/dnf
	    20K	/var/cache/ldconfig
	    0	/var/cache/libvirt

	Continuous-Integration: Jenkins CI

	dockerfile: Add Fedora dockerfile
	The Fedora image should run the python 3 tests that cannot run on
	CentOS because of missing packages.

	We probably want to have a matrix with two builds, one using CentOS
	image running only python 2 tests, and one using Fedora image running
	all tests.

	Continuous-Integration: Jenkins CI

2016-10-10  Dan Kenigsberg  <danken@redhat.com>

	hooks: avoid redundant temporary list
	No functional change is expected.

	Continuous-Integration: Jenkins CI

2016-10-09  Nir Soffer  <nsoffer@redhat.com>

	dokerfile: Rename Dockerfile to Dockerfile.centos
	We need another dockerfile for Fedora.

	Continuous-Integration: Jenkins CI

	readme: Convert to markdown format
	Markdown is nicer to work with and render nicer in github.

	Continuous-Integration: Jenkins CI

2016-10-09  Ala Hino  <ahino@redhat.com>

	qemuimg: Add wrapper to execute command
	Add wrapper to execute qemuimg command and raise QImgError if error
	encountered.

	Continuous-Integration: Jenkins CI

	qemuimg: Introduce InvalidOutput exception
	Raised when qemu-img command succeeded, but its output cannot be parsed
	or missing required properties.  In this case we know that rc is 0, and
	stderr is probably empty, so including it in the error is not very
	useful.

	Continuous-Integration: Jenkins CI

	qemuimg: Add the command to QImgError
	Continuous-Integration: Jenkins CI

2016-10-09  Dan Kenigsberg  <danken@redhat.com>

	py3: make network/conf_test pass
	re.sub should not mix strings and byte arrays.

	Continuous-Integration: Jenkins CI

2016-10-09  Nir Soffer  <nsoffer@redhat.com>

	testlib: Handle EINTR in waitpid
	Handle EINTR when waiting for a child process in a @forked test.

	Fixes this error seen on travis:

	    Traceback (most recent call last):
	      File "/vdsm/tests/testlib.py", line 521, in wrapper
		_, status = os.waitpid(pid, 0)
	    OSError: [Errno 4] Interrupted system call

	Continuous-Integration: Jenkins CI

	dockerfile: Add missing networking packages
	This patch adds:
	- openvswitch
	- bridge-utils

	Continuous-Integration: Jenkins CI

2016-10-08  Nir Soffer  <nsoffer@redhat.com>

	properties: Enable tests on python 3
	Continuous-Integration: Jenkins CI

2016-10-07  Leon Goldberg  <leon.otium@gmail.com>

	properties: Python 3 compliant base64 usage
	base64.b64encode and base64.b64decode receive and return byte
	arrays respectively -- pass a bytes literal in both py2 and py3
	as input for b64encode and modify test_decode to test for equality
	to a bytes literal in both py2 and py3.

	Continuous-Integration: Jenkins CI

	properties: Python 3 compatible string type check
	basestring is removed in py3; now using six.string_types instead.

	Continuous-Integration: Jenkins CI

	properties: Use python 3 compatible metaclass
	Setting metaclass differs in py2/3; now using six's add_metaclass
	decorator to comply with both py2 and 3.

	Continuous-Integration: Jenkins CI

2016-10-07  Nir Soffer  <nsoffer@redhat.com>

	api: Speed up schema loading
	Use yaml.CLoader for 13x speedup in vdsm schema loading.

	Here is a comparison with other formats:

	$ python bench.py

	      yaml: 1.053720 seconds per load
	     cyaml: 0.086472 seconds per load
	      json: 0.049521 seconds per load
	    pickle: 0.001516 seconds per load

	$ python3 bench.py

	      yaml: 1.340607 seconds per load
	     cyaml: 0.100010 seconds per load
	      json: 0.026627 seconds per load
	    pickle: 0.002153 seconds per load

	$ grep 'model name' /proc/cpuinfo | head -n1
	model name	: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz

	Clearly the best format is pickle, 700X times faster on python 2 and
	638X times faster on python 3. However loading the schema in 100
	milliseconds seems to be good enough for now.

	The benchmark script:
	https://bugzilla.redhat.com/attachment.cgi?id=1208141

	Bug-Url: https://bugzilla.redhat.com/1381899
	Continuous-Integration: Jenkins CI

2016-10-06  Maor Lipchuk  <mlipchuk@redhat.com>

	vm: Add qcow2_compat on create
	Pass qcow2 compat on create.

	Continuous-Integration: Jenkins CI

2016-10-06  Nir Soffer  <nsoffer@redhat.com>

	sp: Streamline image namespace locking
	Replace imageResourcesNamespace with img_ns, streamlining acquiring of
	image namespace locks.

	The namespace is used in the context of single function, mostly very
	small functions, so we don't need a long and descriptive name. Shorter
	variables names are better in such context.

	Continuous-Integration: Jenkins CI

2016-10-06  Ala Hino  <ahino@redhat.com>

	tests: Change offset and len arguments type
	Change offset and len arguments type from string to integer.

	Continuous-Integration: Jenkins CI

	tests: Rename storagetestlibTests.py to new Vdsm convention
	Continuous-Integration: Jenkins CI

2016-10-06  Nir Soffer  <nsoffer@redhat.com>

	travis: Run docker with --privileged
	Running docker with --privileged allow creation of loop devices inside
	the container and fix some of the networking tests.

	Continuous-Integration: Jenkins CI

	travis: Fix build using new docker image
	- Use the new image built from updated dockerfile
	- Remove unneeded true value to --rm option
	- Use Z volume option to make it work with selinux on Fedora
	- Use "make check" instead of "make check-unit" since the later has no
	  effect currently (it runs exactly the same tests as make check).

	Tested locally on Fedora 24 - some tests fail, more work need to disable
	the incompatible tests.

	Continuous-Integration: Jenkins CI

	dockerfile: Install development tools using pip
	- Remove python-nose which is too old on CentOS, and install version
	  1.3.7 using pip
	- Install tox version 2.1.1 using pip.
	- Install mock, since python-mock is missing in CentOS.
	- Remove pyflakes and pep8 as they are installed using tox when running
	  make check.

	Note that for python 3, we install the ditribution packages. pip does
	not handle well intalling both python 2 and 3 packages. The long term
	solution is to install all the development tools using tox, each in its
	own isolated environment, but we are not there yet.

	Continuous-Integration: Jenkins CI

	dockerfile: Use one package per line
	Having one package per line make it easier to add and remove packages
	and review changes.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	dockerfile: Add missing packages
	Add missing packages:
	- PyYaml
	- dosfstools (for mkfs.msdos)
	- e2fsprogs (for mkfs.ext2)
	- genisoimage (for mkisofs)
	- python-decorator
	- python-setuptools (for easy_install)
	- sanlock-python
	- which (for which)

	Continuous-Integration: Jenkins CI

2016-10-06  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	schema: fixing type of default values
	Continuous-Integration: Jenkins CI

2016-10-06  Petr Horáček  <phoracek@redhat.com>

	net tests: bond tests fails on CI with ctypes.AttributeError
	Quite often the marked tests fail on CI (when they do, all of them
	fail), at the moment we have no clue why they fail (most often on Python
	3). For now we should at least silence them.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-10-05  Ala Hino  <ahino@redhat.com>

	core: Expose API for qemuimg commit
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-10-05  Adam Litke  <alitke@redhat.com>

	tests: Fix test to not wait forever on failure
	Continuous-Integration: Jenkins CI

2016-10-05  Martin Polednik  <mpolednik@redhat.com>

	hostdev: prefer numa nodes close to device MMIO
	Therefore reducing the NUMA distance if VM's memory was away from VM
	host device's MMIO region.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1356161
	Continuous-Integration: Jenkins CI

2016-10-05  Dan Kenigsberg  <danken@redhat.com>

	drop dead constant
	It has not been used in code since commit 87f0129.

	Continuous-Integration: Jenkins CI

2016-10-05  Martin Polednik  <mpolednik@redhat.com>

	vmxml: move condition from appendNumaTune to buildDomainXML
	Having the condition that explicit numa tuning was requested in
	buildDomainXML(vm.py) instead of appendNumaTune(vmxml.py) makes the
	flow slightly more obvious and allows for work done by further patches
	in the series.

	Continuous-Integration: Jenkins CI

	hostdev: properly set is_hostdevice
	Since we added is_hostdevice attribute to all devices, and the
	attribute defaults to false, we have to explicitly set it to true for
	host devices.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1356161
	Continuous-Integration: Jenkins CI

	devices: add is_hostdevice attribute
	is_hostdevice attribute is currently used to determine whether given
	device is so called host device, or in other words if it refers to
	physical device.

	At the moment, only devices HOSTDEV and NETWORK may be host devices,
	but moving the attribute to interface level allows us to greatly
	simplify host NUMA scheduling.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1356161
	Continuous-Integration: Jenkins CI

	hostdev: expose numa_node in host device
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1356161
	Continuous-Integration: Jenkins CI

	hostdev: report device MMIO numa node
	MMIO, or memory mapped IO, is a method of performing device IO via
	memory mapping. On NUMA aware systems, such memory region resides on
	of the host's NUMA nodes.

	For each PCI device, we report the region's NUMA node affinity to
	better schedule VM numa affinity further in the patch series.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1356161
	Continuous-Integration: Jenkins CI

2016-10-05  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make boolean values from boolean migration options
	`compressed' and `autoConverge' migration options have boolean values in
	the string form.  They must be converted to actual booleans before they
	are checked.

	Bug-Url: https://bugzilla.redhat.com/1380822
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-10-04  Andrej Krejcir  <akrejcir@redhat.com>

	Fix API schema to align with runtime schema
	Bug-Url: https://bugzilla.redhat.com/1348255
	Continuous-Integration: Jenkins CI

2016-10-03  Adam Litke  <alitke@redhat.com>

	cleanup: Remove dead code from storageServer.py
	While reviewing some schema fixes I noticed that we have a lot of dead
	code in storageServer.py which was misleading how parameters are
	structured when connecting storage.  Remove this unused code.

	Note: Probably should have been removed as part of 7b7c5b7.

	Continuous-Integration: Jenkins CI

2016-10-03  Nir Soffer  <nsoffer@redhat.com>

	resourceManager: Make ResourceMananger private
	Just to make sure that nobody will try to create its own instance
	somewhere.

	resourceManager: Get rid of getInstance
	The single instance of ResourceManager is created in import time,
	eliminating the clumsy getInstance mechanism.

	Internal callers in the resourceManager module are using now the module
	interface directly.

	Continuous-Integration: Jenkins CI

	rsourceFactories: Use new resourceManager module api
	Replace usage of getInstance with direct module access.

	resourcemanager: Use new module api
	Replace client code to use the resourceManager module directly instead
	of using ResourceManager.getInstance().

	After this patch only the resourceManager and resourceFactories are
	using the old getInstance api.

	Tests that used to mock modules "rmanager" variable are mocking the "rm"
	variable, and storagefakelib.FakeResourceManager implements now the
	resourceManager module api instead of the
	resourceManager.ResourceManager class. This seems to be the quickest
	solution for keeping these tests working, but we may use different way
	later.

	resourceManager: Add module api
	resourceManager has a Java like verbose api that make it hard to use and
	is not safe. Add module api hiding the single ResourceManager instance.

	Instead of this:

	    manager = rm.ResourceManager.getInstance()
	    manager.acquireResource("mamespace", "name", rm.SHRARED)

	Or this wrong usage:

	    manager = ResourceManager()
	    manager.acquireResource("mamespace", "name", rm.SHRARED)

	We can use now this:

	    rm.acquireResource("mamespace", "name", rm.SHRARED)

	This is the simplest and safest way to implement a singleton in Python,
	a module.

	This patch adds the new api and update the tests to use this api.

2016-10-03  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	yml: return type fixes for StoragePool.getSpmStatus
	Continuous-Integration: Jenkins CI

	yml: return type fixes for Task.getStatus
	Continuous-Integration: Jenkins CI

	yml: parameter type fixes for StoragePool.spmStart
	Continuous-Integration: Jenkins CI

2016-10-03  Allon Mureinik  <amureini@redhat.com>

	spec: Clean up the initscripts requirement
	Centos has delivered initscripts >= 9.49.30-1.el7_2.3 since August
	2nd, 2016 (see, e.g. [1]).
	Given that, the TODO comment in the spec file can be addressed and
	the file cleaned up a bit.

	[1] http://mirror.centos.org/centos/7/updates/x86_64/Packages/

	Continuous-Integration: Jenkins CI

2016-10-02  Maor Lipchuk  <mlipchuk@redhat.com>

	volume: Add qcow2_compat on create
	Pass qcow2 compat on create.

	Continuous-Integration: Jenkins CI

2016-09-30  Nir Soffer  <nsoffer@redhat.com>

	tests: Use fresh ResourceManager for every test
	Previously if unregistring a namespace failed during shutdown failed, we
	would reset the manager instance, but if a test failed and left the
	manager in inconsistent state, possibly breaking unrelated tests.

	Replace fragile setUp and tearDown code with monkeypatching, setting a
	fresh instance before each test, and restoring the previous instance
	after the test.

	tests: Streamline resourceManager import
	In the application we typically import resourceManager as rm. Do the
	same in the tests to streamline the tests and make the usage of this
	module same both in the tests and the real code.

	Continuous-Integration: Jenkins CI

	resourceManager: Remove unused listNamespaces
	The only usage was a test for this, so we don't really need it, making
	the ResourceManager interface smaller. This will make further
	refactoring easier.

	resourceManager: Move ResourceInfo class to module
	Simplify ResourceManger class by moving the nested ResouceInfo class to
	the module. This will make further refactoring easier.

	Continuous-Integration: Jenkins CI

	resourceManager: Move Namespace class to module
	Simplify the ResourceManager class by moving the nested Namespace class
	to the module. This make further refactoring easier.

	Continuous-Integration: Jenkins CI

	resourceManager: Flatten LockType constants
	Replace the LockType class with flat constants, streamlining client
	code.

	resourceManager: Inline LockType.validate
	Inline the function in the single call site, allowing replacing LockType
	with flat constants.

	resourceManager: Remove unused method
	LockType.fromState is not used. Remove it so we can replace the LockType
	class with flat constants.

2016-09-30  Allon Mureinik  <amureini@redhat.com>

	spec: Require selinux-policy-targeted for CephFS
	RHEL bug https://bugzilla.redhat.com/1365640 describes an selinux
	denial encountered when attempting to use CephFS as a POSIX
	storage domain in oVirt.

	This patch requires selinux-policy-3.13.1-60 which solves that issue.

	Bug-Url: https://bugzilla.redhat.com/1303550
	Continuous-Integration: Jenkins CI

	spec: Bump Fedora selinux-policy-targeted req
	Bump the selinux-policy-targeted requirement on Fedora to 3.13-1 to
	(partially) align with the EL requirement.
	Note that all the Fedora version we support (>= 23) provide this RPM
	anyway, so nothing should really change in VDSM, it's just a
	"bookkeeping" improvement.

	Continuous-Integration: Jenkins CI

2016-09-30  Petr Horáček  <phoracek@redhat.com>

	net: canonicalize IPv4 prefix to netmask
	In order to fix OVS switch, this patch moves canonicalization of
	passed IPv4 prefix into netmask from legacy_switch.py to
	canonicalize.py.

	It also adds missing 'prefix' to setupNetworks documentation.

	Bug-Url: https://bugzilla.redhat.com/1374194
	Continuous-Integration: Jenkins CI

2016-09-29  Nir Soffer  <nsoffer@redhat.com>

	guarded: Raise if attempt to lock will deadlock
	Previously we did not validate that the same lock was submitted in
	different modes, since we assumed that resourceManager will fail. Turns
	out that resourceManager will simply deadlock.

	This patch validates the locks and raise a guarded.Deadlock in this
	case, without taking any locks.

	Here is an example exception (wrapped):

	    Deadlock: Attempt to lock will deadlock: [
	    <FakeGuardedLock ns=02_img.dom, name=img, mode=exclusive at 0x7fab62093110>,
	    <FakeGuardedLock ns=02_img.dom, name=img, mode=shared at 0x7fab620931d0>]

	guarded: Implement __repr__ for easier debugging

	tests: Rename resourceManager tests to new convention
	Continuous-Integration: Jenkins CI

2016-09-29  Ala Hino  <ahino@redhat.com>

	Live Merge: Remove volume run link after live merge
	When deleting a volume while the VM is running, volume teardown doesn't
	remove the volume run symbolic link: /run/vdsm/storage/sdUUID/volUUID.
	In patch Iec3b6a (Live Merge: teardown volume on HSM after live merge)
	we added volume teardown logic that, for block storage it deactivated
	the volume. In this patch we extend volume teardown logic to unlink
	volume run link.
	Note that this change isn't required for file storage as no symbolic
	links are created.

	Bug-Url: https://bugzilla.redhat.com/1321018
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	Live Merge: Teardown volume on HSM after live merge
	If a VM is running on HSM and live merge is performed, the LV isn't
	deactivated because the deactivation is done when deleting the volume.
	However, deleting the volume is done on SPM and this means that the LV
	is not deactivated on the HSM. In this patch, a logic to teardown the
	volume is added after live merge has completed.

	Bug-Url: https://bugzilla.redhat.com/1377849
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>
	Continuous-Integration: Jenkins CI

2016-09-29  Adam Litke  <alitke@redhat.com>

	storage: Support generation in sdm.copy_data
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	storage: Increment generation when completing operation
	Before successful exit of a volume.operation context we want to
	increment the generation in the same write that we set the volume
	to legal state.  This enables engine to differentiate between all
	possible end states of a volume operation:

	* Operation was never run
	  - Lease free, legal, generation unchanged
	* Operation is running
	  - Lease held, illegal
	* Operation completed successfully
	  - Lease free, legal, generation incremented
	* Operation failed or aborted
	 - Lease free, illegal, generation unchanged

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	storage: Validate generation in volume.operation context
	When the optional requested_gen parameter is supplied to the
	volume.operation context manager, validate the requested generation
	against the volume's current generation and raise a new
	GenerationMismatch exception when they do not match.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	storage: Report generation in volume.getInfo
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	storage: Add support for generation to VolumeMetadata
	We would like to add support for a new generation key in the volume
	metadata.  GEN is a monotonically increasing integer that can be used
	to determine whether certain operations have been completed on a volume
	and to prevent two hosts from sequentially performing the same operation
	in the event of double scheduling.

	The new GEN key is optional.  If we read metadata without this key, a
	default value of 0 will be reported.

	This patch supports only the manipulation of the generation within
	the VolumeMetadata class.  The value will be made available via
	Volume.getInfo in a follow-up patch and will be changed by verbs in
	subsequent patches.

	Continuous-Integration: Jenkins CI

	storage: GenerationMismatch exception
	Introduce a new exception with a public error code for generation
	mismatch errors.  SDM verbs involving datapath operations will accept a
	generation parameter which will be compared against the operative
	entity's (eg. Volume) current generation.  If the generation values
	match then the operation can proceed.  Otherwise GenerationMismatch will
	be raised and the caller must resync against the actual storage state to
	determine how to proceed.

	Continuous-Integration: Jenkins CI

	tests: Remove TODO for SDM.copy_data abort before copy test
	The abort before copy test is meant to exercise the code which exits the
	job early (and without marking the destination volume illegal) if the
	job has been aborted in an extremely narrow race window.  It's a
	difficult test to write correctly and would not be testing anything
	particularly interesting.  Drop the TODO.

	Continuous-Integration: Jenkins CI

	tests: SDM.copy_data test for abort while copying
	When a copy operation is aborted the final job status should be aborted
	and the destination volume should be illegal.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	Use Volume.operation in SDM.copy_data
	Continuous-Integration: Jenkins CI

2016-09-29  Nir Soffer  <nsoffer@redhat.com>

	lvm: Remove unused return value
	Nobody is using _initpvs return value and the value is pretty useless to
	the caller.

	Continuous-Integration: Jenkins CI

2016-09-28  Maor Lipchuk  <mlipchuk@redhat.com>

	file_volume: Add qcow2_compat on create
	Pass qcow2 compat on create.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-09-28  Adam Litke  <alitke@redhat.com>

	storage: Introduce VolumeManifest.operation context
	When performing datapath operations on a volume (eg. copying data) we
	mark the volume ILLEGAL before starting the operation and only mark the
	volume LEGAL again once the operation is finished.  As long as this is
	all done with the volume lease held the engine can poll the volume from
	any host to determine if the operation is running (lease held) and can
	detect an interrupted/failed operation (lease free and volume ILLEGAL).

	Later this contextmanager will be expanded to support volume generation
	incrementation when exiting successfully which will also allow engine to
	determine if an operation was completed successfully.

	All metadata updates must be performed to a single block with one write
	in order to ensure atomicity.

	Continuous-Integration: Jenkins CI

	tests: Use make_uuid in storage tests
	Continuous-Integration: Jenkins CI

	tests: Add make_uuid test helper
	The test code is sprinkled with lots of boilerplate code to generate
	UUIDs in the proper format.  Add a helper to testlib so we can reduce
	this duplicated logic in tests.

	Continuous-Integration: Jenkins CI

2016-09-28  Maor Lipchuk  <mlipchuk@redhat.com>

	blockVolume: Add qcow2_compat on create
	Pass qcow2 compat on create.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	image: Pass compat version.
	Pass sd compat version on convert and create image.

	Continuous-Integration: Jenkins CI

2016-09-27  Maor Lipchuk  <mlipchuk@redhat.com>

	qemuimg: Add qcow_compat optional parameter.
	Add qcow2_compat parameter that indicates the apropriate qemu
	compatibility level to be used for create and convert operations.

	Continuous-Integration: Jenkins CI

	sd: Select qcow2_compat by storage domain version
	Add a method that will return the qcow compatibility version
	based on the storage domain's version.

	The method should return the value "1.1" if the storage domain
	version is 4 and later, and the default format for older domains,
	which is "0.10" with default configuration.

	Continuous-Integration: Jenkins CI

	qemuimg: Fix calling convention.
	Use kwarg calling stype for qemuimg API calls.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-09-27  Milan Zamazal  <mzamazal@redhat.com>

	virt: Typo fix in Vm._acquireCpuLockWithTimeout error message
	Continuous-Integration: Jenkins CI

2016-09-27  Francesco Romani  <fromani@redhat.com>

	lib: api: allow to return prebuilt responses
	We want to switch to a saner approach on which responses are built
	on the API layer - no longer on the application layer.
	So, application layer can just raise a proper Exception, and the
	API layer will catch and create the appropriate error response.

	But we have a huge pile of code to translate, so we need a gradual
	approach.
	This patch extends common.api to passthrough a prebuilt response,
	so we can migrate our application code incrementally.

	Continuous-Integration: Jenkins CI

	vdsm: drop the warnings module configuration
	We used to configure the warnings module, because we used
	this module to report the inconsistencies between the actual
	request/responses and the schema.
	We don't do this anymore, so we don't need anymore to configure
	the warnings module in our application code.

	We will still use the warnings module to warn the clients
	of deprecated APIs.
	Application using the Vdsm libraries may will be in charge
	of configuring the warnings filter if they want to show warnings.

	Related-To: https://bugzilla.redhat.com/1364149
	Bug-Url: https://bugzilla.redhat.com/1369822
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-09-27  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't crash in migration progress on compression bytes
	If compression is not enabled for a migration then compression stats are
	not provided by libvirt.  So when we try to retrieve them in migration
	Progress, we must not expect their presence, otherwise we crash there.

	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-09-27  Dan Kenigsberg  <danken@redhat.com>

	py3: remove capsTests from blacklist
	This patch makes the test module not depend on specific iteration order
	of a set, and set the mock output to bytes.

	Continuous-Integration: Jenkins CI

2016-09-26  Edward Haas  <edwardh@redhat.com>

	net: Fix reference to CONFFILE_HEADER_BASE which was moved
	CONFFILE_HEADER_BASE has been renamed and moved to module scope
	in commit 8e72106a39f435471e591c465b5f49bd934868e7

	Continuous-Integration: Jenkins CI

2016-09-25  Edward Haas  <edwardh@redhat.com>

	build: Allow tox to run all checkers in one shot.
	tox has been called for each checker (pep8, pyflakes), with this patch
	it is called once and runs all checkers.

	Continuous-Integration: Jenkins CI

	net: Log a setup networks transaction failure when using ovs switch
	When a failure occurs during the ovs setup process, an exception is
	raised.
	Log this failure in order to ease debugging.

	Continuous-Integration: Jenkins CI

	net: Setup validation for OVS - Check nics usage
	OVS is not properly failing when adding a port that is already slaved
	to a different device (bond as an example).
	Therefore, there is a need to extend the validation checks to
	include a check that looks for nics that may have multiple usages.

	Continuous-Integration: Jenkins CI

	net: Delete an OVS bridge when the last SB is detached.
	Moving the action of deleting unused OVS bridges from
	ovs_switch.cleanup() to the same location that the SB iface is detached.
	As the topology defines a single SB per bridge, this approach is clean
	and straightforward.

	Continuous-Integration: Jenkins CI

	net: Split OVS setup transaction to adjust for bond setup
	When using Linux bonds (instead of OVS bonds), the OVS setup transaction
	needs to be split into two.
	First one for removing networks and a second for adding networks.
	In between, the bonds setup is placed.

	These three steps contain, in addition to the actual devices setup, the
	acquire and running-config update, allowing proper rollback in case of
	setup failure.

	This patch, fixes a scenario that fails with the previous patch, where
	the Linux bonds have been introduced in the setup flow.
	The scenario: Move a network nic from a network to a bond slave.

	Continuous-Integration: Jenkins CI

	net: Use Linux bonds with OVS networks
	OVS bonds have several major limitations which brings us to use Linux
	bonds instead.
	Limitations with OVS bonds: Unable to apply QoS rules and does not
	support all bond mode options (compared to the Linux bond).

	Continuous-Integration: Jenkins CI

	net: Relocate sysfs_bond_permission to nettestlib
	CI does not always allow access to sysfs and will fail the tests when
	such access is attempted.

	Linux bonds driver is using sysfs to configure bonds.
	This patch locates the sysfs bond access permission check under
	nettestlib in order to allow several test modules to use it when bonds
	are involved.

	Continuous-Integration: Jenkins CI

	net: Remove OVS bond implementation.
	The OVS bond is to be replaced by Linux bond.
	This patch removes all related OVS bond code.

	Note: Functional tests will fail with this patch and restored
	with the next patch.

	Continuous-Integration: Jenkins CI

2016-09-24  Petr Horáček  <phoracek@redhat.com>

	net test: shared nic between bond and network
	Continuous-Integration: Jenkins CI

	net: edit bond detached from bridge but still attached to a vlan
	Bug-Url: https://bugzilla.redhat.com/1372798
	Continuous-Integration: Jenkins CI

2016-09-23  Adam Litke  <alitke@redhat.com>

	storage: Use detect_format workaround in copy_data
	SDM.copy_data needs to apply the same workaround when interpreting
	volume format information for VM configuration disks.  Resolve this TODO
	and add a test for it.

	Continuous-Integration: Jenkins CI

	storage: Refactor workarounds.detect_format
	The function workarounds.detect_format accepts two volumes, checks for a
	special case, then returns the qemuimg formats that should be used for
	each volume.  To make this logic more sharable, change detect_format to
	just detect if the problem exists and let the calling code decide which
	format to use.  This will allow the sdm.copy_data code to use this
	function cleanly.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-09-23  Irit Goihman  <igoihman@redhat.com>

	sos: collect 'nodectl info' output
	CEE needs a quick and reliable way to determine release information
	from a customer's sosreport. nodectl is installed RHV-H by default
	and the output of 'nodectl info' provides a nice summary of the
	available images and their boot options as well as the current image/layer
	in use. If the command doesn't exist it will be ignored by sos report.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1372093
	Continuous-Integration: Jenkins CI

2016-09-23  Francesco Romani  <fromani@redhat.com>

	virt: utils: add is_kvm helper
	Proper container support needs some changes into oVirt Engine.
	First of all, Engine should send a different vmType from the
	default (hardcoded) 'kvm' to select the container runtime to be used.

	Until the Engine patch is ready, we use this hack to get
	the container runtime from a custom property.

	Continuous-Integration: Jenkins CI

2016-09-23  Simone Tiraboschi  <stirabos@redhat.com>

	jsonrpcvdscli: add migrate and migrateStatus
	Continuous-Integration: Jenkins CI

2016-09-23  Ala Hino  <ahino@redhat.com>

	cleanup: Remove log messages when raising exceptions
	Continuous-Integration: Jenkins CI

2016-09-23  Edward Haas  <edwardh@redhat.com>

	net: Consume ifcfg files that have a non vdsm standard name
	VDSM assumes that the ifcfg files which represent network devices are
	named in the following format: ifcfg-<dev name>

	If the host is set initially by Network Manager, the names of the files
	do no correspond to the expected format.

	This patch adjusts the ifcfg file name to the mentioned format and
	erases any other ifcfg files that correspond to the same device.

	This is not a NM friendly patch, it assumes that NM is not active while
	setupNetworks is issued.

	Bug-Url: https://bugzilla.redhat.com/1367378
	Continuous-Integration: Jenkins CI

2016-09-22  Adam Litke  <alitke@redhat.com>

	storage: Move detect_format to new workarounds module
	The function Image._detect_format is a workaround for a bug where the
	vdsm metadata disagrees with qemuimg about the format of a volume.
	While the underlying bug has been fixed, we still need to maintain this
	code in order to prevent problems with preexisting affected volumes.

	For reusability and maintainability, move this function to a new module
	called workarounds.py and add some basic unit tests.  This code will be
	reused by sdm.copy_data in a followup patch.

	Continuous-Integration: Jenkins CI

	tests: Share FakeScheduler and use in TestCopyDataDIV
	The FakeScheduler class in jobsTests.py is also needed by
	TestCopyDataDIV.  Introduce a new fakelib.py module for sharing fakes of
	top-level vdsm lib objects.

	The copy_data job now relies on the jobs module being properly
	initialized with a Scheduler (for autodelete).  Add setUp and tearDown
	methods to the tests to properly manage this using the newly available
	FakeScheduler.

	Continuous-Integration: Jenkins CI

2016-09-22  Irit Goihman  <igoihman@redhat.com>

	sos: remove jsonrpcvdscli.connect parameters
	patch https://gerrit.ovirt.org/#/c/62730/ added default value to
	requestQueue parameter in jsonrpcvdscli.connect() function.
	This patch removes the creation of requestQueue parameter when
	connecting to jsonrpcvdscli

	Continuous-Integration: Jenkins CI

2016-09-22  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: set selinux labels while creating bricks
	brick should have correct selinux labels on the brick mount
	points. But it missing in the createBrick vdsm verb.

	This patch sets the correct selinux lables on brick mount
	point using 'restorecon' and 'semanage' commands

	Bug-Url: https://bugzilla.redhat.com/1368474
	Continuous-Integration: Jenkins CI

2016-09-22  Petr Horáček  <phoracek@redhat.com>

	net: test ovs info with southbound nic
	We will remove OVS bonding support in a following patch. This patch
	changes ovs_info_test.py to test OVS network with attached
	southbound nic.

	Continuous-Integration: Jenkins CI

2016-09-22  Edward Haas  <edwardh@redhat.com>

	net: Disable IPv6 on OVS southbound iface (nic or bonding)
	Only northbound iface may have an IP defined.

	Continuous-Integration: Jenkins CI

2016-09-22  Petr Horáček  <phoracek@redhat.com>

	net: remove default route before adding a new one
	Continuous-Integration: Jenkins CI

2016-09-22  Edward Haas  <edwardh@redhat.com>

	net test: test_ip_info - wait for IP settings with address
	This is a second attempt to handle the random failing test on CI run.
	This time, we are more specific in the 'waiting' statement, and include
	the expected address part.

	It is suspected that multiple duplicate netlink events are arriving,
	causing a false waiting.

	Continuous-Integration: Jenkins CI

2016-09-22  Francesco Romani  <fromani@redhat.com>

	lib: response: helper to detect valid responses
	We should build responses in the API layer, and the responses
	should be built from what the application layer gives back,
	be that return values, or exceptions

	We need a gradual upgrade path due to huge amount of legacy code,
	so we need to handle the response objects built in the
	application layer. For the short/mid-term, the API layer
	needs to cope with both flows, modern and old.

	So we need an utility to detect which kind the response
	the application layer returns to the API layer.

	This patch adds this utility, which will be erased once
	the transition is complete, with the other scaffolding.

	Continuous-Integration: Jenkins CI

2016-09-21  Nir Soffer  <nsoffer@redhat.com>

	vm: Remove unneeded fallback to blockRebase
	If blockCopy was not supported, we fallback to blockRebase. This was
	required when we supported libvirt < 1.2.9, but now we require 1.2.17
	and we can remove this legacy code.

	See https://libvirt.org/hvsupport.html for more info.

	Continuous-Integration: Jenkins CI

	logging: Document the secret TRACE log level
	This may be useful to for developers to understand complicated flows.

	Continuous-Integration: Jenkins CI

2016-09-21  Ala Hino  <ahino@redhat.com>

	tests: Rename qemuimgTests.py to new Vdsm convention
	Continuous-Integration: Jenkins CI

2016-09-21  Nir Soffer  <nsoffer@redhat.com>

	vdsm: Do not modify warnings filter in a library
	vdsm.vdscli was modifying warnings filter, taking control from the
	application importing it. With the old code, there is no way to disable
	the warnings - if the application sets a warnings filter, importing
	vdscli will override the application filter.

	This warnings is highly unwanted, causing user facing warnings each time
	you run a vdsClient or hosted-engine command.

	This patch removes the wrong filter, returning control to the application
	using vdscli. Since warnings are hidden by default, this removes the
	unwanted warnings from vdsClient and hosted-engine command line tools.

	Bug-Url: https://bugzilla.redhat.com/1377069
	Continuous-Integration: Jenkins CI

	alignmentScan: Add Red Hat copyright
	This module was started by Saša Tomić in 2012. According to git log Red
	Hat is maintaining this file since then, so I think it should have a
	copyright on this file.

	$ git log --format="%ci [%h] %an %ae" vdsm/alignmentScan.py
	2016-09-20 20:39:34 +0300 [6c756b9] Nir Soffer nsoffer@redhat.com
	2016-09-19 14:58:02 +0300 [d7bd81e] Nir Soffer nsoffer@redhat.com
	2016-05-15 14:43:52 -0400 [b9442cc] Idan Shaby ishaby@redhat.com
	2016-01-11 04:54:39 -0500 [1c4ef07] Tal Nisan tnisan@redhat.com
	2013-06-27 02:57:12 -0400 [921666f] Yeela Kaplan ykaplan@redhat.com
	2012-12-15 07:14:44 -0500 [1093fe6] Antoni S. Puimedon asegurap@redhat.com
	2012-10-25 05:18:26 -0400 [1ab4608] Dan Kenigsberg danken@redhat.com
	2012-04-29 11:47:39 -0400 [9a93792] Saggi Mizrahi smizrahi@redhat.com
	2012-04-21 12:42:24 -0400 [a36bcc1] Saša Tomić tomic80@gmail.com

	Continuous-Integration: Jenkins CI

2016-09-20  Nir Soffer  <nsoffer@redhat.com>

	config: Rename irs:scsi_settle_timeout option
	This option is not about SCSI but about udev events. We use the same
	option also after mounting and unmounting filesystems.

	Continuous-Integration: Jenkins CI

2016-09-20  Edward Haas  <edwardh@redhat.com>

	net: Link setup module - includes bond setup logic.
	Introducing the bond setup module.
	It includes the setup logic for Bond devices, translating the setup
	request to the actions needed to apply them.

	It uses the bond interface for applying the setup.

	The bond setup is using the bond transaction context, allowing
	cleanup to occur in case of a failure.
	Leaving the bond in a controlled state
	(mainly, trying to avoid defining only a partial bond).

	Continuous-Integration: Jenkins CI

2016-09-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove python-argparse requirement
	This package has been obsoleted in Fedora because it got in to stdlib.

	Continuous-Integration: Jenkins CI

2016-09-20  Francesco Romani  <fromani@redhat.com>

	logging: add and use new devel logger
	After rhbz#1264149 we learned that way that the warnings
	module doesn't really fit the needs of Vdsm.

	This patch adds and make the code use a new logger, 'devel',
	set by default to ERROR level, to be used for the messages
	that only the developers should see.

	To see more 'devel' messages, which can be useful for troubleshooting,
	edit /etc/vdsm/logger.conf to read like:

	    [logger_devel]
	    level=WARNING

	This change will be persistent across Vdsm restarts.
	You can also enable the warnings at runtime, like any other logger,
	using

	    vdsClient -s 0 setLogLevel devel WARNING

	The change made using vdsClient will be lost when Vdsm is stopped.

	Related-To: https://bugzilla.redhat.com/1364149
	Bug-Url: https://bugzilla.redhat.com/1369822
	Bug-Url: https://bugzilla.redhat.com/1377069
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-09-20  Shahar Havivi  <shaharh@redhat.com>

	v2v: add test for Xen block device
	Continuous-Integration: Jenkins CI

2016-09-20  Dan Kenigsberg  <danken@redhat.com>

	tests: shorten py3 blacklist
	A few more test modules are passing under Python 3. Let's keeep testing
	them.

	Continuous-Integration: Jenkins CI

2016-09-20  Francesco Romani  <fromani@redhat.com>

	lib: api.py: preserve signature in decorator
	The api.method decorator needs to preserve the function
	or method signature, to let the schema validation keep working.
	Moreover, preserving the signature of decorated callables
	is a good idea anyway.

	In python 3.4+ this is done by default, but on python 2.7
	we need to take steps to implement this.
	We leverage the existing 'decorator' module which solves
	this problem. This module is available in EL/Centos7.

	For further reference:
	http://pythonhosted.org/decorator/documentation.html

	Continuous-Integration: Jenkins CI

	lib: move the response.py under common
	The commit fc732ae broke the rule that code under lib/vdsm/common
	should depend only on code under the same subtree.

	The last module we need to move to fix the breakage is 'response'.
	Once again, this makes sense to be moved in the common layer anyway.

	Continuous-Integration: Jenkins CI

	lib: move define.py under common
	The commit fc732ae broke the rule that code under lib/vdsm/common
	should depend only on code under the same subtree.

	Another module which should be moved to fix the breakage is
	define.py. Again this makes sense to move anyway.
	It should go away soon, but for the meantime let's have this here.

	Continuous-Integration: Jenkins CI

	lib: move exception.py under common
	The commit fc732ae broke the rule that code under lib/vdsm/common
	should depend only on code under the same subtree.

	The good news is that the code moved in fc732ae depends only on
	a few modules; one of them is exception.py, which makes sense
	to move under common/ anyway.

	This patch does that.

	Continuous-Integration: Jenkins CI

	cmdutils: enhance systemd_run
	TODO: explain
	Continuous-Integration: Jenkins CI

2016-09-19  Nir Soffer  <nsoffer@redhat.com>

	mount: Wait for systemd temporary mount unit
	Systemd is monitoring mountpoints created during runtime by creating a
	temporary mount units. For example:

	    # systemctl status /tmp/mount-1.DUNxySxI2R/wrk
	    ● tmp-mount\x2d1.DUNxySxI2R-wrk.mount - /tmp/mount-1.DUNxySxI2R/wrk
	       Loaded: loaded (/proc/self/mountinfo)
	       Active: active (mounted) since Sun 2016-04-24 22:37:55 IDT; 14ms ago
	        Where: /tmp/mount-1.DUNxySxI2R/wrk
	         What: /dev/loop2

	Mounting and unmounting quickly as we do in the tests, or when creating
	a floppy image may confuse systemd, and lead to various errors:

	- mountpoint is not mounted when trying to access files or unmount
	- mountpoint is busy when trying to unmount

	These are probably systemd or mount bugs. Until these issues are
	resolve, we need to find a workaround to avoid failures in the tests or
	when creating a floppy images.

	This patch add udevadm.settle() call after successful mount and umount
	operations.

	Continuous-Integration: Jenkins CI

2016-09-18  Maor Lipchuk  <mlipchuk@redhat.com>

	upgrade: Support upgrade from v3 to v4.
	Adding support for v4 upgrade.

	Continuous-Integration: Jenkins CI

2016-09-18  Adam Litke  <alitke@redhat.com>

	ResourceManagerLock: Disable autoRelease
	When acquiring ResourceManagerLocks we do not store a reference to the
	resource (prefering instead to use the ResourceManager instance
	methods).  Unfortunately the underlying resource has autoRelease
	behavior on by default when the object is destroyed.  This is causing
	the lock to be released immediately after it is acquired!  Disable
	autoRelease to get the correct behavior.

	Continuous-Integration: Jenkins CI

2016-09-17  Nir Soffer  <nsoffer@redhat.com>

	tests: Unbreak make rpm
	commit a54045aff9af introduced vmfakecon helper module but it was missing from
	the makefile, breaking make rpm.

	Continuous-Integration: Jenkins CI

2016-09-16  Adam Litke  <alitke@redhat.com>

	jobs: Guard against racy state changes
	When performing test and set operations with the job status we must use
	a lock to prevent multiple threads from conflicting with each other.
	This is most important when aborting or running a job.

	Continuous-Integration: Jenkins CI

2016-09-16  Dan Kenigsberg  <danken@redhat.com>

	tests: split vmfakecon out of vmfakelib
	vmfakelib contains both a fake ClientIF and a fake libvirtconnection.
	Unlike ClientIF, libvirtconnection is a smaller entity that is easier to
	move and possible to import from lib/vdsm as well as from py3.

	This patch moves libvirtconnection into another module so it is
	usable by py3 tests.

	Continuous-Integration: Jenkins CI

2016-09-16  Francesco Romani  <fromani@redhat.com>

	storage: outOfProcess: remove useless warning
	This usage of warnings module add no value, so we drop it

	Continuous-Integration: Jenkins CI

	storage: fileUtils: drop redundant warning
	The usage of warnings.warn in the fileUtils
	looks redundant, since we log the same information
	in the line before.
	So this patch just drops it.

	Related-To: https://bugzilla.redhat.com/1364149
	Bug-Url: https://bugzilla.redhat.com/1369822
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-09-16  irit.go  <igoihman@redhat.com>

	functional tests: fix supervdsmServer test
	supervdsmServer dropPrivileges function is switching root user to
	a non privileged user but not switching the user back to root. It causes
	other tests which require root user to fail.
	this patch runs the tests in a child process so there's no affect on the
	parent process.

	Continuous-Integration: Jenkins CI

2016-09-16  Shahar Havivi  <shaharh@redhat.com>

	v2v: Support for ova exported from AWS
	When exporting VM from AWS as VMWare OVA file it doesn't export <Name>
	tag for the VM.
	The Name is not Mandatory for the ovf format - using ova filename
	instead.

	Bug-Url: https://bugzilla.redhat.com/1371843
	Continuous-Integration: Jenkins CI

2016-09-16  Francesco Romani  <fromani@redhat.com>

	network: ifup: shorten name of the thread
	We shorten the name of the thread optionally used by
	the _ifup() function, to make it fit in 15 ASCII chars,
	a limit given by pthreads.

	Continuous-Integration: Jenkins CI

	network: dhclient: shorten name of the thread
	We shorten the name of the DhcpClient worker thread to
	make it fit in 15 ASCII chars, a limit given by pthreads.

	Continuous-Integration: Jenkins CI

	network: switch to concurrent.thread()
	This patch replaces good usages of threading.Thread() with
	more modern concurrent.thread()

	there are no intended changes in behaviour.

	Continuous-Integration: Jenkins CI

2016-09-16  Irit Goihman  <igoihman@redhat.com>

	net libvirt hook: revert vmList change
	Patch 78ea853e131da3b91b812315a0656b8f99d7fef4 is reverted so the
	vmList key change is also reverted.

	Continuous-Integration: Jenkins CI

	jsonrpc: revert Host.getVMList command result change
	patch https://gerrit.ovirt.org/#/c/63408/ changes the result
	representation of Host.getVMList and Host.getFullVMList but it
	can cause inconsistency of these commands, therefore the change
	is removed

	Continuous-Integration: Jenkins CI

2016-09-16  Dan Kenigsberg  <danken@redhat.com>

	automation: add a repo with a fresh nose
	We need nose >= 1.3.7 to test vdsm, but don't have it on el7. One option
	discussed is not to run test when building for el7. As a quick-and dirty
	fix for upstream, this patch pulls nose from CentOS virt SIG. It does
	NOT solve the problem when building in brew or koji.

	Continuous-Integration: Jenkins CI

2016-09-15  Nir Soffer  <nsoffer@redhat.com>

	mounts: Use more meaningful names
	Rename the constants and functions for un-escaping spaces to make the
	intent of the code more clear.

	Continuous-Integration: Jenkins CI

	mount: Fix un-escaping of spaces
	The regular expression match '\040' (" ") but failed to match '\134'
	('\'). The pattern would also match invalid such as '\088', raising a
	ValueError when trying to un-escape.  Fix the pattern to accept any
	octal value.

	Continuous-Integration: Jenkins CI

	tests: Add tests for un-escaping spaces
	Both remote and local path may contain spaces; in this case the spaces
	are escaped as '\040'. Actual '\' in the path is escaped as '\134'.

	We have code for un-escaping spaces, but no tests; Add the missing tests
	based on output from /proc/mounts. Mark one of the tests are broken
	since the current code can un-escape '\040' but fails for '\134'.

	Continuous-Integration: Jenkins CI

	mount: Simplify deleted suffix stripping
	Replace pointless loop with single if statement.

	Continuous-Integration: Jenkins CI

	tests: Add missing test for deleted mounts
	Mount path may have a " (deleted)" suffix - we strip this suffix when
	parsing /proc/mounts output so the path is still considered as mounted.

	This patch adds the missing test before refactoring the relevant code.

	Continuous-Integration: Jenkins CI

	mount: Don't un-escape mount options
	We used to un-escape mount options, which may be useful when mount
	options could contain loop=/dev/loopN, if the path to the device
	contains spaces. Since we don't use /etc/mtab now, this issue is not
	relevant and un-escaping is not useful for anything.

	Continuous-Integration: Jenkins CI

	mount: Remove EL 6 /etc/mtab support
	On EL6 we used /etc/mtab to resolve loop devices backing image. On EL7
	(and Fedora) /etc/mtab is a symlink to /proc/self/mounts - just like
	/proc/mounts, and we resolve loop mount backing files using
	/sys/block/major:minor/loop/backing_file.

	This patch removes the now useless support for /etc/mtab, the caching
	mechanism hiding the O(N^2) loop device resolving code, and the complex
	performance tests simulating a EL6 system with 10000 loop devices.

	Continuous-Integration: Jenkins CI

2016-09-15  Adam Litke  <alitke@redhat.com>

	jobs: Allow run and abort only from valid states
	Before this patch we allow abort and run from any state even when it
	does not make sense.  Abort is valid only for pending or running jobs
	and run is valid only for pending jobs.  When an invalid call is
	attempted raise a new error.

	Continuous-Integration: Jenkins CI

	jobs: Autodelete
	For storage jobs we like to delete finished jobs automatically after
	some delay, giving engine enough time to discover the job completion
	state in most cases, and allowing easy inspection of job state.  The Job
	class implements now both run() and abort(), managing the state changes
	and auto-deleting the job when done. Subclasses should implement _run()
	and _abort().

	To intergate with v2v code using old jobs framework, v2v code will have
	to use _run() instead of run(). Subclass that want to enable autodelete
	must override the autodelete class attribute and set it to True.

	class AutodeletingJob(jobs.Job):
	    autodelete = True

	This feature is not relevant now for v2v jobs since engine is deleting
	these jobs.

	Continuous-Integration: Jenkins CI

2016-09-14  Nir Soffer  <nsoffer@redhat.com>

	sp: Rename storage domain upgrade threads
	Previously the threads used the default name (Thread-N). Using now
	"upgrade/short-uuid". Short-uuid is the first 7 characters of the
	storage domain uuid.

	Continuous-Integration: Jenkins CI

	mailbox: Rename storage mailbox threads
	Previously mailbox threads were named "mailbox.SPMMonitor" and
	"mailbox.HSMMonitor" which get truncated in system commands such as ps
	and htop (e.g. "mailbox.HSMMoni"), and do not match other thread names.
	Renamed to "mailbox/spm" and "mailbox/hsm".

	Continuous-Integration: Jenkins CI

	resourceManager: Rename cleanup threads
	Resources cleanup threads used the standard names (Thread-N), now they
	use "rm/short-name". Short-name is the first 8 characters of the
	resource name, typically, storage domain, image or volume uuid.

	Continuous-Integration: Jenkins CI

	task: Rename cleanup threads
	Task cleanup threads used the default names (Thread-N), now they are
	named "task/short-uuid". Short-uuid is the first 8 characters of the
	task uuid.

	Continuous-Integration: Jenkins CI

	hsm: Rename init thread
	HSM init thread was named "storageRefresh", now it is named "hsm/init"
	to match other thread names.

	Continuous-Integration: Jenkins CI

	monitor: Rename storage domain monitor threads
	These threads used the default names (Thread-N), making it hard to
	locate a domain monitor thread for certain domain. Now the threads are
	named "monitor/short-uuid". short-uuuid is the first 8 characters of the
	storage domain uuid since system thread names are limited to 15
	characters.

	Continuous-Integration: Jenkins CI

	fc-scan: Rename host scanning threads
	Use the scsi host name (e.g. host6) instead of default Thread-N for the
	scanning threads. This will make it easier to debug stuck threads during
	scans.

	Continuous-Integration: Jenkins CI

	check: Rename check event loop thread
	Until now, the check event loop thread was named "Thread-12", now it is
	named "check/loop".

	Continuous-Integration: Jenkins CI

	misc: Rename event threads to event/N
	Each time we submit an event using storage.misc.Event, we start one or
	two threads. Until now, the threads were using the default Thread-N
	names.

	This patch renames these threads to event/N, matching other thread
	names, and making it easier to detect these threads in system commands
	like ps or htop.

	Continuous-Integration: Jenkins CI

2016-09-14  Adam Litke  <alitke@redhat.com>

	jobs: Make jobs.stop no-op
	When vdsm stops we were calling jobs.stop which cleared the list of
	jobs.  Clearing the list is not required for vdsmd because the jobs list
	is not persisted across vdsm runs.  We can use the old _clear method for
	test cases which do require a way to clear the list.  We'll make stop()
	a no-op which has an added benefit of avoiding race conditions between
	stop() and job autodeletion.

	Continuous-Integration: Jenkins CI

	jobs: Change state to aborted only when successful
	We were changing the job state to aborted even if the _abort function
	failed.  This meant that a job could show up as aborted even though it
	is still accessing storage.  The solution is to only change state after
	_abort finishes.  Also add comments to require _abort implementations to
	raise on error.

	Continuous-Integration: Jenkins CI

2016-09-14  Francesco Romani  <fromani@redhat.com>

	virt: move the api.py module in the common subtree
	We want to use this outside the virt/ vertical.
	No code changes.

	Continuous-Integration: Jenkins CI

2016-09-14  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: fix help test for glusterVolumehealInfo in  vdsClient
	There is a format issue with the help text for glusterVolumehealInfo
	in vdsClient. Fixing it by correcting the object structure returned.

	Bug-Url: https://bugzilla.redhat.com/1367817
	Continuous-Integration: Jenkins CI

2016-09-14  Edward Haas  <edwardh@redhat.com>

	build tests: Require NOSE 1.3.7 and up for running tests
	On RHEL7/Centos7 the provided NOSE version is 1.3.0.
	CI runs the tests with 1.3.7.

	To be consistent and avoid different behaviours, assure that the tests
	are running with a minimum nose version of 1.3.7.

	Specifically, between 1.3.0 and 1.3.7 a bug has been resolved regarding
	test labeling and its support with test class inheritance.

	Continuous-Integration: Jenkins CI

2016-09-14  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Remove dead code
	The connection monitor and friends were never used, remove them.

	Continuous-Integration: Jenkins CI

	mount: Remove unneeded freeloop=True usage
	On modern systems loop devices are mounted with the autoclear option, so
	the loop device is automatically removed when unmounting it.

	For example:

	    $ cat /sys/block/loop2/loop/autoclear
	    1

	Checking umount(8) code show that it ignores the -d/--detach-loop option
	in this case.

	This patch removes this option when unmounting loop device.

	Continuous-Integration: Jenkins CI

	mount: Remove pointless force=True usage
	Using force=True when unmounting loop device is pointless - this option
	will cause umount(8) to call the umount(2) syscall with the MNT_FORCE
	flag, which is useful only for NFS mounts.

	Continuous-Integration: Jenkins CI

2016-09-13  Nir Soffer  <nsoffer@redhat.com>

	tests: Add mount.isMounted() timing tests
	Add timing tests to understand how much time it takes to check if a
	mountpoint is mounted when having lot of mounts. This used to be a
	bottleneck on EL6 when having lot of file storage domains.

	Here are the results on i7-4770 CPU @ 3.40GHz:

	mountTests.TestIsMountedTiming
	    test_is_mounted(1)             1 mounts: 0.000068 seconds
	    test_is_mounted(50)           50 mounts: 0.000480 seconds
	    test_is_mounted(100)         100 mounts: 0.000927 seconds
	    test_is_mounted(1000)       1000 mounts: 0.008862 seconds

	Running the tests:

	    ./run_tests_local.sh mountTests.py --enable-stress-tests -s

	Continuous-Integration: Jenkins CI

2016-09-13  Maor Lipchuk  <mlipchuk@redhat.com>

	formatConverter: Use module logger
	Make formatConverter to use module logger.

	Continuous-Integration: Jenkins CI

2016-09-13  Edward Haas  <edwardh@redhat.com>

	build net tests: Create a test target for networking tests.
	It is usefull to run only the networking test during development,
	speeding the test run and allowing the developer to run them frequently
	in a few seconds.

	Before pushing changes, all tests should be run, including functional
	ones.

	Run example:
	./autogen.sh --system && make pep8 pyflakes && make -C tests/ check-net

	Continuous-Integration: Jenkins CI

	build tests: Disable the builtin check target.
	There is no need to recursively check the tests/ folder for check-local
	targets as there are none.

	Continuous-Integration: Jenkins CI

2016-09-13  Nir Soffer  <nsoffer@redhat.com>

	storage: Unify stoage logger name
	We had both "Storage" and "storage" loggers, but configuration was only
	for "Storage". Unify all logger names and the configuration to
	"storage", matching other loggers names.

	We need more work to unify the sub loggers - I'm not touching them now
	since I want to move to module level loggers or even subsystem level
	loggers instead of class based loggers we have now.

	Continuous-Integration: Jenkins CI

2016-09-12  Tomáš Golembiovský  <tgolembi@redhat.com>

	build: Don't use fixed path to systemd directory
	Since commit 9d6f46d9 the project can no longer be built and installed
	by non-root user. There is probably nothing wrong with the patch itself.
	It's rather the fact that we use fixed path to the systemd directory
	which prevents us from installing into some other prefix.

	This patch changes the value of SYSTEMD_UNIT_DIR to use ${prefix}
	which is normaly set to "/usr" during packaging.

	Continuous-Integration: Jenkins CI

2016-09-12  Adam Litke  <alitke@redhat.com>

	jobs: Move run from sdm.base.Job to jobs.Job
	The run implementation in sdm.base.Job is generally useful.  It performs
	state checking and error handling that can be applicable to all job
	types.  Move it to job.Job.  The tests associated with this
	functionality need to move to jobsTests.py which means we no longer need
	storage_sdm_api_test.py or sdmtestlib.py

	Continuous-Integration: Jenkins CI

	sdm: Drop support for thread-local job_id
	sdm.api.base.Job currently has support for setting the job_id in the
	thread-local variables.  We are not using this feature so let's remove
	it and simplify our _run code and tests.  This will also _run (and
	associated tests) to move to the general vdsm.jobs.Job class without
	dragging in storage-specific interfaces.

	Continuous-Integration: Jenkins CI

	vdsm: Pass scheduler to jobs.start
	In a subsequent patch the jobs module will want to defer calls to delete
	by using the program's scheduler instance.  Pass this scheduler into the
	jobs module when calling start().

	Continuous-Integration: Jenkins CI

2016-09-12  Nir Soffer  <nsoffer@redhat.com>

	vdsm: Fix stopping order
	The jobs module uses the scheduler so it should be stopped before the
	scheduler.

	Continuous-Integration: Jenkins CI

2016-09-12  Edward Haas  <edwardh@redhat.com>

	util: NoIntrPoll - replace time() with monotonic_time()
	Continuous-Integration: Jenkins CI

2016-09-12  Martin Polednik  <mpolednik@redhat.com>

	rng: allow urandom as virtio rng entropy source
	Libvirt previously used a whitelist to only allow random and hwrng
	virtio-rng sources. As per libvirt commit
	67f2b72723c242969c5282fcb9acf00cc01f2a54, this restriction is lifted
	and any character device may be used. We don't exactly want to use
	*any* character device, but we may allow usage of urandom. Additional
	discussion in RHBZ#1074464.

	The implementation hides the fact that urandom can be used.  This is
	due to the fact that 4.0 (and lower) engine can't handle additional
	RNG sources.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1347669
	Continuous-Integration: Jenkins CI

2016-09-12  Nir Soffer  <nsoffer@redhat.com>

	readme.logging: Remove unneded storage hack
	All storage loggers were unified, there no need to call setLogLevel
	twice now.

	Continuous-Integration: Jenkins CI

2016-09-12  Adam Litke  <alitke@redhat.com>

	Add start/stop interface to jobs module
	Add interfaces similar to virt.periodic and other subsystems for
	initializing a module with parameters.  In a future patch we want to set
	the scheduler that the jobs module will use.  The stop() interface will
	clear all jobs.

	Continuous-Integration: Jenkins CI

2016-09-11  Nir Soffer  <nsoffer@redhat.com>

	logging: Improve logging when receiving signals
	Log INFO message when receiving signals, explaining the action taken.

	Continuous-Integration: Jenkins CI

	sd: Remove unused variable and evil thread
	If storage domain had a non-null start instance variable, we used to
	start a thread stopping this stat object in __del__(!). Fortunately,
	stat is always None, so we don't need to stop it.

	Continuous-Integration: Jenkins CI

2016-09-11  Petr Horáček  <phoracek@redhat.com>

	net: early IP+link setup
	Host networking must be available before libvirtd.service starts.
	This cannot be handled by current vdsm-network.service which requires
	libvirtd.service to be running.

	This patch adds a new vdsm-network-init.service which starts after
	openvswitch.service and before libvirtd.service. openvswitch.service
	restore OVS devices, vdsm-network-init.service then collects persisted
	networks configuration and setup IP+link settings on OVS devices
	accordingly.

	This is not needed for legacy ifcfg networks as they are fully restored
	by network.service.

	Bug-Url: https://bugzilla.redhat.com/1364087
	Continuous-Integration: Jenkins CI

2016-09-11  Edward Haas  <edwardh@redhat.com>

	net: Bond - preserve original slaves link state.
	Before attaching or removing a slave from a bond, its state is set to
	DOWN.
	This patch makes sure to preserve its original state, even when failure
	occurs.
	(Without it, the link may be set to DOWN, even if the slave has not been
	added to the bond)

	Continuous-Integration: Jenkins CI

	net: Bond - add refresh method to update bond config
	Continuous-Integration: Jenkins CI

	net: Bond - Add logging to the bond driver.
	Continuous-Integration: Jenkins CI

	net: Bond - adding a transaction context.
	The bond transaction context is aimed to keep bonds in a controlled
	state when adding, editing and removing bonds.

	Specifically, it is targeted to handle the following scenario:
	- Create bond99 - Success
	- Add slave88   - Success
	- Add slave-bad - Failure
	In the creation of bond99, adding a slave failed, leaving a partial bond
	configured.
	When setting the bond in a transaction, bond99 will be removed before
	re-raising the exception.

	Continuous-Integration: Jenkins CI

	net: Bond - Expose the (kernel) bond list.
	Continuous-Integration: Jenkins CI

	net: Expose owned_device method through the configurator
	Provide means to check if a device is owned by VDSM specific driver.
	In this case, by the ifcfg configurator.

	It will be used by a following patch to determine if the device is being
	used by the Linux switch.

	Continuous-Integration: Jenkins CI

2016-09-09  Adam Litke  <alitke@redhat.com>

	sdm: Use guarded.context in copy_data
	Take the appropriate ResourceManager locks and a Volume Lease on the
	destination volume when performing a copy_data operation.

	Continuous-Integration: Jenkins CI

2016-09-08  Leon Goldberg  <leon.otium@gmail.com>

	storage: py3: misc.py compliance
	now using several modules/methods via six for both py2 and py3
	compliance (and replacing xrange with range)

	Continuous-Integration: Jenkins CI

2016-09-08  Edward Haas  <edwardh@redhat.com>

	net: dhclient - address flush before starting and on shutdown
	Continuous-Integration: Jenkins CI

	net: dhclient kill - early exit if iface does not exists
	There is no need to lookup for dhclient daemons for devices that do not
	exists. Such a daemon cannot exist (as it has no device to listen on).

	Continuous-Integration: Jenkins CI

2016-09-08  Adam Litke  <alitke@redhat.com>

	sdm: Pass the real hostid to copy_data
	We have been passing the hostid as None to copy_data but the correct
	value will need to be passed in order to support volume leases.  Since
	we use the same hostid for all storage domains and the that hostid is
	the same as the id attribute of the connected storage pool we can add a
	simple helper to supply the proper hostid to sdm verbs.  This will need
	to be changed if we remove storage pools or if we opt to use different
	hostid values for each domain.

	Continuous-Integration: Jenkins CI

	storage: Add support for guarded to Volume Leases
	Support the use of volume leases with the guarded utilities by creating
	a VolumeLease class that conforms to the guarded.AbstractLock semantics.

	Continuous-Integration: Jenkins CI

	storage: Add support for guarded to ResourceManager
	Support the use of ResourceManager resources with the guarded utilities
	by creating a ResourceManagerLock class that conforms to the
	guarded.AbstractLock semantics.

	Continuous-Integration: Jenkins CI

	storage: Introduce guarded utilities
	Throughout the storage code we have implicit locking rules which we
	follow in order to ensure that concurrent operations will not conflict
	with one another.  We also require a specific locking order to prevent
	deadlocks.  This code is repeated throughout the storage subsystem and
	is error prone.  To alleviate this, introduce the guarded module with a
	context manager that can perform the necessary locking.  At first we
	will support resourceManager locks and volume leases.

	The contextmanager accepts a variable number of lock lists where each
	list corresponds to the locks required to protect one element of the
	operation (eg.  a source volume).  Lists must contain only AbstractLock
	derived objects.  All locks from all lists are aggregated and locked
	according to the rules.  When exiting the context (or upon error) the
	locks are released in reverse order.  If an exception was raised inside
	the context, that exception will be propagated regardless of any lock
	release failures that may occur.

	The following rules are currently enforced:
	- Locks are collected from all lists and sorted using namespace,
	  name, and mode (in that order)
	    - Due to namespace sorting, ResourceManager locks are taken before
	      volume leases
	- Duplicate locks are removed (only when ns, name, and mode match)
	- Locks are acquired in sorted order and released in reverse order

	Continuous-Integration: Jenkins CI

2016-09-08  Edward Haas  <edwardh@redhat.com>

	net libvirt hook: Adjust hook to vmList report change.
	Patch 78ea853e131da3b91b812315a0656b8f99d7fef4 has changed the output of
	vmList, from the key 'items' to 'vmList', breaking the hook.

	This patch adjusts the hook with the new key.

	Continuous-Integration: Jenkins CI

	net: Introduce iface.exists and start using it in ip.dhclient
	Continuous-Integration: Jenkins CI

	net: ifcfg - dhclient should always be stopped
	While running functional tests, it has been observed that dhclients are
	still running on slave ifaces.

	This patch is stopping any running dhclient per the configured iface.

	Continuous-Integration: Jenkins CI

	net: Expose disable IPv6 through ip.address module
	Continuous-Integration: Jenkins CI

	net test: test_ip_info - Wait for IP setting to take affect
	test_ip_info is failing randomly on CI.
	The suspected problem is the time it takes from the action of adding an
	IP to the actual kernel apply.

	In this patch, on each IP add, the test waits for an event of 'done'.

	Failing test showed that the 198.51.100.11/32 is missing.

	Continuous-Integration: Jenkins CI

2016-09-08  Ala Hino  <ahino@redhat.com>

	Live Merge: Refresh base volume before live merge
	When live merging raw base volume, engine extends the base volume
	if it is smaller than the top volume. However, on the host running
	the vm, the lv is already active and does not reflect the new size
	until we refresh it.  During the merge we don't know whether base
	volume extended, so we always refresh it.

	Bug-Url: https://bugzilla.redhat.com/1367281
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-09-08  Petr Horáček  <phoracek@redhat.com>

	tests: fix testGetBondingOptions
	Bonding options are reported only if they differ from defaults.
	Bond 'mode' is exceptional, it is reported always. We are not
	interested in this one as it may differ from machine to machine.

	With this path we introduce new helper method which hides 'mode'
	option.

	Continuous-Integration: Jenkins CI

2016-09-08  Irit Goihman  <igoihman@redhat.com>

	check-merged: switch fc24 to el7
	We used to run our functional tests using lago in check-merged
	script over fc23. Recently we fixed CI repos to use fc24 in master
	branch. We face issues with each new fedora release due to some
	external packages. After struggling with that we decided that
	running vdsm functional tests only over el7 is enough
	(at least for now). New versions of rhel\centos come less
	frequently, and it makes the maintenance of this area much easier.

	Continuous-Integration: Jenkins CI

2016-09-08  Petr Horáček  <phoracek@redhat.com>

	tests: introducting broken_on_ci decorator
	With this decorator we skip failed test only when it was executed on
	Jenkins.

	Continuous-Integration: Jenkins CI

2016-09-07  Irit Goihman  <igoihman@redhat.com>

	jsonrpcvdscli: fix Host.getVMList command result
	Host.getVMList and Host.getFullVMList are similar commands that differ in
	their verbosity level. Their result should be represented as a value inside
	a dictionary with 'vmList' key. Instead of that, it was represented as
	a list and during the creation of JsonRPCResponse it was re constructed
	inside a dictionary holding the result inside 'items' key.

	Continuous-Integration: Jenkins CI

2016-09-07  Leon Goldberg  <leon.otium@gmail.com>

	py3: taskset.py/tasksetTests.py compliance.
	tasksetTests.py: raw_values for test_online_cpus are now properly
	byte arrays for both py2 and py3 and are able to be written to a file
	for both py2 and py3.

	taskset.py: _cpu_set_from_output receives byte arrays as input and as
	such needs to be decoded to unicode first before applying string
	manipulations to it (rstrip specifically).

	Makefile.am: tasksetTests.py now passes both in py2 and py3. removed
	the test from its py3 blacklist.


	Continuous-Integration: Jenkins CI

2016-09-06  Petr Horáček  <phoracek@redhat.com>

	net tests: fix test_events_keys
	On Jenkins CI Fedora 23 this test sometimes fails because of missing
	del_neigh event. It is not needed and we can drop it from expected
	events.

	Continuous-Integration: Jenkins CI

2016-09-06  Francesco Romani  <fromani@redhat.com>

	tests: mom: create the socket under tmpdir
	Some tests may fail under automation if Vdsm
	is built and its test are run under a too nested
	directory.
	This because the absolute path of the UNIX domain
	socket becomes too long.

	To fix this, we create the socket under a temporary
	directory.
	This also makes cleanup a little easier.

	Continuous-Integration: Jenkins CI

2016-09-06  Fred Rolland  <frolland@redhat.com>

	storage: Remove unneeded multipath call
	As part of multipath rescan, we call iscsi and hba rescan.
	These operations are sufficient to discover new devices and
	detect changes in size.
	Therefore, the multipath call is not needed and can be removed
	improving the overall performance of GetDeviceList verb.
	Also, the multipath call is risky as it may get stuck.

	Detailed profiling :
	time filename:lineno(function)
	3.178 |hsm.py:1948(HSM._getDeviceList)
	1.546 |--> sdc.py:80(StorageDomainCache.refreshStorage)
	1.489     |--> multipath.py:65(rescan)
	0.481         |--> iscsi.py:431(rescan)         iscsi scan
	0.076         |--> storage/hba.py:53(rescan)   fc scan
	0.912         |--> multipath.py:88(multipath)  multipath
	0.056     |--> multipath.py:92(resize_devices)
	0.756 |--> lvm.py:843(getAllPVs)
	0.756     |--> lvm.py:317(LVMCache._reloadpvs)
	0.755         |--> lvm.py:290(LVMCache.cmd)    pvs
	0.871 |--> multipath.py:213(pathListIter)
	0.029     |-->devicemapper.py:176(getPathsStatus) dmsetup status

	Bug-Url: https://bugzilla.redhat.com/1303578
	Continuous-Integration: Jenkins CI

2016-09-06  Nir Soffer  <nsoffer@redhat.com>

	misc: Remove log skipping infrastructure
	We had complex and expensive code for logging the caller of
	resource manager requests. It was originally introduced in order to 
	help debug culprits of deadlocks. Such deadlocks have not been seen for
	years.

	Other complex code was added so that logging in a common helper function
	would rather use the line number of the helper function's caller, since
	the latter is the more useful for debugging (rhbz#572050). @logskip was 
	ever used very seldom (though using it more might have improved our 
	code).

	The code is not very important, yet it too complex and a pain to
	maintain or port to Python 3. Let us drop it now.

	This feature is not needed and I don't want
	to maintain this code on both Python 2 and 3.

	Continuous-Integration: Jenkins CI

2016-09-06  Sharon Naftaly  <snaftaly@redhat.com>

	Adding build-artifacts-manual.sh script
	Adding build-artifacts-manual.sh script and related
	packages and repos files.
	build-artifacts-manual.sh is used for creating rpms from an
	existing tarball. It assumes that the tarball already exists
	in the projects directory and builds srpms and rpms, and
	moves the files to exported_artifacts directory.
	See more info here: https://gerrit.ovirt.org/#/c/62811/

	Continuous-Integration: Jenkins CI

2016-09-06  Edward Haas  <edwardh@redhat.com>

	net test: Debug test_local_auto_with_dynamic_address_from_ra
	test_local_auto_with_dynamic_address_from_ra is randomly failing on CI
	due to lack of response from the dnsmasq server.

	This patch reorders the link setup of the test and adds netlink event
	log dump in case of ipv6 address acqusition timeout.

	Continuous-Integration: Jenkins CI

2016-09-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix makefile - move config.log to right location
	Probably by mistake config.log was declared in wrong location and caused
	failure in rpmbuild run

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-09-06  Leon Goldberg  <leon.otium@gmail.com>

	tests: py3: commands_tests.py compliance
	decode byte string before checking for equality to string literal

	Continuous-Integration: Jenkins CI

2016-09-06  Irit Goihman  <igoihman@redhat.com>

	jsonrpcvdscli: added VM cont verb
	VM.cont is needed in order to resume paused VMs

	Continuous-Integration: Jenkins CI

2016-09-05  Dan Kenigsberg  <danken@redhat.com>

	tests: install fake-virt-v2v.err to fix tests
	In commit 985cbe87077512adf1ff594841b7f79674d451fc new file named
	tests/fake-virt-v2v.err was added. The file however was not included
	into tarball which made the tests unusable.

2016-09-05  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	jsonvdscli: change hostname default
	We want to mitigate dns lookups due to potential issues with
	connectivity or dns servers.


	Bug-Url: https://bugzilla.redhat.com/1358530
	Continuous-Integration: Jenkins CI

2016-09-05  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: improve message id handling during response send
	Continuous-Integration: Jenkins CI

2016-09-04  Edward Haas  <edwardh@redhat.com>

	net: Use is_link_up instead of operstate in netfunctestlib
	Continuous-Integration: Jenkins CI

	net: For IP-less networks, wait for link-up on ifup execution
	Continuous-Integration: Jenkins CI

	net: Relocating wait-for-event under its own module.
	Creating waitfor module under the netlink package.
	To be used as a context manager that waits for a specific event to
	arrive (using monitor module) before proceeding with the context body.

	Continuous-Integration: Jenkins CI

	net tests: Set dummy ifaces up by default.
	Dummy interfaces should be up when created, removing the need from the
	individual tests to raise them.
	This change showed several problems with existing tests, which have been
	resolved as part of this patch.

	Continuous-Integration: Jenkins CI

	net func tests: Cleanup ifcfg files after each func test.
	Continuous-Integration: Jenkins CI

	net: Adding bond api with sysfs driver under link
	Continuous-Integration: Jenkins CI

	net: Adding the 'link' package with an iface module
	The link package is to be used for all iface, bond and other related actions.
	Its main purpose is to provide an api to access these devices and their
	attributes.

	The plan is to add drivers for the underlying devices access.

	This patch adds the first link module: iface, which present an api to
	iface related actions (link up, link down, etc)

	Continuous-Integration: Jenkins CI

	net: dhclient command - iface name should appear at the tail
	dhclient lookup is expecting the iface on which the dhclient runs
	to appear at the end of the command.
	When running dhclient directly (not through ifcfg), this is not the
	case.

	This patch places the iface at the tail of the command.

	Continuous-Integration: Jenkins CI

2016-09-03  Nir Soffer  <nsoffer@redhat.com>

	spec: Obsolete actual vdsm-infra packages
	We wrongly obsoleted vdsm-infra-4.16 or later, possible obsoleting
	future vdsm-infra package which may be compatible with vdsm, instead of
	obsoleting only actual vdsm-infra packages, which are not compatible
	with vdsm.

	vdsm-infra was introduced in 4.17 and removed during the 4.18
	development, so we obsoletes now <= 4.18.

	Continuous-Integration: Jenkins CI

2016-09-01  Dan Kenigsberg  <danken@redhat.com>

	py3: make conf_persistence_test pass
	In Python 3, an exception is not iterable, though its args are.

	Continuous-Integration: Jenkins CI

	py3: define __nonzero__ by means of __bool__
	Python 3 has renamed __nonzero__ to __bool__. As long as we support both
	language flavours, we should have both methods defined.

	https://docs.python.org/3/library/2to3.html?highlight=__nonzero__#2to3fixer-nonzero

	Continuous-Integration: Jenkins CI

2016-09-01  Idan Shaby  <ishaby@redhat.com>

	hsm: add getVGInfo discard related fields
	Patch I7ff47 added the fields discard_max_bytes and discard_zeroes_data
	to getDeviceList.
	This patch adds them also to getVGInfo.

	Continuous-Integration: Jenkins CI

	multipath: getDeviceDiscardMaxBytes return type
	Since /sys/block/dm-X/queue/discard_max_bytes may return more than 4GB,
	uint might not be enough.
	Thus, this patch fixes the schema to state on a ulong instead of uint
	value for discard_max_bytes.

	Continuous-Integration: Jenkins CI

2016-09-01  Shahar Havivi  <shaharh@redhat.com>

	v2v: filter out Xen VMs with block storage
	virt-v2v is not support importing Xen VMs with block storage domain.
	No need to return these VMs via get_external_vms verb

	Bug-Url: https://bugzilla.redhat.com/1365411
	Continuous-Integration: Jenkins CI

2016-09-01  Adam Litke  <alitke@redhat.com>

	storage: Sortable ResourceManager lock namespaces
	In order to simplify correct locking order, change the namespace constants so
	that they sort in the order that they should be taken.

	Continuous-Integration: Jenkins CI

	storage: export volume lease state in getVolumeInfo
	In order to support an entity-based polling methodology (ie. in the new
	SDM verbs) we must know whether a volume is currently locked by a long
	running operation. Extend the getVolumeInfo API to report whether the
	lease is free or held.  If a storage domain does not support volume
	leases then the status will be 'UNSUPPORTED'.  The API defines
	'EXCLUSIVE' and 'SHARED' modes for future extensibility even though
	today we only support exclusive volume leases.  Free leases will report
	'FREE'.

	Continuous-Integration: Jenkins CI

2016-08-31  Edward Haas  <edwardh@redhat.com>

	net: Define netlink netdev flags constants under netlink.link
	Add all supported flags and point all usages to the netlink.link module.

	Continuous-Integration: Jenkins CI

	net test: sourceroute thread crashes due to a test race
	testRestoreToBlockingDHCP has caused sourceroute thread to crash.
	The test got into condition where we had two dhclient processes
	monitoring a single interface. Both are woken up by a dhcp server
	response, and write the *same* file
	  /var/run/vdsm/sourceRoutes/$timeStamp
	supervdsm's inotify is woken up twice, but has only one file to handle.

	Continuous-Integration: Jenkins CI

2016-08-30  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: remove deprecated BuildRoot macro
	Continuous-Integration: Jenkins CI

2016-08-29  Francesco Romani  <fromani@redhat.com>

	Revert "build: require only the same version, not release"
	This reverts commit 630e182920cc917705ab93f80f945e93dced44c1.

	It seems that was not a good idea, we need stronger bonds
	between the Vdsm sub-packages.

	Continuous-Integration: Jenkins CI

2016-08-29  Irit Goihman  <igoihman@redhat.com>

	certificates: remove config.read call
	config.read(file) loads a new configuration to 'config' based on the
	file it reads. This call causes a bug and incosistency of vdsm 
	configuration since it overrides the right configuration.
	config should be built from files in pre configured paths (drop-in
	dirs) with priority determined by configuration file names.


	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1368115
	Continuous-Integration: Jenkins CI

2016-08-29  Martin Sivak  <msivak@redhat.com>

	Add all MOM calls to jsonrpc client
	Continuous-Integration: Jenkins CI

2016-08-29  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Log detailed output of virt-v2v
	The detailed log of virt-v2v output is often necessary to debug
	conversion failures. We provide '-v -x' arguments to virt-v2v to get the
	detailed output and store the logs in the VDSM log directory.

	We cannot use execCmd() to store the log output. Therefore we use CPopen
	directly to redirect stderr to stdout and pipe it to tee to store
	everything in a log file.

	Logs older than 30 days are removed periodically on the daily basis.

	Bug-Url: https://bugzilla.redhat.com/1350465
	Continuous-Integration: Jenkins CI

	v2v: Add PipelineProc, pipeline wrapper object
	We plan to pipe the output of virt-v2v to tee to store the log file. In
	order to manage the pipelined processes new class is introduced.

	Bug-Url: https://bugzilla.redhat.com/1350465
	Continuous-Integration: Jenkins CI

2016-08-28  Edward Haas  <edwardh@redhat.com>

	net: Report the default route flag through caps
	With the removal of the cfg (ifcfg info) from netinfo and caps, the
	default route inforamtion is now missing for a VDSM client.

	This patch introduces ipv4defaultroute flag in the network devices
	caps, describing if the gateway is the host default route.

	Continuous-Integration: Jenkins CI

2016-08-27  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Add helper that redirects stdin/out/err
	There is no way to pass stdin, stdout and stderr streams to Popen via
	execCmd. This will be useful in subsequent changes introducing logging
	of virt-v2v output.

	Bug-Url: https://bugzilla.redhat.com/1350465
	Continuous-Integration: Jenkins CI

2016-08-27  Francesco Romani  <fromani@redhat.com>

	contrib: jsonrpc: add example script to run a VM
	Add simple example script to run a VM from commandline,
	like vdsClient used to allow.

	This does NOT replace the future jsonrpc-powered new
	vdsClient current in the making.

	Continuous-Integration: Jenkins CI

2016-08-27  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Running virt-v2v with some sane environment
	Starting virt-v2v with (almost) empty environment no longer works and
	virt-v2v expects at least PATH to be set properly. Otherwise it will
	fail to find external tools.

	Still, even if virt-v2v was OK with it, having empty environment is not
	a good idea either. Since it depends on couple external tools they may
	also require some basic environment to work properly.

	Bug-Url: https://bugzilla.redhat.com/1367839
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-08-24  Irit Goihman  <igoihman@redhat.com>

	jsonrpcvdscli: add default value to request queue argument
	requestQueue argument of jsonrpcvdscli.connect function should
	have default value based on vdsm configuration parameters.

	Continuous-Integration: Jenkins CI

2016-08-24  Francesco Romani  <fromani@redhat.com>

	build: require only the same version, not release
	The various vdsm subpackages where requiring version-release.
	The `release` value, however, depends on the build, hence it
	can get out of sync when building on different architectures
	(e.g. x86_64, ppc64), so we can end up depending on packaged
	which does not exists in the repository.

	We recently had the same issue on ioprocess
	(https://gerrit.ovirt.org/#/c/62464/1), so we are borrowing
	the same solution: we set dependencies only on versions,
	ignorning the release.

	Like ioprocess, Vdsm must be backward compatible within
	the same release, so nothing is lost from the safety side.

	Continuous-Integration: Jenkins CI

2016-08-23  Nir Soffer  <nsoffer@redhat.com>

	lvm: Separate lv reduce and extend
	Reducing and extending logical volumes were mixed in a horrible and
	buggy mess in _resizeLV. Now we have a much simpler and clear function
	for each operation.

	Continuous-Integration: Jenkins CI

	lvm: Fix error handling when resizing lvs
	We depended on undocumented and wrong behavior in lvextend, returning
	exit code 3 when lvextend failed because lv size is same or bigger then
	the requested size. Exit code 3 means the command was invoked with
	incorrect syntax. In EL 7.3, lvm changed the behavior and now lvextend
	is returning 5 in this case:

	    # lvextend --size 100m vg/lv; echo $?
	      Rounding size to boundary between physical extents: 128.00 MiB.
	      New size (1 extents) matches existing size (1 extents)
	    5

	This change caused lvextend to fail in many flows, since we tend to do
	lot of unneeded resizes.

	Using exit code 3 was also hiding real usage errors like this:

	    # lvextend --no-such-option 100m vg/lv; echo $?
	    lvextend: unrecognized option '--nosuchoption'
	      Error during parsing of command line.
	    3

	When handling errors, we used to compare the requested size with the
	free size on the vg instead of the additional size, raising misleading
	exception. This check is also relevant only for extending lv, but we
	raised it also when reducing lv.

	Finally, if the op parameter was invalid, the lvm command would fail,
	and we used to log or raise incorrect information about the error.

	Changes in this patch:
	- Replace the exit code check with lv size check
	- Check sizes using extents matching lvm behavior
	- Consider operation type when checking errors
	- Raise clear error if used with invalid operation

	Since we don't have a LogicalVolumeReduceError, we raise
	LogicalVolumeExtendError also for reduce errors.

	Bug-Url: https://bugzilla.redhat.com/1363734
	Bug-Url: https://bugzilla.redhat.com/1364339
	Bug-Url: https://bugzilla.redhat.com/1366176
	Continuous-Integration: Jenkins CI

	lvm: Never hide lvm errors
	In changelv, if lvm command has failed but stdout is not empty, the
	error was ignored silently. This may hide errors when deactivating lvs
	leading to stale lvs, or hide other errors.

	This code was introduced in 2009 with the first version of the lvm
	module, and there is no documentation why ignoring errors when stdout is
	not empty is needed.

	Testing lvm show that using verbose mode (-v) will write to stdout and
	cause errors to be hidden. I could not find lvm command that requires
	this strange treatment, and no other lvm command is using it.

	This patch removes the stdout empty check, raising if lvchange return
	non-zero exit code.

	Bug-Url: https://bugzilla.redhat.com/1358348
	Continuous-Integration: Jenkins CI

	lvm: Improve logging lv activation logging
	Log vg name and lv names when we activate, refresh or deactivate lvs.
	All are important state changes that should be logged in INFO level.

	The actual lvm commands are logged in DEBUG level, and may not be
	available when we change the default log level to INFO.

	Bug-Url: https://bugzilla.redhat.com/1358348
	Continuous-Integration: Jenkins CI

	lvm: Refresh lvs during activation
	Previously we used to activate only the inactive lvs, and ignore the
	active lvs silently. An active lv may not reflect the mapping on
	storage if the lv was extended or removed on another host.

	In case of incorrect size, starting a vm with an lv with incorrect size
	may cause the vm to pause when trying to write to the lv. This may lead
	to data corruption when migrating a vm from another host, when the lv
	size on the source machine is bigger then the lv size on the destination
	host.

	In the case of removed lv, writing to the lv may corrupt an extend
	belonging now to another lv. This should never happen since we do not
	use lvs after we remove them.

	To avoid these issues we refresh active lvs during activation.

	Bug-Url: https://bugzilla.redhat.com/1358348
	Continuous-Integration: Jenkins CI

2016-08-23  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	stomp: use socket pending
	Dispatcher pending method is deprecated and we want to use socket
	pending method instead.


	Continuous-Integration: Jenkins CI

	yml: return type fixes for StoragePool.getInfo
	Continuous-Integration: Jenkins CI

2016-08-23  Eyal Edri  <eedri@redhat.com>

	enabling ppc64le builds for vdsm
		Changing repos to be multi arch and support ppc64le.
		Splitting .packages for build artifacts because
		building VDSM doesn't require lago + deps and
		its only prolonging the build + blocked on
		missing python-libguestfs.
		We can consider bringing back the links
		once we have libguestfs built for ppc64le.

	Continuous-Integration: Jenkins CI

2016-08-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix configfile for py3 to use unicode
	Continuous-Integration: Jenkins CI

2016-08-23  Francesco Romani  <fromani@redhat.com>

	jsonrpc: shorten executor thread system names
	We shorten the basename of the jsonrpc executor,
	because the system has a hard limit of 15 ASCII
	character per thread name.

	The new name is less expressive, but leaves room
	for the worker ID, which is an overall usability
	improvement.

	Before, it looked like

	  jsonrpc.Executo

	now it looks like

	  jsonrpc/0

	Continuous-Integration: Jenkins CI

	virt: vm: switch to concurrent.thread()
	The LiveMergeCleanupThread class used to inherit from
	threading.Thread. This patch makes it use concurrent.thread().

	We want to do this in order to have consistent creation
	of threads - so we can do nice things like assign system names
	to them, and minimize duplication.

	Furthermore, we remove one more case of inheritance from
	threading.Thread(), which is bad practice.

	There are no intended changes in behaviour.

	Continuous-Integration: Jenkins CI

	virt: migration: switch to concurrent.thread()
	This patch moves all the migration threads
	(SourceThread, MonitorThread, DowntimeThread)
	to concurrent.thread(), in order to get rid
	of the inheritance from threading.Thread(), which
	is a longtime deprecated practice.

	There are no intended changes in behaviour.

	Continuous-Integration: Jenkins CI

	Revert "configurator: libvirt: do not jump on virtlogd"
	This reverts commit 0d9be09351814571655fab23bbfa21733916e36d.
	The feature looks good for us now.

	Bug-Url: https://bugzilla.redhat.com/1321010
	Continuous-Integration: Jenkins CI

2016-08-23  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Bump version requirement on python-cpopen.
	In order to support redirection of stderr to stdout we need to bump
	version requirement on python-cpopen. This feature is broken in previous
	versions.

	Bug-Url: https://bugzilla.redhat.com/1350465
	Continuous-Integration: Jenkins CI

2016-08-22  Dan Kenigsberg  <danken@redhat.com>

	compat: py3: capture output of CPopen.communicate
	To allow better coverage of python3 testing, we use Popen instead of
	CPopen, as the latter is not implemented (and not needed) in python3.

	Unfortunately, CPopen has chosen to use stdout\err=subprocess.PIPE as its
	default. Now when cpopen supports stdout and strerr params we can always set
	those to PIPE to match the defaults.

	Continuous-Integration: Jenkins CI

2016-08-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Require python-blivet only with gluster-management build
	gluster's code uses blivet which is currently not available with
	official build in fedora. Therefore, we disable the requirement for
	builds without gluster-management package.

	Continuous-Integration: Jenkins CI

2016-08-21  Edward Haas  <edwardh@redhat.com>

	net test: Rename link_test module to netlink_test
	Continuous-Integration: Jenkins CI

2016-08-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removed unused global
	Continuous-Integration: Jenkins CI

2016-08-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm reg: clean up
	Reviewing the vdsm spec found some remaining of vdsm reg
	deprecated in early 3.6 versions.

	Continuous-Integration: Jenkins CI

2016-08-19  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: fix lago repo for fc24
	Moving lago repository to fc24 which wasn't previously available.

	Continuous-Integration: Jenkins CI

2016-08-19  Francesco Romani  <fromani@redhat.com>

	jsonrpc: yajsonrpc: switch to concurrent.thread()
	jsonrpc and yajsonrpc code used to call threading.Thread()
	directly. While this was way better than inherit
	from threading.Thread(), it is even better to leverage
	the concurrent.thread() utility, so we can have less code
	and more nice things (e.g. system names for threads).

	There are no intended changes in behaviour.

	Continuous-Integration: Jenkins CI

	virt: vmchannels: use shorter name for thread
	We started to use concurrent.thread() in
	vmchannels.Listener, in order to have the system
	name for the thread, to make it easier to track using
	system utilities (e.g. htop).

	We need to use a short name, because it needs to be long
	15 ASCII characters maxiumum.
	We need to make it lowercase, for consistency with other names.

	This patch implements those changes.

	Continuous-Integration: Jenkins CI

	virt: vmchannels: switch to concurrent.thread()
	Let's use concurrent.thread for vmchannels.Listener,
	in order to get rid of the inheritance from threading.Thread
	- which is frowned upon, and in order to have all
	the goodies that concurrent.thread() provides
	(e.g. system thread names).

	Continuous-Integration: Jenkins CI

	lib: concurrent: fallback python name for system
	If the name is not explicitely given to concurrent.thread(),
	let's use the default name Python used, so it is a bit easier
	to find busy threads using the system tools (e.g. htop).

	Continuous-Integration: Jenkins CI

2016-08-19  Irit Goihman  <igoihman@redhat.com>

	jsonrpcvdscli: change getVolumesList schema conversion
	getVolumesList was converted to Image.getVolumes in patch 
	https://gerrit.ovirt.org/#/c/55252/ while it should be converted
	to StorageDomain.getVolumes in order to be consistent with vdscli
	commands

	Continuous-Integration: Jenkins CI

2016-08-18  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: move glusterfs to 3.8
	Moving glusterfs to 3.8 since it's the default
	for Fedora 24 and CentOS Storage SIG.

	Issue: https://ovirt-jira.atlassian.net/browse/OVIRT-680
	Continuous-Integration: Jenkins CI

2016-08-18  Francesco Romani  <fromani@redhat.com>

	kvm2ovirt: use None if no password is given
	If no password file is given as parameter, we should use
	None as password, not empty string.

	Related-To: https://bugzilla.redhat.com/1365051
	Continuous-Integration: Jenkins CI

2016-08-18  Nijin Ashok  <nashok@redhat.com>

	kvm2ovirt: Fixes issue in importing VMs with libvirt uri qemu+tcp
	Current implemenation fails with following error

	V2VProcessError: Job u'03751e96-bc69-410b-b8c5-7df5ca166d6c'
	process failed exit-code: 1, stderr: Traceback (most recent call last):
	  File "/lib/python2.7/site-packages/vdsm/libvirtconnection.py", line 91, in req
	    cred[4] = passwd.value if passwd else None
	AttributeError: 'str' object has no attribute 'value'
	libvirt: Remote Driver error : authentication failed: Failed to collect auth credentials

	We are incorrectly passing password as string to open_connection.

	Bug-Url: https://bugzilla.redhat.com/1365051
	Continuous-Integration: Jenkins CI

2016-08-17  Martin Polednik  <mpolednik@redhat.com>

	configs: move systemd service files to static
	Part of the move of static files to new directory. The files are moved
	to corresponding *expected* path under static (/usr/lib/systemd/system)
	and renamed to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move modprobe files loading to static
	Part of the move of static files to new directory.  The files are moved
	to corresponding *expected* path under static (/etc/modprobe.d) and
	renamed to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move sysctl to static
	Part of the move of static files to new directory.  The files are moved
	to corresponding *expected* path under static (/etc/sysctl.d) and
	renamed to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move kernel module loading to static
	Part of the move of static files to new directory. The files are moved
	to corresponding *expected* path under static (/etc/modules-load.d) and
	renamed to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move logrotate to static
	Part of the move of static files to new directory.  The files are moved
	to corresponding *expected* path under static (/etc/vdsm/logrotate) and
	renamed to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move limits to static
	Part of the move of static files to new directory.  The files are moved
	to corresponding *expected* path under static (/etc/security/limits.d)
	and renamed to match final installation name.

	Continuous-Integration: Jenkins CI

2016-08-17  Ondřej Svoboda  <osvoboda@redhat.com>

	net: don't accept nameservers on a non-default network
	Currently, only the default/management network (the one with
	the default route) may be used to set nameservers, for reasons
	given below. Previously, an attempt to set nameservers through
	a non-default network would be ignored silently.

	While it may be possible in the future to refine this design,
	the configuration of nameservers is now viewed as a per-host
	task, in which it makes sense to use the default network.

	Continuous-Integration: Jenkins CI

2016-08-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix in hawkular provider
	Passing wrong parameters to concurrent.thread.

	Continuous-Integration: Jenkins CI

2016-08-16  Ondřej Svoboda  <osvoboda@redhat.com>

	net tests: add a 'status' parameter to SetupNetworksError
	Continuous-Integration: Jenkins CI

	net: write out nameservers to ifcfg files
	This patch handles setupNetworks' recently introduced
	'nameservers' key. It adds necessary wiring to propagate
	a list of nameservers to configurators and lets the ifcfg
	configurator write DNS1= and DNS2= entries accordingly.

	Bug-Url: https://bugzilla.redhat.com/1351095
	Continuous-Integration: Jenkins CI

	net: add a 'nameservers' property to NetInfo
	Functional tests in the following patch will use it.

	Bug-Url: https://bugzilla.redhat.com/1351095
	Continuous-Integration: Jenkins CI

2016-08-16  Edward Haas  <edwardh@redhat.com>

	revert net: Libvirt hook that enables ovs-legacy migration
	Both the integrated and older OVS hook have a libvirt hook that
	enables VM migration.
	The two are colliding and only one should be left around.
	Therefore, the ovs hook one is removed.

	Future patches should remove the ovs hook completely.

	This reverts commit 50de041e01b098843b0fd7a4d3927783c11c79b6.

	Continuous-Integration: Jenkins CI

	virt net: Support VM migration on OVS based networks
	With the introduction of OVS as a network implementation, the migration
	of VM/s between hosts requires special handling.

	This patch enables VM/s to migrate between networks of the same kind or
	mixed.

	Continuous-Integration: Jenkins CI

2016-08-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing deprecated lines from spec
	rm -rf %{buildroot} and %defattr(-, root, root, -) are not needed
	anymore.

	Continuous-Integration: Jenkins CI

2016-08-14  Adam Litke  <alitke@redhat.com>

	tests: Remove global sanlock mock
	We're currently mocking the sanlock python module for all tests using a
	hack in testrunner.py.  Now that sanlock is available on all supported
	platforms, just require that sanlock-python is installed.  We can then
	get rid of this hack.

	Continuous-Integration: Jenkins CI

2016-08-14  Francesco Romani  <fromani@redhat.com>

	lib: set system name for threads
	To make the troubleshooting easier, we want
	to set meaningful system names for our threads, so
	we can use system tools (top, ps) to learn what Vdsm is doing.

	The problem is that the system thread name must be at most
	15 ASCII character long, while python's thread name could be
	any legal string

	A good shortening algorithm failed to emerge, so we
	just truncate the possibly long python name and we use the truncated
	name for system thread name.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2016-08-11  Nir Soffer  <nsoffer@redhat.com>

	testlib: Use osutils.close_fd to avoid fd leaks
	If a child process exit when we close a file descriptor, the call may be
	interrupted, and we would not close the next fd.

	osutils: Move NoIntrCall to osutils.uninterruptible
	Streamline the code and missing tests

	Continuous-Integration: Jenkins CI

	sd: Support volume leases
	Add acquireVolumeLease(), inquireVolumeLease() and relaseVolumeLease()
	to StorageDomainManifest. The new methods will be used for SDM.copy_data
	verb.

	getVolumeLease() returns now clusterlock.Lease named tuple including the
	lease name, instead bare tuple with the lease path and offset.

	This patch is based on Adam's patch https://gerrit.ovirt.org/38622.

2016-08-11  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: build also vhostmd hook
	In 3.6 we shipped vdsm-hook-vhostmd as part of our VDSM releases.
	In 4.0 this hook is missing from the build due to a bug in the
	automation code which didn't configure the spec file for creating
	the sub-package.

	This patch address this regression, re-adding vdsm-hook-vhostmd to
	the packages shipped within ovirt repos.

	Continuous-Integration: Jenkins CI

2016-08-11  Nir Soffer  <nsoffer@redhat.com>

	clusterlock: Raise if lock is used improperly
	Cluster locks which do not support multiple leases (SafeLease, LoclLock)
	will raise when trying to init, acquire, inquire or release multiple
	leases.

	Caller should check supports_mulitple_leases, and avoid using multiple
	leases, but if there is a bug in the calling code, it should fail
	loudly.

	supports_volume_leases was renamed to supports_multiple_leases, since
	cluster lock should know nothing about volume leases.

	This patch is based on Adam's patch https://gerrit.ovirt.org/38622.

	clusterlock: Support for multiple leases
	Previously the clusterlock api was supporting only a single lease (the
	spm lease). The lease path was set when creating a cluster lock, and used
	with hardcoded offset and name when acquiring, releasing and inquiring
	the lease.

	The leases path was removed from cluster lock api. Instead, initLock(),
	acquire(), inquire() and release() receive now a lease argument, which
	is a named tuple (cluserlock.Lease) with the lease details.

	The details of the spm lease are kept now in sd.py, passing the lease to
	the cluster lock.

	This patch is based on Adam's patch https://gerrit.ovirt.org/38622. But
	instead of introducing new clusterlock methods to work with volume
	leases, the existing api is modified to accept a lease.

	clusterlock: Fix LocalLock.supports_volume_leases
	LocalLock is using single lock file to implement leases, so it cannot
	support volume leases. We can change it to support multiple leases, but
	I'm not sure if there is any value in local volume leases.

	sd: Move getVolumeLease to StorageDomainManifest
	We need to acquire volume leases from any host during data operations.
	The method moved to the StorageDomainManifest subclasses.

	Based on Adam patch: https://gerrit.ovirt.org/38622.

	sd: Unify getVolumeLease signature
	StorageDomain.getVolumeLease accepted only a volume uuid, while
	BlockStorageDomain and FileStorageDomain versions accept also an image
	uuid. Now all use the same signature.

	clusterlock: Fix double close on EINTR
	Use new osutil.close_fd() to close lockfile properly without retrying if
	the system call was interrupted by signal.

	osutils: Start the osutils module
	We use to have code calling os.close() using utils.NoIntrCall. If
	os.close(fd) was interrupted by signal, we would try to close again.
	This may lead to closing other thread file descriptor.

	close(2) warns not to retry close() after EINTR:

	    Note that the return value should be used only for diagnostics. In
	    particular close() should not be retried after an EINTR since this
	    may cause a reused descriptor from another thread to be closed.

	    See also this discussion about close and EINTR on linux:
	    http://lwn.net/Articles/576478/

	The same issue was fixed in cpopen few month ago.

	This patch adds osutils.close_fd() - this should be used instead of
	os.close() in vdsm.

	This should also be the place for os related utilities like NoIntrCall
	and friends, to be added later.

	cluserlock: Use errno instead of os.errno
	The errno attribute in the os module is not part of the module api but a
	side effect of python import. Code that need to error number should
	import the errno module.

2016-08-11  Idan Shaby  <ishaby@redhat.com>

	Remove _udevrulesdir global macro
	Patch 271dd9bca1288e732f8d80d98a3d022e5c466bcc changed the definition
	of the "_udevrulesdir" global macro to use %{_libdir}, and with that
	added a regression that prevents the udev rule "12-vdsm-lvm" from
	being installed, which causes our logical volumes to be own by root.
	This leads to a situation where libvirt cannot access them at all, so
	for example, a Vm with a block domain cannot be started.

	This patch removes this macro as it's already defined in macros.systemd.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-08-10  Francesco Romani  <fromani@redhat.com>

	api: emit warnings only if configured
	The python standard module `warnings` implement
	filtering for warnings, to allow the client choose
	how often the warning should be presented, like every time,
	or the first time only and so forth.

	However, to implement this behaviour the module silently
	adds the __warningregistry__ dicts to various modules;
	furthermore, the key of the entries include the message
	of the warning being checked.

	Vdsm uses the warnings module to report inconsistencies
	between the schema and the actual data received or sent;
	we check the responses, and this includes variable data
	(e.g. in any stats reporting flow), including timestamps.

	This means that every warning we issue will have a different
	string representation, thus a different entry in the
	hidden __warningregistry__, with the ultimate result of
	unbound growth and unbound resource usage.

	One possible workaround is to actually enable the warning reporting,
	setting

	  [devel]
	  python_warnings_enable = true

	in /etc/vdsm/vdsm.conf.

	This makes the warnings module skip the usage of its registries,
	sidestepping the issue. The problem, however, is that logs are
	much more verboses

	This patch implements another mitigation: we now issue warnings
	only if requested - using the same configuration item.
	This prevents entirely the warnings to be raised in this flow.

	Please note that this patch is not definitive, we still need
	better handling of warnings project-wise.

	Bug-Url: https://bugzilla.redhat.com/1364149
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-08-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Rename reports to metrics
	Leftovers from using reports instead of metrics (following
	https://gerrit.ovirt.org/#/c/60846/)

	Continuous-Integration: Jenkins CI

2016-08-09  Martin Polednik  <mpolednik@redhat.com>

	configs: move rwtab to static
	Part of the move of static files to new directory.  The files are moved
	to corresponding *expected* path under static (/etc/rwtab.d) and renamed
	to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move sudoers to static
	Part of the move of static files to new directory. The files are moved
	to corresponding *expected* path under static (/etc/sudoers.d) and
	renamed to match final installation name.

	Continuous-Integration: Jenkins CI

	configs: move mom to static
	Part of the move of static files to new directory. The files are moved
	to corresponding *expected* path under static (/etc/vdsm and
	/etc/vdsm/mom.d respectively). Mom policy tests are updated to match the
	new path.

	Continuous-Integration: Jenkins CI

	configs: move logger to static
	Part of the move of static files to new directory. The files are moved
	to corresponding *expected* path under static (/etc/vdsm).

	Continuous-Integration: Jenkins CI

2016-08-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Update spec change-log after re-review
	See topic: https://gerrit.ovirt.org/#/q/topic:spec-review

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1361659
	Continuous-Integration: Jenkins CI

	Removed %config(noreplace) from %{_tmpfilesdir}/%{vdsm_name}.conf
	%{_tmpfilesdir} expands to %{_prefix}/lib/tmpfiles.d which is the
	location that the package's default tmpfile creation scripts should
	install into. %{_tmpfilesdir}/%{name}.conf is not marked as a %config
	file because it is not supposed to be edited by administrators.
	Administrators can override the package's %{name}.conf by placing an
	identically named file in /etc/tmpfiles.d/, but this should very rarely
	be needed.

	Continuous-Integration: Jenkins CI

	Specifies vdsm-infra version to obsoletes
	Continuous-Integration: Jenkins CI

	Require python2-devel specifically to avoid python3 pkg
	Continuous-Integration: Jenkins CI

2016-08-09  Sandro Bonazzola  <sbonazzo@redhat.com>

	packaging: spec: drop default defattr
	Dropping default defattr, not needed since EPEL 6.
	Part of Fedora 24 spec file change:
	  commit 36ee23731c8bac6f426688ecfa57f41b09003383
	  Author: Dennis Gilmore <dennis@ausil.us>
	  Date:   Fri Mar 11 15:18:50 2016 -0600

	Continuous-Integration: Jenkins CI

2016-08-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using %{_libdir} macro instead of /usr/lib
	Continuous-Integration: Jenkins CI

2016-08-09  Martin Polednik  <mpolednik@redhat.com>

	autoconf: properly sort makefiles
	Adhere to the sorting comment. No reason to have messy list of
	makefiles.

	Continuous-Integration: Jenkins CI

	configs: introduce static dir
	The idea behind new directory is that it'll store (possibly) all files
	that are not related to source code or are not scripts. System
	configuration files, be it systemd services, confs and such are to be
	placed within this directory and not pollute the source tree.

	Continuous-Integration: Jenkins CI

	makefile: remove unused all-local section
	The section has been emptied in previous changes. Nothing to install
	anyway.

	Continuous-Integration: Jenkins CI

2016-08-08  Irit Goihman  <igoihman@redhat.com>

	check-merged: remove bond0 hack
	In the new Fedora 24 image, bonding kernel module wasn't loaded
	at vm boot so there was no need to remove bond0 from
	/sys/class/net/bonding_masters. There are also merged
	fixes for bond0 issue.

	Continuous-Integration: Jenkins CI

	check-merged: install python-mock on lago deploy
	python-mock is needed by testlib and it's not installed when
	installing vdsm

	Continuous-Integration: Jenkins CI

	check-merged: remove numactl installation from deploy
	numactl is installed when vdsn is installed so it's unnecessary
	to install it twice.

	Continuous-Integration: Jenkins CI

	automation: include master repos in check-merged tests
	ovirt master repos weren't enabled so vdsm dependencies
	couldn't be installed.
	localsync repo was given higher priority in order to make sure
	the last vdsm build will be installed on lago vm.

	Continuous-Integration: Jenkins CI

2016-08-08  Petr Horáček  <phoracek@redhat.com>

	ovs: add OVS bridges cleanup to shell_helper
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: use vdsmbr_test name for test bridges
	We should use the same prefix as for 'real' OVS bridge, so we are
	able to remove them with emergency_network_cleanup for OVS bridges
	introduced in following patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-08-07  Petr Horáček  <phoracek@redhat.com>

	ovs: copy NIC hwaddr to NB
	In order to receive the same IP for network as acquired NIC used to
	have, we must copy NIC's hwaddr to NB iface.

	By default hwaddr is copied to bridge, therefore we must set static
	hwaddr to OVS bridge to not end up with two interfaces (three with
	the NIC) with the same IP.

	Bug-Url: https://bugzilla.redhat.com/1364081
	Continuous-Integration: Jenkins CI

2016-08-07  Edward Haas  <edwardh@redhat.com>

	net test: Cleanup _fakeTypeDetection
	Continuous-Integration: Jenkins CI

	net test: Replacing MonkeyPatch with mock.patch for netinfo_test
	Refactor netinfo_test a bit and use mock module.

	Continuous-Integration: Jenkins CI

2016-08-04  Petr Horáček  <phoracek@redhat.com>

	ovs: acquire ifaces
	Switch returns list of used devices, on upper level we should
	check if they are owned by us and if not, aquire them.

	Bug-Url: https://bugzilla.redhat.com/1364081
	Continuous-Integration: Jenkins CI

	net: introduce acquire module
	This module will be used to acquire ifaces, both persisted by ifcfg and
	not persisted. It is needed for OVS switch (and eventually also for
	iproute2 and pyroute2).

	Bug-Url: https://bugzilla.redhat.com/1364081
	Continuous-Integration: Jenkins CI

2016-08-04  Edward Haas  <edwardh@redhat.com>

	net: Silently skip persisting a non-existent running-config
	In vdsm-store-net-config unified, running-config is persisted by
	copying it to a dedicated location.
	If for some edge case scenario, the running-config is absent, an error
	message appears in the log, without failing the script run. (cp fails)

	The scenario in which this occurs is limited to an initial state
	where there are no VDSM owned networks, therefore, no running-config
	file is created.

	Bug-Url: https://bugzilla.redhat.com/1329387
	Continuous-Integration: Jenkins CI

2016-08-04  Irit Goihman  <igoihman@redhat.com>

	automation: move check-merged to fc24
	check-merged repos were moved to fc24 so lago ovirt deploy is
	looking for packages under fc23 internal directory while the
	packages are under fc24.
	since fc24 packages are tested it is better to change the image
	from fedora 23 to 24.

	Continuous-Integration: Jenkins CI

2016-08-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Collect ksm values only if exist
	Ksm values appear only if mom is enabled

	Continuous-Integration: Jenkins CI

	Send metrics info only if metrics enabled to avoid parsing logic
	Continuous-Integration: Jenkins CI

2016-08-04  Francesco Romani  <fromani@redhat.com>

	Send vm info report each sampling interval from VMBulkSampler
	Continuous-Integration: Jenkins CI

2016-08-04  Ondřej Svoboda  <osvoboda@redhat.com>

	network: rename reported 'dnss' to 'nameservers' for clarity
	Continuous-Integration: Jenkins CI

2016-08-04  Edward Haas  <edwardh@redhat.com>

	net: dhcp reporting based on dhclient daemon state
	dhcp state has passed several changes in the reporting logic.
	Started by checking leased entries, followed by checking the ip source
	(static or dynamic).
	Both solutions have linked the dhcp state to the IP address assigned.
	This aproach has required some faking to be introduced, in order to
	handle cases where the dhcp has been activated but the address took some
	time to be assigned.

	This patch introduces a new approach, decoupling dhcp from the ip
	address.
	The dhcp state is now checked against the dhclient daemon existence.

	This patch also resolves dhcp6 false report.
	An IPv6 address may be assigned dynamically through autoconf, previously
	we have reported it as dhcp6 enabled.

	Continuous-Integration: Jenkins CI

2016-08-04  mirecki  <mmirecki@redhat.com>

	vdsm: removing txRate and rxRate from code
	Vdsm should no longer send rxRate and txRate to the engine.

	Continuous-Integration: Jenkins CI

2016-08-04  Edward Haas  <edwardh@redhat.com>

	net: netinfo.dhcp - dhcp info update refactoring
	Continuous-Integration: Jenkins CI

2016-08-04  Petr Horáček  <phoracek@redhat.com>

	utils: atomic file write
	Atomic writes are needed for safe file editation. This function will
	be used in following network patch 'acquire interfaces'.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-08-03  Sandro Bonazzola  <sbonazzo@redhat.com>

	packaging: spec: update Url field
	Continuous-Integration: Jenkins CI

2016-08-02  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding get_batch to StatsCache - returns dict with all vms stat
	Continuous-Integration: Jenkins CI

2016-08-02  Edward Haas  <edwardh@redhat.com>

	vdscli test: Minor pythonic changes in _assertValidAddress
	Continuous-Integration: Jenkins CI

2016-08-02  Martin Sivak  <msivak@redhat.com>

	Fix return value names for VM.ioTune calls
	Continuous-Integration: Jenkins CI

2016-08-02  Francesco Romani  <fromani@redhat.com>

	docs: add README about logging configuration
	Most notably, document how to tune the logging
	settings of Vdsm at runtime, using Vdsclient

	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

	periodic: always re-schedule operations
	when one periodic.Operation() try to dispatch itself
	to the executor, it could get TooManyTasks.
	In this case it should keep rescheduling itself.
	In general periodic.Operation should alwauys run until
	explicitely disabled, using their stop() method.

	Bug-Url: https://bugzilla.redhat.com/1361028
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	vm: periodic: fix stats age reporting
	We need to report the Vm responsiveness, because it is one
	important indicator of the Vm health. This information can
	trigger the administator intervention, or automatic corrective
	action (e.g. Vm migrations).

	The Vm class reports the monitor responsiveness in two ways:
	1. if a libvirt operation reports a timeout (a standard libvirt
	exception)
	2. if one sampling operation hangs for too long

	In the second case, given the transient nature of the detected
	failure, the responsiveness is reported, but not stored as Vm
	field. This is noteworthy, but totally expected and legitimate.

	The sampling code stores the bulk samples only for a limited
	number of cycles, and drops the old values.
	The sampling code also used to calculate the sample age
	based on the stored values.

	But if a VM hangs for too long, all its samples are eventually
	evicted from the samples cache, so its stats age becomes None,
	which is misinterpred as responsive VM.

	We should keep reporting None when we don't have enough meaningful
	data, but we should also fix the sampling age reporting;
	To do so, we leverage the last recorded vm timestamp.
	This timestamp is needed by the flow, so it is guaranteed to be present.

	This patch leaves two potential races open. We do so because we
	think both are insignificant:

	1. the sampling stats cache is initialized in Vm._domDepedentInit(),
	so if a VM takes too long (> vars.vm_command_timeout, default 60s)
	to get created, it will be reported as unresponsive until the domain
	is ready. This is actually a more correct representation of reality.
	2. if the powerdown flow takes too long (same as #1), again the
	VM will be reported as unresponsive until the domain is completely
	cleaned up. This is also a more thrutful reporting.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1357798
	Continuous-Integration: Jenkins CI

	virt: sampling: add is_empty() method to StatsSample
	One upcoming patch wants to fill the 'stats_age'
	field with meaningful value.
	The problem is that None is misinterpreted by the Vm code,
	so if the stats are too old or missing, the Vm is not
	detected as unresponsive.

	So, the EMPTY_SAMPLE is not good anymore, and this patch
	removes it.
	We still need to know if a given sample is empty, meaning
	it doesn't hold meaningful data, so we add one is_empty()
	method to fulfill this task.

	Another option could be implement __nonzero__, but it
	doesn't completely fit in this case.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1357798
	Continuous-Integration: Jenkins CI

2016-08-02  Edward Haas  <edwardh@redhat.com>

	net: Introduce nameservers (dns) network api
	oVirt is required to preserve and manage the nameservers for the host.

	This patch introduces the api layer through which nameservers may be
	set.
	Nameservers can be set through setupNetworks verb, using the 'nameservers'
	key in the networks sub-verb where the value is a list of nameservers.

	Canonicalization: In case the key is missing, it will be populated with
	the current dns setting (from resolv.conf) for the management network
	(identified by the defaultRoute flag).

	Continuous-Integration: Jenkins CI

2016-08-01  Nir Soffer  <nsoffer@redhat.com>

	mount: Support NFS4 mounts with double slash
	With NFS4, the kernel may present fs_spec using double slashes [1]:

	    noveria.wodel.wd://vmengine

	Instead of the original (normalized) mount path:

	    noveria.wodel.wd:/vmengine

	According to [2], this is unlikely to be fixed in the near future.

	This patch normalizes fs_spec read from /proc/mounts, restoring
	Mount.isMounted() with NFS4.

	[1] http://lists.ovirt.org/pipermail/users/2016-July/041519.html
	[2] http://www.spinics.net/lists/util-linux-ng/msg13079.html

	Reported-By: wodel youchi <wodel.youchi@gmail.com>
	Bug-Url: https://bugzilla.redhat.com/1361182
	Continuous-Integration: Jenkins CI

	fileUtils: Normalize initial double slashes
	POSIX allows both /path and //path. The second slash may be interpreted
	in an implementation-defined manner. The Linux interpretation seems to
	be to ignore the double slash, so it seems to be safe to remove it.

	See https://bugs.python.org/issue26329 for more info.

	Bug-Url: https://bugzilla.redhat.com/1361182
	Continuous-Integration: Jenkins CI

2016-08-01  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster:enforce gluster fencing policies
	Enforce gluster related fencing policies before fencing
	the host.

	1. skipFecingIfGlusterBricksUp
	Fencing should be skipped if any brick is ONLINE in
	the host being fenced.
	2. skipFecingIfGlusterQuorumNotMet
	Fencing should be skipped if any brick is ONLINE
	in the host being fenced and quorum will be lost if the
	brick is brought down.

	Gluster volume info command will be used to get the
	volume details and 'volume status' command will be used
	to get the brick status from fence proxy host.

	Bug-Url: https://bugzilla.redhat.com/1361115
	Continuous-Integration: Jenkins CI

	gluster: introduce vdsm.gluster module
	Introduce vdsm.gluster module and move the
	gluster.exception to gluster module to
	lib/vdsm/gluster.

	Continuous-Integration: Jenkins CI

2016-07-31  Dan Kenigsberg  <danken@redhat.com>

	hook-fcoe: enable lldpad and fceo service on boot
	When the vdsm-hook-fcoe.rpm is installed, we now start lldpad and fcoe
	service on system boot, as fcoe functionality requires them.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1353456
	Continuous-Integration: Jenkins CI

2016-07-31  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix of Executor._active_workers crash on modification
	Executor._active_workers doesn't use a lock when accessing
	self._workers.  This is intentional, since we access self._workers
	read-only, we don't need exact value for some snapshot of the executor
	state and we have no reason to impose locking on the method.

	However, we still must be careful, because we loop over the value.  If
	it gets modified during the loop then

	  RuntimeError: Set changed size during iteration

	is raised.  This patch prevents that error by making a shallow copy of
	self._workers in the loop.

	Continuous-Integration: Jenkins CI

2016-07-31  Francesco Romani  <fromani@redhat.com>

	vm: api: move vm status check into migrate()
	The API layer is guarding against incorrect calls of
	the VM.migrate(). This method should not be called if the
	VM is in WAIT_FOR_LAUNCH or DOWN statuses, two unlikely conditions
	anyway.

	To have this protection, we need to import vmstatus into API.py,
	and we tight the coupling between VM and API.

	Turns out VM.migrate() already partially does the very same safety
	check inside its implementation.
	This patch fully move the check which API used to do inside
	VM.migrate(), to loosen the coupling and improve isolation.

	Continuous-Integration: Jenkins CI

	rngsources: rename APIs for readability
	The rngsources.available_sources() name reads redundant.
	Rename it to rngsources.list_available() to make it nicer.

	Continuous-Integration: Jenkins CI

2016-07-29  Petr Horáček  <phoracek@redhat.com>

	ovs: use Setup class directly
	We will need access to Setup instance in netswitch.py with next
	patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-07-28  Adam Litke  <alitke@redhat.com>

	storage: Move IMAGE_NAMESPACE and VOLUME_NAMESPACE to constants.py
	In addition to moving the related values next to each other, this prevents a
	circular dependency in a future patch which needed to import sd and
	resourceFactories.

	Continuous-Integration: Jenkins CI

2016-07-28  Dan Kenigsberg  <danken@redhat.com>

	Revert "NetworkManager: configure to monitor ifcfg/connection files"
	This reverts commit 57617fe62ac797d02b9a19b216b674d9f4f2c7c3 since
	monitoring connection files is unadvised by NetworkManager. Instead, we
	require an initscript version which notifies NM in case it should no
	longer control a device (rhbz#1345919)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1326798
	Continuous-Integration: Jenkins CI

2016-07-28  Francesco Romani  <fromani@redhat.com>

	yajsonrpc: use proper exception in the recovery
	If recovery takes too long and if we get an API call meantime,
	the yajsonrpc correctly tries to reply with "recovery in progress"
	error.

	The problem is that in this flow - and looks like only in this flow -,
	we raise the JsonRpcError with a response object, not with a proper
	exception object - as the TODO very next to the changed code
	reminds us.

	So, we get

	jsonrpc.Executor/1::ERROR::2016-07-28
	12:52:25,966::executor::290::Executor::(_execute_task) Unhandled
	exception in Task(callable=<functools.partial object at 0x1c71db8>,
	timeout=None)
	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/vdsm/executor.py", line 288, in
	_execute_task
	    task.callable()
	  File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line
	512, in _serveRequest
	    response_log = "failed (error %s)" % (error.code,)
	AttributeError: 'dict' object has no attribute 'code'

	This issue was present since quite some time, but we recently merged
	78bdaa1d6578b6491d77fa9432f555fe05c1c0c2 that exposed it.
	There is no evidence this happens outside the recovery flow, and the
	error is not fatal, the only impact is a nasty stacktrace in the logs
	and an unexpected failure returned to clients.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-07-28  Petr Horáček  <phoracek@redhat.com>

	modprobe: set bonding max_bonds to 0
	When bonding kernel module is loaded, bond0 is implicitly created.
	When we create a bonding during installation of the system in
	Anaconda, it obtains the same name bond0.
	On the following boot, NM fails because of conflict between NM handled
	and implicitly created bond.

	This patch introduces modprobe configuration file for bonding module.
	With `options bonding max_bonds=0` we disable implicit creation of
	bondings.

	Bug-Url: https://bugzilla.redhat.com/1356635
	Continuous-Integration: Jenkins CI

2016-07-27  Edward Haas  <edwardh@redhat.com>

	virt net: Interface default driver name set to 'vhost'
	When following these steps:
	- Create a VM with vnic_profile that has queues custom properties.
	- Start the VM.
	- Hot-unplug the vNIC from the VM.

	An exception occurs:
	libvirtError: unsupported configuration:
	    Unknown interface <driver name=''> has been specified
	    
	Due to a missing default driver name.


	Bug-Url: https://bugzilla.redhat.com/1359520
	Continuous-Integration: Jenkins CI

2016-07-27  Nir Soffer  <nsoffer@redhat.com>

	log: Use INFO log level as default
	The current logs are much too verbose which cause trouble for users, and
	make us look unprofessional. Mature project should not use debug log by
	default.

	To debug issues that are not clear enough using INFO logs, the relevant
	logger level can be modified on a user machine as needed.

	Continuous-Integration: Jenkins CI

2016-07-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding report_stats to virt.stats
	This vmstats function sends metrics to external metrics collector. 
	It parses last sampling values for each vm and build metrics dictionary
	that represent the values and the appropriate keys for each metric.

	Continuous-Integration: Jenkins CI

2016-07-26  Martin Polednik  <mpolednik@redhat.com>

	hostdev: move parent processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move productinfo processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move physfn processing to device processor
	Continuous-Integration: Jenkins CI

2016-07-26  Francesco Romani  <fromani@redhat.com>

	tests: sampling: add FakeClock helper
	Add a more robust FakeClock implementation, to be used
	in a upcoming patch.
	Along the way, this patch also refactors the tests to
	make them clearer.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1357798
	Continuous-Integration: Jenkins CI

	vm: reorder operations in _domDependentInit
	There is no real dependency, so we move up
	the initialization of self._guestEventTime
	to unlock further patches.

	Continuous-Integration: Jenkins CI

2016-07-26  Edward Haas  <edwardh@redhat.com>

	fix vdscli: Replace the default '::' host with hostname
	Fixing the tests for cases where the hostname has '.' or ':' in it.

	Continuous-Integration: Jenkins CI

2016-07-26  Dan Kenigsberg  <danken@redhat.com>

	configure: drop dead constant
	Continuous-Integration: Jenkins CI

	spec: never require openvswitch on ppc
	openvswitch.rpm is not built for el7 on ppc. Never require it there.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-07-26  Edward Haas  <edwardh@redhat.com>

	vdscli: Replace the default '::' host with hostname
	vdscli may fail to connect to the VDSM server when using the default
	configuration settings of vdsm.conf.
	By default, in vdsm.conf, the management host address is set as '::',
	but while the server can fallback and listen on IPv4 addresses if the
	IPv6 stack is unavailable, the client does not, therefore it fails to
	connect to the server.

	This patch adds client logic that replaces a '::' host with the system
	hostname. In turn the hostname will get resolved to the available address.

	Bug-Url: https://bugzilla.redhat.com/1350883
	Continuous-Integration: Jenkins CI

2016-07-25  Edward Haas  <edwardh@redhat.com>

	net: Introduce dhclient state check.
	Introduce dhclient.is_active.
	To be used by caps (next patch) to report dhcp actual state.

	Continuous-Integration: Jenkins CI

2016-07-25  Nir Soffer  <nsoffer@redhat.com>

	betterAsyncore: Log dispatcher on SSL errors
	When SSL error occour, we get these unhelpful errors:

	    SSL error during reading data: unexpected eof

	This patch adds the dispatcher info to these logs:

	    SSL error receiving from <asyncore.dispatcher connected
	    127.0.0.1:53456 at 0x7f461ac856c8>: unexpected eof

	Tested-By: C. Handel <ovirt@macht-blau.org>
	Continuous-Integration: Jenkins CI

2016-07-25  Petr Horáček  <phoracek@redhat.com>

	ovs: pass --disable-openvswitch to vdsm.spec
	In order to not include openvswitch requirement in vdsm-network
	service, we have to set --disable-openvswitch inside vdsm.spec.in
	if with_openvswitch is false.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: create ovs-vsctl command only on demand
	If openvswitch package is not installed, import of ovs modules fails
	because of ovs-vsctl command cannot be created.

	With this patch, the command was moved to memoized function and is
	evaluated only on demand.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-07-25  Idan Shaby  <ishaby@redhat.com>

	blockSD: fix rebase error of commit dd3306d
	A faulty rebase of commit dd3306d accidently removed an exception
	raise when the zeroing failed.
	This patch returns this exception raise.

	Continuous-Integration: Jenkins CI

2016-07-25  Petr Horáček  <phoracek@redhat.com>

	ovs: do not call ovs_info if ovs service is down
	PPC downstream does not require OVS, therefore it is not guaranteed,
	that openvswitch.service is always running. We have to handle such
	cases in network/netswitch.py.

	Calling ovs_net2bridge() when openvswitch service is down leads to:
	(21, 'Executing commands failed: ovs-vsctl:
	unix:/var/run/openvswitch/db.sock: database connection failed (No such
	file or directory)')

	With this patch, we just return None if OVS service is not running.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-07-25  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add back setup log message
	Lost in the refactoring process, although the importance of the message
	itself is debatable, it does provide nice indication of state change
	and consistency between host and network devices.

	The message is only displayed for PCI device as other devices are not
	really detached from the host (they piggyback on detach_detachable's
	capability detection code).

	Continuous-Integration: Jenkins CI

	network: drop usage of logging, use device log instead
	Continuous-Integration: Jenkins CI

	network: use info level logging instead of debug
	Setup and teardown methods modify the device state. The logging level
	for such events should be info.

	Continuous-Integration: Jenkins CI

	hostdev: move iommu processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move vfs processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move storage processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move scsi params processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move udev path processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move driver processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move assignability processing to device processor
	Continuous-Integration: Jenkins CI

	hostdev: move address processing to device processor
	Continuous-Integration: Jenkins CI

2016-07-25  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add docstrings about Executor parameters and behavior
	Continuous-Integration: Jenkins CI

	virt: Limit the number of workers in executor
	In some situations, periodic operations may hang inside executor worker
	threads.  We have observed that in real situations when libvirt calls
	started being blocked due to some bug.  Such situations shouldn't happen
	when everything works correctly, but actually not everything works
	correctly and there are unexpected bugs.  We should try to minimize the
	possible damages.

	The result of the hanging periodic calls is that the number of worker
	threads in the executor grows above all limits.  This is not good.  So
	we limit the maximum number of the worker threads in the executor with
	this patch.

	We set the maximum number of the threads to a value sufficiently high
	for harmless temporary problems.  If the number of the workers is higher
	than that then there is probably a real problem and we should start
	emergency actions, i.e. not spawning further threads in this case.

	Note that a single isolated problem of this kind may block all the
	periodic operations.  We introduce a bit more fine grained approach to
	handle that in a followup patch.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-07-25  Irit Goihman  <igoihman@redhat.com>

	sos report: replace vdscli with jsonrpcvdscli
	vdscli is deprecated and should be replaces with
	jsonrpcvdscli

	Continuous-Integration: Jenkins CI

2016-07-25  Nir Soffer  <nsoffer@redhat.com>

	refmt: Use more standard main() function
	There is no need to make main() private.

	Continuous-Integration: Jenkins CI

	remft: Add online help
	Example:

	    $ contrib/refmt -h
	    usage: refmt [-h] [file [file ...]]

	    Reformat python literals

	    positional arguments:
	      file        Files to reformat, nothing to process stdin

	    optional arguments:
	      -h, --help  show this help message and exit

	Continuous-Integration: Jenkins CI

2016-07-24  Nir Soffer  <nsoffer@redhat.com>

	vdsm: Fix logging about threads during shutdown
	We used to lie about waiting for threads during shutdown:

	    INFO ... VDSM main thread ended. Waiting for 12 other threads...
	    INFO ... <Thread(libvirtEventLoop, started daemon 140267893221120)>
	    INFO ... <Thread(Thread-10, started daemon 140267122325248)>
	    INFO ... <Thread(Thread-3, started daemon 140267659196160)>
	    INFO ... <Listener(VM Channels Listener, started daemon 140266683254528)>
	    INFO ... <Thread(Thread-9, started daemon 140267608839936)>
	    INFO ... <Thread(Thread-8, started daemon 140267617232640)>
	    INFO ... <Thread(Thread-7, started daemon 140267625625344)>
	    INFO ... <Thread(Thread-6, started daemon 140267634018048)>
	    INFO ... <_MainThread(MainThread, started 140268148037440)>
	    INFO ... <Thread(Thread-5, started daemon 140267642410752)>
	    INFO ... <Thread(Thread-1, started daemon 140267884828416)>
	    INFO ... <Thread(Thread-2, started daemon 140267876435712)>
	    INFO ... <Thread(Thread-4, started daemon 140267650803456)>

	Actually, we are calling stop() on the threads implementing this method,
	and we are not waiting for anything. Additionally, the main thread is
	logging about itself.

	Fix the log to say:

	    INFO ... Stopping threads
	    INFO ... Stopping <Listener(VM Channels Listener, started daemon 140127267452672)>
	    DEBUG ... <Thread(libvirtEventLoop, started daemon 140128547632896)> is still running
	    DEBUG ... <Listener(VM Channels Listener, started daemon 140127267452672)> is still running
	    DEBUG ... <Thread(Thread-1, started daemon 140128539240192)> is still running
	    DEBUG ... <Thread(Thread-7, started daemon 140128488883968)> is still running
	    DEBUG ... <Thread(periodic/0, started daemon 140126697010944)> is still running
	    DEBUG ... <Thread(Thread-6, started daemon 140128497276672)> is still running
	    DEBUG ... <Thread(Thread-5, started daemon 140128505669376)> is still running
	    DEBUG ... <Thread(Thread-10, started daemon 140127988864768)> is still running
	    DEBUG ... <Thread(Thread-8, started daemon 140128005650176)> is still running
	    DEBUG ... <Thread(Thread-13, started daemon 140126185318144)> is still running
	    DEBUG ... <Thread(periodic/2, started daemon 140126680225536)> is still running
	    DEBUG ... <Thread(Thread-3, started daemon 140128522454784)> is still running
	    DEBUG ... <Thread(Thread-9, started daemon 140127997257472)> is still running
	    DEBUG ... <Thread(Thread-4, started daemon 140128514062080)> is still running
	    DEBUG ... <Thread(Thread-2, started daemon 140128530847488)> is still running
	    DEBUG ... <Thread(periodic/3, started daemon 140126193710848)> is still running
	    DEBUG ... <Thread(periodic/1, started daemon 140126688618240)> is still running
	    INFO ... Exiting

	Continuous-Integration: Jenkins CI

2016-07-24  Petr Horáček  <phoracek@redhat.com>

	Revert "net tests: Support the ability to choose the tested switch"
	This reverts commit 857325194970e6ad0d97eba2cfd58359962dc176.

	VDSM_TEST_SWITCH_TYPE is not needed anymore, ovs/legacy permutations
	were removed.

	Continuous-Integration: Jenkins CI

	net func tests: drop ovs/legacy permutation
	OVS tests are now covered in new functional tests
	tests/network/func_*_test.py.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-07-21  Nir Soffer  <nsoffer@redhat.com>

	tests: Enable tests watcher only if TIMEOUT set
	When running tests locally we don't need the watcher; if tests get
	stuck, we can attach to the process with gdb manually.

	To use the watcher locally, set TIMEOUT:

	    TIMEOUT=600 ./run_tests_local.sh foobar_test.py

	Continuous-Integration: Jenkins CI

	tests: Add test for testing the timeout mechanism
	When running normally, the test will always pass.

	To simulate stuck tests:

	    TIMEOUT=2 STUCK=3 ./run_test_local.sh testlibTests.py; echo $?

	To simulate slow tests:

	    TIMEOUT=3 STUCK=2 ./run_test_local.sh testlibTests.py; echo $?

	To simulate failing tests:

	    FAIL=1 ./run_test_local.sh testlibTests.py; echo $?

	Continuous-Integration: Jenkins CI

	tests: Terminate watcher when tests fail
	When the tests fail, the watcher process was not terminated. It would
	continue to run for 300 seconds in the background, and then try to kill
	the runner process, possibly killing unwanted process.

	This happens only when running tests locally; on the CI the watcher was
	terminated by chroot.

	Continuous-Integration: Jenkins CI

2016-07-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using lago fc23 repo until fc24 will be available
	Continuous-Integration: Jenkins CI

	Use deathSignal param only if exists
	This allows to run py3 code that doesn't use deathSinal. otherwise each
	call to CPopen adds deathSignal parameter and which does not exists in
	Popen.

	Continuous-Integration: Jenkins CI

	Add createrepo requirement to fc24 ci packages
	check-merged job fails to run over fc24 due to missing requirement

	Continuous-Integration: Jenkins CI

2016-07-21  Irit Goihman  <igoihman@redhat.com>

	sos report: _importVdsmPylibModule can import all vdsm modules
	sos report cannot import modules directly from vdsm package because
	the plugin name is vdsm.
	The current hack in the module fails to import other vdsm modules
	and complaining about 'relative import in non-package'.
	imp.load_modules needs full name of module with its parent packages
	in order to import modules relative to the module.
	Also, all packages of submodules must be found and imported in order to
	load the submodules.

	Continuous-Integration: Jenkins CI

2016-07-21  Martin Polednik  <mpolednik@redhat.com>

	hostdev: properly teardown on hotunplug
	The device teardown mechanism is not explicitly invoked in hotunplug
	routines - meaning that the devices are not properly cleaned up.
	We add it to hostdev hotunplug to make sure that there are no loose
	udev files as they previously were left orphaned.

	Continuous-Integration: Jenkins CI

	hostdev: properly detect attached scsi devices
	SCSI device is addressed by two fields: adapter, meaning the HBA
	(scsi_host) and address on the adapter (bus, unit, target).

	We tweak is_attached_to method to accurately address the device meant
	for hotunplug by taking both fields into consideration and making sure
	that no identical device is present.

	This fixes scenario, where multiple LUNs exist on multiple adapters but
	at the same address. In that case, hotplug would timeout even though it
	succeeded.

	Continuous-Integration: Jenkins CI

	hostdev: use proper scsi address
	SCSI device requires different address than what we call host address,
	as host address also contains adapter information. Previously, we have
	split these two addresses, calling the relevant one bus address.

	We modify is_attached_to method of SCSI devices to use the correct
	address, leading to the state of device actually being checked (as it
	wouldn't previously match any device).

	The implication is that the hotunplug is slightly safer for SCSI host
	devices.

	Continuous-Integration: Jenkins CI

	hostdev: improve robustness of libvirt SCSI access
	SCSI host device is specific as it's identified by address and adapter.
	Previously, we only cared about address which is good enough in most
	of the cases except hotplug and hotunplug.

	Since we can now work inside the device class without having to deal
	with other devices, we can add adapter matching and correctly handle
	the address.

	The change implies removal of mutation in scsi_address_to_adapter. That
	is intentional and should be done as a single patch, as trying to
	separate is unsafe.

	Continuous-Integration: Jenkins CI

	hostdev: use specific device classes in HostDevice
	The device functionality has been split into separate classes. As all
	functionality is now present, we can remove it from HostDevice class.
	This class can be reused as a factory.

	Rationale of using __new__:
	vm.py initializes devices through

	def _devMapFromDevSpecMap(self, dev_spec_map):
	    ...
	    dev_map[dev_type].append(dev_class(self.conf, self.log, **dev))

	To avoid creating special case in the code, we replace HostDevice by
	appropriate device class.

	Continuous-Integration: Jenkins CI

	hostdev: move scsi device code to separate class
	We continue the effort of splitting the host device logic to multiple
	classes with SCSI device. Same commit message for reference:

	At present, we use a single class to contain all three host devices -
	PCI, USB and SCSI. Although they look mostly the same at first, there
	are many hidden differences between the devices. The differences range
	from simple XML inconsistency to a critical driver specific requirements.

	The patch itself does not improve the code, possibly makes it worse by
	itself because it only extracts SCSI device related code to standalone
	class but does not use the class anywhere. Idea behind this approach is
	that we can safely isolate device code for each device without breaking
	the generic hostdev code we have now.

	When the devices are separated, we can dynamically create appropriate
	class from HostDevice "factory". The end result is slight code
	duplication (not really avoidable in devices) but extreme readability
	improvement.

	Examples of device differences:
	* different padding and base in libvirt addressing for PCI and USB,
	 SCSI,
	* no guest address for USB devices is generated by libvirt,
	* SCSI is addressed by it's source address and adapter, as opposed to
	 source address only in PCI and USB[1],
	* PCI devices should not be reattached, other devices should[2],
	* XML itself.

	[1] Implies unfortunate bug that SCSI host devices can't be hot-plugged.
	[2] This is true only because reattach, in it's current version, does
	more then just reattach the device. It modifies the permissions on the
	udev device by creating udev rule. The rule should be removed. The
	removal process must be split from reattach call.

	Continuous-Integration: Jenkins CI

	hostdev: move usb device code to separate class
	We continue the effort of splitting the host device logic to multiple
	classes with USB device. Same commit message for reference:

	At present, we use a single class to contain all three host devices -
	PCI, USB and SCSI. Although they look mostly the same at first, there
	are many hidden differences between the devices. The differences range
	from simple XML inconsistency to a critical driver specific requirements.

	When the devices are separated, we can dynamically create appropriate
	class from HostDevice "factory". The end result is slight code
	duplication (not really avoidable in devices) but extreme readability
	improvement.

	Examples of device differences:
	* different padding and base in libvirt addressing for PCI and USB,
	 SCSI,
	* no guest address for USB devices is generated by libvirt,
	* SCSI is addressed by it's source address and adapter, as opposed to
	 source address only in PCI and USB[1],
	* PCI devices should not be reattached, other devices should[2],
	* XML itself.

	[1] Implies unfortunate bug that SCSI host devices can't be hot-plugged.
	[2] This is true only because reattach, in it's current version, does
	more then just reattach the device. It modifies the permissions on the
	udev device by creating udev rule. The rule should be removed. The
	removal process must be split from reattach call.

	Continuous-Integration: Jenkins CI

	hostdev: move pci device code to separate class
	At present, we use a single class to contain all three host devices -
	PCI, USB and SCSI. Although they look mostly the same at first, there
	are multiple hidden differences between the devices. The differences range
	from simple XML inconsistency to a critical driver specific requirements.

	The patch itself does not improve the code, possibly makes it worse by
	itself because it only extracts PCI device related code to standalone
	class but, does not use the class anywhere. Idea behind this approach is
	that we can safely isolate device code for each device without breaking
	the generic hostdev code we have now.

	When the devices are separated, we can dynamically create appropriate
	class from HostDevice "factory". The end result is slight code
	duplication (not really avoidable in devices) but extreme readability
	improvement.

	Examples of device differences:
	* different padding and base in libvirt addressing for PCI and USB,
	 SCSI,
	* no guest address for USB devices is generated by libvirt,
	* SCSI is addressed by it's source address and adapter, as opposed to
	 source address only in PCI and USB[1],
	* PCI devices should not be reattached, other devices should[2],
	* XML itself.

	[1] Implies unfortunate bug that SCSI host devices can't be hot-plugged.
	[2] This is true only because reattach, in it's current version, does
	more then just reattach the device. It modifies the permissions on the
	udev device by creating udev rule.

	Continuous-Integration: Jenkins CI

	hostdev: cleanup udev files after PCI host devices
	We have stopped reattaching PCI devices due to possible driver issues.
	Due to the way code is structured, that also caused
	udev device files not being removed.

	These rule files will only trigger if the device is already detached,
	meaning that there shouldn't be an issue with leftover files,
	but there is no reason to keep them on the host after VM has stopped
	running.

	This patch decouples removal of the file from device reattachment.

	Continuous-Integration: Jenkins CI

	network/sr-iov: use device teardown to reattach device
	We have created a new mechanism for properly tearing down a device.
	Since we would like decouple udev handling from driver handling in
	host device code, this new mechanism is used instead of direct device
	reattaching.

	Continuous-Integration: Jenkins CI

2016-07-20  Idan Shaby  <ishaby@redhat.com>

	storage: add getDeviceList discard related fields
	This patch adds getDeviceList two discard related fields:
	1. discard_max_bytes - the device supports discard if this property is
	   bigger than 0.
	2. discard_zeroes_data - 1 means that the device deterministically
	   returns zeroes when a discarded area is read. 0 means that the
	   result of reading a discarded area is undefined (can be stale or
	   random data).

	For more information, please refer to
	https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt.

	Bug-Url: https://bugzilla.redhat.com/1241106
	Bug-Url: https://bugzilla.redhat.com/1342919
	Continuous-Integration: Jenkins CI

	multipath: add the read_int helper function
	This patch adds a new function that reads the first line of a file noted
	by the given path and returns it as an int.
	It's useful for getting different device attributes from
	/sys/block/<dm_device>/queue/.

	Continuous-Integration: Jenkins CI

2016-07-20  Adam Litke  <alitke@redhat.com>

	Implement SDM.copy_data
	Add tests and implementation of SDM.copy_data.  This is a work in
	progress with TODO items noted in code.  In particular we are doing no vdsm side locking until we determine the best way to proceed.

	Continuous-Integration: Jenkins CI

	storagetestlib: qemu chain verification
	Add utilities for:
	 - creating a volume chain with properly initialized qcow2 headers
	 - Writing a poisoned pattern to each layer of the chain
	 - Verifying the correctness of the chain by reading through the leaf volume

	Continuous-Integration: Jenkins CI

2016-07-20  Idan Shaby  <ishaby@redhat.com>

	multipath: add a constant for the queue subpath
	Continuous-Integration: Jenkins CI

	multipath: add a constant for /sys/block
	Continuous-Integration: Jenkins CI

2016-07-20  Francesco Romani  <fromani@redhat.com>

	virt: drop legacy device config support
	Drop the legacy Vm methods to rebuild specific device configuration
	from the generic Vm configuration.

	Continuous-Integration: Jenkins CI

	vm: graphics: drop legacy graphics config support
	Drop the legacy Vm methods to rebuild specific graphics configuration
	from the generic Vm configuration.

	Continuous-Integration: Jenkins CI

2016-07-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	fix flag in contrib script
	Continuous-Integration: Jenkins CI

2016-07-20  Allon Mureinik  <amureini@redhat.com>

	spec: Clean up fedora >= 23 conditions
	As Fedora 22 is End of Life [1], any Fedora we support would be 23 or
	newer, so there's no reason to explicitly check for the version - it
	does nothing but adding bloat to the spec file.

	[1] https://fedoraproject.org/wiki/End_of_life

	Continuous-Integration: Jenkins CI

2016-07-20  Martin Polednik  <mpolednik@redhat.com>

	hostdev: prepare addition of per device processing
	We presently have one large function _process_device_params that
	handles multiple device classes (pci, scsi, usb_device, storage comes
	to mind).

	Problem with this approach is that it's difficult to work with and
	requires additional error handling or per-device checks. Any new device
	information will only further complicate the code.

	The idea of new approach is to use decorator to create "processors"
	for specific device type, register them and eventually just run these
	instead of generic code.

	The main benefit is that the code will eventually be split into small
	blocks that handle very specific device processing logic, that are tied
	just to the specific device type, avoiding bunch of if's everywhere.

	Continuous-Integration: Jenkins CI

	hostdev: s/parse/process
	Hostdev library module uses term parse throughout it's libvirt XML
	processing code. As previous sentence implies, parse term is not
	correct in this context.

	This patch does 2 naming modifications:
	* parse -> process
	* parser -> processor

	This leads to slightly more understandable code.

	Continuous-Integration: Jenkins CI

2016-07-20  Allon Mureinik  <amureini@redhat.com>

	spec: Remove Fedora 22 libvirt requirement
	As Fedora 22 is End of Life [1], there no longer a need to explicitly
	handle requirements for it.

	[1] https://fedoraproject.org/wiki/End_of_life

	Continuous-Integration: Jenkins CI

2016-07-19  Milan Zamazal  <mzamazal@redhat.com>

	doc: Typo fixes and other doc improvements in periodic.py
	This is a documentation only change to fix some typos, inconsistencies
	and other errors in comments and docstrings.

	Continuous-Integration: Jenkins CI

2016-07-19  Adam Litke  <alitke@redhat.com>

	storagetestlib: Add fake_env() helper
	Permutated tests would like to test 'file' and 'block' environments.  Add a
	helper to make it easy for tests to produce both environments while displaying
	user-friendly test output.

	Continuous-Integration: Jenkins CI

	storagetestlib: Allow creating multiple block volumes in an image
	Due to an unchecked directory creation, we could not create multiple block
	volumes in the same image.  Check if the image dir exists before creating it.

	Continuous-Integration: Jenkins CI

2016-07-19  Nir Soffer  <nsoffer@redhat.com>

	oop: Explicitly close running ioprocesses
	IOProcess client is using __del__ for automatic closing when the last
	reference to the client disappears. This attempt fail consistency when
	__del__ is called during shutdown, since Python is partly tore down.

	In the worst cases, the entire application will get stuck during
	shutdown. We see this randomly when running the tests in the CI.
	Looking in backtraces, all the threads are blocked trying to acquire a
	lock that may have been already destroyed.

	This patch avoid this issue by explicitly closing all running
	ioprocesses during application shutdown and when cleaning up after
	storage tests. This ensure that IOProcess's close() and __del__() are
	running in a well defined environment.

	Bug-Url: https://bugzilla.redhat.com/1334274
	Continuous-Integration: Jenkins CI

	storagetestlib: Simplify qemu_pattern helpers
	We don't need to pass a string but a number in the range 0-255. Change
	the code to fail if passing other type but a number.

	Accepting a number will simplify the tests using custom patterns, using
	code like:

	    for i, _ in enumerate(volumes):
	        qemu_pattern_write(path, img_format, pattern=0xf0 + i)

	Continuous-Integration: Jenkins CI

2016-07-19  Francesco Romani  <fromani@redhat.com>

	tests: re-add missing import
	A bad rebase made a needed import disappear.
	So test started to fail.
	This patch re-introduces it, unbreaking the tests.

	Continuous-Integration: Jenkins CI

2016-07-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove deathSignal usages in sync execCmd calls
	Once moving to systemd, when vdsm dies all subprocesses will be
	signaled.

	Continuous-Integration: Jenkins CI

2016-07-19  Milan Zamazal  <mzamazal@redhat.com>

	tox: Exclude .ropeproject from pep8 check
	pep8 breaks on files in .ropeproject, created by Python rope tools.
	Let's exclude that directory in the pep8 call.

	Continuous-Integration: Jenkins CI

2016-07-19  Irit Goihman  <igoihman@redhat.com>

	tox: fail make process if required tox version isn't installed.
	Over RHEL 7.2 yum contains only tox-1.4.2 which doesn't fit to vdsm
	requirements.
	We require to install tox with pip currently.

	This patch validates tox and its version and fails the make process if tox
	is older than 2.1.1

	tox check was removed from configure.ac and now it's existence will be
	checked only during the build process.

	Continuous-Integration: Jenkins CI

2016-07-19  Francesco Romani  <fromani@redhat.com>

	vm: network: drop legacy network config support
	Drop the legacy Vm methods to rebuild specific network configuration
	from the generic Vm configuration.

	Continuous-Integration: Jenkins CI

	vm: storage: drop legacy drive config support
	Drop the legacy Vm methods to rebuild specific drive configuration
	from the generic Vm configuration.

	Continuous-Integration: Jenkins CI

	vm: always expect Vm devices to be sent
	Ancient (< 3.6) Engines used to send the device configuration data
	scatthered into the Vm.conf.
	Engine 3.5 started to send device configuration as array in the 'devices'
	field, and Engine 3.6 completed the switch.

	To keep backward compatibility, Vdsm kept fallback code to
	rebuild the `devices` data from Vm.conf, adding its guesswork when data
	was lacking.

	We can now drop this backward compatibility.
	We start dropping the fallback code in the Vm device configuration.
	Later patches will kill the Vm methods that rebuilt the device-specific
	configuration data from the generic Vm.conf.

	Continuous-Integration: Jenkins CI

	vm: graphics: drop legacy configuration support
	We no longer need compatibility with ancient Engines (< 3.6).

	Continuous-Integration: Jenkins CI

2016-07-19  Dan Kenigsberg  <danken@redhat.com>

	drop painfully ancient vmConf examples
	These examples are sorely out of date. tests/functional/virtTests.py
	maybe be more helpful as a reference of how to start a VM.

	Continuous-Integration: Jenkins CI

2016-07-19  Francesco Romani  <fromani@redhat.com>

	vm: graphics: report display info from device
	We used to keep the first graphic device information in Vm.conf,
	to keep backward compatibility with ancient (< 3.6) Engines.

	But now we are allowed to break it, hence we will get rid
	of the duplicated data in Vm.conf.
	But the API schema still require Vdsm to provide this information
	in the stats output.

	So, this patch makes the code fetch the needed info from the device
	info, no longer from the generic Vm.conf.

	Continuous-Integration: Jenkins CI

	vm: split vcpu settings from domDependentInit
	Move into helper to modularize the Vm._domDependentInit()
	method, with no intended change on behaviour

	Continuous-Integration: Jenkins CI

	vm: reorder sampling initialization
	The sampling subsystem initialization is actually independent
	with respect to all the other dom dependent initialization we
	do, so it could be moved.

	We do so to allow further refactoring in the upcoming patches.

	Continuous-Integration: Jenkins CI

2016-07-19  Milan Zamazal  <mzamazal@redhat.com>

	tests: Set vars/ssl to true in graphics tests
	In 8a7479c, support for graphics defaultMode was added and
	defaultMode="secure" is now expected in test outputs.  However this is
	only present when vars/ssl configuration option is set to true.  We must
	ensure this is so by monkey patching the corresponding graphics tests.
	Otherwise the configuration value from /etc/vdsm/vdsm.conf (if present)
	is apparently used and the tests may fail if the value is false.

	Continuous-Integration: Jenkins CI

2016-07-19  Tomas Jelinek  <tjelinek@redhat.com>

	migration: wait properly for migration to begin
	If the time it takes the migration to begin is longer than the
	MIGRATION_MONITOR_INTERVAL (may happen due to networking issues), the first
	call to Progress.from_job_stats(self._vm._dom.jobStats()) leads to an exception
	because the stats don't contain the statistics yet. This situation causes the
	monitor thread to die (even though the migration will continue and eventually
	pass).

	Fixed by:
	- making sure the from_job_stats() will be called only if the migration is
	  ongoing
	- adding a check which makes sure that the monitor thread will be executing its
	  logic only if the migration is ongoing

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1354344
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-07-19  Martin Polednik  <mpolednik@redhat.com>

	network/sr-iov: fix ambiguous log message
	The log message for detached device used self.device, which, in case of
	network device, is just "hostdev". We should show self.hostdev
	attribute where the libvirt name of the device is stored.

	Continuous-Integration: Jenkins CI

	network/sr-iov: use setup in hotplug routine
	Setup is new preferred way of setting up a device. Network used code in
	hotplugNic method to handle detaching of the device, it's more future
	proof to use the setup method.

	Continuous-Integration: Jenkins CI

2016-07-19  Dan Kenigsberg  <danken@redhat.com>

	openstacknet hook: include after_vm_start hook in rpm
	commit a655be4 excluded an important piece of the code from the
	distribution.

	Bug-Url: https://bugzilla.redhat.com/1314371
	Continuous-Integration: Jenkins CI

2016-07-18  Allon Mureinik  <amureini@redhat.com>

	spec: Require qemu-kvm-ev to fix aio_bh_poll hang
	This qemu-kvm-ev build fixes a hang experienced during live merge
	(original reported in the Related-To BZ, and since cloned several
	times to the various platforms/releases).

	This patch bumps vdsm's requirement for qemu-kvm-ev to deliver this
	fix and ensure oVirt users get the smoothest experience when live
	merging a snapshot.

	Although the issue technically just requires bumping the qemu-kvm-ev
	requirement, the qemu-img-ev requirement was bumped together with it,
	in order to preserve consistency and avoid mixing versions by mistake.

	Related-To: https://bugzilla.redhat.com/1319400
	Bug-Url: https://bugzilla.redhat.com/1349529
	Continuous-Integration: Jenkins CI

2016-07-18  Edward Haas  <edwardh@redhat.com>

	virt net: Change graphics type from network to address
	This patch changes the graphics listen type of VM/s from a libvirt
	network name to an address for OVS based display networks.

	OVS integration has avoided the use of libvirt network entities, for
	simplicitly and as part of a general effort to eliminate VDSM networking
	libvirt dependency.
	With this patch, a VM graphics may be assign to an OVS based host network.

	NOTE: This patch must be merged with the libvirt hook patch.
	(id: Ie7d32f9605f9ca99d1e070621)

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-07-18  Irit Goihman  <igoihman@redhat.com>

	jsonrpcvdscli: added getAllTasksInfo verb
	getAllTasksInfo verb is needed by sos report

	Continuous-Integration: Jenkins CI

	sos report: removed call to vdsClient getVGList
	getVGList has been deprecated in patch 
	https://gerrit.ovirt.org/#/c/48998/ and will be fully removed in the
	future, so the call to it is useless

	Continuous-Integration: Jenkins CI

	vdscli: added DeprecationWarning to module
	vdscli is deprecated and will be replaced soon by jsonrpccli.
	since we want to eliminate the calls to vdscli module a
	DeprecationWarning will be issued once this module will be
	imported.

	Continuous-Integration: Jenkins CI

2016-07-17  Allon Mureinik  <amureini@redhat.com>

	spec: Require python-ioprocess-0.16.1-1
	ioprocess-0.16.1-1 solves a bug where ioprocess keeps a file open
	after truncating or touching it (see the Related-To bug).

	Vdsm requires ioprocess via the noarch package python-ioprocess, and
	this patch bumps the requirement to include a fix for the
	aforementioned issue.

	Related-To: https://bugzilla.redhat.com/1339777
	Bug-Url: https://bugzilla.redhat.com/1339780
	Continuous-Integration: Jenkins CI

2016-07-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding python-setuptools to required ci packages
	Over f24 we started to see the following error about missing
	easy_install. in el7 we require python-setuptools and in fedora we 
	assumed it exists by default. from f24 it doesn't. this patchs adds
	it as requirement

	10:39:29 ##########################################################
	10:39:29 ##! ERROR vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	10:39:29 ##! Last 20 log enties: logs/mocker-fedora-24-x86_64.fc24.check-patch.sh/check-patch.sh.log
	10:39:29 ##!
	10:39:29 ========== Running the shellscript automation/check-patch.sh
	10:39:29 + easy_install pip
	10:39:29 ./automation/check-patch.sh: line 7: easy_install: command not found
	10:39:29 Took 0 seconds
	10:39:29 ===================================
	10:39:29 ##!
	10:39:29 ##! ERROR ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	10:39:29 ##!########################################################
	10:39:29 ##########################################################
	10:39:29 Build step 'Execute shell' marked build as failure

	Continuous-Integration: Jenkins CI

2016-07-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Modify reports to metrics
	Reports is more about the output graphs. The idea behind this module is
	to send metrics information. This patch changes the name. The config
	section in vdsm.conf is changed to [metrics].
	Reports can be misleading.

	Continuous-Integration: Jenkins CI

2016-07-16  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: move master to fc24
	Continuous-Integration: Jenkins CI

2016-07-14  Adam Litke  <alitke@redhat.com>

	qemuimg: Move wait_for_completion inside QemuImgOperation
	The Image class implemented logic to wait for a QemuImgOperation to
	complete.  This same logic is useful to SDM.copy_data and should be
	shared.  Move it inside QemuImgOperation and hide the old wait function
	which no longer needs to be public (renamed to _poll).

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-07-14  Francesco Romani  <fromani@redhat.com>

	schema: fix VM.create parameters
	Fix the parameters of this verb to match what Engine 4.0.0 actually sends.

	Continuous-Integration: Jenkins CI

	contrib: add simple tool to prettify python dumps
	We often need to feed log dumps into tests, like
	API logs.
	Python doesn't care about formatting, but us humans do.

	Add a simple tool to reformat the dumps into something
	human-readable.

	Continuous-Integration: Jenkins CI

2016-07-14  Adam Litke  <alitke@redhat.com>

	tests: Introduce qemu-io pattern verification utils
	qemu-io is a utility that is useful for testing all supported qemu-img
	formats.  This patch introduces pattern verification utilities which can
	write a pattern byte into an image and verify that the pattern can be
	read again.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	tests: Add make_volume to FakeEnv
	The storagetestlib module has fake_block_env and fake_file_env for
	creating fake environments and make_block_volume and make_file_volume
	for creating fake volumes within those fake environments.

	In order to simplify permutated tests that test both environment types,
	add a make_volume member to the FakeEnv object that can be called with
	the same parameters in the block and file cases.

	Continuous-Integration: Jenkins CI

	Define the SDM.copy_data API
	Continuous-Integration: Jenkins CI

2016-07-13  Francesco Romani  <fromani@redhat.com>

	vmxml: move metadata handling into helpers
	to make room for future users of the `metadata' section,
	we split the handler method in submethods.

	Continuous-Integration: Jenkins CI

2016-07-12  Adam Litke  <alitke@redhat.com>

	tests: Add tmpdir and sdcache to FakeEnv
	Some tests may need to perform additional MonkeyPatching using the
	tmpdir and FakeStorageDomainCache objects that are made by
	fake_file_env and fake_block_env.  Add these items to the FakeEnv class
	so they can be used directly by tests.

	Continuous-Integration: Jenkins CI

2016-07-12  Francesco Romani  <fromani@redhat.com>

	tests: add helper to read test data
	Many tests need to read external data,
	like VM configuration, or API dumps,
	from a subpath under tests/

	Add a generic helper to do this task.
	Future patches will move all the tests
	to use this helper, reducing unneeded
	code duplication.

	Continuous-Integration: Jenkins CI

2016-07-12  Nir Soffer  <nsoffer@redhat.com>

	sdc: Safer way to access storage domain manifest
	New spm-less code must never access StorageDomain, as it has unsafe
	methods that cannot be used in spm-less mode. We were using
	StorageDomainCache.produce() to get a storage domain, and then get the
	StorageDomainManifest object. Now we can get the manifest object
	directly using StorageDomainCache.produce_manifest().

	Continuous-Integration: Jenkins CI

2016-07-12  Francesco Romani  <fromani@redhat.com>

	vmxml: metadata could be local variable
	There is no need for `metadata' to be an instance variable,
	so this patch makes it a method local variable.
	No intended change in behaviour.

	Continuous-Integration: Jenkins CI

2016-07-11  Nir Soffer  <nsoffer@redhat.com>

	properties: Add properties module
	Properties are reusable objects similar to builtin property() function,
	adding input validation and initialization guarantees.

	Examples

	    class Foo(properties.Owner):

	        uuid = properties.UUID(required=True)
	        format = properties.Enum(values=("cow", "raw"), required=True)
	        size = properties.Integer(minval=0)
	        name = properties.String()

	        def __init__(self, uuid, format, size=0):
	            self.uuid = uuid
	            self.format = format
	            self.size = size

	Creating an object with invalid properties or with uninitialized
	required properties would raise:

	    Foo("not-a-uuid", "raw")
	    Foo("49d8842d-43e8-4c33-b588-b5538df4ed8a", "invalid format")
	    Foo("49d8842d-43e8-4c33-b588-b5538df4ed8a", "raw", size=-1)

	Attempting to set invalid value would raise:

	    foo = Foo("49d8842d-43e8-4c33-b588-b5538df4ed8a", "raw")
	    foo.size = -1  # Raises ValueError

	Accessing uninitialized properties does not raise AttributeError.
	Instead, the default value is returned:

	    foo.name  # None

	Continuous-Integration: Jenkins CI

2016-07-11  Adam Litke  <alitke@redhat.com>

	tests: fix make_block_volume size units
	The utility function make_block_volume takes size in bytes.
	Unfortunately we were not converting the value properly for LVM (which
	accepts MB) and the volume metadata (which takes sectors).

	Further, LVM rounds volume sizes to VG extent granularity (128M).  But
	this detail shouldn't really be known to make_block_volume.  Instead, it
	should pass a value in MB to lvm and then check what size was actually
	created before proceeding with the metadata creation.

	Continuous-Integration: Jenkins CI

2016-07-11  Liron Aravot  <laravot@redhat.com>

	sp: try lock when executing user initated pool upgrade
	When attempting to execute upgradeStoragePool a concurrent
	update on one of the pool domains may be during execution and hold
	the pool upgrade lock.
	In that case, the request to acquire the lock will wait for the lock
	to be released which may cause the request to take longer then 3 minutes
	and cause to engine failover.

	When attempting to upgrade we should attempt to acquire the lock without
	wait (try to lock) and if we fail return error immediately, that scenario
	is rare and if it happens the user can simply try again.

	Bug-Url: https://bugzilla.redhat.com/1260428
	Continuous-Integration: Jenkins CI

	sp: allow executing upgradePool even if there is a pending update
	Currently when a pool upgrade is initated (either by startSpm() or by
	executing upgradePool() explicitly) the _domainsToUpgrade member of the
	storage pool is initiated with the active domains, when each domain
	upgrade is completed (or if the upgrade is unneeded) its id is removed
	from that list.

	When there is an unavailable domain, it'll remain on that list until its
	update is complete - while it's unavailable other upgrade can't be
	executed.
	This patch changes that, we should allow upgrading the pool even if an
	older upgrade wasn't complete yet - the domains that the old update
	wasn't completed yet for will be upgraded to the new version.

	Bug-Url: https://bugzilla.redhat.com/1260428
	Continuous-Integration: Jenkins CI

2016-07-10  Petr Horáček  <phoracek@redhat.com>

	net: call address.flush explicitly after dhclient.kill
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs hook: fix dhclient imports
	Continuous-Integration: Jenkins CI

	net: add address.flush family argument
	Add family argument to address.flush to be able to flush just
	IP addresses of definied family.

	This will be needed in a following dhclient patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	qos: fix invalid dictionary iteration
	`for x, y in dictionary` is not valid dictionary iteration. This bug
	was here for some time, but unexposed.

	Continuous-Integration: Jenkins CI

2016-07-07  Ramesh Nachimuthu  <rnachimu@redhat.com>

	api: fixing default value for GlusterHost.createBrick
	Change default value for raidParamas to an empty dict in
	string format.

	Bug-Url: https://bugzilla.redhat.com/1352656
	Continuous-Integration: Jenkins CI

2016-07-07  Sahina Bose  <sabose@redhat.com>

	build: enable vdsm-gluster build
	and pull in gluster client packages except on ppc

	Bug-Url: https://bugzilla.redhat.com/1225728
	Continuous-Integration: Jenkins CI

2016-07-07  Nir Soffer  <nsoffer@redhat.com>

	image: Add timing for copy volume operations
	Report the time for each volume copy operation:

	    ...::vds.stopwatch::.. Copy volume xxxyyyzzz: 123.45 seconds

	When copying an image with multiple volumes we will see one line for
	each volume.

	These logs should help to diagnose issues with slow storage.

	Continuous-Integration: Jenkins CI

2016-07-06  Adam Litke  <alitke@redhat.com>

	verify_untrusted_volume: Only allow compat designated by config
	Currently each host sets which qemuimg compat level is allowed.  Use
	this setting also during volume verification until 0.10 and 1.1 can be
	supported at the same time.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1344289
	Continuous-Integration: Jenkins CI

2016-07-06  Allon Mureinik  <amureini@redhat.com>

	Revert "spbackends: Remove StoragePoolDiskBackend"
	This reverts commit 6049cecd583997c34f98c78cbe318f0476315ff3.
	That commit did not not properly handle creating new storage pools, and
	needs to be reverted.

	Continuous-Integration: Jenkins CI

2016-07-05  Allon Mureinik  <amureini@redhat.com>

	spbackends: Remove StoragePoolDiskBackend
	As VDSM no longer supports 3.4 clusters (see commit 23650fb), there's no
	longer any use for the StoragePoolDiskBackend. This commit removes it
	completely from the codebase, as its dead code.

	Continuous-Integration: Jenkins CI

	sp.py: Assume a hostId when reconstructing master
	As we no longer support V1/V2 data domains, we can assume a hostId is
	present in any potential new master.

	This requirement should be present throughout the API, making all the
	positional arguments in hsm.py's reconstructMaster up to, and
	including, hostId argument mandatory.

	Continuous-Integration: Jenkins CI

2016-07-05  Irit Goihman  <igoihman@redhat.com>

	infra: moved infra package from lib/vdsm/infra to lib/vdsm/common
	infra package was under lib/vdsm/infra with a few sub packages.
	every package was converted to module and replaced under lib/vdsm/common
	vdsm-infra package was also removed from vdsm.spec.in and marked as
	obsolete as it was redundant and there is no use for it right now.

	Continuous-Integration: Jenkins CI

2016-07-05  Adam Litke  <alitke@redhat.com>

	verify_untrusted_volume: Check compatibility version
	When importing a volume using imaged, QCOW2 volumes with an unsupported
	compatibility version should be rejected.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1344289
	Continuous-Integration: Jenkins CI

	qemuimg: Introduce supports_compat helper
	To enable checking if a qcow2 image has a supported compatibility level,
	add a simple utility function to qemuimg.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1344289
	Continuous-Integration: Jenkins CI

2016-07-05  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Unbreak qmemuimg.check
	Since commit 3e7a11954582 (qemuimg: Use --output json for 'check' and
	'info') qemuimg.check is broken, but the tests are passing. This is
	caused by unneeded mocking.

	qemuimg.check fails now with this error:

	      File "/usr/lib/python2.7/site-packages/vdsm/qemuimg.py", line 309, in _parse_qemuimg_json
		obj = json.loads(output)
	      File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
		return _default_decoder.decode(s)
	      File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
		obj, end = self.raw_decode(s, idx=_w(s, 0).end())
	    TypeError: expected string or buffer

	Replace the harmful mocking with running qemuimg.check with a real
	image, and add the missing raw=True to get a string from the command.

	Continuous-Integration: Jenkins CI

2016-07-04  Nir Soffer  <nsoffer@redhat.com>

	automation: Increase timeout for make check
	CI slaves are sometimes very slow. Increase the timeout to 600 seconds
	to make it less likely to time out.

	Continuous-Integration: Jenkins CI

2016-07-04  Edward Haas  <edwardh@redhat.com>

	net test: Use fake netlink data for testGetDeviceByIP
	Continuous-Integration: Jenkins CI

	test: Introduce mock module for testing
	Mock is part of py3 std lib (under unittest package) with enhanced
	functionality to support mocking in tests.
	For py2, the python-mock package is used.

	This reverts commit 8d36d28fbf16407601ace73e97fef19f114553ad

	Continuous-Integration: Jenkins CI

2016-07-04  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Ensure uncaught exceptions on disconnect events are caught
	Previously we did not catch unhandled exceptions and they
	were not logged either which made it pretty difficult to
	actually detect any existing issue in the first place.

	This patch ensures that future unhandled exceptions are
	at least logged so we'll be aware of them.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1349383
	Continuous-Integration: Jenkins CI

2016-07-03  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Pass missing parameter on desktopLogoff
	Previously this parameter was not passed and all seemed
	fine from the logs, but it actually wasn't the exception
	was swallow that the parameter was missing.
	The parameter is actually not used, but still mandatory.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1349383
	Continuous-Integration: Jenkins CI

2016-07-03  Irit Goihman  <igoihman@redhat.com>

	vdsm.spec: during rpm build only tests target will run
	during vdsm rpm check 'make check' is running pep8 and pyflakes
	using tox.
	not all machines support tox and there are some issues
	running tox without network.
	separating tests from other targets enables creating an rpm
	without tox.

	Continuous-Integration: Jenkins CI

2016-07-03  Adam Litke  <alitke@redhat.com>

	tests: Add tests for verify_untrusted_volume
	Add some tests to check that verify_untrusted_volume works as expected.
	Tests are placed in a new storage_hsm_test module which can accomodate
	tests for other HSM verbs.

	Continuous-Integration: Jenkins CI

2016-07-03  Irit Goihman  <igoihman@redhat.com>

	Makefile: added 'tests' target
	overrided automake built-in check-recursive target
	to a non-recursive check and added 'tests' target as
	a dependency to 'check'.

	Continuous-Integration: Jenkins CI

2016-07-02  Simone Tiraboschi  <stirabos@redhat.com>

	jsonrpcvdscli: add additional verbs
	Add additional verbs required by the hosted-engine upgrade flow.

	Continuous-Integration: Jenkins CI

2016-07-01  Adam Litke  <alitke@redhat.com>

	hsm: Use manifest in verify_untrusted_volume
	New users of storage objects should generally use the new *Manifest
	versions rather than the original objects which have unneeded
	complexity.  Also, the new storagetestlib infrastructure is only
	compatible with the newer *Manifest objects.

	Continuous-Integration: Jenkins CI

2016-07-01  emesika  <emesika@redhat.com>

	vdsm: adding handling for NGN in osinfo.py
	Current osinfo.py implementation lacks handling for NGN (New Generation
	Node).

	This patch adds another parameter in addition to the osname, release and
	version named pretty_name, that is empty by default and if
	/etc/os-release file exists on the OS, will return the content of the
	PRETTY_NAME value (if exists) from that file.

	Bug-Url : https://bugzilla.redhat.com/show_bug.cgi?id=1324447
	Continuous-Integration: Jenkins CI

2016-06-30  Nir Soffer  <nsoffer@redhat.com>

	vm: Refine needsDriveMonitoring docstring
	Continuous-Integration: Jenkins CI

2016-06-30  Petr Horáček  <phoracek@redhat.com>

	ovs: rollback transaction
	Use netconfpersistence.Transaction() to trigger rollback after failed
	OVS network setup.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net ifcfg: fix bond rollback
	When setupNetworks(NET, BOND) fails on NET configuration, BOND ifcfg
	file is removed, but it still exists in the system. We have to remove
	it manually like we do in removeBonding().

	Continuous-Integration: Jenkins CI

2016-06-30  Nir Soffer  <nsoffer@redhat.com>

	tests: Print backtrace and terminate stuck tests
	If the test runner does not complete after a reasonable timeout, print a
	backtrace of all threads and terminate the test runner.

	Continuous-Integration: Jenkins CI

2016-06-30  Adam Litke  <alitke@redhat.com>

	qemuimg: Report qcow2 compat version
	The verification code for image upload wants to validate that a volume's
	compat version is supported by this vdsm.  The first step is to start
	returning the compat value in qemuimg.info.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1344289
	Continuous-Integration: Jenkins CI

2016-06-30  Francesco Romani  <fromani@redhat.com>

	tests: add mocking in deviceTests
	add mocking to make sure not to query libvirt in this flow.
	We don't actually care in this test about the fine details
	of the network, so this is safe.

	Continuous-Integration: Jenkins CI

2016-06-30  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add info about the number of run tasks in executor workers
	Continuous-Integration: Jenkins CI

2016-06-30  Rafael Martins  <rmartins@redhat.com>

	jsonrpc: expose Volume.setDescription as setVolumeDescription
	Related-To: https://bugzilla.redhat.com/1336655
	Continuous-Integration: Jenkins CI

2016-06-30  Adam Litke  <alitke@redhat.com>

	qemuimg: Use --output json for 'check' and 'info'
	We now depend on qemu-2.3.0 or later which can report information about
	images as a json string.  Get rid of the old parsing code which was
	complex, fragile, and inefficient by switching to the json output format
	for the info() and check() commands.

	Continuous-Integration: Jenkins CI

2016-06-30  Irit Goihman  <igoihman@redhat.com>

	tests: storage and gluster exception tests pass py3
	changed types.TypeType (which is deprecated in python3)
	to primitive type.

	Continuous-Integration: Jenkins CI

	tests: converted main.py to a test module
	main.py is now a test module and has been splitted to
	a new test module storage_exception_test.py and existing
	module gluster_exception_test.py

	Continuous-Integration: Jenkins CI

2016-06-30  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	client: use representation object
	Now we group information about how we fetch arg information from
	vdsm api. Fixed regression provided by 04b0cba.


	Continuous-Integration: Jenkins CI

2016-06-30  Irit Goihman  <igoihman@redhat.com>

	net tests: Pass config_network_test on py3
	ported relevant code to python3 in order that
	network/config_network_test.py will be python3 compatible.

	Continuous-Integration: Jenkins CI

2016-06-30  Nir Soffer  <nsoffer@redhat.com>

	spec: Update Fedora lvm requirement
	In commit b63bdfb0a2d8 (spec: Require lvm version fixing filter) we
	updated the requirement for Fedora since this issue was fixed 7 month
	ago in Fedora 23.

	However we still require ancient version that does not include this
	fix. Now we require the latest lvm package, including this fix.

	Bug-Url: https://bugzilla.redhat.com/1346012
	Continuous-Integration: Jenkins CI

2016-06-30  Petr Horáček  <phoracek@redhat.com>

	ovs: move bridges cleanup to a separate function
	In order to trigger rollback as late as possible, we have to separate
	ovs.switch.setup() in two functions, each containing one transaction.

	This will be needed in the next patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: add network with dhcp configuration
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: move dhclient.py to ip package
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: move dhclient_run/stop helpers to dhclient.py
	dhclient.py will be moved to ip module in the next patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-30  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: recovery error passed as response
	When we notice that vdsm is in recovery mode we return information about
	recovery as result instead of returning error.


	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1350763
	Continuous-Integration: Jenkins CI

2016-06-30  Nir Soffer  <nsoffer@redhat.com>

	spec: Require lvm version fixing filter
	Older lvm version was using filter incorrectly when running commands
	such as vgck and pvs. Instead of rejecting all the devices in the
	filter, the commands opened and scanned all block devices. This slow
	down these commands on systems with lot of block devices.

	On 3.6, lvm slowdowns cause delays in storage monitoring and may cause a
	host to become non-operational. These delays may also cause storage
	operations such as copying disks to fail with a timeout.

	On 4.0, these slowdowns may cause unwanted delays in various flows, but
	are not harmful to storage monitoring.

	Fedora 23 and later already include this fix (lvm2-2.02.132-2.fc23).

	Bug-Url: https://bugzilla.redhat.com/1346012

2016-06-30  Martin Sivak  <msivak@redhat.com>

	sla: Use GuestIoTuneOptional collector in MOM
	All major collectors in MOM now have the optional variant
	that makes sure the VM can be processed even when some of
	the functionality is missing.

	The IoTune collector was the last one affected by this.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1348263
	Continuous-Integration: Jenkins CI

2016-06-29  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: Add shadow-utils as requirement
	vdsm uses in the spec useradd, usermod tools which came from shadow-utils.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1349218
	Continuous-Integration: Jenkins CI

2016-06-29  Petr Horáček  <phoracek@redhat.com>

	net: disable unused IPv6 in ip.address.add()
	Move the code to shared ip.address.add() function so it will be used
	by iproute2, pyroute2 and ovs as well.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: turn created links UP
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: add OVS network with IP configuration
	This patch also includes basic functional tests for static IP.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net func test: add basic bond tests
	The patch introduces bond assertions for the functional tests and some
	basic bond tests.

	Continuous-Integration: Jenkins CI

	net: move ip configuration to ip.address module
	We need to share IP configuration functions with OVS switch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	netswitch: split setup actions on netswitch level
	This patch relocates split of nets and bonds actions (add, edit,
	remove) from ovs/switch.py to netswitch.py.

	We need this change to be able to run IP configuration directly from
	netswitch.

	This function can replace legacy switch actions split as well.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-29  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	migration: usage of single reactor in vdsm
	In most of the cases for each standalone client there is reactor but
	we want to share one in vdsm. There are already too many threads in vdsm
	so it is not desired to add more.

	With this change by default client owns a reactor and it will manage its
	life cycle. For internal clients we let vdsm to handle its life cycle
	because we want to share it.


	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1349461
	Continuous-Integration: Jenkins CI

2016-06-29  mirecki  <mmirecki@redhat.com>

	hooks: openstack hook should wait a while for nic activation
	The vm will be stated in a paused state if a nic managed by
	an external openstack network provider is present. The openstack
	hook after_vm_start  must then wait a given time to allow the
	nic to be activated before unpausing the vm.

	Bug-Url: https://bugzilla.redhat.com/1314371
	Continuous-Integration: Jenkins CI

2016-06-29  Milan Zamazal  <mzamazal@redhat.com>

	virt: Improve thread safety of discarding executor workers
	Current implementation of executor is not completely thread safe.
	Consider the following scenario that might happen in theory:

	- _execute_task cancels discard timer but the timer is already starting
	  discard processing.
	- However `self._discarded = True' statement hasn't been reached yet.
	- _execute_task sees self._discarded as False and continues with
	  processing normally.
	- _run continues with another task.
	- _discard is executed in the meantime.
	- The other processed task stalls and discard processing is initiated
	  again.
	- _discard checks for self._discarded (which is True now) and raises
	  AssertionError.

	The primary problem is coordination between worker and scheduler
	threads, namely between finishing task execution and possible
	asynchronous discard of the worker due to a timeout.  This patch solves
	that problem by introducing a lock ensuring that once _execute_task
	decides to finish the task regularly, no discard processing of the given
	task may be performed anymore.

	Continuous-Integration: Jenkins CI

2016-06-28  Nir Soffer  <nsoffer@redhat.com>

	vm: Introduce drive monitoring concept
	We have two periodic operations related to monitoring drives; updating
	volume size and extending drives.  Both are controlled by the strange
	concept of disks stats collection.

	Replace the concept of disk stats collection with the more general
	concept of drive monitoring. This is also a preparation for extracting
	the drive monitoring code to its own class.

	The old methods were mixing the concepts of running (start, stop) and
	enabling (enabled).  The new methods use the enabling concept.

	The old methods stored the current state in self._volumesPrepared; this
	looks like a leftover from older implementation.  Now we store the
	state in self._driveMonitorEnabled.

	Continuous-Integration: Jenkins CI

	periodic: Avoid useless drive monitoring
	The periodic system is checking every 2 seconds if a vm is ready for
	commands (Vm.isDomainReadyForCommands). If a vm is ready, it schedules
	an extend task in the scheduler (Vm.extendDrivesIfNeeded).

	However, if a vm does not have any chunked drives (thin provisioned
	block storage), or is in the middle of live storage migration
	from non-chunked drive to chunked drive, extending drives is never
	needed.

	Checking if a vm is ready for commands should be safe, but recently
	libvirt fixed a bug that cause this check to get stuck.

	Now we check if a vm has chunked drives or non-chunked drives
	replicating to chunked drives in DriveWatermarkMonitor.required,
	skipping such vms early.

	This change saves one libvirt call per vm each 2 seconds, and running
	useless extend task per vm in the executor, reducing cpu usage when
	using file based storage. This also reduces the risk of uncontrolled
	executor worker discarding when NFS server become unresponsive.

	Relates-To: https://bugzilla.redhat.com/1337073
	Continuous-Integration: Jenkins CI

2016-06-28  Allon Mureinik  <amureini@redhat.com>

	qemuimg.py: Don't check -T support
	Modern qemu-img versions allow using the -T parameter to specify
	the cache mode used for the source file(s). In order to be backwards
	compatible with older versions (present on EL6, e.g.),
	"qemu-img --help" was executed, parsed, and checked for the "-T"
	parameter. As EL6 support was dropped and VDSM requires
	qemu-img>=2.3.0, this check is now redundant, and can safely be
	removed, thus cleaning up the code, and saving some CPU cycles.

	As part of this patch, the tests were revised to include this
	argument, instead of just mocking qemu-img that does not support it.
	The tests for the checking mechanism were removed completely,
	together with this mechanism.

	Continuous-Integration: Jenkins CI

	qemuimg.py: Don't check compat support
	Modern qemu-img versions allow different QCOW2 formats - 0.10 and 1.1,
	although we force the use of 0.10 by default in order to be
	backwards compatible with old hupervisors that may still need to
	connect to a V3 domain.

	Sufficiently old qemu-img versions, though, don't even support the
	compat argument, requiring VDSM to query its existence with the "-o ?"
	flag before deciding whether to use it. As EL6 support was dropped and
	VDSM requires qemu-img>=2.3.0, this check is now redundant, and can
	safely be removed, thus cleaning up the code, and saving some CPU
	cycles.

	As part of this patch, the tests were also cleaned up to match the
	code. Tests for qemu-img that does not support the compat argument
	were removed, and the remaining tests were renamed to better
	remove the notion that having this argument is something special.

	Continuous-Integration: Jenkins CI

2016-06-28  Dan Kenigsberg  <danken@redhat.com>

	py3: netlink.monitor: use explicit byte array
	In Python3 we cannot write a str into a socket.

	Continuous-Integration: Jenkins CI

	net/link_test: don't assume Exception is iterable
	In Python 3, Exception.args must be used to query the args of an
	Exception object. This patch fixes only a single occurence of this
	problems.

	Continuous-Integration: Jenkins CI

	net tests: link_test must not depend on functional
	Before this patch, link_test imported functional/networkTests just for
	importing a throw-away IP address and CIDR.

	Continuous-Integration: Jenkins CI

2016-06-28  Yaniv Bronhaim  <ybronhei@redhat.com>

	--enable-vhostmd-hook for rhev_build script
	vhostmd is required in rhev builds.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-06-28  Francesco Romani  <fromani@redhat.com>

	API: doc: reformat docstring for consistency
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	API: allow setLogLevel to tune a specific logger
	The not so known setLogLevel VDSM verb allows to dynamically tune
	the log level of the root logger, until the next restart of VDSM.

	This patch extends the API to let the client tune any specific
	logger.

	Backports-To: 4.0
	Backports-To: 3.6
	Continuous-Integration: Jenkins CI

	API: streamline and make setLogLevel correct
	According to the schema, setLogLevel should accept
	a log level string ('DEBUG', 'INFO',...). But the code
	actually blindly casted the given value to int(), and this suggests
	the code actually expected an integer value.

	To make things a bit user friendlier and comformant to schema,
	change the argument to actually be a log level in string format.

	Along the way, this patch streamlines the implementation of
	setLogLevel and makes it simpler.

	Backports-To: 4.0
	Backports-To: 3.6
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-06-27  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Correct disconnectAction parameter extraction
	The disconnectAction has previously never been passed to the
	_setTicketForGraphicDev method. This patch fixes this oversight.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1349383
	Continuous-Integration: Jenkins CI

2016-06-27  Yaniv Kaul  <ykaul@redhat.com>

	Fix README for scratchpad VDSM hook
	The separator for multiple disks is ':', not ','

	Signed-off-by: ykaul@redhat.com
	Continuous-Integration: Jenkins CI

2016-06-27  Edward Haas  <edwardh@redhat.com>

	net test: Nose labeling of test type breaks with inheritance
	While running the test suite on Centos7 (with nose 1.3.0), the
	functional test module func_net_basic_test disregards the type marking.

	The superclass needs to be marked as well.

	This patch only fixes the test type marking, the switch type will be
	handled in a following patch.

	Continuous-Integration: Jenkins CI

2016-06-27  Milan Zamazal  <mzamazal@redhat.com>

	rpc: Log also error codes of RPC calls
	In one of the previous commits, we added logging of RPC calls on info
	level.  It'd be useful to have information about response codes there,
	so this patch adds that information.

	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

	rpc: Log RPC call summary on info level
	We currently log relatively detailed information about all RPC calls.

	This information is logged on the debug level.  We are going to switch
	to the info logging level sometimes in future and then information about
	RPC calls won't be logged anymore.  But we still want to see some very
	basic information about the RPC calls, such as that they were performed
	and how much time they took.

	This patch adds the corresponding logging.  We additionally add the
	response to the context at a single place as a preparation for the
	following patch that logs the response.

	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

	rpc: Log important info from VM stats
	Currently, we don't log results of getAllVmStats API calls.  This is not
	to fill logs with a lot of uninteresting information.  But information
	contained in the VM stats is useful and we'd like to have it somewhere.

	A possible solution to these contradictory requirements is to log just
	important information and to log it only occasionally.  In this patch,
	we introduce logging VM ids and states in getAllVmStats calls from time
	to time.

	We implement this as a rather general functionality.  We are going to
	use the same mechanism for other large API outputs in followup patches.

	There may be performance concerns but please consider that we perform
	data extraction only for calls that are global (not per VM) and that are
	not very frequent (like every second or so).  So the processing overhead
	shouldn't hurt much and shouldn't be much big in comparison to creating
	the returned data inside Vdsm.

	Bug-Url: https://bugzilla.redhat.com/1339291
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-27  Irit Goihman  <igoihman@redhat.com>

	py3 tests: ported vdsClientTests.py to python3
	ported relevant code to python3 in order that
	vdsClientTests.py will be python3 compatible

	Continuous-Integration: Jenkins CI

	vdsm.conf: Add drop-in dir
	A drop-in dir allows the user to put partial configurations
	into a drop-in directory.
	This will allow to either set the configuration or override
	already set configurations using the partical configuration files.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1279555
	Continuous-Integration: Jenkins CI

2016-06-27  Milan Zamazal  <mzamazal@redhat.com>

	build: Make sure run_tests*.sh scripts are executable
	Generated script tests/run_tests_local.sh is not executable after
	`make clean; make' is run.  This bug was introduced by commit 6e6f89b7,
	but there is probably nothing wrong with that commit, it just introduces
	removal of some files including run_tests_local.sh.  The problem is
	tests/run_tests*.sh files are not set as executable if they are
	recreated any time later.

	This patch tries to solve the problem by making the following changes:

	- tests/run_tests*.sh are no longer handled in configure.ac.  They are
	  not config files and such a use of AC_OUTPUT is obsolete anyway.
	- New tests/Makefile.am rule is introduced ensuring generated
	  run_tests*.sh files are set as executable.
	- top_srcdir substitution is added to Makefile.subs to make the inserted
	  relative paths in the generated files always correct.
	- run_tests_local.sh is moved to *_SCRIPTS target in tests/Makefile.am.

	There may be other solutions of the problem but whatever solution is
	chosen, it should be checked that tests/run_tests*.sh files are
	executable and the paths inside the generated files are right in all the
	following situations:

	- After running ./autogen.sh + make in a fresh git directory.
	- After `rm tests/run_tests*.sh; make'.
	- After `(cd tests; rm run_tests*.sh; make)'.

	Continuous-Integration: Jenkins CI

2016-06-27  Irit Goihman  <igoihman@redhat.com>

	vdsm: changed relative imports to absolute imports
	Absolute imports are more recommended to use than
	relative imports, since they are more readable and
	provide information about the project structure.

	Continuous-Integration: Jenkins CI

2016-06-27  Amit Aviram  <aaviram@redhat.com>

	build: support imageio in rhev
	Since ovirt-imageio is now available in rhel's channels, we should
	enable it in rhev. This will cause an auto-installation of ovirt-imageio
	when installing VDSM, so image uploading can be supported in the
	installed host without any user intervation.

	Bug-Url: https://bugzilla.redhat.com/1349033
	Continuous-Integration: Jenkins CI

2016-06-26  Edward Haas  <edwardh@redhat.com>

	net: Minor func docsting editing
	Continuous-Integration: Jenkins CI

2016-06-26  Petr Horáček  <phoracek@redhat.com>

	net func test: test network based on a vlan
	Continuous-Integration: Jenkins CI

	net tests: common tests for 'ovs' and 'legacy'
	New functional tests cover need to test both 'ovs' and 'legacy'
	switch types. We create common network/api tests in universal
	test-class and then inherit it with specified switch type.

	By default all switch types are used. To run just tests connected
	with specific switch, we can filter 'switch' attribute:
	./run_tests.sh -A "switch=='legacy'" network/func_net_creation_basic_test.py

	Continuous-Integration: Jenkins CI

2016-06-25  Francesco Romani  <fromani@redhat.com>

	spec: consume fix for rhbz#1339963
	Fixed upstream in libvirt >= 1.3.5, but we can't bump this requirement
	until we require fedora >= 24.

	This patch only updates CentOS/RHEL requirements.

	Bug-Url: https://bugzilla.redhat.com/1349864
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	Send host reports each sampling interval from HostMonitor
	Continuous-Integration: Jenkins CI

	Adding report_stats to health reports
	Adding function that use reports.send function to report internal vdsm
	usages (by health module which is tuned in vdsm.conf)

	Continuous-Integration: Jenkins CI

	Adding report_stats to host.api
	Adding functions that use reports.send function to report internal host info

	Continuous-Integration: Jenkins CI

	With Tox we dont need to have local installation of pep8 and pyflakes
	Tox virtual env downloads (or use a cache) of specific version of pep8
	and pyflakes. vdsm build does not require python-pep8 and python-flakes
	packages anymore. This patch removes this check from configure.ac

	Continuous-Integration: Jenkins CI

2016-06-24  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Fix tests with non-default qcow2_compat
	In commit 808ccde4de35 (qemuimg: Make QCOW2_COMPAT configurable) we
	added a configuration for qcow2_compat. When running the tests on a
	hypervisor with non-default configuration, the tests assuming the
	hardcoded value are now failing.

	Fix by using standard configuration in the tests, overriding the host
	/etc/vdsm/vdsm.conf contents.

	Continuous-Integration: Jenkins CI

2016-06-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Ensure proc terminatation after poll
	Continuous-Integration: Jenkins CI

2016-06-23  Adam Litke  <alitke@redhat.com>

	qemuimg: Keep supported qcow2 versions as a tuple
	_QCOW2_COMPAT_SUPPORTED is a constant and as such it should be a tuple
	instead of a list.

	Continuous-Integration: Jenkins CI

2016-06-23  Irit Goihman  <igoihman@redhat.com>

	py3 tests: ported securableTests.py to python3
	ported securable.py to python3 in order that securableTests.py
	will be python3 compatible.

	Continuous-Integration: Jenkins CI

2016-06-23  Petr Horáček  <phoracek@redhat.com>

	net func test: Support remove network check
	Continuous-Integration: Jenkins CI

2016-06-23  Irit Goihman  <igoihman@redhat.com>

	vdsm: removed unnecessary calls to vdsm config.read
	libvirt and vdscli modules had calls to config.read with vdsm default
	path as a parameter. This is unnecessary because when the module is
	imported the config is already read from the same path.

	Also removed VDSM_CONF from libvirt FILES dictionary since it's not
	needed anymore and fixed toolTests.py to match those changes.

	Continuous-Integration: Jenkins CI

	tests: ported testlibTests.py to python3
	ported testlib.py to python3 in order that
	testlibTests.py to be python3 compatibe

	Continuous-Integration: Jenkins CI

2016-06-23  Francesco Romani  <fromani@redhat.com>

	sampling: periodic: improve logging
	We received reports of incorrect monitoring, e.g. VMs set unresponsive,
	or periodic monitoring being slow to get back to normal after a
	disruption. Analysis of post-mortem logs provided nothing conclusive;
	actually Vdsm seems to have reacted well under the disruption.
	Still, we want to make sure everything is right.

	This patch refactors the bulk stats sampling logging, to add more
	information and to move it outside the critical section.

	We know logging is a controversial matter.
	Too much logging is unpractical and taxing over the host.
	Too little logging makes troubleshooting very hard, especially for
	monitoring issues that are most often detected and reported much after
	the incident happen.

	We still log once per operation, so four entries per minute, which is
	definitely bearable.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	API: logging: move setLogLevel code into logUtils
	Move the implementation of API.setLogLevel into the
	logUtils module, with minimal changes and renaming,
	to make it less coupled.

	The rationale for this move is that we should not have
	logic in API.py besides the bare minimum.
	Furthermore, setLogLevel fits nicely in the logUtils domain.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-23  Irit Goihman  <igoihman@redhat.com>

	py3 test: shorten python3 blacklist
	removed a few tests from python3 blacklist.
	these tests already pass under python3 and shouldn't
	stay in blacklist.

	Continuous-Integration: Jenkins CI

2016-06-23  Milan Zamazal  <mzamazal@redhat.com>

	git: Add .tox to .gitignore
	Continuous-Integration: Jenkins CI

2016-06-23  Tomáš Golembiovský  <tgolembi@redhat.com>

	pep8: Excluded files were not excluded from check
	The files listed for exclusion were not excluded from PEP8 check. This
	had two reasons.

	First the exclusion pattern was improperly composed, because $$ was used
	to expand variables instead of a single $. This is because the script
	snippet originated from Makefile.

	Second problem was that `pep8` does accept only one `--except` argument.
	This meant that the first pattern list (which contained garbage anyway)
	was ignored.

	Continuous-Integration: Jenkins CI

2016-06-23  Milan Zamazal  <mzamazal@redhat.com>

	logging: Introduce throttledlog
	In some situations, we want to log interesting information.  A natural
	place to retrieve and log the information is where it is created.
	However the corresponding code may be called quite often and we don't
	need logging the information that often and fill logs with it
	excessively.  It's sufficient to log it just from time to time.

	This patch provides means for occasional logging.  The provided
	functions actually log only every given number of invocations or every
	given time span.  We're going to use the functionality in followup
	patches.

	Continuous-Integration: Jenkins CI

2016-06-23  Edward Haas  <edwardh@redhat.com>

	net virt: Support connecting VM/s to an ovs bridge
	Continuous-Integration: Jenkins CI

	net test: Create an external ifcfg bond in a context
	test_setupNetworks_on_external_vlaned_bond test has left the system
	unclean when an exception occurs before the bond removal.

	Continuous-Integration: Jenkins CI

	net: Setup ipv6autoconf with OVS switch
	When handling an OVS switch setup, set ipv6autoconf for its northbound
	ifaces.

	This is required at this stage for passing functional tests.

	Continuous-Integration: Jenkins CI

	net tests: Functional tests infrastructure
	The first step in creating network functional tests infrastructure.
	In the first phase, seperate the custom assertions and other required
	services from the test setup configuration.

	This patch includes the following points:
	- Create network functional test services in netfunctestlib module.
	- Create a new functional test module under tests/network, acting as a
	  reference.
	- Tests in tests/network tagged as 'functional' must be skipped during
	  make check.

	Continuous-Integration: Jenkins CI

2016-06-23  Dan Kenigsberg  <danken@redhat.com>

	py3 test: shorten blacklist
	a few network test already pass under py3. drop them from blacklist to
	keep them passing.

	Continuous-Integration: Jenkins CI

2016-06-23  Pavel Zhukov  <pzhukov@redhat.com>

	hooks: Fix import of netconfpersistence
	Continuous-Integration: Jenkins CI

2016-06-22  pkliczewski  <piotr.kliczewski@gmail.com>

	schema: externalize api_strict_mode
	This patch prepares the code to generate api doc based on yml schema.
	During the build process we want run html generation before config
	module is created from the template. In order to mitigate missing module
	failure we want to pass strict mode setting in ctor instead of getting
	it from configuration.


	Continuous-Integration: Jenkins CI

2016-06-21  Nir Soffer  <nsoffer@redhat.com>

	rpc: Remove empty command infos
	Empty command info is useless; leaving it in the code lead to creation
	of more of these.

	Continuous-Integration: Jenkins CI

2016-06-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Add hawkular reporter to reports
	This patch introduces hawkular module that implements the send method
	using hawkular-client which is currently available only via pip both on
	el7 and fedora. To use it add to vdsm.conf the following

	[reports]
	enabled = false|true
	collector_type = hawkular (default is statsd)
	collector_address = localhost|any hostname (currently one
	destination)
	queue_size = 100 (limits overload)

	Continuous-Integration: Jenkins CI

2016-06-21  Nir Soffer  <nsoffer@redhat.com>

	suppport: 3.5 not supported in 4.x
	The 4.x release supports only Engine 3.6 and cluster level 3.6. Remove
	3.5 from supported versions.

	Since supported versions are the same for all platforms, remove the
	special code for ppc64le.

	Continuous-Integration: Jenkins CI

2016-06-21  pkliczewski  <piotr.kliczewski@gmail.com>

	events: verify data before sending
	We want to check whether event contents aligns with the schema before
	sending it to the engine.


	Continuous-Integration: Jenkins CI

	events: introduction of schema
	New event schema defines types in similar way as rpc schema is. Any
	event name is defined as subscription id for this event.

	Continuous-Integration: Jenkins CI

	vdsmapi: prepare for event naming
	Verbs are identified by class and method names where as events are
	identified by subscription_id. In order to reuse the code we need to
	provide single identifier for type verification.

	Continuous-Integration: Jenkins CI

2016-06-21  Nir Soffer  <nsoffer@redhat.com>

	logstat: Fix build by distributing contrib/logstat
	Commit 8eef20198a26 (logstat: Print statistics from vdsm log) added a
	new script but did not add it to the main Makefile. For some reason
	jenkins was happy with the original patch, but now it is failing.

	Seems that the EXTRA_DIST list should move to contrib/Makefile to
	prevent these errors in the future.

	Continuous-Integration: Jenkins CI

2016-06-21  Edward Haas  <edwardh@redhat.com>

	net test: Create an external bond in a context
	Continuous-Integration: Jenkins CI

2016-06-21  Petr Horáček  <phoracek@redhat.com>

	ovs: don't count bond slave duplicates
	We should check that set(slaves) contains 2 or more slaves to not
	get fooled by two slaves with the same name.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: edit bond mode
	With this patch we allow setup of OVS bond with one of 'fallback'
	modes 1 and 4 and miimon.

	In another patch we will allow users to edit all OVS bond parameters.
	Fallback modes must be used for legacy->ovs migration. Bonds with other
	modes or options cannot be migrated.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-21  Edward Haas  <edwardh@redhat.com>

	net tests: Support the ability to choose the tested switch
	Use VDSM_TESTER_SWITCH_TYPE env variable to specify which switch type
	should be tested in the functional tests.
	If it is not set, all switch types will run.
	If 'ovs' (or 'legacy') is set, then 'legacy' (or 'ovs') are skipped.

	The option has been introduced to overcome the problem described by
	https://bugzilla.redhat.com/show_bug.cgi?id=1346232

	Continuous-Integration: Jenkins CI

2016-06-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	Introduce reports package
	reports logic allows to send report to external providers by start close
	and send functions. The report itself is simply key value attribute.

	This patch includes statsd reporter which implements the send method to
	statsd listener by python-statsd.
	To enable reports add the following to vdsm.conf:

	[reports]
	enabled = false|true (disabled by default)
	collector_type = statsd (following patch adds more providers)
	collector_address = localhost|any hostname (currently one destination)

	We still miss python-stastd for python3 so we don't require the package
	in spec. If metric collector is configured to be enable and the type
	implementation is not available ImportError should be raised.

	Continuous-Integration: Jenkins CI

2016-06-20  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: unexpected response when a verb returns nothing
	We used to send True for verbs where there is no response. Now we send
	None which causes NPE in the engine when parsing StorageDomain.activate
	response. This patch fixes this regression.


	Related-To: https://gerrit.ovirt.org/59078
	Continuous-Integration: Jenkins CI

2016-06-20  emesika  <emesika@redhat.com>

	vdsm: adding support for version 4.1
	Continuous-Integration: Jenkins CI

2016-06-20  Milan Zamazal  <mzamazal@redhat.com>

	jsonrpc: Pass JsonRpcInternalError instance, not class, to response
	If there is a problem with processing a response in
	_JsonRpcServeRequestContext.sendReply, the method generates a general
	error response.  However, due to missing parentheses,
	JsonRpcInternalError class, instead of JsonRpcInternalError instance, is
	passed as `error' argument to JsonRpcResponse.  This leads to a crash
	when JsonRpcResponse tries to access `error'.

	This patch fixes the error by adding the missing parentheses.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-19  Nir Soffer  <nsoffer@redhat.com>

	logstat: Print statistics from vdsm log
	This tool print the size of the log data generated by each log level,
	logger, and location (logger:module:lineno).

	Sample output (trimmed):

	    Levels
	      23831913 DEBUG
	       5283179 WARNING
	       5097252 INFO
		 38955 ERROR

	    Loggers
	       5927768 storage.check
	       5356340 jsonrpc.JsonRpcServer
	       5281867 SchemaCache
	       4941607 Storage.Misc.excCmd
	       4886896 Storage.TaskManager.Task
	       ...

	    Locations
	       5281867 SchemaCache:vdsmapi:143(_report_inconsistency)
	       5163660 jsonrpc.JsonRpcServer:__init__:548(_serveRequest)
	       4352610 Storage.TaskManager.Task:task:1193(prepare)
	       4338316 dispatcher:logUtils:52(wrapper)
	       3838591 Storage.Misc.excCmd:lvm:292(cmd)
	       ...

	Continuous-Integration: Jenkins CI

2016-06-19  Martin Polednik  <mpolednik@redhat.com>

	ppc64hwinfo: refactor getHardwareInfoStructure
	Since all information we need are now available via _from_device_tree
	or cpuinfo, we can drop custom cpuinfo parsing and simply format the
	values we get elsewhere.

	Continuous-Integration: Jenkins CI

	ppc64hwinfo: extend cpuinfo to platform and machine
	Platform and machine keys in cpuinfo are ppc64 and ppc64le platform
	specific keys indicating the machine type and platform. We expose them
	in cpuinfo to enable other modules use them without having to parse
	/proc/cpuinfo themself.

	Continuous-Integration: Jenkins CI

	ppc64hwinfo: refactor _getFromDeviceTree
	The function was not pep8 compliant and not really nice either. We
	improve the function by making it pep8 compliant, renaming it to
	_from_device_tree and overall nicer.

	Continuous-Integration: Jenkins CI

	ppc64hwinfo: add tests for getHardwareInfoStructure
	Continuous-Integration: Jenkins CI

2016-06-19  Edward Haas  <edwardh@redhat.com>

	py3: Require libselinux-python3
	The selinux package/module is not required in the spec and CI automation
	packages, therefore py3 unit tests are failing.

	Continuous-Integration: Jenkins CI

2016-06-17  Francesco Romani  <fromani@redhat.com>

	build: pkgversion: minimum release should be 1
	For stable branches, we should never have release < 1.
	E.g. we should avoid

	v4.y.z-0

	instead we should have

	v4.y.z-1

	Continuous-Integration: Jenkins CI

2016-06-17  Martin Polednik  <mpolednik@redhat.com>

	ppc64hwinfo: make getHardwareInfoStructure testable
	Make the code testable by moving cpuinfo path to argument.

	Continuous-Integration: Jenkins CI

	ppc64hwinfo: add tests for _getFromDeviceTree
	Continuous-Integration: Jenkins CI

	ppc64hwinfo: make _getFromDeviceTree testable
	We make the code testable by factoring device tree path to the functions
	argument. Tests are in followup patch.

	Continuous-Integration: Jenkins CI

2016-06-17  Petr Horáček  <phoracek@redhat.com>

	ovs: add/remove OVS network based on a bond
	Bond modes will be handled in a following patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: use transaction class for devices setup
	With this patch we use transaction class instead of plain functions
	to setup OVS networks.

	This will be handy with following OVS bonds patch where we need a few
	shared dictionaries across methods.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: fix bond removal validation
	We should allow removal of a bond which network-user will use nic
	instead.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-17  Nir Soffer  <nsoffer@redhat.com>

	api: Use warnings to report schema inconsistencies
	Previously we spammed the log with warnings about conflicts between the
	schema and the real usage of the apis. These warnings are useful for
	developers but have negative value for users.

	Now we use warnings.warn instead of logging.warning, so they do not
	appear in the log by default. To enable warnings in the log, change the
	configuration:

	    [devel]
	    python_warnings_enable = true

	When enabled, the warnings are little more verbose now, using Python
	standard warning style:

	    jsonrpc.Executor/2::WARNING::2016-06-01
	    22:23:55,551::vdsmapi::148::py.warnings::(_report_inconsistency)
	    /usr/lib/python2.7/site-packages/api/vdsmapi.py:148: Inconsistency: No
	    default value specified for systemProductName parameter in
	    Host.getHardwareInfo
	      warnings.warn(message, Inconsistency)

	Continuous-Integration: Jenkins CI

2016-06-16  Milan Zamazal  <mzamazal@redhat.com>

	xmlrpc: Hide fenceNode password in the log
	We enabled logging of fenceNode xmlrpc calls, however there is a
	plain password in the call parameters.  This patch prevents the password
	from being written to the log.

	Password logging seems to be already handled with jsonrpc, so this patch
	just fixes xmlrpc.

	Backport-To: 4.0
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1339291
	Continuous-Integration: Jenkins CI

2016-06-16  Shmuel Melamud  <smelamud@redhat.com>

	virt: Allow _recover() to call vm.cont() in any VM state
	By default, cont() returns error if the VM is in one of the following
	states:

	vmstatus.MIGRATION_SOURCE
	    Migration is in progress, VM status should not be changed till the
	    migration finishes.

	vmstatus.SAVING_STATE
	    Hibernation is in progress, VM status should not be changed till the
	    hibernation finishes.

	vmstatus.DOWN
	    VM is down, continuing is not possible from this state.

	But if an error occured when performing an operation on a VM and
	SourceThread._recover() is called, it must be able to call vm.cont() for
	recovery purposes regardless of the VM's status.

	To implement this, ignoreStatus parameter was added to vm.cont(). When
	set to True, it forces vm.cont() to run even in the states listed above.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1238536
	Continuous-Integration: Jenkins CI

2016-06-16  Milan Zamazal  <mzamazal@redhat.com>

	rpc: Use Suppressed class instead of logging workarounds
	We have got logging workarounds for getAllVmStats RPC calls.
	The workarounds are there to suppress logging large data regularly.
	We'd like to get rid of the workarounds, it's better to handle the large
	data in the API functions, where we can use specific handling of each
	kind of large data.

	This patch introduces a wrapper for large values, with the purpose of
	suppressing writing them to the log.  The wrapper is used for
	getAllVmStats so that we get rid of the logging workarounds.

	There are other API calls that may produce large outputs, we will handle
	them in followup patches.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	doc: Typo fixes in utils.monotonic_time docstring
	Continuous-Integration: Jenkins CI

2016-06-15  Francesco Romani  <fromani@redhat.com>

	storage: Support new dd output
	In Fedora 24 we can find the new dd from coreutils 8.25.5
	which has a new fancier output format:

	Example #1:
	1+0 records in
	1+0 records out
	4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00887814 s, 461 kB/s
	           ^^^^^^^^^^^^^^^^^

	Example #2:
	0+1 records in
	0+1 records out
	30 bytes copied, 0.00156704 s, 19.1 kB/s
	             ^^^^

	Compare with the old dd output found in Fedora 23:

	Example #1:
	1+0 records in
	1+0 records out
	4096 bytes (4.1 kB) copied, 0.00135703 s, 3.0 MB/s
	           ^^^^^^^^

	Example #2:
	0+1 records in
	0+1 records out
	30 bytes (30 B) copied, 0.0033204 s, 9.0 kB/s
	         ^^^^^^

	After a quick glance at the dd manpage, I couldn't find a way to
	disable the new output, which breaks the storage regex to
	parse the read speed results.

	To add compatibility with the new format, without breaking
	support for older versions, this patch replaces the implementation
	of storage.check.CheckResult, switching from a regex to a simpler
	pattern matching using the methods of string objects.

	Bug-Url: https://bugzilla.redhat.com/1342397
	Continuous-Integration: Jenkins CI

2016-06-15  Edward Haas  <edwardh@redhat.com>

	net test: Cleanup setupNetwork by removing kwargs
	Use test_kernel_config flag instead with a default value of True.

	Continuous-Integration: Jenkins CI

2016-06-15  Francesco Romani  <fromani@redhat.com>

	jsonrpc: events: do not send events on recovery
	While the recovery is in progress, Vdsm should
	not answer to API calls, to avoid reporting incomplete
	or misleading data.
	It should not send events as well.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Revert "vdsm.conf: Add drop-in dir"
	This reverts commit 0d3e8d23be258a4a7be535bb245f7b78db652fd2
	https://gerrit.ovirt.org/#/c/58728/ fixing the bug by changing 'CONFDIR'
	to 'sysconfig' - this revert is to fix master and allow pushing the fix
	and the additional of the drop-in at once.

	Continuous-Integration: Jenkins CI

2016-06-15  Edward Haas  <edwardh@redhat.com>

	net tests: Fix inconcistsency when calling setupNetworks
	setupNetworks has been called through the test wrapper and directly to
	the utils (also a wrapper).

	This patch made the call pass through the test class wrapper and
	adjusted the arguments to fit the original method.

	Continuous-Integration: Jenkins CI

2016-06-14  Francesco Romani  <fromani@redhat.com>

	migration: downtime: update step delay computation
	This patch changes the way the wait for next step is calculated.

	- for smaller VMs (up to 2048 MiB) the wait is calculated as
	  before (e.g. the smaller the memory is, the smaller the wait is)

	- for larger VMs the wait is 60s (otherwise it grows to very large
	  numbers soon so this is the higer limit)

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	jsonrpc: integration: make tests pass
	add missing monkeypatching to make the tests work.

	Continuous-Integration: Jenkins CI

2016-06-14  Idan Shaby  <ishaby@redhat.com>

	hsm: normalize remotePath in getStorageDomainsList
	Since commit 22ec88da65aad2392f9ab2501fe24b040e398ad7 added a support
	for local paths to fileUtils.normalize_path, we can use it also for
	local paths in getStorageDomainsList.

	Related-To: https://bugzilla.redhat.com/1344900
	Continuous-Integration: Jenkins CI

2016-06-13  Idan Shaby  <ishaby@redhat.com>

	storage: allow local path input for normalize_path
	This patch changes fileUtils.normalize_path to allow not only a remote
	path as an input, but also a local path.
	With that, it is now possible to mount local devices and not only
	remote ones.

	Bug-Url: https://bugzilla.redhat.com/1344900
	Continuous-Integration: Jenkins CI

2016-06-13  Milan Zamazal  <mzamazal@redhat.com>

	virt: Typo fixes in executor.py docstrings
	Continuous-Integration: Jenkins CI

2016-06-13  Martin Sivak  <msivak@redhat.com>

	Configure mom to ignore missing balloon device
	In the past MOM was only responsible for ballooning. But now it also
	manages some CPU and storage QoS settings. When there is no ballooning
	device on the VM, MOM completely ignores that VM and therefore does not
	set QoS attributes for CPU and storage.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1337882
	Continuous-Integration: Jenkins CI

2016-06-12  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: enableGuestEvents machine params needs to be set later
	Previously the enableGuestEvents value got overwritten because
	it was initialized too early. The setting of the value has been moved
	to a later point to avoid such mistakes in the future.

	The problem was caused by the fact that the 'enableGuestEvents' value
	was kept in self.conf and not dropped, which was originally set to a
	value on the first migration. That first migration overwrote the value
	which was passed by the engine later.

	This patch now drops the value from self.conf on the migration destination
	and moved the value setting to a later point in time on the source host.
	This should make the whole thing more resilient to such issues.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/1344361
	Continuous-Integration: Jenkins CI

2016-06-12  Francesco Romani  <fromani@redhat.com>

	tests: hooks: fix monkeypatching
	The commit ee9eb95 rightfully added a test, with monkeypatching,
	to avoid writing in system folders.

	However, the path which is attempted to be mocked is created as
	constant at import time, so the current monkeypatching happens too late,
	making it useless.

	This patch fixes that by using more aggressive monkeypatching: we
	replace a private module constant.

	Continuous-Integration: Jenkins CI

2016-06-11  Edward Haas  <edwardh@redhat.com>

	net: Canonicalize and 'translate' ipv6autoconf
	ipv6autoconf configuration key has not been included in kernel
	config, causing comparisson between requested and existing config to
	show wrong results.
	The key has also been missing from the networks report subtree
	(netinfo).

	This has been seen on network restoration and in under-the-bridge
	checks: Requested key exists but in the kernel config (generated from
	netinfo) it is missing.

	Bug-Url: https://bugzilla.redhat.com/1332076
	Continuous-Integration: Jenkins CI

2016-06-10  Nir Soffer  <nsoffer@redhat.com>

	monitoring: Reduce monitoring noise in the logs
	We don't need to log dd parameters and stderr millions of times. We log
	stderr in case failure later.

	Here is an example of the new logs (message part only):

	    START check '/dev/65059e74-7577-4356-8ce1-89e9634d986b/metadata'
	    (delay=0.00)

	    FINISH check '/dev/65059e74-7577-4356-8ce1-89e9634d986b/metadata'
	    (rc=0, elapsed=0.02)

	Continuous-Integration: Jenkins CI

2016-06-10  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: close client
	We want to explicitly expose ability to close resources like a socket
	which is used to communicate and a reactor.


	Bug-Url: https://bugzilla.redhat.com/1343005
	Continuous-Integration: Jenkins CI

2016-06-10  Nir Soffer  <nsoffer@redhat.com>

	logging: Fix duplicate ioprocess logs
	Messages from the IOProcess logger are logged twice:

	    ioprocess communication (4660)::INFO::2016-06-05
	    15:52:07,240::__init__::434::IOProcess::(_processLogs) Starting
	    ioprocess

	    ioprocess communication (4660)::INFO::2016-06-05
	    15:52:07,240::__init__::434::IOProcess::(_processLogs) Starting
	    ioprocess

	(Actual lines from vdsm log, wrapped and separated)

	This happens because IOProcess logger uses propagate=True, but is
	attached to the logfile handler. Python logs the message to the handler,
	and then pass the message to the root logger, logging it again to the
	same handler.

	Continuous-Integration: Jenkins CI

2016-06-10  Edward Haas  <edwardh@redhat.com>

	net hostQos: maintain default class ls value
	Devices (bond or nic) with tc settings, have default classes defined for
	non-vlan traffic.
	This patch keeps track of all classes defined on the device and updates
	the default class 'ls' value with the maximum from all others.

	Default classes that have been explicitly set through a non-vlan
	network, override the max 'ls' logic described earlier.

	Bug-Url: https://bugzilla.redhat.com/1302020
	Continuous-Integration: Jenkins CI

2016-06-09  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Fetch only VM names from external host
	Added new API call that fetches only list of names of VMs on external
	host. That way the caller can load VM info with getExternalVMs only for
	subset of the VMs.

	Bug-Url: https://bugzilla.redhat.com/1294629
	Continuous-Integration: Jenkins CI

2016-06-09  Martin Polednik  <mpolednik@redhat.com>

	rng: only setup hwrng devices
	Only devices that use hardware RNG need to 'own' the /dev/hwrng udev
	device. We therefore disable taking ownership the file for simple
	/dev/random enabled VMs.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1343859
	Continuous-Integration: Jenkins CI

	rng: use better udev rule name
	Current udev name clashes with multipath devices, so if
	rmAppropriateMultipathDevice is called against the VM, rule is removed.

	Although this should not cause any issue, it is dangerous side effect
	that we need to avoid.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1343859
	Continuous-Integration: Jenkins CI

2016-06-09  mirecki  <mmirecki@redhat.com>

	virt: Collect vm start flags from device hooks when running vm
	We must be able to pass more information from the
	device hooks than just the device xml. This can be done
	by placing additional flags which can be use to alter vm
	behaviour in a config file, which will then be passed to
	the vm config.

	This is needed for example to solve a race condition
	when nic managed by external providers are added, and
	the vm boots using one of these nics. The nics are
	only connected at startup, which takes a few seconds.
	By then the vm already tries to boot, and fails because
	of no network connection (as the nic is still not ready).
	Adding the libvirt.VIR_DOMAIN_START_PAUSED flag will start the vm paused,
	giving time to connect the nic. The vm can then be
	resumed in the after_vm_start hook, once the nic is
	in the up state.

	Bug-Url: https://bugzilla.redhat.com/1314371
	Continuous-Integration: Jenkins CI

2016-06-08  Nir Soffer  <nsoffer@redhat.com>

	tests: Replace magic number with constant
	Add BLOCK_SIZE constant and use it to replace sizes and offsets for
	direct I/O tests.

	Continuous-Integration: Jenkins CI

	directio: Remove useless DirectFile.writelines()
	Writing lines does not makes sense in the context of directio, since
	writes must be aligned to blocks, and there is tiny chance that
	arbitrary list of string will come out aligned after joining.

	This functionality belongs to higher layer, formating lines of text and
	padding the data if needed. And indeed caller of DirectFile already
	implement this.

	Continuous-Integration: Jenkins CI

	directio: Require full blocks
	Previously write accepted a partial block, silently padding the data
	with zeros, possibly overwriting data.

	For example, if file contents was:

	    b"a" * 512 + b"b" * 512

	Writing "c" * 768 would change to file to:

	    b"c" * 768 + b"\x00" * 256

	The correct way to perform such write is to read 2 blocks, modify the
	data, and write back 2 blocks. But this is inefficient, so it must be
	implemented in the caller of DirectFile. It also does not make sense in
	the context of directio.

	Now this write will fail with ValueError:

	    ValueError: You can only write in 512 multiplies

	Continuous-Integration: Jenkins CI

	directio: Keep line terminators in readlines()
	Fix DirectFile.readlines() to keep line terminators as built-in file
	object, classes from the io module, and ioprocess.

	Continuous-Integration: Jenkins CI

	directio: Add test for reading entire file
	To fix readlines(), we need to to fix readall(), used by read() without
	a size. Add test coverting this code path.

	Continuous-Integration: Jenkins CI

	directio: Add failing test for DirectFile.readlines()
	Unlike built-in file object, or io.FileIO, line terminators are not kept
	in the output of readlines(). This is usually convenient, but it is not
	the expected and documented behavior.

	This patch add a new failing test and mark it as brokentest. We will fix
	this in the next patch.

	Continuous-Integration: Jenkins CI

	directio: Port to Python 3
	DirectFile is for binary io so it should return bytes instead of
	strings, like io.FileIO, io.BufferedIOBase.

	Replace StringIO.StringIO with io.BytesIO, and update the tests to use
	bytes and io.open in binary mode, returning bytes.

	Continuous-Integration: Jenkins CI

	tests: Modernize test names
	Use lower_case test names, complying with modern vdsm code style.

	Use TestClassName instead of ClassNameTests - these names are
	automatically collected by py.test without inheriting from
	unittest.TestCase.

	Continuous-Integration: Jenkins CI

	directio: Introduce vdsm.storage.directio module
	Move DirectFile class from storage.fileUtils to new
	vdsm.storage.directio module.

	Continuous-Integration: Jenkins CI

	fileUtils: Remove the redundant "d" mode
	When creating a DirectFile, the only available mode is directio, so the
	non-standard "d" mode is not helpful, and error checking can be
	simplified.

	Continuous-Integration: Jenkins CI

	fileUtils: Remove unused open_ex
	The last user of this non-standard api was removed in commit
	3cb19a4095ee (rfh: Remove legacy remoteFileHandler). New code should use
	DirectFile directly.

	Continuous-Integration: Jenkins CI

2016-06-08  Adam Litke  <alitke@redhat.com>

	sdm: Create repo image directory when creating block volumes
	The qemu-img command expects to work with volume links in the storage
	repository (/rhev/data-center/<sp>/<sd>).  These links are normaly
	lazily created when sd.produceVolume is called but since we don't have a
	volume to produce yet we must create them right away.

	Continuous-Integration: Jenkins CI

2016-06-08  Martin Polednik  <mpolednik@redhat.com>

	rng: fix rebase breakage
	Patch 341a6cb5 moved the class functionality related to RNG sources to
	separate module. Unfortunately, we did not encounter git conflict when
	9857a9c3 was merged before the patch.

	We fix this by using the new code as appropriate.

	Backport-To: 4.0
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1343859
	Continuous-Integration: Jenkins CI

2016-06-08  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Load info only for subset of external VMs
	Fetching of all the information is rather expensive operation especially
	from VMware hosts. By limiting the query only to the subset of VMs the
	API change allows implementation of on demand loading of information
	about external VMs.

	Bug-Url: https://bugzilla.redhat.com/1294629
	Continuous-Integration: Jenkins CI

2016-06-08  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: fix issue with geo rep status parsing.
	There is a change in the geo rep session key from
	glusterfs 3.7.12 onwards. Slave volume UUID is added as lost
	component to session key. Updating the session key
	parsing to handle both old and new versions.

	Bug-Url: https://bugzilla.redhat.com/1343650
	Continuous-Integration: Jenkins CI

2016-06-08  David Caro  <dcaroest@redhat.com>

	check-merged:Using yaml for the lago initfile
	Continuous-Integration: Jenkins CI

2016-06-08  Dan Kenigsberg  <danken@redhat.com>

	cleanup: drop trademark from log, tests and docs
	Continuous-Integration: Jenkins CI

2016-06-07  Francesco Romani  <fromani@redhat.com>

	migration: downtime: start thread after 1st iter
	This patch makes the migration.DowntimeThread start only after
	the first QEMU iteration.

	A "QEMU iteration" is the process on which QEMU, during a pre-copy
	live migration, attempts to transfer all the memory pages from the source
	side to the destination side.

	It is better to start the downtime adjustment only after the first
	iteration, because the very fact QEMU needs more iterations means the
	migration is not converging (easily).

	This patch ensures we still set up a default downtime using our
	own configured values.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-07  Michal Skrivanek  <michal.skrivanek@redhat.com>

	spec: refactor libvirt dependencies to work on ppc64le
	Per https://bugzilla.redhat.com/show_bug.cgi?id=1302373#c2 the
	correct way how to pull in KVM support in libvirt is via
	libvirt-daemon-kvm. We don't need to list other subpackages.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1339464
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-07  Francesco Romani  <fromani@redhat.com>

	migration: downtime: handle steps=1
	The migration.DowntimeThread() computes the sequence of values
	of the downtime setting to be sent to libvirt.

	The computation uses the (user-configurable) number of steps
	as input value, and it has a special handling for steps == 1.

	This patch makes the computation more uniform, in order
	to prepare the land for a future patch, which wants to improve
	how the DowntimeThread is used.

	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-06-07  Fabian Deutsch  <fabiand@fedoraproject.org>

	vdsm.conf: Add drop-in dir
	A drop-in dir allows the user to put partial configurations
	into a drop-in directory.
	This will allow to either set the configuration or override
	already set configurations using the partical configuration files.

	To use this feature:

	$ mkdir /etc/vdsm/vdsm.conf.d/
	$ echo -e "[vars]\nfake_kvm_support = true\n" > \
	  /etc/vdsm/vdsm.conf.d/50-fake-kvm.conf

	The semantics of the directories and the search order is
	as follows.

	- /etc/vdsm/vdsm.conf - for user configuration. We install this
	  file if missing, and never touch this file during upgrade.
	- /etc/vdsm/vdsm.conf.d/ - for admin drop-in conf files.
	- /usr/lib/vdsm/vdsm.conf.d/ - for vendor drop-in configuration files.
	- /var/run/vdsm/vdsm.conf.d/ - for admin temporary configuration.

	Files with a .conf suffix can be placed into any of the
	vdsm.conf.d drop-in directories.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1279555
	Continuous-Integration: Jenkins CI

2016-06-07  Edward Haas  <edwardh@redhat.com>

	net systemd: Require openvswitch.service
	vdsm-network service requires openvswitch service to be running.

	openvswitch service is also dependent on the --enable-openvswitch build
	flag.

	Continuous-Integration: Jenkins CI

2016-06-06  Arik Hadas  <ahadas@redhat.com>

	ignore incoming requests during recovery with json-rpc
	This patch imitates the handling done with xml-rpc during the
	recovery process, avoid execution of external requests and
	return a proper error, for json-rpc.

	Bug-Url: https://bugzilla.redhat.com/1339291
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-06-06  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Add missing validation for qcow2 format
	In commit 898e3019adf9 (qemuimg: Validate qcow2_compat configuration) we
	validate only when using create(). This adds the missing validation for
	convert().

	Bug-Url: https://bugzilla.redhat.com/1317850
	Continuous-Integration: Jenkins CI

2016-06-06  Idan Shaby  <ishaby@redhat.com>

	storage: fix spec normalization when mounting
	This patch fixes two issues when dealing with mounts:

	1. The method os.path.normpath takes a path and normalizes it.
	   The problem is that when normpath is given with "server:/", it
	   removes the "/" and returns "server:".
	   To fix this, a new method is introduced in fileUtils.py -
	   normalize_remote_path.
	   This way, when creating a Mount object, instead of using normpath on
	   the spec part of the path, using normalize_remote_path solves the
	   problem.

	2. When calling to mount.isMounted, we haven't normalized its input,
	   fs_file, at all. Thus, ligitimate existing mounts could not be found
	   by using mount.isMounted since the generated wrong fs_file didn't
	   match the real one on /proc/mounts.
	   This patch adds a call to normalize_remote_path on specs that
	   generate an fs_file as an input to mount.isMounted.

	This patch solves these two issues so that the broken test from patch
	I4e95c6b2bc214b7f3cc1e2d3ec164efecd67c14a is passing now.

	Also, note that:
	- mount.Mount doesn't normalize its input anymore, but requires it to be
	  passed normalized (we also don't normalize the mounts before calling
	  the mount commandi).
	- We don't normalize mounts we get from the kernel.
	- We normalize each and every remote path coming from the user.

	Bug-Url: https://bugzilla.redhat.com/1305529
	Continuous-Integration: Jenkins CI

2016-06-06  Milan Zamazal  <mzamazal@redhat.com>

	rpc: Log calls of API methods with possibly large results
	We can prevent some API methods from logging their excessively large
	results.  But this doesn't mean we shouldn't log their calls at all, we
	just shouldn't log the large values.

	This patch re-enables logging calls of the methods with suppressed
	logging, it just disables logging their outputs.

	Bug-Url: https://bugzilla.redhat.com/1339291
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-06-06  Petr Horáček  <phoracek@redhat.com>

	ovs: validate that to-be-removed bond is not used
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: add/remove OVS network based on a VLAN
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: add/remove OVS network that is based on a nic
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: don't check if changes are needed in net editation
	We cannot compare query attributes with netinfo ones - they
	incompatible. With this patch, settting up a network with the exact
	same attribute as already define ends up with removing it and adding it
	again.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-05  Michal Skrivanek  <michal.skrivanek@redhat.com>

	spec: drop libguestfs dependency
	libguestfs-tools-c is already pulled in by virt-v2v in a clear and
	arch-dependent way.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1339464
	Backport-To: 3.6
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-06-04  Milan Zamazal  <mzamazal@redhat.com>

	rpc: Lower logging priority just for getAllVmStats
	Currently, we effectively disable logging of calls for several methods.
	But we should consider whether it causes more harm to log the
	corresponding information or not to log it.

	We should avoid logging excessively large messages.  This applies to
	getAllVmStats that may report quite a lot of information for many VMs.
	But there is probably no good reason not to log everything about the
	other methods currently silenced.  So with this patch we suppress
	logging just of getAllVmStats.

	We should be informed about that method as well, we handle that in
	followup patches.

	Bug-Url: https://bugzilla.redhat.com/1339291
	Backport-To: 4.0
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	jsonrpc: Fix log level overriding of some methods
	In commit ba171f1d, checking of method names to filter their logging out
	was changed.  We no longer check the mangled names, but we forgot to
	update the list of method names to filter out accordingly.  This patch
	fixes that.

	Please note that not logging those method calls at all is not a good
	idea, but we are going to fix that in followup patches.

	Bug-Url: https://bugzilla.redhat.com/1339291
	Backport-To: 4.0
	Continuous-Integration: Jenkins CI

2016-06-04  Adam Litke  <alitke@redhat.com>

	tests: Add lvsByTag to FakeLVM
	lvsByTag is needed to test blockVolumeManifest.getChildren() which will
	be called by the storage_volume_artifacts_test module.

	Continuous-Integration: Jenkins CI

	sdm_indirection: move Volume prepare and teardown
	Continuous-Integration: Jenkins CI

	tests: Use FakeStorageDomainCache in fake env
	When creating fake storage environments for tests, set up a fake storage
	domain cache to enable code that produces storage domains to find our
	fake storage domain.

	Continuous-Integration: Jenkins CI

	sdm: VolumeArtifacts COW base volume support
	Add support for qcow2 base volumes.  This is done by using the qemu-img
	program to initialize the prepared volume.  The rest of the patch is
	devoted to testing corner cases and invalid parameters.

	This adds support for base volumes only.  Snapshots and Templates will
	be supported in future patches.

	Continuous-Integration: Jenkins CI

	tests: Prepare for COW_FORMAT test permutations
	Refactor the BASE_*_PARAMS entries in storage_volume_artifacts_test.py.
	Use a dictionary instead of two separate variables to allow for indexing
	from permutated test functions.

	Continuous-Integration: Jenkins CI

	tests: Use MonkeyPatchScope to inject failures
	The FileVolumeArtifactsTests checked volume creation failures by
	directly replacing VolumeArtifacts methods with a boobytrapped method.
	We can make these tests clearer and more resilient by using
	MonkeyPatchScope.  They will also look more like the Block tests that
	test similar failure scenarios.

	Continuous-Integration: Jenkins CI

	Support initial_size parameter
	The non-SDM volume creation API supports an initial_size parameter which
	allows you to indicate the initial size of a thinly-provisioned block
	volume.  We need to support this functionality in the sdm create volume
	flow as well.

	Note that initial_size is only legal for COW formatted block volumes.
	Since we do not support those yet this patch only supports passing the
	parameter and throwing errors when appropriate.  The implementation will
	come along with COW volume support.

	Continuous-Integration: Jenkins CI

2016-06-02  Idan Shaby  <ishaby@redhat.com>

	tests: storageServerTests refactor
	This patch changes the spec argument that is sent to MountConnection to
	be of the right form. That it, instead of using "s" or "spec", we now
	use "server:/path".

	Continuous-Integration: Jenkins CI

2016-06-02  Edward Haas  <edwardh@redhat.com>

	net: Remove cfg references (ifcfg data)
	The cfg entries were used internally by VDSM and reported to Engine.
	Engine, since 3.6, no longer uses this data.
	VDSM should not use it internally as it is ifcfg specific.

	Continuous-Integration: Jenkins CI

2016-06-02  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	build: imported but unused
	Continuous-Integration: Jenkins CI

2016-06-02  Petr Horáček  <phoracek@redhat.com>

	ovs: use unfaked ovs_netinfo under ovs package
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: add bridges_by_sb property to OvsInfo
	This will be used in a following ovs setupNetworks patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	ovs: bridge is optional for del-port
	ovs-vsctl does not require bridge name for port removal. We will
	use this in L2 setup.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: use netinfo to split OVS nets and bonds
	Our decision of what should be done with a query (add, edit, remove)
	should not be based on expected running configuration (saved in
	RunningConfig) but on actual system state reported by netinfo.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: use netinfo to split OVS/legacy nets and bonds
	Netinfo now contains 'switch' attribute and therefore we can use
	real running configuration to split OVS/legacy entries.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: use netinfo for OVS validation
	Use real running netinfo configuration for OVS validation instead
	of running config.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: ovs validator should accept multiple untagged nets
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: fix validation bug: ovs_bonds should be used
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: common and legacy CachingNetInfo
	CachingNetInfo is not suitable for mixed OVS and Legacy networks.

	CachingNetInfo should be used only in legacy networks configuration
	where we don't need the whole system netinfo. It contains
	updateDevices() method which cannot be easily used with OVS netinfo.

	For all the other code newly introduced NetInfo should be used. It
	has no implicit arguments. Netinfo dictionary has to be passed to it
	every time, so we have full control of its contents.

	Legacy netinfo should be divided into NICs netinfo and legacy networks
	netinfo.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: report OVS netinfo in caps
	Even non-root caps (legacy networks+nics) are now obtained
	from supervdsm. The reason is, that we do not want to keep logic
	of legacy-OVS netinfo merging in two places (caps and netswitch).

	When we manage to split legacy netinfo to legacy networks and NICs
	parts, we will be able to simply divide netinfo between root and
	non-root.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-02  Edward Haas  <edwardh@redhat.com>

	net tests: Remove direct calls to threading.Thread
	In tests, threads should be started through testlib.start_thread()

	Continuous-Integration: Jenkins CI

2016-06-01  Idan Shaby  <ishaby@redhat.com>

	storage: move devicemapper.py to vdsm storage lib
	This patch moves the module vdsm/storage/devicemapper.py to
	lib/vdsm/storage/devicemapper.py.

	Continuous-Integration: Jenkins CI

	storage: organize imports in iscsi.py
	Continuous-Integration: Jenkins CI

2016-06-01  Pavel Zhukov  <pzhukov@redhat.com>

	hooks: Fix typo in fcoe hook properties
	FCOE_ENABLED should be FCOE_ENABLE according to fcoe config.

	Continuous-Integration: Jenkins CI

2016-06-01  Idan Shaby  <ishaby@redhat.com>

	storage: move curlImgWrap.py to vdsm storage lib
	This patch moves the module vdsm/storage/curlImgWrap.py to
	lib/vdsm/storage/curlImgWrap.py.

	Continuous-Integration: Jenkins CI

2016-06-01  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	yml: return type fixes for Host.getAllVmStats
	Continuous-Integration: Jenkins CI

2016-06-01  Nir Soffer  <nsoffer@redhat.com>

	tests: Start SSLServerThread as a deamon thread
	We should redesign this to not inherit from threading.Thread, but in the
	meantime this patch fixes the tests to use daemon thread.

	Continuous-Integration: Jenkins CI

2016-06-01  Tomáš Golembiovský  <tgolembi@redhat.com>

	tests: Prevent multiple invocations of makecerts.sh
	Wrapped the invocation of `makecerts.sh` in special rule to prevent
	multiple concurrent invocations of the script when make is running with
	multiple jobs (-j).

	Also there was no rule to build `server.p12` because it was missing from
	`makecerts.sh` targets in the build rule. To fix this and improve the
	readability all files are specified only on one place in a variable.

	Continuous-Integration: Jenkins CI

2016-06-01  Petr Horáček  <phoracek@redhat.com>

	netinfo: report 'vlanid' only if vlan is set
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-06-01  Milan Zamazal  <mzamazal@redhat.com>

	virt: "invokations" spelling fix in periodicTests
	Continuous-Integration: Jenkins CI

2016-06-01  Francesco Romani  <fromani@redhat.com>

	virt: lib: introduce the rngsources module
	We need to decouple caps.py from vdmevices.core.Rng.

	To do so, we introduce a new tiny module which owns
	the data shared by both entities, which boils down
	to the supported sources of entropies, their device node paths
	and their support functions.

	The relevant tests are moved as well.

	Continuous-Integration: Jenkins CI

2016-06-01  David Caro  <dcaroest@redhat.com>

	ci:Add ci-tools repo in advance to the new lago
	In the next version of lago, it will require repoman, that is
	currently in the ci-tools repo

	Continuous-Integration: Jenkins CI

2016-06-01  Edward Haas  <edwardh@redhat.com>

	vdscli: Provide py3 compatible xmlrpclib (using six)
	Continuous-Integration: Jenkins CI

	net dependency: Configurable openvswitch dependency
	openvswitch package is currently not available on all platforms
	(upstream ppc as an example).
	This patch allows the build to specify if openvswitch should be enabled
	or not (as a dependency to vdsm).

	Flag: --enable-openvswitch
	Enabled by default.

	Continuous-Integration: Jenkins CI

2016-06-01  Idan Shaby  <ishaby@redhat.com>

	storage: run blkdiscard before removing an lv
	This patch adds the ability to call blkdiscard after zeroing a volume
	and before the call to lvremove.
	The config value of discard_enable is false by default, to maintain the
	same behavior.

	Bug-Url: https://bugzilla.redhat.com/981626
	Continuous-Integration: Jenkins CI

2016-05-31  Nir Soffer  <nsoffer@redhat.com>

	lvm: Simplify locking, increasing concurrency
	We used a fancy operation mutex, which should have allowed concurrent
	cache invalidation or reload operations. Practically this mutex was
	serializing all (fast) invalidation operations once a (slow) reload
	operation was started. This caused invalidate/reload storms, blocking
	monitor threads for minutes, and finally causing a host to become
	non-operational because of high lastCheck values, while storage is in
	perfect condition.

	This patch replaces the fancy locking with single lock, taken when
	modifying cache state (fast), and released when running (slow) lvm
	operations. This locking should increase the number of concurrent lvm
	operations and avoid the long delays when trying to invalidate lvm
	cache, and decrease delays between storage domain monitor checks.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	misc: Remove unused readspeed function
	This code is replaced by vdsm.storage.check.CheckResult.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	monitoring: Use new monitoring infrastructure
	DomainMonitor is keeping now a checker object, providing path checking
	services. The checker starts with the domain monitor is created, and
	stopped when shutting down vdsm.

	Monitor threads use the checker to start checking the monitoring path
	during setupLoop, and stop checking when the thread is stopping.

	Since path checker events are received on a different thread, creating
	new status and updating it is done under a lock to races when evaluating
	status changes.

	For the same reason, we must check if the host id should be acquired
	both when finishing domain status check and path status check. Both
	checks run in different rate.

	The logic for acquiring a host id was enhanced to support partial
	status, which was not possible before.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	imageio: Start ovirt-imageio-daemon with vdsm
	Add ovirt-imageio-daemon to the wanted services, so it starts with vdsm.
	This service is needed for image uploading/downloading.

	Continuous-Integration: Jenkins CI

	imageio: Require ovirt-imageio packages
	- ovirt-imageio-common - used for importing vms from libvirt/kvm
	- ovirt-imageio-daemon - used for uploading/downloading images together
	                         with ovirt-image-proxy.

	Since the packages are available only in ovirt-repositories, we disabled
	them on rhev and koji builds. We will remove this once the package is
	available.

	Continuous-Integration: Jenkins CI

2016-05-31  Pavel Zhukov  <pzhukov@redhat.com>

	hooks: Allow overriding of configuration parameneters
	For some fcoe interfaces it's needed to change default configuration
	file.
	This change adds possibility to overwrite any of 4 existing parameters:
	- DCB_REQUIRED
	- AUTO_VLAN
	- MODE

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1334748

	Continuous-Integration: Jenkins CI

2016-05-31  Dan Kenigsberg  <danken@redhat.com>

	Revert "net: always persist owned ifcfg files on ovirt node"
	This reverts commit 3dd0baa02361ba90270eb94d660c4070b74cc421 which I
	believe is not needed, since change I02ae28c34511130 makes sure that
	ifcfg files are persisted right after being written.

	Bug-Url: https://bugzilla.redhat.com/1340234
	Continuous-Integration: Jenkins CI

2016-05-31  Martin Polednik  <mpolednik@redhat.com>

	rng: only teardown hwrng
	We should only teardown hwrng device, not any rng device.

	Reason for that is /dev/random is normally accessible to users within
	system, and therefore no specific permission control has to be done.
	On the other hand, hwrng is, by default, limited to 0700 root:root.

	Tearing down any rng device may change the permissions of /dev/hwrng
	right under running VMs hands.

	Continuous-Integration: Jenkins CI

2016-05-31  Edward Haas  <edwardh@redhat.com>

	net: Detect default route from kernel and not ifcfg
	The default route has been (sometimes) detected from the ifcfg
	files.
	It is prefered to detect the default route from the actual kernel
	configuration, removing the dependency from the ifcfg configurator.

	Continuous-Integration: Jenkins CI

2016-05-31  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	m2c: disable ssl debug
	We do not see any ssl related issues so we do not need to have it
	enabled by default.


	Continuous-Integration: Jenkins CI

2016-05-30  Nir Soffer  <nsoffer@redhat.com>

	tests: Use less fragile timeouts
	We used 0.01 timeouts when testing call_later order, which is too low
	for the monotonic clock used by the event loop, using 0.01 seconds
	resolution. Increase the value to 0.1 seconds which should never fail.

	Continuous-Integration: Jenkins CI

	build: Remove useless WHITELIST
	WHITELIST was used to compile scripts (without .py suffix) but
	compileall ignores files without .py suffix.

	Example:

	    $ echo "print 'invalid python 3'" > invalid
	    $ python3 -m compileall invalid
	    $ echo $?
	    0

	Continuous-Integration: Jenkins CI

	tests: Make run_tests scripts readable
	Use export to clean up the command, keeping one item per line and sort
	by key.

	This also add the missing logging format added to run_tests_local
	recently to run_tests.

	Continuous-Integration: Jenkins CI

2016-05-30  Fred Rolland  <frolland@redhat.com>

	systemd: Specify number of open file limit for vdsmd process
	Specify for vdsmd process the limit for open files.
	We have a specification in limits.conf, but it is setting limit
	for the vdsm user not for the process.

	The ulimit for the process can be checked in /proc/PID/limits
	(where PID is the vdsm pid)

	In commit I26345e 'BZ#769502 Move limit configuration to its proper
	place', the configuration moved from setting the limit from the python
	code using ulimit to limits.conf.

	Bug-Url: https://bugzilla.redhat.com/1339245
	Continuous-Integration: Jenkins CI

2016-05-30  Ala Hino  <ahino@redhat.com>

	core: Remove file=path workaround for live snapshot on block storage
	libvirt versions prior to 1.2.2 do not handle type='block' properly,
	and require VDSM to send the legacy file=path syntax too as can be
	seen in commit c49bb59300fc (virt: Restore BC for block type live
	snapshots). Since we require libvirt 1.2.8 (at least, depending on
	the platform), this workaround in vm.py is redundant, and should be
	removed.

	Bug-Url: https://bugzilla.redhat.com/1295429
	Continuous-Integration: Jenkins CI

2016-05-30  Dan Kenigsberg  <danken@redhat.com>

	netinfo test: give more info on failure
	We have an apparently random failures, where two addresses are attached
	to a device. Let us log the addresses to understand where they are
	coming from.

	Continuous-Integration: Jenkins CI

	ethtools hook: import bonding from netinfo package
	commit cc07896 transformed netinfo module into a package, but apparently
	did not check that all imports are accessible

	Bug-Url: https://bugzilla.redhat.com/1340454
	Continuous-Integration: Jenkins CI

2016-05-29  Nir Soffer  <nsoffer@redhat.com>

	monitoring: Port vdsm.storage.check to python 3
	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	monitoring: Introduce the check module
	This module provides event loop based infrastructure for scalable
	storage health monitoring. We plan to have a dedicated thread running
	all storage domain checkers, protected from blocking tasks performed on
	the storage domain monitor threads.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	monitoring: Add process helpers
	Add helpers for running processes using the event loop:

	BufferedReader   read data from file descriptor or a pipe and notify
	                 when the read was completed. Useful for collecting
	                 process output.

	Reaper           wait until process exits and return its exit code.
	                 Useful when process has closed th standard streams
	                 before terminating.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

2016-05-29  Edward Haas  <edwardh@redhat.com>

	net test: Resolve broken tests with gateway
	Fix tests that have set defaultRoute with missing gateway.

	In addition, these tests have created multiple networks with the same
	subnet, causing the default route to be detected on all of them.
	To resolve this last point, each network has been assigned its own
	subnet.

	Continuous-Integration: Jenkins CI

	net: Canonicalize defaultRoute
	If the defaultRoute is absent, set it as False at the api level.

	Continuous-Integration: Jenkins CI

2016-05-29  Federico Simoncelli  <fsimonce@redhat.com>

	storage: add support for blkdiscard command
	Related-To: https://bugzilla.redhat.com/981626
	Related-To: https://bugzilla.redhat.com/872530
	Continuous-Integration: Jenkins CI

	block: simplify zeroImgVolumes using threads
	Continuous-Integration: Jenkins CI

2016-05-29  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: fix list issue
	Yaml parser understands [] as list whereas it should be consistent with
	how we handle other collections.


	Continuous-Integration: Jenkins CI

2016-05-29  Nir Soffer  <nsoffer@redhat.com>

	build: Fix python3 check
	Since commit a31792a6bfe5 (Makefile: use tox to run make pep8 and
	pyflakes) we are feeding the rest of the makefile rule to the underlying
	command:

	    $ make python3
	    ...
	    Listing 'else'...
	    Can't list 'else'
	    Listing 'echo'...
	    Can't list 'echo'
	    Listing 'Warning: skipping python3 syntax check'...
	    Can't list 'Warning: skipping python3 syntax check'

	Continuous-Integration: Jenkins CI

	Revert "test: Introduce mock module for testing"
	This reverts commit 252fcad9d57c80883121a8385ca678341d6c0c96.

	This commit added python-mock as build dependency, but it seems that the
	package is not available on el7.

	The package is available in
	http://mirror.centos.org/centos/7/virt/$basearch/ovirt-3.6/

	But not in:
	http://cbs.centos.org/repos/virt7-ovirt-40-candidate/x86_64/os/

	This may be a repository issue, but we cannot required this for centos
	until this issue is fixed.

	It seem to be missing on RHEL, or maybe I'm missing the magic
	repository holding it.

	We can install this package using pip for automation, but we cannot
	require it for building vdsm. This also means that we cannot run the
	tests in make rpm on el7.

	Continuous-Integration: Jenkins CI

2016-05-28  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	api: fixing default value for GlusterVolume.create
	List was not available in DEFAULT_VALUES map and yaml parser makes a
	list from []. For other collections such as dict or tuple it makes a
	string so we need to make sure that for list it is a string as well.


	Continuous-Integration: Jenkins CI

2016-05-27  Idan Shaby  <ishaby@redhat.com>

	storage: organize imports in imageSharing.py
	Continuous-Integration: Jenkins CI

	storage: organize imports in devicemapper.py
	Continuous-Integration: Jenkins CI

2016-05-27  Nir Soffer  <nsoffer@redhat.com>

	build: Fail build if pep8 or pyflakes failed
	Since we moved to tox, pep8 and pyflakes failure are ignored. Use the
	shell -e option to fail on errors.

	Continuous-Integration: Jenkins CI

2016-05-26  Edward Haas  <edwardh@redhat.com>

	test: Introduce mock module for testing
	Mock is part of py3 std lib (under unittest package) with enhanced
	functionality to support mocking in tests.
	For py2, the python-mock package is used.

	Continuous-Integration: Jenkins CI

2016-05-26  Fred Rolland  <frolland@redhat.com>

	ioprocess: add debug on create/delete ioproc
	In order to better debug issues related to ioprocess,
	logs are added on creation and deletion of ioprocess.

	Continuous-Integration: Jenkins CI

2016-05-26  Amit Aviram  <aaviram@redhat.com>

	v2v: adjust to new image-daemon package name
	ovirt-image-daemon package name has changed to ovirt-imageio-daemon. fix
	the occurrences to that.

	Continuous-Integration: Jenkins CI

2016-05-26  Milan Zamazal  <mzamazal@redhat.com>

	virt: Mark PeriodicOperationTests.test_repeating_after_block as slowtest
	Continuous-Integration: Jenkins CI

2016-05-26  Adam Litke  <alitke@redhat.com>

	virt: Use libvirt to get drive size
	Due to a bug in libvirt versions 0.10.2 and below, we use qemu-img to
	discover the virtual size of a running VM's disk when live resizing it.
	Since all supported platforms depend on a libvirt with the fix, we
	should use the virDomainBlockInfo API to get the drive size.

	Bug-Url: https://bugzilla.redhat.com/1128855
	Continuous-Integration: Jenkins CI

2016-05-26  Edward Haas  <edwardh@redhat.com>

	net: D.Gateway should be set on a single net per host
	If the network is not set with a default gateway (defaultRoute flag set),
	the GATEWAY key should not be set in the ifcfg file.
	(The route for the network will be set using source route)

	Bug-Url: https://bugzilla.redhat.com/1338751
	Continuous-Integration: Jenkins CI

2016-05-26  Adam Litke  <alitke@redhat.com>

	tests: Remove duplicate import
	The vdsm.storage.constants module is already imported.  Remove the
	direct import of a single symbol and just reference the variable via tha
	module name.

	Continuous-Integration: Jenkins CI

	tests: Fix blockSD file layout
	In order to present a layout consistent with file based storage, block
	storage domains use a symlink from the storage repository
	(/rhev/data-center/<sp><sd>) to the mount directory
	(/rhev/data-center/mnt/blockSD/<sd>).  Because of this link other vdsm
	code (qemuimg.py) can access storage without caring if it's file based
	or block based.  This patch fixes the fake block storage layout to use a
	link like the real code does.

	TODO: Add some layout tests for this.

	Continuous-Integration: Jenkins CI

2016-05-25  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	gluster: broken import in api.py
	Continuous-Integration: Jenkins CI

2016-05-25  Francesco Romani  <fromani@redhat.com>

	tests: unbreak `make rpm'
	The commit b957535 broke `make rpm'.
	We need to ship the `tests_child.py' helper, otherwise we see the
	sigutils tests fail like

	  File "vdsm-4.18.0/tests/sigutils_test.py", line 108, in test_register_twice
	    with child_test('check_register_twice') as child:
	  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
	    return self.gen.next()
	  File "vdsm-4.18.0/tests/sigutils_test.py", line 51, in child_test
	    cwd=os.path.dirname(__file__)
	  File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
	    errread, errwrite)
	  File "/usr/lib64/python2.7/subprocess.py", line 1335, in
	_execute_child
	    raise child_exception
	OSError: [Errno 2] No such file or directory

	Verified on Fedora 23 and Centos 7.x

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-05-25  Nir Soffer  <nsoffer@redhat.com>

	tests: Isolate tests with permutations
	Single tests was using a loop to test multiple permutations, skipping
	the second test if the first failed. Use permutations to isolate the
	tests.

	Continuous-Integration: Jenkins CI

	tests: Fix flaky test
	The test is trying to test request timeout, when the server response is
	too slow. Because it was using very short timeout (0.01 seconds), it was
	triggering deadlock the server.

	To reproduce locally, I changed the timeout to 0.001 seconds. When the
	process get stuck, we can see two threads:

	Thread 2 (Thread 0x7fd77db42700 (LWP 30374)):
	/usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.py, line 217,
	in _read_bio
	    return m2.ssl_read(self.ssl, size, self._timeout)

	Thread 1 (Thread 0x7fd785d1e700 (LWP 30369)):
	/usr/lib64/python2.7/SocketServer.py, line 251, in shutdown
	    self.__is_shut_down.wait()

	Thread 2 is blocked on ssl_read that will never receive any data since
	the client timed out, and the other thread is waiting on the server's
	__is_shutdown event, which will never return.

	This may be an issue in M2Crypto or in our testing server, but these
	tests are for the client, not the server.  Fix the tests by increasing
	the timeout on both the server and the client.

	Continuous-Integration: Jenkins CI

2016-05-25  Edward Haas  <edwardh@redhat.com>

	test net: Canonicalize network attributes in conf_persistence
	Continuous-Integration: Jenkins CI

2016-05-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove childUmask parameter from cpopen
	For some reason we kept the unused parameter after
	https://gerrit.ovirt.org/#/c/48538/

	Continuous-Integration: Jenkins CI

2016-05-25  Nir Soffer  <nsoffer@redhat.com>

	tests: vdscli tests do not require root
	Continuous-Integration: Jenkins CI

2016-05-24  Nir Soffer  <nsoffer@redhat.com>

	monitoring: Introduce the asyncevent module
	This module provides a simple asyncore based event loop based on the
	asyncio.BaseEventLoop from Python 3. This module will be used for new
	storage domain monitoring and for replacing code using bare epoll and
	poll.

	This module is compatible with both Python 2 and 3.  When we require
	Python 3, we can drop this module and simplify client code using asyncio
	coroutines.

	Although this is a generic infrastructure, keeping it in storage until
	it is needed in other parts. The event loop may replace the vmchannels
	and yajsonrpc event loops.

	Since this file was mostly copied from Python 3, it is licensed under
	the python license.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	tests: Improve monitor tests names
	We have tests for domain status errors (using permutations), and for
	path status errors. Rename both in consistent way:

	    test_from_xxx_to_yyy_domain
	    test_from_xxx_to_yyy_path

	Continuous-Integration: Jenkins CI

	monitor: Separate path status and domain status
	Introduce two classes:

	PathStatus      the status of checking domain monitoring path.
	                Collecting this status can block only if the storage is
	                not accessible.

	DomainStatus    the status collected from the storage domain object.
	                Collecting this status may block for long time because
	                unrelated threads are holding global locks in vdsm.

	The Status class wrap both objects and provides an unified view of the
	monitor status, required for satisfying the code reporting storage
	domain status, and for emitting status changes events.

	We update the status twice for each monitoring cycle; once after
	collecting path status, and once after collecting domain status. When
	path checking is moved to new path checking infrastructure, this will
	allow updating path status regardless of domain status check state.

	For status changes, we keep the old behavior:
	- When the first check completes we emit a change event. If both path
	  status and domain status succeeded, we emit a VALID event, and if any
	  of them failed, we emit INVALID event.
	- If path status check or domain status check fail and last status was
	  valid, we emit a INVALID event.
	- When both path status check and domain status check succeed and last
	  status was invalid, we emit VALID event.

	Note that now we perform path status check before domain self test; we
	cannot keep the old order since path status must be separated from
	operations accessing the storage domain object.

	Continuous-Integration: Jenkins CI

	monitor: Simplify Status class
	Remove the unneeded __slots__ since we do not manage many status
	objects.

	Remove FrozenStatus as it is not needed. The new status implementation
	will make the status read only in another way.

	Continuous-Integration: Jenkins CI

	monitor: Separate setup from monitor loop
	We have two implicit states in the monitor:

	- setup         produce the domain and get iso domain prefix. If an
	                exception is raised doing this, we set the monitor
	                status error and try again in the next monitoring loop.

	- monitor       perform various checks on the domain and update the
	                status. In this state we also check and acquire the
	                domain host id if needed. We also refresh the domain
	                object if needed.

	This patch refactor the code so these states are explicit, and the code
	we run in each state is smaller and easier to grasp. This also make it
	easier to integrate with new path checking infrastructure.

	Continuous-Integration: Jenkins CI

	monitor: Eliminate nextStatus instance variable
	Preparing for separate domain status, collected by the monitor thread
	and path status, collected by the path checking thread.  Status is
	created now in _monitorDomain and passed to collecting methods for
	adding status.

	Continuous-Integration: Jenkins CI

	monitor: Detach read delay from storage domain
	We used to call StorageDomain.getReadDelay() to perform a read delay
	check every 10 seconds. Because the domain object is a proxy, accessing
	readDealy can block for unlimited time if the real domain object is not
	int the sdCache cache, blocking on the refreshStorage sampling method.

	This can lead to blocking of file based storage domain monitoring
	because the thread holding the refreshStorage lock is performing a
	scsi/fc scan.

	This patch moves getting read delay into the monitor thread. Once we
	produce a domain object, we get and store the domain monitoring path.
	From this point, performing a read delay does not access the domain
	object and can block only if this particular storage domain is not
	accessible.

	Continuous-Integration: Jenkins CI

	tests: Add monitor thread tests
	Add tests before we refactor MonitorThread for new monitoring
	infrastructure.

	To allow testing refresh timeout, we parse is now as float instead of
	int. This is backward compatible with old code but allow very short
	timeouts during the tests.

	These tests cover close to 100% of the MonitorThread class, which we
	plan to modify heavily. We have no test for the DomainMonitor class, but
	we do not plan any significant change in this class.

	To make the test robust even on slow CI machines, a callback was added
	to the monitor thread. If the callback is set, the monitor calls it once
	after finishing a monitoring cycle. The tests use this callback to
	synchronize with the monitor thread.

	Continuous-Integration: Jenkins CI

	tests: Add more detailed log format
	Use nosetests --logging-format to set a more detailed log format, making
	it easier to debug complex tests such as storage monitoring tests.

	The default nose logger use this unhelpful format:

	    storage.check INFO Starting check service

	With this patch, we see also a timestamp and the thread name and the
	logs are nicely indented:

	    2016-05-23 15:02:25,399 DEBUG   [test] (MainThread) created file '/var/tmp/tmphqUWwY/metadata'
	    2016-05-23 15:02:25,399 INFO    [storage.check] (MainThread) Starting check service
	    2016-05-23 15:02:25,399 INFO    [storage.asyncevent] (Thread-4) Starting eventloop
	    2016-05-23 15:02:25,399 DEBUG   [Storage.Monitor] (Thread-5) Domain monitor for uuid started

	Continuous-Integration: Jenkins CI

2016-05-24  Amit Aviram  <aaviram@redhat.com>

	imagetickets: adjust to new image-daemon package name.
	ovirt-image-daemon package name has changed to ovirt-imageio-daemon. fix
	the occurrences to that.

	Continuous-Integration: Jenkins CI

2016-05-24  Francesco Romani  <fromani@redhat.com>

	migration: early exit when stopped
	Exit early and avoid scary but benign stacktraces if
	the migration is stopped.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	migration: decorate with utils.traceback()
	Make sure to log exceptions in the migration
	monitoring.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	migration: make MonitorThread own DowntimeThread
	A future patch wants to tune the legacy downtime thread lifecycle
	to work more efficiently with QEMU iterations during migrations.
	To make this easier, we make monitorThread own the downtimeThread
	lifecycle.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	migration: wait for monitor thread before to exit
	We want to make sure to not leave the monitor thread
	around when migration stops, to avoid races on migration end.

	We don't care about downtime thread now because a future patch
	will take care of it.

	Continuous-Integration: Jenkins CI

	migration: add 'ongoing' property to Progress
	Add the 'ongoing' property to report in a clearer way
	if the migration.Progress is actually ongoing or not.
	Previously, the client code had to check for the
	underlying libvirt job type, which works but it is less
	expressive.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	migration: store the complete Progress instance
	track the last Progress instance fully, not just the
	last progress percentage.
	This will allow future simplifications in the migration
	monitoring code.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	migration: move helper into Progress class
	move the update_progress() helper inside
	the new migration.Progress class with no intended
	changes in behaviour.

	Additionally, now that we have the percentage
	property in the Progress class, we can enhance its
	__str__ magic method to be fully expressive, instead
	of logging half of information in the
	client code and half in the class itself.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	vm: devices: handle no alias if balloon model=none
	A disabled balloon device is translated to the XML
	element

	  <memballoon model="none" />

	in the domain XML Vdsm send to libvirt. In this case,
	libvirt should not give back an alias for this device,
	but it does.
	On restart, however, that alias is lost.
	But Vdsm still expects one alias to be present, so
	the recovery fails with

	  File "/usr/share/vdsm/virt/vm.py", line 4121, in
	_getUnderlyingBalloonDeviceInfo
	    alias = x.getElementsByTagName('alias')[0].getAttribute('name')
	IndexError: list index out of range

	The end result is that the VM is recovered, but reported 'paused',
	while is actually running fine.

	This patch makes Vdsm handle balloon devices without alias.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1335840
	Continuous-Integration: Jenkins CI

2016-05-24  Petr Horáček  <phoracek@redhat.com>

	net: do not call stop() inside monitor context manager
	We should not call monitor.stop() inside monitor context manager.
	Context manager calls stop() automatically when it returns.

	If we call it explicitly it might be called twice and raise an
	Exception.

	Bug-Url: https://bugzilla.redhat.com/1338818
	Continuous-Integration: Jenkins CI

2016-05-23  Nir Soffer  <nsoffer@redhat.com>

	tests: Add @maybefail decorator
	This decorator is useful for simulating errors in fake objects. The
	decorated method will raise the exception stored in the instance's
	errors dict for the method name.

	Continuous-Integration: Jenkins CI

	tests: Add FakeStorageDomainCache class
	For testing domain monitor, we need to fake sdc.StorageDomainCache. This
	is also needed in new sdm tests (https://gerrit.ovirt.org/57055).

	Continuous-Integration: Jenkins CI

2016-05-23  Irit Goihman  <igoihman@redhat.com>

	infra tests: moved infra tests to tests directory
	infra tests were located with infra source code and were
	moved to tests directory in order to be consistent with the rest
	of the project.
	some changes were made in the tests so they can be run with
	run_test_local.sh.

	Continuous-Integration: Jenkins CI

2016-05-23  pkliczewski  <piotr.kliczewski@gmail.com>

	yml: return type fixes for Host.getCapabilities
	Continuous-Integration: Jenkins CI

	yml: return type fixes for Host.getStats
	Continuous-Integration: Jenkins CI

2016-05-23  David Caro  <dcaroest@redhat.com>

	ci:Lago 0.17 was released, moving again to stable
	Continuous-Integration: Jenkins CI

2016-05-23  Allon Mureinik  <amureini@redhat.com>

	spec: Clean up lvm2 dependency on ELs
	As Centos 7.2 provides lvm2-2.02.130 [1], there's no reason to maintain
	the distinction in the spec file, and the lvm2 requirement can be
	unified for both ELs.

	[1] http://mirror.centos.org/centos/7/updates/x86_64/Packages/

	Continuous-Integration: Jenkins CI

	spec: Require kernel to solve bnx2fc corruption
	kernel-3.10.0-327.18.1.el7 solves a corruption in the bnx2fc driver
	used for FCoE. This patch requires the aforementioned kernel release
	so that FCoE can be safely used on VDSM hosts (via the hook introduced
	in commit 16cb9db).

	Note that as this kernel is available for both RHEL and CentOS[1] 7.2,
	there's no reason to maintain the separation between the two in the
	spec file, and it may be cleaned up to have a single kernel
	dependency for all the ELs.

	[1] http://mirror.centos.org/centos/7/updates/x86_64/Packages/

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1338543
	Continuous-Integration: Jenkins CI

2016-05-22  Edward Haas  <edwardh@redhat.com>

	net: Netlink monitor queue PY3 compatability
	Continuous-Integration: Jenkins CI

2016-05-19  Petr Balogh  <pbalogh@redhat.com>

	code coverage: add coverage for supervdsmServer
	In our QE jobs we would like to see also coverage report for supervdsm.
	I found out that there are missing lot of coverage, because if we run
	coverage in vdsm, it's not enough for cover all code/subprocess which
	vdsm/supervdsm runs. Regarding to [1], I moved coverage into
	sitecustomize.py which give us more accurate coverage reports.

	[1] http://coverage.readthedocs.io/en/coverage-4.0.3/subprocess.html?highlight=sitecustomize

	Continuous-Integration: Jenkins CI

2016-05-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Move code of the host stats dict creation from API.py to host.api module
	Continuous-Integration: Jenkins CI

2016-05-19  Adam Litke  <alitke@redhat.com>

	Move blockVolume constants to storage constants
	The blockVolume module defines many general purpose constants needed for
	manipulating block storage.  Unfortunately, importing this module can
	cause circular dependencies.  Move the constants to
	vdsm.storage.constants in order to reduce the need for importing this
	module from other code.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	tests: Fix FakeDomainManifest implementation
	A previous refactoring patch missed the sdm create_volume test module.
	The volume class for the fake storage domain should be
	FileVolumeManifest not FileVolumeMetadata.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	Move VolumeMetadata to vsdm.storage
	To avoid circular dependencies and better organize common storage code,
	move the VolumeMetadata class into the vdsm.storage package.

	Continuous-Integration: Jenkins CI

	Move Volume MD fields to storage constants
	volume.py is imported by many other modules for its constants.  This can
	cause circular dependencies.  Move the constants to
	vdsm.storage.constants which will reduce the need for modules to import
	volume.py.  This patch moves the constants related to the volume
	metadata field names.

	Continuous-Integration: Jenkins CI

	Move volume type constants to constants module
	volume.py is imported by many other modules for its constants.  This can
	cause circular dependencies.  Move the constants to
	vdsm.storage.constants which will reduce the need for modules to import
	volume.py.  This patch moves the constants related to identifying and
	describing volume types.

	Continuous-Integration: Jenkins CI

	Import storage constants as sc
	We have two constants modules: vdsm.constants and
	vdsm.storage.constants.  The storage constants must be imported with a
	different name but storage_constants is too long given the amount of use
	this name will see throughout the code.  Adopt the convention used for
	storage_exceptions (se) and use sc as the name.  Do so uniformly to
	increase readability.

	Continuous-Integration: Jenkins CI

2016-05-18  Nir Soffer  <nsoffer@redhat.com>

	tests: Simplify DirectFile tests
	For diretio we support only full blocks, so using generated data aligned
	to block size simplifies the tests.

	Use permutations to test combinations that were not tested before.

	Continuous-Integration: Jenkins CI

	blockSD: Fix busy loop when zeroing image volumes
	We used to wait on the wrong file descriptor (stdout, writing to image),
	using the wrong mask (EPOLLHUP when using poll).

	The result - vdsm consume 100% cpu when zeroing image:

	Tue May 17 01:33:57 2016    vdsmd.prof

	         310515403 function calls (310560288 primitive calls) in 377.096 seconds

	   Ordered by: internal time
	   List reduced from 3173 to 20 due to restriction <20>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	 37946430   74.674    0.000  257.590    0.000 commands.py:302(AsyncProc.wait)
	        1   65.338   65.338  357.741  357.741 blockSD.py:229(zeroImgVolumes)
	 37947222   54.932    0.000   54.932    0.000 posix:0(waitpid)
	 37946448   38.780    0.000  159.845    0.000 commands.py:284(AsyncProc.returncode)
	 37946441   38.363    0.000   93.210    0.000 subprocess.py:1344(CPopen._internal_poll)
	 38034684   35.044    0.000   35.045    0.000 __builtin__:0(poll)
	 37946441   27.856    0.000  121.065    0.000 subprocess.py:803(CPopen.poll)
	 75928952   23.096    0.000   23.096    0.000 time:0(time)

	Fixed by watching stderr, where the stats are written at the end, using POLLIN.

	This fix is mainly for 3.6, for 4.0 we want to drop this buggy code and
	replace it with simpler thread based code.

	Bug-Url: https://bugzilla.redhat.com/1337314
	Continuous-Integration: Jenkins CI

	monitor: Pass change event to monitor threads
	We used to pass the DomainMonitor object to MonitorThread, so the thread
	can emit state change events using the domain monitor's
	onStageChangeEvent instance variable. This couple together the objects
	and make them harder to test for no benefit.

	Now we pass the onStateChangeEvent object to the monitor threads so they
	can emit events.

	Continuous-Integration: Jenkins CI

2016-05-18  David Caro  <dcaroest@redhat.com>

	Adapting to latest lago 0.17
	The move to the lago unstable repo will be reverted as soon as the lago
	0.17 is released

	Continuous-Integration: Jenkins CI

2016-05-18  Martin Polednik  <mpolednik@redhat.com>

	cdrom: API change: require interface & index
	Previously, changeCD call did not require anything but path to an
	image. This works fine as long as there is only single type of
	cdrom for one architecture (and set number of cdroms & architectures).

	As we slowly move towards using q35 machine type, we have to plan how
	to fix the cdrom since q35 does not support IDE bus. Solution that
	allows different cdrom buses is requiring interface and index, as these
	can uniquely identify cdrom in a system.

	Continuous-Integration: Jenkins CI

	virt: set correct permissions for hwrng device
	When using hwrng, the default permissions are 0600 root:root to it's endpoint
	(/dev/hwrng). VDSM must allow qemu process to access hwrng, otherwise
	the VM startup would fail.

	Bug-Url: https://bugzilla.redhat.com/1260686
	Continuous-Integration: Jenkins CI

2016-05-18  Nir Soffer  <nsoffer@redhat.com>

	tests: Add missing test for concurrent.thread
	Test that we can pass both args and kwargs in the same call.

	Continuous-Integration: Jenkins CI

2016-05-17  Idan Shaby  <ishaby@redhat.com>

	storage: move hba.py to vdsm storage lib
	This patch moves the module vdsm/storage/hba.py to
	lib/vdsm/storage/hba.py.

	Continuous-Integration: Jenkins CI

2016-05-17  Nir Soffer  <nsoffer@redhat.com>

	storage: Organize imports in storage.iscsiadm
	Continuous-Integration: Jenkins CI

	storage: Organize imports in storage.sdc

	storage: Organize imports in storage.threadPool
	Continuous-Integration: Jenkins CI

	storage: Organize imports in storage.imagetickets
	3rd party libraries such as ovirt_image_daemon should appear before vdsm
	library modules.

	storage: Fix copyright years in storage.imagetickets
	This module does not cotain any code from 2009.

	storage: Organize imports in storage.outOfProcess
	Continuous-Integration: Jenkins CI

	storage:  Move threadLocal module to vdsm storage lib
	Move storage.threadLocal to vdsm.storage.threadlocal

	Continuous-Integration: Jenkins CI

2016-05-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Move hoststats code to host package
	Continuous-Integration: Jenkins CI

2016-05-17  Martin Polednik  <mpolednik@redhat.com>

	virt: add kernel cmdline reporting
	As we want to control kernel command line from ovirt, we need a way to
	let users (and us) see if the changes are successfully applied. We
	approach this by reporting kernel command line from /proc/cmdline
	without any modifications, allowing for relatively easy debugging.

	Name kernelArgs was chosen as we already refer in the same way to guest
	kernel arguments.

	Also, using this patch as an opportunity to boostrap osinfo tests.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1301104
	Continuous-Integration: Jenkins CI

2016-05-17  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: add gluster heal info verb
	  Add gluster heal info to get list of unsynced entries
	present in the given gluster volume.

	Continuous-Integration: Jenkins CI

2016-05-17  Martin Polednik  <mpolednik@redhat.com>

	vmtests: use assertXMLEqual in assertBuildCmdline
	Test method assertBuildCmdline worked around whitespace in it's own
	way. We have AssertXMLEqual for that, leading to a more consistent code.

	Continuous-Integration: Jenkins CI

2016-05-17  Yeela Kaplan  <ykaplan@redhat.com>

	Makefile: use tox to run make pep8 and pyflakes
	Restrict the version vdsm uses to validate the code by
	pep8 and pyflake, instead of using installed version.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1182088
	Continuous-Integration: Jenkins CI

2016-05-17  Tomas Jelinek  <tjelinek@redhat.com>

	migration: log the convergence schedule only if provided
	No need to flood the logs with logs which don't give any added value.

	Continuous-Integration: Jenkins CI

2016-05-17  Irit Goihman  <igoihman@redhat.com>

	tests: both Python2 and Python3 are default in Makefile
	Until now, all tests run in Python2 by default and only
	tests in whitelist also support Python3.
	From now on, all tests, except blacklist will run in
	Python2 and Python3.

	Continuous-Integration: Jenkins CI

2016-05-17  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix rmAppropriateSCSIDevice in reattach
	rmAppropriateSCSIDevice also requires name argument. This slipped as we
	removed reattaching host devices.

	Continuous-Integration: Jenkins CI

2016-05-17  Petr Horáček  <phoracek@redhat.com>

	net: fake OVS networks as bridgeless
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: consume OVS netinfo by CachingNetInfo
	In order to use KernelConfig, we have to introduce special handling
	in CachingNetInfo for OVS networks. This handling should become
	standard when we report 'nics', 'bond' and 'vlanid' in legacy netinfo
	networks.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-05-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using pkgutil instead of redundant private funcs in configurator
	Added dynamic module import module to be used wherever modules are
	loaded to avoid code duplication.

	Continuous-Integration: Jenkins CI

2016-05-17  Martin Polednik  <mpolednik@redhat.com>

	hostdev: teardown non-scsi devices
	We have previously removed tearing down host devices due to issues with
	some PCI devices. We should still teardown non-pci devices to avoid
	having wrong permissions on usb/scsi udev files - there are no known
	problems with SCSI or USB drivers.

	Continuous-Integration: Jenkins CI

2016-05-17  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: ad_actor_system can not be reset to its default value
	_restore_default_bond_options tried to reset this option to
	00:00:00:00:00:00, which (on Fedora 23) causes "IOError: [Errno 22]
	Invalid argument", during testSetupNetworksActiveSlave.

	Linux documentation (bonding.txt) says that "The value can not
	be either NULL or Multicast".

	Let's add ad_actor_system to EXCLUDED_BONDING_ENTRIES for now
	and assume that if a user set ad_actor_system explicitly, she
	knows the way to reset it, and that is by setting it to the bond's
	own MAC address:

	  In an AD system, this specifies the mac-address for the actor in
	  protocol packet exchanges (LACPDUs). The value cannot be NULL or
	  multicast. It is preferred to have the local-admin bit set for this
	  mac but driver does not enforce it. If the value is not given then
	  system defaults to using the masters' mac address as actors' system
	  address.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-05-17  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix scsi udev rule target
	Previously, the rule worked as expected but did not properly signal
	ownership of the device. That is now fixed with kernel and subsystem
	targets.

	The cause does not affect functionality of hostdev-scsi, but causes the
	rule to be triggered with all udev updates - leading to useless chown
	execution.

	Continuous-Integration: Jenkins CI

2016-05-17  pkliczewski  <piotr.kliczewski@gmail.com>

	json: removal of old schemas
	Continuous-Integration: Jenkins CI

2016-05-16  Idan Shaby  <ishaby@redhat.com>

	storage: move clusterlock.py to vdsm storage lib
	This patch moves the module vdsm/storage/clusterlock.py to
	lib/vdsm/storage/clusterlock.py.

	Continuous-Integration: Jenkins CI

	storage: move fuser module to vdsm storage lib
	This patch moves the module vdsm/storage/fuser.py to
	lib/vdsm/storage/fuser.py.

	Continuous-Integration: Jenkins CI

2016-05-16  Martin Polednik  <mpolednik@redhat.com>

	vmdevices: make disk's makeName public
	makeName is a function that can create udev path to storage device
	based on it's index and interface. Making it public exposes it to VM
	paths, where it is required for followup changeCD changes.

	Continuous-Integration: Jenkins CI

2016-05-16  Dominik Holler  <dominik.holler@gmx.net>

	    AUTHORS: adding Dominik Holler
	    Adding myself.

	Continuous-Integration: Jenkins CI

2016-05-16  Nir Soffer  <nsoffer@redhat.com>

	monitor: Use module logger
	Currently we have two classes using the same logger, and I want to
	extract new classes that will use the same logger. Replace class based
	logger with module logger.

2016-05-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding configure requirements for py3
	Continuous-Integration: Jenkins CI

2016-05-16  Dan Kenigsberg  <danken@redhat.com>

	m4/ax_python_module.m4: do not overwrite PYTHON
	the PYTHON environment variable is overly useful in the configure
	script. AX_PYTHON_MODULE should not overwrite it while testing a
	specific module existence.

2016-05-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Uploading new m4/ax_python_module.m4
	The code is updated for awhile. this patch copies last version of it:
	http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=b4b57ec0863e56960e9eb5dae726391134e21293

	Continuous-Integration: Jenkins CI

2016-05-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Rename storage.monitor test module
	We use storage_modulename_test.py now.

	Continuous-Integration: Jenkins CI

2016-05-16  Dominik Holler  <dominik.holler@gmx.net>

	netinfo: improve the list of vlan devices on top of an interface.
	The current code assumed that all links on top of an interface are vlan
	links. Since the links could also be of an other type, e.g. veth, the
	current implementation does not behave correctly for links of an other
	type but vlan.

	The improvement is that now we will check if link is of type vlan.

	Continuous-Integration: Jenkins CI

	netinfo: improve the detection if device has VLAN devices on top.
	The current code assumed that the VLAN device respects the naming
	convention of nameOfUnderlyingDevice.VlanId. Since this convention is
	not enforced, the detection fails if the device has VLAN devices on top,
	which do not respect this naming convention.

	The improvement is that now we will check if the device is the used
	device by any link of the netlink library.

	Continuous-Integration: Jenkins CI

2016-05-16  Edward Haas  <edwardh@redhat.com>

	net virt: virt calls should pass through netork.api
	Access from virt to network should pass through the network api
	and avoid accessing internal network modules.

	Continuous-Integration: Jenkins CI

	net: Relocate libvirt nets read to network.libvirt
	Libvirt networks have been read through the netinfo package.
	The service of reading the libvirt networks is used by other
	packages and modules, that do not need netinfo.

	In order to reduce coupling and dependency between modules,
	libvirt related network functionality is being centralized in
	network.libvirt module.
	Libvirt networks read is moved therefore to the libvirt module,
	making it also clear about what networks are reported.

	Continuous-Integration: Jenkins CI

2016-05-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Install nose-1.3.7 always using pip
	In epel7 yum provides only nose-1.3.0 officially. in automation script
	we use NOSE_COVER_PACKAGE flag which does not exist in this nose
	version. To align versions in CI we use pip to install specific version.

	For developers run using make the nose version is not relevant, unless
	they run coverage.

	Continuous-Integration: Jenkins CI

2016-05-16  pkliczewski  <piotr.kliczewski@gmail.com>

	bridge: data verification
	We provide incoming and outgoing data verification with the schema.
	There are two modes how we inform about discrepancies between schema and
	data. We either log a warning or raise an error. This behavior can be
	configured in config.py using api_strict_mode setting.

	Continuous-Integration: Jenkins CI

	bridge: usage of yaml schema
	With this patch we use newly provided yaml schema as base to analyze
	incoming requests and calling verbs.

	Continuous-Integration: Jenkins CI

2016-05-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Separate broken test from good tests
	In commit 29fa0abb687d (storagetests: add a test for
	normalize_local_path) we added a new failing test for path ending with
	slash. To keep the build successful, the test was marked as @brokentest.
	However, since this test uses permuations, all the tests were marked
	broken, instead of only the new test.

	Separate the failing tests from the other, so the good tests will fail
	the build when they fail.

	Continuous-Integration: Jenkins CI

2016-05-16  Martin Polednik  <mpolednik@redhat.com>

	storage: add LegacyCdromPath as DriveSpec
	Engine sends DriveSpec as a string at least one case: changeCD. Since
	we have to be api compliant with older engines, we have to add this
	case to the API. It is done by adding a str alias, LegacyCdromPath.

	Continuous-Integration: Jenkins CI

	storage: extend drives name to allow sata interface
	SATA is widely used physical interface for storage devices. The
	interface uses SCSI protocol, making it similar to SCSI itself in
	terms of naming, but libvirt distinguishes the physical interfaces.

	We therefore add SATA name generation to properly support SATA devices.

	Continuous-Integration: Jenkins CI

2016-05-16  Edward Haas  <edwardh@redhat.com>

	net: Move libvirt module under network
	The neworking libvirt module has been located under the network
	configurators, however it's not really a network configurator.
	There is also a need to use the module from other networking
	packages/modules, like the networking api and netswitch.

	Moving libvirt module from network.configurators to network.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: Expose existing ip address info through the api
	Access to network package should pass through network.api.

	Virt uses the ip address report (from netinfo.addresses.getIpInfo).
	This patch exposes it through network.api.ip_addrs_info.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-05-16  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: explain why we have to reset bonding options to default
	Related-To: Ibe720674e63119e954265735e9f5ccb994c3531a
	Continuous-Integration: Jenkins CI

2016-05-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Introduce vdsm.host package for all host related code
	Continuous-Integration: Jenkins CI

2016-05-16  emesika  <emesika@redhat.com>

	vdsm: return error when status cmd fail
	This patch fixes an issue in the case that status command fails.
	In that case, the code returned a 0 error code which masks the error
	message.
	To fix that, the real error code is returned in the case that the status
	is not 'on' or 'off'

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1325664
	Continuous-Integration: Jenkins CI

2016-05-16  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Revert "tests: Mark new bridge test as broken"
	There was a patch pending to be merged and it was merged. This
	test should work now.

	This reverts commit a868b3386bbd2332bca2f62b49560d4c609d2eef.

	Continuous-Integration: Jenkins CI

2016-05-16  Pavel Zhukov  <pzhukov@redhat.com>

	hooks: Add fcoe hook
	This hook is used to enable fcoe on one or several network interfaces

	Bug-Url: https://bugzilla.redhat.com/1334745
	Continuous-Integration: Jenkins CI

2016-05-15  Idan Shaby  <ishaby@redhat.com>

	storage: move misc module to vdsm storage lib
	This patch moves the module vdsm/storage/misc.py to
	lib/vdsm/storage/misc.py.

	Continuous-Integration: Jenkins CI

2016-05-15  Dan Kenigsberg  <danken@redhat.com>

	netinfo: unbreak master
	recently merged commit 5f3c2a7d0ca5 was not rebased on top of the module
	movement of commit ef9926827.

	Continuous-Integration: Jenkins CI

2016-05-15  Petr Horáček  <phoracek@redhat.com>

	net: canonicalize network before broken network removal
	If a network is removed via _del_broken_network, we do not canonicalize
	and therefore setup can fail in a following code which expects certain
	format.

	This patch adds canonicalization to _del_broken_networks().

	Continuous-Integration: Jenkins CI

	net: report expected devices in OVS netinfo
	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: OVS netinfo
	Map OvsInfo to netinfo format used by netinfo.cache:get()

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-05-15  Liron Aravot  <laravot@redhat.com>

	sp: race in domains upgrade prevents further pool upgrades
	When executing _upgradePool() a callback a domain upgrade callback
	is registered to the domain monitor and an initial update thread is
	started for each of the domain in self._domainsToUpgrade (which contains
	the active pool domains).

	Whenever upgrade for domain is ended, the upgrade thread deletes the domain
	from self._domainsToUpgrade, which is racey because that might happen while
	we still iterate over the list. If that does happen, the results are unexpected
	and on some inspected cases we didn't start the upgrade threads for all the
	domains which causes to a bug - an update will be considered running and
	no further pool upgrades could be initiated.

	This patch copies the list to a temporary list before attempting to register
	the callback/start the upgrade threads and by that avoiding that race.

	this solution is simple as its targeted to the 3.6 branch, a more complete
	solution which will also allow concurrent updates is introduced in
	I8e14a3aa33bfab4751ab5d1e3becbeda892da4c3

	Bug-Url: http://bugzilla.redhat.com/1319523
	Continuous-Integration: Jenkins CI

2016-05-15  Francesco Romani  <fromani@redhat.com>

	virt: graphics: enforce spice default mode
	Libvirt grants one additional protection layer for spice channels,
	using the `defaultMode' attribute for the graphics device.
	As the name hints, this allows us to select the default mode (secure,
	insecure) for SPICE channels, if not explicitely specified.

	This patch makes Vdsm use this attribute for improved security,
	depending on the 'ssl' config value.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	schema: yml: fix virt glitches
	Fix minor issues that slipped in during the translation.

	Continuous-Integration: Jenkins CI

2016-05-15  Martin Polednik  <mpolednik@redhat.com>

	storage: add block device naming tests
	Continuous-Integration: Jenkins CI

2016-05-14  Martin Betak  <mbetak@redhat.com>

	migration: dynamic setting of {in,out}bound limits
	Allow updates of incoming/outoging migration bounds as a part of the migrate
	verb. The new values for these bounds are sent as part of the migrate because
	it is best time for the engine to update them (just before they will be
	actually applied - both on source and destination) and also enables us to
	easily differentiate between migrations from older sources (< 4.0) that don't
	send this bound to destination so we can preserve backwards compatibility with
	the new migration retry logic.

	Continuous-Integration: Jenkins CI

2016-05-13  Nir Soffer  <nsoffer@redhat.com>

	monitor: Convert valid to read-only property
	Status.valid was a duplicate of Status.error. This could lead to
	inconsistent state if one of the attributes is not synced with the
	other. Now valid is a property based on Status.error.

	Continuous-Integration: Jenkins CI

2016-05-13  Adam Litke  <alitke@redhat.com>

	storage: Do not reference image dir in backing volume path
	Until now, the backing volume path (to be written into qcow2 metadata)
	was computed as ../<imgUUID>/<volUUID>.  The ../<imgUUID> component
	causes the backing_chain field of volumes to grow every time a live
	merge is performed until it eventually overflows.  The blockSD function
	createImageLinks is now ensuring that all volumes of an image (including
	templates) are in a directory together so we can use just the volume ID
	to reference the backing volume.  File domains hard link templates into
	the directories of images that are dependent so this works for file
	domains as well.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1333627
	Continuous-Integration: Jenkins CI

2016-05-13  Nir Soffer  <nsoffer@redhat.com>

	tests: Mark new bridge test as broken
	In commit acc19386f66d (rpc: Add test for 'int' parameters in Bridge) we
	added a new test, which fails consistently on the CI and locally.

	The test adds a fake api with 3 arguments, while the schema specify only
	2 arguments, so the new api is called with a missing argument, raising
	InvalidCall.

	Marked as broken for now as it breaks the build.

	Continuous-Integration: Jenkins CI

2016-05-12  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: Detect VM with snapshots
	virt-v2v cannot properly handle conversion of VMware machine with
	snapshots. Engine needs a way to know which machines have snapshots and
	which do not to filter them out and/or notify the user.

	Note: The snapshot related API is not yet implemented in libvirt Xen
	driver. It is missing in all libvirt version to date (v1.3.4).

	Continuous-Integration: Jenkins CI

2016-05-11  Idan Shaby  <ishaby@redhat.com>

	storagetests: add a test for normalize_local_path
	This patch adds a legitimate test permutation to
	MountConnectionTests.test_normalize_local_path.
	Since the new permutation breaks the test, it was marked as
	@brokentests.

	Related-To: https://bugzilla.redhat.com/1305529
	Continuous-Integration: Jenkins CI

2016-05-11  Adam Litke  <alitke@redhat.com>

	storage: Add basic BlockVolumeArtifacts
	This patch adds the block specific support for the VolumeArtifacts
	interface.  A BlockVolumeArtifact is first created by adding an LV with
	a special tag.  It is comitted to a BlockVolume by removing that tag.

	Continuous-Integration: Jenkins CI

2016-05-11  Edward Haas  <edwardh@redhat.com>

	virt net: Seperate sriov special domxml conf
	Minor changes in code have been apllied to clearly seperate sriov
	specific config.
	The VLAN tag section has been moved to sriov specific, as it is relevant
	only there.

	Continuous-Integration: Jenkins CI

2016-05-11  Petr Horáček  <phoracek@redhat.com>

	net: OVS Info
	Gather informations about OVS networks. Output of this object reflects
	current OVS configuration: bridges and their ports.

	This will be mapped to fake netinfo expected by Engine and the rest
	of Vdsm.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-05-10  Nir Soffer  <nsoffer@redhat.com>

	automation: Fix wiki url in README
	Continuous-Integration: Jenkins CI

2016-05-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding arch specific requirements
	After commit f684e752 vdsm package is arch depended and therefore can require
	different packages for each arch (some are not exist for all archs and
	need to be distinguished). The following are requirements that
	vdsm hided as an hack in safelease package.

	Continuous-Integration: Jenkins CI

2016-05-10  Martin Betak  <mbetak@redhat.com>

	rpc: Add test for 'int' parameters in Bridge
	Continuous-Integration: Jenkins CI

	rpc: Make Bridge#_type_fixup more robust
	_type_fixup method assumed that all top-level arguments of rpc calls are
	dictionaries thus failing with arguments of type e.g. 'int'.

	This patch fixes this issues and only recurses deeper if the 'item'
	itself is a dictionary.

	Continuous-Integration: Jenkins CI

2016-05-10  Shahar Havivi  <shaharh@redhat.com>

	v2v: get_external_vms return format for KVM images
	the format is needed for importing from kvm.
	when importing xen/vmware we are using virt-v2v which use qemu-img to
	convert the image to specific format that the user chosen.
	in kvm mode we don't need the conversion we are just copying the image
	with its original format.

	Continuous-Integration: Jenkins CI

2016-05-10  Oved Ourfali  <oourfali@redhat.com>

	spec: change python-yaml to PyYAML
	Seems like python-yaml is provided by PyYAML, and yum complains.

	Bug-Url: https://bugzilla.redhat.com/1334473
	Continuous-Integration: Jenkins CI

2016-05-10  Shahar Havivi  <shaharh@redhat.com>

	v2v: get_external_vms returns additional video info for kvm images
	When importing kvm images we don't have the generate ovf from
	virt-v2v since we use our kvm2ovirt tool.
	engine needs additional video and graphics information.

	Continuous-Integration: Jenkins CI

2016-05-10  pkliczewski  <piotr.kliczewski@gmail.com>

	client: do not protect requests on client side
	We need to keep message content without any changes before sending it to
	the server. If we won't json parser fails with:

	TypeError: '********' is not JSON serializable


	Continuous-Integration: Jenkins CI

2016-05-10  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add vdsClient hotunplug command
	Separated from hostdevHotunplug itself due to possible formatting issues.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234283
	Continuous-Integration: Jenkins CI

	hostdev: add support for hotunplug
	Hotunplugging host device without implicit reattachment is very similar
	to different hotunplugs

	Part of an IOMMU group or the whole group can be hotunplugged as there
	is no additional consistency check on VDSM's side. As the verb operates
	on bulk of devices, the return value informs of which devices were
	hotunplugged to allow for keeping track of which were not.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234283
	Continuous-Integration: Jenkins CI

	hostdev: expose parameters needed to support hotunplug
	This patch prepares HostDevice for hostdevHotunplug verb. We need an
	xpath to uniquely identify the device in libvirt XML to properly wait
	for device's unplug, and 'device' attribute (the libvirt name) to have
	unique identifier we can return.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234283
	Continuous-Integration: Jenkins CI

	hostdev: expose hotplug via vdsClient
	Separated from hostdevHotplug itself due to possible formatting issues.
	Since device specification is required for each device, and the fact
	that it is rare occurrence that a single device would be hotplugged,
	new parser in vdsClient is added.

	Example usage:
	vdsClient 0 hostdevHotplug 9954ff1d-d008-4453-8615-b0b6761ef93f \
	'[{type:hostdev,device:pci_0000_04_00_1},\
	{type:hostdev,device:pci_0000_04_00_0}]'

	(for GPU & onboard HDMI audio)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234283
	Continuous-Integration: Jenkins CI

	hostdev/sr-iov: use device setup instead of detach
	SR-IOV and host devices require action before VM is started. We rename this
	action from detach to now generic setup.

	Bug-Url: https://bugzilla.redhat.com/1234283
	Continuous-Integration: Jenkins CI

2016-05-09  mlipchuk  <mlipchuk@redhat.com>

	volume: Add volumePath setter to manifest.
	Fix broken merge volume flow which was introduced at 
	commit 038f073df6c40b418119e74826e9b967707588d8 (VolumeMetadata: Move 
	volumePath).

	Currently when trying to remove a single snapshot,
	an exception is being raised, indicating there was an error
	during source image manipulation: "can't set attribute".

	The propsed fix adds a new setter to volumePath in the volume's manifest.

	Continuous-Integration: Jenkins CI

2016-05-09  Shahar Havivi  <shaharh@redhat.com>

	v2v: add support for importing kvm based vms from libvirt
	Continuous-Integration: Jenkins CI

2016-05-09  pkliczewski  <piotr.kliczewski@gmail.com>

	schema: align schema with the latest merged patches
	Related-To: https://gerrit.ovirt.org/51782
	Continuous-Integration: Jenkins CI

2016-05-09  Francesco Romani  <fromani@redhat.com>

	schema: yml: sync existingConnAction with json
	We forgot to update the yml schema after change
	5abd15b . This patch fixes that.

	Continuous-Integration: Jenkins CI

2016-05-09  pkliczewski  <piotr.kliczewski@gmail.com>

	contrib: schema converter
	As part of this change we want to reuse code which was used
	to generate api documentation by process-schema script. It is
	not possible to import it so I moved required functions to
	vdsmapi module from where we could share it for both scripts.


	Continuous-Integration: Jenkins CI

2016-05-09  Shahar Havivi  <shaharh@redhat.com>

	kvm2ovirt: tool for copying images from libvirt
	tool for downloading/copying images from libvirt to ovrit

	Continuous-Integration: Jenkins CI

2016-05-09  Edward Haas  <edwardh@redhat.com>

	net: Move ipwrapper under vdsm.network
	Continuous-Integration: Jenkins CI

2016-05-08  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add support for SCSI
	SCSI devices inside sysfs device tree are different. Normally, we
	require a single sysfs entry in listAllDevices to determine the
	udev path and address of the devices. SCSI requires two entries -
	generic one to determine udev path, and scsi entry to determine address
	and it's host adapter.

	Bug-Url: https://bugzilla.redhat.com/1270581
	Continuous-Integration: Jenkins CI

	hostdev: make _update_usb_device_info more generic
	This is change of naming rather than functionality. The same idea can
	be (and must be) used for scsi devices.

	Bug-Url: https://bugzilla.redhat.com/1270581
	Continuous-Integration: Jenkins CI

	hostdev: report additional information in 'scsi' device
	SCSI capability in sysfs does not include enough information to
	identify the device in human readable way. We therefore fetch vendor
	and product from 'storage' capability, where these correspond to a
	physical device (if there is no physical device upstream, we ignore it).

	Another addition is udev path, that we require to fully construct
	the device in future.

	Bug-Url: https://bugzilla.redhat.com/1270581
	Continuous-Integration: Jenkins CI

	hostdev: expose generic scsi driver char device in device params
	Preparation for upcoming scsi-passthrough patch series. This value can
	be displayed by engine for better UX as it corresponds to generic scsi
	driver device names (e.g. /dev/sg{num}). Main reason is that VDSM needs
	to know the udev path to properly set permissions.

	Bug-Url: https://bugzilla.redhat.com/1270581
	Continuous-Integration: Jenkins CI

	hostdev: report storage model as product
	ovirt-engine frontend only displays values given by vendor and
	product (because it is the most universal device description). Storage
	is a special snowflake in this regard, as it has very nice identifier
	hidden under 'model' key and no product identifier.

	Reporting model instead of (empty) product leads to more understandable UI
	data.

	Bug-Url: https://bugzilla.redhat.com/1270581
	Continuous-Integration: Jenkins CI

2016-05-08  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Add the migration/hibernation event handling (GuestAgent)
	This event allows the guest operating system to prepare for the migration
	and hibernation and do post operations after such events.

	Bug-Url: https://bugzilla.redhat.com/1298120
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	agent: Introduction of first_connect event
	In order to be able to at least attempt reliably that the first connection
	to the virtio channel has been made, we need to block anyone from sending
	a message until at least a connect has been attempted (if even failed)

	Bug-Url: https://bugzilla.redhat.com/1298120
	Continuous-Integration: Jenkins CI

	agent: Guest agent reply capability support
	This patch adds the ability to wait for a reply of the guest agent
	to certain messsages. This is required for instance required for the
	lifecycle events to allow the guest to complete some operation before
	vdsm continues.

	Bug-Url: https://bugzilla.redhat.com/1298120
	Continuous-Integration: Jenkins CI

	virt: Introduction of the GuestAgentEvents class
	This is a convenience class for the guest agent to have callable
	functions for the individual events sent to the guest agent on the
	guest side.

	Bug-Url: https://bugzilla.redhat.com/1298120
	Continuous-Integration: Jenkins CI

	virt: Add new guest agent API function for lifecycle-events
	This patch introduces a new API method to the guest agent which allows
	notifying the guest agent about selected lifecycle events.

	The main purpose of this is to allow the guests to perform actions before
	and after such events because a few selected events might have an impact
	on them.

	Guest-Agent-API-Version: 3
	Bug-Url: https://bugzilla.redhat.com/1298120
	Continuous-Integration: Jenkins CI

	virt: Pass effective guest agent API version during migration
	Currently we're not passing the effective guest agent API version
	during migrations, since VDSM and the guest agent can negotiate this
	version.

	For the feature of lifecycle events for the guest it is needed that
	VDSM already knows the negotiated API version right from the moment
	of the migration completion so we can notify the guest about the
	completion of the migration.

	This will save VDSM from having to re-negotiate the API version,
	and allow us to send the guest agent the required information right
	away.

	In case the passed version is higher than supported, the loweest
	common maximum version will be chosen which will require
	negotiation later on, however it will give VDSM the ability to
	send the event anyway since it implies this feature to be present
	on both VDSM sides of the migration.

	Bug-Url: https://bugzilla.redhat.com/1298120
	Continuous-Integration: Jenkins CI

2016-05-08  Edward Haas  <edwardh@redhat.com>

	net: Move kernelconfig under vdsm.network
	Continuous-Integration: Jenkins CI

	net: Move tc under vdsm.network
	Continuous-Integration: Jenkins CI

	net: Move netlink under vdsm.network
	Continuous-Integration: Jenkins CI

2016-05-08  Dan Kenigsberg  <danken@redhat.com>

	macspoof hook: README: help adding the custom property
	Engine is now shipped with preexisting custom device property. This
	patch makes it clearer how to add ifacemacspoof to the preexisting list
	instead of overweriting it.

	Continuous-Integration: Jenkins CI

	require NetworkManager-config-server
	Request NetworkManager not to approriate newly-created network devices.
	With this configuration on host, vdsm can create bonding and vlan
	devices without them taken down by NM.

	This patch implictly add NetworkManager as a vdsm requirement, but this
	is not a very big deal as NetworkManager is ubiquitous.

	Bug-Url: https://bugzilla.redhat.com/1326798
	Continuous-Integration: Jenkins CI

2016-05-08  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't fail when existingConnAction is unset for a SPICE device
	When a ticket for a SPICE device is set, existingConnAction parameter is
	sent by Engine as well.  This parameter is used to set `connected'
	attribute of <graphics> element.  But setting this parameter when
	updating the ticket is basically useless.  It may be actually even
	harmful, e.g. when a user sets `connected' attribute value to `keep' in
	a Vdsm hook and Engine overrides it to `disconnect' without any good
	reason.  See the referenced bug.

	This should be fixed on the Engine side.  One approach may be not to
	send the parameter at all when updating the SPICE ticket.  However, Vdsm
	crashes in such a case.  This patch fixes Vdsm problems when the
	parameter is not present, making future changes in Engine possible.

	Bug-Url: https://bugzilla.redhat.com/1060573
	Continuous-Integration: Jenkins CI

2016-05-07  pkliczewski  <piotr.kliczewski@gmail.com>

	m2c: get more information about ssl connection
	Sometimes during runtime we see in the logs: "M2Crypto.SSL.SSLError:
	unexpected eof". In order to understand the state of the connection we
	want temporarily print ssl session information.

	This patch provides a configuration flag to enable/disable logging.


	Continuous-Integration: Jenkins CI

	stomp: make sure to handle eagain
	Checking asyncore documentation I noticed that we do not process recv
	properly. I found that:

	Note that recv() may raise socket.error with EAGAIN or EWOULDBLOCK

	betterAsyncore code was based on asyncore.dispatcher so the issue was
	duplicated. We need to make sure to handle errors properly. We base our
	errnos on asynchat which include: EAGAIN, EALREADY, EINPROGRESS,
	EWOULDBLOCK.


	Bug-Url: https://bugzilla.redhat.com/1321325
	Related-To: https://bugs.python.org/issue16133
	Continuous-Integration: Jenkins CI

	stomp: dispatcher can return empty string
	Based on logs provided for BZ I see that dispatcher#recv can return an
	empty string which makes parser not to process message and as a result
	we get:

	exceptions.AttributeError: 'NoneType' object has no attribute 'command'

	We need to make sure that we do not attempt to parse the data.


	Bug-Url: https://bugzilla.redhat.com/1321325
	Continuous-Integration: Jenkins CI

2016-05-07  Nir Soffer  <nsoffer@redhat.com>

	spec: Make vdsm-api noarch
	vdsm-api package was not marked as noarch by mistake in commit
	f684e7527cf3f (spec: Make vdsm arch specific package).

	Continuous-Integration: Jenkins CI

2016-05-05  Nir Soffer  <nsoffer@redhat.com>

	spec: Make vdsm arch specific package
	Vdsm depends on packages available only on certain platforms, so it must
	be arch-specific.

	This patch remove noarch from vdsm package and make all sub packages
	noarch.

	Bug-Url: https://bugzilla.redhat.com/1320281
	Continuous-Integration: Jenkins CI

2016-05-05  Edward Haas  <edwardh@redhat.com>

	net: Move netinfo under vdsm.network
	Continuous-Integration: Jenkins CI

2016-05-05  Nir Soffer  <nsoffer@redhat.com>

	blkid: Remove leftovers
	We removed support for local disks using disk UUID in commit
	160de740e766 (drop unused blkid external binary), but left the
	DriveSpecUUID in the schema.

	Continuous-Integration: Jenkins CI

2016-05-05  Lukianov Artyom  <alukiano@redhat.com>

	jsonrpc: change instance type to strings
	Hosted engine deployment failed, because to narrow check
	for jsonrpc response.
	Change check of responce instance type from unicode
	to strings

	Bug-Url: https://bugzilla.redhat.com/1332923
	Continuous-Integration: Jenkins CI

2016-05-05  Tomas Jelinek  <tjelinek@redhat.com>

	migrations: change convergence schedule from time to iterations
	Currently the convergence schedule reacted to specific number of seconds of
	stalling. It turned out to be incorrect, because the algorithm which detected
	stalling was not detecting it properly and fundamentally can not.
	The reason is that the algorithm remembers the last progress time and then if the
	data_remaining is bigger it considers the migration to be stalling.

	This does not work properly, because the qemu works in iterations and each
	iteration takes significant amount of time.

	In the first iteration there can be no stalling, qemu only copies memory and
	does not look at how much of it changed.

	After this period of time it checks if it can move the rest of the VMs memory
	when it pauses for the downtime. If not, it starts a new iteration. This new
	iteration starts copying all the dirtied memory which can be a lot.

	During next iteration, the actual remaining data is compared to the minimal
	remaining data to determine if the migration is stalling. Until the next
	iteration reaches the level of remaining data from the previous one it will be
	considered stalling.

	But this does not actually mean we
	want to enlarge the downtime during the iteration since we don't know if qemu
	can or can not migrate the last part. This information can be found only
	between two iterations - e.g. if it is detected that the copying is in new
	iteration it means the current downtime was not enough so the enlargement of
	the downtime may make sense.

	So, the current patch changes the meaning of the "limit" from number of seconds
	the migration can be stalling to number of iterations the migration can be
	stalling (it may make sense to wait for more than one iteration to give qemu
	couple of tries before enlarging the downtime).

	The detection of new iteration is done this way:
	- in each monitoring cycle the current amount of remaining memory is remembered
	- in the next cycle the remembered remaining memory is compared to the current
	  one
	- the result can be:
	  - the current amount is smaller than the remembered => migration is either
	    progressing within the same iteration, or it is already in the next
	    iteration but the progress was fast enough to get below the remembered value.
	    In this case we can fail to recognize the next iteration but it does not
	    really matter since the migration progressed in between.
	  - the current amount is equal or higher than the remembered => it is a new
	    iteration because inside of one iteration the amount of memory has to
	    slowly go down and can not stay at one point even less grow

	The detection is not perfect but is the best we can have until libvirt 1.3 when
	we will get this info reported.

	Continuous-Integration: Jenkins CI

2016-05-05  Martin Polednik  <mpolednik@redhat.com>

	virt: add device setup and teardown
	More and more devices require some action to be taken before VM is
	started - even before the XML is generated. We add two methods, setup
	and teardown, that are called before VM's start and after VM's
	destruction respectively.

	These methods should be used as a replacement for device-specific
	methods.

	Continuous-Integration: Jenkins CI

2016-05-05  Petr Horáček  <phoracek@redhat.com>

	net: some values should be or should not be list
	If there is just one item in a list, it is reported as single item.
	If a single item entry is not defined, it is reported as empty list.

	We should convert such values so they have the same type every time.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-05-04  Idan Shaby  <ishaby@redhat.com>

	blockSD: fix log message in zeroImgVolumes
	When logging a debug message regarding a volume that has been zeroed, we
	always use the same volume id (the last one that was passed to
	_zeroVolume), instead of the correct one.
	This patch logs the correct volume.

	Continuous-Integration: Jenkins CI

2016-05-04  Adam Litke  <alitke@redhat.com>

	storage: Don't produce block volumes with TEMP_VOL_LVTAG
	LVs with the tag TEMP_VOL_LVTAG are not volumes yet.  Validation should
	prevent a VolumeManifest object from being produced against such an LV.

	Continuous-Integration: Jenkins CI

	tests: Share failure function
	Tests that want to check failures replace VolumeArtifacts functions with
	the failure() function.  Move this to the common test class so that
	block tests can use it too.  Also, add **kwargs to the signature so it
	will work with all functions.

	Continuous-Integration: Jenkins CI

2016-05-04  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: marking temporarily as broken
	Continuous-Integration: Jenkins CI

2016-05-03  Petr Horáček  <phoracek@redhat.com>

	test: validate that OVS tests runs as root
	Move OVS service handling to class level, as they it is not needed
	for all classes (TestOvsVsctlCommand).

	This patch is needed to fix non-root RPM builds on docker.

	Continuous-Integration: Jenkins CI

	net: native ovs: ovsnettestlib.py
	Introduce OVS testing library. It handles OVS service setup,
	cleanup and keeps constants. It will be used by OVS switch tests.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-05-02  Edward Haas  <edwardh@redhat.com>

	net: Move netconfpersistence under vdsm.network
	Continuous-Integration: Jenkins CI

2016-05-02  Yaniv Bronhaim  <ybronhei@redhat.com>

	automation: Run make check over el7 in automation CI
	We tried to avoid running make check over el7 to save resources, but we
	missed bugs and failed test that way. The timing implications of adding it back
	are not so bad.

	Continuous-Integration: Jenkins CI

2016-05-01  Idan Shaby  <ishaby@redhat.com>

	storage: streamline getting domain mountpoint
	When checking if a domain's mountpoint is mounted, the code used to add
	"/.." to the domain's path, counting on mount.isMounted() to normalize
	the path.
	This patch replaces this approach by simply using os.path.dirname.

	Continuous-Integration: Jenkins CI

2016-05-01  Martin Polednik  <mpolednik@redhat.com>

	hostdev: use libvirt flags to select capability
	hostdevListByCaps (or list_by_caps in hostdev module) filtered devices
	manually by inspecting their capability. This can be done on libvirt
	level to avoid parsing unwanted devices.

	Bug-Url: https://bugzilla.redhat.com/1270581
	Continuous-Integration: Jenkins CI

2016-05-01  Edward Haas  <edwardh@redhat.com>

	net tests: Clean netinfo_test from uneeded mocks
	Removing mockey patches that are no longer needed.

	They have been probably left in the tests unintentionally after the
	production code has been modified.
	This presents a general maintanance issue with mocks that do not varify
	their usage.

	Continuous-Integration: Jenkins CI

2016-05-01  Tomáš Golembiovský  <tgolembi@redhat.com>

	v2v: small test improvement
	Continuous-Integration: Jenkins CI

2016-05-01  Dan Kenigsberg  <danken@redhat.com>

	net tests: take2: wait for a concurrent iptables call to finish
	commit 9f7685f added --wait to iptable executions during tests, but not
	to all of them.

	This patch amends that.

	Continuous-Integration: Jenkins CI

2016-05-01  Idan Shaby  <ishaby@redhat.com>

	storage: add tests for Mount.isMounted in mount.py
	Continuous-Integration: Jenkins CI

2016-05-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing generationID from clientIF
	Originally generationID was added as an element to getVdsStats to
	monitor vdsmd restarts in commit 537012b5c, Engine never actually used
	it.

	Continuous-Integration: Jenkins CI

2016-05-01  Petr Horáček  <phoracek@redhat.com>

	net: add Transaction() to netconfpersistence
	This patch introduces Transaction() class/context manager to
	netconfpersistence.py. It will be used as a rollback trigger
	for OVS switch and could also replace unified rollback mechanism
	in legacy switch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-29  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: update glusterfs repos
	- dropped Gluster community repo for Fedora23 (reposync included):
	  the repo is empty and Gluster community is maintaining
	  Fedora packages within Fedora repositories.
	  For reference:
	  http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/What_About_Fedora_23.README
	- on EL7 moved from Gluster community repo to CentOS
	  Storage SIG repositories: we've been advised by Gluster community that
	  their packaging effort is focused on CentOS Storage SIG
	  and CentOS infrastructure is more reliable.

	Continuous-Integration: Jenkins CI

2016-04-29  Adam Litke  <alitke@redhat.com>

	tests: add validate_domain_has_garbage helper
	Many of the VolumeArtifacts failure case tests check that the domain has
	garbage after the failed operation.  Extract this logic into a helper
	and move it to the common class so it can be shared by the block tests.

	Continuous-Integration: Jenkins CI

2016-04-28  Adam Litke  <alitke@redhat.com>

	sdm: CreateVolumeInfo.initial_size default should be None
	Commit 9820797d defined the original SDM.create_volume API.  It set the
	default value for initial_size to 0 but it should be None since the
	underlying code does not use 0 as the default initial size.

	Continuous-Integration: Jenkins CI

	FakeLVM: LV size is rounded to VG extent size
	In real LVM, LV sizes must be a multiple of the VG extent size
	(default=128m).  Our FakeLVM code assumed that size should just be
	rounded to a multiple of 1M.  Fix this and add a test to check this
	behavior.

	Continuous-Integration: Jenkins CI

	lvm: Use a constant to define default vg extent size
	The default vg extent size has so far been defined as "128m" by means of
	a default argument value in lvm.createVG.  In order to test LVM we need
	to know this value progmatically.  Define VG_EXTENT_SIZE_MB in
	storage.constants and eliminate the parameter in lvm.createVG which is
	not being used.

	Continuous-Integration: Jenkins CI

	tests: Fix volume size handling in domain_manifest_test
	This test module is not testing the rounding of volume sizes up to the
	VG extent size (128M).  That is already tested in storagefakelibTests
	and storage_volume_artifacts_test.  For this test, just use a large
	enough size that will not need to be rounded.

	Also, fix test_metaslot_selection which was not converting the volume
	size to MB when calling the lvm createLV API.

	Continuous-Integration: Jenkins CI

	blockVolume: make _getVolumeTag public
	_getVolumeTag is a useful and safe utility function for getting the tags
	of a volume.  Rename it to getVolumeTag to make it public.  The upcoming
	BlockVolumeArtifacts class needs to make use of it.

	Continuous-Integration: Jenkins CI

2016-04-28  Francesco Romani  <fromani@redhat.com>

	vm: handle destroy request while starting up
	Since long time Vdsm allows Vm.destroy() requests
	against VMs which are not yet fully created.
	The most frequent use case is if the startup takes
	lots of time, often because slow storage, so the
	user decides to abort the startup.

	Vdsm does the bare minimum to handle this flow,
	and often misreports the Vm as down for error,
	while it is not - the flow is supported.

	To improve this situation, we add special explicit
	handling for this case, and we add a new exitreason
	to let Engine know that we had a destroy on startup.

	Bug-Url: https://bugzilla.redhat.com/912390
	Continuous-Integration: Jenkins CI

2016-04-28  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: consume bond slaves owned by NetworkManager
	To let NetworkManager know VDSM wants to consume its devices we
	have to create ifcfg files with NM_CONTROLLED=no even for slaves
	that are already attached. It will automatically read the ifcfg
	files thanks to the previous patch.

	Bug-Url: https://bugzilla.redhat.com/1304509
	Continuous-Integration: Jenkins CI

	NetworkManager: configure to monitor ifcfg/connection files
	The new configuration file instructs NetworkManager to automatically
	reload network configuration from the directory it uses to persist
	its "connections" (one could say "profiles"):

	- /etc/sysconfig/network-scripts/ in the case of ifcfg systems
	  (Fedora, RHEL, CentOS and derivatives; "ifcfg-rh" plugin)
	- /etc/NetworkManager/system-connections/ ("keyfile" plugin)
	- or another, specific to e.g. Debian or Suse

	This functionality is required to properly let NetworkManager
	know when VDSM consumes any of its devices (on ifcfg systems,
	by writing NM_CONTROLLED=no to an ifcfg file).

	Please note that this approach is potentially raceful. Under
	high loads, it is theoretically possible that NM learns of
	a changed file too late. To be sure, we should probably call
	to 'nmcli connection load' synchronously, just before running
	'ifup' on a given device.

	NetworkManager is asked to reload its configuration during
	the %post stage of installation. If it is not running,
	systemctl simply exits with exit code 130 and doesn't try
	to start it.

	Bug-Url: https://bugzilla.redhat.com/1304509
	Continuous-Integration: Jenkins CI

2016-04-28  Idan Shaby  <ishaby@redhat.com>

	storage: remove unused method from mount.py
	This patch removes the unused method getMountFromDevice from mount.py.

	Continuous-Integration: Jenkins CI

2016-04-28  Edward Haas  <edwardh@redhat.com>

	net: OVS driver - bond_slave commands
	The *bond_slave commands are a bit special, they are composed of two
	sub-commands.

	Such commands return now a touple and the caller is responsible to
	handle them seperatly.
	This is a recommended way to use it:
	  with self.ovsdb.transaction() as t:
	    t.add(*ovsdb.attach_bond_slave(bond, slave))

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-28  Petr Horáček  <phoracek@redhat.com>

	net: native ovs: check for bond existence
	Network creation is not dependent on bond creation in any way, created
	bond is available for all networks (should be divided), therefore we
	have to check for it's existence manually.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: native ovs: check for nic existence
	OVS allows us to add a port which does not exist, so it won't
	explode when attaching non-existing nic.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: OVS driver
	This patch introduces OVS driver, its API and ovs-vsctl implementation.

	The openvswitch is added as a build and runtime dependency.

	Basic integration tests are introduced. Future patches should cover
	all supported commands.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-27  Adam Litke  <alitke@redhat.com>

	lvm: Allow multiple initial tags when creating an LV
	When creating new block volumes via the SDM VolumeArtifacts
	infrastructure we want to create an LV with three tags to indicate: the
	image, the parent volume, and that this volume is not yet completed.
	Currently LVM only allows a single tag to be applied to new LVs.  Change
	the behavior to accept a tuple of tags instead.

	Continuous-Integration: Jenkins CI

2016-04-27  Milan Zamazal  <mzamazal@redhat.com>

	virt: Set timeout on boot menu
	The default timeout for boot menu (3 s) is too short for some scenarios,
	e.g. with network delays.  Although the best way to handle boot menu is
	to run a VM in paused mode, we can change the timeout to make boot menu
	more available even on regular runs.  So this patch sets the boot menu
	timeout to 10 s, which could be a reasonable value, not too low and not
	too high.

	Bug-Url: https://bugzilla.redhat.com/1324375
	Continuous-Integration: Jenkins CI

2016-04-27  Idan Shaby  <ishaby@redhat.com>

	storage: organize imports in clusterlock.py
	Continuous-Integration: Jenkins CI

2016-04-27  Sandro Bonazzola  <sbonazzo@redhat.com>

	jsonrpcvdscli: add storage verbs
	Add verbs used by ovirt-hosted-engine-setup for
	handling the storage setup.

	Related-To: https://bugzilla.redhat.com/1228641
	Continuous-Integration: Jenkins CI

2016-04-26  Adam Litke  <alitke@redhat.com>

	tests: volume_artifacts: validate FileVolumeArtifacts metadata
	We now have the VolumeMetadata class which makes it possible to import
	raw volume metadata for the purposes of verification.  Use this
	infrastructure to validate the metadata created as part of
	FileVolumeArtifacts create() in the same way we already do for
	BlockVolumeArtifacts.

	Continuous-Integration: Jenkins CI

	storage: sdm: consolidate create validation
	The validation of VolumeArtifacts.create parameters can be shared
	between the File and upcoming Block artifacts classes.  Move it to
	VolumeArtifacts in order to share it.

	Continuous-Integration: Jenkins CI

	tests: Add test_create_same_volume_in_image
	Add a new test (which will be broken until support for creating child
	volumes in an image is added) that verifies you are not allowed to
	create another volume with the same ID in an image.

	Continuous-Integration: Jenkins CI

2016-04-26  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: handle strings as correct response
	There is bunch of different response types. Currnetly we handle list and
	dictionary but some of the verbs return plain string like
	StoragePool.spmStart.


	Continuous-Integration: Jenkins CI

2016-04-26  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add is_assignable flag
	is_assignable is new flag that uses underlying PCI_HEADER_TYPE.
	We can only assign devices of header type 0 (type 1 is bridge, type 2
	cardbus). The header information is read directly from PCI
	configuration space of each device.

	We leave non-pci devices marked as 'is_assignable=True' as everything
	else displayed by engine should be assignable device.

	Continuous-Integration: Jenkins CI

2016-04-26  Adam Litke  <alitke@redhat.com>

	tests: Move artifacts tests to their approproate classes
	The tests:
	 - test_new_image_commit_without_create
	 - test_new_image_commit_twice

	are specific to FileVolumeArtifacts and should be in that class rather
	than the Mixin which holds tests that work on both file and block
	storage.

	The test:
	 - test_getallvolumes

	will work unchanged for block storage so it should appear in the common
	Mixin.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-04-26  Nir Soffer  <nsoffer@redhat.com>

	rwlock: Replace misc.RWLock
	This patch removes misc.RWLock and replace it with simpler
	rwlock.RWLock.

	Continuous-Integration: Jenkins CI

2016-04-26  Idan Shaby  <ishaby@redhat.com>

	storage: organize imports in misc.py
	Continuous-Integration: Jenkins CI

2016-04-26  Allon Mureinik  <amureini@redhat.com>

	spec: qemu-kvm-img to handle unaligned images
	Bug #1282239 describes a bug in qemu-img convert's ability to handle
	exporting/importing of memory volumes, that was worked around by using
	dd instead.

	This patch requires a qemu-img version that fixes the underlying issue
	in order to handle importing previously exported volumes and possibly
	remove this workaround in the future.

	Bug-Url: https://bugzilla.redhat.com/1283278
	Related-To: https://bugzilla.redhat.com/1282239
	Continuous-Integration: Jenkins CI

2016-04-25  Adam Litke  <alitke@redhat.com>

	storage: Filter incomplete volumes from volume queries
	LVs that are labeled with TEMP_VOL_LVTAG represent incomplete volumes
	and should not appear when querying storage for volume and image
	information.  Filter them in _getVolsTree().  Later when the garbage
	collector needs to find these volumes we can add a flag to invert the
	filter.

	Continuous-Integration: Jenkins CI

	VolumeMetadata: Add from_lines factory method
	Add support for creating a VolumeMetadata instance from a list of lines.
	This is the format that can be read from either block or file based
	volume metadata and enables us to consolidate the logic into one place.

	Note the following semantics changes:

	 - from_lines can raise ValueError if fields that represent int values
	   are not valid integers

	 - from_lines raises MetaDataKeyNotFoundError if expected fields are
	   missing from the input.  In old code, a missing field only impacted
	   reading that particular field.  Now, missing fields will prevent
	   reading any metadata.  This should be okay since we are always
	   writing out complete metadata to storage.

	Continuous-Integration: Jenkins CI

	Refactor metadata operations
	Volume metadata can be represented as a dictionary and as a string of
	delineated key value pairs.  Extract this logic out of the Volume
	classes into a new VolumeMetadata class which can be unit tested.  Once
	refactored, this code can be reused by new SDM code as well.

	Continuous-Integration: Jenkins CI

2016-04-25  Francesco Romani  <fromani@redhat.com>

	vm: rename event for clarity
	Vm._destroyed actually means that Vdsm received a request
	to destroy a Vm which is not yet fully created.
	Hence, we rename it as _destroy_requested to clarify a bit the flows.

	Continuous-Integration: Jenkins CI

2016-04-24  Dan Kenigsberg  <danken@redhat.com>

	drop unused blkid external binary
	commit ac0efac98 should have removed these definitions.

	Continuous-Integration: Jenkins CI

2016-04-24  Nir Soffer  <nsoffer@redhat.com>

	mount: Streamline backing file path building
	Use os.path.join to create the path instead of joining strings, making
	the code more clear.

	Continuous-Integration: Jenkins CI

2016-04-24  Edward Haas  <edwardh@redhat.com>

	net: Ignore noqueue queuing discipline
	tc qdisc show <dev> reports the qdisc noqueue discipline on virtual
	devices on updated Fedora 23.

	The patch gracefully ignores the 'noqueue' line.

	Continuous-Integration: Jenkins CI

2016-04-24  Nir Soffer  <nsoffer@redhat.com>

	build: Remove pep8 and pyflakes requirement
	We use to build-require both pep8 and pyflakes, which cause trouble when
	using older version. This leads to build failures, or to horrible code
	tyring to make old buggy pyflakes happy.

	Vdsm does not require pep8 or pyflakes for building packages; these are
	development tools that should be installed on a development machine or
	on CI environment, using the versions supported by current vdsm code.

	In the makefile, "make check" during make rpm was disabled on EL,
	because incompatible or missing pep8 and pyflakes versions; This hack
	was removed, so make rpm will do the same thing all platforms.

	In the makfile, we run pep8 or pyflakes checks only if these tools are
	installed.

	4 copies of incompatible pep8 and pyflakes version were removed from the
	packages list.

	Finally, we install the correct version of these tools in the CI
	environment using pip.

	Continuous-Integration: Jenkins CI

2016-04-22  Allon Mureinik  <amureini@redhat.com>

	qemuimg: Remove EL6 comment
	EL6 is no longer supported, no need to document where its qemu-img
	binary is installed.

	Continuous-Integration: Jenkins CI

2016-04-21  Nir Soffer  <nsoffer@redhat.com>

	vm: Add error logging in diskReplicateFinish
	On failures of diskReplicateFinish we had mostly no logs, making
	debugging much harder. Log error for each failure explaining the error,
	and include the source disk, drive name, and the libvirt job info.

	Bug-Url: https://bugzilla.redhat.com/1325791

2016-04-21  Adam Litke  <alitke@redhat.com>

	tests: Add test_missing_tags for block storage
	Add a simple test that verifies that volumes with missing tags are not
	returned by getAllVolumes.

	Continuous-Integration: Jenkins CI

	tests: FakeLVM: Always create lv file
	When creating Fake LVs always create a regular file at lvm.lvPath(...)
	of the size passed into lvm.createLV.  This makes sure that storage code
	will be able read from and write to the fake LV.

	Continuous-Integration: Jenkins CI

2016-04-21  Milan Zamazal  <mzamazal@redhat.com>

	tests/functional: Remove storage tests references from virtTests
	tests/functional/storageTests.py has been removed in commit df5ebfd0,
	causing breakage of virtTests.py functional tests due to the references
	to that file.  This patch removes those references, thus making
	tests/functional/virtTests.py working again.

	Continuous-Integration: Jenkins CI

2016-04-20  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Validate qcow2_compat configuration
	Validate new qcow2_compat option against a list of approved values, and
	raise (new) InvalidConfiguration error if the value is not supported:

	   InvalidConfiguration: Invalid configuration value: ("Unsupported value
	   for irs:qcow2_compat: '1.2'",)

	This document the ones we accept and help to diagnose configuration
	mistakes. We need to maintain this list over time, but it's good for us
	to check new compat versions to see if we're ready to allow them to be
	used in vdsm storage.

	Bug-Url: https://bugzilla.redhat.com/1317850
	Continuous-Integration: Jenkins CI

2016-04-20  Pavel Gashev  <pax@acronis.com>

	qemuimg: Make QCOW2_COMPAT configurable
	It's worth to make QCOW2 compatibility version configurable. It would
	allow to early adopt compat=1.1 in el7 environments.

	Bug-Url: https://bugzilla.redhat.com/1317850
	Continuous-Integration: Jenkins CI

2016-04-20  Adam Litke  <alitke@redhat.com>

	oop: add writeFile API
	We currently have a writeLines API but we should also have an API for
	writing a prepared string to the file.

	Continuous-Integration: Jenkins CI

	tests: storagetestlib: normalize make_file_volume
	The test utility make_block_volume was recently improved so that the
	created volume had correct metadata in the fake storage domain.  Do the
	same for make_file_volume and normalize the interface so that it works
	like make_block_volume (ie. requires image and volume ids).

	Continuous-Integration: Jenkins CI

2016-04-20  Francesco Romani  <fromani@redhat.com>

	vm: conf: proper locking in onConnect()
	We are still getting the error
	RuntimeError: dictionary changed size during iteration

	When calling Vm.status(), especially during migrations,
	so we must review our usage of Vm.conf and ensure the lock
	is always used.

	Bug-Url: https://bugzilla.redhat.com/1318550
	Continuous-Integration: Jenkins CI

	vm: conf: proper locking in status()
	We are still getting the error
	RuntimeError: dictionary changed size during iteration

	When calling Vm.status(), especially during migrations,
	so we must review our usage of Vm.conf and ensure the lock
	is always used.

	Bug-Url: https://bugzilla.redhat.com/1318550
	Continuous-Integration: Jenkins CI

2016-04-20  Dan Kenigsberg  <danken@redhat.com>

	spec: require test-only py3 packages
	commit 51594ca introduced a test-time dependency on python3-netaddr and
	libvirt-python3. This patch makes it explicit in vdsm.spec.

	Continuous-Integration: Jenkins CI

2016-04-19  Francesco Romani  <fromani@redhat.com>

	tests: add tests for sampling.VMBulkSampler
	The VMBulkSampler class is responsible of the bulk stats sampling,
	and includes all the logic to deal with blocked domains.
	This patch add the initial batch of tests to exercise this code.

	Continuous-Integration: Jenkins CI

	migration: fix logging
	We now log VIR_DOMAIN_JOB_MEMORY_CONSTANT while monitoring migration,
	but this value is in pages, not in bytes.

	Continuous-Integration: Jenkins CI

2016-04-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	automation: build and install vdsm only after spec or makefile change
	Continuous-Integration: Jenkins CI

	Remove debian install files from vdsm
	Currently this folder is not maintained in parallel to the spec. We
	build vdsm for debian but we don't keep the updated install files in vdsm git
	tree.

	Continuous-Integration: Jenkins CI

2016-04-19  Tomas Jelinek  <tjelinek@redhat.com>

	migration: added logging of more detailed stats
	New fields VIR_DOMAIN_JOB_MEMORY_BPS, VIR_DOMAIN_JOB_MEMORY_CONSTANT and
	VIR_DOMAIN_JOB_COMPRESSION_BYTES will be logged to help understand the details
	of the migrations.

	From fields which has already been used the following are logged:
	VIR_DOMAIN_JOB_DATA_TOTAL, VIR_DOMAIN_JOB_DATA_PROCESSED,
	VIR_DOMAIN_JOB_DATA_REMAINING

	Added also the following ones available only on newer libvirt:
	VIR_DOMAIN_JOB_MEMORY_DIRTY_RATE, VIR_DOMAIN_JOB_MEMORY_ITERATION

	Bug-Url: https://bugzilla.redhat.com/1252426
	Continuous-Integration: Jenkins CI

2016-04-19  Martin Betak  <mbetak@redhat.com>

	migration: Add Dynamic Bounded Semaphores
	This patch adds new Bounded Semaphore class with the ability to modify the
	bound at runtime. It also migrates the existing `incoming` and `outgoing`
	migration semaphores to use this new dyanmic version.

	This is useful for subsequent migration enhancements that will allow the engine
	to dynamically adjust the maximum number of concurrent migrations.

	Continuous-Integration: Jenkins CI

2016-04-18  pkliczewski  <piotr.kliczewski@gmail.com>

	asyncore: make sure to handle sslerror on send
	When we receive data we handle ssl errors in cases like a client
	disconections. We want to make sure that we close connection and return
	to message processing code to handle the issue.

	In send we have similar behavior but the error propagates to asyncore
	loop where it is handled. For send we need to have similar behavior:
	- close channel
	- let the sender code handle case where no data was send


	Continuous-Integration: Jenkins CI

2016-04-18  Dan Kenigsberg  <danken@redhat.com>

	init: run post-vdsm stop hook
	this patch fixes a regression introduced by commit 18b01171.

	Continuous-Integration: Jenkins CI

2016-04-18  Idan Shaby  <ishaby@redhat.com>

	storage: move fileUtils module to vdsm storage lib
	This patch moves the module storage/fileUtils.py to
	vdsm/storage/fileUtils.py.

	Continuous-Integration: Jenkins CI

2016-04-18  Edward Haas  <edwardh@redhat.com>

	net: Clean running config on unified restoration failure
	When the unified restoration process fails, running config (file) may
	contain networks/bonds that are not in kernel.
	When an attempt is made to re-run the unified restoration (without a
	boot), the process will fail to remove the mentioned networks/bonds.

	In this patch, the running config will be cleared if the restoration
	fails, allowing the following attempts to try and setup the network
	again.

	Bug-Url: https://bugzilla.redhat.com/1323782
	Continuous-Integration: Jenkins CI

2016-04-17  Idan Shaby  <ishaby@redhat.com>

	storage: reorganize mount.py's position
	This patch reorganizes mount.py's position in the files
	vdsm-python.install and vdsm.spec.in so that they will remain
	alphabetically sorted.

	Continuous-Integration: Jenkins CI

2016-04-17  David Caro  <dcaroest@redhat.com>

	ci:Fixed execution on el* chroots
	Continuous-Integration: Jenkins CI

2016-04-17  Idan Shaby  <ishaby@redhat.com>

	storage: organize imports in fileUtils.py
	Continuous-Integration: Jenkins CI

	storage: organize imports in mount.py
	Continuous-Integration: Jenkins CI

2016-04-16  Petr Horáček  <phoracek@redhat.com>

	net: native ovs: split to-be-removed and to-be-added
	Split networks and bonds which should be added and removed. This
	functionality will be used in the following patch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: native ovs: validate networks and bonds
	Verify requirements which will not be verified by OVS setup itself.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: native ovs: ovs switch skeleton
	Introduce legacy/ovs split and skeleton of OVS switch.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-16  Nir Soffer  <nsoffer@redhat.com>

	travis: Add missing packages to Dockerfile
	Add missing packages that cause make check to fail on travis CI:

	- psmisc
	- python-ioprocess

	Continuous-Integration: Jenkins CI

2016-04-15  Francesco Romani  <fromani@redhat.com>

	virt: storage: avoid empty serials to domain XML
	The VM drives in the libvirt domain XML may have
	one 'serial' attribute.
	Vdsm used to always sends this attribute.
	The value is either received as drive configuration
	parameter, or it is filled from the drive backing imageID.

	Should Vdsm not receive the serial attribute, or should
	the drive not have a backing image, the serial will be
	empty, and will be sent anyway to libvirt.

	Starting from libvirt 1.3.0, libvirt enforces the fact
	that the serial must not be empty (see
	https://bugzilla.redhat.com/1322842#c4).
	This exposed an old bug of Vdsm, and the effect is that
	libvirt rejects the domain XML and the VM could not start.

	To trigger this bug, just configure one VM with payload
	device (e.g. cloud init) this will send a new cdrom device
	alongside the default one, and both will have empty serial.

	Looking again at the libvirt domain XML specifications
	(http://libvirt.org/formatdomain.html#elementsDisks)
	we see that the 'serial' attribute is not mandatory.

	Thus, the simplest fix is just not to add the 'serial'
	attribute in the domain XML if it is empty.

	Bug-Url: https://bugzilla.redhat.com/1322842
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-04-14  Nir Soffer  <nsoffer@redhat.com>

	rwlock: Add simpler RWLock
	This is a rewrite of storage.misc.RWLock, simplifying it and making it
	easier to understand. The behavior of the lock should be the same,
	acquiring the lock in the order of the requests, and supporting
	recursive locking, required for old storage code locking the same
	resource from different layers.

	This implementation does not support lock demotion (replacing a write
	lock with a read lock). This feature was broken in the previous
	implementation.

	This implementation is using a list of waiters instead of a Queue, since
	we don't need any of the features provided by a Queue. Important
	property of a list is the possibility to remove a waiter from the middle
	of the list, in case of a timeout. This is used by future patch
	supporting timed acquire.

	This implementation has less overhead, as seen in the stress tests
	with many writers and readers. The test measure the number of times each
	thread could take a shared (readers) or exclusive (writers) lock during
	the test (1 second). Larger numbers mean more throughput. Tested on
	Lenovo T450s.

	storage_rwlock_test.RWLockStressTests

	    test_lock_contention(1, 2, <class 'storage.misc.RWLock'>)
	writers: 1 readers: 2
	writes  avg=5438.00 med=5438 min=5438 max=5438
	reads   avg=5449.50 med=5450 min=5449 max=5450

	    test_lock_contention(1, 2, <class 'vdsm.storage.rwlock.RWLock'>)
	writers: 1 readers: 2
	writes  avg=6574.00 med=6574 min=6574 max=6574
	reads   avg=6598.00 med=6625 min=6571 max=6625

	    test_lock_contention(2, 8, <class 'storage.misc.RWLock'>)
	writers: 2 readers: 8
	writes  avg=1334.50 med=1335 min=1334 max=1335
	reads   avg=1334.50 med=1335 min=1334 max=1335

	    test_lock_contention(2, 8, <class 'vdsm.storage.rwlock.RWLock'>)
	writers: 2 readers: 8
	writes  avg=1504.50 med=1505 min=1504 max=1505
	reads   avg=1504.00 med=1504 min=1503 max=1507

	    test_lock_contention(3, 32, <class 'storage.misc.RWLock'>)
	writers: 3 readers: 32
	writes  avg=386.00 med=386 min=386 max=386
	reads   avg=386.12 med=386 min=385 max=387

	    test_lock_contention(3, 32, <class 'vdsm.storage.rwlock.RWLock'>)
	writers: 3 readers: 32
	writes  avg=403.00 med=403 min=403 max=403
	reads   avg=403.50 med=403 min=403 max=408

	    test_lock_contention(4, 128, <class 'storage.misc.RWLock'>)
	writers: 4 readers: 128
	writes  avg=101.00 med=101 min=101 max=101
	reads   avg=101.15 med=101 min=101 max=103

	    test_lock_contention(4, 128, <class 'vdsm.storage.rwlock.RWLock'>)
	writers: 4 readers: 128
	writes  avg=101.00 med=101 min=101 max=101
	reads   avg=101.93 med=102 min=101 max=108

	    test_readers(1, <class 'storage.misc.RWLock'>)
	reads   avg=47546.00 med=47546 min=47546 max=47546

	    test_readers(1, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=170239.00 med=170239 min=170239 max=170239

	    test_readers(128, <class 'storage.misc.RWLock'>)
	reads   avg=136.00 med=135 min=134 max=167

	    test_readers(128, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=361.10 med=332 min=330 max=1321

	    test_readers(16, <class 'storage.misc.RWLock'>)
	reads   avg=1125.75 med=1100 min=1096 max=1391

	    test_readers(16, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=3070.19 med=2945 min=2803 max=3658

	    test_readers(2, <class 'storage.misc.RWLock'>)
	reads   avg=10040.50 med=10053 min=10028 max=10053

	    test_readers(2, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=30227.50 med=31197 min=29258 max=31197

	    test_readers(32, <class 'storage.misc.RWLock'>)
	reads   avg=551.56 med=541 min=540 max=832

	    test_readers(32, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=1480.53 med=1404 min=1401 max=2348

	    test_readers(4, <class 'storage.misc.RWLock'>)
	reads   avg=4708.25 med=4758 min=4583 max=4869

	    test_readers(4, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=12305.25 med=12789 min=11618 max=13065

	    test_readers(64, <class 'storage.misc.RWLock'>)
	reads   avg=279.27 med=276 min=275 max=403

	    test_readers(64, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=727.44 med=686 min=683 max=1747

	    test_readers(8, <class 'storage.misc.RWLock'>)
	reads   avg=2264.38 med=2230 min=2226 max=2471

	    test_readers(8, <class 'vdsm.storage.rwlock.RWLock'>)
	reads   avg=6466.88 med=6520 min=5674 max=7277

	To run this test, use:

	    ./run_tests_local.sh --enable-stress-tests -s storage_rwlock_test.py:RWLockStressTests

	Continuous-Integration: Jenkins CI

	tests: Add readers contention rwlock test
	Add timing test for taking a shared lock on a RWLock. This should be a
	common operation, and it is interesting to see how it differ from
	readers and writers connotation.

	Continuous-Integration: Jenkins CI

2016-04-14  Adam Litke  <alitke@redhat.com>

	blockVolume: Move _calculate_volume_alloc_size to Manifest
	_calculate_volume_alloc_size contains logic that is generally useful for
	creating new block volumes.  Move it to the BlockVolumeManifest class
	(and make it public) so that it can be used by the SDM VolumeArtifacts
	class in the future.

	Continuous-Integration: Jenkins CI

2016-04-14  Amit Aviram  <aaviram@redhat.com>

	hsm: add untrusted image verification.
	In some flows, where an image can be imported into oVirt's storage from
	external sources, e.g in the image upload flow- a VDSM's image is being
	generated and data is being sent into the created volume inside.

	As this flow is risky in cases where the data is a QCOW file with an
	invalid backing file, or wrong disk format is sent, VDSM should verify
	the image in the upload process.

	This patch adds a verb for untrusted image's volume verification, which
	verifies that there is no backing file for a QCOW image, and that the
	format of the uploaded image fits to what the user has specified.

	Continuous-Integration: Jenkins CI

2016-04-14  Dan Kenigsberg  <danken@redhat.com>

	automation: add python3-netaddr and libvirt-python3
	commit 51594c added these packages only to check-patch, but we need them
	in check-merged as well.

	Continuous-Integration: Jenkins CI

	Revert "hostdev: don't implicitly reattach devices"
	This reverts commit 2bdcf4f99e4723f08886 as SR-IOV feature
	depends on implicit reattchement of VFs. Commit 74ac384510b
	makes sure that the reversal would affect only SRIOV NICs
	and not generic host devices.

	Continuous-Integration: Jenkins CI

	Revert "hostdev/sr-iov: don't reattach devices"
	This reverts commit e80ab7fc74b7715. SR-IOV feature depends
	on automatic re-binding of VFs to their network driver.
	Without that, the VFs are no longer recognized as available
	host NICs after a VM using VFs is taken down, or after
	hotunplug of a VFs.

	Bug-Url: https://bugzilla.redhat.com/1234328
	Continuous-Integration: Jenkins CI

2016-04-14  Petr Horáček  <phoracek@redhat.com>

	hook: ovs: report ip info on expected top device
	If network is marked as bridgeless or untagged, report its IP
	info on Engine expected top device.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-04-14  Sandro Bonazzola  <sbonazzo@redhat.com>

	jsonrpcvdscli: disconnectStorageServer verb
	Add disconnectStorageServer used by ovirt-hoste-engine-setup.

	Continuous-Integration: Jenkins CI

2016-04-14  Yaniv Bronhaim  <ybronhei@redhat.com>

	fix pep8 violations
	Continuous-Integration: Jenkins CI

2016-04-14  Nir Soffer  <nsoffer@redhat.com>

	mount: Log info message when mounting or unmounting
	Mounting and unmounting are important modifications to the machine state
	and must be logged. Since actual mount command run now in supervdsm, we
	have no clue about mounting and unmounting operations in vdsm log.

	To help debugging issues with unresponsive mounts, we log also the time
	it took to mount or unmount.

	Continuous-Integration: Jenkins CI

2016-04-13  Nir Soffer  <nsoffer@redhat.com>

	misc: Replace assert with AssertionError
	The code was wrongly assumed that asserts are always available. When
	running in optimized mode, the check would be skipped, leading to
	disastrous results.

	The assert was correct in that this is something that should never
	happen, unless someone is using the barrier incorrectly, or there is
	a bug in the code.

	Continuous-Integration: Jenkins CI

	mount: Remove unneeded return
	Remove unneeded return in mount._mount() and mount._umount() since
	mount._runcmd() does not return any value.

	Continuous-Integration: Jenkins CI

	mount: Perform mount and umount in supervdsm
	We used to run the mount and umount commands using sudo, which requires
	error prone sudoers configuration, and allow any process running as
	vdsm (e.g. a vdsm hook) to perform commands, instead of only vdsmd
	daemon itself.

	This patch changes Mount class to perform mount and umount using
	supervdsm, and remove the now unneeded sudoers configuration for mount,
	umount, and systemd-run.

	Since mounting requires running supervdsm now, tests that used to check
	for that mount work using sudo require now root, and mount module is
	using supervdsm only if not running as root.

	Continuous-Integration: Jenkins CI

2016-04-13  Lihi Wishnitzer  <lihiwish@gmail.com>

	tests: port test models_test.py to python 3
	Ported required code to Python3 in order to for network/models_test.py
	to be Python3 compatible

	Continuous-Integration: Jenkins CI

2016-04-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Enable python3 over fedora as default and disable it over centos\rhel
	Until RHEL 8 which will include py3 packages as default, we prefer to
	disable python3 build and test run as default.

	Continuous-Integration: Jenkins CI

2016-04-13  Adam Litke  <alitke@redhat.com>

	tests: Test storagetestlib FakeEnv functions
	The storagetestlib module provides functionality to create fake file and
	block storage environments which help to unit test storage code.  As
	this code has gotten more complex we need to test that it is actually
	working correctly itself.

	The new storagetestlibTests module tests both file and block
	environments.  We check that the temporary directory housing the fake
	environment has the correct layout and that metadata for the domain and
	volumes 'persists' to the storage.

	Continuous-Integration: Jenkins CI

2016-04-13  pkliczewski  <piotr.kliczewski@gmail.com>

	utils: remove unused variable warning
	Continuous-Integration: Jenkins CI

2016-04-13  Adam Litke  <alitke@redhat.com>

	sdm: Move create_volume parent uuids into separate type
	The schema defines the parent volume reference used in SDM.create_volume
	as a distinct type (ParentVolumeInfo).  Implement this in the code.
	Parent volume parameters are not required but if provided, both must be
	defined.

	Continuous-Integration: Jenkins CI

	sdm: create_volume: remove duplicated args check
	We are already validating the create arguments inside
	VolumeArtifacts.create where we can also validate the preallocate
	parameter.  The call in create_volume is redundant and should be
	removed.

	Continuous-Integration: Jenkins CI

	schema: SDM.create_volume split parent params
	When creating a new volume, the parent_vol_id and parent_img_id are
	optional and should be used only if the new volume is derived from a
	parent (ie. snapshot volume or volume from template).  However, if one
	of the parent_*_id parameters is specified the other one must also be
	provided.  The best way to codify this and organize the create
	parameters is to place the two parent ids together in their own data
	structure.

	Continuous-Integration: Jenkins CI

2016-04-13  pkliczewski  <piotr.kliczewski@gmail.com>

	events: ignore events when jsonrpc binding not available
	When vdsm is booting and jsonrpc binding was not yet created or jsonrpc
	is disable we want to ignore any events that are sent.


	Bug-Url: https://bugzilla.redhat.com/1323969
	Continuous-Integration: Jenkins CI

2016-04-13  Petr Horáček  <phoracek@redhat.com>

	net: netinfo: report switch type as legacy
	This patch sets the API foundation for reporting the switch type,
	future patches will check and report actual switch type.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: canonicalize switch type from custom options
	If network/bond is marked as OVS one via custom option, mark it with
	OVS switch type via 'switch' attribute too.

	This might be used for testing of native OVS until OVS UI changes take
	place in Engine.

	Bug-Url: https://bugzilla.redhat.com/??????
	Continuous-Integration: Jenkins CI

	net: move parse_bond_options to netinfo.bonding
	Move get_bond_options from ovs hook utils to
	vdsm/lib/netinfo/bonding.py, so we can use it in other places.

	Importing Vdsm code to a hook is not a good practise. However,
	as long as we keep both Hook and Native OVS implementation, this
	would make our lifes easier.

	Bonding options handling is duplicated in many forms on many
	places across Vdsm. We should do a refactoring and canonicalize
	bond opts just once.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-04-13  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: set default timeout value
	Continuous-Integration: Jenkins CI

2016-04-13  Francesco Romani  <fromani@redhat.com>

	virt: ovs: fix migrations without the ovs hook
	Since commit 50de041 the libvirt migration hook
	that Vdsm always installs started to depend on the
	ovs_migrate.py helper, which is in turn provided
	by the optional ovs hook.

	So, without the hook installed a given host, any incoming
	migration with fail with

	libvirtd[1179]: internal error: Child process [...]
	  /etc/libvirt/hooks/qemu a_c7_0 migrate begin -)
	  unexpected exit status 127:
	    /etc/libvirt/hooks/qemu: line 20:
	      /usr/libexec/vdsm/ovs_migrate.py: No such file or directory

	(reformatted for clarity and to fit in 78 columns).

	This patch fixes this, making incoming migrations work again even
	without the ovs hook installed.

	Continuous-Integration: Jenkins CI

2016-04-13  Dan Kenigsberg  <danken@redhat.com>

	net event: disable until done properly
	commit de3a8614 introduced a vdsm event whenever a host interface
	changed state. However it issues the event also when Engine stops to
	connect to the host.

	The flood of events causes failure to add a host. This patch dirtily
	disables connectivity events until
	https://bugzilla.redhat.com/show_bug.cgi?id=1324556
	is solved

	Continuous-Integration: Jenkins CI

2016-04-12  Petr Horáček  <phoracek@redhat.com>

	hook: ovs: report network iface expeted by engine
	If a network is marked as bridgeless, we should report its
	vlan/bond/nic as its iface.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-04-12  Allon Mureinik  <amureini@redhat.com>

	hsm.py: Deprecate setStoragePoolDescription
	Since the removal of 3.4 cluster support
	(see commit 23650fb), the setStoragePoolDescription call has become
	pointless. With a memory backend (used in 3.5 clusters) that does not
	persist anything, it doesn't really do anything besides waste CPU
	cycles. Since this version of VDSM can no longer be part of a cluster
	that uses the disk backend, there's no flow where this call actually
	does something useful, this patch hollows out the function to a simple
	pass call and makes its deprecation explicit.

	Unfortunately, 3.5 engines still call this function, so it cannot be
	completely removed yet. Once the support for that engine's version will
	be removed, this method can be removed altogether.

	Continuous-Integration: Jenkins CI

2016-04-12  Nir Soffer  <nsoffer@redhat.com>

	rfh: Remove legacy remoteFileHandler
	We are using ioprocess since ovirt-3.5, there is no reason to keep the
	legacy removeFileHandler infrastructure.

	Continuous-Integration: Jenkins CI

2016-04-12  Petr Horáček  <phoracek@redhat.com>

	net: test: fix custom bond option separator
	Changed custom bonding option separator introduced in
	https://gerrit.ovirt.org/#/c/55827/
	was not changed in functional tests. This problem is exposed only
	with patch https://gerrit.ovirt.org/#/c/55865.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

	utils: move rget to utils
	Move rget from ovs utils to vdsm utils so we can use it with both
	hook and native ovs.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-04-12  Martin Betak  <mbetak@redhat.com>

	migration: Enable cancellation of migrations during retry
	Migrated _migrationCancelledEvent to proper threading.Event() and used wait
	instead of sleep in the retry loop to enable cancellation of migrations without
	any delays if a retry is in effect.

	Continuous-Integration: Jenkins CI

2016-04-12  Francesco Romani  <fromani@redhat.com>

	virt: reformat code
	Silly reformatting patch to make the code easier to change:
	now updates to dicts() require minimal change (+1/-1 line patch)

	Continuous-Integration: Jenkins CI

	migration: Add retry on full capacity
	Utilize the new error code 'migrateLimit' to differentiate between generic
	migration failure on the destination that should be reported to the engine, and
	a transient condition caused by mis-scheduling in higher level where a local
	retry should be performed from the VDSM side.

	Continuous-Integration: Jenkins CI

	vm: graphics: fill legacy display parameters
	To preserve backward compatibility with Engine 3.5,
	Vdsm must fill back the legacy display configuration parameters
	(displayIp, displayPort...) from the graphics device configuration.

	To do so, Vdsm must mutate the original Vm.conf, not a copy,
	otherwise the updates will be lost.

	Bug-Url: https://bugzilla.redhat.com/1325361
	Continuous-Integration: Jenkins CI

2016-04-12  Petr Horáček  <phoracek@redhat.com>

	net: canonicalize bondings in Config
	In https://gerrit.ovirt.org/#/c/55495/ we added bondings
	canonicalization to network/api.py, but we forgot about
	netconfpersistence.py.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-12  Dan Kenigsberg  <danken@redhat.com>

	net tests: wait for a concurrent iptables call to finish
	test_local_auto_with_dynamic_address_from_ra may execute in parallel on
	the same machine. This patch waits until a concurrent iptables call
	finishes instead of failing immediately.

	The down side is that a waiting test may starve forever, but I do not
	believe it is a real problem, as iptables executions are rare and short.

	This patch also plays with indentation to keep el7's pep8 happy.

	Continuous-Integration: Jenkins CI

	net tests: give a more legible skip reason
	Current text

	    SKIP: ('Tested host is not clean (running vs kernel):\nnetworks: %r != %r\nbonds: %r != %r\n', {}, {}, {}, {u'bond0': {u'nics': [], u'options': u'mode=0'}})

	is not formatted.

2016-04-11  Adam Litke  <alitke@redhat.com>

	tests: storagetestlib: create fake MASTERLV
	We currently create all blockSD special LVs except for the 'master' LV.
	Just create it now in order to make our fake block domain look more like
	a real one.

	Continuous-Integration: Jenkins CI

	tests: Fix FakeLVM lv creation size
	This fixes two issues when creating fake LVs for testing.  First, the
	value of MB is corrected.  Second, when creating block volumes the size
	(specified in sectors) is rounded up to the nearest MB.

	Continuous-Integration: Jenkins CI

	tests: Create block metadata file with correct size
	The function BlockStorageDomainManifest.metaSize returns the metadata
	size in MB so it must be converted to bytes when calling make_file.

	Continuous-Integration: Jenkins CI

	tests: Use VG tags to store fake block domain md
	Block storage domain metadata can either be stored in VG tags or in slot
	0 of the metadata LV.  Emulate the tag-based method.  This allows
	testing of code that needs to create its own BlockStorageDomainManifest
	objects.

	Continuous-Integration: Jenkins CI

	tests: storagetestlib: Set fake block domain mountpoint
	BlockStorageDomainManifest depends on its mountpoint attribute being set
	to an existing path.  By default it is the storage_repository
	(/rhev/data-center/...) but we need to set it to be within our temporary
	directory structure.  Also create this path.

	Continuous-Integration: Jenkins CI

	tests: Create fake block volume metadata
	When creating fake block volumes, create the volume metadata in the fake
	block storage domain in the same way that real code does it.  This
	allows tests to produce previously created block volumes.

	Continuous-Integration: Jenkins CI

	lvm: Remove args hack for activateLVs and deactivateLVs
	In order to support calling these functions with either a single LV or a
	list of LVs a hack called _normalizeArgs is being used.  This is ugly
	and unnecessary.  Make activateLVs and deactivateLVs explicit by always
	accepting a list of LVs.

	Continuous-Integration: Jenkins CI

2016-04-11  Nir Soffer  <nsoffer@redhat.com>

	schedule: Port schedule module to Python 3
	In Python 3, you cannot use push a tuple into a heap if one of the
	objects in the tuple does not support ordering. Implement the minimal
	rich comparison to make it work on Python 3.

	Since ScheduledCall supports ordering now, we don't need to wrap it in a
	tuple, and we can push the object itself into the heap. We used a tuple
	before because in Python 2 it was faster than implementing a __cmp__
	method. Unfortunately, we don't have this option with Python 3.

2016-04-10  Roman Mohr  <rmohr@redhat.com>

	Bump mom dependency to version 0.5.3
	Use mom version 0.5.3 which supports QoS changes on running VMs.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1201482
	Continuous-Integration: Jenkins CI

2016-04-10  Petr Horáček  <phoracek@redhat.com>

	net: native ovs: move RollbackIncomplete to network errors
	Move RollbackIncomplete exception to network/error.py, so it can
	be used by other netswitches.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

	net: Persist bonding legacy switch type
	Legacy configurators do not pass all bonding arguments to
	BaseConfig:setBonding() (but it pass everything to setNetwork()),
	so we need to persist 'switch' parameter explicitly.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-09  Martin Sivak  <msivak@redhat.com>

	Fix a bad value in KSM test
	The merge across nodes allows only 0,1,2,3 values.

	Continuous-Integration: Jenkins CI

2016-04-09  Adam Litke  <alitke@redhat.com>

	FakeLVM: Add changeVGTags support
	changeVGTags support is needed to properly emulate tag-based block
	storage domain metadata.  The functionality works identically to the
	changeLVTags function which is already implemented.

	Continuous-Integration: Jenkins CI

	FakeLVM: Add changeLVTags
	The BlockVolumeArtifacts code needs to use changeLVTags during volume
	creation.  Since we will want to test that code, add support for
	changeLVTags in FakeLVM.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-04-08  Milan Zamazal  <mzamazal@redhat.com>

	tests: Use integer division for array index in SchedulerTests
	In Python 3 the standard division operator may produce non-integer
	result even when both the operands are integers.  We should use //
	operator instead, which always produces integer result in both Python 2
	and Python 3.

	This fixes one of the Vdsm test breakages with Python 3, when running
	`make check-all'.

	Continuous-Integration: Jenkins CI

2016-04-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	move momIF to lib
	Continuous-Integration: Jenkins CI

2016-04-08  Petr Horáček  <phoracek@redhat.com>

	hook: ovs: assert custom bond opts with ':'
	On Engine side we forbid multiple '=' in one bond option. That means,
	that we cannot pass custom options as 'custom=foo=bar,x=y'.

	Now we use ':' as a delimiter, so custom options should look like
	'custom=foo:bar,x:y'.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-04-07  Andrej Krejcir  <akrejcir@redhat.com>

	Add MoM scripts to change storage QoS on running VM
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1201482
	Continuous-Integration: Jenkins CI

	Apply storage QoS on running VM
	Modified updateVmPolicy command to accept disk ids.
	Added a function to get current io tune from libvirt.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1201482
	Continuous-Integration: Jenkins CI

2016-04-07  Martin Polednik  <mpolednik@redhat.com>

	hostdev: use device setup instead of detach
	Host devices require action before VM is started. We rename this action
	from detach to now generic setup.

	Continuous-Integration: Jenkins CI

2016-04-07  Nir Soffer  <nsoffer@redhat.com>

	travis: Improve Dockerfile formating
	Sort packages to make it easier to work with, and separte the && line so
	it is easier to modify the list.

	Continuous-Integration: Jenkins CI

2016-04-07  Francesco Romani  <fromani@redhat.com>

	Vm: conf: proper locking in the creation path
	We are still getting the error
	RuntimeError: dictionary changed size during iteration

	When calling Vm.status(), especially during migrations,
	so we must review our usage of Vm.conf and ensure the lock
	is always used.

	Bug-Url: https://bugzilla.redhat.com/1318550
	Continuous-Integration: Jenkins CI

2016-04-07  Edward Haas  <edwardh@redhat.com>

	net: Libvirt hook that enables ovs-legacy migration
	This hook allows VM/s to be migrated between OVS based hosts and legacy
	based hosts, in both directions.

	The hook is added to the OVS hook package.

	Note: The OVS hook and this migration hook is limited to a single
	non-vlan network. An attempt to migrate a VM to a host with multi
	non-vlan networks will fail.

	Continuous-Integration: Jenkins CI

2016-04-07  Maor Lipchuk  <mlipchuk@redhat.com>

	storage: Move mount module to vdsm storage lib.
	Move storage.mount to vdsm.storage.mount

	Continuous-Integration: Jenkins CI

2016-04-07  Liron Aravot  <laravot@redhat.com>

	fileUtils: tarCopy - avoid extracting the file modified time
	We using fileUtils.tarCopy() when there are unsynced clocks between
	the source/destination tar might warn us that the source timestamp is
	in the future (when we copy from/to file).
	This error is logged to stderr, if the copy operation fails for some other
	reason the stderr might be flooeded with timestamp in the future warnings
	which is confusing when analyzing the cause to the failure.

	As we don't care about the timestamp this patch adds the --touch flag
	which doesn't extract the file modified date and by that eliminates the
	warnings.

	Continuous-Integration: Jenkins CI

2016-04-06  Amit Aviram  <aaviram@redhat.com>

	image: add a flag for preparing with illegal volumes.
	Currently preparing an image is impossible if one of its volumes is
	illegal.

	In the new image upload flow, the volume's legality is being used for
	preventing volume usages while doing I/O using ovirt-imageio-daemon.

	When the upload starts, a new image is created and prepared. Then, it is
	being set to ILLEGAL, and only after- a ticket for doing I/O is being
	sent to ovirt-imageio-daemon in order for the user to write data into
	it.

	If this process is stopped by any reason- resuming it means preparing
	the image while it is ILLEGAL.

	This patch adds a flag in the API for enabling the prepare process even
	if its volumes are ILLEGAL, for the upload image to use.

	The flow uses this flag because when a volume is illegal, it can't be
	attached to a running VM, nor a VM can't start with an illegal disk
	attached. Also, adding a new volume state, such as UPLOADING or
	UNSAFE has implications on storage version, and means adding
	validations in many storage flows.

	Continuous-Integration: Jenkins CI

2016-04-06  Allon Mureinik  <amureini@redhat.com>

	pool: Remove refreshStoragePool verb
	The refreshStoragePool verb is only used on DCs of compatibility version
	3.4 or below, which are no longer supported. This patch removes this
	verb.

	Continuous-Integration: Jenkins CI

2016-04-06  Petr Horáček  <phoracek@redhat.com>

	net: canonicalize 'switch' in nets and bonds
	If no switch type is passed, we use 'legacy' as a default.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Jenkins CI

2016-04-06  Tomas Jelinek  <tjelinek@redhat.com>

	migrations: change migration parameters
	Changed the migration params to:
	max_outgoing/incoming_migrations=2
	migration_max_bandwidth=52
	migration_progress_timeout=240
	migration_downtime_delay=20
	migration_downtime_steps=5

	The reason to change migration_max_bandwidth and
	max_outgoing/incoming_migrations is to have less migrations running in parallel
	faster which helps convergence.

	The reason to change the migration_progress_timeout is to leave more time for
	big VMs to converge.

	The reason to change migration_downtime_delay is to make the downtime thread
	start applying the changes faster which is important for VMs which would start
	stalling.

	The reason to change the migration_downtime_steps is to make the growing of the
	downtime more fast.

	Bug-Url: https://bugzilla.redhat.com/1323952
	Continuous-Integration: Jenkins CI

2016-04-06  Adam Litke  <alitke@redhat.com>

	sdm: Add create_volume job
	This is the first SDM verb to be wired up using all of the
	infrastructure (jobs and getHostJobs API, VolumeArtifacts, etc.).  HSM
	creates a create_volume.Job and schedules it using the existing
	TaskManager thread pool.  Eventually we can switch to using the executor
	framework but that can be for a later patch.

	Continuous-Integration: Jenkins CI

2016-04-06  Francesco Romani  <fromani@redhat.com>

	spec: bump libguestfs-tools-c requirement again
	I misread the virt-v2v changelog, and bumped the
	dependency not high enough. This patch fixes that

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1292096
	Continuous-Integration: Jenkins CI

	vm: conf: proper locking in migration path
	We are still getting the error
	RuntimeError: dictionary changed size during iteration

	When calling Vm.status(), especially during migrations,
	so we must review our usage of Vm.conf and ensure the lock
	is always used.

	Bug-Url: https://bugzilla.redhat.com/1318550
	Continuous-Integration: Jenkins CI

2016-04-06  mlipchuk  <mlipchuk@redhat.com>

	mkimage: import mount explicitly from storage.
	import mount explicitly from storage and change
	it accordingly in mkimage and mkimageTests.

	Continuous-Integration: Jenkins CI

2016-04-06  Edward Haas  <edwardh@redhat.com>

	tests: Run unit tests using travis-ci and docker
	Integrate with travis ci to run unit tests with the help of a vdsm
	docker image.

	Currently it is based on the docker image edwardhaas/ovirt-vdsm-dev that
	contains the required vdsm packages for running the unit tests.
	The docker image is run, mounting current branch/pull commit and executes
	the unit tests (make check-unit).

	The image can be also be run locally:
	- Install docker.
	- Get and run the image: docker run edwardhaas/ovirt-vdsm-dev

	Travis CI run example, with this patch, can be reviewed here:
	https://travis-ci.org/EdDev/vdsm

	Travis CI should be enabled on the ovirt/vdsm repo so it can run on each
	merge.

	Continuous-Integration: Jenkins CI

2016-04-05  Francesco Romani  <fromani@redhat.com>

	caps: drop dead code
	We don't support RHEL6 anymore, and we depend anyway
	on libvirt >= 1.2.1x so we don't need this code anymore.

	Continuous-Integration: Jenkins CI

2016-04-05  Lukianov Artyom  <alukiano@redhat.com>

	hooks:checkips: add checkips hook
	Give possibilty to check connectivity between host and given addresses.
	Update network stats with state of addresses.

	Bug-Url: https://bugzilla.redhat.com/994170
	Continuous-Integration: Jenkins CI

2016-04-05  Francesco Romani  <fromani@redhat.com>

	vm: use proper threading.Event()s
	We use plain booleans in Vm class to synchronize with the asynchronous
	creation thread. This is (most likely) already safe given the CPython
	semantics, but using threading.Event() better conveys what we are trying
	to do here, making the code a little clearer.

	Bug-Url: https://bugzilla.redhat.com/912390
	Continuous-Integration: Jenkins CI

2016-04-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Move numaUtils content to numa module
	Continuous-Integration: Jenkins CI

2016-04-04  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Remove unused instance variable
	IscsiConnection._lastSessionId is not used since commit 87a3fa62adb0
	(storageServer: remove dead code from getSessionInfo).

	Continuous-Integration: Jenkins CI

2016-04-04  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add support for hotplug
	Host device hotplug is more complicated hotplug mechanism due to IOMMU
	limitations. The operation needs to be bulk, so IOMMU placeholders
	and/or different devices in shared groups can be added.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234283
	Continuous-Integration: Jenkins CI

2016-04-04  Vinzenz Feenstra  <vfeenstr@redhat.com>

	guestagent: Add support for containers message
	This patch introduces the support of reporting the list of containers,
	sent by the guest agent and exposing it to the VDSM API.

	Sent by the guest agent is a list of active containers running on the guest
	virtual machine.
	Each container includes the id, names/aliases, image name, ran command and
	currently reported status.
	This information will be forwarded as is to the API.

	Guest-Agent-API-Version: 3
	Bug-Url: https://bugzilla.redhat.com/1273399
	Continuous-Integration: Jenkins CI

2016-04-04  Edward Haas  <edwardh@redhat.com>

	fix 186c8574: When using SSL, use the original host
	When a connection to a remote is perform and encryption (SSL) is
	enabled, the original target host should be used for the connection and
	not a resolved one.

	This bug has been detected when trying to connect to a remote IPv4 host,
	with a hostname as the target host and SSL enabled.
	The host got resolved before calling connect, and therefore the
	certificate has not been matched correctly (expected a hostname but used
	a resolved IPv4 address).

	When M2C is dropped, we can easily use the server_hostname arg of
	https://docs.python.org/2/library/ssl.html#ssl.SSLContext.wrap_socket
	and avoid the duplicate name resolution.

	Continuous-Integration: Jenkins CI

2016-04-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Build without supporting python3 by using --disable-python3
	Over some environments we still don't have all required packages for python3.
	Therefore VDSM build should support build process without python3
	dependencies. Using --disable-python3 configure flag will build
	vdsm without using python3.

	Continuous-Integration: Jenkins CI

2016-04-03  Idan Shaby  <ishaby@redhat.com>

	storagetests: add test for mount.isMounted
	Given a local path, this test verifies that the expected fs_file is
	found in /proc/mounts by calling mount.isMounted.

	Related-To: https://bugzilla.redhat.com/1305529
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>
	Continuous-Integration: Jenkins CI

	network: add hosttail_join to address.py
	Related-To: https://bugzilla.redhat.com/1305529
	Continuous-Integration: Jenkins CI

2016-04-02  Dan Kenigsberg  <danken@redhat.com>

	unbreak schemaValidationTest
	I have merged commit 59f6b37 prematurely, as it depnded on a former
	patch in the series.

	Continuous-Integration: Jenkins CI

2016-04-02  pkliczewski  <piotr.kliczewski@gmail.com>

	bridge: fix naming style
	Continuous-Integration: Jenkins CI

2016-04-01  Adam Litke  <alitke@redhat.com>

	Introduce VolumeArtifacts
	In an SDM managed storage domain we will create and remove volumes using
	a garbage collection approach rather than persistent tasks and rollback
	operations.  Volumes consist of three separate artifacts: a data area, a
	metadata area, and a lease area.  Once created on storage these objects
	must be convertable into a Volume with a single atomic operation (ie.
	rename a single file).  Conversely, a Volume can be destroyed by
	reducing it to its artifacts with a single atomic operation.

	VolumeArtifacts is an object to manage the creation and removal of the
	three volume artifacts for both block and file based storage.  It also
	has methods to manage the conversion of these artifacts to a Volume and
	to deconstruct a Volume in order to remove the artifacts from storage.
	The three artifacts on storage will not be detected as a volume by other
	storage code until they are committed.

	Proposed operations for VolumeArtifacts:
	 - create: Create the artifacts on storage
	 - commit: Convert the artifacts to a volume
	 - dismantle: Convert a volume into artifacts
	 - clean: Remove the artifacts from storage

	Additional methods to identify and garbage collect artifacts will also
	be required but the exact interface hasn't settled out yet.

	This patch introduces the idea with minimal support.  We can create
	artifacts on file storage and we only support raw format with no parent
	volume.  Support for cow, parent volumes, block storage, and volume
	removal will be added by subsequent patches.

	Continuous-Integration: Jenkins CI

2016-04-01  Petr Horáček  <phoracek@redhat.com>

	API: net: introduce 'switch' attribute for nets and bonds
	'switch' attribute is needed for multiple Switches support.

	Bug-Url: https://bugzilla.redhat.com/1195208
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-04-01  Francesco Romani  <fromani@redhat.com>

	spec: bump libvirt requirement
	Consume fix to handle imports from vmware.

	Bug-Url: https://bugzilla.redhat.com/1292096
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-31  Idan Shaby  <ishaby@redhat.com>

	storage: remove duplicate code of transformPath
	There are two places that duplicate the code of fileUtils.transformPath
	inline. This patch replaces this code with a call to transformPath.

	Related-To: https://bugzilla.redhat.com/1305529
	Continuous-Integration: Jenkins CI

2016-03-31  pkliczewski  <piotr.kliczewski@gmail.com>

	api: remove unused methods
	There is no reference in the engine nor in vdsClient of the methods in
	ConnectionRefs category.


	Continuous-Integration: Jenkins CI

2016-03-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	configure: fix vhostmd configure value
	this patch puts some order into the enable-vhostmd section of
	configure.ac. The redundant variable enable_vhostmd_hook is dropped,
	and the enable_vhostmd is set to "no" by default.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-03-31  Shahar Havivi  <shaharh@redhat.com>

	Handle closed stream when virt-v2v fails
	When file object is closed by the other side, read return empty string,
	previously we assumed an exception is raised.

	Bug-Url: https://bugzilla.redhat.com/1298134
	Continuous-Integration: Jenkins CI

2016-03-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	softlink conf files for build-artifacts repos and packages
	this patch should avoid failure of vdsm_master_check-merged-fc23-x86_64
	due to

	  checking for nosetests-3.4... no
	  configure: error: python3-nose not found

	Continuous-Integration: Jenkins CI

	remove fc22 automation support
	Continuous-Integration: Jenkins CI

2016-03-31  Martin Betak  <mbetak@redhat.com>

	vm: Move saveState() out of constructor
	Moved saveState() call to the begining of async start of VM in order to:
	* Make the vm ctor side effect free
	* Prevent from saveState being called in case the async start fails (incoming
	  migration limit exceeded)

	Continuous-Integration: Jenkins CI

2016-03-31  Francesco Romani  <fromani@redhat.com>

	spec: don't depend on ovirt-vmconsole on fedora
	Should Vdsm be installed on a system on which the
	ovirt-vmconsole package is not installed, it must
	be ./configure'd with:

	./configure \
	  --with-ovirt-vmconsole-user=vdsm
	  --with-ovirt-vmconsole-group=kvm

	In particular the ovirt-vmconsole-group could be something
	else, but MUST be a group already present in the system.
	Without those two options, any VM will fail to run.

	This is especially relevant for fedora, where the ovirt-vmconsole
	package is not yet available.

	Continuous-Integration: Jenkins CI

2016-03-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	sync debian folder with supervdsm_api dir
	Continuous-Integration: Jenkins CI

2016-03-31  Francesco Romani  <fromani@redhat.com>

	vm: destroy: retry to gracefully destroy
	Add support to retry gracefully to destroy a VM
	before to go forcefully.
	Clients (Engine) could use a new optional parameter
	to tell Vdsm how many times it should retry
	gracefully. This is meant to reduce the risk
	of data corruption in the case the first graceful
	destroy fails (e.g. EBUSY, or system-level timeout).

	The default number of graceful attempt is one for
	backward compatibility.

	Bug-Url: https://bugzilla.redhat.com/1309884
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	vm: destroy: try harder destroying a Vm
	The current Vm code to destroy a Vm starts
	nice, using graceful destroy, and hits harder
	if the nice way fails.

	However, the failure of the first graceful attempt
	is only detected when libvirt returns a specific error code.
	Indeed, the return code of libvirt changed between RHEL6 and RHEL7.
	This looks fragile and looks like unnecessary detail.

	Digging into history, I was not able to find the reason why we look
	for a specific error code.

	This patch just drops the specific error code check.
	Now Vdsm always uses the harsh way if the nice way fails.

	Bug-Url: https://bugzilla.redhat.com/1309884
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-31  Edward Haas  <edwardh@redhat.com>

	net: Adding the netswitch module
	netswitch is placed between the network api and the switches (legacy and
	future ovs), acting as an interface to the underlying switches and
	taking shared responsibilities.

	Continuous-Integration: Jenkins CI

2016-03-31  Petr Horáček  <phoracek@redhat.com>

	caps: allow root-requiring network caps
	Since some OVS parameters are available only to root, we have to
	introduce a mechanism to complement already gathered network
	info with root-only data.

	This will be done by introduced network/api.py:caps_networks().

	Continuous-Integration: Jenkins CI

2016-03-31  Nir Soffer  <nsoffer@redhat.com>

	testlib: Fix temporaryPath on Python 3.
	Writing data to files must use bytes objects, not unicode/strings.
	Replace os.fdopen() with io.open(path, "wb") creating a buffered file
	object for writing binary data.

	Continuous-Integration: Jenkins CI

2016-03-31  Petr Horáček  <phoracek@redhat.com>

	suppress for python2
	Since suppress() function is available only since Python 3.4, add our
	own implementation to vdsm/common/contextlib.py and use it if original
	not available.

	Continuous-Integration: Jenkins CI

2016-03-31  Dan Kenigsberg  <danken@redhat.com>

	commands: import StringIO when AsyncProc is started
	This patch makes it possible to import vdsm.commands on Python 3.
	However, it does not make the module py3-compatible - any usage of
	AsyncProc under Python 3 would fail in runtime.

	The motivation of this patch is to allow adding more modules to the
	test_modules_py3 list, while causing no runtime harm to Python 3.

	Continuous-Integration: Jenkins CI

2016-03-30  Dan Kenigsberg  <danken@redhat.com>

	compat: mock CPopen for Python 3 testing
	I would like to run Vdsm unit tests in Python 3, but many tests
	ultimately attempt to import CPopen. The right thing to do is to remove
	CPopen dependency from the code, but this task is lagging. Until then,
	this patch drops CPopen dependecy for Python 3 only.

	Continuous-Integration: Jenkins CI

2016-03-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Generate coverage report only over fedora which runs unittests
	No reports return 1 and mock thinks that the build failed and report an
	error

	Continuous-Integration: Jenkins CI

2016-03-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove blkid
	Engine has never used the UUID argument for storage specification.
	We drop _getUUIDSpecPath and blkid to avoid carrying dead code.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-03-29  Ondřej Svoboda  <osvoboda@redhat.com>

	shell_helper: ignore iproute2's @master notation to obtain device names
	Continuous-Integration: Jenkins CI

	bonding: move pre-generated data to /usr/share/vdsm
	Bug-Url: https://bugzilla.redhat.com/1261056
	Continuous-Integration: Jenkins CI

2016-03-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	add x86 to epel repo
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-03-29  Francesco Romani  <fromani@redhat.com>

	spec: bump safelease version
	We require a new safelease package to pull more
	arch-specific dependency, until Vdsm can do this
	on its own again.

	In this case, we want virt-v2v to be installed
	on x86_64.

	Related-To: https://bugzilla.redhat.com/1318014
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-29  Martin Polednik  <mpolednik@redhat.com>

	hostdev: expose hostdevReattach maintenance verb
	If device detachment fails at some point, VDSM does nothing. That is
	because detached device does not break anything - it just lacks the
	correct driver and is not usable by the host. Such device wouldn't
	normally be used by host at all, but we should provide option to
	reattach it back without using virsh.

	That way, users are able to reattach devices that they need to use
	after them being detached.

	Continuous-Integration: Jenkins CI

	hostdev: expose 'driver' attribute
	Device drivers are exposed via sysfs file, and those values are exposed
	in libvirt's virNodeDevice XML. Exposing driver further allows us to do
	some nice things such as displaying it to the user, who can then verify

	*) that GPU is correctly bound to pci-stub,
	*) used devices are bound to vfio-pci or
	*) kernel cmdline settings.

	Additionally, since host devices are not reattached (since
	2bdcf4f99e47) it is important to propagate the value further, allowing
	user to reattach devices that manually if one wishes.

	Continuous-Integration: Jenkins CI

2016-03-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	using six in xmlrpc for python3 comp
	Continuous-Integration: Jenkins CI

2016-03-28  Ondřej Svoboda  <osvoboda@redhat.com>

	network: inherit DUID from a bridge's port with no restriction
	A bridge must reuse the DHCP unique identifier of the underlying
	network device it is built atop so DHCP client obtains the same
	lease (in particular, the same address).

	Recently, the flow in setupNetworks changed in a way that the device
	being "replaced" by the bridge no longer reports 'dhcpv4' as True.
	There is simply no evidence of DHCPv4 being used on the device, and
	thus DUID would not be inherited, as the checking is too strict.

	Now, dhclient run on the bridge is always called with the '-df' option
	(used to refer to the bridge port's lease file) as long as it is
	supported. The option is harmless: dhclient simply ignores it if the
	lease file doesn't exist.

	As dhclient doesn't have a -h/--help option, we pass to it an
	intentionally invalid option, tricking it into listing the options it
	supports. To avoid printing the error output to logs, dhclient is now
	called directly, not through execCmd.

	Continuous-Integration: Jenkins CI

2016-03-28  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove parted_utils from vdsm
	it was used by supervdsm api getDevicePartedInfo which is not in used
	anymore.

	Continuous-Integration: Jenkins CI

2016-03-27  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: re-enable IPv6 before device configuration, or disable afterwards
	If a network has been restored with no IPv6 requested, all its devices
	have disable_ipv6 set to 1 and up to now there was no other way to
	re-enable IPv6 than doing so manually or rebooting.

	This patch enables IPv6 on the top-level device ("the network") prior
	to ifup, sets the underlying devices' disable_ipv6 to 1 as they are
	not directly involved in communication. If IPv6 is not requested, it
	is disabled on all devices after ifup.

	Continuous-Integration: Jenkins CI

2016-03-27  Dan Kenigsberg  <danken@redhat.com>

	configure.ac: hard-require python3
	commit f247a0c made python3 a hard build requirement. configure.ac
	must reflect that.

	Continuous-Integration: Jenkins CI

2016-03-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	automation: Run unittests only over fedora mock to save jenkins resources
	Continuous-Integration: Jenkins CI

2016-03-26  Edward Haas  <edwardh@redhat.com>

	net: Introduce network.ip package
	vdsm.network.ip.address is added
	IPv4 and IPv6 classes are moved to it (from models).

	Basic unit test has been created, proper coverage should be added in
	future patches.

	Continuous-Integration: Jenkins CI

2016-03-25  Sandro Bonazzola  <sbonazzo@redhat.com>

	jsonrpcvdscli: getStorageDomainsList verb
	Add getStorageDomainsList used by ovirt-hoste-engine-setup.

	Related-To: https://bugzilla.redhat.com/1228641
	Continuous-Integration: Jenkins CI

	jsonrpcvdscli: connectStorageServer verb
	Add connectStorageServer used by ovirt-hoste-engine-setup.

	Related-To: https://bugzilla.redhat.com/1228641
	Continuous-Integration: Jenkins CI

2016-03-25  Dan Kenigsberg  <danken@redhat.com>

	el7: require newly available python34-nose
	Recently, (as of rhbz#1294865 and rhbz#1294862) six and nose are
	available to python3 users via EPEL7. This patch requires their
	availability on build hosts.

	Continuous-Integration: Jenkins CI

2016-03-25  Francesco Romani  <fromani@redhat.com>

	virt: common handling of exceptions
	Vm methods should not return responses directly.
	Rather, they should raise proper exception,
	and a common layer should translate them in responses.

	In case of succesfull completion, this code automatically
	produces a generic success response. Should the method
	require extra fields, it can return a dictionary
	with the keys to be added to the success response.

	Using this way the method could also override the default
	keys (e.g. the message). This is not clean but it could
	be needed for backward compatibility.

	Bug-Url: https://bugzilla.redhat.com/1316128
	Continuous-Integration: Jenkins CI

2016-03-25  Sandro Bonazzola  <sbonazzo@redhat.com>

	jsonrpcvdscli: getConnectedStoragePoolsList verb
	Add getConnectedStoragePoolsList used by ovirt-hoste-engine-setup.

	Related-To: https://bugzilla.redhat.com/1228641
	Continuous-Integration: Jenkins CI

	jsonrpcvdscli: add getVdsHardwareInfo verb
	Add getVdsHardwareInfo used by ovirt-hoste-engine-setup.

	Related-To: https://bugzilla.redhat.com/1228641
	Continuous-Integration: Jenkins CI

2016-03-24  Adam Litke  <alitke@redhat.com>

	storage: Clean up image links during teardownImage
	In commit 736ab9 we began cleaning up volume links that were created in
	/var/run/vdsm/images/... Unfortunately on block domains we are leaving
	around a broken symlink in /rhev/data-center/... in some cases and this
	will cause storage operations related to a disk of a VM that was
	previously running to fail on this host.  The solution is to also remove
	this broken symlink during teardownImage.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1319987
	Continuous-Integration: Jenkins CI

	blockVolume: Remove stale links to image directory
	Since we started to create the image directory under "/run/vdsm", the
	image directory under "/rhev/data-center/pool/sd/images/" may be a link
	to "/run/vdsm/storage/sd/image".

	The old code (from rhev-3.0) creating the image directory lazily was not
	designed to handle links and was happily using a stale link instead of
	creating the image directory.

	Now we detect and remove stale links, so proper image directory is
	created. Since stale links are not expected in normal usage, we log a
	warning in this case.

	Bug-Url: https://bugzilla.redhat.com/1319987
	Continuous-Integration: Jenkins CI

2016-03-24  Nir Soffer  <nsoffer@redhat.com>

	commit-template: Refine the example text
	Improve the long description, making the template closer to how a commit
	message should look like.

	Continuous-Integration: Jenkins CI

2016-03-24  Ilia Meerovich  <iliam@redhat.com>

	Skipping networkTests if alien bonds presents in the system
	Alien bonds causes to tests to report incorrect results.
	Testing with alien bonds doesnt test vdsm networking.
	It makes sense since ovirt host shouldn't be used for other
	purposes.

	Continuous-Integration: Jenkins CI

2016-03-24  Ondřej Svoboda  <osvoboda@redhat.com>

	network tests: remove bonds after use
	Continuous-Integration: Jenkins CI

2016-03-24  Francesco Romani  <fromani@redhat.com>

	configurator: libvirt: do not jump on virtlogd
	Libvirt 1.3.0 adds and uses by default a new service called virtlogd
	to prevent malicious QEMU guests to DoS the virtualization host.
	For more details, the initial announcement is here:
	https://www.redhat.com/archives/libvir-list/2015-November/msg00085.html

	The feature seems promising and helpful, but we are
	not eager to jump early on this bandwagon, do we disable
	this for the near future.

	Once the feature is stable and we run our integration test,
	we will re-enable it.

	Backport-To: 3.6
	Temporary-Patch: yes
	Related-To: https://bugzilla.redhat.com/1318902
	Continuous-Integration: Jenkins CI

2016-03-24  Idan Shaby  <ishaby@redhat.com>

	storagetests: add "server:" to spec part
	This patch adds the missing "server:" part to the spec parameter of
	MountConnectionTests.test_normalize_local_path.

	Related-To: https://bugzilla.redhat.com/1305529
	Continuous-Integration: Jenkins CI

2016-03-24  Petr Horáček  <phoracek@redhat.com>

	tests: ovs: mock setupNetworks in OVSNetworkTests class
	Until now we marked networks and bonds as OVS ones in OVSVdsProxy.
	It is easier to do so on OVSNetworkTests class.

	Continuous-Integration: Jenkins CI

2016-03-24  Francesco Romani  <fromani@redhat.com>

	spec: bump libguestfs-tools-c requirement
	Consume fix to handle imports from vmware.

	Bug-Url: https://bugzilla.redhat.com/1292096
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-23  Petr Horáček  <phoracek@redhat.com>

	ovs: hook: fake bridgeless networks
	Engine expects host-only networks (e.g. display or migration networks)
	to be bridgeless. We cannot create bridgeless networks in OVS, but we
	can create them bridged and then lie about them to engine.

	Continuous-Integration: Jenkins CI

2016-03-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	fix pep8 1.4.6 errors for el7 build
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-03-23  Martin Polednik  <mpolednik@redhat.com>

	cpuarch: Move PAGE_SIZE_BYTES to cpuarch
	This constant is mostly related to the CPU architecture.

	Continuous-Integration: Jenkins CI

2016-03-22  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Warn about callers of fileUtils.createdir()
	To ensure we will check the callers of fileUtils.createdir() it emits
	now a warning when a directory exists.  The warning is available only
	when python_warnings_enable option is enabled, so it does not effect
	users.

	Continuous-Integration: Jenkins CI

2016-03-22  Allon Mureinik  <amureini@redhat.com>

	storage: Remove legacy get[Iso|Floppy]List
	The legacy getIsoList and getFloppyList verbs are only used in DCs of
	compatibility version 3.3 (or older), while newer DCs use the
	getFileStats verb. Since these old DC levels are no longer supported
	by VDSM, these verbs can safely be removed.

	Continuous-Integration: Jenkins CI

2016-03-22  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Convert unhelpful warnings to debug messages
	When a directory exists, fileUtils.createdir() logs a warning, although
	it has no context to tell if the existing directory is expected in the
	normal flow, or an unexpected error condition.

	This warning causes users to worry about non-existing issues and feel
	less confident about the product. It also makes developer life harder,
	since searching for warnings results in many unrelated messages.

	This patch changes the warning to debug message, which may be helpful
	for debugging.  Code that wants to warn about existing directories
	should not call fileUtils.createdir() but the underlying os.makedirs()
	and handle the EEXIST error.

	Bug-Url: https://bugzilla.redhat.com/1129587
	Continuous-Integration: Jenkins CI

2016-03-22  Adam Litke  <alitke@redhat.com>

	storagetests: Add create_block_volume
	Add a utility function to create a fake block volume.  We must make sure
	the LV is present in our FakeLVM instance with the proper lvtags.
	Volume metadata is allocated from the fake domain's metadata area.  We
	must also create the directory for the image.

	Continuous-Integration: Jenkins CI

	storagetests: Rename make_blocksd
	Over time make_blocksd has evolved to work more like
	make_filesd_manifest.  Now that it performs the same functionality as
	its file counterpart we should make the names similar as well.

	Continuous-Integration: Jenkins CI

	storagetests: Create metadata storage area for block domains
	In order for our fake block storage domains to function with more real
	code we need to create the "backing storage" for the metadata LV.  As
	written today, the code does not care if this is a file instead of a
	block device.

	Continuous-Integration: Jenkins CI

	tests: Add test_overwrite_blocksize test
	The BlockStorageDomainManifest has special behavior with respect to its
	logBlkSize and phyBlkSize properties.  These are set at object
	construction time from the passed metadata but are not updated when
	replaceMetadata is called (even if the new metadata specifies new
	sizes).  This test verifies that values are not overridden by
	replaceMetadata but that non-default values can be provided during
	object construction.

	Continuous-Integration: Jenkins CI

2016-03-22  Fabian Deutsch  <fabiand@fedoraproject.org>

	spec: vdsm requires vdsm-cli
	vdsm is packaging the sos plugin, which in turn relies on vdsm-cli.
	Thus vdsm-cli should be a dependency of vdsm.

	Continuous-Integration: Jenkins CI

2016-03-22  Edward Haas  <edwardh@redhat.com>

	net: IP address hosttail split tool
	vdsm.common.network.address.hostail_split is provided to decode hostport
	and nfs mount path.
	Both use the following structure: host:tail, where 'tail' is either a
	port or a path.

	Continuous-Integration: Jenkins CI

2016-03-22  Nir Soffer  <nsoffer@redhat.com>

	tests: Skip test if veth_pair cannot be created
	The context manager used try-except-finally in the wrong way, always
	deleting the interface, even when we failed to create it.

	Continuous-Integration: Jenkins CI

2016-03-22  Martin Polednik  <mpolednik@redhat.com>

	hostdev/sr-iov: don't reattach devices
	Similar to [1]. As SR-IOV devices
	are still classical VFIO devices, we want to avoid implicitly rebinding
	them to the host drivers for reasons outlines in [1].

	[1] I1136292cb7e9d13a8202b1f5162299d2155e8036

	Continuous-Integration: Jenkins CI

2016-03-22  Nir Soffer  <nsoffer@redhat.com>

	exception: Add exceptions for vdsm.define errors
	Add an exception class for each error in vdsm.define.

	The long term goal is simplifying error handling, so code can raise
	error in whatever layer the error happened, and single error handler
	will generate the response using the error response() method.

	As a temporary step, define.errCode is using the new exceptions to build
	the response dict. When callers are updated to raise the new exceptions,
	we can drop the errCode dict and the define module.

	Continuous-Integration: Jenkins CI

2016-03-22  Adam Litke  <alitke@redhat.com>

	tests: refactor manifest_tests fake env setup
	The manifest_tests have a lot of boilerplate code to set up the fake
	environment for each test.  Use the new FakeEnv infrastructure provided
	by storagetestlib to clean up these tests.

	Continuous-Integration: Jenkins CI

2016-03-22  Martin Polednik  <mpolednik@redhat.com>

	hostdev: don't implicitly reattach devices
	We have previously dealt with device drivers as follows:

	1) detach (means unbinding from host driver),
	2) VM runs and
	3) reattach (binds the driver back to host).

	This patch removes step 3. Although it explicitly makes device unusable
	for the host after VM's runtime, the patch series also re-introduces
	the hostdevReattach verb to explicitly fix these devices.

	The importance of this change lies in the fact that device drivers are
	evil. Rebinding to a driver may lead to horrible issues, most notably
	host kernel crashes. We can also assume that, on properly maintained
	hosts, the devices are reserved for assignment and are not meant to be
	used by the host at all.

	Valid points for this kind of behavior are in this[1] thread.

	[1] https://www.redhat.com/archives/libvir-list/2016-March/msg00593.html

	Continuous-Integration: Jenkins CI

2016-03-22  Milan Zamazal  <mzamazal@redhat.com>

	virt: Move Vm._getUnderlyingVmDevicesInfo() content out of Vm
	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingDriveInfo() out of Vm
	This generally follows the Sound device example, but involves a bit more
	code.

	Continuous-Integration: Jenkins CI

2016-03-21  Fred Rolland  <frolland@redhat.com>

	storage: move persistent to lib
	Moving vdsm/storage/persistentDict.py to
	lib/vdsm/storage/persistent.py

	Continuous-Integration: Jenkins CI

2016-03-21  Dan Kenigsberg  <danken@redhat.com>

	tests: move sourcerouting_test to tests/net where it belongs
	Continuous-Integration: Jenkins CI

2016-03-20  Allon Mureinik  <amureini@redhat.com>

	dsaversion: Remove 3.4 support
	The current VDSM no longer supports 3.4 clusters (see, e.g., commit
	1f21f1c). This patch explicitly states that in the dsaversion, to avoid
	pointless failures of dnf upgrading vdsm and having the host move to
	non-operational.

	Continuous-Integration: Jenkins CI

2016-03-19  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: move udev-related functions to udev.py
	Continuous-Integration: Jenkins CI

	hostdev: decode XML string when parsing devices
	As there is no encoding of information and libvirt does not handle
	encoding, our best bet is ascii. This patch therefore converts device
	XMLs to ascii, ignoring the errors found.

	Bug-Url: https://bugzilla.redhat.com/1315435
	Continuous-Integration: Jenkins CI

2016-03-19  Edward Haas  <edwardh@redhat.com>

	net tests: TestIPv6Addresses should run as root
	In addition, it is marked as an integration test.

	Continuous-Integration: Jenkins CI

2016-03-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Move Vm._getUnderlyingUnknownDeviceInfo() out of Vm
	This is somewhat similar to other devices but has its specifics.  We put
	the resulting function into a newly created source file as it doesn't
	belong to supported devices.  The content of
	Vm._getUnderlyingVmDevicesInfo() will be put into the same file in a
	followup patch.

	Continuous-Integration: Jenkins CI

2016-03-18  Edward Haas  <edwardh@redhat.com>

	net tests: IPv6 autoconf with RA server
	Adding an integration test that checks IPv6 address allocation through
	slaac (autoconf).

	The test uses dnsmasq with enabled router advertisement.

	Continuous-Integration: Jenkins CI

2016-03-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Move Vm._getUnderlyingNetworkInterfaceInfo() out of Vm
	This generally follows the Sound device example, but involves a bit more code.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingHostDeviceInfo() out of Vm
	This generally follows the Sound device example, but is a bit more
	complicated and requires an additional unit test to get the moved code
	covered.

	Continuous-Integration: Jenkins CI

2016-03-18  Martin Polednik  <mpolednik@redhat.com>

	osinfo: avoid excepting *
	Using 'except:' can easily hide things such as syntax errors. This
	patch changes the code to except Exceptions, leading to possibly safer
	code.

	Continuous-Integration: Jenkins CI

2016-03-17  Vinzenz Feenstra  <vfeenstr@redhat.com>

	guest-agent: Fix API version negotiation
	The guest agent negotation is currently broken due to storing the wrong value
	as effectiveAPIVersion.
	Currently the reported value by the guest agent is stored, which actually
	should not be stored, but the commonVersion value.

	Bug-Url: https://bugzilla.redhat.com/1318657
	Continuous-Integration: Jenkins CI

2016-03-17  Milan Zamazal  <mzamazal@redhat.com>

	virt: Move Vm._getUnderlyingGraphicsDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example,
	with additional update of a test and one TODO comment.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingMemoryDeviceInfo() out of Vm
	This generally follows the Sound device example, except for additional
	memSize setting in conf, an additional place where memory devices are
	updated, and adding simplistic test coverage.

	Continuous-Integration: Jenkins CI

2016-03-17  Martin Polednik  <mpolednik@redhat.com>

	machinetype: document public functions
	Continuous-Integration: Jenkins CI

2016-03-17  Martin Betak  <mbetak@redhat.com>

	response: Add support for specific error checking in is_error
	response.is_error can now take an optional 'err' argument to check
	if given response is of that particular error type.

	E.g. to check if given response if an instance of 'migrateLimit' error:

	  response.is_error(result, 'migrateLimit')

	This will return false for successful response as well for all error codes
	other than that of 'migrateLimit'.

	Continuous-Integration: Jenkins CI

2016-03-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove unused code
	Remove class method from the DirectFile tests that nobody uses.

	Continuous-Integration: Jenkins CI

	tests: Use multiple context expressions
	Since Python 2.7, multiple context expressions are supported in with
	statement, eliminating the need for nesting or using the deprecated
	nested() helper.

	This patch simplify with usage the DirectFile tests.

	See https://docs.python.org/2/reference/compound_stmts.html#the-with-statement

	Continuous-Integration: Jenkins CI

2016-03-16  Petr Horáček  <phoracek@redhat.com>

	net: api: move rollback to network/api.py level
	In order to simplify rollback handling we moved rollback from
	API.py to network/api.py.

	Note, that we also have to fix netinfo.cache import in vdsm/caps.py,
	caps were added to scope as a side effect of RollbackIncomplete import
	in API.py. For more info check https://gerrit.ovirt.org/#/c/53529

	Continuous-Integration: Jenkins CI

2016-03-15  Edward Haas  <edwardh@redhat.com>

	net: Network caps now reports IPv6 autoconf state
	'ipv6autoconf' current status is reported through caps.

	Integration tests have been added to cover ipv6autoconf.

	Continuous-Integration: Jenkins CI

	tests: Do not skip test on dnsmasq_run failure
	Tests that used dnsmasq_run context manager could skip if the dnsmasq
	failed to start.

	There is no apparent reason for it to fail, but if it does we better fail.
	(so we could notice it and examine the problem)

	Continuous-Integration: Jenkins CI

	tests: Provide dnsmasq_run as a context manager
	The functional tests are using dnsmasqDhcp as the dnsmasq context
	manager. It is limited to a single configuration and located as part of
	the functional network test module.

	Same functionality has been added in the nettestlib module, with options
	to allow a test to specify its own configuration, per the needs.

	dnsmasqDhcp is replaced by dnsmasq_run.

	Continuous-Integration: Jenkins CI

2016-03-15  Martin Polednik  <mpolednik@redhat.com>

	osinfo: pep8tify kdump_status
	Continuous-Integration: Jenkins CI

2016-03-15  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Add atomic_symlink utility
	This helper function creates or updates a symlink atomically. If the
	symlink exists but links to a different target, it is replaced
	atomically with a link to the specified target.

	We use this logic now for linking storage domain, and we want to use the
	same logic for creating or updating the image rundir links
	(/run/vdsm/storage/sd_uuid/img_uuid)

	Continuous-Integration: Jenkins CI

2016-03-15  Martin Polednik  <mpolednik@redhat.com>

	osinfo: use pep8 function names
	Continuous-Integration: Jenkins CI

	caps: move os-related information to osinfo module
	As a part of ongoing effort to strip caps.py the 'trashbin of VDSM
	capabilities' title, this patch moves functionality related to OS
	(packages, kdump support, selinux) etc. to VDSM library, module osinfo.

	This is mostly raw move, cleanups within osinfo will be added further
	in the patch series.

	Continuous-Integration: Jenkins CI

2016-03-15  Francesco Romani  <fromani@redhat.com>

	lib: executor: port executor.py to python3
	This patch fixes executor.py to work with python3,
	and enable its test to run on python3.

	We achieve this goal using 'range' instead of 'xrange'
	(xrange was renamed range in py3).
	This could cause performance regression on py2 in theory,
	if the workers count grows too high.

	But we know already from testing that having too many workers
	dwarfs any other performance/memory consumption issue,
	so moving to range() should not bring practical issues.

	Continuous-Integration: Jenkins CI

2016-03-15  Milan Zamazal  <mzamazal@redhat.com>

	virt: Move Vm._getUnderlyingConsoleDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingRngDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingSmartcardDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingWatchdogDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingBalloonDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingControllerDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingVideoDeviceInfo() out of Vm
	This is just a simple move of code, following the Sound device example.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingSoundDeviceInfo() out of Vm
	This is the first sample movement of _getUnderlying*DeviceInfo() method
	movement out of Vm class.  This patch does nothing more than moving the
	corresponding code and updating the docstring accordingly.  There are
	other tempting changes we might want to do with the code, such as
	getting rid of the configuration updates, but that's better done later,
	after everything is moved to proper places.

	Other _getUnderlying*DeviceInfo() methods are going to be moved in the
	same way in the followup patches.

	Continuous-Integration: Jenkins CI

	virt: Use PEP8 identifiers in vmxml.device_address
	This is a trivial change just renaming two local variables.

	Continuous-Integration: Jenkins CI

	virt: Move Vm._getUnderlyingDeviceAddress() to vmxml.py
	This is a preparation step for the next round of moving device handling
	code out of Vm class.  We want to move Vm._getUnderlying* methods out of
	Vm, but not all at once.  Most of the methods use
	_getUnderlyingDeviceAddress() so we need to have this functionality
	available in both Vm and the moved code and this is the reason for
	having this preparation step.

	Continuous-Integration: Jenkins CI

2016-03-15  Edward Haas  <edwardh@redhat.com>

	tests: Classify network tests type
	Mark the tests as unit or integration.

	For running unit tests, issue 'make check-unit'.

	Continuous-Integration: Jenkins CI

	test: Unit Test target with NOSE attribute/marker
	Prepare the infrastructure for marking tests using
	nose.plugins.attrib.attr for their 'type' and create a
	check-unit (make) target to run only unit tests.

	Following patches will mark unit tests.

	The goal is to allow developers to run all unit tests frequently, fast and
	on any linux flavor.

	Continuous-Integration: Jenkins CI

2016-03-14  Adam Litke  <alitke@redhat.com>

	storagetests: initial FakeEnv support
	Many storage tests rely on a mocked storage environment in order to test
	the storage code.  We can achieve this environment through a combination
	of mocked objects, monkey-patching, and use of temporary files and
	directories.  To simplify the tests and increase reliability we
	introduce a standardized interface implemented with context managers
	that can be used by all tests.  While not all tests actually require the
	full scope of these mocked environments, the benefits of uniformity
	justify the extra setup.

	Continuous-Integration: Jenkins CI

	FakeLVM: Add invalidateVG stub
	Real code expects to call lvm.invalidateVG in cases where our cache
	needs to be invalidated and the data should refreshed from LVM.  FakeLVM
	has no such cache so this is a no-op.

	Continuous-Integration: Jenkins CI

	tests: incorporate pool id in file domain path
	In real environments, an image 'A' in a file domain would appear in the
	following directory path:

	    /<storage-repo>/<pool-id>/<domain-id>/images/A

	Prior to this patch the helper function make_filesd_manifest was
	creating the structure:

	    /<storage-repo>/<domain-id>/images/A

	This obviously doesn't agree and needs to be fixed.  The solution is to
	generate a spuuid in make_filesd_manifest and construct the metadata
	appropriately and then initialize the domain manifest with the path that
	includes the pool id.

	To make sure this works for all callers, prohibit callers from passing
	in their own domain metadata.  Only one test needed to be fixed to make
	this change.

	Continuous-Integration: Jenkins CI

	tests: Add sduuid to fake domain metadata
	When initializing fake storage domains we create the domain metadata.
	The domain ID should always be added to this metadata.

	Continuous-Integration: Jenkins CI

	storage: Cleanup usage of DMDK_POOLS
	Storage Domains have a metadata key called DMDK_POOLS.  Volumes also use
	this metadata key by importing it from sd.py.  This is ugly and will
	cause a circular module dependency in an upcoming patch.  Clean this up
	by creating a new MDK_POOLS constant in constants.py and using that
	definition from sd.py and volume.py.

	Continuous-Integration: Jenkins CI

	tests: rename manifest_tests.py
	We now have multiple kinds of manifests: StorageDomainManifest,
	ImageManifest, and VolumeManifest.  Move manifest_tests.py to
	domain_manifest_tests.py so that we can create new files to test the
	other kinds of manifests.

	Continuous-Integration: Jenkins CI

2016-03-14  pkliczewski  <piotr.kliczewski@gmail.com>

	vm: remove not used monitorCommand
	Continuous-Integration: Jenkins CI

2016-03-14  Edward Haas  <edwardh@redhat.com>

	net tests: Move dhcp and firewall service modules
	dhcp and firewall modules have served only network functional tests.
	New integration tests require these services, therefore, they are being
	moved to the tests/network package, allowing their usage by integration
	and functional tests.

	Continuous-Integration: Jenkins CI

	net tests: Introduce Router Advertisement with dnsmasq
	dnsmasq has been used as a dhcp server for the network funtional tests.
	With the introduction of IPv6 support and its autoconf option, RA is
	enabled in dnsmasq (if requested).

	RA is currently disabled by default, following patch should enable it by
	default.

	Continuous-Integration: Jenkins CI

2016-03-14  pkliczewski  <piotr.kliczewski@gmail.com>

	build: clean tests certificates
	There were recent changes how we represent host in tests certificates
	so we can support ipv6. Switching between branches requires cleaning
	certs otherwise tests would fail. Now when we run make clean tests certs
	are deleted.


	Continuous-Integration: Jenkins CI

2016-03-14  Dan Kenigsberg  <danken@redhat.com>

	contrib/shell_helper: allow installing from tag
	Prior to this patch, _latest_version failed to find a definitive marker
	on rpms that where built from a tag and thus lacked 'git<hash>' in their
	name. Now names such as vdsm-hook-4.17.24-0.el7.centos.noarch.rpm are
	tolerated.

	Continuous-Integration: Jenkins CI

2016-03-14  Francesco Romani  <fromani@redhat.com>

	virt: more moving under site-packages
	Move another round of virt modules under site-packages.
	The modules left out are the one still actively
	worked, as well as the dreaded vm.py, as part as the ongoing
	effort to cleanup VM devices handling and move from minidom
	to etree.
	Same applies for the migration code, which is being changed
	because of the 'migration enhancements' feature.

	We will have another mass move later in the cycle,
	when the aforementioned work is done.

	Continuous-Integration: Jenkins CI

	netinfo: dns: more robust parsing of resolv.conf
	The current code which parses /etc/resolv.conf is not
	very robust. This code should handle manual edit
	of such file (discouraged, but possible).

	In particular, it should skip silently empty lines;
	current code breaks in this case.

	I noticed this issue randomly while running Vdsm
	on some host of mine, where I routinely edit
	/etc/resolv.conf (et. al.)

	Continuous-Integration: Jenkins CI

2016-03-13  Nir Soffer  <nsoffer@redhat.com>

	storage: Sort modules
	When securable module was moved to vdsm.storage, some file lists were
	not sorted correctly. This was most likely the maintainer fault, taking
	patches in the wrong order.

	Continuous-Integration: Jenkins CI

2016-03-13  Ala Hino  <ahino@redhat.com>

	storage: Move sync module to lib
	Moving vdsm/storage/sync.py to lib/vdsm/storage/sync.py

	Continuous-Integration: Jenkins CI

2016-03-13  pkliczewski  <piotr.kliczewski@gmail.com>

	bridge: remove dead code
	Continuous-Integration: Jenkins CI

	bridge: obtain method
	We used to change ClassName.MethodName to ClassName_MethodName due
	restrictions of parameter when using getattr. Now we use custom method
	to do it so we do not need to change ClassName.MethodName.


	Continuous-Integration: Jenkins CI

	stomp: make sure that subscriptions use uniqe id
	There was a bug in the engine that there were two subscriptions with
	the same id. This issue as a result created fd leak because we were not
	able to clean the subscription id on connection closed or unsubscribe.

	Continuous-Integration: Jenkins CI

2016-03-11  Nir Soffer  <nsoffer@redhat.com>

	repoplot: Support dd copy commands used in 3.5
	In 3.5, we used to copy qcow volumes using dd, and raw volumes using
	qemu-img. Parse the these dd commands and display both dd and qemu based
	disk copies in the "disk commands" graph.

	This operation generates lot of io, possibly effecting domain
	monitoring.

	Continuous-Integration: Jenkins CI

	repopolot: Remove duplicate command end detection
	Extract is_command_end(log) function replacing duplicate code in command
	handlers.

	Continuous-Integration: Jenkins CI

	repoplot: More correct log parsing
	For correctness, parse also function name embedded into the last field.
	This filed is available now as log.func. Reformat Log namedtuple as it
	does not fit in one line now.

	Continuous-Integration: Jenkins CI

	repoplot: Avoid creation of empty command stats
	Previously we did:

	    cs = commands[log.thread]

	Which creates a new CommandStats for the current thread. However if the
	log did not match the start or end conditions, and no other command was
	issued for this thread, this would create a useless record.

	Now we access the command only if the start or end conditions match.

	Continuous-Integration: Jenkins CI

	repoplot: Remove duplication
	Move duplicate command start and end log handling into CommandStats
	class, simplifying log handling functions.

	Move similar handling code to DomainStats class for consistency.

	Rename "operations" to "commands", for consistency.

	Continuous-Integration: Jenkins CI

	repoplot: Add qemu-img operation for pre 4.0 logs
	Add matches to support qemu-img operations in 3.6 and 3.5.

	Continuous-Integration: Jenkins CI

	repoplot: Add qemu-img operation graph
	Parse and display qemu-img operations (4.0 only). These operations
	generate lots of io, which can effect storage domains monitoring.

	Continuous-Integration: Jenkins CI

	repoplot: Add storage domains monitors commands
	The time to read from storage is already reported in the repostat
	"delay" graph. This graphs show the time to run the dd command. We have
	seen cases where the delay was very fast, but running dd command took 15
	seconds. I suspect that this issue was caused by overloaded vdsm on
	machine with many cores, and should be fixed by using cpu_affinity.

	Relates-To: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

	reppolot: Add mailbox dd commands graph
	Storage mailbox check for mail dd commands are performed only on the
	master domain, but since they are run every 3 seconds, they are good
	indicator for storage issues in the master domain.

	Checking logs for copy disk flow show that SPM check for mail commands
	become very slow (up to 6 seconds per command). This may cause extend
	operations slow down leading to pausing of a vm.

	Relates-To: https://bugzilla.redhat.com/1295208
	Continuous-Integration: Jenkins CI

	repoplot: Make it easier to add new graphs
	Adding new subplot does not require modifyng other plots now.

	Continuous-Integration: Jenkins CI

	repoplot: Prepare for collecting other commands
	Change add_lvm_command to generic add_command, so we can use the same
	logic for detecting start and stop of a command for collecting other
	commands statistics.

	Continuous-Integration: Jenkins CI

2016-03-11  pkliczewski  <piotr.kliczewski@gmail.com>

	json: use forzenset for filtered methods
	Continuous-Integration: Jenkins CI

	jsonrpc: provide more info when method not found
	When there was no method to be invoked we returned generic exception
	without any information about missing method. Now we return this info.


	Continuous-Integration: Jenkins CI

2016-03-11  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove unneeded assert
	RWLock stress tests are for timing operations. The assert about lock
	fairness is fragile and may break with different implementation.

	Continuous-Integration: Jenkins CI

2016-03-11  Francesco Romani  <fromani@redhat.com>

	schema: add Rng and Tpm device to the device list
	If Engine asks Vdsm to create a Vm with Rng or Tpm device,
	then Vdsm
	- consumes the data from the VM.create arguments
	- reports the devices in the VM.list (et. al.) return value

	The problem here is just the Rng and Tpm device were not listed
	as valid device types, so they *seem* unused.

	I actually run a VM with rng device enabled and seen that this
	data is indeed present, so this patch adds the missing bits
	to make the schema consistent.

	Continuous-Integration: Jenkins CI

	vm: rng: add TODO about schema cleanup
	The Rng device uses the data Engine sends,
	documented in schema, in a pretty obscure and
	confusing way.

	Once we streamline this, we can unlock further
	schema cleanup.

	Add a TODO comment in the code to make sure this
	is not forgotten.

	Continuous-Integration: Jenkins CI

	tests: enable more tests on py3
	Continuous-Integration: Jenkins CI

	lib: pthread: py3: enable pthread.py on python3
	This patch adds the fixes to pthread.py to make
	it python3-compliant, and enable its test to run
	on python3.

	Continuous-Integration: Jenkins CI

2016-03-10  Petr Horáček  <phoracek@redhat.com>

	net: api: keep names and quotes consistent
	Continuous-Integration: Jenkins CI

2016-03-10  Martin Polednik  <mpolednik@redhat.com>

	faqemu: refactor and update
	Faqemu hook wasn't really updated to allow for running of
	cross-platform VMs. This patch refactors the logic and adds workarounds
	to run VMs of 'opposite' architecture. The VM is still run on host's
	arch, but the constraints for selected architecture are still respected.

	Continuous-Integration: Jenkins CI

2016-03-10  Tomas Jelinek  <tjelinek@redhat.com>

	migration: added support for convergence schedule
	Part of the migration enhancements effort.
	Adds the logic which parses and evaluates the convergence schedule.
	The convergence schedule contains of 2 parts:
	- initialization: will be evaluated before the migration starts. It is a list
	  of tuples:
	  - action: one of
	    - setDowntime: sets the 'migrateSetMaxDowntime' of the migrating VM
	    - abort: aborts the migration
	  - params: parameters of the action (e.g. the setDowntime takes one parameter,
	    the actual downtime).
	- convergence: will be evaluated during migration as a part of the monitoring
	  thread on each monitoring cycle. It is a list of tuples:
	  - stalling limit: if the VM is stalling longer than this limit, execute the
	    action with its params.
	  - action with params: the actual action with params which has to be executed
	    if the VM is stalling longer than the stalling limit. The value is the same
	    as for the initialization, namely:
	    - action: one of
	      - setDowntime: sets the 'migrateSetMaxDowntime' of the migrating VM
	      - abort: aborts the migration
	    - params: parameters of the action (e.g. the setDowntime takes one parameter,
	    the actual downtime).

	The convergence schedule replaces the DowntimeThread (e.g. if the convergence
	schedule is set, the DowntimeThread is not started).
	If the convergence schedule is not set, the code falls back to use the
	DowntimeThread.

	Feature-Page: http://www.ovirt.org/Features/Migration_Enhancements
	Continuous-Integration: Jenkins CI

2016-03-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make Vm.devMapFromDevSpecMap() private
	There is currently no reason to expose the method outside Vm.
	Actually we are going to move device processing out of Vm and thus
	isolating the use of this method is a preparation step for that.

	Continuous-Integration: Jenkins CI

2016-03-10  Petr Horáček  <phoracek@redhat.com>

	net: api: replace custom logger with logging
	We use one log file for all supervdsm logs, there is no need to
	use special logger. Also custom logger name is not necessary
	while we already log modules' names.

	Continuous-Integration: Jenkins CI

2016-03-10  Nir Soffer  <nsoffer@redhat.com>

	tests: Unbreak imagetickets_test
	imagetickets_test passed locally and on jenkins, but failed after
	rebasing on master, since storage_exception module moved in a previous
	patch. Fix the broken import.

	Continuous-Integration: Jenkins CI

2016-03-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make Vm.devSpecMapFromConf() private
	There is currently no reason to expose the method outside Vm.
	Actually we are going to move device processing out of Vm and thus
	isolating the use of this method is a preparation step for that.

	Continuous-Integration: Jenkins CI

2016-03-10  Martin Polednik  <mpolednik@redhat.com>

	debian: add supervdsm_api
	Whole supervdsm_api package was missing in debian installation
	according to the debian vdsm.install. This patch fixes the creation of
	the package.

	Continuous-Integration: Jenkins CI

2016-03-10  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't use Vm device configuration in clientIF
	clientIF retrieves device configuration from Vm.devSpecMapFromConf() in
	order to pass it to Vm.preparePaths().  This is unnecessary exposition
	of device handling configuration to clientIF as Vm can get the
	information from itself.  Not only it's not clientIF business to care
	about those details, we'd also like to make them isolated in Vm and make
	Vm.devSpecMapFromConf() private in a followup patch.

	This is a preparation step for moving device configuration processing
	from Vm to device classes.

	For those reasons we retrieve configuration in Vm.preparePaths() from
	its instance directly.

	Continuous-Integration: Jenkins CI

2016-03-09  Amit Aviram  <aaviram@redhat.com>

	imagetickets: add tests
	Adding tests to the new imagetickets module.

	Continuous-Integration: Jenkins CI

2016-03-09  Nir Soffer  <nsoffer@redhat.com>

	repoplot: Add LVM commands graph
	Parse and display LVM commands runtime. Domain monitors are running LVM
	commands regularly for refreshing LVM cache and checking VGs health.

	Continuous-Integration: Jenkins CI

2016-03-09  Fred Rolland  <frolland@redhat.com>

	storage: Move storage_exception module to lib
	Moving vdsm/storage/storage_exception.py to
	lib/vdsm/storage/exception.py

	Continuous-Integration: Jenkins CI

2016-03-09  Martin Polednik  <mpolednik@redhat.com>

	machinetype: reorganize and rename private functions
	This patch renames the private function to better reflect what they
	actually do - _get_*_{object} is now called _*_caps_{object}. they are
	also moved to the bottom of the module for better comfort of people
	reading the module.

	Continuous-Integration: Jenkins CI

2016-03-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	moving protocoldetector under lib
	Continuous-Integration: Jenkins CI

2016-03-09  pkliczewski  <piotr.kliczewski@gmail.com>

	vm: remove unused sendKeys verb
	Continuous-Integration: Jenkins CI

2016-03-09  mirecki  <mmirecki@redhat.com>

	net: Removing 'link' scoped addresses from the ip address list
	This method should not report link scoped ip addresses.

	Continuous-Integration: Jenkins CI

2016-03-09  Martin Polednik  <mpolednik@redhat.com>

	machinetype: split and slightly refactor cpu_models function
	cpu_models has grown large as it has to

	a) having to find the correct architecture element,
	b) find the cpu models in that element.

	This patch splits the function and updates variables to have more
	descriptive names.

	Continuous-Integration: Jenkins CI

2016-03-09  Fred Rolland  <frolland@redhat.com>

	storage: add copyright info
	Add copyright info to missing files under storage.

	Continuous-Integration: Jenkins CI

2016-03-09  Martin Polednik  <mpolednik@redhat.com>

	machinetype: pep8tify the module
	Continuous-Integration: Jenkins CI

	machinetype: update naming
	The old names of machinetype public functions were outdated,
	non-pep8-compilant. New names work nice with module name and are pep8
	compilant!

	Continuous-Integration: Jenkins CI

2016-03-08  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: message tracking do not clean properly
	We track message id and to know where to send message response but we
	failed to clean tracking map when a response was sent.

	Continuous-Integration: Jenkins CI

2016-03-08  Martin Polednik  <mpolednik@redhat.com>

	hostdev/network: fix hostdevChangeNumvfs
	9888e5c3 hidden the change of name of supervdsm call ChangeNumvfs to
	change_numvfs. This patch corrects the mistake.

	Continuous-Integration: Jenkins CI

2016-03-08  Edward Haas  <edwardh@redhat.com>

	net: Rename canonize to canonicalize
	Continuous-Integration: Jenkins CI

2016-03-08  Ala Hino  <ahino@redhat.com>

	gluster: Don't fail connect server when getting volume info
	When connecting to gluster server, we check volume info in order
	to validate replica count. However, if gluster server is not
	available, we get an exception and fail the operation. This patch
	catches the thrown exception and logs a warning message indicating
	that we got error when tried to connect to gluster server.

	Bug-Url: https://bugzilla.redhat.com/1303977
	Continuous-Integration: Jenkins CI

2016-03-08  Fred Rolland  <frolland@redhat.com>

	storage: Move securable module to site-packages
	Moving vdsm/storage/securable.py to lib/vdsm/storage/securable.py.

	Continuous-Integration: Jenkins CI

	storage: Move constants module to site-packages
	Moving vsdm/storage/constants.py to lib/vdsm/storage/constants.py.

	Continuous-Integration: Jenkins CI

	hsm: group vdsm imports in hsm.py
	Group together vdsm import in vdsm/storage/hsm.py

	Continuous-Integration: Jenkins CI

	spec: add virt and netinfo dir in spec
	Add lib  virt and netinfo dir in vdsm.spec.in

	Continuous-Integration: Jenkins CI

2016-03-08  Francesco Romani  <fromani@redhat.com>

	vmstats: avoid NameError
	vmstats._nic_traffic may raise NameError if a couple
	of fields are missing. This, however, is definitely
	possible (and not-critical) when dealing with libvirt
	bulk stats.
	Previously, the code was only looking to be safe against
	KeyError.

	Now we make sure to not use variables which may not exist.

	Along the way, we improve docstrings and tests for
	the related functions in vmstats.py

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-08  Martin Polednik  <mpolednik@redhat.com>

	caps/machinetype: move machine-type related code to new module
	Machine types are what qemu considers the computer. Libvirt exposes
	them in capabilities XML - the machine types themself and inherently
	related information such as baseline CPUs for the machine type.

	This patch helps machine type related code to find a home in a new
	module called machinetype. The reason for this is that 'caps' module
	became code bin over time without single objective. Additional benefit
	is that, although currently not done so, the code is exposed and may be
	used in hooks.

	Continuous-Integration: Jenkins CI

2016-03-08  Ondřej Svoboda  <osvoboda@redhat.com>

	network: skip non-existent devices in _restore_disable_ipv6
	Broken networks are handled gracefully by other parts of the restoration flow
	(and covered by testRestoreNetworksOnlyRestoreUnchangedDevices). Let's follow
	suit and don't try to disable_ipv6 on missing devices.

	Bug-Url: https://bugzilla.redhat.com/1219363
	Backport-To: 3.6.3
	Continuous-Integration: Jenkins CI

2016-03-08  Nir Soffer  <nsoffer@redhat.com>

	virt: Add the missing tests for Drive.getLeasesXML
	Before moving this method, make sure the current code is fully tested.

	Continuous-Integration: Jenkins CI

2016-03-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Covering gluster api in supervdsm with logDecorator raises an exception
	listPublicFunctions returns <module 'gluster.cli' from
	'/usr/share/vdsm/gluster/cli.pyc'> which fail logDecorator with
	AttributeError. The function should return only callable functions.

	Continuous-Integration: Jenkins CI

2016-03-08  Martin Polednik  <mpolednik@redhat.com>

	numa: move cpu_topology to namedtuple
	CPU topology should be returned as immutable object that provides
	access to sockets, cores, online_cpus and threads attributes.
	Namedtuple seems to be the structure as it plays nicely even with
	cpu_topology usage in caps.

	Continuous-Integration: Jenkins CI

	numa: add docstrings for public methods
	Continuous-Integration: Jenkins CI

	numa: reorganize module
	As code is pushed into the module, it has became quite disorganized.
	This patch reorders it, keeping to-be-documented public methods on top
	while moving helper and protected methods below. Only cosmetic changes.

	Continuous-Integration: Jenkins CI

2016-03-08  Edward Haas  <edwardh@redhat.com>

	net schema: Add IPv6 networking caps attributes
	Although IPv6 attributes have been handled by VDSM for some time,
	they were missing from the schema.
	Adding IPv6 networking caps attributes to the schema.

	The following types have been affected:
	NetInfoBridgedNetwork
	NetInfoNic
	NetInfoBond
	NetInfoVlan

	Continuous-Integration: Jenkins CI

	net schema: Add IPv6 setupNetworks attributes
	Although IPv6 attributes have been handled by VDSM for some time, they
	were missing from the schema.
	Adding IPv6 setupNetworks attributes to the schema.
	(as type 'SetupNetworkNetAttributes')

	Continuous-Integration: Jenkins CI

2016-03-07  Fred Rolland  <frolland@redhat.com>

	storage: add storage folder to spec
	Add lib storage folder to vdsm.spec.in

	Continuous-Integration: Jenkins CI

2016-03-07  Nir Soffer  <nsoffer@redhat.com>

	repoplot: Consider sub-seconds in timestamps
	Previously timestamps were truncated, which is fine when we look at
	timeouts of many seconds, but there are cases where we like to see
	values which are less than 1 seconds.

	Continuous-Integration: Jenkins CI

	repoplot: Prepare for matching multiple patterns
	To understand delays in storage domains monitors, we need to plot also
	the lvm commands, and possibly other commands (e.g, dd, qemu-img). This
	patch changes parsing so we can handle multiple patterns.

	I tested multiple patterns using regular expressions, and they are
	significantly slower than multiple string.find() on the same line.

	Timestamps are needed in all pattern handler functions, so parsing
	timestamps moved to separate function.

	Continuous-Integration: Jenkins CI

2016-03-07  Edward Haas  <edwardh@redhat.com>

	net schema: Remove unused NetworkOptions type
	This patch has been split from https://gerrit.ovirt.org/#/c/53521

	Continuous-Integration: Jenkins CI

2016-03-07  Dan Kenigsberg  <danken@redhat.com>

	vdsm.host.uuid: eliminate obsoleted argument "legacy"
	"legacy" had no meaning since ovirt-3.6; as of commit e3409136 it cannot
	even be passed to the function. It's time to eliminate it.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1314705
	Continuous-Integration: Jenkins CI

2016-03-07  Fred Rolland  <frolland@redhat.com>

	storage: create lib storage directory
	In order to move storage code to site-packages,
	we create a new directory for storage and add/update
	needed files for compilation and packaging.

	Continuous-Integration: Jenkins CI

2016-03-05  pkliczewski  <piotr.kliczewski@gmail.com>

	caps: unable to marshal defaultdict by xmlrpc
	When using vdsClient to getCaps we saw:

	<type 'exceptions.TypeError'>:cannot marshal <type
	'collections.defaultdict'> objects

	in order to make it working again we need to use regular dictionary.


	Continuous-Integration: Jenkins CI

	gluster: fix schema
	There were bunch of inconsistencies in gluster schema which needs to be
	fixed.


	Continuous-Integration: Jenkins CI

2016-03-04  Ondřej Svoboda  <osvoboda@redhat.com>

	restore-nets: disable IPv6 based on ifcfg files
	Disabling IPv6 on networks in the kernel must be done even
	before actual restoration is performed because there is probably going to
	be a link-local address already (or "worse", initscripts may have acquired
	a global address through autoconfiguration) and thus the network's state
	would differ from the persisted config, causing needless restoration.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-04  Martin Polednik  <mpolednik@redhat.com>

	tests: import missing module in functional/utils
	Netinfo module does not expose it's modules in __init__. They must
	therefore be explicitly imported. Utils module lacked one of the
	modules (cache), which is what this patch corrects.

	Continuous-Integration: Jenkins CI

2016-03-03  Martin Polednik  <mpolednik@redhat.com>

	hostdev: import modules locally
	Continuous-Integration: Jenkins CI

	caps: move away hostdev support querying
	Querying of hostdev support belongs to hostdev module as it is now part
	of VDSM library. This patch only moves and renames it to 'is_supported'
	(hostdev.is_supported).

	Continuous-Integration: Jenkins CI

	vdsm: add cscope.out to gitignore
	Using pycscope, one can generate tags compatible with cscope. Default
	output file is named cscope.out. Such file shouldn't be tracked, and as
	people may use cscope it is annoying to display it in git status.

	Continuous-Integration: Jenkins CI

2016-03-02  Francesco Romani  <fromani@redhat.com>

	virt: periodic: disable on migration destination
	While a VM is migration destination, the periodic
	operations should not run - the VM is still on source side,
	and the source side should handle the housekeeping.

	We should start doing the operations on destination side
	when and if the VM succesfully migrated.

	Previously, we didn't made this explicit out of concern
	of hiding real bugs.
	This concern is more and more less grounded, while log
	spam (all false positives) is becoming a problem, so
	we have reached a tipping point. Hence this patch.

	Bug-Url: https://bugzilla.redhat.com/1299480
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	virt: start moving under site-packages
	Let's start moving virt code under site-packages.
	We start with the leaf node of the dependency tree,
	the virt-specific utility modules.

	As nice side effect, these modules are mostly
	stable and seldom changes, so once we get the
	import and build system right, we are done with the move.

	Continuous-Integration: Jenkins CI

2016-03-02  Petr Horáček  <phoracek@redhat.com>

	netconfpersistence: bondings are not removed if there are no nets
	/var/run/vdsm/netconf/nets directory is created when the first network
	is configured. The same for /var/run/vdsm/netconf/bonds.

	In case when there is only bonds directory, network restoration fails
	with ENOENT when it's trying to open nets dir.

	Now we do removal of nets and bonds in two separate try/except blocks.

	Continuous-Integration: Jenkins CI

	net: api: move legacy network handling to a separate module
	It makes sense to legacy network setup logic and native
	linux networking related code in two separate modules.

	Continuous-Integration: Jenkins CI

2016-03-02  Martin Polednik  <mpolednik@redhat.com>

	caps/numa: move autonuma status to sitelib
	Since autonuma is heavily related to numa and the code doesn't have any
	external dependencies, let's add it to our numa library. Constants
	indicating autonuma status are exposed publicly should future code depend
	on them.

	Continuous-Integration: Jenkins CI

2016-03-02  Francesco Romani  <fromani@redhat.com>

	vmstats: reformat function to make pep8 friendly
	Only cosmetic changes.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	virt: extract destroyVm helper
	It is generally not safe to force the destruction
	(really: shutdown) of a VM. There are few known cases
	on which we believe it is safe despite a previous
	failure of destroyVmGraceful().

	This patch adds an utility method to encapsulate
	force-shutdown-afeter-known-safe-error logic,
	previously found in destroyVmGraceful().

	No changes in external behaviour.

	Bug-Url: https://bugzilla.redhat.com/1309884
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-03-02  Martin Polednik  <mpolednik@redhat.com>

	numa: refactor to single pass caps parse
	All topology and distance parsing can be done by a single parse pass
	over libvirt caps XML. Although the performance benefit is negligible,
	it opens up opportunity to rework the format of numa data exchange to
	include all data required to support proper numa on all supported
	architectures.

	Continuous-Integration: Jenkins CI

2016-03-02  Edward Haas  <edwardh@redhat.com>

	net: Adjust the parsing of multiline tc error
	tc errors are parsed to determine the failure cause.
	Recently a new error output has been seen, whith a multiline message
	where the expected prefix ('RTNETLINK answers') was not in the first
	line. ('Message truncated\nMessage truncated\nRTNETLINK answers:')

	This patch fixes the parsing of the error message by checking each line
	for the prefix.

	Continuous-Integration: Jenkins CI

2016-03-01  Nir Soffer  <nsoffer@redhat.com>

	schema: Fix asserts that had side effect
	Asserts should never have side effects, so optimizing them out will not
	change the semantics of the code. Running with optimization would break
	parsing, eliminating line.pop(0) operations. Now the only difference is
	the warning if the line is not empty.

	Continuous-Integration: Jenkins CI

2016-03-01  Martin Polednik  <mpolednik@redhat.com>

	numa: move cpu topology (numa) related functionality to sitelib
	The functionality can be nicely isolated and moved to sitelib, where
	additional cleanup and optimization work can take place. This is part
	of bigger series that attempts to move all numa related code to
	sitelib where it makes sense.

	Continuous-Integration: Jenkins CI

	numa: move numa related functionality to sitelib
	The functionality can be nicely isolated and moved to sitelib, where
	additional cleanup and optimization work can take place. This is part
	of bigger series that attempts to move all numa related code to sitelib
	where it makes sense.

	Continuous-Integration: Jenkins CI

	numa: get distance information from libvirt
	It is not necessary to use numactl to access numa cell distances as
	libvirt already provides us with that exact information. Although this
	patch does separate pass over libvirt capabilities, it opens up
	possibility for single pass in future of the series.

	Continuous-Integration: Jenkins CI

2016-03-01  Martin Sivak  <msivak@redhat.com>

	Move ksmTune method from supervdsmServer to the new supervdsm_api module
	Continuous-Integration: Jenkins CI

2016-03-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	moving kaxmlrpclib.py to lib
	Continuous-Integration: Jenkins CI

2016-03-01  Francesco Romani  <fromani@redhat.com>

	tests: virt: modernize vm* tests
	Applied python-modernize over the vm* unit tests.

	Continuous-Integration: Jenkins CI

2016-03-01  pkliczewski  <piotr.kliczewski@gmail.com>

	asyncore: remove misleading log entry
	From time to time I can see misleading warning in the logs:

	betterAsyncore::144::vds.dispatcher::(log_info) unhandled close event

	In order to get rid of it we make sure that we handle close event for
	all the dispatchers that we have and we call close on dispatcher.


	Continuous-Integration: Jenkins CI

2016-03-01  Irit Goihman  <irit.goihman@gmail.com>

	vdsm: added decorator to host uuid function
	Continuous-Integration: Jenkins CI

2016-03-01  pkliczewski  <piotr.kliczewski@gmail.com>

	rpc: moving module to lib/vdsm
	Continuous-Integration: Jenkins CI

2016-03-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Switching decorators order to allow right log prints in supervdsm.log
	To use logDecorator in supervdsm we shell use it on the called func
	directly. Otherwise the print might be misleading. The bind decorator is
	not related and should be on the fixed func.

	Continuous-Integration: Jenkins CI

2016-03-01  Dan Kenigsberg  <danken@redhat.com>

	ipwrapper: unbreak oper_up
	commit 65636d51 removed ipwrapper.Link.flags, but left behind a method
	using it.

	Fix the glitch and have the method tested.

	Continuous-Integration: Jenkins CI

2016-03-01  Francesco Romani  <fromani@redhat.com>

	virt: adding virt mkimage api module to supervdsm
	Continuous-Integration: Jenkins CI

	virt: adding virt basic api module to supervdsm
	Continuous-Integration: Jenkins CI

2016-03-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	move logUtils to lib
	Continuous-Integration: Jenkins CI

2016-02-29  Petr Horáček  <phoracek@redhat.com>

	net: api: move networks removal to a separate function
	As a part of preparation of network/api.py module split, we should
	extract networks removal handling from setupNetworks().

	Continuous-Integration: Jenkins CI

	net: tests: cleanup net after test_rollback
	Without @cleanupNet decorator, failed test can leave
	network remains which make other tests fail.

	With this decorator, failed test triggers cleanup of
	networks. Note that non-failed tests has to do the
	cleanup on its own.

	Continuous-Integration: Jenkins CI

	net: rename destroyOnMasterRemoval
	destroyOnMasterRemoval parameter was needed to say whether bonding
	should be removed together with network (implicit bonding) or just
	detached. Now when we drop implicit bonding, we can change it's logic
	to something more understandable.

	With this patch, destroyOnMasterRemoval was renamed to
	on_removal_just_detach_from_network. It's extremely long, but verbosity
	is needed here.

	Default functionality of bond.remove() is evidently removal, so
	this new parameter is False by default.

	When a bonding is objectivized as a part of a network, we need it
	to be just detached from master, set it default MTU etc, so it
	will be a standalone bonding again. When we objectivize it as a
	part of bonding query, then by bond.remove() we really mean the
	removal.

	Continuous-Integration: Jenkins CI

	net: api: drop connectivity_check_networks
	It is not needed anymore to explicitly remove networks after failed
	connectivity check, it used to be required only by implicit bondings.

	Now the whole removal is handled by rollback.

	New test testSetupNetworksConnectivityCheckOverExistingBond() was
	introduced to test if the removed code is not needed anymore:
	  # If the new added network was created on top of
	  # existing bond, we need to keep the bond on rollback
	  # flow, else we will break the new created bond.

	With this patch testSetupNetworksConnectivityCheck() works as a
	test for previous patch 5780914a98f208e70d7050e78a330ab13425639d.

	Continuous-Integration: Jenkins CI

2016-02-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	move hostdev to lib
	Continuous-Integration: Jenkins CI

2016-02-28  Francesco Romani  <fromani@redhat.com>

	virt: rng: Rng device should not depend on caps.py
	Pack RNG_SOURCES inside Rng devices, where actually belongs.

	As nice side effect, we turn the previous dependency link
	upside down: caps should query Rng devices for availability.

	Continuous-Integration: Jenkins CI

2016-02-26  pkliczewski  <piotr.kliczewski@gmail.com>

	schema: inconsistency fixes
	There was number of inconsistencies in schema where we specify in
	description that a parameter is optional whereas in type definition is
	not the case. To ease conversion of the schema to yaml format
	we need to make sure that inconsistencies are fix.

	I made assumptions that description is correct and fixed type
	definition.

	Continuous-Integration: Jenkins CI

2016-02-26  Nir Soffer  <nsoffer@redhat.com>

	repoplot: Optimize log parsing
	Profiling show that most time is spent matching regular expressions.
	Switch to string.find for matching the relevant lines, and extract the
	timestamp using split from relevant lines.

	Profiling
	=========

	Without this patch
	------------------

	Wed Feb 24 09:37:39 2016    repoplot-old.prof

	         1607042 function calls (1587959 primitive calls) in 8.397 seconds

	   Ordered by: internal time
	   List reduced from 4142 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	    48515    6.375    0.000    6.375    0.000 {method 'search' of '_sre.SRE_Pattern' objects}
	      179    0.166    0.001    0.171    0.001 {eval}
	    85278    0.158    0.000    0.270    0.000 backend_pdf.py:141(pdfRepr)
	      424    0.122    0.000    0.286    0.001 backend_pdf.py:1372(pathOperations)
	      146    0.120    0.001    0.124    0.001 {built-in method draw_path}
	    26718    0.097    0.000    0.136    0.000 path.py:353(iter_segments)
	    93406    0.039    0.000    0.040    0.000 {hasattr}
	        1    0.039    0.039    6.640    6.640 repoplot:82(parse)
	    29985    0.034    0.000    0.035    0.000 {method 'extend' of 'list' objects}
	    56796    0.032    0.000    0.032    0.000 {method 'encode' of 'unicode' objects}

	With this patch
	---------------

	Wed Feb 24 09:47:15 2016    repoplot-new.prof

	         1606310 function calls (1587243 primitive calls) in 2.037 seconds

	   Ordered by: internal time
	   List reduced from 4142 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	    85278    0.171    0.000    0.282    0.000 backend_pdf.py:141(pdfRepr)
	      179    0.160    0.001    0.165    0.001 {eval}
	      424    0.125    0.000    0.293    0.001 backend_pdf.py:1372(pathOperations)
	      146    0.125    0.001    0.130    0.001 {built-in method draw_path}
	    26718    0.099    0.000    0.139    0.000 path.py:353(iter_segments)
	    93406    0.040    0.000    0.040    0.000 {hasattr}
	    29985    0.033    0.000    0.034    0.000 {method 'extend' of 'list' objects}
	        1    0.032    0.032    0.262    0.262 repoplot:80(parse)
	    56796    0.031    0.000    0.031    0.000 {method 'encode' of 'unicode' objects}
	     3064    0.026    0.000    0.026    0.000 {built-in method compress}

	Before this patch, parsing 20 MiB log took 6.64 seconds, with this patch it
	takes only 0.26 seconds (25X faster).

	Timing
	======

	Processing 20 MiB log without this patch
	----------------------------------------

	$ time repoplot vdsm.log

	real    0m8.029s
	user    0m7.934s
	sys     0m0.100s

	Processing 20 MiB log with this patch
	-------------------------------------

	$ time repoplot vdsm.log

	real    0m1.725s
	user    0m1.650s
	sys     0m0.077s

	Processing multiple logs (289 MiB total)
	----------------------------------------

	$ time repoplot -n vdsm.log vdsm.log.9 vdsm.log.8 vdsm.log.7 \
	    vdsm.log.6 vdsm.log.5 vdsm.log.4 vdsm.log.3 vdsm.log.2 \
	    vdsm.log.1 vdsm.log

	real    0m6.682s
	user    0m6.542s
	sys     0m0.145s

	Continuous-Integration: Jenkins CI

2016-02-26  Francesco Romani  <fromani@redhat.com>

	virt: clean and modernize the destroy() path
	cleanup the destroy path with no changes in behaviour.

	Bug-Url: https://bugzilla.redhat.com/1309884
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-02-26  Petr Horáček  <phoracek@redhat.com>

	net: ifcfg: rollback nicless bridge
	Ifcfg rollback is not able to rollback simple nicless bridge. We do
	the removal of interfaces just with ifdown during the rollback. For
	some reason this is enough for vlaned networks, but not for
	a just-a-bridge network.

	We fixed that with explicit delbr of to-be-rolled-back bridges.

	Because of we don't guarantee handling order in networks setup, this
	cannot be simply tested - we cannot create a test where nicless
	network is set up and then another network setup fails.

	This patch was tested manually. In a following patch, explicit removal
	of networks will be removed from _check_connectivity() and therefore
	testSetupNetworksConnectivityCheck() will work as a test for this
	scenario.

	Continuous-Integration: Jenkins CI

2016-02-25  Petr Horáček  <phoracek@redhat.com>

	net: api: fix invalid refactoring
	else branch used to iterate 'nics' and if there was none, it just did
	nothing.

	During the refactoring [1] we get rid of 'nics' and replaced it with
	'nic'. In case when 'bonding' is None, we go to else branch and
	without any checking call _validateInterNetworkCompatibility()
	which fails for None nic.

	[1] https://gerrit.ovirt.org/#/c/53475/15/lib/vdsm/network/api.py

	Continuous-Integration: Jenkins CI

	net: api: refactoring of _handleBondings
	Refactor bonding removal and setup code to be more readable.
	This code tries to mimic OVS hook network setup style.

	Continuous-Integration: Jenkins CI

2016-02-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	fix import error
	Continuous-Integration: Jenkins CI

2016-02-24  Petr Horáček  <phoracek@redhat.com>

	net: api: remove _delNonVdsmNetwork
	When _delNetwork() is called, network is always in running_config
	and therefore _delNonVdsmNetwork() is never triggered. This code
	used to be needed only with add/edit/delNetwork() API.

	Continuous-Integration: Jenkins CI

2016-02-24  Nir Soffer  <nsoffer@redhat.com>

	repoplot: Distribute repoplot tool
	For some reason we are distributing profile-stat and logdb, so now we
	distribute also the new repoplot tool.

	The reason for disributing is not clear; see commit 6b1945ba8b for
	details.

	Continuous-Integration: Jenkins CI

	repoplot: Allow using on headless server
	matplotlib uses gtk by default, failing on a headless server. Now we use
	the "Agg" backend instead.

	See http://matplotlib.org/faq/howto_faq.html#howto-webapp

	Continuous-Integration: Jenkins CI

2016-02-24  Petr Horáček  <phoracek@redhat.com>

	net: api: destroyOnMasterRemoval has stable value
	We don't have to check if 'remove' in attrs, it has been already
	done in upper condition.

	Continuous-Integration: Jenkins CI

2016-02-23  Ondřej Svoboda  <osvoboda@redhat.com>

	net: use the correct dict with all the networks for disable_ipv6 restoration
	In a backport it was shown that using only the networks that require
	restoration is not sufficient.

	Bug-Url: https://bugzilla.redhat.com/1219363
	Continuous-Integration: Jenkins CI

2016-02-23  Edward Haas  <edwardh@redhat.com>

	tests: Move network tests to its own folder
	Network tests (from tests/) have been moved to tests/network/ and their
	filename have been updated to the following naming format: *_test.py

	Continuous-Integration: Jenkins CI

2016-02-23  Nir Soffer  <nsoffer@redhat.com>

	repoplot: Visualize storage domain monitoring
	Add repoplot command line tool for visualizing storage domain monitoring
	issues. The tool extracts information from repoStat log messages for all
	storage domains, and plot a graph of storage domain monitor lastCheck and
	delay.

	usage: repoplot [-h] [--name NAME] [--format FORMAT] [--width WIDTH]
	                [--height HEIGHT]
	                files [files ...]

	Visualize storage monitoring

	positional arguments:
	  files                 vdsm log files to process

	optional arguments:
	  -h, --help            show this help message and exit
	  --name NAME, -n NAME  output file name (default first log file name)
	  --format FORMAT, -f FORMAT
	                        output file format (default pdf)
	  --width WIDTH, -x WIDTH
	                        output file width in inches (default 20)
	  --height HEIGHT, -y HEIGHT
	                        output file height in inches (default 10)

	Requires the python-pandas package.

	Bug-Url: https://bugzilla.redhat.com/1081962
	Continuous-Integration: Jenkins CI

2016-02-23  Francesco Romani  <fromani@redhat.com>

	vmstats: from EAFP to LBYL
	libvirt bulk stats' API allows to return partial result.
	Hence, seems better to Look Before You Leap in this flow,
	instead of thinking that is Easier (to) Ask Forgiveness (than)
	Permission.

	As nice side effect, this patch removes spam from the logs.

	Bug-Url: https://bugzilla.redhat.com/1299480
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	vmstats: remove _diff helper
	the _diff helper is pretty pointless: makes the code
	harder to follow, not easier.

	This patch drops it without changes in behaviour.

	Bug-Url: https://bugzilla.redhat.com/1299480
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-02-23  Martin Betak  <mbetak@redhat.com>

	migration: Add incoming migration semaphore
	Added throttling of incoming migrations.

	'migrationCreate' verb can now return new error status `migrationLimit` to
	report full occupation.

	Wiki: http://www.ovirt.org/Features/Migration_Enhancements
	Continuous-Integration: Jenkins CI

	vm: Make run() return status
	Continuous-Integration: Jenkins CI

2016-02-23  Francesco Romani  <fromani@redhat.com>

	virt: recovery: tests: exercise more recovery code
	Add more tests for the new recovery.py module.
	We exercise existing functions and methods.

	Continuous-Integration: Jenkins CI

2016-02-23  Ondřej Svoboda  <osvoboda@redhat.com>

	net: also disable IPv6 on bridges not using it, after unified restoration
	This is a follow-up work to disallow VM-host communication over IPv6
	(using e.g. link-local addresses) in the case when networking on the host
	was configured without IPv6.

	This covers the reboot scenario, in addition to the previously implemented
	disablement of IPv6 during network configuration through setupNetworks.

	Bug-Url: https://bugzilla.redhat.com/1219363
	Continuous-Integration: Jenkins CI

2016-02-23  Martin Betak  <mbetak@redhat.com>

	virt: Make VM domain descriptor accessible
	Continuous-Integration: Jenkins CI

2016-02-23  Francesco Romani  <fromani@redhat.com>

	tests: add tests for vmstats.cpu()
	Add tests for vmstats.cpu().
	The reference data was taken either by libvirt (virsh -r domstats)
	or from a log-enhanced running Vdsm.

	Along the way, we also add the docstring for the vmstats.cpu()
	function.

	Continuous-Integration: Jenkins CI

	virt: recovery: tests: reduce nested `with' blocks
	Add test helper to reduce the boilerplate.

	Continuous-Integration: Jenkins CI

2016-02-22  Milan Zamazal  <mzamazal@redhat.com>

	virt: Fix of uninitialized variable access in Vm.setLinkAndNetwork()
	Continuous-Integration: Jenkins CI

2016-02-22  Sagi Shnaidman  <sshnaidm@redhat.com>

	Advertise aggregator ID in bonding interfaces
	If interface or bond itself has an aggregator ID, then
	advertise it to engine in getCaps

	Bug-Url: https://bugzilla.redhat.com/1281666
	Continuous-Integration: Jenkins CI

2016-02-22  Martin Polednik  <mpolednik@redhat.com>

	tests: use new proxy method for virt functional tests
	Patch 04f610b6 changed the API to a vdsProxy. That resulted in a test
	breakage. This patch corrects virt functional tests to use the correct
	API.

	Continuous-Integration: Jenkins CI

2016-02-22  Dan Kenigsberg  <danken@redhat.com>

	sudoers: narrow dmidecode commandline
	Vdsm does needs only a very limitted information from dmidecode. sudoers
	should be as narrow as possible.

	Continuous-Integration: Jenkins CI

2016-02-21  Edward Haas  <edwardh@redhat.com>

	net tests: Clean net & bond after functional test.
	testSetupNetworksEmergencyDevicesCleanupBondOverwrite now removes
	the network & bond. Keeping them around causes the failure of
	the subsequent test.

	Continuous-Integration: Jenkins CI

2016-02-21  Dan Kenigsberg  <danken@redhat.com>

	net tests: make functional tests run again with persistence=ifcfg
	We have multiple users that use net_persistence=ifcfg. We must make sure
	that Vdsm does not inadvertently breaks them.

	This patch only makes the tests run again, after recent changes assuming
	unified persistence.

	Continuous-Integration: Jenkins CI

2016-02-20  Petr Horáček  <phoracek@redhat.com>

	net: api: drop isolatedCommand handling
	Since addNetwork and delNetwork API were dropped, we don't need
	isolatedCommand handling anymore.

	Continuous-Integration: Jenkins CI

2016-02-19  Petr Horáček  <phoracek@redhat.com>

	net: api: don't check for bond slaves twice
	It is not possible to setup bondings via addNetwork() and editNetwork()
	calls anymore. Bonds validity checking is now done on setupNetworks()
	level on all passed bondings via _validateNetworkSetup() and therefore
	extra checking in _handleBondings() (introduced in
	https://gerrit.ovirt.org/#/c/37751/8) is now redundant.

	Continuous-Integration: Jenkins CI

	net: api: use running config only with unified persistence
	configurator.runningConfig should be used only when unified persistence
	is used. If we call it with ifcfg persistence, vdsm explodes.

	This patch fixes testBrokenNetworkReplacement.

	Continuous-Integration: Jenkins CI

2016-02-18  Amit Aviram  <aaviram@redhat.com>

	localFsSD: Use the right manifest.
	Local storage domain should use its own manifest instead of the
	inherited one from FileStorageDomain.

	FileStorageDomain's manifest directs the domain creation to lock
	the storage using sanlock, which is used for shared storage locking.

	As local storage domain is used only by its containing host, there is 
	no point to use sanlock. instead we use a local lock.

	Bug-Url:https://bugzilla.redhat.com/1305768
	Continuous-Integration: Jenkins CI

2016-02-18  Petr Horáček  <phoracek@redhat.com>

	net: api: mark functions as private
	network/api.py functions clientSeen() and assertBridgeClean()
	are used only inside network/api.py. Now they are marked with
	_ as private.

	Continuous-Integration: Jenkins CI

	net: api: remove bonding handling from _addNetwork
	_addNetwork is not an API verb anymore. setupNetworks API verb
	never call _addNetwork to setup a bonding, its nics
	and options. Therefore related code should be dropped from
	_addNetwork().

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	hooks: ovs: support hot-plugged vnics
	To support hot-plugged vnics, we have to place our before_device_create
	hook to before_nic_hotplug hookpoing.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-02-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	net: Adding network api module to supervdsm
	Continuous-Integration: Jenkins CI

2016-02-18  Petr Horáček  <phoracek@redhat.com>

	net: api: remove unused showNetwork() and listNetworks()
	After network/api.py removal, showNetwork() and listNetworks() are
	not used anymore.

	Continuous-Integration: Jenkins CI

2016-02-18  Francesco Romani  <fromani@redhat.com>

	virt: recovery: test: fix typo
	A typo sneaked in the vdsm.virt.recovery.File.save() method.
	It passed by because this code path is seldom exercised, because
	is meant to catch a programming error[1].

	This patch fixes the typo, and adds a test to prevent it to
	happen again.

	+++

	[1] in a sneaky way, mostly due to backward compatibility
	with surrounding code.
	The old 3.6.x code just swallowed any error.
	Now we have at least a log line.
	A better fix would be to explode with exception,
	but due to arcane intertwined flows, this may cause havoc.

	Continuous-Integration: Jenkins CI

	recovery: reimplement clean_vm_files
	clean_vm_files() could be reimplemented leveraging recovery.File()
	utilities, and avoiding code duplications.

	There are no intended changes in externally observed behaviour.

	Continuous-Integration: Jenkins CI

	virt: recovery: add constant for file extension
	Consolidate the ".recovery" extension string on
	one single place instead of scatter it all around
	the module.

	Continuous-Integration: Jenkins CI

	virt: recovery: reduce code duplication
	reimplement clean_vm_files() using
	_find_vdsm_vms_from_files() to reduce the code duplication.

	No changes in functionality are expected.

	Continuous-Integration: Jenkins CI

2016-02-18  Dan Kenigsberg  <danken@redhat.com>

	py3: modernize network tests
	Run python-modernize on tests/net*.py to remove blunt python 3 errors
	from them.

	We do not run the tests in python3 yet, so regeressions can easily sneak
	in. Still, is it a (tiny) step forward.

	Continuous-Integration: Jenkins CI

2016-02-17  Marek Libra  <mlibra@redhat.com>

	jsonrpcvdscli: Arrays can be returned from client call
	Only a dict response was expected from client method call
	in jsonrpcvdscli before this patch.
	With this patch, the non-dict (i.e. arrays) responses are wraped
	in a dict 'items', so calls like getAllVmStats will not fail.

	Continuous-Integration: Jenkins CI

2016-02-17  Edward Haas  <edwardh@redhat.com>

	net: Fix internal setupNetworks api usage
	setupNetworks api defines 2 args and an unlimited number of kwargs.
	The code used in the global api to proxy the request to supervdsm used
	3 args (the last being a dict).

	To be consistent and avoid multipe conversions, setupNetworks definition
	should specify 3 args.

	This patch is a preperation for removing the bridging that exist at
	supervdsm api and exporting setupNetworks api dynamically.

	Continuous-Integration: Jenkins CI

2016-02-17  Petr Horáček  <phoracek@redhat.com>

	net: api: _netinfo is always passed to _add_missing_networks
	_add_missing_networks is used only on one place and _netinfo
	parameter is always passed to it.

	Continuous-Integration: Jenkins CI

	network: tests do not check OVS devices operstate
	We have to fake not only waitForKnownState, but also waitForState,
	because of tests expects bond to turn UP, but that never happens.

	Continuous-Integration: Jenkins CI

2016-02-17  Dan Kenigsberg  <danken@redhat.com>

	vmfex hook: remove filter from directly-attached vnics
	It seems that libvirt has become more strict, and would not accept a
	filterref that it cannot enforce. This patch makes the hook drop the
	<filterref> element that is added by Vdsm.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1308839
	Continuous-Integration: Jenkins CI

2016-02-16  Francesco Romani  <fromani@redhat.com>

	tests: start proper recovery.py tests
	Continuous-Integration: Jenkins CI

2016-02-16  Nir Soffer  <nsoffer@redhat.com>

	vm: Simplify filter using list comprehension
	Replace unclear filter() with list comprehension and add the missing
	test.

	Continuous-Integration: Jenkins CI

2016-02-15  Nir Soffer  <nsoffer@redhat.com>

	hsm: Remove image run links in teardownImage
	We were creating the /run/vdsm/sd_uuid/img_uuid in prepareImage, but we
	never delete it. This directory (block storage) or link (file storage)
	are used by hosted engine VM so it can run without a connected pool.

	After vdsm maintenance, file storage domain mount path may change,
	invalidating the links. When we create the links, we skip existing
	links, assuming that the link target cannot change. Any operation with
	the stale link will fail.

	We need two fixes:
	1. Remove links created in prepareImage during teardownImage
	2. For the unlikely case when Vdsm was terminated before teardownImage
	   was completed, repair stale links during creation.

	This patch fixes the first issue. The second issue is handled in
	https://gerrit.ovirt.org/52937.

	Bug-Url: https://bugzilla.redhat.com/1300749
	Continuous-Integration: Jenkins CI

2016-02-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Dynamic load of supervdsm_api funcs
	The patch adds supervdsm_api folder (which will move later once all
	internal API calls will be able to use only site-packages/vdsm code).
	supervdsmServer loads all modules under that folder and expose functions
	that decorated with @expose

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1182092
	Continuous-Integration: Jenkins CI

2016-02-12  Milan Zamazal  <mzamazal@redhat.com>

	virt: vm: Fix of _filterSnappableDiskDevices indentation
	The function body is indented too much and since it's the first indented
	code in vm.py it confuses some editors about proper indentation.

	Continuous-Integration: Jenkins CI

2016-02-12  Petr Horáček  <phoracek@redhat.com>

	net: api: drop network/api.py cli
	Drop network/api.py cli interface. If we get rid of it, we can
	drop isolatedCommand handling. _addNetwork and _delNetwork won't
	be available for OVS configurator. Cli is unused anyways.

	Also drop editNetwork() function which was used only by cli.

	Continuous-Integration: Jenkins CI

2016-02-12  Francesco Romani  <fromani@redhat.com>

	virt: add load() method to the recovery.File class
	The newly added recovery.File class should also handle
	the load of a recovery file, which up until now
	is handled using a function of recovery.py.

	This duplicates some logic; this patch moves the
	load code into the recovery.File class.

	Continuous-Integration: Jenkins CI

2016-02-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Use exception.HookError instead of hooks.HookError
	Following https://gerrit.ovirt.org/#/c/52413

	Continuous-Integration: Jenkins CI

2016-02-11  Francesco Romani  <fromani@redhat.com>

	periodic: ignore known-benign libvirt errors
	periodic sampling threads and migration thread are
	(and need to be) asynchronous with each other.
	This leaves the door open for errors like

	libvirtError: Domain not found: no domain with matching uuid
	'7ebb5925-e76f-4d2f-a148-7671c313fe84' (v2)

	Which are harmless but spam the logs.
	We don't want to hide real errors, but we want to
	avoid this noise, so this patch makes periodic Operation
	ignore some of these errors, the ones which are easier
	to detect.

	Bug-Url: https://bugzilla.redhat.com/1299480
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2016-02-11  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: drop fc21 support
	Fedora 21 reached EOL long ago.
	Dropping support for it

	Continuous-Integration: Jenkins CI

2016-02-11  Petr Horáček  <phoracek@redhat.com>

	network: fix dhclient return code catching
	configurators/__init__.py:runDhclient() expects dhclient.start() to
	always return three values (rc, out, err). Problem occurs when
	we call dhclient.start() with blockingdhcp=False and only None is
	returned.

	Fix this with storing return values in one variable and accessing
	rc with [0].

	Continuous-Integration: Jenkins CI

2016-02-11  Adam Litke  <alitke@redhat.com>

	Live Merge: Skip initial extension when base is raw
	When starting a live merge we pre-extend the base volume in order to
	accomodate the data that will be merged into the base volume.  This is
	only necessary for thinly provisioned block volumes.  Check to make sure
	that the base volume is eligible for extension before extending it.

	Continuous-Integration: Jenkins CI

2016-02-11  Petr Horáček  <phoracek@redhat.com>

	network: don't log traceback of missing bridge interfaces
	We expect "bridge" to be a Linux bridge with interfaces. It is quite
	common that this is not the case, when the bridge is actually
	implemented by OVS (via our hook) or when the Linux bridge device is
	not yet up.

	Continuous-Integration: Jenkins CI

2016-02-10  Shahar Havivi  <shaharh@redhat.com>

	v2v: move v2v module to site-packages
	Continuous-Integration: Jenkins CI

2016-02-09  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpcvdscli: make sure not to ignore response queue
	In jsonrpcvdscli we provide responseQueue but we ignore it and we
	generate new queue name by using uuid4(). This patch makes sure not to
	ignore provided responseQueue.


	Continuous-Integration: Jenkins CI

2016-02-09  Amit Aviram  <aaviram@redhat.com>

	imagetickets: fix typo in Daemon Error
	DeamonError -> DaemonError

	Continuous-Integration: Jenkins CI

2016-02-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	automation: Adding vdsm functional tests
	check-merged: build artifacts and runs functional tests using
	lago-control.sh

	lago-env.json: defines vms environment for lago

	reposync-config.repo.tpl: all repos that are required in lago vms

	deploy.sh: script that will run automatically on the vm
	after installation - the use of those script is in lago_control.sh

	check-*.repos.*: repo sync declaration for each test

	To test changes to check-merged.sh, you may use the likes of
	http://gerrit.ovirt.org/53171 which makes the check-merged run for
	each patchset.

	Continuous-Integration: Jenkins CI

2016-02-09  pkliczewski  <piotr.kliczewski@gmail.com>

	ssl: common name different than host info from socket during tests
	When we introduced 186c8574 changed common name in our tests
	certificates to ::1 we caused our tests to fail. When listening host matches
	common name there is no issue.


	Continuous-Integration: Jenkins CI

2016-02-08  Martin Betak  <mbetak@redhat.com>

	hooks: Remove dead code from before_vm_migrate_destination
	Continuous-Integration: Jenkins CI

2016-02-08  Shahar Havivi  <shaharh@redhat.com>

	v2v: drop old el6 test code
	Tests were failing on el6 machine, but we don't test on el6 any more;
	the code is for el7.2 and above.

	Continuous-Integration: Jenkins CI

2016-02-08  Martin Polednik  <mpolednik@redhat.com>

	numa: only use libvirt for memory info
	Current code queries memory usage via libvirt or /proc/meminfo,
	depending on the state of machine's numa support. For some time,
	(guaranteed 7.0+) even machines without direct numa support do
	expose a single node that we can query.

	This patch removes the 'UMA' (uniform memory architecture) code branch
	and uses libvirt for all numa memory queries.

	Continuous-Integration: Jenkins CI

2016-02-08  Dan Kenigsberg  <danken@redhat.com>

	vmfex hook: hold a ref for a virDomain object
	commit 93feb1c introduced a weakref to virDomain object to avoid
	reference cycles. This causes a surprising behaviour: if we do not hold
	a reference to virdomain.Notifying, the underlying virDomain is
	garbage-collected before being accessed for the first time.

	This patch quickly holds a named reference to the domain. I did not find
	other pieces of code with the same problem, however, the mechanism seems
	dangerously error-prone.

	This bug is easily reproduced with

	    from vdsm import libvirtconnection
	    c = libvirtconnection.get()
	    print(c.lookupByName('my-vm').XMLDesc(0))

	and "solved" by

	    from vdsm import libvirtconnection
	    c = libvirtconnection.get()
	    v = c.lookupByName('my-vm')
	    print(v.XMLDesc(0))

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1305338
	Continuous-Integration: Jenkins CI

2016-02-08  Ido Barkan  <ibarkan@redhat.com>

	net: add documentation for setupNetworks rollback mechanism.
	Since Ifcfg is both the default implementation and the exception of
	this mechanism, a few comments might make this situation less confusing.

	Continuous-Integration: Jenkins CI

2016-02-07  Dan Kenigsberg  <danken@redhat.com>

	virt: migration: initialize SourceThread._destServer on __init__
	Introducing data members during runtime is a bad practice. In this case,
	it caused a noisy log distraction when the destination host name could
	not be resolved.

	This patch initializes _destServer to None, and makes sure it has a
	valid value before using it.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1299886
	Continuous-Integration: Jenkins CI

2016-02-07  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: enable auto-attach mapping
	Add Auto-Attach mapping support to OVS hook. I-SID could be defined
	in engine with custom network property 'ovs_aa_sid'. This is supported
	only for tagged networks.

	Continuous-Integration: Jenkins CI

2016-02-06  Yeela Kaplan  <ykaplan@redhat.com>

	service: change vdsm KillMode to mixed
	When SIGTERM is sent to vdsm, automatically systemd sends the same signal
	 to its childs processes, this can cause them to exit before vdsm closes
	 fds to them properly.

	Using mixed KillMode in .service will send SIGTERM only to main vdsm
	service at first, sigkill will be sent to its children after a timeout.

	http://www.freedesktop.org/software/systemd/man/systemd.kill.html

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1189200
	Continuous-Integration: Jenkins CI

2016-02-05  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Normalize local path before escaping
	Hosted engine setup does not normalize mount path, so hosted engine
	storage domain with trailing slash:

	    /foo/

	will be mounted at:

	    /rhev/data-center/mnt/_foo_

	This is harmless until hosted engine try to import the hosted engine
	storage domain, recreating the storage domain path from the storage
	domain information, returning a normalized remote path. After importing
	the domain, the host will have the same remote path mounted twice at
	two different local paths:

	    /rhev/data-center/mnt/_foo
	    /rhev/data-center/mnt/_foo_

	Mounting the same domain twice does not work, leading to failure.

	Storage domains created in engine do not have this issue since engine
	does not allow path with trailing slash.

	We are normalizing mount remote and local path, both before mount, and
	when reading mount information from /proc/mounts and /etc/mtab.
	However, we were escaping slashes in the normal path *before*
	normalizing it, so the normalization had no effect.

	This patch normalize the local path before escaping slashes, to match
	the intent of the original code, and avoid such issues in the future.

	This change does not fix hosted engine system with unnormalized local
	path. The only way to fix this is to disconnect the storage domain and
	connect it again with a normalized path.

	Bug-Url: https://bugzilla.redhat.com/1300749
	Continuous-Integration: Jenkins CI

2016-02-05  Edward Haas  <edwardh@redhat.com>

	net: IP DHCP detection
	Improve and fix DHCP status detection.

	There have been several points covered in this patch:
	- dhcpv6 is now correctly detected (directly from kernel).
	- dhcp detection simplified by checking ip interface flags (through
	  netlink). This method is also faster and reduces complexity.
	- Code cleanup.

	Continuous-Integration: Jenkins CI

	net: Canonize dhcpv6 on API input
	IPv6 dhcp is enabled by default, therefore, if the key is missing
	from the network setup request, dhcp on ipv6 is left ON.

	VDSM assumes a different default, which is ipv6 dhcp OFF.
	To keep VDSM logic, a missing dhcpv6 key is converted to dhcpv6=False

	Continuous-Integration: Jenkins CI

2016-02-05  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Require python-six >= 1.9.0
	Bug-Url: https://bugzilla.redhat.com/1300640
	Continuous-Integration: Jenkins CI

2016-02-04  Edward Haas  <edwardh@redhat.com>

	net: Clean netinfo.__init__ and migrate to cache
	When stand alone modules under the netinfo package are being used by other
	modules, __init__ is being processed and cause import loops.
	This patch migrates most __init__ content to cache.

	Continuous-Integration: Jenkins CI

2016-02-04  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: two networks cannot share one tag
	testSetupNetworksNetCompatibilityMultipleNetsSameNic
	assigns the same tag to two networks. This is not possible
	with OVS, two fake bridges under the same OVS bridge cannot
	share a tag.

	Continuous-Integration: Jenkins CI

2016-02-04  Marcin Mirecki  <mmirecki@redhat.com>

	setupNetworks: moving nics between bonds
	This patch fixes a problem where a slave removed from
	one bond could sometimes not be assigned to another
	bond in the same request.
	This happened because removing, editing and adding of
	slaves to a bond was done bond by bond, so if a nic
	was added to a bond which was handled before the bond
	from which the nic was removed the operation failed.
	Example:
	bond0: nic0, nic1   => nic2, nic3
	bond1: nic2, nic3   => nic0, nic1
	In this situation first bond0 is processed: nic0 and
	nic1 will be removed, but nic2 and nic3 can not yet
	be removed as they are part of bond1 (validation fails).
	Processing of bond1 will introduce errors, as nic2 and
	nic3 will be removed (already assigned to bond0),
	which will in effect reset their ifcfg files, and cause
	the previous attachement to bond0 to be undone.

	The patch changes the validation to check if a slave
	added to a bond is deleted from another bond.
	Also the removing of slaves from all bonds is done
	before any other bond operation.

	Bug-Url: https://bugzilla.redhat.com/1269175
	Continuous-Integration: Jenkins CI

2016-02-04  Edward Haas  <edwardh@redhat.com>

	net: Fixing old netinfo access
	netinfo has been split into individual modules some time ago, this patch
	fixes some leftovers that have been missed.

	Continuous-Integration: Jenkins CI

2016-02-04  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix detection for ppc64le
	x86_64 detects the state of hostdev support by looking at 2 places:

	* /sys/class/iommu to determine the status of DMA remapping,
	* /sys/kernel/iommu_groups to determine that at least some IOMMU groups
	  exist.

	The issue in ppc64le is related to the first place - /sys/class/iommu
	is newer interface and may not be supported on all kernels. 7.2 on
	x86_64 seems to be updated enough that we can keep the detection, but
	for ppc64le we cannot use it.

	Continuous-Integration: Jenkins CI

2016-02-04  Martin Betak  <mbetak@redhat.com>

	vdsm: Remove unreachable code
	Continuous-Integration: Jenkins CI

2016-02-04  Shahar Havivi  <shaharh@redhat.com>

	v2v: support for importing Xen VMs via libvirt on RHEL hosts
	Adding support for import Xen virtual machines that are running on RHEL
	via libvirt.

	Continuous-Integration: Jenkins CI

2016-02-03  Dan Kenigsberg  <danken@redhat.com>

	build: enforce abs_import check
	commit 2154bc8 defined a check for absolute imports in a limited
	whitelist, but failed to actually run it in every `make check`.

	This patch adds abs_import to check, and fixes a couple of files that
	collected lint while the check was off. It also remove vdsm/network
	directory, which is no longer with us.

	Continuous-Integration: Jenkins CI

2016-02-02  Dan Kenigsberg  <danken@redhat.com>

	untested: notify Engine when host connectivity changes
	Continuous-Integration: Jenkins CI

2016-02-02  pkliczewski  <piotr.kliczewski@gmail.com>

	hooks: make sure to handle vdsm exception in the bridge
	We need to make sure to handle hook errors properly and pass them to
	the client.


	Bug-Url: https://bugzilla.redhat.com/1295778
	Continuous-Integration: Jenkins CI

	hooks: moving hook error to exception module
	Continuous-Integration: Jenkins CI

2016-02-01  Tomas Jelinek  <tjelinek@redhat.com>

	migration added migrateChangeParams verb
	Currently it contains only the bandwidth but it will be used also
	for convergenceSchedule in future.

	Feature-Page: http://www.ovirt.org/Features/Migration_Enhancements
	Continuous-Integration: Jenkins CI

2016-02-01  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: don't log every stats change
	VDSM log is spammed with 'ovs_after_get_stats' and every hour the VDSM
	log is rotating.

	Bug-Url: https://bugzilla.redhat.com/1234867
	Continuous-Integration: Jenkins CI

2016-02-01  Edward Haas  <edwardh@redhat.com>

	CI automation: Trigger post merge tests
	Trigger tests execution after a merge.

	Continuous-Integration: Jenkins CI

	net: When IPv6 is not enabled, fallback to IPv4
	There are setups where IPv6 is disabled, causing a conflict with the
	default configuration (which is set to listen on address '::').
	In such a case, VDSM fails to listen on '::'.

	In order to support IPv4 only setups without requiring a change in the
	configuration, VDSM will fallback to listen on an IPv4 only address.

	Note that '::' is used to listen on both IPv4 & IPv6 stacks, a fallback to
	IPv4 seems reasonable.

	Continuous-Integration: Jenkins CI

2016-01-31  Edward Haas  <edwardh@redhat.com>

	net: Canonize persistent and running net config
	In order to support persistent configuration which has been saved in an
	older version, canonize & normalize the configuration upon reading it.

	Canonizing the persistent and running config also covers several kernelconfig
	normalization points, therefore they have been removed.

	Continuous-Integration: Jenkins CI

2016-01-31  Tomas Jelinek  <tjelinek@redhat.com>

	migration: Add support for max migration bandwidth setting
	Enriched the migrate verb by maxBandwidth.

	It is an optional argument and the fallback is to
	migration_max_bandwidth
	from config.

	Feature-Page: http://www.ovirt.org/Features/Migration_Enhancements
	Continuous-Integration: Jenkins CI

2016-01-29  Amit Aviram  <aaviram@redhat.com>

	imagetickets: Support image tickets
	The introduced module is part of the image transfers implementation,
	which lets the end user of oVirt to transfer images to and from
	oVirt's storage devices.

	Specifically, this VDSM module is responsible for granting permissions
	for image transfers, via a ticket mechanism for an image, sent from
	engine, through VDSM to imaged - a process for image IO which resides
	next to VDSM in the host.

	Continuous-Integration: Jenkins CI

2016-01-29  Idan Shaby  <ishaby@redhat.com>

	sp: update domain links on state change
	In some situations (e.g. after a reconstructMaster command) the domain
	links may be missing and it's impossible to recreate them on
	connectStoragePool or refreshStoragePool since the storage may be
	unreachable. The best we can do is recreate them as soon as the domains
	are visible again.

	This patch is based on a patch that was merged into ovirt-engine-3.4
	but was never merged into master: https://gerrit.ovirt.org/#/c/27466/ .
	It also deals with a few issues that patch had:

	- It adds the "@unsecured" decoration to _domainStateChange, since
	  without it we get a SecureError in case that the host that runs it is
	  not the SPM.

	- In the other patch, onDomainStateChange was registered in the
	  constructor of StoragePool.
	  This is a waste of resources since these events can be called only
	  after the connect method is called (specifically, after __rebuild is
	  called from within connect).
	  Also, onDomainStateChange is never unregistered, causing a leak of a
	  registration for every pool disconnection or unsuccessful connection.
	  This patch moves the registration to onDomainStateChange to be right
	  before it can actually be called (in connect), and calls unregister if
	  an error has occurred in __rebuild.
	  A call to unregister was also added to the disconnect method, so that
	  we won't be listening to events that cannot be called anymore.

	- This patch locks the pool and the domain id's in _domainStateChange:
	  On the pool, a shared lock is taken since we query the pool's state.
	  On the domain, we take a new <domain_uuid>_repo exclusive lock to
	  prevent concurrent calls to_refreshDomainLinks.

	Relates-To: https://bugzilla.redhat.com/show_bug.cgi?id=1091030
	Bug-Url: https://bugzilla.redhat.com/1271771
	Continuous-Integration: Jenkins CI

2016-01-28  Francesco Romani  <fromani@redhat.com>

	virt: move handling of recovery file in a class
	saveState() is little more than a fancy wrapper around
	pickle, tailored for the Vm special case.
	Extract all the saveState() related code in a small
	helper class, and move it in to recovery.py,
	to make the code easier to read and test.

	Continuous-Integration: Jenkins CI

	virt: move getVDSMDomains in recovery.py
	getVDSMDomains() is used (and should be used) only in the
	recovery flow, so this patch moves it into the recovery module.

	This patch just:
	- moves code
	- rename it to make pep8 compliant
	- fixes imports

	Continuous-Integration: Jenkins CI

	virt: move channels constants into vmchannels.py
	Move the channels-related constants into vmchannels.py,
	to simplify the dependency graph and to unlock future patches.
	This patche does only move + rename + fix imports.

	Continuous-Integration: Jenkins CI

2016-01-27  Edward Haas  <edwardh@redhat.com>

	net: Cleanup the blacklist from ifcfg
	Options passed to the ifcfg configurator should be processed explicitly.
	The blacklist is removed and bridge options added explicitly.

	Continuous-Integration: Jenkins CI

	net: Move canonize_networks to its own module
	Created netcanonize module to allow re-use of canonize_networks.

	Continuous-Integration: Jenkins CI

2016-01-27  Martin Polednik  <mpolednik@redhat.com>

	vdsm: move fake_kvm code into faqemu
	So far, the hook's functionality is equivalent to fake_kvm settings
	(and is backwards compatible with them). The reason for split is growing
	need for arch differentiation in caps.py, which is unnecessary.

	Continuous-Integration: Jenkins CI

2016-01-27  Adam Litke  <alitke@redhat.com>

	storage: Split newMetadata into makeMetadata and createMetadata
	To prepare for garbage-collectible volume metadata needed by the SDM
	flows, we need to break out the functionality of creating new volume
	metadata.  Introduce makeMetadata() which builds a metadata dict from a
	given set of args.

	Continuous-Integration: Jenkins CI

2016-01-27  Dan Kenigsberg  <danken@redhat.com>

	operstate: use python3-friendly io.open()
	netinfoTests is not yet passing under Python 3 due to its import of
	execCmd.

	Continuous-Integration: Jenkins CI

2016-01-27  Francesco Romani  <fromani@redhat.com>

	tests: lib: add tests for utils.weakmethod
	This patch adds tests for utils.weakmethod().
	The tests were previously bundled with
	the same patch which added utils.weakmethod(),
	but they were failing for unrelated failures,
	like other bug or noisy test environment.

	The tests were stripped off to not needlessly
	stall the utils.weakmethod() patch, needed to
	plug a memory leak.

	Related-To: https://bugzilla.redhat.com/1283999
	Continuous-Integration: Jenkins CI

2016-01-26  Vinzenz Feenstra  <vfeenstr@redhat.com>

	guest-agent: desktopLock exception on EBADF should be ignored
	There's no more logging of the EBADF exceptions on desktopLock thrown
	when the sockets are closed, since this is very likely to happen on a
	migration because we are receiving multiple display disconnect events
	which are delayed for 2 seconds before being processed to avoid the
	screen to be locked in migration cases - in allows the lock not to be
	executed when we're already connected again (e.g. on a fast reconnect
	of the display)
	Therefore the exception on its own does not provide much value and
	therefore is explicitely swallowed for the desktopLock case.

	All other exceptions are still logged, in case something unexpected
	happens.

	Additional note on the multiple disconnect events: We have
	implemented and merged a fix already to reduce this to one time.
	However this depends on a fixed libvirt - because they had a bug
	that they did not report the client remote ports and therefore
	we couldn't make a decision whether or not the disconnect event
	should be handled or not - so we handle it 4 times for now.

	Backport-To: 3.6
	Bug-URL: https://bugzilla.redhat.com/1151863
	Continuous-Integration: Jenkins CI

2016-01-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	Introducing context manager to terminate async processes on internal fail
	Part of the effort to omit the use of deathSignal.

	The following code for example guaranties that process will be cleaned and exit
	 after timeout without handling the kill call. If process will stay alive
	after sigkill, "terminating" will register the process pid to zombiereaper.

	proc = execCmd([cmd], sync=False)
	with terminating(proc):
	    if proc.wait(30) is None:
	        raise Timeout()

	Continuous-Integration: Jenkins CI

2016-01-25  Shahar Havivi  <shaharh@redhat.com>

	v2v: externalVMList Xen+Kvm support
	Not all new methods are supported in older version of libvirt under RHEL
	5.x-7.x.
	We want to use one verb to probe VMs information from Xen, KVM and
	vCenter, as well as old libvirt versions.
	Tested with RHEL 5.x and above.

	Currently externalVMList only tested with vCenter uri:
	vpx://...

	Adding support for Kvm via libvirt:
	qemu+tcp://user@host/system

	As well as for Xen (On Rhel 5.x)
	xen+ssh://user@host

	Importing VMs from Xen and Kvm will be presented in the next patches

	Continuous-Integration: Jenkins CI

2016-01-24  Dan Kenigsberg  <danken@redhat.com>

	restore-net: _get_persisted_numvfs
	Former code attempted to match a pci device path (e.g. 0000:05:00.0)
	with libvirt pci device name (e.g. pci_0000_05_00_0), and failed.

	This patch adds the required conversion between the two.

	Bug-Url: https://bugzilla.redhat.com/1301349
	Continuous-Integration: Jenkins CI

2016-01-24  Martin Polednik  <mpolednik@redhat.com>

	host: use cpuarch
	This patch replaces the previous platform lookup that used string
	constants by more sophisticated approach from cpuarch.

	The patch also removes i686 and ppc from platforms where uuid()
	succeeded, causing the call to raise UnsupportedArchitecture
	exception on these platforms. This is because neither of them is
	supported in the current codebase.

	Continuous-Integration: Jenkins CI

2016-01-24  Shahar Havivi  <shaharh@redhat.com>

	v2v: tests: new testing class: MockVirConnectTests
	Tests for MockVirConnect

	Continuous-Integration: Jenkins CI

2016-01-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	check for python3-nose only if python3 found
	For a crazy setup, where python3-nose is installed, but python3 is not
	executable.

	Continuous-Integration: Jenkins CI

2016-01-24  Roman Mohr  <rmohr@redhat.com>

	host stats: Collect stats from online cpu cores only
	When a cpu goes offline while libvirtd is running, the getVdsStats call
	still tries to collect sampling data for this CPU and fails with an
	exception.

	When vdsm is already running, it is enough to do something like

	  echo 0 > /sys/devices/system/cpu/cpu2/online

	to break getVdsStats.

	When libvirtd is running and both CPUs are online, vdsm reports
	stats for two cores:

	 $ vdsClient -s 0 getVdsStats
	        [...]
	        cpuStatistics = {
	                         '0': {'cpuIdle': '90.74',
	                               'cpuSys': '1.40',
	                               'cpuUser': '7.86',
	                               'nodeIndex': 0},
	                         '1': {'cpuIdle': '96.07',
	                               'cpuSys': '0.47',
	                               'cpuUser': '3.46',
	                               'nodeIndex': 0}
	                        }
	        [...]

	When only one CPU out of two has been online before libvirtd was
	started, vdsm reports stats for the one online core:

	 $ vdsClient -s 0 getVdsStats
	        [...]
	        cpuStatistics = {
	                         '0': {'cpuIdle': '90.74',
	                               'cpuSys': '1.40',
	                               'cpuUser': '7.86',
	                               'nodeIndex': 0}
	                        }
	        [...]

	When one CPU went offline after libvirtd has been started, vdsm threw
	an exception. With this patch getVdsStats reports only stats from the
	remaining online CPU:

	 $ vdsClient -s 0 getVdsStats
	        [...]
	        cpuStatistics = {
	                         '0': {'cpuIdle': '90.74',
	                               'cpuSys': '1.40',
	                               'cpuUser': '7.86',
	                               'nodeIndex': 0}
	                        }
	        [...]

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1264003
	Continuous-Integration: Jenkins CI

2016-01-24  Edward Haas  <edwardh@redhat.com>

	net api: Canonize the network stp flag
	Canonize the network stp flag at the network api entry point.

	Continuous-Integration: Jenkins CI

	net api: Canonize the network bridged flag
	Canonize the network bridged flag at the network api entry point.

	Continuous-Integration: Jenkins CI

2016-01-24  Francesco Romani  <fromani@redhat.com>

	virt: stats: make _disk_iops_bytes more robust
	Make reporting of iops and bytes more robust and less noisy
	when some fields are missing from bulk stats.
	This can happen, so we must handle this case silently.

	Since this patch fixes the last possible source of
	KeyErrors, is now possible to unbreak existing related
	vmStatsTests.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1281337
	Continuous-Integration: Jenkins CI

	virt: stats: make compute_latency more robust
	Make compute_latency more robust and less noisy
	when some fields are missing from bulk stats.
	This can happen, so we must handle this case silently.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1281337
	Continuous-Integration: Jenkins CI

	virt: stats: make disk_rate more robust
	Bulk stats can return any subset of keys.
	Previously, we had too weak protection, leading
	to some KeyError peppering up the logs, for example
	when storage was slow to respond.

	Now we add more careful protection for disk_rate.
	Following patches will fix the other code accessing
	storage stats.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1281337
	Continuous-Integration: Jenkins CI

2016-01-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	add python3 run for lib/infra tests
	Continuous-Integration: Jenkins CI

2016-01-23  Milan Zamazal  <mzamazal@redhat.com>

	Return deep copy from GuestAgent.getGuestInfo()
	In 6b09add, we fixed bug caused by outer guestInfo modification.
	However, we're still not completely safe as we return only shallow copy
	of guestInfo from getGuestInfo().  This is for performance reasons,
	we had concerns especially about appsList.

	This followup patch introduces deep copying of guestInfo while changing
	appsList from list to tuple.  According to our not very scientific
	measurements, picklecopy() with tuple appsList is significantly faster
	than with list appsList and picklecopy() is in any case significantly
	faster than copy.deepcopy().

	Continuous-Integration: Jenkins CI

2016-01-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Run %systemd_post on all effected unit files
	To load vdsmd.preset file during installation we need to run
	%systemd_post script for each effected service

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1167322
	Continuous-Integration: Jenkins CI

	Due to systemd we don't require to use deathSignal to kill fence scripts
	When vdsmd process will die, it will send sigterm to subprocesses it
	initiated.

	Continuous-Integration: Jenkins CI

2016-01-21  Edward Haas  <edwardh@redhat.com>

	net: Refactor _canonize_networks for readablity
	_canonize_networks is growing, refactoring it by extracting a method per
	processed attribute.

	Continuous-Integration: Jenkins CI

2016-01-21  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: simplify bridge tests
	Continuous-Integration: Jenkins CI

2016-01-21  Martin Polednik  <mpolednik@redhat.com>

	vdsm: introduce cpuinfo module
	The objective of the new modules is encapsulating functionality related
	to CPU from bare-metal standpoint. That means parsing cpuinfo and
	exposing host architecture. This approach cleans up 'caps' module and,
	more importantly, moves the code to vdsm library - allowing hooks to
	work with cpu info and architecture. This allows us to move fake_kvm
	to a hook.

	Continuous-Integration: Jenkins CI

2016-01-21  Edward Haas  <edwardh@redhat.com>

	net: vdsClient fails to connect to an IPv6 addr
	When vdsClient is used on a non-ipv6  host, and no destination address
	is provided, it will fail to connect to the server.
	(it uses the vdsm.conf management_ip parameter which is by default '::')

	The vdsClient now prompts when it detects/suspects this is the problem.
	(instead of a traceback)

	Continuous-Integration: Jenkins CI

2016-01-20  Edward Haas  <edwardh@redhat.com>

	net: Enable VDSM to perform migration over IPv6
	As part of adding support for IPv6, this patch adds the ability
	to perform a VM migration process over IPv6 addresses.

	Continuous-Integration: Jenkins CI

	net: Cleanup _create_socket from dead code
	On failure, socket.getaddrinfo() raises an exception and does not return
	a None.

	Continuous-Integration: Jenkins CI

2016-01-20  Martin Polednik  <mpolednik@redhat.com>

	caps: refactor cpuinfo parsing
	The cpuinfo file parsing gathers information such as CPU model name,
	frequency and supported flags.

	Current code parses whole file, keeping all the CPU information. This
	is not effective as the values are duplicates - therefore allowing us
	to parse only the essential information and discard the rest.

	Continuous-Integration: Jenkins CI

2016-01-20  pkliczewski  <piotr.kliczewski@gmail.com>

	build: make lib/api directory writable
	During make distcheck generation of vdsm-api.html file fails due to
	missing write permission.


	Related-To: https://bugzilla.redhat.com/1297808
	Continuous-Integration: Jenkins CI

2016-01-20  Francesco Romani  <fromani@redhat.com>

	vmstats: docs: document why we cannot keep indexes
	Add documentation about why we need to find first_index
	and last_index each time in vmstats code, when dealing
	with bulk stats output.

	Continuous-Integration: Jenkins CI

	vm: delete recovery file only after destroy()
	We must not re-create a recovery file after it
	is cancelled, because this will create an orphan
	recovery file, and ghost VMs (see BZ below).

	But we should also do not delete the recovery
	file too early, because Engine is in charge
	of collecting down VMs, and Vdsm is not really
	done with VMs until that moment.

	So, we move the cleanup of the recovery file
	in deleteVm. We kill the recovery file only
	when we wipe out the VM from the system, not earlier.

	Bug-Url: https://bugzilla.redhat.com/1253043
	Continuous-Integration: Jenkins CI

2016-01-20  Antoni S. Puimedon  <asegurap@redhat.com>

	extra_ipv4_addrs_hook: Add a hook for configuring secondary addrs
	Sometimes it might be useful to set up extra addresses for the top
	network device. This patch creates an after_network_setup hook that
	allows just that, thanks to the custom network properties.

	Continuous-Integration: Jenkins CI

2016-01-20  pkliczewski  <piotr.kliczewski@gmail.com>

	migration: set timeout to 10 mins
	On heavily loaded environments createMigration call can take a lot of
	time so we want to make sure that we do not timeout prematurely.


	Bug-Url: https://bugzilla.redhat.com/1188543
	Continuous-Integration: Jenkins CI

2016-01-20  Francesco Romani  <fromani@redhat.com>

	vm: make _deleteVm() more robust
	Use else: clause in a try: block to make
	deleteVm() more robust and a bit nicer.

	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Jenkins CI

2016-01-20  Martin Polednik  <mpolednik@redhat.com>

	nettestlib: add ppc64le TUNSETIFF value
	ppc64le shares the same TUNSETIFF as ppc64 and shouldn't be treated as
	unsupported architecture.

	Continuous-Integration: Jenkins CI

	nettestlib: use cpuarch module
	This patch updates the architectural dependant code in nettestlib to
	use the new cpuarch module.

	Continuous-Integration: Jenkins CI

	supervdsm: use cpuarch
	This patch replaces the previous platform lookup that used string
	constants by more sophisticated approach from cpuarch.

	Continuous-Integration: Jenkins CI

	dsaversion: use cpuarch
	This patch replaces the previous platform lookup that used string
	constants by more sophisticated approach from cpuarch.

	Continuous-Integration: Jenkins CI

2016-01-19  Edward Haas  <edwardh@redhat.com>

	net: Use VLAN ID as integer across VDSM
	Canonize and normalize VLAN ID at API entry point and use it as an
	integer internally.

	Note: Engine expects the vlan id to be an integer.
	Continuous-Integration: Jenkins CI

2016-01-19  Nir Soffer  <nsoffer@redhat.com>

	health: Report resource usage
	Report cpu usage in the last interval, memory size, memory delta, and
	number of threads:

	    user=7.67%, sys=3.07%, rss=68716 kB (+2188), threads=60

	Continuous-Integration: Jenkins CI

	health: Introduce Vdsm health monitoring
	Debugging Vdsm in the field is very hard, because we don't have enough
	information about Vdsm resource usage. This patch adds a new health
	monitoring thread, checking Vdsm health every 60 seconds.

	For now, we monitor only uncollectable objects that the garbage
	collector cannot collect. In the future we should report other
	information like used memory, number of active threads, etc.

	Health information is only logged; in the future we may post events to
	engine.

	Relates-To: https://bugzilla.redhat.com/1269424
	Continuous-Integration: Jenkins CI

	resourceManager: Fix ResourceRef leak
	Each time we create a disk, we leak 6 objects; one ResourceRef and
	several pthreading Locks and Conditions:

	    Thread-13::WARNING::2016-01-15 20:29:43,126::health::102::health::
	    (_check_garbage) Found 6 uncollectable objects: [
	    "< ResourceRef '869b6036-a9ca-43eb-9287-828803822783_imageNS.
	    489402de-1850-4dfd-b71a-193b92f402e1', isValid: 'False'
	    obj: 'None'>",
	    '<pthreading.Lock object at 0x7f6ecc04a5a8>',
	    '<pthreading.Lock object at 0x7f6ee4028368>',
	    '<pthread.Cond object at 0x7f6f040fcf10>',
	    '<pthread.Cond object at 0x7f6f040fcb50>',
	    '<pthread.Cond object at 0x7f6f040fce10>']

	ResourceRef is adding some of its wrapped object methods to itself,
	creating a reference cycle. Because it also implements __del__, this
	wrapping make it uncollectable.  Use weakref.proxy to avoid the
	reference cycle, fixing this leak.

	Bug-Url: https://bugzilla.redhat.com/1269424

2016-01-19  anosikovsky  <nosikovsky@gmail.com>

	py3 test improving
	adding "b" prefix to variable for assert_read function
	CPopen changed to Popen from subprocess module

	Continuous-Integration: Jenkins CI

2016-01-19  Francesco Romani  <fromani@redhat.com>

	vm: make deleteVm private
	The Vm.deleteVm() method is never used outside the Vm class,
	so it should be _private.

	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	vm: use response module in the destroy path
	use the facilities of the response module to
	make the code nicer, and easier to change in the future.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	lib: use weakmethod to break reference cycles
	The libvirtconnection module replaces the methods
	of libvirt.virDomain object (et. al.) to detect libvirt
	errors, and to take action in presence of certain errors,
	maybe dropping the connection, maybe killing Vdsm.

	While the whole idea of this wrapping and how to properly
	react to these events is debatable and should probably
	rewritten, the immediate issue is that this wrapping is not safe,
	and creates circular references in instance methods:

	   +-------------------------------------+
	   v                                     |
	object -> wrapper -> tuple of arguments(self, method)

	Since libvirt.virDomain defines the __del__ special method,
	objects become uncollectable, and the net final effect is
	a resource leak each time a VM is stopped.

	This was observed for virDomain, but the wrapping of
	virConnect has also the same problem.

	This patch uses utils.weakmethod to break the reference cycle in a
	backport-friandly manner, in order to make the objects collectable
	again, and to avoid the leak.

	The proper long-term fix is to rethink the wrapping done in
	libvirtconnection.py, but this deserves more planning and
	will be addressed in a future patch.

	Bug-Url: https://bugzilla.redhat.com/1283999
	Bug-Url: https://bugzilla.redhat.com/1269424
	Backport-To: 3.6
	Backport-To: 3.5
	Reported-By: Eldad Marciano <emarcian@redhat.com>
	Reported-By: Milan Zamazal <mzamazal@redhat.com>
	Continuous-Integration: Jenkins CI

	utils: add weakmethod helper
	The libvirtconnection module adds wrapping around virDomain
	objects, to detect and react libvirt issues, like timeouts and
	connection errors.

	This patch adds a helper function to wrap instance methods
	avoiding circular references which in turn may render some objects
	uncollectable, causing leaks.

	Note: this patch previously included tests, which were
	stripped to another patch, because of unrelated failures
	made them failed constantly.

	Bug-Url: https://bugzilla.redhat.com/1283999
	Backport-To: 3.6
	Backport-To: 3.5
	Reported-By: Eldad Marciano <emarcian@redhat.com>
	Reported-By: Milan Zamazal <mzamazal@redhat.com>
	Continuous-Integration: Jenkins CI

	vm: safer removal of the recovery file
	If a user shutdowns a VM from inside the guest, Vdsm leaves
	a stale recovery file.
	The cause is a race between onQemuDeath, being asynchronous, and
	Vm.destroy().
	The actual culprit is the ordering of events between onQemuDeath and
	destroy(), and the shutdown from within the guest is just the easiest
	way to trigger this issue.

	In the QEMU death path, Vdsm calls releaseVm, which wipes the recovery
	file, and after a succesful completion does saveState, which recreates
	the recovery file.
	Later, on destroy(), Vdsm tries to do releaseVm again, but releaseVm
	will not run, because of the flag that the previous succesful
	call set. releaseVm must run exactly once.

	Correct sequence:
	- destroy()
	-- vm._destroyed = True
	-- releaseVm() - done (vm._released == False)
	-- vm._released = True
	[later]
	- onQemuDeath
	-- releaseVm() - skipped (vm._released == True)
	-- saveState() - skipped (vm._destroyed == True)

	Faulty sequence:
	- onQemuDeath()
	-- releaseVm() - done (vm._released == False)
	-- vm._released = True
	-- saveState() - done <BUG!> (vm._destroyed == False)
	[later]
	- destroy()
	-- vm._destroyed = True
	-- releaseVm() - skipped (vm._released == True)

	The fix is to protect the recoveryFile handling with a lock.

	Backport-To: 3.6
	Backport-To: 3.5
	Bug-Url: https://bugzilla.redhat.com/1253043
	Continuous-Integration: Jenkins CI

2016-01-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	split to commands_test.py - only execCmd tests
	Continuous-Integration: Jenkins CI

2016-01-18  Nir Soffer  <nsoffer@redhat.com>

	exception: Inherit from VdsmException
	All exceptions used by vdsm API inherit now from VdsmException, removing
	duplicate code for generating response.

	The info() method added recently to GeneralException was moved up to
	VdsmException. Use new info to simplify GlusterException base class.

	Continuous-Integration: Jenkins CI

	exception: Make VdsmException reusable
	VdsmException was initializing code and message to default values if
	called without arguments. This make is useless as as base class for
	more specific exceptions, defining real code and message.

	GlusterException, the only exception inheriting from VdsmException,
	avoided this issue by overriding __init__.

	Continuous-Integration: Jenkins CI

	gluster: Add gluster exception tests
	GlusterException inherits from VdsmException, which we are going to
	change in the next patch. Add the missing tests to make sure we don't
	break it.

	Continuous-Integration: Jenkins CI

	exception: Gather exceptions in vdsm.exception
	Move GeneralException and ActionStopped from vdsm.utils to
	vdsm.exception.

	The long term goal is to have one exception module similar to
	storage_exception, simplifying error handling and improving the
	information returned to clients on errors.

	Continuous-Integration: Jenkins CI

2016-01-18  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: fix bonded network change problem
	When we try to change a bonded network, setupNetworks explodes
	because we are trying to remove running_nic which is None.

	Now we first check if configuration is changed and then do optional
	removal and setup of a nic.

	Continuous-Integration: Jenkins CI

2016-01-18  pkliczewski  <piotr.kliczewski@gmail.com>

	supervdsm: failed validateAccess leaves pipes open
	Whenever we run validateAccess and it fails with "Permission denied" we
	leak file descriptors. We need to make sure to close child and parent
	pipes.


	Bug-url: https://bugzilla.redhat.com/1271575
	Continuous-Integration: Jenkins CI

2016-01-18  Francesco Romani  <fromani@redhat.com>

	vm: extract cleanupRecoveryFile() helper
	This patch improves the code a tiny bit,
	and makes it easier to implement the next patch, which wants
	to fix a bug.

	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Jenkins CI

2016-01-18  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't expose GuestAgent.guestInfo directly
	GuestAgent.getGuestInfo() returns its guestInfo dict attribute directly,
	so the callers may modify it.  guestInfo is a public attribute so it
	shouldn't be a problem in theory as it's possible to modify that
	attribute anyway without calling getGuestInfo().  But guestInfo isn't
	used anywhere outside GuestAgent and should be probably changed to a
	private attribute.

	The problem of modifiable internal structure is exposed in
	Vm._getGuestStats where modifications to guestInfo cause incorrect
	memUsage values reported in case of repeated invocations (see the
	referenced bug).

	The safest approach to the problem is to return a deep copy of guestInfo
	from getGuestInfo().  However, making a deep copy can have performance
	issues, e.g. when copying a list of thousands installed Windows
	packages.  For that reason we return just a shallow copy, which should
	suffice for typical uses.

	Bug-Url: https://bugzilla.redhat.com/1295428
	Continuous-Integration: Jenkins CI

2016-01-18  Dan Kenigsberg  <danken@redhat.com>

	Revert "tests: mark test_mkFloppyFs as broken"
	This reverts commit 5d06024fac7bebeab5df9db21d3fd2fe1bdd6f01.
	I hope that the test has been unbroken by commit 200cd405.

	Continuous-Integration: Jenkins CI

2016-01-17  Edward Haas  <edwardh@redhat.com>

	test: Configurable verbose test output
	Let the user control verbose level.

	To run without verbose output, use: 'NOSE_VERBOSE=1'
	Example: 'make check NOSE_VERBOSE=1'

	Continuous-Integration: Jenkins CI

2016-01-17  Benjamin Kemper  <kemperbenny@gmail.com>

	Added Python 3 support for sslTests.py
	Continuous-Integration: Jenkins CI

2016-01-15  Adam Litke  <alitke@redhat.com>

	storage: Fix removeMetadata
	In commit 2fd92bd3 we moved removeMetadata to the VolumeManifest.  We
	made a mistake by using a common redirection method in the Volume class.
	Unfortunately, the block version takes a metaId parameter and the file
	version takes no arguments.  To fix, each volume type must perform its
	own indirection with the correct number of arguments.

	Continuous-Integration: Jenkins CI

	storage: Fix _getLeaseVolumePath
	In commit a816cd3d (which was part of the SDM Volume refactoring work)
	we moved some functions related to volume leases into the VolumeMetadata
	(now VolumeManifest) class.  When doing so, I mistakenly made vol_path a
	required parameter to _getLeaseVolumePath.  The function's behavior was
	not meant to be changed by this refactoring and the _shareLease
	function does not expect to pass vol_path.

	The result is the following exception when creating a VM from a
	template:

	83df5309-8e78-4a8d-beed-447040815312::ERROR::2016-01-15
	17:00:35,969::task::867::Storage.TaskManager.Task::(_setError)
	Task=`83df5309-8e78-4a8d-beed-447040815312`::Unexpected error
	Traceback (most recent call last):
	  File "/usr/share/vdsm/storage/task.py", line 874, in _run
	    return fn(*args, **kargs)
	  File "/usr/share/vdsm/storage/task.py", line 333, in run
	    return self.cmd(*self.argslist, **self.argsdict)
	  File "/usr/share/vdsm/storage/securable.py", line 77, in wrapper
	    return method(self, *args, **kwargs)
	  File "/usr/share/vdsm/storage/sp.py", line 1890, in createVolume
	    initialSize=initialSize)
	  File "/usr/share/vdsm/storage/sd.py", line 633, in createVolume
	    initialSize=initialSize)
	  File "/usr/share/vdsm/storage/volume.py", line 902, in create
	    (srcVolUUID, volUUID, e))
	VolumeCannotGetParent: Cannot get parent volume: (u"Couldn't get parent
	78f22775-916c-4e72-8c5b-9917734b26da for volume
	e93b50ec-fbbe-43cd-811b-7bd383a63630: Cannot share volume: <snip>:
	 _getLeaseVolumePath() takes exactly 2 arguments (1 given)'",)

	Fix this by once again making vol_path an optional parameter.

	Continuous-Integration: Jenkins CI

2016-01-15  Francesco Romani  <fromani@redhat.com>

	tests: improve vmstats.disks coverage
	vmstats.disks() must be robust in presence of various missing
	diks attributes. This patch adds the missing tests to make sure
	all known misreportings are covered.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1281337
	Continuous-Integration: Jenkins CI

	tests: extend coverage for vmstats.disks()
	This patch extends the test coverage for vmstats.disks()

	- make existing test helpers clearer avoiding default arguments
	- make existing test clearer adding explicit data
	- add test for zero-interval, which sometimes happens during
	  migrations and it is already handled by the code.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1281337
	Continuous-Integration: Jenkins CI

2016-01-14  Maor Lipchuk  <mlipchuk@redhat.com>

	lun: Serial attr should not passed to libvirt for lun disks.
	Following the change which was introduced at
	libvirt-1.2.17-5 and qemu-kvm-rhev-2.3.0-18, libvirt now enforce
	that a scsi-block 'lun' device should not provide the 'serial' property.

	To comply with this change, this patch introduces a change
	that a VM should ignore 'serial' property for lun devices when
	passing the XML to libvirt.

	This patch was verified by running a VM with lun disk which
	had enabled SCSI Pass-Through and also plugging the same lun disk
	while the VM was running. The operation succeeded.

	Bug-Url: https://bugzilla.redhat.com/1291930
	Continuous-Integration: Jenkins CI

2016-01-14  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Remove staticmethod usage from guest agent
	This patch removes the usage and the need of the usage of the staticmethod
	decorator.
	Since there is no added value in using it and it is quite confusing, this
	will simplify the code and understanding of it.

	Continuous-Integration: Jenkins CI

	virt: Correct epoll unregistration usage in vmchannels
	Previously we have been unregistering fds from epoll but not in the correct
	way. Which has led to log messages which seemed to have no good explanation
	as of why they occur. That has been changed to 'fix' it by letting only epoll
	unregister those file descriptors themselves when they are closed.
	This however has been wrong - the correct procedure to use epoll is to
	unregister the file descriptor first and then close the socket.

	In the vmchannel case there are two scenarios where this applies:

	- On an error reported by epoll
	- When we want to unregister the channel from vmchannels

	This patch fixes those two scenarios.

	Backport-To: 3.5
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1226911
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>
	Continuous-Integration: Jenkins CI

2016-01-14  Edward Haas  <edwardh@redhat.com>

	net: Cleanup translateNetOptionsToNew
	translateNetOptionsToNew is no longer needed.
	(and is located in the wrong place anyway)

	Continuous-Integration: Jenkins CI

2016-01-13  Nir Soffer  <nsoffer@redhat.com>

	virt: Fix arch check after cpuarch was merged
	commit d7a85d3c2cec (virt: Don't create <bios> on non-x86 architectures)
	was somehow applied cleanly on master after caps.Architecture was
	removed, breaking the build and probably the actual code when trying to
	use serial console.

	This patch updates the code to use cpuarch instead of caps.Architecture.

	Continuous-Integration: Jenkins CI

2016-01-13  Francesco Romani  <fromani@redhat.com>

	vm: safer handling of conf in restore
	In the restore state (aka dehibernation) path, there
	are a few places left on which the code mutates
	Vm.conf without the protection of the confLock.
	There is no obvious reason to have those mutations
	unguarded, so this patch adds the confLock protection.

	Backport-To: 3.6
	Backport-To: 3.5
	Related-To: https://bugzilla.redhat.com/1296936
	Continuous-Integration: Jenkins CI

	virt: safer handling of migration parameters
	The Migration Source code path needs to store additional
	transient migration parameters in the Vm configuration state,
	to be both saved on recovery file and transmitted on the
	destination VM.
	Those parameters will be dropped once the migration is done.

	Up until now, the migration code mangled the Vm state from the outside.
	This was ugly and unsafe, because the configuration was mutated without
	any locking.

	Under high migration load, this can lead to RuntimeErrors, because
	the clients of Vm.conf (e.g. status(), getVMList()...) expect the
	lock being held and the access serialized.

	To fix those issues, we add a helper method into Vm class, to
	let the migration code temporarily store the data it needs in a safe
	and simple way.

	Backport-To: 3.6
	Backport-To: 3.5
	Bug-Url: https://bugzilla.redhat.com/1296936
	Continuous-Integration: Jenkins CI

	migration: use context manager for semaphore
	The migration source code path needs to take the
	ongoingMigrations semaphore, to throttle the outgoing
	migrations.

	The code did so using the pre-2.6 way, explicitly
	using acquire() and release().

	This patch switches the code to the context manager
	semantics, to make the code a bit nicer and to unlock
	further refactoring.

	Backport-To: 3.6
	Backport-To: 3.5
	Bug-Url: https://bugzilla.redhat.com/1296936
	Continuous-Integration: Jenkins CI

2016-01-13  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix loop device leak in mount tests
	We used to unmount loop devices without using force=True and
	freeloop=True. This may lead to loop device leak, failing the later
	tests trying to mount loop devices. We also did not wait for udev events
	when unmounting a loop device, which is asynchronous operation.

	Both issues were fixed long time ago (commit dbfdc90) in the mkimageTests.
	Apply the same fix for mount tests.

	Continuous-Integration: Jenkins CI

2016-01-13  Shahar Havivi  <shaharh@redhat.com>

	v2v: tests: refactor  v2vTests
	1. move _VM_SPECS to the module scope and rename to VM_SPECS
	2. set _VMS in setup and not as class variable to protect it from
	   altering but each test

	Continuous-Integration: Jenkins CI

2016-01-13  Milan Zamazal  <mzamazal@redhat.com>

	virt: Don't create <bios> on non-x86 architectures
	We introduced ovirt-vmconsole access to BIOS some time ago.  But that
	unfortunately breaks on PowerPC as there is no <bios> domain XML element
	there.  So we need to check whether we are on a supported architecture
	before inserting <bios> element.

	Continuous-Integration: Jenkins CI

2016-01-13  Martin Polednik  <mpolednik@redhat.com>

	caps: use cpuarch module
	With the cpuarch module, some of the code in caps can be rewritten to
	use cpuarch directly.

	Continuous-Integration: Jenkins CI

	caps/lib: move CPU architecture details to lib/cpuarch
	CPU architecture details include things such as
	* current CPU architecture,
	* the CPU architecture of VMs and
	* supported architectures.

	Having this information and functionality inside caps.py means that it
	cannot be used in hooks or where circular imports may be a problem. To
	solve this, we create new cpuarch module inside sitelib where we move
	and slightly clean-up the logic. This way, arch information is
	accessible to any VDSM code.

	Continuous-Integration: Jenkins CI

2016-01-12  Shahar Havivi  <shaharh@redhat.com>

	v2v: tests: rename vmid to UUID to match Libvirts domain property
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-01-12  Nir Soffer  <nsoffer@redhat.com>

	tests: Improve object filtering tests
	The tests were not checking handling of all types and handling of nested
	structures. Add also timing test to understand the cost of this
	filtering.

	Continuous-Integration: Jenkins CI

2016-01-12  Edward Haas  <edwardh@redhat.com>

	net tests: Wait for bond dev state up
	Several functional tests that involved bond devices, checked that
	changes do not affect the bond state.

	Tests that waited for an 'known' state, failed randomly, mainly when
	the device state was down and during the test it came up.

	The initial state for the bond state should be UP.
	(this patch alligns all tests to use state UP as the pre-requirement)

	Continuous-Integration: Jenkins CI

2016-01-12  Martin Polednik  <mpolednik@redhat.com>

	cpuinfo: use is_ppc predicate when parsing cpu_map.xml
	The CPU_MAP.xml uses base platform names (x86 and ppc) when locating
	CPU models even for platform extensions (x86_64 and ppc64le). This
	patch replaces the specific platform lookup by base platform lookup,
	resulting in no behavior changes but improving the platform handling
	consistence.

	Continuous-Integration: Jenkins CI

2016-01-12  Allon Mureinik  <amureini@redhat.com>

	storage_exception.py: Remove RHEVM comment
	Replaced the proprietary term RHEVM with the proper upstream
	terminology - oVirt Engine.

	Continuous-Integration: Jenkins CI

2016-01-11  Allon Mureinik  <amureini@redhat.com>

	spec: require libvirt to fix hotplugging
	EL's libvirt 1.2.17-9 contains a fix for an inconsistency created when
	repeatedly hot plugging and unplugging disks.
	This patch updates VDSM's spec file to require this version both on RHEL
	and CentOS.

	Related-To: https://bugzilla.redhat.com/1262399
	Bug-Url: https://bugzilla.redhat.com/1265958
	Continuous-Integration: Jenkins CI

2016-01-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using six.iteritems in utils to support python3
	Continuous-Integration: Jenkins CI

	Introduce host.py and commands.py to separate execCmd and AsyncProc from utils
	execCmd and AsyncProc require cpopen and StringIO which are not available
	in python3. utils.py should split to sub packages anyway, and this work
	not only provides the ability to import utils.py with python3, but also
	start the work of splitting utils.py to meaningful packages - host.py for
	host's related tools, and commands for command execution tools.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-01-11  Tal Nisan  <tnisan@redhat.com>

	Alignment scans will now run in direct mode
	Currently on RHEL 7 and Fedora 22 or later alignment scan via libguestfs
	does not work by going through libvirt and only works directly.  As a
	workaround this patch runs the alignment scan with an environment
	variable that tells libguestfs to run the scan directly and not through
	libvirt.

	While this solution works it should be reverted after the libvirt bug will
	be solved as it is a workaround, since we allow only VMs in down status to
	be scanned it does not have an affect but once we would like to allow scans
	on running VMs the fact that we bypassing libvirt will mark the VMs as
	tainted.

	Bug-Url: https://bugzilla.redhat.com/1151838
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>
	Continuous-Integration: Jenkins CI

2016-01-11  Edward Haas  <edwardh@redhat.com>

	net: Remove the defaultGateway api canonization
	Previous versions (<3.6) have allowed the management network to be set
	without defaultGateway=True from the API.  For the management network,
	VDSM has canonized defaultGateway to True if the flag was missing.

	From 3.6, defaultGateway is set explicitly by Engine and there is no
	longer a need to canonize the value.

	Continuous-Integration: Jenkins CI

2016-01-10  Shahar Havivi  <shaharh@redhat.com>

	v2v: tests: rename mock classes similar to libvirt original names
	Continuous-Integration: Jenkins CI

2016-01-10  Yeela Kaplan  <ykaplan@redhat.com>

	Remove __init__.py file from lib64 vdsm python directory
	During upgrade from vdsm-4.14 we restart supervdsmd service.
	sys.path is configured to load py modules from /usr/lib64 before
	 /usr/lib. Therefore super loads the vdsm lib module from
	old location (/usr/lib64/python2.7/site-packages) before it's removed.
	(instead of the new location /usr/lib/python2.7/site-packages -
	was introduced in https://gerrit.ovirt.org/#/c/33711)

	This patch removes the old vdsm/__init__.py* files in post scriptlet
	which prevents the wrong import.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1279167
	Continuous-Integration: Jenkins CI

2016-01-10  Edward Haas  <edwardh@redhat.com>

	net tests: Skip dump_bonding_name2numeric on EBUSY
	The test fails rarely when scanning the bond options, on EBUSY errno.
	It seems to be a bond module issue that is seen on CI.

	If an EBUSY error appears, the test is skipped and kernel version
	is reported.

	Continuous-Integration: Jenkins CI

	net: ifcfg uses chown to change the uid only
	chown() gid value should be set to -1 if there is no intention to change
	it. A value of 0 refers to the root group.

	Continuous-Integration: Jenkins CI

2016-01-10  Tal Nisan  <tnisan@redhat.com>

	Return correct scan alignment result through jsonrpc
	Since jsonrpc was introduced in oVirt 3.5 the scan alignment verb returned
	the default value in jsonrpc mode which is "true" regardless to the actual
	result, this was fixed in this patch

	Bug-Url: https://bugzilla.redhat.com/1294823
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-01-10  Edward Haas  <edwardh@redhat.com>

	net: Normalize management network defaultRoute
	The management network should always include defaultRoute=True.  With
	ovirt-node<=3.5, the management network is initally set from the tui and
	does not set defaultRoute.  defaultRoute is normalized internally to
	True without adding it to the persistent config.

	The fix introduces a normalization of the persistent config, such that
	the management network will be marked with defaultRoute=True even if
	defaultRoute is missing.

	This issue is relevant for upgrades from ovirt-node<=3.5.

	Bug-Url: https://bugzilla.redhat.com/1293562
	Continuous-Integration: Jenkins CI

	net: Enable VDSM to listen on IPv6 addresses
	VDSM should be able to listen on both IPv6 and IPv4
	addresses.
	Changes included in this patch:
	- Enable the ability to accept connections on IPv6 addresses.
	- Cover IPv6 connection handling on the unit tests.
	  Including SSL cerificates that cover IPv6.

	Note: When the configuration (management_ip) is set with'::',
	VDSM will listen on both IPv6 & IPv4 addresses.

	Continuous-Integration: Jenkins CI

2016-01-08  Adam Litke  <alitke@redhat.com>

	storage: Rename *VolumeMetadata to *VolumeManifest
	When refactoring the storage classes (StorageDomain, Image, Volume) we
	made the mistake of using 'Metadata' for the refactored volume classes
	whereas we used 'Manifest' for image and the storage domains.  This
	patch converts the *Volume classes to use Manifest as well.  The
	VolumeMetadata class was well tested by sdm_indirection_tests.py and
	after this patch the tests continue to pass.  Read on for more on the
	rational for this change.

	There are several reasons to make this change:

	1. All of the other classes use Manifest and *Volume classes were the
	   exception.  Code will be more readable with a common convention.

	2. Originally 'Manifest' was chosen for *StorageDomain and Image because
	   manifest means 'a list or invoice of goods' (such as you might
	   receive in a delivered package.  StorageDomains have a list of images
	   (also storage domain metadata and operations).  Images have a list of
	   volumes (also operations).  Volumes do not contain a list of other
	   objects (but they do have metadata, data, a lease, and operations).
	   This list of components still carries a valid association with the
	   concept of a manifest and therefore the name change is justified.

	3. Volumes have their own metadata.  We want to factor out volume
	   metadata manipulation into its own class.  What would the best name
	   for such a factored out class be?  Why... VolumeMetadata!

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-01-08  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Set cloexec flag on channel sockets
	To counter act potential leakage of open handles, this patch is setting the
	CLOEXEC flag on the sockets used for the guest agent channels.
	It is known that this is not totally race free however it will still improve
	the number of file handles leaked.

	Bug-Url: https://bugzilla.redhat.com/1226911
	Continuous-Integration: Jenkins CI

2016-01-08  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix typo elasped -> elapsed
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-01-07  Allon Mureinik  <amureini@redhat.com>

	build: Centos device-mapper-multipath requirement
	As the RHEL requirement for device-mapper-multipath, 0.4.9-84.el7, is
	available in Centos, there's no reason to continue maintaining the
	cumbersome distinction between it and Centos.

	Bug-Url: https://bugzilla.redhat.com/1273624
	Continuous-Integration: Jenkins CI

2016-01-07  Martin Polednik  <mpolednik@redhat.com>

	cpuinfo: add predicates for x86 and ppc platform detection
	Previously we used string (to check for x86_64) and tuple (for ppc64 and
	ppc64le). This patch adds two predicates to the Architecture class of
	caps module:

	* is_x86(arch)
	* is_ppc(arch)

	These classmethods can be used to determine in which class does given
	'arch' argument belong - allowing us to query architecture in
	consistent and unified way.

	Continuous-Integration: Jenkins CI

2016-01-07  Adam Litke  <alitke@redhat.com>

	storage constants: Move LEASE_FILEEXT
	Continuous-Integration: Jenkins CI

	sdm: add SDM.create_volume API stub
	Define the API for the SDM create_volume verb.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-01-06  Adam Litke  <alitke@redhat.com>

	fileVolumeManifest: Make lease and meta path getters public
	Continuous-Integration: Jenkins CI

2016-01-06  Dan Kenigsberg  <danken@redhat.com>

	testEnablePromisc: wait for promisc event
	We have seen cases where testEnablePromisc failed on CI. This could have
	been caused if the test is faster than the kernel, and tests the promisc
	flag before it was applied to the link.

	There might be many more similar races in our tests; this patch should
	serve only as a proof of concept.

	Continuous-Integration: Jenkins CI

2016-01-06  Nir Soffer  <nsoffer@redhat.com>

	guestagent: Simplify and modernize object filtering
	Simplify and modernize object filtering by using dict and list
	comprehensions.  This creates less garbage while building a filtered
	object, and give minor performance improvement (35%).

	Continuous-Integration: Jenkins CI

	guestagent: Speed up xml character filtering
	Use regular expression matching the invalid characters, simplifying the
	code and speeding up filtering (40X):

	    Before: 2.745 seconds
	    After:  0.067 seconds

	Also improve the documentation, explaining the logic, and mention the
	original bug from 2010, which is the reason we need this filtering.

	Continuous-Integration: Jenkins CI

	tests: Add filtering xml timing test
	Add @slowtest for timing xml char filtering.

	Continuous-Integration: Jenkins CI

	tests: Separate tests using permutations
	GuestAgent tests were using one test method for multiple tests, so
	failing of one test would fail other unrelated tests. Use permutations
	to have one test method per test.

	Also group filtering tests under TestFiltering test case class.

	Here is an example run of the new test class:

	guestagentTests.TestFiltering
	    test_filter_object_invalid                                  OK
	    test_filter_object_valid                                    OK
	    test_filter_xml_chars_replace_invalid(u'\ud800')            OK
	    test_filter_xml_chars_replace_invalid(u'\udc79')            OK
	    test_filter_xml_chars_replace_invalid(u'\ufffe')            OK
	    test_filter_xml_chars_replace_invalid(u'\uffff')            OK
	    test_filter_xml_chars_replace_invalid(u'\x00')              OK
	    test_filter_xml_chars_replace_restricted                    OK
	    test_filter_xml_chars_valid(u'')                            OK
	    test_filter_xml_chars_valid(u'\u2122')                      OK
	    test_filter_xml_chars_valid(u'ascii')                       OK

2016-01-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	Move dsaversion under vdsm-python package
	Continuous-Integration: Jenkins CI

2016-01-06  Shahar Havivi  <shaharh@redhat.com>

	v2v: extract specific classes for libvirt and ova
	We are handling a lot of inputs for ImportVM (libvirt VM, ova) and
	adding Xen and Kvm which make ImportVM bloated with a lot of conditions.

	Introduction a V2VCommand that each implementation will create its own
	command and will have execution context.

	Continuous-Integration: Jenkins CI

2016-01-05  Adam Litke  <alitke@redhat.com>

	storagefakelib: Add FakeResourceManager
	A fake ResourceManager is needed for testing the sdm verbs.  The fake
	object just records the calls but otherwise does nothing.

	Continuous-Integration: Jenkins CI

	fileSD: Make _getDeletedImagePath public
	_getDeletedImagePath is useful to the upcoming FileVolumeArtifacts
	class.  Make it public so it can be used outside of
	FileStorageDomainManifest.

	Continuous-Integration: Jenkins CI

	storage: Move VOLUME_PERMISSIONS to storage constants
	VOLUME_PERMISSIONS will be needed by the volume_artifacts module.  To
	avoid circular dependencies move this constant to the constants module
	where both modules can use it.

	Continuous-Integration: Jenkins CI

2016-01-05  Nir Soffer  <nsoffer@redhat.com>

	jobs: Add Job.__repr__ for easier debugging
	Every object should have __repr__ to make it easy to have more detailed
	logs, or for debugging Interactively using the manhole debugging shell.

	Example output:

	    <ProgressingJob id=9cf0ae08-d0e3-45ba-886c-3a28c00e02b3
	    status=running progress=32% at 0x140170561474000>

	Continuous-Integration: Jenkins CI

	jobs: Replace validation method with a property
	Replace Job.validate_not_active() with an Job.active property. Change
	the single call site to check the property and raise.

	Continuous-Integration: Jenkins CI

	jobs: Take lock once when deleting a job
	Previous we use get() for checking if a job exists before deleting it,
	and then check again in _delete. Move all the logic to _delete, so we
	take the lock once and during this flow.

	With this change, test coverage for this module is 100%.

	Continuous-Integration: Jenkins CI

2016-01-05  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move getImageVolumes
	Continuous-Integration: Jenkins CI

	VolumeMetadata: volume share utilities
	Continuous-Integration: Jenkins CI

	VolumeMetadata: move refreshVolume
	Continuous-Integration: Jenkins CI

	VolumeMetadata: move newVolumeLease
	Continuous-Integration: Jenkins CI

2016-01-05  Dan Kenigsberg  <danken@redhat.com>

	netinfo: survive even when a expected iface is not connected to bridge
	Continuous-Integration: Jenkins CI

2016-01-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Require safelease 1.0-6 for fedora 23 due to wrong build
	The spec of safelease 1.0-5 for fedora 23 doesn't include require for
	packages that are mandatory for vdsm.
	The build was initiated wrongly, therefore we submitted safelease 1.0-6 which
	keep the same spec as in the rest of 1.0-5 builds.
	This is only relevant for fedora 23 build.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1287862
	Continuous-Integration: Jenkins CI

2016-01-05  Fred Rolland  <frolland@redhat.com>

	build: update libvirt dependency for fedora
	Require a libvirt version that fixes the problem of reporting
	physical=0 for COW2 volumes on block storage on Fedora. The given
	version 1.1.2.18.1 exists in Fedora 23 and fixes the issue.

	See Fedora BZ: https://bugzilla.redhat.com/1253754

	Though the fix is only in libvirt-daemon, the libvirt-python
	required version is also aligned to it to keep consistency.

	Bug-Url: https://bugzilla.redhat.com/1253756
	Continuous-Integration: Jenkins CI

2016-01-05  Marcin Mirecki  <mmirecki@redhat.com>

	vm: restoring correct vm nic device after HotunplugTimeout
	When a nic is hotunpluged, it is first removed from the vdsm
	devices, and then from libvirt. When the libvirt operation
	fails, we need to revert the state of the nic in the vdsm
	devices.

	Bug-Url: https://bugzilla.redhat.com/1134256
	Continuous-Integration: Jenkins CI

2016-01-04  Nir Soffer  <nsoffer@redhat.com>

	rwlock_test: Make pep8 happy again
	Fixing typo (shold -> should) increased the line length to 80
	characters, making pep8 grumpy. Rewrap to make it happy again.

	Continuous-Integration: Jenkins CI

	tests: Set status when creating a job
	Instead of setting job private instance variables, set the status when
	creating the job.

	Continuous-Integration: Jenkins CI

	tests: Test default Job.progress implementation
	Test jobs.Job.progress, and add ProgressingJob class for testing job
	that report a progress.

	Continuous-Integration: Jenkins CI

2016-01-04  Allon Mureinik  <amureini@redhat.com>

	verify.py: Fix typo "attribets" -> "attributes"
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	sslTests.py: Fix typos
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	rwlock_test.py: Fix typo "shold" -> "should"
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	momTests.py: Fix typo "paramters" -> "parameters"
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	utils.py: Fix typo "placeholer" -> "placeholder"
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	dump_volume_chains.py: Spelling in comment
	Continuous-Integration: Jenkins CI

	sigutils: Fix typo "the the" -> "the"
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2016-01-04  Amit Aviram  <aaviram@redhat.com>

	JSONRPC: make Image.prepare to return info.
	Currently the API which exposes Image.prepare is different between
	XMLRPC and JSONRPC; When calling this verb via XMLRPC, info is
	returned while nothing is returned when calling it via JSONRPC.

	After preparing an image, the caller expects to get some valuable
	information regarding it.

	This patch makes "Image.prepare" JSONRPC verb call to return
	relevant info for current usages, which are also exposed when using
	XMLRPC.

	Continuous-Integration: Jenkins CI

2016-01-04  Adam Litke  <alitke@redhat.com>

	constants: Define temporary volume indicators
	This patch defines the file extension that identifies temporary
	file-based volumes and the LV tag that identifies temporary block-based
	volumes.  See below for details about why this will be needed.

	Creating a volume requires multiple steps and many changes to storage
	and the operation can fail at any point.  To make recovery from failure
	at any point possible, we create volumes as temporary entities (called
	VolumeArtifacts).  Once created, the VolumeArtifacts can be committed as
	a new Volume with a single atomic operation.  For file-based volumes we
	rename a file.  For block-based volumes we remove an LV tag.  If volume
	creation fails at any point in the process, easily identifiable garbage
	is left on storage which can be cleaned up automatically.

	Continuous-Integration: Jenkins CI

2016-01-04  Allon Mureinik  <amureini@redhat.com>

	betterAsyncore.py: Fix typo "enought"->"enough"
	Continuous-Integration: Jenkins CI

	zombiereaper: Fix typo "happend" -> "happened"
	Continuous-Integration: Jenkins CI

	compat.py: Fixed typo "libary"->"library"
	Continuous-Integration: Jenkins CI

	schema: Fix Typos
	Continuous-Integration: Jenkins CI

	nfs-check.py: apostrophe
	Fixed conjunctions in the comments and logs to use an apostrophe (')
	instead of a forwards quote (`) as per proper spelling rules.

	Continuous-Integration: Jenkins CI

	vdsClient: Fix typo parmeter->parameter
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2016-01-04  Dan Kenigsberg  <danken@redhat.com>

	net: mtu should be reported as a string through caps
	Previous change (commit 59ede0b) migrated all mtu values to
	integers internally, including at the API entry point.
	One point has been missed though, the caps reoport to the
	engine: engine (3.6) expects a string mtu, however vdsm reports
	an integer.

	This change reports the mtu to engine as a string for
	compatibility with engine ver < 3.7.

	Note: Several functional tests had to be cleaned up to support
	this change:
	- mtu assertion.
	- running vs kernel config validation should use netinfo (and
	  not caps).

	Continuous-Integration: Jenkins CI

2016-01-04  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: keep README on wiki
	Keeping OVS README on wiki would give the hook more visibility and
	it will be easier to edit it.

	Continuous-Integration: Jenkins CI

2016-01-03  Nir Soffer  <nsoffer@redhat.com>

	jobs: Remove unused method
	Nobody is calling Job.validate_done(), and I don't want to add test for
	code that we don't need.

	Continuous-Integration: Jenkins CI

2016-01-02  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpcvdscli: improve functional network tests duration time
	The tests were creating new jsonrpcvdscli#_Server every time before test
	invocation. In __init__ method we perform schema parsing which is time
	consuming operation. We improved duration time of the test by creating
	the objects only once instead of before every test method.


	Continuous-Integration: Jenkins CI

2016-01-01  Daniel Erez  <derez@redhat.com>

	vm: snapshot - adding appropriate logs
	Following https://gerrit.ovirt.org/#/c/49535,
	adding some useful logs to snapshot flow.

	Continuous-Integration: Jenkins CI

2015-12-31  Nir Soffer  <nsoffer@redhat.com>

	jobs: Return job id in Host.getJobs response
	The schema promises this value, but we did not return it.

	Continuous-Integration: Jenkins CI

	jobs: Fix job error format
	The schema claims that job's error (ErrorInfo) is a map with "code" and
	"message" keys, but we returned an error response dict used for xmlrpc
	response.  Add GeneralException.info() method, and use it to return the
	promised value.

	Continuous-Integration: Jenkins CI

2015-12-31  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: replace deprecated define to global macro
	https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define

	Continuous-Integration: Jenkins CI

2015-12-29  Edward Haas  <edwardh@redhat.com>

	net: netconf owner change should ignore gid
	When changing ownership of the directories/files the group id
	does not need to change.
	It affects tests which run as non-root (they fail when attempting
	to change the gid to root (0).

	Continuous-Integration: Jenkins CI

2015-12-29  Petr Horáček  <phoracek@redhat.com>

	network: tests: mirror drop inital ip tests
	Rename test_remove_initial_network_nic_ip_config to
	test_drop_initial_network_nic_ip_config, to be uniform with
	test_drop_initial_network_bond_ip_config.

	Use self.assertNotIn(IPv6_ADDRESS_AND_CIDR, ipv6addrs)
	instead of self.assertEqual([], ipv6addrs), it will prevent
	possible errors caused by IPv6 link-local address assigned
	by default, also it is what we assign in
	test_drop_initial_network_nic_ip_config.

	Continuous-Integration: Jenkins CI

	net: init: wait for ipv4 with monitoring
	Now we are polling devices until all required IPv4 addresses
	are ready.

	With this patch we use monitoring in external Python script
	instead of polling.

	Continuous-Integration: Jenkins CI

2015-12-29  Shahar Havivi  <shaharh@redhat.com>

	v2v: refactor get_external_vms
	break to smaller methods

	Continuous-Integration: Jenkins CI

	v2v: add test testSuccessfulImportOVA
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	v2v: refactor testSuccessfulImport test
	- test convert_external_vm api instead of internal ImportVM class
	- rename to testSuccessfullVMWareImport
	- make vminfo as a test member for usage in future ova test

	Continuous-Integration: Jenkins CI

2015-12-29  Dan Kenigsberg  <danken@redhat.com>

	netconf: own /var/run/vdsm/netconf as well
	commit 1fa3b3 made /var/run/vdsm/netconf/nets owned by vdsm, but
	sometimes we have /var/run/vdsm/netconf/ still owned by root.

	Bug-Url: https://bugzilla.redhat.com/1293617
	Continuous-Integration: Jenkins CI

2015-12-28  Liron Aravot  <laravot@redhat.com>

	storage: perform image deletion in task
	deleteImage() always schedules a task after it's synchronous part, the
	task is currently used to wipe the image (if requested) and in case of
	deletion without wipe it performs nothing.

	The synchronous part of deleteImage() renames the image to clarify that
	it's about to be deleted by adding a prefix and then deletes the image.
	On storage under heavy load any of those operations can be slow, as the
	engine has a default timeout of 180s for vdsm operation on some cases we
	might fail on timeout. In order to lower the chance to get that timeout
	this patch moves the image deletion to occur always on the task (same as
	happens today when wiping the image).

	The assumption that the engine relies on currently is that when a call to
	deleteImage() returns the image is no longer available and that it's id
	is "free" to use (whether it was deleted on the synchronous part or a
	wipe is ongoing), as we still rename the image in the synchronous part
	this assumption is still valid and the engine shouldn't be affected by
	it.

	This patch change deleteImage() to perform only the image rename, while
	purgeImage() will be used to free the space taken by the image.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1270220
	Continuous-Integration: Jenkins CI

2015-12-27  Edward Haas  <edwardh@redhat.com>

	net: Update mtu under the bridge only when needed
	Updating the mtu of an existing bridge and its ports,
	only when the mtu is different from the current value.

	Continuous-Integration: Jenkins CI

2015-12-24  Nir Soffer  <nsoffer@redhat.com>

	build: Add dependencies for generated .py files
	In the past we checked .py.in files with pep8 and pyflakes. Recently we
	removed this wrong check, and we are checking only .py files.

	This change required running "make; make check", to have .py files
	generated before running make check.

	This patch adds dependencies so "make check" will generated the files it
	wants to check.

	Searching for .py.in file is not needed now and was removed.

	Continuous-Integration: Jenkins CI

2015-12-24  Edward Haas  <edwardh@redhat.com>

	net api: Normalize 'remove' for networks to boolean
	Normalize 'remove' value to a boolean at the api entry point.
	The incosistent value type caused validation failures of the
	api, especially when the canonization step has been introduced.

	Continuous-Integration: Jenkins CI

	net: set netconf/* owner to 'vdsm'
	On ovirt-node netconf/* has umask of 660 with root
	as owner. Accessing the folders and files by vdsm
	is denied.
	Resolved by changing the owner of the files and
	folders to 'vdsm'

	Bug-Url: https://bugzilla.redhat.com/1293617
	Continuous-Integration: Jenkins CI

2015-12-24  Idan Shaby  <ishaby@redhat.com>

	fileSD: use fileVolume constants for file extensions
	This patch replaces the use of file extension strings in deleteImage to
	their corresponding existing constants in fileVolume.

	Continuous-Integration: Jenkins CI

	fileSD: improve error handling in deleteImage
	In FileStorageDomainManifest.deleteImage, we used to log that the volume
	could not be removed even if it was removed but the meta/lease file
	could not be removed afterwards.

	This patch logs more informative errors about the specific file that
	could not be removed. If the removal fails because the file doesn't
	exist, we log a warning. Otherwise, we log an error message that the
	file can't be removed.

	Also, if one of the files couldn't be removed, we didn't try to remove
	the others.  Now we handle each removal separately, so that a failure in
	the removal of one file doesn't affect the removal of the others.

	Bug-Url: https://bugzilla.redhat.com/1292092
	Continuous-Integration: Jenkins CI

2015-12-23  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: show vlan in caps ports
	Until now, when we set up a tagged network we reported only
	directly attached nics and bonds. To be compatible with VDSM
	we have to report attached vlan (in its iface.id format) too.

	Continuous-Integration: Jenkins CI

	network: caps vlan vlanid property has to be int
	Engine expects caps vlan vlanid property to be integer.

	Assert this condition in networkTests and fix ovs hook.

	Continuous-Integration: Jenkins CI

	net: tests: test network's iface
	Test if we report proper network's iface in running config.

	Continuous-Integration: Jenkins CI

2015-12-23  Nir Soffer  <nsoffer@redhat.com>

	python3: Port password module to python 3
	Python 3 removed the iteritems() method from dict object. Use
	six.iteritems() instead.

	Continuous-Integration: Jenkins CI

2015-12-23  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: set OVS devices UP
	Set all attached and created devices explicitly UP.

	We need to do a minor change in tests: when we set OVS bond up,
	it turns into UNKNOWN state, not UP state. Because of that we have
	to return fake True from networkTests._waitForKnownOperstate.

	Continuous-Integration: Jenkins CI

2015-12-22  Ido Barkan  <ibarkan@redhat.com>

	net: MTU should be an integer all over VDSM.
	It should be serialized as such and be converted to a string only
	when written to files, and immediately upon the start of setupNetworks
	API call.

	Continuous-Integration: Jenkins CI

2015-12-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove koji build flag and use specific one for vdsm-vhostmd-hook
	We build vhostmd package only for fedora builds in koji. This patch
	removed the current flag enable-koji which has no meaning and adds
	enable-vhostmd-hook instead - in addition adds koji_build.sh script to ease
	the build process.

	Continuous-Integration: Jenkins CI

2015-12-21  Dan Kenigsberg  <danken@redhat.com>

	p3test: add few modules that currently pass on Python 3
	Continuous-Integration: Jenkins CI

2015-12-21  Nir Soffer  <nsoffer@redhat.com>

	startup: Change system default encoding to utf8
	In Python 2, the system default encoding is 'ascii'. This causes mixing
	of unicode and non-ascii strings (e.g. utf8 encoded) to fail with
	UnicodeDecodeError or UnicodeEncodeError. The trigger for this failures
	is starting using the built-in json library, that returns all values as
	unicode strings, even if the value is ascii.

	For example:

	>>> u'ascii' + '\xd7\x90'
	Traceback (most recent call last):
	  File "<stdin>", line 1, in <module>
	UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0:
	ordinal not in range(128)

	Python tries to decode the second value implicitly, and fails since this
	is a utf8 encoded string.

	To avoid such issues, the entire application must be changed to use only
	strings or only unicode internally, and never mix these types.  In the
	distant future, when we run on Python 3, this will be true. For now, the
	only way to prevent these issues systematically is to change the system
	default encoding to 'utf8'.

	Changing the default encoding is done with sys.setdefaultencoding(), but
	this function exists only during startup, and can be called only from
	sitecustomize module.

	We keep now sitecustomize.py module, and change PYTHONPATH so it will be
	loaded on startup.

	This change is not needed in Python 3 since the default encoding is
	already utf8, and Python does not do any implicit decoding or encoding
	when mixing 'str' and 'bytes' types.

	Bug-Url: https://bugzilla.redhat.com/1281940
	Continuous-Integration: Jenkins CI

2015-12-21  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: ensure LV size is multiple of VG's PE value
	 Alignment value for JBOD is changed to 256 KiB from 0
	in https://gerrit.ovirt.org/#/c/47959 and alignment value is
	used as PE value in VG creation. It resulted in following
	error for some JBOD disks.

	"DeviceError: ('Adding new lv is too large to fit in free space',
	 u'vg-brick2-pool-brick2'"

	Size of LV should be multiple of PE value. But this calculation
	was done only for RAID volume not for JBOD and that was the casue for
	above error.

	With this patch, lv size will be adjusted to the multiples of PE
	always regardless of whether its RAID or JBOD.

	Bug-Url: https://bugzilla.redhat.com/1270792
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-21  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: use a class instead of NamedTuple for IPConfig
	NamedTuples are evil, making code less readable. If we use class
	instead we not only transform it into a more readable code, but also
	store IPConfig values and handler inside one object (until now it
	was splitted into a named tuple and private function
	_gather_ip_config).

	Continuous-Integration: Jenkins CI

	hooks: ovs: rename _set/drop/remove_ip_config functions
	Make difference between _drop_ip_config, _remove_ip_config and
	_set_ip_config more explicit by renaming and adding extra comments.

	Continuous-Integration: Jenkins CI

	hooks: ovs: use network lib instead of hardcoded path hack
	vdsm.network has been changed into a separate library, now we
	can drop hardcoded path hack.

	Continuous-Integration: Jenkins CI

2015-12-21  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: fix size conversion issues in brick create
	 There is change in blivet API device.size.convertTo(spec).
	spec was a string parameter in older versions of blivet but its changed
	to constants in newer versions. This patch address this issue
	in a generic way so that it can run on all releases.

	Bug-Url: https://bugzilla.redhat.com/1270792
	Continuous-Integration: Jenkins CI

2015-12-21  Edward Haas  <edwardh@redhat.com>

	net: Compare kernel vs running bond config opt vals
	Comparing between the bond running config and the
	bond kernel config should consider that some values
	may be inputted as name or numeric.
	A dictionary is kept to translate between the name
	and its numeric value.

	The running config bonding option values are normalized
	to their numeric values and compared to the kernel
	config which represents the values as numeric.

	Continuous-Integration: Jenkins CI

2015-12-21  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster add mount options for gluster brick.
	 Mount options "inode64,noatime" should be used to
	mount the gluster brick to improve the performance.

	Bug-Url: https://bugzilla.redhat.com/1270792
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-21  Edward Haas  <edwardh@redhat.com>

	net: Mapping bonding option value names to numerics
	Several bonding options have values that may be inputted
	either by name or by their numeric equivalent.
	When read, for comparing the actual settings with the
	requested configuration, only one format should be used.

	This change creates a map, outputted to a JSON file.
	[bonding-name2numeric.json]

	Continuous-Integration: Jenkins CI

2015-12-21  Timothy Asir Jeyasingh  <asirtim@yahoo.com>

	gluster: fix alignment issue for brick creation on JBOD
	  Chunk size and alignment value should be 256KB for
	 JBOD use case. So assigining these values incase of
	JBOD.

	 Note: blivet doesn't support alignment values in PV,VG,
	Thinpool creation. So we were using blivet API only when i
	we don't have any alignment and LVM commands directly when
	we have alignment values. Now, with this patch we will
	use lvm commands always as we have alignment values in all
	the cases and Blivet API usage can be removed completely
	in PV, Thin pool, VG creation.

	Bug-Url: https://bugzilla.redhat.com/1270792
	Continuous-Integration: Jenkins CI

2015-12-21  Ramesh Nachimuthu  <rnachimu@redhat.com>

	gluster: create bricks without MBR partitions
	 During gluster brick creation, PVs should be
	created directly on the disks instead of MBR
	partitions to align the pvs correctly as per given
	RAID parameter. This patch will remove the
	_makePartition function and will not create
	parition as part of gluster brick creation.

	Bug-Url: https://bugzilla.redhat.com/1270792
	Continuous-Integration: Jenkins CI

2015-12-21  Ala Hino  <ahino@redhat.com>

	gluster: Handle missing glusterfs-cli package
	In 3.6 we introduced a soft dependency to glusterfs-cli. This was
	required in order to get gluster volume info needed for to purposes:
	1. get gluster backup servers in order to automatically mount gluster
	   back servers
	2. get replica related to verify that it is supported
	However, during upgrade, if glusterfs-cli is missing, mount failed. In
	this case, we'd like to add a warning message clearly indicating about
	the missing glustefs-cli package, and ask the admin to install it in
	order to enable automatica mount of gluster backup servers.

	Bug-Url: https://bugzilla.redhat.com/1290997
	Continuous-Integration: Jenkins CI

2015-12-20  Sagi Shnaidman  <sshnaidm@redhat.com>

	Always propagate bonding mode to engine
	Without this patch the bond mode is not propagated if it's
	not equal to 0 (default) although engine expect it to be
	always propagated

	Bug-Url: https://bugzilla.redhat.com/1276445
	Continuous-Integration: Jenkins CI

2015-12-20  Daniel Erez  <derez@redhat.com>

	spec: Require newer qemu version for el7
	Bumping qemu version to 2.3.0-31.el7_2.4 in order to avoid
	a potential assertion error after lvextend caused by a memory
	corruption in the block sub-system.

	For more details:
	* https://bugzilla.redhat.com/show_bug.cgi?id=1277922
	* http://marc.info/?l=qemu-devel&m=144740716414450&w=2

	Bug-Url: https://bugzilla.redhat.com/1279052
	Continuous-Integration: Jenkins CI

2015-12-18  Nir Soffer  <nsoffer@redhat.com>

	executor: Streamline __repr__
	Now that we are using self._task, we can make__repr__ in a little
	bit nicer using conditional expression.

	Continuous-Integration: Jenkins CI

	executor: Fix the task-callable mismtach
	Executor is executing queue tasks, but the public api is dealing with
	callable and timeout. These leak into the executor internals, and cause
	confusion when we log the executor state.

	Now we pack the callable and the timeout in a Task namedtuple, fixing
	the mismatch, and providing more information when logging the task in
	Worker.__repr__.

	    Task(callable=<function func at 0x7fd84f3ec500>, timeout=7)

	Continuous-Integration: Jenkins CI

2015-12-18  Adam Litke  <alitke@redhat.com>

	storage: add getHostId to DomainMonitor
	Some SDM verbs need to acquire the domainLock during their job.  In
	order to do this they must be passed the domain's hostId property.  An
	easy way to expose this is to add a getHostId method to the
	DomainMonitor.

	Another method (not chosen) is for IRS to access the host id via the
	StorageDomainManifest.getPools method:

	    dom_manifest.getPools()[0].id

	The main reason for using the domainMonitor is to avoid adding any new
	users of the StoragePool class.  Since the domainMonitor acquires the
	hostID via SANLock, it seems qualified to communicate that hostID to its
	owner.

	Continuous-Integration: Jenkins CI

2015-12-18  Dan Kenigsberg  <danken@redhat.com>

	tests: mark test_mkFloppyFs as broken
	test_mkFloppyFs fails quite often with

	    ERROR: Tests mkimage.mkFloppyFs creating an image and checking its content.
	    ----------------------------------------------------------------------
	    Traceback (most recent call last):
	      File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/tests/testlib.py", line 73, in wrapper
	        return f(self, *args)
	      File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/tests/testValidation.py", line 97, in wrapper
	        return f(*args, **kwargs)
	      File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/tests/mkimageTests.py", line 172, in test_mkFloppyFs
	        m.mount(mntOpts='loop')
	      File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/vdsm/storage/mount.py", line 225, in mount
	        return self._runcmd(cmd, timeout)
	      File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/vdsm/storage/mount.py", line 241, in _runcmd
	        raise MountError(rc, ";".join((out, err)))
	    MountError: (32, ';mount: /tmp/vdsm-mkimage-testswqsKjg/images/vmId_floppy.0478bd99cc3b39a408d863d4babd70bd.img: failed to setup loop device: No such file or directory\n')

	I do not understand how the image disappear, but it does.

	Continuous-Integration: Jenkins CI

2015-12-17  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: move newMetadata
	Continuous-Integration: Jenkins CI

	VolumeMetadata: move validateDelete
	Continuous-Integration: Jenkins CI

2015-12-17  Nir Soffer  <nsoffer@redhat.com>

	fileSD: Do not try to remove non-existent lease file
	The volume.lease file exists only if a domain has volume leases. Avoid
	removing the non-existent lease file and the bogus exception in the log
	when the operation "fails".

	Bug-Url: https://bugzilla.redhat.com/1291207
	Continuous-Integration: Jenkins CI

2015-12-17  Adam Litke  <alitke@redhat.com>

	storage: Rename storageConstants.py to constants.py
	The SDM work is beginning an effort to reorganize storage constants.
	Currently constants are peppered throughout the various storage modules.
	Getting access to these constants introduces complex module
	interdependencies which can lead to circular import dependencies.

	In this first step, rename storageConstants.py to constants.py and make
	necessary adjustments to the code which currently imports this module.
	The new name is shorter and does not have the redundant 'storage' as
	part of its name.  Future patches will move constants into this module.

	To prevent clashes with vdsm.constants, we always import storage
	constants like this:

	    from storage.constants import FOO_BAR

	Continuous-Integration: Jenkins CI

2015-12-17  Ido Barkan  <ibarkan@redhat.com>

	net: support hot(un)plugNic for SRIOV network devices.
	The missing behavior was to automatically attach/detach the
	moving devices to/from the host.
	For this feature to be supported, a corresponding engine side patch
	is needed: I9bdf0d4cf9713691246015cf0297364a0dc40e95

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-12-16  Adam Litke  <alitke@redhat.com>

	Bridge: Allow _ in function names
	Continuous-Integration: Jenkins CI

2015-12-16  Francesco Romani  <fromani@redhat.com>

	lib: executor: report worker status in __repr__
	To make the troubleshooting of stuck workers
	easier, we extend Worker.__repr__.
	The new method reports now the task being performed,
	or 'waiting' if the worker is idle; furthermore,
	stuck workers are clearly marked as such, reporting
	'discarded' next to the task.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-12-16  Edward Haas  <edwardh@redhat.com>

	net: Correctly apply MTU values on networks
	Two issues have been resolved by this change:

	- New networks with no MTU specification are being
	set by default with their connected device (bond,
	vlan, nic) mtu (which does not have to be 1500).
	Fixed by detecting when no MTU is specified in the
	configuration, and adding the default (1500)
	explicitly.
	The assumption of a single default mtu when one is
	not specified in the setup is wrong, causing in
	some cases an unnecessary restoration of networks
	during network restoration.
	- Test fix: The NIC/s mtu should be set to the
	maximum mtu of the remaining networks.

	Continuous-Integration: Jenkins CI

2015-12-16  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: drop initial bonds' slaves IP config
	Ifcfg configurator's behavior of keeping network nic's IP and dropping
	bonding nics' IP was considered as a bug and
	test_keep_initial_bond_slaves_ip_config was renamed to
	test_drop_initial_bond_slaves_ip_config.

	Because of that, we have to remove IP configuration of nics
	attached to Vdsm controlled OVS bonds.

	Continuous-Integration: Jenkins CI

2015-12-16  Milan Zamazal  <mzamazal@redhat.com>

	virt: tests: More testVideoXML tests
	As suggested in
	https://gerrit.ovirt.org/#/c/50091/3/tests/deviceTests.py@296, we should
	try various combinations of presence and non-presence of video device
	attributes in the related test.

	Continuous-Integration: Jenkins CI

2015-12-16  Meni Yakove  <myakove@redhat.com>

	netinfo:Report host DNSs in getVdsCaps
	Continuous-Integration: Jenkins CI

2015-12-15  Milan Zamazal  <mzamazal@redhat.com>

	virt: vm: Replace update time migration TODO
	As discussed in https://gerrit.ovirt.org/49212, we are not going to
	update time on the guest after live migration.  So we replace the
	corresponding TODO with an explanation comment.

	Continuous-Integration: Jenkins CI

2015-12-15  Adam Litke  <alitke@redhat.com>

	API: Add api for getting host jobs info
	Host.getJobs provides information about host jobs.  We support filtering
	by job_type, to get all jobs of certain type, or by job_ids, to get
	information for specific jobs.

	Continuous-Integration: Jenkins CI

	jobs: Only report progress if set
	Not all Jobs have deterministic progress and some jobs will complete so
	quickly that progress updates are not practical.  If progress is not
	available do not report it.  Consumers of the Job info could choose to
	render a non-deterministic progress indication (barber pole, or spinning
	indicator) instead of a regular progress bar.

	We expect all jobs to start without any progress to report since they
	may be pending (waiting for a worker thread) or initializing (taking
	locks).  Jobs that can provide progress information will start to report
	later.  Jobs that do not support progress need not implement anything as
	the default behavior of Job is to never report progress.

	Continuous-Integration: Jenkins CI

	jobs: Add error property
	When a Job encounters an error, there should be a standardized way for
	that error to be stored so that code working with Job objects has a
	standard way to propagate the error.

	Add an 'error' property to the job class which is None by default but
	can contain an instance of utils.GeneralException or one of its
	decendants.  If error is set, the dictionary returned by the call to
	info() will contain an 'error' key.  The value of this key is a status
	code (containing a standard vdsm code and message).

	Continuous-Integration: Jenkins CI

2015-12-15  Nir Soffer  <nsoffer@redhat.com>

	jobs: Rename the FAILED constant to "failed"
	For consistency with other status values, as describe in the
	HostJobStatus schema.

	Continuous-Integration: Jenkins CI

	jobs: Add the PENDING state
	Storage jobs will be executed in a thread pool, so job starts now in
	"pending" status by default. Job should move to "running" state when it
	is actually running.

	Continuous-Integration: Jenkins CI

2015-12-15  Adam Litke  <alitke@redhat.com>

	schema: introduce HostJobInfo type
	Define the HostJobInfo type, representing a long-running operation on a
	host. We support multiple job types (v2v, storage, etc.) and all job
	types will be reported via the same Host.getJobs API call. There will
	also be a standard interface for aborting and/or deleting them.

	This patch contain only the schema changes, to make it easy to see the
	big picture. The next patches adapt the existing (undocumented) jobs
	module to match the new schema.

	Continuous-Integration: Jenkins CI

2015-12-15  Nir Soffer  <nsoffer@redhat.com>

	jobs: Keep same order of constants for consistency
	Reorder the constants according to job normal lifecyle, and use the same
	order in the module.

	jobs: Remove duplication in STATUS constants
	We were duplicating the names and the values of the constants. Move the
	description of the constants to the same line.

	Continuous-Integration: Jenkins CI

2015-12-14  Shahar Havivi  <shaharh@redhat.com>

	v2v: Add tests for get_ova_info
	Continuous-Integration: Jenkins CI

2015-12-14  Adam Litke  <alitke@redhat.com>

	jobs: By default jobs do not support abort
	Continuous-Integration: Jenkins CI

	VolumeMetadata: Move getInfo and getVolumeParams
	Continuous-Integration: Jenkins CI

	VolumeMetadata: move getVolumeSize and getVolumeTrueSize
	Continuous-Integration: Jenkins CI

2015-12-14  Nir Soffer  <nsoffer@redhat.com>

	image: Make progress report interval configurable
	Previously we logged a progress report every 60 seconds during qemu-img
	operations. This seems too long, in particular when watching the logs
	during testing. Decrease the interval to 30 seconds, and make it
	configurable (irs:progress_interval).

	Here is an example, using 10 seconds progress interval:

	    2015-12-14 00:15:39,042 waiting for qemu-img operation to complete
	    2015-12-14 00:15:49,045 qemu-img operation progress: 9.11%
	    2015-12-14 00:15:59,041 qemu-img operation progress: 20.25%
	    2015-12-14 00:16:09,042 qemu-img operation progress: 29.36%
	    2015-12-14 00:16:19,043 qemu-img operation progress: 39.48%
	    2015-12-14 00:16:29,043 qemu-img operation progress: 50.62%
	    2015-12-14 00:16:39,039 qemu-img operation progress: 60.74%
	    2015-12-14 00:16:49,038 qemu-img operation progress: 69.85%
	    2015-12-14 00:16:59,042 qemu-img operation progress: 79.97%
	    2015-12-14 00:17:09,044 qemu-img operation progress: 91.11%
	    2015-12-14 00:17:17,828 qemu-img operation progress: 100.0%
	    2015-12-14 00:17:17,829 qemu-img operation has completed

	Continuous-Integration: Jenkins CI

2015-12-14  Milan Zamazal  <mzamazal@redhat.com>

	virt: vm: Update time on VM after resume
	When a VM is resumed from suspension and/or migrated, its clock
	continues from the time of suspension, i.e. it's delayed.  Even when NTP
	is running on the VM, it may refuse to correct the time after a long
	pause.  This needs to be fixed.

	There was some discussion whether libvirt should be automatically
	responsible for correcting the time inside its VM operations such as
	virDomainResume, see the bug below.  The conclusion is that whatever the
	right approach is, we currently have to handle the time correction
	outside libvirt.

	This change asks libvirt to correct the time after a VM is resumed.
	It's not guaranteed that the call succeeds, e.g. it doesn't work without
	QEMU guest agent running on the VM.  So the time may still be incorrect
	after our effort but we shouldn't make the original VM operation fail
	just because of that.

	Note that the libvirt call currently waits for about 5 seconds before
	giving up when qemu-guest-agent is not running in the guest.  That
	should be harmless in theory as it doesn't make the VM non-operable, it
	just delays finishing the requested operation.  But we want to be safe
	so we update time just on resume after pausing, as requested in the bug
	referenced below, which is the more important (possibly very long time
	shifts) and more safe case.  We should handle migrations or situations
	such as recovery after temporary suspension due to I/O errors as well,
	but we are going to do that later, after discussing the delay issues
	with libvirt developers.

	Bug-Url: https://bugzilla.redhat.com/1156194
	Continuous-Integration: Jenkins CI

2015-12-14  Dan Kenigsberg  <danken@redhat.com>

	pyflakes: drop a too-clever SKIP_PYFLAKES_ERR
	Commit 6177a169fc84576 attempted to ignore a false pyflakes error with a
	too-clever shell constract. Modern pyflake no longer complain, but the
	code causes the pyflakes target to ignore real failures.

	Continuous-Integration: Jenkins CI

2015-12-13  Shahar Havivi  <shaharh@redhat.com>

	v2v: add try/except to get_external_vms
	Single domain error causes get_external_vms to fail.

	Continuous-Integration: Jenkins CI

2015-12-11  Adam Litke  <alitke@redhat.com>

	storage: add a context manager for the domainLock
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-11  Milan Zamazal  <mzamazal@redhat.com>

	virt: Add support for vgamem attribute
	SPICE/QXL video RAM sizes are currently specified in <video> domain XML
	element using the following attributes: ram, vram, vgamem.  VDSM is
	missing support for vgamem, this patch adds it.

	Bug-Url: https://bugzilla.redhat.com/1275539
	Continuous-Integration: Jenkins CI

2015-12-11  Dan Kenigsberg  <danken@redhat.com>

	Show debug message before action
	Print debug message before the action, in order to see it
	when action fails

	Continuous-Integration: Jenkins CI

2015-12-11  Shahar Havivi  <shaharh@redhat.com>

	v2v: Use tarfile instead of running tar process
	using build-in package instead of execCmd.

	Continuous-Integration: Jenkins CI

2015-12-10  Allon Mureinik  <amureini@redhat.com>

	build: Align Fedora and EL qemu requirements
	Bump the Fedora requirement to 2.3.0 to better align Fedora and EL
	requirements.
	This version is provided by Fedora >= 22.

	Continuous-Integration: Jenkins CI

	spec: Align RHEL and CentOS qemu* requiments
	Since qemu-kvm-ev-2.3 is now build by the oVirt project, there's no
	reason to keep the cumbersome separation between RHEL and CentOS
	requirements.

	Bug-Url: https://bugzilla.redhat.com/1248400
	Continuous-Integration: Jenkins CI

2015-12-10  Sagi Shnaidman  <sshnaidm@redhat.com>

	Add vmfex-dev hook to default RPMs for install
	Add vmfex-dev hook RPM to default ones in shell_helper for
	VDSM installation

	Continuous-Integration: Jenkins CI

2015-12-10  Ala Hino  <ahino@redhat.com>

	gluster: Warn instead of failing for unsupported gluster replica modes
	A previous patch enforced the use of only supported gluster replication
	modes.  If an unsupported mode was requested, the connection attempt
	would fail.  Unfortunately, this was a bit heavy-handed and has resulted
	in breaking working environments during upgrade. To lessen the impact on
	users, instead of failing, log a warning. A related patch to
	ovirt-engine will warn users about the unsupported replication mode in
	the UI.

	Bug-Url: https://bugzilla.redhat.com/1286565
	Continuous-Integration: Jenkins CI

2015-12-10  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: report whether the kernel supports IPv6
	Continuous-Integration: Jenkins CI

2015-12-10  Ido Barkan  <ibarkan@redhat.com>

	move hooks.py under lib/vdsm
	This module is used from within lib/vdsm/network/ files so must not be
	located under /usr/share/vdsm.

	Continuous-Integration: Jenkins CI

2015-12-10  Amit Aviram  <aaviram@redhat.com>

	fileSD,blockSD: typo fix in createImageLinks comment.
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-10  Ido Barkan  <ibarkan@redhat.com>

	net: clean CachingNetInfo API.
	The object should have a clean API regarding its cache changes.

	Continuous-Integration: Jenkins CI

	net: rename NetInfo to CachingNetInfo
	This explains more of what it should do- caching network information.
	Additional buisness logic should be extracted out of it in order to be
	available to everyone and leave CachingNetInfo to do exactly one thing.

	Continuous-Integration: Jenkins CI

2015-12-10  Francesco Romani  <fromani@redhat.com>

	virt: sampling: reduce host averaging window
	Host samples are stored into a SampleWindow of
	size 5 for mostly historical reasons, with
	no clear rationale.

	However, a clear adverse effect of this setting
	is new network devices are reported with a larger
	delay, especially since commit 6547ea8b90fa191257
	which enlarged the sample interval to 15s from
	the previous, too frequent, interval of 2s.

	To be reported, a network device must be present in
	the first and the last sample.
	For one hotplugged device, the delay can be high as
	sample_interval * window_size.

	To counter this delay, we reduce the sample window
	size to two items, which is the minimum meaningful
	value.

	Bug-Url: https://bugzilla.redhat.com/1261457
	Continuous-Integration: Jenkins CI

2015-12-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	avoid running pep8 and pyflakes on py.in files
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-09  Daniel Erez  <derez@redhat.com>

	vm: enabling memory snapshot without disks
	Taking a memory snapshot of a VM without disks should be
	supported (or merely with Cinder/LUN disks for that matter).

	Hence, removing the early return on 'VM -> snapshot'
	in case 'newDrives' is empty.

	Instead, proper logging will be added on consecutive patches.

	Possible configurations and settings that lead to this flow:
	* Unchecking all the disks in the create snapshot dialog.
	* VM with only cinder disks.
	* VM without disks.

	Bug-Url: https://bugzilla.redhat.com/1287066
	Continuous-Integration: Jenkins CI

2015-12-09  Ido Barkan  <ibarkan@redhat.com>

	shell-helper: stop using service command
	In master we can safely use systemctl since we do not support systemv
	anymore. Also, the 'stop' verb supports multiple arguments so this
	allows the use of less shell commands.

	Continuous-Integration: Jenkins CI

	net: canonify netinfo.vlans.py names
	Vlans.py names made relative, pep8'ed and parameter names are now
	consistent.

	Continuous-Integration: Jenkins CI

2015-12-09  Ollie Armstrong  <ollie@fubra.com>

	config: Resolve crash when IPv6 disabled in kernel
	The configuration for creating the management bridge attempts to do some
	things with IPv6 which causes an uncaught exception when IPv6 is
	disabled at the kernel level with `ipv6.disable=1`.

	This patch checks that IPv6 is actually available before attempting to
	do anything with it.

	Bug-Url: https://bugzilla.redhat.com/1277204
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-12-09  Edward Haas  <edwardh@redhat.com>

	tests: modprobe validation handle failure
	On validation failure, add a skip action with
	a proper message.

	This patch also removes duplicate code.

	Continuous-Integration: Jenkins CI

2015-12-09  Nir Soffer  <nsoffer@redhat.com>

	build: Fix the build is python3 is not available
	Since commit 390c1ee7cfb (Adding python3 run for nosetests), it is not
	possible to build on EL 7, since python3 is not available yet. Use and
	require python3 only if it was detected during configure.

	Continuous-Integration: Jenkins CI

2015-12-08  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move simple metadata getters and setters
	Continuous-Integration: Jenkins CI

2015-12-08  Petr Horáček  <phoracek@redhat.com>

	network: tests: rename config to running_config
	Let's be more explicit and call 'config' (= self.vdsm_net.config)
	'running_config' because of we call it like that everywhere.

	Continuous-Integration: Jenkins CI

2015-12-08  Nir Soffer  <nsoffer@redhat.com>

	stomp: Send all the pending messages in handle_write
	We used to send one pending message in handle_write, and poll again,
	which would wake up the reactor immediately since the socket is still
	writable.

	When socket is writable, we like to send all the pending data until
	there is no data to send, or the socket buffers are full.

	This change should send data quicker and consume less cpu time.

	Continuous-Integration: Jenkins CI

	tests: Safer fake objects for indirection tests
	When testing that old code is redirecting calls to new code, the fake
	recording classes should inherit from object instead of the real
	classes. Otherwise, the real methods may run, which may not be safe
	during the tests (unwanted side effects), or cause incorrect results.

	Fixing the inheritance revealed missing properties in the fake manifest
	and metadata classes, that worked using the real code properties.

	Continuous-Integration: Jenkins CI

2015-12-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding python3 run for nosetests
	This patch adds list of nosetests modules that makecheck will try to run
	with python3. The initial work will allow to add more verified tests to
	that list until covering all of them.

	Continuous-Integration: Jenkins CI

2015-12-08  Ido Barkan  <ibarkan@redhat.com>

	vdsm.spec typo in package description
	Continuous-Integration: Jenkins CI

	net: consolidate bridges.py names
	Functions names became relative to the module

	Continuous-Integration: Jenkins CI

	net: publicise misc._visible_devs
	It is used in many netinfo submodules

	Continuous-Integration: Jenkins CI

	net: consolidate bondings.py naming
	This is only a partial change. More cleanup needs to be done soon after
	I1f4c16b1523822a2d53d4525841ff8741af6296c will be merged.
	Parameters are now called the same. In addition function names became
	relative to the module (e.g. bondinfo->info). Naming clashes were
	made explicit in vlans.py, virt.sampling.py and netinfo.__initi__.py

	Continuous-Integration: Jenkins CI

	net: remove network residues.
	Those files were forgotten in the branch after the network package
	was moved under lib/vdsm/ in 65537e5.

	Continuous-Integration: Jenkins CI

2015-12-08  Edward Haas  <edwardh@redhat.com>

	net func tests: ip config drop on bond slaves
	Moving an interface to a bond should flush/drop
	its ip configuration.

	Existing test changed to reflect this logic.
	[test_drop_initial_bond_slaves_ip_config]

	Continuous-Integration: Jenkins CI

2015-12-07  Adam Litke  <alitke@redhat.com>

	StorageDomain: Add get_manifest
	Provide structured access to the _manifest member of StorageDomain.
	This is needed specifically when you want to use the sdCache to fetch a
	StorageDomainManifest.  In that case you would use code like this:

	    manifest = sdCache.produce(sdUUID).get_manifest()

	Continuous-Integration: Jenkins CI

2015-12-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding compatibility for ovirt-engine 4.0 support
	Continuous-Integration: Jenkins CI

2015-12-07  Francesco Romani  <fromani@redhat.com>

	lib: executor: log pool status on discard
	Log the pool size and content when a worker is discarded,
	to make troubleshooting and debug easier.

	Bug-Url: https://bugzilla.redhat.com/1250839
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-12-07  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move recheckIfLeaf into *Metadata class
	Continuous-Integration: Jenkins CI

2015-12-07  Nir Soffer  <nsoffer@redhat.com>

	testlib: Rename __recording__ to __calls__
	This is more correct and more readable. Instance method calls are
	recorded in obj.__calls__, and class method calls in
	obj.__class_calls__.

	Continuous-Integration: Jenkins CI

	tests: Use @recorded to record class method calls
	Remove the special boilerplate used to record and check class methods
	calls and use the new @recorded class method capabilities.

	Continuous-Integration: Jenkins CI

	testlib: Allow recording class methods
	The @recorded decorator could not be applied to class methods, and we
	are using lot of boilerplate code to record class methods.

	This patch modify the decorator so it can be used to decorate both
	instance and class methods.

	Since class attributes are visible via the instance, we use
	__recording__ for the instance, and __class_recording__ for the class.

	Continuous-Integration: Jenkins CI

	tests: Unify RedirectionChecker method names
	Rename:
	- check -> check_method
	- check_call -> check_method_call

	Continuous-Integration: Jenkins CI

	tests: Fix redirection checker and broken tests
	RedirectionChecker was returning bool instead of raising, hiding broken
	tests. Fix it to assert about the expected values, and fix 2 broken
	tests it was hiding.

	Continuous-Integration: Jenkins CI

2015-12-07  Ido Barkan  <ibarkan@redhat.com>

	net: fix broken pyflakes due to daccf04
	Continuous-Integration: Jenkins CI

2015-12-07  Sagi Shnaidman  <sshnaidm@redhat.com>

	Include vmfex-dev-hook in vdsm install
	Force installation of vmfex-dev hook
	together with VDSM main package

	Bug-Url: https://bugzilla.redhat.com/1286997
	Continuous-Integration: Jenkins CI

2015-12-07  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: use routes package, not variable
	In cc07896088da21e06875d5f5179984ae9be8cbab package was replaced
	by function parameter by mistake.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-12-07  Francesco Romani  <fromani@redhat.com>

	sampling: HostStatsThread as periodic operation
	This patch extracts the actual host sampling code
	from HostStatsThread into a new helper class,
	which is made conform to the Task/Periodic interface.

	The new HostSampler code is moved under the periodic
	infrastructure. Finally, HostStatsThread is removed.

	Continuous-Integration: Jenkins CI

2015-12-07  Ido Barkan  <ibarkan@redhat.com>

	net: consolidate nics.py naming
	This is only a partial change. More cleanup needs to be done soon
	after I1f4c16b1523822a2d53d4525841ff8741af6296c will be merged.
	Parameters are now called the same. In addition function names
	became relative to the module (e.g. bondinfo->info). Naming clashes were
	made explicit in vlans.py, virt.sampling.py and netinfo.__initi__.py

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: consolidate _BRIDGING_OPT_PATH and BRIDGING_OPT
	Those 2 constants were the same.  only netinfo.bridges.BRIDGING_OPT
	was left. bridge_stp_state also used an almost identical value for
	the briddge stp path.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: remove unused constant
	Continuous-Integration: Jenkins CI

	net: move qos reporting to netinfo
	Up until now, qos reporting was part of caps.py, which lies in an
	upper layer then netinfo, just because the tc code could not be used
	from within netinfo. Now it is possible to bury this reporting code
	inside netinfo new package, where it belongs.
	Note, that this change creates a circular import because the
	configurators/qos.py code is used from netinfo/qos.py but is trying to
	import netinfo itself. This was solved by moving _root_qdisc to
	netinfo/qos.py. This actually makes sense, because nobody should be
	dependant on network/configurators for the sake of reporting stuff-
	especially not the main reporting code (netinfo package). The only qos
	reporting code is now left in vdsm/tc.

	Continuous-Integration: Jenkins CI

2015-12-06  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move isLeaf, setLeaf and dependencies
	To make testing easier, FileVolume.file_setrw was converted from static
	method to class method.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-06  Ido Barkan  <ibarkan@redhat.com>

	net: privatize IFCFG_ZERO_SUFFIXED
	Only used inside netinfo.misc

	Continuous-Integration: Jenkins CI

2015-12-06  Petr Horáček  <phoracek@redhat.com>

	licenses: rename Hat and RedHat to Red Hat
	Tell me if Hat is another company.

	Continuous-Integration: Jenkins CI

2015-12-06  Ido Barkan  <ibarkan@redhat.com>

	net: move network library under lib/vdsm
	Continuous-Integration: Jenkins CI

2015-12-04  Adam Litke  <alitke@redhat.com>

	sdm: Create the storage/sdm directory
	New SDM code including the verbs and supporting utility functions need
	an organized place in the storage code.  Add the 'sdm' directory now to
	prepare for the future patches.

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: Manifest objects produce VolumeMetadata objects
	StorageDomainManifest objects must be safe to use when working in SDM
	and SPM modes.  Therefore, methods of these objects may not return
	class instances which are only safe to use in SPM mode.

	As we refactor vdsm storage to prepare for SDM we have two sets of
	storage objects: the original (SPM) classes and the new (SDM) classes.

	SPM classes:
	 - BlockStorageDomain
	 - FileStorageDomain
	 - Image
	 - BlockVolume
	 - FileVolume

	SDM classes:
	 - BlockStorageDomainManifest
	 - FileStorageDomainManifest
	 - ImageManifest
	 - BlockVolumeMetadata
	 - FileVolumeMetadata

	By changing getVolumeClass to return the proper type for each
	StorageDomain and StorageDomainManifest class we can ensure that the
	proper instance will be returned by produceVolume:

	BlockStorageDomain         --produces--> BlockVolume
	BlockStorageDomainManifest --produces--> BlockVolumeMetadata
	FileStorageDomain          --produces--> FileVolume
	FileStorageDomainManifest  --produces--> FileVolumeMetadata

	So this change will not change the behavior of old code using the SPM
	classes but it will correct the behavior for new SDM code which
	instantiates StorageDomainManifest objects directly.

	Updated the sdm_indirection_tests since getVolumeClass is no longer
	redirected to the Manifest classes.

	Continuous-Integration: Jenkins CI

2015-12-04  Ido Barkan  <ibarkan@redhat.com>

	net: move tc library under lib/vdsm
	Since most of the changed code is import statements, a few lines were
	moved to keep alphabetical order, but no logic change was made.

	Continuous-Integration: Jenkins CI

2015-12-04  Adam Litke  <alitke@redhat.com>

	getAllImages: Use manifest attributes when constructing glob pattern
	getAllImages searches a domain's images directory for directories that
	look like a UUID.  To make this function testable with domains that are
	not located at the usual storage repo location '/rhev/data-center', find
	the images directory using the StorageDomainManifest's mountpoint
	attribute.  Note that this is how getAllVolumes already works.

	Continuous-Integration: Jenkins CI

2015-12-04  Ido Barkan  <ibarkan@redhat.com>

	net: split netinfo module
	netinfo module is now split into several submodules and converted into a
	package. A few major APIs were left in netinfo.__init__ and users of
	netinfo now need to import only the submodule they need for their use.
	The new submodules are shorter and easier to read, and depend on less
	things, without any cross dependencies between themselves.

	Continuous-Integration: Jenkins CI

2015-12-04  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: remove removed tests from 'does_not_use_ovs' dictionary
	A few tests were remove from networkTest.py, we have to remove them
	from 'does_not_use_ovs' dictionary in networkTestsOVS.py.

	Continuous-Integration: Jenkins CI

	hooks: ovs: run ovs _configure only if there are changes to do
	Continuous-Integration: Jenkins CI

	hooks: ovs: skip non-vNic device's XML
	If other than a vNic device is passed to OVS hook's
	before_device_create, we end with an IndexError, because of XML
	does not contain all required tags.

	If such error occurs, return unchanged XML,

	Continuous-Integration: Jenkins CI

2015-12-03  Adam Litke  <alitke@redhat.com>

	tests: add FakeSanlock.init_resource
	init_resource is called by VolumeMetadata.newVolumeLease.  When unit
	testing we use a mocked sanlock which does not yet have this method.
	Add a stub function that does nothing to allow tests to work.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-03  Allon Mureinik  <amureini@redhat.com>

	modpobe: Remove EL6 path
	Removed the reference to /sbin/modprobe (which is used in EL6), as we no
	longer support this platform.

	Continuous-Integration: Jenkins CI

2015-12-03  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move the getParent API
	Move getParent and related functions into VolumeMetadata.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	VolumeMetadata: metadata write utils
	Move the utility functions needed to change volume metadata into the
	*Metadata classes.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-03  Allon Mureinik  <amureini@redhat.com>

	schema: Removed comment about EL6
	Removed a comment about a verb not being supported in EL6, as VDSM
	no longer supports EL6 at all, making this comment redundant.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-12-03  Nir Soffer  <nsoffer@redhat.com>

	debuging: Use __repr__ instead of __str__
	Recently we are implementing __str__ for objects, for improved logging:

	    logging.debug("Discarding task %s", self.task)

	We are using the style used by Python:

	    >>> threading.RLock()
	    <_RLock owner=None count=0>

	Implementing __str__ is fine for logging, but when using the Python
	interactive shell (e.g, manhole), the output is not very useful:

	    >>> class Foo(object):
	    ...     def __str__(self):
	    ...             return "<Foo bar=2 at 0x%x>" % id(self)
	    ...
	    >>> f = Foo()
	    >>> f
	    <__main__.Foo object at 0x7f5f85441c90>

	For debugging, we should implement __repr__ instead of __str__.
	According to the language reference[1], when using str(), if object does
	not implement __str__, its __repr__ is used.

	This patch replaces most relevant __str__ methods with __repr__. Some
	methods needs more work and left for later.

	One instance implementing __repr__ that return the same output as
	object.__repr__ was removed.

	[1] https://docs.python.org/2/reference/datamodel.html#object.__repr__

	guestagent: Add note about unneeded encoding
	In Python 2, the output of json.dumps() is always a str object, and is
	using ascii charset by default. Encoding the output will first decode it
	to unicode using the system default encoding (ascii), and then encode it
	back to utf8, which will create the same string.

	    >>> json.dumps({u"\u05d0": u"\u05d1"})
	    '{"\\u05d0": "\\u05d1"}'

	    >>> json.dumps({u"\u05d0": u"\u05d1"}).encode('utf8')
	    '{"\\u05d0": "\\u05d1"}'

	However, on Python 3 this encoding is needed, since json.dumps returns
	str object, and sockets requires bytes object. Add note about using a
	wrapper to hide the difference.

	Continuous-Integration: Jenkins CI

	guestagent: Send complete messages
	When forwarding message to the guest agent, we used socket.send(), which
	may write only part of the message and return the number bytes written.

	This may lead to corrupted messages, confusing the receiver and failing
	both the current request and the next one, which will be appended to the
	partial request on the receiver side.

	Now we use socket.sendall(), returning when all bytes were sent.

	Note that this is not a complete solution, since we are working with
	non-blocking socket, and it may fail with EAGAIN if the socket buffers
	are full. In this case we should poll the socket until it is writable
	and send the rest of the data. This is not handled in the current patch.

	Continuous-Integration: Jenkins CI

2015-12-03  Marcin Mirecki  <mmirecki@redhat.com>

	vm: move device attached check to device itself
	Moving the check for being attached to the device in question.

	Bug-Url: https://bugzilla.redhat.com/1134256
	Continuous-Integration: Jenkins CI

	vm: add test for nic unplug wait
	Bug-Url: https://bugzilla.redhat.com/1134256
	Continuous-Integration: Jenkins CI

	vm: check operation result for vm nic hotunplug
	After detaching a device we need to verify that this device
	has actually been detached.

	This mechanism was already implemented for disks. This
	patch generalizes the disk waiting mechanism so that it
	can also be applied to nics.

	This patch is similar to:
	https://gerrit.ovirt.org/#/c/45138
	https://bugzilla.redhat.com/1044466

	Bug-Url: https://bugzilla.redhat.com/1134256
	Bug-Url: https://bugzilla.redhat.com/1199782
	Continuous-Integration: Jenkins CI

2015-12-03  Francesco Romani  <fromani@redhat.com>

	daemon: keep running without affinity.
	The cpu affinity is one (important) performance setting,
	but Vdsm should keep running even if it fails to set it.

	To run without affinity doesn't harm the functionality.

	Bug-Url: https://bugzilla.redhat.com/1279431
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	daemon: reformat __set_cpu_affinity
	Reformat the code to use the 'early return' idiom.
	No intended changes in functionality.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	lib: daemon: autodetect online cpus for affinity
	In commit a1d4e23 we enabled by default the cpu affinity
	for VDSM, after we had confirmation this delivered important
	performance benefits.

	An hardcoded default setting for any cpu core is a too naive
	approach, as it could break automated setups if the said CPU
	is offline. And Vdsm cannot guess that.

	To solve this, we add a function to learn from the kernel which
	cpus are online, using a file from /sys pseudo-filesystem.
	This is a simplified version of the same approach libvirt uses.
	We don't leverage libvirt because it is too early in the
	VDSM startup.

	The layout of /sys, like /proc, is part of the kernel ABI,
	so there are only small breakage concerns [1][2].
	Furthermore, we already rely on /sys for other VDSM flows,
	so this patch doesn't add fragility

	We add a special value to the cpu_affinity tunable, to let
	Vdsm select automatically best cpu. We choose the second
	online core in the system, handling the case on which
	only one core is active.

	The admin can still select explicitely the cores on which
	Vdsm should pin to, or still can disable the pinning entirely.

	[1] https://www.kernel.org/doc/Documentation/ABI/README
	[2] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu

	Bug-Url: https://bugzilla.redhat.com/1286462
	Bug-Url: https://bugzilla.redhat.com/1279431
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-12-02  Marcin Mirecki  <mmirecki@redhat.com>

	vm: unit test for vm._waitForDriveRemoval
	Added unit tests for vm._waitForDriveRemoval, in
	preparation to make this generic for all devices.

	Bug-Url: https://bugzilla.redhat.com/1134256
	Continuous-Integration: Jenkins CI

2015-12-02  Nir Soffer  <nsoffer@redhat.com>

	automation: Eliminate unneeded variables
	There is no point in variables which are used once and are not expected
	to change (e.g. tests). Add EXPORT_DIR for the exported-artifacts
	directory, and eliminate the other variables.

	Continuous-Integration: Jenkins CI

	hsm: Prevent stop monitoring of a pool domain
	When hosted engine agent is entering local maintenance, it must stop
	monitoring the hosted engine domain. This is racy because the domain may
	be in the middle of an import operation.

	To avoid this race, stopMonitoringDomain will fail now with new
	StorageDomainIsMemberOfPool exception, so hosted engine agent can stop
	monitoring safely.

	This failure is also important even without this race; if a domain is
	owned by the pool, nobody should be able to stop monitoring it. The only
	way to stop monitoring a pool domain is disconnecting from the pool.

	Bug-Url: https://bugzilla.redhat.com/1282187
	Continuous-Integration: Jenkins CI

	sp: Allow attaching of monitored domain
	When attaching a storage domain to the pool, the storage domain may be
	an external domain being monitored via startMonitoringDomain, such as the
	hosted engine storage domain.

	In this case, the monitor may have already acquired the host id, or will
	acquire it during the attach operation. We cannot tell since monitors
	are using asynchronous acquire.

	We must not release the host id when the domain is attached, since this
	will cause sanlock to kill any process holding a resource on this
	storage domain, such as the qemu process running the hosted engine vm.

	We had a magical, sneaky, and unclear code for attaching a monitored
	domain when starting a monitor twice. This code is now simplified and
	documented, and logging is improved. This will be replaced with explicit
	attach later.

	Bug-Url: https://bugzilla.redhat.com/1269768
	Continuous-Integration: Jenkins CI

	monitor: Do not release host id during shutdown
	When shutting down, all domain monitors are stopped and release acquired
	host ids. This will cause sanlock to terminate processes holding a
	resource on these domains, such as the qemu process for the hosted
	engine vm.

	This behavior was fine when the only resource held is the spm resource,
	but now we must support the hosted engine vm, that must not be killed
	when vdsm terminates. In the future we may like to use sanlock resources
	for other vms as well.

	Now we detect when a monitor is stopped during a vdsm shutdown, and do
	not release the host id.

	This change will effect users trying upgrade vdsm without putting a host
	to maintenance before the upgrade. This was never supported but users
	could get away with this by stopping vdsm. Now sanlock will refuse to
	stop after vdsm is stopped, and killing sanlock will cause the watchdog
	to reboot the machine.

	Bug-Url: https://bugzilla.redhat.com/1269768
	Continuous-Integration: Jenkins CI

	guestagent: Add missing log on disconnect
	Add debug log when detecting a disconnect after empty read. This should
	make the connection state of the agent more clear in the logs.

	Continuous-Integration: Jenkins CI

	guestagent: Rename connect() to start()
	GuestAgent was started by invoking connect() and stopped by invoking
	stop().  We can rename stop() to disconnect(), but it seems that it is
	more clear to rename connect() to start(). This conforms with other
	subsystems implementing this interface.

	Continuous-Integration: Jenkins CI

	guestagent: Use %r for logging message
	A message is a json object with a newline - logging it will create an
	unwanted empty line in the log. Use %r to log the message contents with
	escaped newline (\n).

	Continuous-Integration: Jenkins CI

2015-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving panic function to separate module
	Taking panic out of utils allows to mock panic in testrunner without importing
	utils each nosetest run.

	Continuous-Integration: Jenkins CI

	Moving modprobe operations to separate module
	that way we won't need to import utils each testValidation import

	Continuous-Integration: Jenkins CI

2015-12-01  Francesco Romani  <fromani@redhat.com>

	tests: proper cleanup in periodic tests
	Make sure to wait for all the threads in periodicTests.tearDown, to
	avoid concurrent operations and unreliable test results.

	Continuous-Integration: Jenkins CI

	mkimage: check image attributes after creation
	To ensure lack of regression, we check the image
	attributes after the creation, and we log warnings
	if something is different from the expectations

	Related-To: https://bugzilla.redhat.com/1278414
	Continuous-Integration: Jenkins CI

2015-12-01  Yeela Kaplan  <ykaplan@redhat.com>

	spec: Require ioprocess containing important fixes
	- cpu affinity to run on any host by default
	- Add debug logging
	- Fix severe memory and cpu high usage
	- Fix string formatting for 32bit build
	and more..

	Continuous-Integration: Jenkins CI

	spec: require ioprocess>=0.15.0-4 only for rhel
	Continuous-Integration: Jenkins CI

2015-11-30  Francesco Romani  <fromani@redhat.com>

	daemon: revert cpu-affinity enabling by default
	In commit a1d4e23 we enabled by default the cpu affinity
	for VDSM, after we had confirmation this delivered important
	performance benefits.

	Unfortunately, the default setting, was too naive
	for large, complex setup, like the ones we first seen on PPC64
	hosts. VDSM tries to pin itself to cpu #1, but if this cpu
	is offline, it fails to start.

	This was indeed expected behaviour, and the fix is trivial (just
	reconfigure /etc/vdsm/vdsm.conf), but it is very unpractical in large
	settings, where the admin has to manually fix many configuration
	files. This obviously breaks automated flow.

	Unfortunately, is too late in the release schedule to add smarter
	CPU selection logic (e.g. patch 49402), so to avoid VDSM start
	failures, we revert the default, to fall back to a safe state.

	Related-To: https://gerrit.ovirt.org/#/c/49402
	Related-To: https://bugzilla.redhat.com/1279431
	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1286462
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-30  Tal Nisan  <tnisan@redhat.com>

	spec: Require newer multipath version
	There is a race between udev and multiapth which is solved in newer
	multipath versions, this patch requires those versions on RHEL 7.2 and
	Fedora 22 and 23

	We don't require the package on CentOS, since it is not available yet.

	Bug-Url: https://bugzilla.redhat.com/1265204
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-11-30  Milan Zamazal  <mzamazal@redhat.com>

	virt: Make BIOS messages available on vmconsole
	ovirt-vmconsole allows access to VMs via serial console.  However, this
	currently works only for processes running on the VM operating system,
	such as getty.  It would be useful if vmconsole could interact with the
	user before the OS starts, i.e. if it displayed BIOS messages, boot
	menu, GRUB menu etc. and the user could select the menu items or type
	GRUB commands.

	This change is the first step towards the goal.  It enables BIOS serial
	console interaction in a VM's XML domain description when a serial
	console is available.

	Note that a console of type `serial' (not just `virtio') must be present
	in order to make this feature work.  When oVirt Engine is used to manage
	VMs' serial console access, recent version of oVirt Engine (currently at
	least 3.6 snapshot) is required to receive `serial' console type in
	calls from Engine.

	Continuous-Integration: Jenkins CI

2015-11-30  Petr Balogh  <pbalogh@redhat.com>

	code coverage: change approach how to enable it
	Continuous-Integration: Jenkins CI

2015-11-30  Francesco Romani  <fromani@redhat.com>

	daemon: reduce severity of message
	When VDSM detects just one CPU in the system, it
	autodisables affinity and logs a message.
	This is expected condition, so it should not be
	a warning, rather a debug message.

	Continuous-Integration: Jenkins CI

2015-11-30  Nir Soffer  <nsoffer@redhat.com>

	guestagent: Log guest agent life cycle events
	GuestAgent is was not logging anything when starting or stopping, making
	it harder to debug. To understand if a guest agent was stopped, one had
	to look for ChanelListener debug message. Important events such as
	starting and stopping a subsystem must be logged.

	Continuous-Integration: Jenkins CI

2015-11-30  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Metadata read utils
	Transfer the underlying utility functions needed to read volume metadata
	into the *Metadata classes.

	Continuous-Integration: Jenkins CI

2015-11-30  Ido Barkan  <ibarkan@redhat.com>

	net: removing the bonding modes constant duplication.
	Now, after everybody can use netinfo, this duplicated constant can be
	merged.

	Continuous-Integration: Jenkins CI

	net: Flatten KernelConfig logic
	KernelConfig, which can now use the netinfo module directly can let
	go of most of its logic and make it as module level.
	This makes the bypass @staticmethods of NetInfo redundant.

	After the netinfo API is refactored, we should decide if we need the
	dependency of KernelConfig in a NetInfo object. The only real
	dependency is on NetInfo.getNicsVlanAndBondingForNetwork and on
	NetInfo.Bondings.

	Continuous-Integration: Jenkins CI

	net: break netinfo-netconfpersistence dependency
	netinfo module currently depends on netconfpersistence module
	because the use of RunningConfig during for the accurate reporting
	of dhcp from VDSM. This prevents code that lies in
	netconfpersistence to use netinfo because a circular dependency is
	created. Because of that, KernelConfig has to abuse netinfo.NetInfo
	object in order to avoid importing its parent module (netinfo).
	This patch separates KernelConfig from netconfpersistence, thus
	breakiing the circle and allows a simplification of both KernelConfig
	and netinfo.NetInfo in the following patches.

	Continuous-Integration: Jenkins CI

2015-11-29  Ido Barkan  <ibarkan@redhat.com>

	shell helper: typo
	Continuous-Integration: Jenkins CI

2015-11-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	build: contrib script to build for rhev with the required flags
	Continuous-Integration: Jenkins CI

2015-11-29  Nir Soffer  <nsoffer@redhat.com>

	build: Cleanup conditionals in the build system
	Previously builders had to edit the spec manually and set globals such
	as koji_build=1. Now configuring generate ready-to-build spec.

	Example - building for Fedora:

	    ./autogen.sh --system --enable-koji-build --enable-hooks
	    make srpm
	    fedpkg import <vdsm-x.y.src.rpm>
	    fedpkg build

	For RHEV build we introduce contrib script as part of
	https://gerrit.ovirt.org/49001

	Continuous-Integration: Jenkins CI

	build: Make with_hooks condition more clear
	Use simple if instead of cryptic parameter expansion syntax.

	Continuous-Integration: Jenkins CI

	build: Fix --disable-gluster-mgmt
	The automake condition was correct only when the feature is disabled by
	default. Change the condition so it pass value to the spec only if
	gluster is disabled.

	Continuous-Integration: Jenkins CI

2015-11-29  Dan Kenigsberg  <danken@redhat.com>

	ifcfg: remove files properly on the node
	Since change-id I02ae28c345 we are always persisting ifcfg files on the
	node. This means that we should unpersist them on removal.

	Bug-Url: https://bugzilla.redhat.com/1283628

2015-11-29  Ido Barkan  <ibarkan@redhat.com>

	net: Remove reporting of bond custom options from RunningConfig
	This reporting is ignored in engine, is not symmetric to network
	custom properties as VDSM does not report such a field on a network
	and also deepens the reliance of netinfo on RunningConfig.
	Since we want to remove this dependency soon, this is one step in
	this direction.

	Continuous-Integration: Jenkins CI

2015-11-29  Nir Soffer  <nsoffer@redhat.com>

	readme: Update mailing lists and git urls
	We are using now ovirt lists, and the code is on gerrit.ovirt.org.

	Continuous-Integration: Jenkins CI

2015-11-28  Nir Soffer  <nsoffer@redhat.com>

	readme: Do not mention XML-RPC
	These details do not belong to the readme.

	Continuous-Integration: Jenkins CI

	readme: Use Vdsm instead of VDSM
	VDSM started as virtual desktop server manager, but it is a different
	beast now, and we like to call it Vdsm.

	Continuous-Integration: Jenkins CI

2015-11-27  Francesco Romani  <fromani@redhat.com>

	daemon: avoid contradicting logs about affinity
	Vdsm can autodisable the affinity if it detects just one cpu.
	In this case the logs read like:

	MainThread::INFO::2015-11-26
	17:31:35,932::vdsm::229::vds::(__set_cpu_affinity) VDSM will run with
	cpu affinity: frozenset([1])
	MainThread::DEBUG::2015-11-26
	17:31:35,933::vdsm::233::vds::(__set_cpu_affinity) Only one cpu
	detected: affinity disabled

	which feels like VDSM is contradicting itslef.
	Better to log the affinity used only if we actually use it.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>
	Continuous-Integration: Jenkins CI

2015-11-27  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: fix getVdsCaps and getVdsStats
	Testing with Engine revealed a few stats and caps hooks problems.

	Continuous-Integration: Jenkins CI

	hooks: ovs: use six.iteritems and six.itervalues
	Continuous-Integration: Jenkins CI

	hooks: ovs: add script name to log
	Continuous-Integration: Jenkins CI

2015-11-27  Ido Barkan  <ibarkan@redhat.com>

	net: remove delNetwork old API
	This API is not supported anymore in 4.x clusters hence should be
	removed.

	Continuous-Integration: Jenkins CI

2015-11-27  Nir Soffer  <nsoffer@redhat.com>

	automation: Generate coverage report in one step
	Instead of generating the report in the test directory and moving it to
	the exported-artifacts directory, generate it when it should be.

	Continuous-Integration: Jenkins CI

	automation: Improve whitespace
	Empty line between commands make the script easier to read.

	Continuous-Integration: Jenkins CI

	automation: Limit coverage report to vdsm code
	Current coverage report includes the tests, test helpers, 3rd party
	libraries and maybe more.

	This patch limit the coverage report to files under vdsm and lib
	directories.

	This change also fixes bogus results seen in vdsm library modules. I
	don't know why the results were wrong, but limiting the output seems to
	eliminate them.

	Continuous-Integration: Jenkins CI

2015-11-27  Ido Barkan  <ibarkan@redhat.com>

	net: remove editNetwork old API
	This API is not supported anymore in 4.x clusters hence should be
	removed. delNetwork will be removed in a following patch.

	Continuous-Integration: Jenkins CI

2015-11-26  Milan Zamazal  <mzamazal@redhat.com>

	config: Trivial typo fix in option description
	Continuous-Integration: Jenkins CI

2015-11-26  Francesco Romani  <fromani@redhat.com>

	mkimage: setup right permissions before mkisofs
	We don't want to depend on the 'childUmask' argument of cpopen anymore,
	so that argument could be dropped in future release, to make the
	interface of cpopen identical to the one of the standard subprocess
	module.

	The 'childUmask' argument was added to make sure that the iso image we
	create has the right permissions right from the file creation, to avoid
	possible information leak.

	We can reach the same goal by preparing one hollow file with the right
	attributes on the same path mkisofs will use. mkisofs will truncate the
	(already empty) content of the file we prepared, and keep the
	other attributes.

	There are no planned change in functionality.

	Bug-Url: https://bugzilla.redhat.com/1278414
	Continuous-Integration: Jenkins CI

	vmstats: reformat to make the code nicer
	Silly reformat-only patch to make the code look nicer.

	Format-Only: yes
	Continuous-Integration: Jenkins CI

2015-11-26  Ido Barkan  <ibarkan@redhat.com>

	net: remove addNetwork old API
	This API is not supported anymore in 4.x clusters hence should be
	removed. delNetwork and editNetwork will bw removed in the following
	patches.

	Continuous-Integration: Jenkins CI

2015-11-26  Ala Hino  <ahino@redhat.com>

	gluster: Fix unit test docstring
	Fix unit test docstring to reflect what the test checks.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-11-26  Edward Haas  <edwardh@redhat.com>

	tests: Adding coverage check for unit tests
	It is helpfull to examine the test coverage when modifying
	source code, assuring all scenarios have been checked.
	The coverage is currently performed with the unit tests run.
	Results are shown at the end of the run.

	Continuous-Integration: Jenkins CI

2015-11-26  Milan Zamazal  <mzamazal@redhat.com>

	gitignore: Missing autogenerated files added
	Continuous-Integration: Jenkins CI

2015-11-26  Ala Hino  <ahino@redhat.com>

	gluster: Remove duplicate servers
	Gluster volinfo could return duplicate servers. For example, if
	the volume is a distributed replica volume (2 X 3) with 6 bricks,
	the bricks could be spread over 4 volumes.
	This patch removes duplicate servers if appear in volinfo.

	Continuous-Integration: Jenkins CI

2015-11-26  Petr Horáček  <phoracek@redhat.com>

	net: ovs: remove initial nic ip, dont touch unchanged networks
	According to ifcfg configurator behavior, now we remove inital IP
	configuration of nics attached to VDSM network.

	Also there is an improvement in IP changes handling: If IP configuration
	was not changed, don't recreate it.

	Continuous-Integration: Jenkins CI

	hooks: ovs: pass ip configuration as a namedtuple
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-26  Fred Rolland  <frolland@redhat.com>

	spec: Require newer qemu version for el7
	Prior to QEMU 2.3.0-13, it cannot yield while dumping a dirty map, which
	may cause live merge to hang when merging large snapshots. QEMU 2.3.0-13
	adds yield points, which prevents the aforementioned hanging.

	We don't require the package on CentOS, since it is not available yet.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1271173
	Continuous-Integration: Jenkins CI

2015-11-26  Yeela Kaplan  <ykaplan@redhat.com>

	init: configure multipath on upgrade from ovirt-3.3 and 3.4
	multipath configurator was added to vdsm-tool in ovirt-3.6.
	In case we upgrade from ovirt-3.3 and ovirt-3.4 we now run configure
	of module multipath in init script (in addition to running it
	for upgrade from ovirt-3.5).

	Continuous-Integration: Jenkins CI

	hooks: hostusb: make sudoers rule more specific
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234304
	Continuous-Integration: Jenkins CI

2015-11-25  Allon Mureinik  <amureini@redhat.com>

	hsm.py: Deprecate getVGList
	oVirt Engine commit 4312bfd removed all the usages of getVGList from the
	engine's code.

	Since this verb is useless to us (the same functionality is covered by
	getVGInfo and getDeviceList), and since it's no longer called, this
	patch flags it as @deprecated, with the intent to remove it completely
	in the future.

	Continuous-Integration: Jenkins CI

2015-11-25  Daniel Erez  <derez@redhat.com>

	image: copy - set VM metadata images format to RAW
	Since commit 0b61c4851a528fd6354d9ab77a68085c41f35dc9
	copy of internal raw volumes is done using 'qemu-img convert'
	instead of invoking 'dd'.

	Consequently, exporting VM metadata images (produce during
	live snapshot) fails on qemu-img convert - since the images
	'impersonate' to qcow2 (the format in .meta file is cow,
	whereas the real format is raw).

	Hence, we try to identify the VM metadata image on
	'_interImagesCopy' and set its format to RAW
	so qemuimg.convert won't fail (QImgError: "Image is
	 not in qcow2 format").

	This approach is a workaround since it's done merely to
	conceal the aforementioned miscorrelation, however,
	it seems to be simpler than fixing the root cause
	(see https://gerrit.ovirt.org/#/c/48768/).

	Note: this fix is merely for passing the correct argument
	to qemu-img on convert (raw format). I.e. the .meta file of
	the target files will still contain the wrong format (cow).

	Bug-Url: https://bugzilla.redhat.com/1282239
	Continuous-Integration: Jenkins CI

2015-11-24  Adam Litke  <alitke@redhat.com>

	Live Merge: Notice imageSyncVolumeChain errors
	Currently we ignore errors from imageSyncVolumeChain when resolving a
	completed live merge operation.  This could cause us to signal the
	completion of a live merge operation to ovirt-engine without first
	updating the storage metadata.  Instead, we should detect the error and
	raise an exception so that the LiveMergeCleanupThread working on this
	job will retry the operation later.

	Bug-Url: https://bugzilla.redhat.com/1214342
	Continuous-Integration: Jenkins CI

2015-11-24  Edward Haas  <edwardh@redhat.com>

	Network API: Remove "force" option
	The "force" option has an akward semantic that was never used
	by the Engine. It is therefore removed from the API.

	Continuous-Integration: Jenkins CI

2015-11-24  Francesco Romani  <fromani@redhat.com>

	tests: v2v: add test for commit f8127d8
	This patch adds a test to exercise the fix introduced in f8127d8
	"Skip vm if XMLDesc() fails", making sure that external VMs continue
	to be extracted even after a specific VM fails.

	Continuous-Integration: Jenkins CI

	tests: v2v: let LibvirtMock use VMs, not specs
	Simplify the faking in v2vtests in two ways:
	- make the vm specs a class attribute, not
	  a local variable. This way it is way less clumsy
	  to check that a VM matches the spec (e.g. mac from UUID).
	  Furthermore, we should not recreate the same data on
	  each function call
	- make the fake LibvirtMock deal with VM, not create the VM
	  internally using the given specs. This is more flexible.

	The improvements on this patch are small, but this patch
	mostly paves the road for the next one, which want to add
	a new test.

	Continuous-Integration: Jenkins CI

	tests: v2v: extract _assertVmDisksMatchSpec helper
	Future tests in the patch series want to test
	independently that information about VM
	and specifically about VM disks is correct.

	So this patch splits the disk check from the
	VM check, to make this possible.

	Continuous-Integration: Jenkins CI

	tests: v2v: simplify setup of test
	Simplify the setup of fakes needed for one test.
	Makes the code a tiny bit nicer, and helps for future
	patches in the series.

	Refactor-Only: yes
	Continuous-Integration: Jenkins CI

	tests: v2v: use namedtuple and not plain tuples
	Make access using names (foo.bar) is nicer than
	using indexes (foo[0]).

	Tiny patch, tiny improvement but helps for future
	patches in the series.

	Continuous-Integration: Jenkins CI

2015-11-23  Yeela Kaplan  <ykaplan@redhat.com>

	spec: fix python-libvirt requirement
	Requiring python-libvirt-1.2.17.el7 which
	is not available breaks master and makes
	it impossible to install vdsm.
	Fixing: https://gerrit.ovirt.org/#/c/44834/

	Continuous-Integration: Jenkins CI

2015-11-23  Ido Barkan  <ibarkan@redhat.com>

	net: remove mac address from ifcfg
	In el7, the HWADDR field in ifcfg files is no longer needed by udev
	and is considered a bad practice. Hence, VDSM shouldn't handle it
	anymore.

	Continuous-Integration: Jenkins CI

2015-11-23  Fred Rolland  <frolland@redhat.com>

	spec: Require newer lvm2 version for el7
	lvm 117 introduced a regression, causing second pvcreate call to
	fail during create vg flow, because of stale /etc/lvm/cache/.cache
	file.

	lvm2 2.02.130 fixed this issue. We require now this version.

	We don't require the package on CentOS, since it is not available yet.

	The issue is probably effecting also Fedora 23. We will provide a
	separate patch for Fedora if needed.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1272035
	Continuous-Integration: Jenkins CI

2015-11-23  Shahar Havivi  <shaharh@redhat.com>

	v2v: add fake virt-v2v process for testing without virt-v2v
	Continuous-Integration: Jenkins CI

	v2v: allow waiting for import thread completion
	The wait is needed for v2v tests.

	Continuous-Integration: Jenkins CI

2015-11-23  Nir Soffer  <nsoffer@redhat.com>

	spec: Require newer libvirt version for el7
	Libvirt 1.2.17 introduced a regression where physical volume size is
	always zero. This breaks our extension logic, using:

	    physical - alloc < drive.watermarkLimit

	As a result, we try to extend the drive on each check to next size after
	0 (1GiB), spamming the logs with lvm warnings. Finally the vm is paused,
	since we never extend the disk.

	Libvirt 1.2.17-5 fixed this issue. We require now this version.

	We don't require the package yet on CentOS, since it is not available
	yet.

	The issue is probably effecting also Fedora 23. We will provide a
	separate patch for Fedora if needed.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1251008
	Continuous-Integration: Jenkins CI

2015-11-22  Nir Soffer  <nsoffer@redhat.com>

	tests: Disable flaky test
	testGetBondingOptions fails randomly in the CI for more than a week.
	Mark it as broken tests until the test owner find time to fix it.

	Continuous-Integration: Jenkins CI

2015-11-22  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move instance validation
	Continuous-Integration: Jenkins CI

	VolumeMetadata: Move volumePath and validation
	Continuous-Integration: Jenkins CI

	VolumeMetadata: Move imagePath and validation
	Continuous-Integration: Jenkins CI

2015-11-22  Nir Soffer  <nsoffer@redhat.com>

	logUtils: Process SimpleLogAdapter's context once
	We used to format SimpleLogAdapter's contextual information on each
	logging call. This generates lot of garbage adding unneeded cost for
	logging calls. Format the context once when creating an instance.

	There is no change in the log output.

	Continuous-Integration: Jenkins CI

2015-11-22  Arik Hadas  <ahadas@redhat.com>

	virt: hibernation - use r+ to open vm conf file
	Complementary part of Ic6799e07898155fd4a630bfaf4151ea9ccdcee49
	for vm hibernation.

	Continuous-Integration: Jenkins CI

2015-11-22  Daniel Erez  <derez@redhat.com>

	vm: snapshot - use r+ to open vm conf file
	Since commit 0b61c4851a528fd6354d9ab77a68085c41f35dc9
	copy of internal raw volumes is done using 'qemu-img convert'
	instead of invoking 'dd'. Hence, we should avoid changing
	the file size by opening it in a non-truncate mode to avoid
	qemu-img from hanging during the convert operation.

	The issue reproduces for files size of multiplicity of 512.
	E.g.
	Doesn't work:
	$ dd if=/dev/zero of=/tmp/test.raw bs=5474 count=1
	$ ./qemu-img convert -p -t none -T none -O raw /tmp/test.raw
	/tmp/dest.raw

	Works:
	$ dd if=/dev/zero of=/tmp/test.raw bs=5120 count=1
	$ ./qemu-img convert -p -t none -T none -O raw /tmp/test.raw
	/tmp/dest.raw

	Bug-Url: https://bugzilla.redhat.com/1282239
	Relates-To: https://bugzilla.redhat.com/1229394
	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-11-21  Nir Soffer  <nsoffer@redhat.com>

	gluster: Unbreak gluster management
	In commit 61d7427fc1 (build: Introduce --enable-gluster-mgmt option) we
	renamed makePublic, but only for the cli module used by vdsm, breaking
	gluster management.

	Since there are no tests for this code, the breakage was hidden. The
	only clue was a skipped test in gluster_cli_tests:

	    test_parseStorageDevices SKIP: cannot import name makePublic

	This patch completes the partial rename.

	Continuous-Integration: Jenkins CI

2015-11-20  Francesco Romani  <fromani@redhat.com>

	daemon: ignore cpu affinity on single processor
	If VDSM runs on single processor hosts (E.g. VMs)
	there is no point in enabling cpu affinity, since
	we already reached the goal of running on just one CPU.

	Bug-Url: https://bugzilla.redhat.com/1279431
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-11-20  Nir Soffer  <nsoffer@redhat.com>

	stomp: Drain pending bytes from ssl socket
	Since commit b2da4effe01f (asyncore: use default handing of read event),
	we are not handling pending bytes in ssl socket internal buffer.

	Stomp reactor was reading only 4096 bytes from the ssl socket buffer,
	and polling again the socket file descriptor.  Until the next packet
	arrived, we did not try to read the pending bytes from the ssl socket
	buffer.

	This broke migration when using jsonrpc. The destination host returned
	a big response, and the source host got stuck after the reading the
	first 4096 bytes, until the migration timed out.

	Now all available bytes in are read and processed in handle_read.

	Bug-Url: https://bugzilla.redhat.com/1274670
	Tested-By: pkliczewski <piotr.kliczewski@gmail.com>
	Tested-By: Milan Zamazal <mzamazal@redhat.com>
	Continuous-Integration: Jenkins CI

2015-11-20  Francesco Romani  <fromani@redhat.com>

	periodic: add __str__ methods
	We want to make as easy as possible to debug
	thread leaks from executor, so we make the periodic
	framework support provide meaningful str() representation,
	to be used by Executor.

	Bug-Url: https://bugzilla.redhat.com/1250839
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-11-20  Yeela Kaplan  <ykaplan@redhat.com>

	misc: remove rotateFiles
	Since commit 8bc23a66b409 (Make misc.py conform pep8 and other minor
	cleanup) in March 2012, rotateFiles does *nothing*. The tests
	are also broken; they pass while the function does nothing.

	Continuous-Integration: Jenkins CI

2015-11-20  Nir Soffer  <nsoffer@redhat.com>

	build: Introduce --enable-gluster-mgmt option
	Previously building gluster package and building for RHEV were coupled
	together in an ugly way. We disabled gluster package when building for
	RHEV, and enabled some gluster apis only when building for RHEV.

	We want to get rid of these downstream related options, but we also want
	to allow downstream maintainers easy way to configure the package as
	needed.

	This patch decouples rhev_build and with_gluster options; To build the
	vdsm-gluster package, use:

	    ./configure --enable-gluster-mgmt

	To build without vdsm-gluster package, use:

	    ./configure --disable-gluster-mgmt

	When gluster-mgmt is enabled, supervdsm exposes all gluster apis marked
	with @gluster_mgmt_api decorator. Most of these apis are used when vdsm
	is used to control gluster server.

	When gluster-mgmt is disabled, supervdsm exposes only the gluster vdsm
	apis marked as with @gluster_api. These apis are required for consuming
	gluster storage.

	Continuous-Integration: Jenkins CI

2015-11-19  Shmuel Melamud  <smelamud@redhat.com>

	Remove vdsm/vdsm-logrotate.conf from .gitignore
	vdsm/vdsm-logrotate.conf is no more generated, so removing it from
	.gitignore.

	Continuous-Integration: Jenkins CI

2015-11-19  Ala Hino  <ahino@redhat.com>

	gluster: Fixing connection when server is not one of the bricks
	When processing gluster connection info, volfileserver is set as provided by
	the admin and, using volume info, backup-volfile-servers option is set. However,
	there are use cases where gluster server and ovirt are configured differently
	regarding ip addresses and domain names. If volfileserver appears in volume
	info, it is removed in order to avoid mounting duplicate servers, otherwise,
	mounting duplicate servers is possible.

	Bug-Url: https://bugzilla.redhat.com/1278880
	Continuous-Integration: Jenkins CI

2015-11-19  Adam Litke  <alitke@redhat.com>

	storagetestlib: use a real metadata file for FileSD manifests
	When building a fake FileStorageDomainManifest place the metadata in
	the right place within the domain's file hierarchy (as opposed to
	keeping it in memory).  This is needed since code in VolumeMetadata
	sometimes instantiates its controlling manifest and the metadata must be
	present in the proper place when testing this code.

	Continuous-Integration: Jenkins CI

2015-11-19  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: better rollback
	Until now, OVS hook was not able to rollback after failed
	setup of non-OVS networks.

	Now it uses after_network_setup and after_network_setup_fail
	hook points to handle general rollback for all failures
	(both OVS and non-OVS).

	Before OVS setup we save initial OVS configuration to a temporary
	file via pickle. If an exception occurs during setupNetworks,
	API.py does the standard rollback. Then after_network_setup_fail
	is executed and runs setupNetworks with a special option _inOVSRollback
	which triggers OVS-only rollback. OVS-only rollback removes all
	OVS networks and recreates them according to configuration saved in
	the temprorary file. When everything is done, temporary file is
	removed.

	Continuous-Integration: Jenkins CI

2015-11-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using six.moves configparser to support ConfigParser in python3
	Continuous-Integration: Jenkins CI

2015-11-18  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: remove unused parameter
	Continuous-Integration: Jenkins CI

2015-11-18  Yeela Kaplan  <ykaplan@redhat.com>

	spec: remove leftover directories on host
	Remove vdsm data directory and vdsm python lib
	leftover directories on vdsm removeal.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1255114
	Continuous-Integration: Jenkins CI

2015-11-18  Francesco Romani  <fromani@redhat.com>

	tests: bootstrap sparsify tests
	Bootstrap the virtsparsify tests. We start testing
	the newly-refactored usage of cmdutils.Error.

	Continuous-Integration: Jenkins CI

	lib: cmdutils: add command to cmdutils.Error
	We add the command we attempted to run
	in cmdutils.Error, to make the troubleshooting
	a lot easier.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

	lib: sparsify: use common Error class
	the virtsparsify module used a slightly variant
	of the now-common Error class.
	This patch makes it conform to the common API,
	and use the common implementation, reducing duplication.

	Continuous-Integration: Jenkins CI

	lib: utils: consolidate Error class in one place
	Few utilities code have a duplicate Error exception, that
	they raise when one command run through utils.execCmd fails.

	Since this Error is closely related to utils.execCmd, we
	remove the duplicate definition of Error and we move it
	in one place.

	Continuous-Integration: Jenkins CI

2015-11-18  Yeela Kaplan  <ykaplan@redhat.com>

	hooks: remove directlun hook
	directlun hook can be deprecated as the feature
	is supported natively since ovirt-3.1.
	http://www.ovirt.org/Features/Direct_Lun

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234304
	Continuous-Integration: Jenkins CI

2015-11-18  Adam Litke  <alitke@redhat.com>

	storagetestlib: create images directory in the right place
	When building the images path, we do not need to append the sdUUID to
	the domaindir as it's already included in the domaindir.

	Continuous-Integration: Jenkins CI

	tests: Set common StorageDomainManifest fields automatically
	When creating storage domains it is common to request the same set of
	fields to be included in the initial metadata.  Do this automatically
	for tests which do not supply their own starting metadata.

	Continuous-Integration: Nir Soffer <nsoffer@redhat.com>

2015-11-18  Francesco Romani  <fromani@redhat.com>

	vm: more robust support of event strings
	Make vm.eventToString() more robust in presence
	of unexpected data, like libvirt events we don't support yet.

	Related-To: https://bugzilla.redhat.com/1273891
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-11-17  Nir Soffer  <nsoffer@redhat.com>

	hsm: Reformat device info dict
	Reformat device info dict in getDeviceList using one item per line and
	sorted. This make it easier to search and modify the code and creates
	nicer diffs.

	Continuous-Integration: Jenkins CI

	iscsi: Fix credentials initialization when not using CHAP
	There was a mismatch between the way we initialize ChapCredentials when
	receiving empty credentials from engine, and when reading empty
	credentials from active session.

	This was broken when we started to protect password with
	ProtectedPassword.  When getting a request from engine we used
	ProtectedPassword(""), while the iscsi code used None. This causes
	session disconnect to fail with "cred mismatch".

	Now we have a note explaining the dependency and we use the same way to
	initialize the credentials:

	- When receiving request from engine, empty username or password are
	  stored as None.
	- When reading requests from active session, empty username or password
	  are stored as None, including the special empty values "<NULL>" and
	  "(null)".

	Code was moved so username and password normalization is near
	ChapCredentials initialization in both flows.

	Bug-Url: https://bugzilla.redhat.com/1279485
	Reported-By: Elad Ben Aharon <ebenahar@redhat.com>
	Continuous-Integration: Jenkins CI

	issci: Fix equality and hash when username or password are None
	When fetching iscsi session info, username of password can be None, but
	iscsi.ChapCredentials was not handling these values correctly in __eq__
	and __hash__.  In particular, we used to compare password.value and
	include it in the hash. This would raise AttributeError when password is
	None.

	Now all combinations are handled properly; we compare password objects,
	using ProtectedPassword.__eq__, and include hash(password), using
	ProtectedPassword.__hash__.

	This issue was hidden because practically username is None when password
	is None, and the equality test fail before we try to compare None.value.
	The hash issue is hidden because we never use __hash__ for
	ChapCredentials. So this is mainly a correctness fix that should not
	effect current code, but it may be needed for fixing the related bug.

	Relates-To: https://bugzilla.redhat.com/1279485
	Continuous-Integration: Jenkins CI

2015-11-17  Fred Rolland  <frolland@redhat.com>

	hsm : Do not resize on disconnectStorageServer
	When a host is moved to maintenance state, it will
	disconnect from connected storage servers.

	Then, sdCache.refreshStorage() is called. It will rescan
	the devices, and attempt to resize devices if needed.

	However, in this flow, resizing devices is not needed and may
	cause exceptions when trying to access sysfs when the iscsi
	connections are being removed, and needlessly delay the
	maintenance operation.

	Bug-Url: https://bugzilla.redhat.com/1281909
	Continuous-Integration: Jenkins CI

2015-11-17  Adam Litke  <alitke@redhat.com>

	tests: FakeLVM test command failure
	Continuous-Integration: Jenkins CI

2015-11-17  Petr Horáček  <phoracek@redhat.com>

	hooks: after_network_setup_fail
	When an exception occurs during network setup, rollback is executed
	and after_network_setup is never triggered.

	This hook point triggers hooks right after setupNetworks fails and
	finishes its rollback.

	We need this for Open vSwitch hook. However, this hook point might
	be useful for other cases as well.

	Continuous-Integration: Jenkins CI

	net: fix systemd race in exec_ifup
	We set unique uuid for every systemd-run to not use the same unit
	twice and prevent systemd_run race (BZ#1259468). This uuid could be
	dropped when BZ#1272368 will be solved or when we use systemd >= v220.

	Bug-Url: https://bugzilla.redhat.com/1259468
	Continuous-Integration: Jenkins CI

2015-11-17  Nir Soffer  <nsoffer@redhat.com>

	infra: Use new concurrent.thread() utility
	This patch updates various infra stuff to use the new utility.

	Behavior changes:

	- clientIF recover thread is daemonic.
	- clientIF reactor thread is protected from silent failures.
	- supervdsmServer server thread is protected from silent failures.

	This patch does not update:

	- lib/yajsonrpc - will be handled by later patch
	- debug plugin - being removed in https://gerrit.ovirt.org/44724

	Relates-To: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2015-11-17  Francesco Romani  <fromani@redhat.com>

	vm: add support for "Crashed" event
	Libvirt recently added this event.
	We seen this first on libvirt 1.2.17 on ppc64le.

	Related-To: https://bugzilla.redhat.com/1273891
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	daemon: enable cpu affinity by default
	To run VDSM with CPU affinity enabled provided only
	(huge) benefits in the tests performed so far, so let's
	enable it by default.

	Also, fix a few tests that don't expect taskset
	to be enabled by default.

	Bug-Url: https://bugzilla.redhat.com/1279431
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-11-17  Shmuel Melamud  <smelamud@redhat.com>

	vm: Remove empty RNG devices left after 3.5->3.6 upgrade
	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 until the VM is
	rebooted. These devices do not contain 'source' spec param so they
	cause exceptions on newer VDSM versions that expect 'source' to be
	present.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1282581
	Continuous-Integration: Jenkins CI

2015-11-17  Yeela Kaplan  <ykaplan@redhat.com>

	janitorial: drop python-2.6-specific code
	Drop from sslutils, m2cutils and kaxmlrpclib.

	Continuous-Integration: Jenkins CI

2015-11-16  Nir Soffer  <nsoffer@redhat.com>

	storage: Use new concurrent.thread() utility
	This patch updates the storage subsystem to use the new utility.

	Behavior changes:

	- fcscan.Scan threads are protected from silent failures.
	- misc.Event notification threads are protected from silent failures,
	  and are daemonic.
	- misc.itmap threads are protected from silent failures and are
	  daemonic.
	- resourceManager.ResourceRef __del__ threads are protected from
	  silent failures and are daemonic.
	- sd.StorageDomain __del__ threads are protected from silent failures
	  and are daemonic.
	- sp.StoragePool upgrade threads are protected from silent failures
	  and are daemonic.
	- storageServer.ConnectionMonitor thread is protected now from silent
	  failures.
	- sync.AsyncCallStub call threads are protected from silent failures and
	  are daemonic (they were explicitily non-daemonic before).
	- task.Task __del__ threads are protected from silent failures and
	  are daemonic.
	- threadPool.WorkerThread threads are protected from silent failures

	Notes:

	- storage_mailbox.HSM_MailMonitor inherits now from object and keeps a
	  thread instance.
	- threadPool.WorkerThread inherits now from object and keeps an thread
	  instance.

	Relates-To: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	virt: Use new concurrent.thread() utility
	This patch updates virt subsystem to use the new utility.

	Behavior changes:
	- vm.Vm creation threads is protected from silent failures

	This patch does not modify some threads inheriting from threading.Thread
	instead of having a threading.Thread instance (migration.py, vm.py).

	Relates-To: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	lib: Use new concurrent.thread() utility
	This series eliminates some boilerplate code by using the new
	concurrent.thread() utility for creating threads.

	Mostly this does change the behavior of the existing code, except:

	- Thread that did not use @utils.traceback to prevent silent failures
	  are protected now automatically.

	- Non-daemon threads are now daemon threads that will never block the
	  application during shutdown. I believe this behavior is always what we
	  want, so I did not separated this change to another patch.

	The series includes various patches by subsystem: lib, storage,
	networking, virt, and infra.

	This patch updates the vdsm library to use the new utility.

	Behavior changes:

	- concurrent.tmap threads are protected from silent failures
	- netlink/monitor.Monitor threads are protected from silent failures
	- profiling/memory viewer thread is protected from silent failures

	Relates-To: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2015-11-15  Yeela Kaplan  <ykaplan@redhat.com>

	janitorial: bindingxmlrpc: remove Python-2.6 specific code
	Continuous-Integration: Jenkins CI

2015-11-14  Francesco Romani  <fromani@redhat.com>

	vm: reformat _EVENT_STRINGS
	Reformat code to make it easy to extend the known event list.

	Format-Only: yes
	Continuous-Integration: Jenkins CI

2015-11-14  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop gcc dependency
	Since we moved all C code out of Vdsm, we no longer need gcc during
	build time.

	Continuous-Integration: Jenkins CI

2015-11-13  Nir Soffer  <nsoffer@redhat.com>

	clusterlock: Remove unneeded workaround
	Sanlock 2.8 had a off-by-one bug when calling get_hosts with a host id,
	returning info for the next host. This bug is fixed in version 2.8-2.
	Now we can use the hostId parameter, making the call more efficient and
	simplifying clusterlock code.

	Bug-Url: https://bugzilla.redhat.com/1131192
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-13  Adam Litke  <alitke@redhat.com>

	FakeLVM: Simplify storage of lv metadata
	Nir pointed out that storing the LV metadata as a dictionary of
	dictionaries (first level is vg_name and second level is lv_name) can be
	error prone.  Instead, let's store in a single level dictionary using
	the tuple (vg_name, lv_name) as the key.

	Continuous-Integration: Jenkins CI

2015-11-13  Dan Kenigsberg  <danken@redhat.com>

	automation: support fc23
	Continuous-Integration: Jenkins CI

2015-11-13  Allon Mureinik  <amureini@redhat.com>

	secrets: Fix typo in clear()'s logging
	Continuous-Integration: Jenkins CI

2015-11-12  Francesco Romani  <fromani@redhat.com>

	lib: executor: log task name when discarded
	To improve the debuggability of the executor, we
	add the name of the task which was stuck/slow
	when a worker is discarded.

	Doing so it is easier to understand of what's going on
	and why workers are being replaced, instead of doing
	backtracking in the logs.

	Bug-Url: https://bugzilla.redhat.com/1250839
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-11-12  Sandro Bonazzola  <sbonazzo@redhat.com>

	automation: auto add required build dependencies
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1280219
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-12  Ido Barkan  <ibarkan@redhat.com>

	net: tests: test tc upper limit using iperf
	The test uses iperf to verify that the upper limit set by traffic
	control is imposed over the generated client.

	Continuous-Integration: Jenkins CI

	net: tests: support iperf3 for performance tests
	Support running iperf3 client server using context managers in an
	optional network namespace. This is handy for performance testing on
	a single machine. TC qos tests following patches use it.

	Continuous-Integration: Jenkins CI

2015-11-11  Shubhendu Tripathi  <shtripat@redhat.com>

	gluster: Added VDSM verb to stop gluster related processes
	Added a verb which stops the gluster related process like
	brick processes, gsyncd process.
	This needs to be done as part of a host moving to maintenance
	mode. as data should not be available if a host is moved to
	maintenence mode for some migration etc.

	Bug-URL: https://bugzilla.redhat.com/1205724
	Continuous-Integration: Jenkins CI

2015-11-10  Shahar Havivi  <shaharh@redhat.com>

	v2v: ova should support zip and extracted directory formats
	Bug-Url: https://bugzilla.redhat.com/1277879
	Continuous-Integration: Jenkins CI

2015-11-10  Adam Litke  <alitke@redhat.com>

	tests: FakeLVM add lvPath test
	Test the lvPath function.  Allow FakeLVM to be created without a
	temporary directory when it's not needed.  In that case, lvPath will
	return values just like real LVM: /dev/<vg_name>/<lv_name> .

	Continuous-Integration: Jenkins CI

2015-11-10  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: ensure that the 'primary' bonding option is recognized
	Continuous-Integration: Jenkins CI

2015-11-10  Yeela Kaplan  <ykaplan@redhat.com>

	spec: zombiereaper is not removed on vdsm upgrade
	Continuous-Integration: Jenkins CI

2015-11-10  Nir Soffer  <nsoffer@redhat.com>

	build: Use make for generating the test certificates
	It is easier to use make for creating files during the build instead of
	reimplementing it in a shell script.

	Continuous-Integration: Jenkins CI

2015-11-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	spec: use {name} instead of explicit vdsm
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	remove redundant tabs from vdsmd init script
	Continuous-Integration: Jenkins CI

2015-11-10  Francesco Romani  <fromani@redhat.com>

	sampling: fix semaphore misusing
	We should release the internal _sampling semaphore only
	if we acquired it succesfully.

	Otherwise, if a previous call was stuck, we violate the
	contract of the semaphore.

	Bug-Url: https://bugzilla.redhat.com/1250839
	Backport-To: 3.6
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-10  Ondřej Svoboda  <osvoboda@redhat.com>

	bonding defaults: for validation, we need to be aware of all options
	In the commit b01a096a, we started to use our bonding defaults database
	to validate bonding options (by name).  'primary' was not recognized as
	a bonding option because its default value is empty.  This patch adds
	the rest of valid, but initially empty, options, plus three new ones.

	ad_actor_sys_prio, ad_actor_system and ad_user_port_key have recently
	been added to the upstream kernel.  primary and arp_ip_target are
	empty by default.

	Bug-Url: https://bugzilla.redhat.com/1262496
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-11-09  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: executor based thread factory
	Creating new thread for every request is not efficient so we introduce
	usage of the executor for request processing.

	Continuous-Integration: Jenkins CI

2015-11-09  Ido Barkan  <ibarkan@redhat.com>

	net: fake sriov device hook
	This hook fakes both getVdsCaps and hostdevListByCaps to make VDSM
	report devices and capabilities of an SR-IOV capable host.

	Continuous-Integration: Jenkins CI

2015-11-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving the in from vdsm-logrotate.conf.in
	https://gerrit.ovirt.org/#/c/47833/ there are no more configure variable in
	the conf file

	Continuous-Integration: Jenkins CI

2015-11-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding call to configure passwd (libvirt sasl password)
	Between vdsm 4.16 vdsm used the user vdsm@rhevh as sasl user to 
	communicate with libvirt. Since Vdsm 4.17 we use vdsm@ovirt user
	and therefore need to reconfigure passwd. In 4.17 we moved the
	 place where we configure sasl password to vdsm-tool. 
	This patch call manually to passwd configurator during init
	 phase to avoid upgrade errors.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1276736
	Continuous-Integration: Jenkins CI

2015-11-07  Francesco Romani  <fromani@redhat.com>

	sampling: hoststats: remove unneeded attribute
	The HostStatsThread's sampleInterval instance attribute can easily
	be made a local variable. This patch does that.

	Continuous-Integration: Jenkins CI

	sampling: hoststats: use custom logger
	Now HostStatsThread uses its own logger instead
	the client-provided one, which was too generic anyway.

	Continuous-Integration: Jenkins CI

	sampling: hoststats: don't inherit from thread
	Inheriting from Thread is bad practice.
	This patch makes sampling.HostStatsThread use a thread attribute,
	favoring composition over inheritance.

	No intended functional changes.

	Continuous-Integration: Jenkins CI

2015-11-07  Adam Litke  <alitke@redhat.com>

	tests: FakeLVM add support for activateLVs
	Continuous-Integration: Jenkins CI

	tests: Streamline fake blockSD creation
	The BlockManifestTests test various functions of the
	BlockStorageDomainManifest by creating a mock blockSD using FakeLVM.
	Some tests created the storage domain's VG and others did not.  None of
	these tests created the other internal LVs needed for a properly
	functioning SD (ie. metadata, ids, etc.).  In order to unify the testing
	environment and prepare for additional sophistication in FakeLVM,
	converge make_vg and make_blocksd_manifest into a new function
	make_blocksd which does everything needed.  While sometimes we will set
	up more than is strictly necessary for some tests, the advantage of
	unified setup is far more important.

	Continuous-Integration: Jenkins CI

	tests: FakeLVM support initialTag when creating LV
	Continuous-Integration: Jenkins CI

	tests: FakeLVM create inactive LV
	Test that the 'activate' argument of createLV results in the appropriate
	values in the LV properties.

	Continuous-Integration: Jenkins CI

	tests: Add FakeLVM LV properties tests
	Building on the example environment in FakeLVMSimpleVGTests we create a
	single logical volume.  We then verify that the properties and
	attributes of that LV match what is returned by the real lvm module.
	Some problems were found in FakeLVM and are resolved here.

	Since createLV accepts the size in MB, two of the manifest_tests needed
	to be fixed.

	Continuous-Integration: Jenkins CI

	tests: Add FakeLVM PV properties tests
	When using the lvm module to create a VG from one or more devices, those
	devices are converted into PVs implicitly.  The lvm module can return
	information about these PVs.  Add some basic tests to verify the PV
	properties against real lvm module output.

	Continuous-Integration: Jenkins CI

	tests: Add initial FakeLVM tests and fix errors
	The FakeLVM class inside storagefakelib.py is becoming increasingly
	complex.  In order to ensure that FakeLVM is providing correct LVM
	emulation we need to test its output against what a real LVM environment
	would present.

	This first patch introduces the new test module and adds some tests for
	createVG and getVG.  We test that the VG properties and attributes
	returned match a real LVM installation.  After writing these tests I
	found and fixed several errors in the existing FakeLVM implementation.

	Continuous-Integration: Jenkins CI

2015-11-06  Yeela Kaplan  <ykaplan@redhat.com>

	tests: functional - add ability to run over jsonrpc
	Will run functional tests by default over xmlrpc.

	The user is now able to configure the functional tests
	to run over jsonrpc.

	Added needed verbs to jsonrpc cli and make result of
	response compatible with older xmlrpc.
	Also, set higher timeout for slow network tests.

	Continuous-Integration: Jenkins CI

2015-11-05  Francesco Romani  <fromani@redhat.com>

	sampling: remove HostStatsThread.get()
	Remove the get() operation of HostStatsThread,
	in order to decouple the code that stores sample and
	the code that produce the stats.

	Continuous-Integration: Jenkins CI

2015-11-04  Yeela Kaplan  <ykaplan@redhat.com>

	jsonrpc cli: allow client to return compatible results to xmlrpc
	Bridge transforms the return value for different verbs
	results returning from vdsm API.
	Some code expects the old return results of API
	compatible with xmlrpc.

	The compat parameter allows us to return a value
	that is compatible with the way xmlrpc is parsed
	and we'll be able to remove this once we stop
	supporting xmlrpc API.

	Until then using this intermediate step is the most
	straight-forward way and saves us the unnecessary
	hassle of re-translating the bridge work
	once its done parsing the result from API.

	Continuous-Integration: Jenkins CI

	jsonrpc cli: Allow setting timeout for long operations
	Current timeout for operations over jsonrpc is 15
	seconds.
	Some operations are slower and require
	more time.
	We want to allow those to set a timeout separately.
	If no new timeout is supplied we use the default
	jsonrpc timeout.

	Continuous-Integration: Jenkins CI

2015-11-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding policycoreutils-python-utils dependency for fedora 23 and above
	semanage utility has moved to policycoreutils-python-utils in f23 and 
	needs to be required as part of vdsm installation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1246626
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-04  Yeela Kaplan  <ykaplan@redhat.com>

	init: compatible comment on upgrade
	Make comments compatible on upgrade from 4.16
	and 4.10.

	Continuous-Integration: Jenkins CI

2015-11-04  Francesco Romani  <fromani@redhat.com>

	tests: monkey patch architecture if unsupported
	Following the effort to make vdsm no-arch dependent,
	some tests fails while running on unsupported platforms.
	This patch monkey-patches the tests, reporting a fake arch
	(x86_64) if code is running on unsupported arch;
	otherwise, the real arch is used, as before.

	Continuous-Integration: Jenkins CI

2015-11-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Raise python-cpopen requirement to 1.4
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1264667
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-11-03  Francesco Romani  <fromani@redhat.com>

	sampling: remove overcautious cpu count check
	It is very unlikely SC_NPROCESSORS_ONLN will ever be
	less than 1. The existing defensive code is more likely
	to hide a bug somewhere else.

	Continuous-Integration: Jenkins CI

	sampling: HostSample always gets current cpus
	To have HostSample report more faithful information, and
	to decouple HostStatsThread and hoststats.produce(),
	we now compute each time the current number of online cpus.

	Previously, this was done anche at initialization time.

	Continuous-Integration: Jenkins CI

	periodic: document missing VmDispatcher argument
	We forgot to document the 'timeout' argument
	of VmDispatcher's __init__.

	Documentation-Only: yes
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	sampling: rename attributes for clarity
	VMBulkSampler has one ExpiringCache to track VMs/Domains believed
	to be stuck, in order to avoid further clogging.
	Due to an old mistake, the 'ttl' of this cache was set using a variable
	named 'timeout'. The choice of names is unfortunate and source of
	confusion.

	This patch fixes that.

	Rename-Only: yes
	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	virt: periodic: reduce NotConnectedError noise
	The periodic operations have known races on
	VM startup and on VM shutdown.

	These races are because periodic are asynchronous with
	respect to the VM startup/shutdown, and they are benign
	because operations will just be always retried again in
	the next periodic cycle.

	This is particularly visible on loaded servers and/or
	slowly-responsive libvirt.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	virt: periodic: factor out periodic operations
	Factor the periodic operation implementations
	using a common subclass.
	This patch has little benefit on its own, but
	helps to reduce the size of the followup patches.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	tests: v2v: refactor tests to make it extensible
	Refactor the current tests to make it easier to
	add new ones reusing existing code.

	Besides refactoring, the only change is that
	testGetExternalVMs tests for an handful of VMs,
	instead of just one.

	Continuous-Integration: Jenkins CI

2015-11-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Having logrotate configuration to rotate coredump directory as root user
	As vdsm configures logrotate rule to rotate /var/log/core directory,
	which output coredump files for all processes - such as once that runs
	as root - it should perform the rotation as root user as well, otherwise
	rotating libvirt coredump will be ignored with permission denied error.

	This is an ancient regression introduced while fixing rhbz#772591 with
	commit 951b41d.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1265547
	Continuous-Integration: Jenkins CI

2015-11-03  Yeela Kaplan  <ykaplan@redhat.com>

	json cli: use ssl when creating a socket
	We want to be compatible with xmlrpc cli using regular ssl,
	instead of default m2crypto.

	During handshake, m2crypto is trying to compare the hostname
	given to the certificate hostname which might not
	always be compatible.
	Default ssl is doing the handshake without it,
	helping us avoid this incompatibility with
	no harm to performance.

	Continuous-Integration: Jenkins CI

2015-11-03  pkliczewski  <piotr.kliczewski@gmail.com>

	vdscli: map invocation params to dictionary
	We need to be more flexible with parameters provided during execution of
	vdscli methods. Now we use api schema to name all the params so we can
	match them properly on the server side.

	With this change we can call vdscli methods as regular method and do
	mapping behind the scene.

	Code used for xmlrpc looked like:

	self.vdscli.addNetwork(bridge,
	                       *self._get_net_args(vlan, bond, nics, opts))

	In above case we are required to prepare named params as array.

	Now we can call it:

	self.vdscli.addNetwork(bridge,
	                       vlan=vlan, bond=bond, nics=nics, opts=opts)

	as well as we can provide only optional params as we want.

	This is first step which enable us to provide client side schema
	validation.

	It is required to extract schema files from jsonrpc rpm due to
	dependency needed for python rpm. Now we make schema rpm required for
	jsonrpc and python rpm.

	Continuous-Integration: Jenkins CI

2015-11-03  Ondřej Svoboda  <osvoboda@redhat.com>

	caps: remove no longer used _REQUIRED_BONDINGS
	Continuous-Integration: Jenkins CI

2015-11-03  Adam Litke  <alitke@redhat.com>

	tests: Introduce schema parsing tests
	We currently have some tests that test the schema tokenizer but we don't
	have any tests to verify that the tokens are parsed correctly into a
	schema.  Introduce a new set of tests to do some really basic
	verification of the API builder.

	Continuous-Integration: Jenkins CI

2015-11-02  Yeela Kaplan  <ykaplan@redhat.com>

	init: configure multipath on upgrade from ovirt-3.5
	multipath configurator was added to vdsm-tool
	in ovirt-3.6.
	In case we upgrade from ovirt-3.5 we now run configure of
	module multipath in init script.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1276736
	Continuous-Integration: Jenkins CI

2015-11-02  Douglas Schilling Landgraf  <dougsland@redhat.com>

	utils: replace import for persist/unpersist
	Use the new ovirt-node Config class for persist/unpersist commands.
	The previous persist/unpersist provider uses /tmp/ovirt.log
	and might affect the vdsm start as missing ownership of file.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1274063
	Continuous-Integration: Jenkins CI

2015-11-01  Petr Horáček  <phoracek@redhat.com>

	net: tests: test_rollback
	A simple rollback test.

	Continuous-Integration: Jenkins CI

2015-10-30  Erez Freiberger  <erezfrei@gmail.com>

	caps.py: import rpm only if available
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-10-29  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: AsyncDispatcher tests suite
	Continuous-Integration: Jenkins CI

2015-10-29  Ido Barkan  <ibarkan@redhat.com>

	fix shell_helper  to install vdsm-api rpm
	7553e6 added sa new rpm that needs to be explicitly installed by the
	script.

	Continuous-Integration: Jenkins CI

2015-10-29  Amit Aviram  <aaviram@redhat.com>

	hotunplug: Supporting lun and cinder disks fix.
	While hotunplugging, VDSM queries libvirt for the unplugged disk to
	verify it was removed. This check is in _isDriveAttached, which verifies
	that the disk's serial is no longer among the VM's disks. As LUN disks
	and Cinder disks currently do not have a serial specified in VDSM flows,
	after unplugging, _isDriveAttached queries for empty disk serial to
	detect whether the disk is still there, and returns true in case there
	are disks with empty serials- such as CD-ROM disks.

	This patch fixes _isDriveAttached to check the disk's presence by
	verifying that the disk's path no longer exists in the xml, rather
	than the serial- to make it return the right value when unplugging
	LUN and Cinder disks.

	Bug-Url: https://bugzilla.redhat.com/1270834
	Continuous-Integration: Jenkins CI

2015-10-29  Adam Litke  <alitke@redhat.com>

	DynamicBridge: Log TypeError exceptions raised during dispatch
	When dispatching via the DynamicBridge, the dispatched function may
	raise a TypeError (typically due to a coding error).  Currently we
	swallow the TypeError and raise InvalidCall instead.  This hides the
	underlying problem making it harder to fix.  Keep the current behavior
	but log the original exception too.

	Continuous-Integration: Jenkins CI

	bridge: Fix logging in dispatch
	The dispatch function in DynamicBridge tries to log using an
	uninitialized instance variable.  Also, logging was not imported by this
	module.  Fix both of these problems.

	Continuous-Integration: Jenkins CI

2015-10-29  Francesco Romani  <fromani@redhat.com>

	lib: taskset: commands should run on all cpus
	The current affinity reset logic has a bug in the
	case the sysadmin puts offline one or more cpu.
	This is because we use the range notation, with
	the upper limit given by sysconf('SC_NPROCESSORS_ONLN')-1

	Let's say we have 16 cpus, and sysadmin puts offline
	cpu #11. Now we will have 15 online cpus, so we'll
	build our range as 0-14, which excludes the perfectly
	fine cpu #15.
	Note that the range still includes the offline CPU, but
	it is safe to trust the kernel NOT to use it.
	However, this buggy logic make VDSM rule out TWO cpus,
	one implicitely (included in range, but offline), plus
	the one erroneously excluded by the range.

	To fix this, we simply always use SC_NPROCESSORS_CONF
	to express the maximum physical range, and we let the
	kernel handle the holes on this range.

	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Jenkins CI

2015-10-29  pkliczewski  <piotr.kliczewski@gmail.com>

	build: missing data file
	My local build fails with missing data file.


	Continuous-Integration: Jenkins CI

2015-10-29  Francesco Romani  <fromani@redhat.com>

	vm: remove _reportError
	Vm._reportError was an early attempt to build what
	we have now with response.error().

	With the new code in place there is no more reason
	to use it, so this patch removes it.

	Continuous-Integration: Jenkins CI

	API: use modern locking around VM.destroy
	cleanup a bit VM.destroy() without functional changes:

	- log outside the lock
	- use context managers for lock

	Continuous-Integration: Jenkins CI

	recovery: split long recovery function
	Split the long recovery function in clientif in subfunctions,
	one for each recovery stage.

	No planned change in functionality.

	Continuous-Integration: Jenkins CI

2015-10-29  pkliczewski  <piotr.kliczewski@gmail.com>

	ssl: change default protocol
	We used 'sslv23' but when Paddle (CVE-2014-3566) was found it
	is recommended to switch to 'tlsv1'. On some of the OSes we
	see issues that it is already sslv3 is disabled and users need
	to switch to tls.

	There is an issue when we switch to tls older engines (<= 3.0)
	are not able to talk to vdsm anymore.


	Bug-Url: https://bugzilla.redhat.com/1229765
	Continuous-Integration: Jenkins CI

2015-10-28  Fred Rolland  <frolland@redhat.com>

	lvm: Use udev cache for obtaining device list
	Due to udev issues, the udev cache was ignored when obtaining
	the device list.
	Since these issues are fixed in Fedora 21 and RHEL 7, the lvm
	configuration can be reverted to use the udev cache.

	Original bug : https://bugzilla.redhat.com/1014942

	Bug-Url: https://bugzilla.redhat.com/1272027
	Continuous-Integration: Jenkins CI

2015-10-27  Francesco Romani  <fromani@redhat.com>

	vmstats: take in account missing bulk stats fields
	One of the cornerstones of how libvirt's bulk stats work is
	accumulate as much as we can, raise errors only on the most
	critical paths.

	This was well understood for actual sampled data, e.g. disk
	traffic, network traffic, but was unexptected for static (meta)
	data, like interface/block name.

	We discovered in the SR-IOV case that this can indeed be true,
	so we add defensive code for this scenario, taking into account
	that also the static data may be absent.
	This also means that the '<group>.count' attribute
	(e.g. net.count, block.count) must be considered an upper bound,
	not an exact amount.

	It is worth checking if the observed behaviour it is actually OK
	inside libvirt; anyway, this added defense fits nicely in the
	bulk stats consuming code.

	Bug-Url: https://bugzilla.redhat.com/1273837
	Continuous-Integration: Jenkins CI

	recovery: move from clientIF to virt package
	The code with recover VMs belongs to the virt vertical,
	and was part of clientIF mostly for historical reasons.

	To unclutter a bit the codebase, and to move forward the long
	term goal to drop clientIF, this patch moves the vm recovery
	code into a new virt module (virt/recovery.py).

	Along the way, we also modernize the names and make them pep8
	friendly. Besides that, there are no changes in logic.

	Tests will follow up in a future patch.

	Continuous-Integration: Jenkins CI

2015-10-26  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: update testSetupNetworksAddDelDhcp
	Test testSetupNetworksAddDelDhcp was changed in networkTests.py,
	now its copy in networkTestsOVS.py is updated as well.

	Continuous-Integration: Jenkins CI

2015-10-26  pkliczewski  <piotr.kliczewski@gmail.com>

	schema: rpm for jsonrpc schema files
	We need to use schema files outside of vdsm for external clients and in
	the future for the engine. In order to do it we need to have separate
	rpm which provides required files.

	We introduced new package which is used for storing vdsmapi module. Spec
	files are stored in the same places as before.

	Continuous-Integration: Jenkins CI

2015-10-26  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: rework reporting of DHCPv4/6 on network devices
	This patch addresses the same problem [1] as commit b92edb but
	hopefully in a more readable, verbose way.

	[1] DHCP still being reported for hours after a network got static
	IP configuration, because reporting is based on dhclient's leases.

	Bug-Url: https://bugzilla.redhat.com/1184497
	Continuous-Integration: Jenkins CI

	netinfo: silence one more needless debug
	It is perfectly okay for network definition not to contain 'bootproto'
	and/or 'dhcpv6' parameter in case the network's addressing is to be
	configured statically.

	Continuous-Integration: Jenkins CI

2015-10-25  Ido Barkan  <ibarkan@redhat.com>

	net: Support VLAN hardware offloading in hostQOS
	Apparently, the tc filter that VDSM uses to classify 802.1q traffic
	is not working when the kernel offloads VLAN tagging to the underlying
	physical nic.
	This is because the VLAN field in the link layer header is only added
	by the hardware and is not present by the time the filter inspects it.
	Since the filter uses a straight forward matcher which only looks at
	the headers it fails to match and the packets aren't classified to the
	desired queuing discipline (qdisc).
	Using a kernel packet meta data matcher should work regardless of VLAN
	tagging offloading is enabled.

	Bug-Url: https://bugzilla.redhat.com/1271205
	Continuous-Integration: Jenkins CI

	net: Report correct (guest) pci address fot hostdev interfaces.
	For network interfaces, the address is a direct child of the
	interface node. For host device interfaces, the host address may
	appear before the guest address and be reported instead.

	Bug-Url: https://bugzilla.redhat.com/1261352
	Continuous-Integration: Jenkins CI

	net: SRIOV API change.
	Before this patch, Vdsm API for attaching an SRIOV network device to
	a VM was using type=hostdev. This caused SR-IOV network devices to be
	reported twice (by _getUnderlyingNetworkInterfaceInfo) back to the
	engine, and causing all sorts of UI bugs. Fixing the reporting API
	also changes the way VDSM serializes its data to the disk in order
	to recover from a restart, and so, during recovery, a 'new' device is
	deserialized, which VDSM cannot handle correctly.
	As an example, since it is not a host device, but a network device,
	it will not get detached from the host when the VM is powered off,
	and we get a lost, unusable VF.
	In order to fix this properly, the reporing API and the incoming API
	must match. To do so, the SRIOV XML creation logic was moved into the
	Interface device class, and the VM object was taught how to also
	attach/detach SRIOV devices, when needed.

	note:
	Since the API of attaching a simple network device already supports
	passing macAddr parameter, this should be taken out of specParams as it
	was when type=hostdev and passed directly. specParams are left to hose
	only an optional vlanid parameter.
	this requires a matching Engine-side patch
	I9d26df0f850d395c6ef359d9e4c404856e2f649d

	Bug-Url: https://bugzilla.redhat.com/1261352
	Continuous-Integration: Jenkins CI

2015-10-25  Adam Litke  <alitke@redhat.com>

	Don't prepare image with illegal volumes
	The irs verb 'prepareImage' is used only by clientIF when preparing the
	host to start a VM.  Currently, this operation succeeds even if one or
	more of the volumes in the image is illegal.  Since we should never
	permit a VM to start with an illegal disk, check for this and report an
	error if any illegal volumes are found.

	The pivot stage of a live merge operation depends on this behavior to
	ensure that a VM is not accidentally started using a stale leaf volume.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1206722
	Continuous-Integration: Jenkins CI

2015-10-25  pkliczewski  <piotr.kliczewski@gmail.com>

	debian: vdsm-jsonrpc package definition
	This definition is required to update debian dependency for new vdsm-api
	package. Definition copied from https://gerrit.ovirt.org/#/c/37737.


	Continuous-Integration: Jenkins CI

	ssl: runtime config to choose implementation
	During build process we provide which ssl implementation is set as
	default depending on distribution we are building for. We can change the
	configuration value used in runtime by updating config.py. Vdsm reboot
	is required after the update. There are two options supported
	- m2c - m2crypto is used
	- ssl - standard ssl module is used

	For debian we only support standard ssl module.

	Continuous-Integration: Jenkins CI

	log: failure in logging
	We need to reimplement log_info method since it has a bit different
	signature than log method and with previous approach it fails with:

	TypeError: not all arguments converted during string formatting

	Continuous-Integration: Jenkins CI

2015-10-22  Martin Betak  <mbetak@redhat.com>

	vm: extract migration completion check
	Extracted the check for recovery completion into separate method to simplify
	consequent migration enhancements.

	Wiki: http://www.ovirt.org/Features/Migration_Enhancements
	Continuous-Integration: Jenkins CI

2015-10-22  Francesco Romani  <fromani@redhat.com>

	tests: v2v: add test for commit fb4c72a
	In commit fb4c72a we made sure to continue to extract VM information
	if the call to get allocation and capacity failed.
	This patch adds one test to make it unlikely to break this again.

	Bug-Url: https://bugzilla.redhat.com/1265556
	Continuous-Integration: Jenkins CI

2015-10-22  Ido Barkan  <ibarkan@redhat.com>

	net: add simple network namespace functions to ipwrapper
	Adding simple wrappers for adding, deleting, and executing ip commands
	in other namespaces.

	Continuous-Integration: Jenkins CI

2015-10-21  Nir Soffer  <nsoffer@redhat.com>

	spec: Unbreak build on rhel
	centos is not defined, breaking the build on a rhel machine.

	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Jenkins CI

	multiapth: Require newer multiapth version
	Multipath did not identify iscsi devices correctly, so their session
	recovery_tmo was not configured correctly. This caused slow failover
	when path is having trouble, and may lead to blocking of multiple vdsm
	threads for many minutes.

	This issue was fixed in device-mapper-multipath in some of the supported
	platforms:

	platform        version                 #bug            available
	------------------------------------------------------------------
	RHEL 7.2        0.4.9-82.el7            bz1254292       yes
	RHEL 7.1        0.4.9-77.el7_1.2        bz1267131       yes
	Fedora 22       0.4.9-73.fc22.1         bz1256074       yes
	Fedora 21       0.4.9-68.fc21.6         bz1261141       no
	CentOS          na                      na              no

	We require now new version where it is available. We will update the
	requirement when the fix is available on other platforms.

	Bug-Url: https://bugzilla.redhat.com/1255173
	Bug-Url: https://bugzilla.redhat.com/1256081
	Backport-To: 3.6
	Backport-To: 3.5
	Relates-To: https://bugzilla.redhat.com/880738
	Continuous-Integration: Jenkins CI

2015-10-20  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: reducing log footprint from stomp lib
	There was bunch of not needed information about being not able to
	process disconnect frame (part of the spec and expected). We made
	vdsm aware of disconnect frame and few headers which are required
	to validate the frame. 

	We removed log statement which generate the most information
	about message being sent but it do not bring any value when
	debugging issues.


	Bug-Url: https://bugzilla.redhat.com/1239062
	Continuous-Integration: Jenkins CI

2015-10-20  Francesco Romani  <fromani@redhat.com>

	sampling: move translation code into hoststats.py
	Move all the functions that produce host stats
	from HostSamples into hoststats.py, like
	we did for vmstats.py.

	Continuous-Integration: Jenkins CI

2015-10-20  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix too delicate timings
	Executor slow tests were using racy timings which caused random
	failures. Adjust the timing to give 0.1 threads 0.1 second to finish.

	We should replace the timeouts with events to make the tests
	faster and less fragile.

	Continuous-Integration: Jenkins CI

2015-10-19  Ido Barkan  <ibarkan@redhat.com>

	move _kill_and_rm_pid to utils
	Further patches will use it in nettestlib.py

	Continuous-Integration: Jenkins CI

	net: qos: change top qos api
	Qos top api calls, configure_outbound and remove_outbound now take a
	name of a physical device and a vlan_tag (that can be None). this
	removes network object related code out of qos specific code and
	simplifies unit testing.

	Continuous-Integration: Jenkins CI

	net: tests: additional tests for host QOS
	These tests test the public api of the qos module, which is the topmost
	api that is called by the networking code. The tests create devices,
	configure outbound QOS on them, and inspect the QOS entities created by
	the code.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-10-19  Nir Soffer  <nsoffer@redhat.com>

	spec: Require newer kernel version for RHEL
	iSCSI default replacement_timeout is 120 seconds, resulting in too slow
	iSCSI failover in multipath setup. In vdsm, this may lead to blocking of
	multiple unrelated vdsm threads for many minutes, when lvm, multipath
	ore scsi scan operation blocks.

	This issue was resolved in multipath (BZ1099932), by configuring iscsi
	session recovery_tmo sysfs attribute to multipath fast_io_fail_tmo
	value, (5 seconds in vdsm configuration). However, this configuration
	was reverted to the default 120 seconds after a device went down an up
	again, or after restart of the iscsid daemon (BZ1139038).

	This issue was fixed in kernel 3.10.0-229.17.1.el7. In this version,
	setting session recovery_tmo using sysfs overrides the default value
	defined in iscsid configuration file.

	This fix is not available in CentOS, so we require the new kernel only
	when RHEV build.

	Bug-Url: https://bugzilla.redhat.com/980139
	Backport-To: 3.6
	Backport-To: 3.5
	Relates-To: https://bugzilla.redhat.com/1099932
	Relates-To: https://bugzilla.redhat.com/1139038
	Continuous-Integration: Jenkins CI

2015-10-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Modifying _cleanOldFiles to current _cleanRecoveryFile and avoid naked tryblock
	There are no extensions besides .recovery since ovirt-3.0 so this patch
	modifies the condition to look for [vmid].recovery files and clean them
	during vdsm initialization phase.

	Continuous-Integration: Jenkins CI

2015-10-18  Nir Soffer  <nsoffer@redhat.com>

	resourceManager: Avoid unneeded recursive locking
	In registerNamespace, when force registering an existing namespace, we
	first try to remove the existing one using unregisterNamespace. Since
	both public methods acquire an exclusive lock, we must use a recursive
	lock to avoid deadlock.

	This patch removes the need for recursive lock by extracting the
	unregisterNamespace logic into private _unregisterNamespaceLocked
	method, and using it from the public method.

	Continuous-Integration: Jenkins CI

2015-10-17  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: more meaningful name of address param
	During previous changes we agreed to fix address param naming to give
	more information what kind of address is contained there.


	Continuous-Integration: Jenkins CI

2015-10-17  Nir Soffer  <nsoffer@redhat.com>

	multipath: Fix multipath.conf selinux labels
	When configuring multipath.conf, we were leaving multipath.conf with
	incorrect selinux label:

	    # ls -z /etc/multipath.conf
	    -rw-r--r--. root root unconfined_u:object_r:etc_t:s0 /etc/multipath.conf

	Now we restore the default selinux context on the temporary file before
	renaming, so the final selinux labels are:

	    # ls -z /etc/multipath.conf
	    -rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/multipath.conf

	Due to a bug in libselinux python bindings [1], we set the label only if
	selinux is enabled. This bug is fixed in upstream now.

	[1] https://bugzilla.redhat.com/1264701

	Backport-To: 3.6?
	Continuous-Integration: Jenkins CI

	muiltipath: Unbreak configure on ovirt node
	In commit commit 4d51f0df2d (multipath: Write multipath.conf atomically)
	we replaced file copy with rename. This make the operation atomic but it
	does not work on ovirt node, because multipath.conf is a bind mount.

	On ovirt node we cannot do atomic rename; we must unpersist the
	multipath.conf before the rename and persist it after the rename. If we
	crash after unpersisting and before persisting multipath.conf will be
	missing after a reboot. We can do nothing about this.

	Other platforms are not effected since utils.unpersist() and
	utils.persit() do nothing on other platforms.

	Continuous-Integration: Jenkins CI

2015-10-16  Nir Soffer  <nsoffer@redhat.com>

	Remove duplicate permissions checks
	The test is calling _check_content which call _check_permissions, so
	there is no point in testing the permissions again.

	Continuous-Integration: Jenkins CI

2015-10-16  pkliczewski  <piotr.kliczewski@gmail.com>

	asyncore: use default handing of read event
	It seems that we provided our own handle_read_event method due to
	assumption that we need to distinguish between fds which support
	pending and not. There are two fd types which do not provide pending
	method: plain socket and AsyncoreEvent which uses EventFD. Only our
	implementations of sslsocket provide pending.

	Default implementation do not care about it because it is not using
	pending and after several iteration of testing it seems to be OK.

	Continuous-Integration: Jenkins CI

2015-10-16  Fred Rolland  <frolland@redhat.com>

	hsm: Add initialSize argument to createVolume
	Add the possibility to specify the volume initial size,
	for block disk with thin provisioning.

	This argument is needed when importing a VM from an external
	provider along with its disks. If one of the VM existing disk
	is a block disk with thin provisioning, the new volume needs
	a starting size as the original disk size.

	If the initial size is not specified, the default initial
	volume size for thin provisioning is the configured
	volume_utilization_chunk_mb (1GiB by default)

	Bug-Url: https://bugzilla.redhat.com/1221603
	Continuous-Integration: Jenkins CI

2015-10-16  Nir Soffer  <nsoffer@redhat.com>

	hsm: Remove support for size in sectors as int
	We used to support volume size either as number of sectors using int, or
	as number of bytes using a string. Engine is using size in bytes since
	first git commit. Hosted engine setup is also using size in bytes.  We
	don't know about old code using number of sectors.

	This patch removes the support for size in sectors.  To prevent
	incorrect usage we raise InvalidParameterException if called with an
	integer.

	Bug-Url: https://bugzilla.redhat.com/1221603
	Continuous-Integration: Jenkins CI

	betterAsyncore: Override asyncore logging to use our logger
	asyncore.dispatcher is using its own logging subsystem writing to stderr
	or to stdout, which is useless in a daemon environment when both
	descriptors are redirected to /dev/null.

	This patch overrides the logging function so they write to our logger.

	Tested using the shell:

	    >>> import logging
	    >>> logging.basicConfig(level=logging.DEBUG)
	    >>> from yajsonrpc.betterAsyncore import Dispatcher
	    >>> d = Dispatcher()
	    >>> d.log("foo")
	    DEBUG:vds.dispatcher:foo
	    >>> d.log_info("foo")
	    INFO:vds.dispatcher:foo

	Continuous-Integration: Jenkins CI

	betterAsyncore: Fix AttributeError on disconnect
	Recently we added logging when SSLError is raised during recv(), which
	happens when a client disconnects in an unclean way. Unfortunately,
	logging the error raises an AttributeError and fail to close the
	connection as intended:

	    >>> from yajsonrpc.betterAsyncore import Dispatcher
	    >>> d = Dispatcher()
	    >>> d.log.error("message")
	    Traceback (most recent call last):
	      File "<stdin>", line 1, in <module>
	    AttributeError: 'function' object has no attribute 'error'

	Dispatcher.log is a method, not a logger instance.

	This patches adds a "vds.dispatcher" logger and use it to log the
	message.

	Since this is an expected event, and logging error and warnings is also
	duplicated to the system log, we use now info message.

	Bug-Url: https://bugzilla.redhat.com/1272496
	Backport: 3.6
	Continuous-Integration: Jenkins CI

2015-10-16  Ido Barkan  <ibarkan@redhat.com>

	Fix vlan tagging missing XML node for sr-iov.
	This is an integration bug between the VDSM and RHEV-M. The vlanid
	parameter was passed in the API with the wrong case, hence was not
	passed down to libvirt api.

	Bug-Url: https://bugzilla.redhat.com/1271697
	Continuous-Integration: Jenkins CI

2015-10-15  pkliczewski  <piotr.kliczewski@gmail.com>

	ssl: ssl socket may throw sslerror during reading
	When client closes socket in not clean way sometimes we can get SSLError
	with unexpected eof. When this situation occurs we need to make sure to
	handle this situation properly.

	Bug-Url: https://bugzilla.redhat.com/1256446
	Continuous-Integration: Jenkins CI

2015-10-15  Nir Soffer  <nsoffer@redhat.com>

	tests: Skip test if mounting loop device failed
	Most of the mount loop device error are eliminated now, but
	mkimage.mkIsoFs still fail randomly in the CI.

	Since this is not a test failure but error in setting up the test, there
	is no point in failing the build randomly, annoying developers working
	on unrelated changes.

	We will have to dive into this error later to understand why it happens
	and what is the real fix to avoid it.

	Continuous-Integration: Jenkins CI

2015-10-14  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: allow to mock monotonic_time method
	Continuous-Integration: Jenkins CI

	tests: AsyncClient test suite
	Continuous-Integration: Jenkins CI

	stomp: send unsubscribed frame only if there was subscription
	Continuous-Integration: Jenkins CI

	tests: StompAdapter test suite
	Continuous-Integration: Jenkins CI

	jsonrpc: ignore unknown message id
	When we received jsonrpc request which is missing an id we need to make sure
	that we are able to ignore it without blowing up. Current client code base
	will make sure that requests have ids at all times but we need to cover edge
	cases like this since we have mini broker capabilities and any client could be
	used.


	Continuous-Integration: Jenkins CI

2015-10-14  Petr Horáček  <phoracek@redhat.com>

	tests: networkTests: use addrAdd instead of dummy.setIP
	dummy.setIP was removed in 270caa05edaa56e93e188d35c4db7770f0ef42d8.
	Use addrAdd directly instead.

	Continuous-Integration: Jenkins CI

2015-10-14  Ondřej Svoboda  <osvoboda@redhat.com>

	iproute2, pyroute2: restore split() on bonding options
	split() was lost in commit a3bb8de5 (remove_custom_bond_option
	returns a string!)

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-10-14  Adam Litke  <alitke@redhat.com>

	VolumeMetadata: Move voltype property
	Continuous-Integration: Jenkins CI

	VolumeMetadata: Move oop to FileVolumeManifest
	Continuous-Integration: Jenkins CI

	VolumeMetadata: Introduce class structure
	Most of the existing volume-related code deals with manipulating volume
	metadata.  This includes functions like: isLeaf, setLeaf, getInfo,
	getSize, etc.  The remaining code implements operations which are
	codependent on an SPM architecture with storage pools, master storage
	domains, and persistent asynchronous tasks with recovery and rollback.

	In order to operate without a storage pool and storage pool manager, we
	need a new set of APIs that will want to reuse the metadata volume
	operations but not the SPM-specific code.  Thus, we'll refactor the
	Volume class and its decendents by splitting metadata operations into
	their own class which can be shared between the current SPM code and the
	new SDM code.

	Today we have the following class hierarchy:

	Volume                  Fields and functions common to all volume types
	|-- BlockVolume         Block volume specific implementation
	|-- FileVolume          File volume specific implementation
	    |-- GlusterVolume   Gluster volume specific implementation

	Each of these classes will get a new *Metadata class to house the
	metadata-specific operations where the common fields and methods appear
	in VolumeMetadata and the specific implementations appear in the sub
	classes.

	In an effort to reduce churn during the refactoring, when moving a
	method into its new class, I will leave behind a stub in the original
	class which simply passes the call through to the method's new location.
	Once all code has been refactored, I'll remove stubs for any methods
	which are not currently accessed outside of the class.

	Continuous-Integration: Jenkins CI

	ImageManifest: introduce ImageManifest class
	In order to safely share storage code between the traditional SPM verbs
	and the new SDM verbs we must refactor the code from the Image class.
	We want to share the parts which deal with image "metadata" (ie. the
	repoPath and imageDir, volumeChain, etc).  These elements will be moved
	into a new ImageManifest class while the SPM operations will remain in
	the Image class.

	As a first step, create the new class and add repoPath and getImageDir.
	Many of the other candidate functions rely on the VolumeMetadata
	refactoring and will be added later.

	Continuous-Integration: Jenkins CI

2015-10-13  Francesco Romani  <fromani@redhat.com>

	tests: fixed mangled names in crossImportTests
	crossImportTests needs to extract the module name given
	a python file. To do this, it uses a naive approach stripping the
	extension of a filename, being the extension either ".py" or ".pyc".
	This approach seems good enough for the test purposes, but it was
	done incorrectly using the strip() method of string objects,
	like

	  filename.strip(".pyc")

	Unfortunately, as per strip() documentation:

	  strip(...)
	    S.strip([chars]) -> string or unicode

	    [...]
	    If chars is given and not None, remove characters in chars instead.
	    [...]

	This means that *any* occurrence of *any* char provided will be removed,
	not just the substring as a whole. This leads to incorrect output.
	For example

	  "cmdutils.pyc".strip(".pyc") -> "mdutils"

	This patch fixes that using the more suitable os.path.splitext()
	function. We take the chance to add an unit test for the get_mods()
	helper, to make sure this won't happen again (or at least, not so
	easily).

	Continuous-Integration: Jenkins CI

2015-10-13  Petr Horáček  <phoracek@redhat.com>

	net: tests: test if setupNetworks drops/keeps initial nics IP
	When we create a network over a nic, nics initial IP configuration
	is dropped. When we create a bond over a nic, nics initial IP
	configuration is kept.

	This patch introduces two new tests which make sure about that and
	could be used for test-driven developement of other configurators
	and OVS hook.

	Continuous-Integration: Jenkins CI

2015-10-13  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: make sure to send error message when no subscription
	When we get destination which is not know we need to send error response
	with proper message.

	Continuous-Integration: Jenkins CI

2015-10-12  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: rename variables in get()
	Continuous-Integration: Jenkins CI

2015-10-12  Allon Mureinik  <amureini@redhat.com>

	spec: Require qemu with "sleep periodically" fix
	Prior to QEMU 2.1.3-11, it cannot yield while dumping a dirty map,
	which may cause live merge to hang when merging large snapshots.

	QEMU 2.1.3-11 adds yield points, which prevents the aforementioned
	hanging.

	Bug-Url: https://bugzilla.redhat.com/1264673
	Related-To: https://bugzilla.redhat.com/1262901
	Related-To: https://bugzilla.redhat.com/1262251
	Continuous-Integration: Jenkins CI

2015-10-12  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix pep8 line length violation
	Continuous-Integration: Jenkins CI

2015-10-12  pkliczewski  <piotr.kliczewski@gmail.com>

	test: getInstance is not used so removing

2015-10-11  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: do not mistake a veth device for a VLAN in ifaceUsed
	A heuristic in the function looks for a 'device' property of a network
	link to decide if a given device "backs" a VLAN and thus is "used".
	Not only VLANs have the property, however. At least veth devices have it
	as well. This patch improves detection by exploiting the 'type' property
	to match only 'vlan's.

	At least testSetupNetworksAddDelDhcp was affected by this misdetection
	on Fedora 22. The presence of 'device' property may be due to netlink
	library but this is just a guess. (Also, iproute2 package/ip binary
	recently started showing veth1@veth2 in its output but this need not
	be related either.)

	Continuous-Integration: Jenkins CI

	tests: fix AttributeError: 'module' object has no attribute 'ifcfg'
	... when running unit tests with other network configurators than ifcfg.

	In configNetworkTests, ifcfg configurator's functions that would have
	an effect on host networking (had network.api validation been broken)
	are disabled by monkey patching.

	This targets only ifcfg configurator (whose ifup and ifdown functions
	are very dangerous), and it also works only when net_configurator
	is set to 'ifcfg' (which is the default) in /etc/vdsm/vdsm.conf

	It ends up with AttributeError when other configurators are chosen.
	Why?

	Consider first how the following code could work, given that only 'api'
	module and 'configurators' package used to be imported from 'network'
	package in configNetworkTests:

	@MonkeyPatch(configurators.ifcfg, 'ifdown', lambda *x: _raiseInvalidOpException())

	The answer is, a side effect of importing 'api', which itself imports
	the chosen network configurator in a module-level call to its
	_getConfiguratorClass() function.

	It is probably more clear now, that network.configurators.ifcfg (or iproute2)
	can only be used after it is imported. We got ifcfg configurator imported
	"for free", but this doesn't work when it is now configured in vdsm.conf

	The example below makes the point.

	>>> import network.configurators
	>>> network.configurators.ifcfg
	Traceback (most recent call last):
	  File "<stdin>", line 1, in <module>
	AttributeError: 'module' object has no attribute 'ifcfg'

	>>> import network.configurators.ifcfg
	(This is what network.api does when ifcfg configurator is configured,
	and what importing of network.api indirectly causes.)

	>>> network.configurators.ifcfg
	<module 'network.configurators.ifcfg' from 'network/configurators/ifcfg.pyc'>

	Continuous-Integration: Jenkins CI

	dhcp: remove support for older --bind-interfaces dnsmasq parameter
	The parameter was required for compatibility with EL6 which is not
	supported anymore.

	Continuous-Integration: Jenkins CI

2015-10-11  Adam Litke  <alitke@redhat.com>

	utils: split out execCmd wrapping logic
	The execCmd utility contains fairly intricate logic which wraps a given
	command with various other utilities (eg. sudo, nice, taskset, etc)
	according to the callers preferences.  We should split this logic into
	its own function so that other direct consumers of CPopen (eg. qemuimg
	in an upcoming patch) can get the same semantics as execCmd.

	Continuous-Integration: Jenkins CI

2015-10-11  Petr Horáček  <phoracek@redhat.com>

	tests: net: use new veth_pair in networkTestsOVS.py
	We do not have Veth object anymore. Use nettestlib:veth_pair() and
	ipwrapper:addrAdd(), ipwrapper:linkSet() instead of it.

	Continuous-Integration: Jenkins CI

2015-10-11  Federico Simoncelli  <fsimonce@redhat.com>

	qemuimg: add support for convert progress
	This patch adds the support for QemuImgProcess, a class designed
	to oversee the execution of a long qemu-img convert operation in
	order to parse and maintain the progress of the process.

	 operation = qemuimg.convert(srcImage, dstImage)

	 while not operation.finished:
	     operation.wait(10)
	     log.debug('convert progress: %s%%', operation.progress)

	Continuous-Integration: Jenkins CI

2015-10-11  Nir Soffer  <nsoffer@redhat.com>

	spec: Require newer kernel version on Fedora
	iSCSI default replacement_timeout is 120 seconds, resulting in too slow
	iSCSI failover in multipath setup. In vdsm, this may lead to blocking of
	multiple unrelated vdsm threads for many minutes, when lvm, multipath
	ore scsi scan operation blocks.

	This issue was resolved in multipath (BZ1099932), by configuring iscsi
	session recovery_tmo sysfs attribute to multipath fast_io_fail_tmo
	value, (5 seconds in vdsm configuration). However, this configuration
	was reverted to the default 120 seconds after a device went down an up
	again, or after restart of the iscsid daemon (BZ1139038).

	This issue was fixed in kernel 4.1.6. In this version, setting session
	recovery_tmo using sysfs overrides the default value defined in iscsid
	configuration file.

	We have the same issue on EL; this is handled in a separate patch since
	the package is not available yet on CentOS.

	Bug-Url: https://bugzilla.redhat.com/1253790
	Backport-To: 3.6
	Backport-To: 3.5
	Relates-To: https://bugzilla.redhat.com/1099932
	Relates-To: https://bugzilla.redhat.com/1139038
	Continuous-Integration: Jenkins CI

2015-10-11  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: normalize strings (to unicode) through json magic
	To make it easier to read differences between "running config"
	and "kernel config" (the state of networking) the strings
	contained in dictionaries must not be stored randomly as str
	or unicode instances.

	This patch converts all strings to unicode. Thanks to Ido Barkan
	for a neat trick using the json library.

	Continuous-Integration: Jenkins CI

2015-10-11  Petr Horáček  <phoracek@redhat.com>

	hooks: ovs: move libvirt configuration into a separate module
	Libvirt configuration has nothing to do with OVS configuration.

	The main reason is to move creation of new libvirt networks to a place
	where almost all configuration is completed, so an eventual rollback
	doesn't have to do any extra work. This is necessary for the following
	'improve ovs rollback' patch.

	Continuous-Integration: Jenkins CI

2015-10-07  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: stop using getVlanID() in network.api
	The same information is already present in _netinfo.

	Continuous-Integration: Jenkins CI

2015-10-07  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Don't warn about unknown type for channel devices
	We're currently issuing warnings in the VDSM logs for channel devices:

	Thread-38551::WARNING::2014-08-07
	08:40:26,595::vm::2059::vm.Vm::(buildConfDevices)
	vmId=`97ca14a3-1502-4ac6-bb48-ba9dcd8179d2`::Unknown type found, device:
	'{'device': 'unix', 'alias': 'channel0', 'type': 'channel', 'address': {'bus':
	'0', 'controller': '0', 'type': 'virtio-serial', 'port': '1'}}' found

	These warnings are not supposed to be issues as we do just do not maintain
	them. This patch changes this to not warn in those cases.

	Bug-Url: https://bugzilla.redhat.com/1128881
	Continuous-Integration: Jenkins CI

2015-10-07  Nir Soffer  <nsoffer@redhat.com>

	automation: Disable tests requiring tun device
	In commit a9e9e7bcc7a1 (tests: temporarily exclude few tests to restore
	CI) we disabled too many networking tests, including unrelated test
	from utilsTests.py that happen to have the same name.

	This patch adds @require_tun decorator to disable tests needing the tun
	device.

	Other tests seems to run fine in the CI, giving them another chance.

	Continuous-Integration: Jenkins CI

	atomation: Remove commented code
	We don't keep commented code in vdsm.

	Continuous-Integration: Jenkins CI

	automation: No need to disbale stress tests
	Stress tests and slow tests are disabled by default.

	Also, NOSE_SKIP_STRESS_TESTS is incorrect; see tests/README for the
	correct way to control the tests.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-10-07  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: merge _getVlanDevsForIface into getVlansForIface
	Continuous-Integration: Jenkins CI

	netinfo: remove unused functions and make some private
	getVlanBondingNic (removed) and getVlanDevice (now private)
	were used by vdsm_reg (removed in commit 5fa583).

	isvirtio has been unused since http://gerrit.ovirt.org/21542
	getBridgelessNetworks since http://gerrit.ovirt.org/6416 and
	isbonding since https://gerrit.ovirt.org/4320

	Since an earlier version of this patch, gethwaddr has been
	picked up by https://gerrit.ovirt.org/45893 after having been
	unused since https://gerrit.ovirt.org/23291

	Continuous-Integration: Jenkins CI

2015-10-06  Germano Veit Michel  <germano@redhat.com>

	vdsm-tool: Do not panic with sanlock empty groups
	This fixes the following error:

	    File "/usr/lib/python2.6/site-packages/vdsm/tool/configurators/
	        sanlock.py", line 87, in isconfigured
	    .strip().split(" ")]
	    ValueError: invalid literal for int() with base 10: ''

	Which happens when sanlock "Groups:" line is empty:

	    $ grep "Groups:" /proc/<sanlock pid>/status
	    Groups:

	Sanlock must have its groups properly setup, but we should not
	blow up because of this.

	Fixed by using split() instead of split(' '), which cannot handle empty
	string and is the wrong way to split in most cases.

	Bug-Url:https://bugzilla.redhat.com/1267444
	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-10-05  Adam Litke  <alitke@redhat.com>

	Move jobs.py to lib/vdsm
	The host jobs infrastructure in jobs.py is general purpose and belongs
	in the vdsm-python package.  The qemuimg.py module (in vdsm-python)
	wants to make use of jobs.py and we don't want to add a dependency from
	qemuimg.py "library" to any python files in the vdsm package.

	Continuous-Integration: Jenkins CI

2015-10-01  Francesco Romani  <fromani@redhat.com>

	tests: inherit from object
	We are still on python 2.x, so all classes should inherit from object,
	unless there is a crystal clear case NOT to do so.

	Continuous-Integration: Jenkins CI

2015-10-01  Martin Polednik  <mpolednik@redhat.com>

	caps: get host uuid on ppc64le
	On Power, the uuid is determined by parsing the device tree. The code
	for parsing lacks ppc64le architecture that needs to be added in order
	not to return None as UUID (breaking getVdsCaps).

	Continuous-Integration: Jenkins CI

2015-10-01  Milan Zamazal  <pdm@zamazal.org>

	virt: devices: let Sound.__slots__ be tuple, not string
	This is just a trivial cosmetic change, to be consistent within the
	code.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-09-30  Ido Barkan  <ibarkan@redhat.com>

	net: remove unneeded log
	This log message is very common and doesn't say a lot. Reducing
	verbosity here will do no harm and will clean the log a little.

	Continuous-Integration: Jenkins CI

2015-09-30  David Caro  <dcaroest@redhat.com>

	CI: On fc22 trying to install a src.rpm fails
	Continuous-Integration: Jenkins CI

2015-09-29  Ondřej Svoboda  <osvoboda@redhat.com>

	integration: remove an unused import
	Continuous-Integration: Jenkins CI

2015-09-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Improve utils.retry tests
	We did not have tests for the timeout mechanism.

	This patch adds 4 tests, revealing issues in the current code:

	- Test that we bail out when the timeout precisely expires (broken).
	- Test that we do not wait needlessly if a sleep would make timeout
	  expire (broken).
	- Test that we do not wait needlessly if deadline has passed when the
	  operation was finished (ok).
	- Test that we ignore zero timeout (ok).

	Continuous-Integration: Jenkins CI

2015-09-29  pkliczewski  <piotr.kliczewski@gmail.com>

	integration: let client factory to construct xmlclient
	Continuous-Integration: Jenkins CI

2015-09-29  Francesco Romani  <fromani@redhat.com>

	virt: graphics: avoid None in specParams
	In commit bbe8a03 we added a check to make sure
	we use displayNetwork from global Vm configuration,
	in the case the more specific setting was not sent
	in the graphics device specParams.

	One unfortunate side effect of this change is that
	now None may end up in the graphics device specParams,
	breaking XML-RPC communications.

	We default (end recommend) JSON-RPC, but we still
	support XML-RPC, and we use it as default in vdsClient,
	so this must be avoided.

	This patch reorganize the check to avoid the unwanted
	injection of the None value.

	Backport-To: 3.6
	Related-To: https://bugzilla.redhat.com/1261007
	Continuous-Integration: Jenkins CI

2015-09-28  Nir Soffer  <nsoffer@redhat.com>

	tests: Wait for udev events after unmounting
	Even after fixing unmounting of loop mounts using the freeLoop
	parameter, we still have random mount failures like:

	       File "/home/.../vdsm/storage/mount.py", line 241, in _runcmd
	     raise MountError(rc, ";".join((out, err)))
	    MountError: (32, ';mount:
	    /tmp/vdsm-mkimage-tests.03sjxb/images/vmId_floppy...img:
	    failed to setup loop device: No such file or directory\n')

	It seems that loop device detach is asynchronous, thanks to good old
	udev. Waiting until things settle down can avoid this issue.

	Continuous-Integration: Jenkins CI

2015-09-26  Petr Horáček  <phoracek@redhat.com>

	spec: fix openvswitch dependency version
	In CentOS, where Epoch is not used, >= 2 is interpreted as >= 0:2,
	that is causing dependency problems This patch changes it to >= 2.0.0

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-09-25  Francesco Romani  <fromani@redhat.com>

	vm: always hold confLock when updating pauseCode
	An update of pauseCode can create a new field in Vm.conf.
	If a client calls the getVMList() API, or for any other API
	which needs to loop over all the VM conf, we can end up with

	RuntimeError: dictionary changed size during iteration

	This patch make sure that when we update Vm.conf with
	pauseCode-related data, we always have Vm.confLock held.

	Bug-Url: https://bugzilla.redhat.com/1261918
	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Jenkins CI

2015-09-25  Ido Barkan  <ibarkan@redhat.com>

	net: reuse running config instance in netinfo.
	running config is already read from the disk once during get() and
	this info can be later used in libvirtNets2vdsm instead of reading it
	again.

	Continuous-Integration: Jenkins CI

2015-09-25  Adam Litke  <alitke@redhat.com>

	tests: Generalize sdm_indirection_tests
	The infrastructure in sdm_indirection_tests is useful for testing the
	other classes where there is indirection:

	    Image -> ImageManifest
	    Volume -> VolumeMetadata

	In order to reuse this code we need to generalize two things:
	1. The class doing the redirection is not necessarily a StorageDomain.
	It can also be an Image or Volume.
	2. Each class that redirects calls for SDM contains an instance of the
	redirection target class.  For example, StorageDomains contain a field
	'_manifest' which is a StorageDomainManifest instance.

	The generalization can be done by extracting the general purpose bits
	from DomainTestMixin into SDMIndirectionMixin.  When Image and Volume
	support will be added to this module we can subclass
	SDMIndirectionMixin as we are now doing for DomainTestMixin.

	Continuous-Integration: Jenkins CI

2015-09-25  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix unsafe monkeypatching
	mkimage module could be left in bad state if setup failed after it was
	patched, or removing temporary files in tearDown failed.

	This patch ensures that the module is patched only if all other setUp
	code was successful, and is restored first in tearDown.

	The manual patching code was replaced with the monkeypatch.Patch.

	Continuous-Integration: Jenkins CI

	v2v: Fix getExternalVMs if getting disk size failed
	In getExternalVMs we try to report the disk size, but if this info is
	not available for certain disk, we continue to collect info about other
	disks. Due to incorrect error handling, the request was aborted after
	the first error:

	      File "/usr/share/vdsm/v2v.py", line 684, in _add_disk_info
	        disk['capacity'] = str(capacity)
	    UnboundLocalError: local variable 'capacity' referenced before assignment

	This patch fixes the error handling so failure to get disk size would
	not fail the entire request.

	Reported-by: Ian Fraser <ian.fraser@asm.org.uk>
	Bug-Url: https://bugzilla.redhat.com/1265556
	Backport-to: 3.6
	Continuous-Integration: Jenkins CI

	v2v: Skip vm if XMLDesc() fails
	The current code assumes that XMLDesc() always succeeds when dealing
	foreign vms, which seems to be too optimistic as seen here:

	      File "/usr/share/vdsm/v2v.py", line 152, in get_external_vms
	        root = ET.fromstring(vm.XMLDesc(0))
	      File "/usr/lib64/python2.7/site-packages/libvirt.py", line 478, in XMLDesc
	        if ret is None: raise libvirtError ('virDomainGetXMLDesc() failed', dom=self)
	    libvirtError: internal error: Invalid or not yet handled value
	    'emptyBackingString' for VMX entry 'ide1:0.fileName' for device type
	    'cdrom-image'

	If XMLDesc() failed, we aborted the entire request, making it impossible
	to import good vm if libvirt could not handle another bad vm on the same
	server.

	Now we log the libvirt error and continue, increasing the chance to
	return useful information to engine.

	Reported-by: Ian Fraser <ian.fraser@asm.org.uk>
	Bug-Url: https://bugzilla.redhat.com/1266088
	Backport-to: 3.6
	Continuous-Integration: Jenkins CI

2015-09-25  Petr Horáček  <phoracek@redhat.com>

	net: multicast snooping is not supported by ovs until 2.4.0
	Continuous-Integration: Jenkins CI

2015-09-24  Martin Polednik  <mpolednik@redhat.com>

	gitignore: add tags
	Ctags generate tag files for source code. Most of the approaches for
	storing tags use the root directory of a project. This patch adds the
	'tags' file to gitignore, causing git to ignore the tags file. This is
	helpful when calling e.g. git clean, because the tags would be deleted.

	Continuous-Integration: Jenkins CI

2015-09-24  Ido Barkan  <ibarkan@redhat.com>

	net: tests: move veth.pair into nettestlib.py
	veth is also used by test hence belongs in nettestlib

	Continuous-Integration: Jenkins CI

	net: tests: move Dummy class into nettestlib.py
	One additional step in unifying code of test interfaces management code

	Continuous-Integration: Jenkins CI

	net: tests: convert dummy module into a class
	This class will be later moved into nettestlib and be unified with
	other test device code.

	Continuous-Integration: Jenkins CI

2015-09-24  Marcin Mirecki  <mmirecki@redhat.com>

	network: add ifcfg write hook correction
	Correction for patch: 46372
	- only full path of ifcfg file is passed to hook
	- config dict inlined
	- the hook can not modify the path of the ifcfg file anymore

	Bug-Url: https://bugzilla.redhat.com/965929
	Continuous-Integration: Jenkins CI

2015-09-23  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix and simplify cleanup after failures
	If mount or umount failed, temporary images were not removed because of
	incorrect cleanup code. This was not an issue since the temporary files
	were created in a temporary directory, but we had two of them, so
	failures to remove the first would leave also the second.

	This patch simplify cleanup by removing the incorrect cleanup of the
	temporary images, as they are removed anyway when the temporary
	directory is removed.

	Instead of two temporary directories, we use now one directory, and
	create the two subdirectories inside it. Now we have to remove only one
	directory in tearDown. To make it easier to debug, the temporary
	directory is created with a prefix.

	Continuous-Integration: Jenkins CI

2015-09-22  Martin Polednik  <mpolednik@redhat.com>

	hostdev: change ownership for passthrough USB devices
	In order co correctly passthrough an USB device while qemu doesn't run
	under root user, permission must be set for
	/dev/bus/usb/${bus}/${device} node so qemu can access it. This patch
	dynamically changes the ownership of the node and later reverts it
	and triggers relevant udev rules.

	Bug-Url: https://bugzilla.redhat.com/1248105
	Continuous-Integration: Jenkins CI

2015-09-22  Francesco Romani  <fromani@redhat.com>

	vm: graphics: fix settings after restore
	When restoring a VM from a memory snapshot,
	if we don't reset the some details of the SPICE configuration
	will be lost, and the restored VM will behave erratically.

	This behaviour is easily reproduced by:
	a. boot a VM with SPICE graphic device
	b. do a snapshot, make sure to check 'snapshot memory'
	c. preview the snapshot
	d. run the VM
	e. check the VM parameters (e.g. qemu)

	The automatic restore using virDomainRestoreFlags() uses the wrong
	configuration settings.

	To fix this, we need to amend the VM Domain XML, tuning the configuration
	the same way we do for VM startup.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1260177
	Continuous-Integration: Jenkins CI

	scale: limit cpu usage using cpu-affinity
	To reduce the impact of the GIL, we want to pin
	VDSM threads to few cores, maybe just one.

	Initial results using taskset manually provided very
	interesting results (more details in
	https://bugzilla.redhat.com/1247075):

	VDSM was tested while running ~100 idle VMs, pinning
	vdsmd to less and less cores, down to just one.
	The load changed in an impressive way, started from
	fluctuating around 1000-2500% (no pinning) down to
	average around 30%, rarely peaks close to 100% (pinned
	to one core).

	The user can configure using vdsm.conf the cpu cores on
	which VDSM should run on.
	If nothing is specified, VDSM behaves as before and uses
	any CPU core.

	We need a patch which is simple to backport down to 3.5,
	so we use taskset just before the start of the main daemon
	to set VDSM cpu affinity, and we start any child process using
	taskset to remove VDSM's cpu affinity and allow the child
	process to use any cpu.

	taskset is part of util-linux, so no additional dependency
	is needed.

	Note: ioprocess needs to be patched to reset its cpu affinity.
	Tracked in https://bugzilla.redhat.com/1264187

	Bug-Url: https://bugzilla.redhat.com/1247075
	Backport-To: 3.6
	Backport-To: 3.5
	Continuous-Integration: Jenkins CI

2015-09-21  Nir Soffer  <nsoffer@redhat.com>

	debug: Remove debug plugin
	vdsmDebugPlugin was replaced by manhole, no need to keep and maintain
	this now.

	Continuous-Integration: Jenkins CI

2015-09-21  Petr Horáček  <phoracek@redhat.com>

	automation: add build_artifacts
	Change automation structure according to new CI standard. Add
	build-artifacts.sh which builds all required packages.

	check-patch.sh then runs PEP8, Pyflakes and unit tests. If specfile
	was changed, it tries to install created packages as well.

	This patch is related to jenkins project patch:
	https://gerrit.ovirt.org/#/c/46147/

	Continuous-Integration: Jenkins CI

2015-09-21  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsClient: parse no value arguments
	There was regression introduced by
	00cae320514b096c11bfb7b48ebe944235b2e85a commit. In order to fix it we
	need to properly parse arguments when no value provided.


	Bug-Url: https://bugzilla.redhat.com/1249624
	Continuous-Integration: Jenkins CI

2015-09-21  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: only trigger 'vfio' subsystem for VFIO devices
	In order to avoid triggering of all events we need to use specialized
	variant of udevTrigger. This patch creates new private trigger function
	to add ability to trigger specific subsystems. This avoids refreshing
	everything, possibly eliminating way of triggering everything via
	host devices subsystem.

	Continuous-Integration: Jenkins CI

2015-09-21  Ido Barkan  <ibarkan@redhat.com>

	net: set physical functions up before using them.
	Before using virtual functions, it is not enough to create and
	configure them. If the underlying physical function is not up, the
	virtual functions are unusable. Furthermore, the engine needs the
	physical function to be up in order to let the user configure it.

	Bug-Url: https://bugzilla.redhat.com/1229691
	Continuous-Integration: Jenkins CI

	net: rename sriov related code params
	This is to reflect that the passed device name is actually a pci
	address path such as 0000:02:00.0. Next commit will introduce a
	device name in the same logic so the rename will prevent the confusion.

	Continuous-Integration: Jenkins CI

2015-09-21  Nir Soffer  <nsoffer@redhat.com>

	volume: Unify metadata formatting and validation
	We had duplicate code for formatting volume metadata, and the file
	volume version did not protect from metadata overflow. On file storage
	the metadata size is not limited, but when copying file based volume to
	block storage, the description field will be truncated.

	Metadata is formatted now using Volume.formatMetata(), which also
	validate the formatted metadata size.

	Since metadata size is relevant for both block and file volumes,
	blockVolume.VOLUME_METASIZE was moved up to volume.METADATA_SIZE.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>
	Continuous-Integration: Jenkins CI

2015-09-20  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix unmount in mkimage tests
	These tests seem to fail too much lately. Inspecting the code reveal
	that we use freeloop=True in mkimage, but do not use this flag in the
	tests. This lead to consuming of all available loop devices, causing
	later mount attempts to fail.

	Continuous-Integration: Jenkins CI

	blockSD: Use with instead of try finally
	Using with is more clear and safer; you cannot add failing code before
	the try.

	Continuous-Integration: Jenkins CI

2015-09-20  Ido Barkan  <ibarkan@redhat.com>

	net: better set/get_promisc
	The new implementation uses iproute2 to set this property and netlink
	to get it. The former implementation used ctypes clumsy code and only
	looked at the object state, which was set before the ioctl code.

	Continuous-Integration: Jenkins CI

	net: remove unused _parseLinkLine from ipwrapper
	The grouper utility was also removed as _parseLinkLine was the only
	one using it.

	Continuous-Integration: Jenkins CI

2015-09-20  Martin Polednik  <mpolednik@redhat.com>

	graphics: use global displayNetwork if no local specified
	Engine can either specify the displayNetwork on global or local basis.
	If specified locally everything works, but global configuration is
	ignored for explicitly sent graphics devices. This patch adds logic to
	decide if local or global displayNetwork is to be used.

	Bug-Url: https://bugzilla.redhat.com/1261007
	Continuous-Integration: Jenkins CI

	fakekvm: report correct POWER8 model
	The power8 model should be in uppercase ('POWER8') to reflect current
	libvirt and therefore be correctly recognized by engine.

	Continuous-Integration: Jenkins CI

	virt: add logic for POWER cpu xml element
	Current flow in appendCpu caused ppc to be skipped, generating empty
	element (<cpu/>). In order to specify cpu model on ppc, we have to use
	libvirt's cpu with POWER8 model.

	This is currently the only way of safely adding CPU to ppc64le host,
	and hopefully will be enhanced in future.

	Bug-Url: https://bugzilla.redhat.com/1259318
	Continuous-Integration: Jenkins CI

2015-09-19  Francesco Romani  <fromani@redhat.com>

	vm: sercon: serial config must match console's
	When we add a serial console device, we also
	inject a matching serial device.

	Until now, the code assumed that the serial console has to be
	bind to a PTY, while we can also bind it to an UNIX domain socket
	(required by oVirt 3.6 "guest serial console" feature).

	This patch makes sure that the injected serial device is bound
	to the appropriate host endpoint, either pty or unix domain socket.
	Please note that if the mismatch the serial device and the console
	device configuration, the VM fails to start.

	Bug-Url: https://bugzilla.redhat.com/1223671
	Continuous-Integration: Jenkins CI

2015-09-19  Edward Haas  <edwardh.dev@gmail.com>

	utils.retry: Support system time changes while retry() is running
	In a scenario where retry() is called with timeout (>0) and
	during the retry run, the system time changes, the timeout calculation
	will get corrupted. This may cause an unwanted result.

	At the function entry point, the system time is saved (time.time())
	and used after each retry attempt to calculate the period passed.
	If the system time is changed between the first time call and the
	following time calls, the delta time will get corrupted.

	The calculated delta time, which gets compared to the timeout value,
	should not be affected by the system time change.
	To support that, a monotonic timer is used.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-09-19  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfoTests: do not overwrite /etc/resolv.conf
	os.path.join ignores any initial path components if it is passed
	an absolute path, so a relative path must be used. Now, 'etc'
	directory is never created and for test purposes it is not necessary
	to do so, therefore stick with temp_dir and 'resolv.conf'.

	Continuous-Integration: Jenkins CI

	spec: install bonding-defaults.json with 644 permissions, not 600
	This way make check succeeds under non-root account for
	testIterNetworkHierarchy, testTextualRepr and testValidateBondingOptions
	which previously failed to read the file.

	Continuous-Integration: Jenkins CI

2015-09-17  Nir Soffer  <nsoffer@redhat.com>

	blockVolume: Separate data formatting and writing
	There is no need to open a file before the data is ready for writing.
	Separating the data formatting and writing makes it easy to change the
	way we write the data, or moving the formatting code elsewhere.

	Continuous-Integration: Jenkins CI

	volume: Support older engine or disks with long description
	New engine will limit the description field size to avoid the
	MetaDataOverflowError, but we must support older engine versions and
	existing disks with long description. For example, copying old disk with
	long description from file to block storage.

	The description field has now maximum size; if the size exceeds the
	limit, it is transparently truncated when creating any volume type.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1258097
	Continuous-Integration: Jenkins CI

	blockVolume: Fail if metadata overflows
	We used to truncate silently volume metadata if it was too long, storing
	invalid metadata that would cause various failures later.

	The metadata can overflow if volume description, or since ovirt 3.5,
	volume alias is too long. Both alias and description are stored now in
	json format in the DESCRIPTION field.

	Now we raise MetadataOverflowError, the same error raised when storage
	domain metadata overflow. This will fail the volume creation.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1258097
	Continuous-Integration: Jenkins CI

	cleanup: Remove unused pidfile option and argument parsing code
	Since we move to systemd, we don't need the pidfile option, and since it
	is the only option, the argument parsing code and the usage messsage.

	Continuous-Integration: Jenkins CI

2015-09-17  Ido Barkan  <ibarkan@redhat.com>

	net: fix _emergencyNetworkCleanup
	The code assumed that 'bridged' was always a part of the network
	attributes. It should default to this parameter default if it is not
	there.

	Continuous-Integration: Jenkins CI

2015-09-17  Nir Soffer  <nsoffer@redhat.com>

	safelease: Remove unhelpful debug code
	Remove unhelpful debug function that logged an important message only to
	stdout (where nobody see it) and only when enabling debug mode.

	Now we log all message to smp-lock.log with a timestamp.

	Continuous-Integration: Jenkins CI

	safelease: Improve logging when releasing lock
	We used to log that "Cluster lock was released successfully" even if
	spmstop.sh failed. Now we log either an error or a success message, but
	never both.

	To make spmstop.sh stderr and stdout more readable, we invoke spmstop.sh
	with raw=True to avoid the unwanted line splitting.

	We also log the domain UUID in all messages during release to make it
	easier to follow the log.

	Continuous-Integration: Jenkins CI

	safelease: Fix wrong parameter name
	smpstop.sh expects a storage domain uuid, not a pool id. Updat the
	variables names, the online help and the logs.

	Continuous-Integration: Jenkins CI

	safelease: Increase spmprotect timeouts
	When spmprotect.sh fail to renew the lease, it start a fencing process:

	1. Send SIGUSR1 signal to vdsm
	2. Send SIGTERM signal to vdsm after 7 seconds
	3. Send SIGKILL signal to vdsm after 9 seconds
	4. Reboot the machine after 20 seconds

	When vdsm receives the SIGUSR1 signal, the signal handler invokes
	stopSpm, which releases the cluster lock. Releasing the cluster lock will
	terminate the waiting spmprotect.sh, preventing termination of vdsm and
	reboot.

	If vdsm fails to release the cluster lock within 7 seconds, spmprotect.sh
	will terminate it, and if did not terminate, spmprotect.sh will kill it.

	When systemd starts vdsm again, vdsm looks for spmprotect.sh processes and
	tries to release the lease. If the lease cannot be released after 10
	seconds, it kills the pending spmprotect.sh processes, preventing reboot.

	Testing with both block and file storage show that this flow is broken
	when access to master domain is blocked:

	1. In block storage, vdsm gets stuck trying to unmount the master mount,
	   and spmprotect.sh kills it before it try to release the cluster lock.

	2. In file storage, vdsm gets stuck trying to write spm status to the
	   master domain, and spmprotect.sh kills it before it try to release
	   the cluster lock.

	3. When vdsm starts up, sometimes it manage to kill the waiting
	   spmprotect.sh process, and sometimes spmprotect.sh reboot the
	   machine before vdsm kills it.

	We cannot fix 1 and 2 easily. 3 can be fixed by giving vdsm more time
	for stopSpm flow, and more time to startup and kill pending
	spmprotect.sh process.

	This patch increases spmprotect timeouts to increase the chance of clean
	shutdown and decrease the chance of unneeded reboot.

	New spmprotect.sh flow is:

	1. Send SIGUSR1 signal to vdsm
	2. Send SIGTERM signal to vdsm after 10 seconds
	3. Send SIGKILL signal to vdsm after 20 seconds
	4. Reboot the machine after 60 seconds

	Bug-Url: https://bugzilla.redhat.com/1222564
	Continuous-Integration: Jenkins CI

2015-09-16  PriyaAvhad  <avhad.priya24@gmail.com>

	Get list of nameservers for host
	Get a list of nameservers listed in /etc/resolv.conf

	Continuous-Integration: Jenkins CI

2015-09-16  Petr Horáček  <phoracek@redhat.com>

	net: mark test_getVdsStats as broken
	Related-To: https://bugzilla.redhat.com/1261457
	Continuous-Integration: Jenkins CI

2015-09-16  Vitor de Lima  <vdelima@redhat.com>

	virt: Remove QEMU passthrough hack in ppc64
	Ever since 3.5 a virtual USB keyboard and mouse is included
	in ppc64 guests with graphical consoles. This patch does not insert
	any information about input devices in the domain XML in order to
	libvirt handle the creation of these devices automatically.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1122627
	Continuous-Integration: Jenkins CI

2015-09-16  Dan Kenigsberg  <danken@redhat.com>

	Revert "net/api: drop support for legacy mgmt networks"
	This reverts commit d1e8f872b913e4b0dc222c0d2cc2906e9807f3cb.
	We need the reverted code because current Engines does not pass
	defaultRoute=True on clusterLevels <= 3.3.

	Bug-Url: https://bugzilla.redhat.com/1259000
	Continuous-Integration: Jenkins CI

2015-09-16  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: only determine and write HWADDR in removeNic if enabled
	Writing of HWADDR has been deprecated for long now but for compatibility
	with pre-1.0 NetworkManager (that matches on HWADDR in order to accept
	NM_CONTROLLED=no) we shall still write it if requested with
	hwaddr_in_ifcfg=always in vdsm.conf. This patch makes removeNic follow
	suit -- addNic was alone in respecting the condition.

	For more information refer to http://gerrit.ovirt.org/22288 and
	https://bugzilla.redhat.com/1044060

	Bug-Url: https://bugzilla.redhat.com/1256252
	Continuous-Integration: Jenkins CI

	ifcfg: only deal gracefully with ENOENT in removeNic
	Any other IO errors are unexpected and so they should not go
	unnoticed.

	Bug-Url: https://bugzilla.redhat.com/1256252
	Continuous-Integration: Jenkins CI

2015-09-16  Francesco Romani  <fromani@redhat.com>

	spec: bump libvirt requirement
	On CentOS/RHEL 7.1, libvirt has a bug which makes XML being
	restored incorrectly in the dehibernation path.
	Libvirt >= 1.2.13 at least (probably earlier) is fixed already,
	so CentOS/RHEL 7.2 will be fine.
	We must make sure that CentOS/RHEL 7.1 depend on the fixed libvirt.

	Bug-Url: https://bugzilla.redhat.com/1258349
	Continuous-Integration: Jenkins CI

2015-09-16  Petr Horáček  <phoracek@redhat.com>

	network: api: raise error on removal of assigned bond
	When we try to remove assigned bond via setupNetworks, we get SUCCESS,
	but bond is not removed (we don't allow removal of assigned device).

	Now we raise an ERROR when someone tries to remove assigned bond.

	This does not apply for delNetwork, where we cannot remove separate
	bonding.

	Continuous-Integration: Jenkins CI

	hooks: Open vSwitch configurator
	This patch introduces new hook which allows us to configure OVS network
	instead of standard linux network.

	Configuration is done by one big ovs-vsctl command executed at once, it
	apply the whole configuration iff all commands are correct.

	Continuous-Integration: Jenkins CI

2015-09-16  Adam Litke  <alitke@redhat.com>

	StorageDomainManifest: Move validateCreateVolumeParams
	Continuous-Integration: Jenkins CI

	StorageDomainManifest: Move acquireVolumeMetadataSlot
	Moving acquireVolumeMetadataSlot into the manifest breaks volumeTests
	which depended on mocking StorageDomain objects.  Since we already have
	the manifest_tests infrastructure, it's better to move the test cases
	implemented in volumeTests into manifest_tests and use a real
	BlockStorageDomainManifest for testing.  In order to do this we need to
	add an addtag utility method to our FakeLVM class.

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: move refresh and refreshDirTree
	Continuous-Integration: Jenkins CI

	StorageDomainManifest: Move clusterLock into Manifest
	The clusterLock will be used by SDM verbs (as a per-domain lock) so it
	needs to be moved into the Manifest so that it can be shared.

	Moving the lock requires us to instantiate it in the
	StorageDomainManifest constructor which requires some reordering of the
	initialization steps.  This also affects the existing manifest_tests.
	The DMDK_VERSION key must always be present in the metadata passed into
	the StorageDomainManifest constructor since domainLock initialization
	needs to check the value.  BlockStorageDomainManifest objects must now
	always be created with a mocked LVM.

	When running with an SPM, the SPM role is protected by the Master
	Storage Domain's domain lock.  This lock is referred to as the
	cluster lock since it covers all domains.  In SPM-less (SDM) flows, we
	use each storage domain's lock as required.  For this reason, the
	acquireClusterLock, releaseClusterLock, and inquireClusterLock APIs are
	moved to acquireDomainLock, releaseDomainLock, and inquireDomainLock in
	the StorageDomainManifest but their original names are preserved in the
	StorageDomain.

	Continuous-Integration: Jenkins CI

2015-09-16  Liron Aravot  <laravot@redhat.com>

	hsm: lock pool when running upgradeStoragePool
	When running upgradeStoragePool we use the pool metadata to know which
	domains needs upgrade, having no pool lock means that races with flows
	that manipulate the pool metadata like activateSd and deactivateSd might
	occur.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260429
	Continuous-Integration: Jenkins CI

	sp: deactivateSd - remove domain from pending for upgrade list
	When domain is deactivated its not cleared from the _domainsToUpgrade list,
	which causes it to hold wrong and unneeded information (the domain might be
	detached later from the storage pool). This patch makes sure the domain
	is cleared when deactivated.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260429
	Continuous-Integration: Jenkins CI

2015-09-15  Nir Soffer  <nsoffer@redhat.com>

	safelease: Unbreak safelease on systemd
	spmprotect.sh depends on Vdsm pid file for fencing Vdsm when the SPM
	lease cannot be renewed. However, on systemd, we do not create Vdsm pid
	file.  When spmprotect tries to fence Vdsm it fails and reboots the
	host, killing all running vms.  This issue effects only v1 storage
	domains, typically old systems using dc compatibility version 3.0.

	Now we pass vdsm pid to spmprotect.sh helper script via command line
	argument, restoring safelease operation.

	Adding another argument to a script with 9 arguments is ugly, but I
	don't want to make risky changes to this delicate and critical code.

	Bug-Url: https://bugzilla.redhat.com/1222564
	Continuous-Integration: Jenkins CI

2015-09-15  Marcin Mirecki  <mmirecki@redhat.com>

	network: add ifcfg write hook
	Added a new hook point which is executed before and after
	an ifcfg file is writen on the host as a result of
	executing setupNetworks.
	An example can be a use case where the user would like
	to tweak the vdsm-produced ifcfg files by adding
	PEERDNS=no to it.
	The hook script receives a json file containing the
	following dict:
	name: the name of the interface being configured
	ifcfg_file: full path of the interface file being written
	config: the contents of the config file being written

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=965929
	Continuous-Integration: Jenkins CI

2015-09-14  Yeela Kaplan  <ykaplan@redhat.com>

	sudoers: remove unused iscsid policies
	could've been removed on:
	https://gerrit.ovirt.org/#/c/305/

	Continuous-Integration: Jenkins CI

2015-09-14  Marcin Mirecki  <mmirecki@redhat.com>

	virt: vm with port mirroring  stuck in down state
	When powering off VM with port mirroring enabled the
	VM id down in the UI but stuck in down state in vdsm.

	The problem was that the 'tc' command was invoked
	twice when a vm was shutdown from the cli. The first
	time as a result of a libvirt life cycle event which
	deleted the qdisc entries for the vm, the second time
	it was invoked by the engine and failed as the qdisc
	entries were no longer there.
	The code invoking tc was moved to be after the if
	statement checking if the vm has already been released.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1254713
	Continuous-Integration: Jenkins CI

2015-09-14  Fred Rolland  <frolland@redhat.com>

	lvm: Check if device in VG before extend
	Before extending a VG, VDSM needs to check that none of
	the additional devices are not already part of the VG.

	Without this protection, LVM will create a new PV with the
	same device. After extending VG, its metadata will updated
	with new PV. As a result, the VG will be partial.

	pvs output after creating new PV with same device:
	    # pvs
	      WARNING: Device for PV 2fDjgH-TeKA-1Vy2-NMMv-GB9n-op0w-g2Nyrd not
	               found or rejected by a filter.
	      PV
	      /dev/mapper/360014054bf6dd7d14fd40c9ac3b5dbe8
	      unknown device

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1261531
	Continuous-Integration: Jenkins CI

2015-09-14  Tal Nisan  <tnisan@redhat.com>

	spec: Update lvm2 requirement
	lvm2-2.02.107 solved a race condition in LVM when concurrently
	activating the same LV multiple times (See
	https://bugzilla.redhat.com/878948).

	Although the current supported platforms (EL>=7.1 and Fedora>=21)
	already contain newer versions on LVM, explicitly requiring this is a
	good defensive measure, especially for old systems that have been
	gradually upgraded over several versions.

	Bug-Url: https://bugzilla.redhat.com/1127117
	Continuous-Integration: Jenkins CI

2015-09-12  Liron Aravot  <laravot@redhat.com>

	sp: startSpm - clusterlock inquire leads to failure
	Currently startSpm() is responsible for the pool upgrade, it attempts to
	upgrade the pool domains to the desired version. During the execution of
	startSpm() we attempt to retrieve the current spm status in order to compare
	it with the engine sent parameters - and in case of difference we log
	the info to the user.

	When a DC upgrade is performed when the DC is down from a version that uses
	V1 as the domains version to a version that uses the StoragePoolMemoryBackend
	we'll encounter a problem - because the StoragePoolMemoryBackend uses
	the information from the clusterlock only and the current clusterlock
	that is used on the domain might not support inquiring (safelease for
	example) which will cause it to throw InquireNotSupportError.
	As we use the inquired information just to display a warning, in case of
	a clusterlock that doesn't support inquiring we should just log it to
	the user and continue with starting the spm.

	Bug-Url: https://bugzilla.redhat.com/1242092
	Continuous-Integration: Jenkins CI

2015-09-11  Petr Horáček  <phoracek@redhat.com>

	virt: fix PEP8 in v2vTests.py
	Continuous-Integration: Jenkins CI

2015-09-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	configurator doesn't load pyc files under configurators folder
	configurator loads dynamically modules from configurators folder. It
	searches for py files only. In ovirt-node installation we install only pyc
	files and this caused us to miss all configurators modules in ovirt-node
	installation. The listmodules function now returns a set to avoid
	duplicate module names.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1259247
	Continuous-Integration: Jenkins CI

2015-09-10  Liron Aravot  <laravot@redhat.com>

	core: moving InquireNotSupportedError to storage_exception.py
	InquireNotSupportedError is currently defined in clusterlock.py, that
	prohibits from assigning a meaningful error code to that error and to
	use it outside of that class scope without using a different method then
	our wildly used one. In this patch its moved to storage_exception so
	we'll be able catch and inspect that error like any other clusterlock related
	error. The engine will use that error as well and will attempt to start
	the spm if getSpmStatus() will fail as we don't have the "current" spm
	information, on the worst case startSpm() will fail.

	Bug-Url: https://bugzilla.redhat.com/1242092
	Continuous-Integration: Jenkins CI

2015-09-10  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: make removeNic cope with a missing ifcfg file
	For 3.6 we need to determine HWADDR property. If an ifcfg file is
	not found, HWADDR is read from the system.

	l.append('NM_CONTROLLED=no\n') is now used instead of
	l += 'NM_CONTROLLED=no\n' with no functional change.

	Bug-Url: https://bugzilla.redhat.com/1256252
	Continuous-Integration: Jenkins CI

2015-09-09  Greg Padgett  <gpadgett@redhat.com>

	supervdsm: don't let _runAs return early due to EINTR
	When _runAs executes a command, it polls a pipe to determine status of
	that command.  The poll has a timeout, also allowing the child to be
	killed if execution takes too long.  If a stray signal is received by
	the parent process, it may cause the poll to return early, prematurely
	ending child command execution ending in unintentional failure.

	This is particularly prevalant when subsequent _runAs executions are
	performed.  Termination of the first will result in a SIGCHLD which
	interrupts polling for the second, as exposed by commit 777c36d6.

	Because poll will return early without an exception if the low-level
	call is interrupted, NoIntrCall() cannot be used and thus a new helper
	function is provided that retries based on the time elapsed since the
	call started.

	PEP-475 will handle this in Python 3.5, but in the meantime this
	workaround is needed.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1259310
	Continuous-Integration: Jenkins CI

2015-09-08  Francesco Romani  <fromani@redhat.com>

	caps: more precise emulated machines selection
	Current VDSM code fetches emulated machines from the section which matches
	first the required architecture.
	This works in the simplest (and the only recommended) case, but doesn't
	if, for any reason, there is more than one valid emulatore for a given
	architecture.

	The only known case is if the user managed to install qemu-kvm alongside
	plain qemu.

	This patch implements more robust capabilities fetching to deal with
	this corner case.

	Bug-Url: https://bugzilla.redhat.com/1239258
	Continuous-Integration: Jenkins CI

2015-09-08  pkliczewski  <piotr.kliczewski@gmail.com>

	scheduler: use single instance
	We used to have one instance of a scheduler used for periodic
	operations. With this patch we prepare code for using single scheduler
	in more places like jsonrpc server.

	Continuous-Integration: Jenkins CI

2015-09-08  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: report DHCP on devices only when configured (like for networks)
	As reporting of DHCP relies on reading of dhclient lease files, it is not
	reliable when a network is reconfigured to static addressing: unused leases
	indicate dhclient presence hours after it has been stopped (expiration time
	is usually in hours or days).

	The false indication has already been fixed for networks, now even their
	respective devices adhere to configuration to stop false positives.

	A year and half ago it was suggested first to rely on cmdlines on running
	dhclients (where network device is the last parameter for all network
	configurators). This fix is just a hacky, though little bandaid for the 3.6
	release. A proper fix will be considered for the 4.0 branch.

	testSetupNetworksAddDelDhcp now checks that DHCP stops being reported
	on a network device, in addition to its network.

	Bug-Url: https://bugzilla.redhat.com/1184497
	Continuous-Integration: Jenkins CI

2015-09-08  Petr Horáček  <phoracek@redhat.com>

	net: ifcfg: synchronous ifup
	Return device only after it's properly created and up. Without this
	check, device can be used before ready and it will end with failture.

	Disadvantage of this patch is slower network configuration
	(functional/networkTests.py was running 1000s instead of 700s).

	Continuous-Integration: Jenkins CI

	net: fix test_setupNetworks_on_external_bond
	In this test we manualy write slave names to bond's BONDING_SLAVES file.
	Unfortunately, when we try to enslave a nic in UNKNOWN state (left by
	a previous test), action explodes with
	'IOError: [Errno 1] Operation not permitted'.

	Now we set nics explicitly down before enslaving.

	Continuous-Integration: Jenkins CI

2015-09-07  Martin Sivak  <msivak@redhat.com>

	Add an empty metadata qos element to the created domain
	Libvirt reports an error every time VDSM queries for the metadata
	element when there is none. This patch adds an empty default
	element to get rid of those errors.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1219903
	Continuous-Integration: Jenkins CI

2015-09-07  Dan Kenigsberg  <danken@redhat.com>

	automation: enable pep8
	We now have a single check-patch job.

	Continuous-Integration: Jenkins CI

2015-09-06  Candace Sheremeta  <cshereme@redhat.com>

	vdsm: Image.[download|upload] Description
	Changed the description for Image.download and Image.upload methods
	in vdsmapi-schema.json in order to more accurately reflect
	the nature of these methods' methodArgs parameters

	Continuous-Integration: Jenkins CI

2015-09-04  Javier Coscia  <ciudavitacos@gmail.com>

	Fix string in diskunmap hook README file
	diskunmap README file has a copy/paste mistake. This patch fixes it.

	Continuous-Integration: Jenkins CI

2015-09-04  Fred Rolland  <frolland@redhat.com>

	hsm: Support checkStatus param in getDeviceList
	In order to populate the 'status' field, the getDeviceList
	verb perform a create PV test. This operation is expensive, and in
	setups with large number of devices it will cause performance issue.

	However, the 'status' field is not always needed. This patch
	add an optional 'checkStatus' boolean parameter to getDeviceList.
	By default it will be True to keep same behavior as before.

	If specified as False, the PV create test will be skipped and the
	'status' field will be populated as 'unknown'.

	The flow before this patch was:
	    - Engine calls getDeviceList, VDSM perform status check for each
	      devices, possibly times out
	    - User select a few devices (typically one)
	    - Engine warn user about used devices

	The flow with this patch:
	    - Engine calls getDeviceList, skipping status check
	    - User select a few devices (typically one)
	    - Engine calls getDeviceList, checking status only for selected
	    - Engine warn user about used devices

	On a setup of 100 ISCSI devices, the command took 3s without
	the PV create test against 58s with the test.

	real    0m2.987s
	user    0m0.263s
	sys     0m0.028s

	real    0m57.769s
	user    0m0.265s
	sys     0m0.024s

	Examples:
	    getDeviceList
	        return all devices
	    getDeviceList FCP
	        return only FCP devices
	    getDeviceList FCP True
	        return only FCP devices and perform PV create test
	    getDeviceList ISCSI False guid1 guid2
	       return info for guid1 and guid2, assuming ISCSI type
	       without performing PV create test

	Bug-Url: https://bugzilla.redhat.com/1217401
	Continuous-Integration: Jenkins CI

2015-09-04  Ondřej Svoboda  <osvoboda@redhat.com>

	network.api: EL7's dhclient doesn't support -df so stop using it there
	This is a quick fix only. A proper solution for the affected bug will
	have to fall back to -lf (a copy of a lease file).

	Bug-Url: https://bugzilla.redhat.com/1219429
	Continuous-Integration: Jenkins CI

2015-09-03  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: fd leak
	We need to make sure that there is no reference to objects which holds
	a socket because m2c closes socket only when its object is garbage
	collected.

	This patch fixes two places where we had direct or indirect references
	to socket object. In _StompConnection we kept a reference to it but now
	we use dispatcher.socket. We passed connection object to JsonRpcServer
	in order to get get local address which slowed down collection of socket
	object (different thread) which could lead to reaching fd limit allowed
	for the process. We removed this issue by passing local address to the
	server instead.


	Bug-Url: https://bugzilla.redhat.com/1256446
	Continuous-Integration: Jenkins CI

2015-09-02  Idan Shaby  <ishaby@redhat.com>

	volume: fix failing metadata parsing
	The call to "split" in file and block volumes expects only one "=" per
	line. This is not a good behavior since there might be fields that
	contain some more "=" (like Description).
	This patch limits the number of splits to 1, so that the fields values
	can contains some other "=".

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1258835
	Continuous-Integration: Jenkins CI

2015-09-02  Nir Soffer  <nsoffer@redhat.com>

	multipath: Write multipath.conf atomically
	We used to create a temporary file, and then copy (using cp) the
	temporary file to final location.  Using external process to copy files
	on local storage is not needed, we can use the Python standard library
	for that. Also, this operation is not atomic, and can leave half written
	file if the write is interrupted in the middle.

	Now we use NamedTemporaryFile(delete=False), to create a temporary file
	safely, but do not delete it, so we can rename the file atomically.

	Continuous-Integration: Jenkins CI

2015-09-02  Amit Aviram  <aaviram@redhat.com>

	vm: Libvirt quering after disk detach operation addition.
	As stated in libvirt documentary, after detaching a device using
	virDomainDetachDeviceFlags, we need to verify that this device
	has actually been detached.

	Currently we use virDomainDetachDevice. However- That function behaves
	the same in that matter. (Currently it is not documented at libvirt's
	API docs- but after contacting libvirt's guys it turned out that this
	is true. Bug 1257280 opened for fixing the documentation.)

	Not verifying that the device was detached, as mentioned above, cause
	various problems, as hotunplugDisk could return a success result
	while it did not actually succeeds to detach the disk.

	This patch adds this functionallity to hotunplugDisk, and after some
	timeout fails the operation if the disk was not detached.

	Bug-Url: https://bugzilla.redhat.com/1044466
	Continuous-Integration: Jenkins CI

	vm.py: State saving in hotunplugDisk.
	VM's state was saved before detatching a disk in hotunplugDisk.

	Saving vm's state should be performed only AFTER vdsm is actually
	detaching the disk, otherwise the disk will remain in xmlDesc and
	be calculated in the vm's hash.

	This causes a bug in the engine's VM monitoring: the engine
	gets the same hash as before the disk was unplugged, thus does not
	update the disk's status.

	Due to a possible race while hotunplugging, where VM monitoring starts
	updating the VM devices while the disk is still plugged- then
	hotplugging is performed and succeeds, then monitoring is resumed and
	sets the disk to be still plugged, this patch is critical for the
	engine to be synced with the actual state of the VM's disks.

	Please note that this patch is partial, as detachDevice is async. That
	means that still the hash can be calculated wrong in case the disk was
	not detached yet. This fix will be included in a following patch.

	Bug-Url:https://bugzilla.redhat.com/1206696
	Continuous-Integration: Jenkins CI

2015-09-02  Nir Soffer  <nsoffer@redhat.com>

	concurrent: Add support for target function kwargs
	Turns out we pass kwargs to some threads, so we must support this
	syntax.

	Relates-To: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2015-09-01  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: rename appropriateDevice to appropriateMultipathDevice
	The appropriateDevice method inside supervdsm is inappropriately named
	as it is only used for multipath devices. This patch specializes the
	name so it is possible to write more of these specialized methods
	with correct specific names.

	Continuous-Integration: Jenkins CI

	supervdsm: move udevadm methods to udevadm module
	udevadm module already exists, so there is no reason to keep the
	method logic in supervdsm. udevadm also provides us with a means to
	execute a command, it is therefore used instead of EXT_UDEVADM. To
	keep the behavior same, Error raised by trigger is caught in
	supervdsm and re-raised as IOError (same as before the patch).

	Continuous-Integration: Jenkins CI

2015-09-01  Nir Soffer  <nsoffer@redhat.com>

	storage_exception: Show data in MetadataOverflowError
	This should help to debug such issues. Previously we raised an error
	without any details, making it hard to debug such issue.

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1258097
	Continuous-Integration: Jenkins CI

2015-09-01  Adam Litke  <alitke@redhat.com>

	Refactor v2v jobs for reusability
	The jobs management infrastructure in v2v.py is general purpose and
	reusable.  For example, storage would like to use the exact same thing
	to manage long-running storage operations.  In order to make this
	possible, factor out the job management parts of v2v.py into a new
	module jobs.py and create a generic Job class which contains the
	complete interface needed by the job manager.  In addition, add some
	basic tests for Job objects and their management.

	Continuous-Integration: Jenkins CI

2015-09-01  Shahar Havivi  <shaharh@redhat.com>

	schema: add v2vJobs to HostStats
	v2vJobs reports via HostStats and needs to be declared in schema

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	v2v: add test for getOvaInfo verb
	Continuous-Integration: Jenkins CI

2015-08-31  Adam Litke  <alitke@redhat.com>

	make v2v errors reusable
	We plan to introduce a generic jobs module which will be used for
	monitoring and managing long running operations that are tied to a
	specific host.  Errors for a job already existing (JobExistsError), job
	not found (NoSuchJob), and job still running (JobNotDone) should be
	usable by the new infrastructure.  Let's drop the V2V prefixes from the
	names and update the error messages to remove v2v-specific language.

	This does not affect the engine<-->vdsm API since the error codes remain
	unchanged.

	Continuous-Integration: Jenkins CI

2015-08-31  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: generalize udevTrigger method
	udevTrigger in it's current state is tied to storage code as it does
	property match against DM_NAME. USB devices require attribute match for
	devnum and busnum, and we should be somewhat able to do both these
	matches in a more generic function.

	This patch refactors udevTrigger to include attr_matches and
	property_matches. When an iterable of attribute-value iterables is sent,
	they're expanded to the correct udevadm command.

	Continuous-Integration: Jenkins CI

2015-08-31  pkliczewski  <piotr.kliczewski@gmail.com>

	m2c: rename m2c modules
	In preparation for configurable usage ssl or m2crypto modules we need
	to distinguish modules which use m2c.

	Continuous-Integration: Jenkins CI

2015-08-31  Nir Soffer  <nsoffer@redhat.com>

	fencing: Remove unneeded traceback decorator
	Commit e7ea52c7614c (vdsm: making PM 'on' and 'off' sync) stopped
	running fence() in a background thread, but left the @utils.traceback
	decorator. This decorator was needed when running in a background thread
	to avoid silent failures, but when running in a request thread, we have
	proper logging in place.

	Continuous-Integration: Jenkins CI

2015-08-30  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: improve which ipv4 addr is reported.
	The current code assumed that additional configured addresses for a
	device would have the 'secondary' flag. However, this is no longer
	true in recent kernels, as multiple primary addresses can be set for
	a device.

	The improvement is that now we will check if any of the addresses is
	in the subnet of the gateway and report the first that does. If we
	can not find one, we return the first set ip.

	Continuous-Integration: Jenkins CI

2015-08-30  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Revert "tests: functional - convert to run over jsonrpc"
	Due to regression we need to revert this patch.

	This reverts commit 9d5a4671e6ee5b7d70e849dc54591d9e21fb1ef3.

	Continuous-Integration: Jenkins CI

2015-08-30  Tal Nisan  <tnisan@redhat.com>

	Cleanup of storage domain creation in hsm.py
	This patch changes the specific per domain type creation handling is done
	to remove duplicate code, allow uniform error handling when we call the
	actual creation and make the flow more clear

	Continuous-Integration: Jenkins CI

2015-08-28  Nir Soffer  <nsoffer@redhat.com>

	multipath: Replace specific device sections with all_devs section
	We require "no_path_retry fail" setting to ensure that io requests are
	not queued, which may lead to blocking of multiple unrelated threads in
	vdsm when performing lvm, multipath or scsi rescan operations.

	We had several specific device sections, overriding "no_path_retry", but
	these settings had to copy the built-in device settings, and if the
	built-in settings are changed, our copied version would hide the changed
	settings.

	multipath supports now a new "all_devs yes" device attribute. A device
	section using this attribute overrides any setting defined in the
	built-in devices. Unlike regular device setting, we don't need to copy
	the setting from the built-in devices, so new settings in multipathd are
	respected.

	This patch removes the specific device settings and replace them with
	magic all_devs section.

	This change also fixes the device sections for "COMPELNT/Compellent Vol"
	(BZ1225162) and "HITACHI"/"DF.*" devices, which were missing the
	built-in device settings. Using all_devs device, we inherit the built-in
	settings we do not override.

	Since this change fixes a very important bug, we also bump the revision
	tag, forcing a configuration during upgrades.

	Note: all_devs is not supported yet in Fedora 21 (BZ1253799). Users on
	Fedora 21 may need to add specific device configuration manually for
	optimal configuration.

	Backport-To: 3.6
	Backport-To: 3.5
	Bug-Url: https://bugzilla.redhat.com/880738
	Bug-Url: https://bugzilla.redhat.com/1225162
	Continuous-Integration: Jenkins CI

2015-08-28  Francesco Romani  <fromani@redhat.com>

	tests: split vm operation tests
	vmTests.py is going down the same route as vm.py.
	Luckly, here it is easier to split the module, so let's
	start extracting so-called 'vm operation' tests.

	Only-Move: yes
	Continuous-Integration: Jenkins CI

2015-08-27  Amador Pahim  <apahim@redhat.com>

	Limit sleep_millisecs to minimum 10
	According to the former KSM controller, ksmtuned, 10 should be the
	minimum value for sleep_millisecs:

	  48 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total]
	  49 [ $sleep -le 10 ] && sleep=10      <---- 10 is the minimum
	  50 debug sleep $sleep

	Systems with a low sleep_millisecs number will run ksmd daemon without
	interruption, causing a very high cpu time consumption.

	This patch limits sleep_millisecs to the minimum of 10.

	Bug-Url: http://bugzilla.redhat.com/1256949
	Continuous-Integration: Jenkins CI

2015-08-27  Ondřej Svoboda  <osvoboda@redhat.com>

	network: bridge inherits DHCP unique identifier from its DHCP-enabled port
	On Fedora 21 or newer, dhclient has started to use DHCP unique identifier
	with a link-layer address and time (DUID-LLT) to identify a host.

	When a host (e.g. oVirt node) is being added to engine's management network
	while its NIC used DHCP, running dhclient on the bridge on top of the NIC
	results in connectivity loss because the new dhclient is unaware of the DUID
	used previously (dhclient should store it somewhere; bug to be reported soon)
	and so the newly-generated DUID contains a different time value (albeit the
	bridge's MAC address is the same as the NIC's), thus the host is given
	a different IP address as well.

	This patch assures that the original DUID is read from the NIC's dhclient
	lease file by the dhclient running on the bridge for all network
	configurators. A new functional test (a specialized copy of
	testSetupNetworksAddDelDhcp) verifies the fix.

	Bug-Url: https://bugzilla.redhat.com/1219429
	Continuous-Integration: Jenkins CI

2015-08-27  Amit Aviram  <aaviram@redhat.com>

	tests: Typo in vmStorageTests.py
	Should be written "Return".

	Continuous-Integration: Jenkins CI

2015-08-27  Nir Soffer  <nsoffer@redhat.com>

	config: Improve options documentation
	Fix bogus documentation for vm_watermark_interval, which seems to
	confuse both users and developers. This option has nothing to do with
	statistics, and is used for automatic extension of thin provisioned
	volumes on block storage.

	Add the missing documentation for the highly confusing
	volume_utilization_percent and volume_utilization_chunk_mb.

	Bug-Url: https://bugzilla.redhat.com/1195421
	Continuous-Integration: Jenkins CI

2015-08-26  Nir Soffer  <nsoffer@redhat.com>

	v2v: Try to be nicer to other processes
	Under the hood, virt-v2v is running qemu-img convert. We use high nice
	and ionice values when running qemu-img convert, but we did not specify
	such options when running virt-v2v. This patch run virt-v2v with the
	same setting uses for qemu-img convert.

	Backport-To: 3.6
	Relates-To: https://bugzilla.redhat.com/1243935
	Continuous-Integration: Jenkins CI

2015-08-26  Adam Litke  <alitke@redhat.com>

	storage: simplify hasVolumeLeases
	Whether a storage domain has volume leases depends on the lock
	implementation used, not the storage domain version.  SafeLease never
	supports volume leases but LocalLock and SANLock both do.  Simplify
	hasVolumeLeases and the clusterLock tables by moving the support flag
	into the class implementing the lock.

	Continuous-Integration: Jenkins CI

2015-08-26  Francesco Romani  <fromani@redhat.com>

	virt: add and use vm.acpiReboot() method
	The VM powerdown flow, implemented into the vmpowerdown.py module,
	needs to call libvirt APIs to trigger the actual shutdown or reboot
	operations.

	To do so, it directly accesses the Vm._dom private attribute, which
	is impolite and evil.

	This patch adds acpiReboot public method, with built-in protection
	against asynchronous QEMU death.
	This of course adds more code to the already fat vm.py, but improves
	isolation among modules, which is a greater good.

	Related-To: https://bugzilla.redhat.com/1154389
	Continuous-Integration: Jenkins CI

	vm: make acpiShutdown handle NotConnectedError
	In the Vm shutdown flow it is possible that the domain is
	disconnected asynchronously as in any other Vm flow.

	This patch makes Vm.acpiShutdown() handle the
	sudden domain disconnections in a graceful manner.

	vmpowerdown needs to be aware if acpiShutdown failed
	for this reason, so it can go ahead with the callback
	chain without wasteful waits,

	Backport-To: 3.6
	Bug-Url: https://bugzilla.redhat.com/1154389
	Continuous-Integration: Jenkins CI

2015-08-26  Ala Hino  <ahino@redhat.com>

	gluster: Publish gluster get volume info
	In 3.6 we use glusterVolumeInfo API to get gluster volume info in order to
	mount gluster to backup volume servers.  glusterVolumeInfo API is defined in
	vdsm/gluster/cli.py and is imported to supervdsm. In vdsm/gluster/cli.py there
	are APIs that are used to manage gluster volumes; however, we don't want to
	expose all these APIs in supervdsm unless gluster is used, while we do want to
	expose getGlusterVolumeInfo.  To achieve this goal, we expose RHEV_ENABLED
	param. With this change, gluster API defined in vdsm/gluster/cli.py exposed on
	supervdsm either when building with gluster or when building on RHEV.

	Bug-Url: https://bugzilla.redhat.com/1254499
	Continuous-Integration: Jenkins CI

2015-08-26  Dan Kenigsberg  <danken@redhat.com>

	Revert "supervdsm: Decorator for supervdsm proxied calls."
	I've merged commit 9fad76d2075f315ebe48212508fe9b677d74dfc8
	prematurely, before proper discussion about its merits and
	disadvantages.

	One disadvantage is the relative ease of decorating a
	function and then, implicitly, having it run as root in all
	contexts.

2015-08-26  Ala Hino  <ahino@redhat.com>

	gluster:cleanup: Remove unnecessary wrapper
	Existing wrapper is redundant as it does not provide any logic to the method.
	Hence, the decision to remove it.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-25  Dima Kuznetsov  <dkuznets@redhat.com>

	ppc64HardwareInfo: move into lib
	Continuous-Integration: Jenkins CI

2015-08-25  Nir Soffer  <nsoffer@redhat.com>

	multipath: Remove unneeded "features" configuration
	We used to override "features 0" to disable "queue_if_no_path" feature.
	However, this configuration also disable other unrelated features, that
	may be needed for optimal configuration.

	We use "no_path_retry fail", which removes the feature
	"queue_if_no_path" if it exists in the "features" option.

	For example, if a built-in device is using:

	    features "3 queue_if_no_path pg_init_retries 50"

	When overriding "no_path_retry fail", the device features becomes:

	    features "2 pg_init_retries 50"

	Now we override only "no_path_retry fail" and leave "features" as is.

	Backport-To: 3.6
	Relates-To: https://bugzilla.redhat.com/880738
	Continuous-Integration: Jenkins CI

2015-08-25  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: remove guid from __udevReloadRules
	__udevReloadRules required 'guid' argument, but due to nature of the
	call it's not required and can be confusing (due to the fact that all
	rules are reloaded).

	Continuous-Integration: Jenkins CI

2015-08-25  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: fix xfs filesystem is created with wrong inode size
	Currently brick create function creates an xfs filesystem with
	inode size of 256 for brick which uses raid0 or JBOD devices.

	This patch uses the striping parameters "-d su=stripe_unit_size,
	sw=stripe_width_in_number_of_disks" during xfs file system
	create for RAID6. For RAID 10, JBOD and other devices it omits
	the "-d su=<>,sw=<>" option and set only the inode size to 512
	and the directory block size to 8192.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1244865
	Continuous-Integration: Jenkins CI

2015-08-25  Nir Soffer  <nsoffer@redhat.com>

	tool: Cleanup configurators imports
	Make the import nicer:

	- Replace unneeded multi-line imports with single line imports
	  multi-line import should be done with (), not with fragile \
	  but there was not real need for any of these imports.
	- Unify absolute import syntax
	  from .import foo -> from . import foo
	- Unify whitespace around imports
	- Import names in the same order (e.g. YES, NO, MAYBE)

	Continuous-Integration: Jenkins CI

2015-08-25  Francesco Romani  <fromani@redhat.com>

	sampling: make _getInterfaceStats a function
	The HostStatsThread._getInterfaceStats() method could
	be easily made a free function, to reduce the coupling
	and to improve the testability.

	Continuous-Integration: Jenkins CI

2015-08-25  Dima Kuznetsov  <dkuznets@redhat.com>

	dmidecodeUtil: move into lib
	Continuous-Integration: Jenkins CI

2015-08-25  Francesco Romani  <fromani@redhat.com>

	sampling: make _getCpuCoresStats a function
	HostStatsThread._getCpuCoreStats() method can be
	easily made a free function, to reduce the coupling
	and to make it more testable.

	Continuous-Integration: Jenkins CI

	virt: introduce virdomain module
	Add virdomain module to hold the
	libvirt Domain wrapper that virt code needs,
	to avoid ugly circular dependencies between
	periodic.py, sampling.py and vm.py, and last
	but not least, to shed some load from vm.py

	This patch does the code move, but it is peppered
	with trivial rename and trivial fix (inherit from object).

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	periodic: make VmDispatcher ignore TooManyTasks
	VmDispatcher is meant to make N independent operations
	from one (VM bulk sampling), being N the number of active VMs.

	To fulfil this claim, if one of the N independent calls fails with
	TooManyTasks, we go on attempting running the rest of the calls, even
	though it is highly likely that once one TooManyTasks error is
	encountered, many subsequent dispatch() attempts would fail.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

	vmstats: handle known-missing stats
	In some well-known and benign causes, libvirt will not
	return the complete set of bulk stats.

	It is dangerous to blindly ignore KeyErrors when some
	fields are missing, because this can hide other bugs.
	But it is safe to ignore them in the aforementioned cases.

	This patch lays down the basic pieces to safely ignore
	the errors, starting with the first loud and known case:
	migration destination VM.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-08-25  Dan Kenigsberg  <danken@redhat.com>

	make: unbreak pyflakes test
	Much like pep8 which was fixed in https://gerrit.ovirt.org/44416
	pyflakes test, too, was inadvertantly broken by
	https://gerrit.ovirt.org/43845.

	This patch reverts another bit of that message, while fixing some
	pyflakes damange accoumulated since its introduction.

	Backport-To: 3.6
	Continuous-Integration: Jenkins CI

2015-08-25  Nir Soffer  <nsoffer@redhat.com>

	ceph: Report librbd1 version also on Debian
	In commit c447c3964e (ceph: Report librbd1 package details) Debian
	support was missing. This patch add the missing configuration.

	Continuous-Integration: Jenkins CI

	caps: More readable and maintainable packages list
	Long lists that do not fit in one line are easier to work with when they
	are formatted one item per line, and sorted. For example, diffs becomes
	single line change, as can be seen in the next commit.

	Continuous-Integration: Jenkins CI

2015-08-24  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: remove unneeded version check
	We now require higher version of systemd than 181, therefore checking
	that version > 181 is not required anymore. This also removes the need
	for branch in __udevReloadRules because the argument will always be
	--version.

	Continuous-Integration: Jenkins CI

2015-08-24  Nir Soffer  <nsoffer@redhat.com>

	multiapth: Tell the user about backups
	After backing multipath.conf, tell the user about the backup file, in
	case she would like to remove the backups later.

	Example output:

	    # vdsm-tool configure --module multipath

	    Checking configuration status...

	    multipath requires configuration

	    Running configure...
	    Backup previous multipath.conf to '/etc/multipath.conf.201508192113'
	    Reconfiguration of multipath is done.

	    Done configuring modules to VDSM.

	Continuous-Integration: Jenkins CI

2015-08-24  Dima Kuznetsov  <dkuznets@redhat.com>

	supervdsm: Decorator for supervdsm proxied calls.
	These decorators allow automatic dispatch to supervdsm process, in this
	way:

	@supervdsm.proxied_call
	def some_func():
		this_requires_root()

	Calling the above function from root context (such as supervdsm) will
	execute it as regular code, but when calling from non-root context,
	it will try and dispatch it to supervdsm process.

	Inside the supervdsm process, it will attempt to import the requested
	module and retrieve the relevant function, then call it and return the
	result.

	Continuous-Integration: Jenkins CI

2015-08-24  Nir Soffer  <nsoffer@redhat.com>

	debug: Make it easy to debug start failures
	If Vdsm fail to start before logging was configured, it used to log a
	message to syslog and exit silently. This make it hard to debug from the
	shell.

	This patch raises FatalError in the places that used to log to syslog
	and exit.  In the exception handler we log to syslog and re-raise the
	exception, so the traceback is available in the shell, or in systemd
	journal.

	For example, instead of:

	    # /usr/share/vdsm/vdsm
	    (no output)

	We get now:

	    # /usr/share/vdsm/vdsm
	    Traceback (most recent call last):
	      File "/usr/share/vdsm/vdsm", line 271, in <module>
	        main()
	      File "/usr/share/vdsm/vdsm", line 253, in main
	        __assertVdsmUser()
	      File "/usr/share/vdsm/vdsm", line 230, in __assertVdsmUser
	        % (constants.VDSM_USER, username))
	    __main__.FatalError: Not running as 'vdsm', trying to run as 'root'

	In the system log we will see this message:

	    Aug 11 20:58:34 hostname vdsm: VDSM failed to start: Not running as
	    'vdsm', trying to run as 'root'

	Continuous-Integration: Jenkins CI

2015-08-24  Adam Litke  <alitke@redhat.com>

	StorageDomainManifest: move image and volume enumeration
	Move the code responsible for enumerating volumes and images to the
	StorageDomainManifest.

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: deleteImage and deps
	Next on the list of functions to move into the StorageDomainManifest is
	deleteImage and its dependencies.

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: Move getRepoPath and other metadata getters
	Move a bunch of basic metadata reader functions into the manifest.

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: move extend and extendVolume
	The functions 'extend' (extend storage domain) and 'extendVolume' can be
	safely moved into BlockStorageDomainManifest.  This patch pulls in quite
	a few utility functions that these two operations depend upon.

	Continuous-Integration: Jenkins CI

2015-08-24  Ondřej Svoboda  <osvoboda@redhat.com>

	iproute2, pyroute2: models.Bond checks for .unifiedPersistence, so add it
	Commit 30a3fc25 fixed a condition in Bond.configure for ifcfg configurator
	that has a .runningConfig member only when using unified persistence, but
	broke the other two configurators that use unified persistence implicitly.

	The simplest fix (and even self-documentation) is to add .unifiedPersistence
	to them.

	Continuous-Integration: Jenkins CI

2015-08-24  Nir Soffer  <nsoffer@redhat.com>

	concurrent: Introduce concurrent.thread() utility
	We are repeating this boilerplate code everywhere:

	    def __init__(self):
	        self._thread = threading.Thread(target=self._run, name="foobar")
	        self._thread.daemon = True

	    @utils.traceback(on=log.name)
	    def _run(self):
	        # stuff to run in thread

	This boilerplate is going to become worse since we want to set thread
	system name in the thread target method.

	This patch introduces concurrent.thread() utility function, eliminating
	the boilerplate:

	    def __init__(self):
	        self._thread = concurrent.thread(self._run, name="foobar",
	                                         logger=self.log.name)

	    def _run(self):
	        # stuff to run in thread

	This utility will be extended later to set system thread name based on
	Python thread name.

	Continuous-Integration: Jenkins CI

2015-08-24  Francesco Romani  <fromani@redhat.com>

	tests: temporarily exclude few tests to restore CI
	A few network tests require the TUN device, which is not available
	under mock environments.

	Furthermore, when run under the new CI infrastructure which leverages mock,
	we can see this error:

	======================================================================
	ERROR: testGetBondingOptions (netinfoTests.TestNetinfo)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/tmp/run/tests/monkeypatch.py", line 133, in wrapper
	    return f(*args, **kw)
	  File "/tmp/run/tests/testValidation.py", line 105, in wrapper
	    return f(*args, **kwargs)
	  File "/tmp/run/tests/testValidation.py", line 145, in wrapper
	    return f(*args, **kwargs)
	  File "/tmp/run/tests/netinfoTests.py", line 290, in
	testGetBondingOptions
	    with open(netinfo.BONDING_MASTERS, 'w') as bonds:
	IOError: [Errno 13] Permission denied: '/sys/class/net/bonding_masters'
	-------------------- >> begin captured logging << --------------------
	root: DEBUG: /sbin/modprobe bonding (cwd None)
	root: DEBUG: FAILED: <err> = ''; <rc> = 1
	--------------------- >> end captured logging << ---------------------

	----------------------------------------------------------------------

	This happens if the system cannot load modules inside the chrooted
	mock environments.

	We temporarily NOSE_EXCLUDE away the problematic jobs in order to
	restore CI automated tests. We will restore those tests ASAP once
	fixed to run properly in mocked environments.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-24  David Caro  <dcaroest@redhat.com>

	Adding check-patch ci script
	For now only runs the vdsm unit tests

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-23  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: fix TypeError in exception.py
	Currently gluster cli functions throws error in exception due to a bug
	in python multiprocess http://bugs.python.org/issue15440 which fails
	to re-raise in supervdsm side.  This is workaround fix to set optional
	arguments to constructor of VdsmException and GlusterException

	Traceback (most recent call last):
	  File "/usr/share/vdsm/rpc/BindingXMLRPC.py", line 1136, in wrapper
	    res = f(*args, **kwargs)
	  File "/usr/share/vdsm/gluster/api.py", line 80, in wrapper
	    rv = func(*args, **kwargs)
	  File "/usr/share/vdsm/gluster/api.py", line 686, in createBrick
	    raidParams)
	  File "/usr/share/vdsm/supervdsm.py", line 50, in __call__
	    return callMethod()
	  File "/usr/share/vdsm/supervdsm.py", line 48, in <lambda>
	    **kwargs)
	  File "<string>", line 2, in glusterCreateBrick
	  File "/usr/lib64/python2.6/multiprocessing/managers.py", line 726, in _callmethod
	    kind, result = conn.recv()
	TypeError: ('__init__() takes exactly 2 arguments (1 given)',
	    <class 'gluster.exception.GlusterHostStorageDeviceInUseException'>, ())

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1231722
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	gluster: fix AttributeError in exception.py
	Currently whenever an exception raised with extra arguments
	apart from rc, out, err; the exception failed with
	AttributeError due to base class member variables are not
	initialized properly.

	This patch fixes this AttributeError issue by calling the
	ancestor's __init__ method explicitly to invoke base class
	constructor which will initialize the base class member
	variables like rc, out and err.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1231722
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-23  Ala Hino  <ahino@redhat.com>

	gluster: Report glusterfs-cli package details
	Report glusterfs-cli package details in getVdsCaps output.
	Engine will use this information to validate adding a host
	or storage domain to a data center.

	Bug-Url: https://bugzilla.redhat.com/1183318
	Continuous-Integration: Jenkins CI

2015-08-23  Ido Barkan  <ibarkan@redhat.com>

	net: tests: use ipwrapper functions in nettestlib
	No reason to repeat the code there.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-23  Greg Padgett  <gpadgett@redhat.com>

	storage: validate vdsm rwx permissions for file storage
	VDSM needs permission to write to file-based storage.  Presumably the
	existing check for qemu permissions or a subsequent failure would throw
	an error; however, these errors were not always clear nor did they help
	the user (e.g. a general Error 100, such as in the referenced bug).

	With an explicit check, we can ensure the failure happens up-front and
	gives a meaningful error message to the user.

	Bug-Url: https://bugzilla.redhat.com/1250752
	Continuous-Integration: Jenkins CI

2015-08-23  Francesco Romani  <fromani@redhat.com>

	vm: remove unused 'output' value in response
	The 'output' value is not documented in schema, and apparently
	Engine doesn't care about it. This patch removes it.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-22  Yeela Kaplan  <ykaplan@redhat.com>

	tests: functional - convert to run over jsonrpc
	will run functional tests by default over jsonrpc

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138381
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-19  Ido Barkan  <ibarkan@redhat.com>

	net: tests: rename Interface methods.
	Now they correspond better to the iproute2 commands that they call

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-19  Francesco Romani  <fromani@redhat.com>

	vm: fix misleading XML log
	When VDSM is asked to create a new VM, among the other things,
	it builds the domain XML according to the configuration sent
	by client (aka Engine) and run the before_vm_start hook.

	This is done also on the dehibernating (aka migration from file)
	path, for no apparent good reason.

	This is wasteful and useless at best, and most likely misleading,
	because VDSM logs the XML it produced, which is *not* what is
	gonna be used in the dehibernation path.

	This patch fixes this issue loggging the XML which is actually
	about to be fed to libvirt, not the useless one regenerated
	by VDSM.

	Backport-To: 3.6
	Related-To: https://bugzilla.redhat.com/1190210
	Related-To: https://bugzilla.redhat.com/1234197
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-19  Ido Barkan  <ibarkan@redhat.com>

	net: tests: new style classes in nettestlib
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-19  Nir Soffer  <nsoffer@redhat.com>

	multipath: Use tuple for constant data
	The old tag list is not going to change during runtime, so better keep
	it in a tuple to make our intent more clear.

	Continuous-Integration: Jenkins CI

	multipath: Keep tags sorted from newer to older
	When reading the code or adding a new tag, it is little nicer that the
	recent tags are on the top of the list. When searching for tags, it
	makes more sense to search the most recent tags first.

	Continuous-Integration: Jenkins CI

	multiapth: Reorganize constants and improve documentation
	It is nicer to work with code when related items are grouped together
	and when groups have documentation.

	Now the module start with a description of the VDSM REVISION tag, which
	must be in the first line of the file, followed by the current and old
	tag values.

	Then we discuss the VDSM PRIVATE tag, which may be in the second line,
	followed by the current and old tag values.

	Previously you had to read the code to understand this logic.

	Continuous-Integration: Jenkins CI

	multipath: Reformat old tags list
	It is easier to work with long lists when we have one item per line, and
	all lines are terminated by ",". This is not possible in some languages,
	but Python wisely allow this syntax. Adding a new tag is now one line
	change and the diffs are nicer.

	Continuous-Integration: Jenkins CI

2015-08-19  Ido Barkan  <ibarkan@redhat.com>

	net: fix start_devices.
	a device named bond9.99 is a vlan device, not a bond.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-19  Petr Horáček  <phoracek@redhat.com>

	net: monitor: string formatting enhancement
	suggested by osvoboda.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: sysctl: enable ipv6
	Enable sysctl.py:disable_ipv6(dev) to set /pro/sys/.../disable_ipv6
	also to '0'. This is needed in following Open vSwitch hook patch.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: tests: make monitor test_events_keys more readable
	When this tests fails, print lists of expected and caught events.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-18  Nir Soffer  <nsoffer@redhat.com>

	tests: Add RWLock tests
	Current RWLock looks too complex and has no tests. This patch fixes the
	later issue, so we can safely simplify the implementation later.

	Only one statement is not covered by the tests, handling of Queue.Full -
	this can never happen since we use unbounded queue. This code should
	be removed.

	The new tests reveal that lock demotion is broken; when replacing an
	exclusive lock with shared lock, we actually continue to hold an
	exclusive lock until we release the lock. This test is marked as broken
	so to avoid breaking the build.  I think we don't use lock demotion in
	the current code and this should be fixed by not supporting demotion.

	Continuous-Integration: Jenkins CI

	multipath: Use more meaningful names
	Since we are in the context of the multipath module, the MPATH or
	MPATH_CONF prefix is not helping. This patch hopefully make the code
	nicer to work with.

	Continuous-Integration: Jenkins CI

2015-08-18  Francesco Romani  <fromani@redhat.com>

	vm: periodic: NumaInfoMonitor doesn't need jobs
	The Vm.isDomainReadyForCommands() is a borderline hack
	that relies on virDomainGetControlInfo, which, in turn,
	tells the caller about the hypervisor monitor traffic.

	In the case of NumaInfoMonitor, this protection has zero
	positive value (only adds libvirt traffic) because
	the libvirt API used internally by NumaInfoMonitor do not
	need to access the QEMU monitor, but only data from /proc.

	Hence, remove the call to reduce libvirt traffic and
	to reduce false negative reported:

	periodic/3::WARNING::2015-08-12
	15:02:57,855::periodic::253::virt.periodic.VmDispatcher::(__call__)
	could not run <class 'virt.periodic.NumaInfoMonitor'> on
	[u'5b44bc17-99ba-4c9d-a3c5-fcd913c87361']

	X-Backport-To: 3.6
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-18  Ido Barkan  <ibarkan@redhat.com>

	net: create bond properly during start_devices
	This method, that is used during networks rollback, calls ifup on
	all ifcfg files it knows of. However, to ifup a bond, one needs to
	manually create it first, by writing '+bondingName' into
	/sys/class/net/bonding_masters . Ifcfg configurators already does
	so when creating bonds. Skipping this step causes ifup to fail and
	complain: 'Device bond11 does not seem to be present, delaying
	initialization.'
	This also fixes
	testSetupNetworksEmergencyDevicesCleanupBondOverwrite which is
	almost never run because it is a slow test.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	net: tests: add requiresUnifiedPersistence decorator
	So we can stop repeating
	if vdsm.config.config.get('vars', 'net_persistence') == 'ifcfg':
	    ...
	boiler plate.

	Continuous-Integration: Jenkins CI

2015-08-18  Francesco Romani  <fromani@redhat.com>

	vmstats: network: avoid ZeroDivisionError
	For still under investigation case, after migration
	sometimes vmstats code is fed with zero-intervalled samples.
	While we investigate the root cause, handle gracefully ZeroDivisionError
	adding guards in the public functions that have an 'interval' argument.

	The only left one was 'networks', so this patch fixes that.

	It is not good enough to generalize the check in vmstats.produce()
	because the relevant functions (cpu, disks, networks) are part of
	the public API of the module, so they should handle bad input properly.

	To improve testability, we fix the return value of the aforementioned
	functions. The return value is meant to be used only in testing.

	X-Backport-To: 3.6
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	vmstats: make nic_traffic private
	The nic_traffic() was never meant to be public, so
	this patch makes it private.
	Only renaming.

	X-Backport-To: 3.6
	X-Rename-Only: yes
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	clientIF: add logs during the recovery
	The recovery flow is supposed to be sporadic, but it
	is nevertheless very important.
	The current flow is pretty opaque, and on big setups
	it may take some time, leaving the admin to guess
	what's going on.

	This patch adds logs during the process, to make it
	obvious what is happened, what is going on and what
	is left to do.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	vm: do not log known missing alias
	Libvirt will not give back aliases for some devices, e.g.
	graphic devices.
	Avoid to worry the user and mislead troubleshooting with
	error logs in those, well known and usually harmless cases.

	X-Backport-To: 3.6
	Related-To: https://bugzilla.redhat.com/1248788
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-17  Ido Barkan  <ibarkan@redhat.com>

	net: always persist ifcfg files.
	Currently the persistence of ifcfg files is only done during
	setSafeNetworkConfig. But, if the user somehow opts out of this (by
	unticking this option in engine, or if setupNetwork is called out of
	this flow (e.g. vdsm-restore-net-config) then vdsm unpersists the
	ifcfg files. If then the host reboots without persisting the
	unpersisted ifcfg files, those files are gone during boot since they
	are not part of the original file system.

	Continuous-Integration: Jenkins CI

2015-08-17  Shahar Havivi  <shaharh@redhat.com>

	v2v: Import VM from OVA file
	OVA is a tar file which contain a VM with its Ovf file and its disks as
	well.

	Continuous-Integration: Jenkins CI

	v2v: get VM information from OVA file
	In order to import a VM that exists in an OVA file the oVirt engine
	needs to get information regarding the VM, such as disks sizes,
	interfaces memory etc.
	Adding a new verb: getExternalVmFromOva

	Continuous-Integration: Jenkins CI

2015-08-17  Nir Soffer  <nsoffer@redhat.com>

	multipath: Fix multipath.conf permissions
	/etc/multipath.conf permissions are 0644 before vdsm configures it.
	After configuration, the permissions become 0600. This is unintended
	change caused by using temporary file, which is created using 0600.
	Now we set the permissions before copying the temporary file.

	Continuous-Integration: Jenkins CI

2015-08-16  Dima Kuznetsov  <dkuznets@redhat.com>

	supervdsm: Move supervdsm module into lib
	This patch moves the code for supervdsm proxy into the lib of vdsm, that
	way lib code will be able to utilize supervdsm when it is running.

	Continuous-Integration: Jenkins CI

2015-08-15  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register: Add --vdsm-uuid
	This patch adds --vdsm-uuid option to user provide
	host UUID to be used instead vdsm.utils. Useful for
	hosts with blank or buggy DMI.

	Continuous-Integration: Jenkins CI

2015-08-15  Nir Soffer  <nsoffer@redhat.com>

	multipath: Remove unused constant
	We don't rotate files for couple of month now, so there is no need to
	keep this constant.

	Continuous-Integration: Jenkins CI

2015-08-14  Adam Litke  <alitke@redhat.com>

	tests: Introduce indirection tests for storage refactoring
	The refactoring of the storage classes to prepare for SPM removal is
	moving around a lot of code but not changing the implementation.  The
	SDM Indirection Tests check that calls made to the original objects
	properly redirect to the implementation in the newly introduced classes.
	To keep this refactoring simple, we are not testing the code itself,
	just that it was moved correctly.

	Continuous-Integration: Jenkins CI

	storage: Cleanup sd.getVAllocSize redirection
	For file-based storage, getVSize and getVAllocSize have different
	implementations.  For block storage, getVAllocSize just calls getVSize.
	The logic stating that the implementation of these functions is the same
	on block storage should be part of the BlockStorageDomainManifest not
	the BlockStorageDomain.  Therefore, we create getVAllocSize in the
	BlockStorageDomainManifest and have it call its own getVSize.  Now block
	and file StorageDomains can share the same indirection method for
	getVAllocSize (just as they do for getVSize).

	Continuous-Integration: Jenkins CI

	FileStorageDomainManifest: move getVAllocSize
	An earlier patch moved getVAllocSize only for BlockStorageDomainManifest
	objects.  In order to keep the Manifest interface consistent between
	different types of storage we must also make this change for
	FileStorageDomainManifest objects.

	Continuous-Integration: Jenkins CI

2015-08-12  Adam Litke  <alitke@redhat.com>

	Live Merge: Fix pre-extension calculation for chunked drives
	Live merge causes data to be written from the volume that will be
	removed (top volume) into its parent (base volume).  If the base volume
	is on a thinly-provisioned block device (ie. COW_FORMAT) then we need to
	make sure the parent's LV is large enough to accomodate growth of the
	qcow2 volume as a result of the writes.  The amount of growth can be
	anywhere between 0 (if all writes are replacing old data) and the
	allocated size of the top volume (if all writes target unallocated
	blocks in the base volume).  If the top volume is the active layer the
	amount of growth required could be more due to writes from the VM that
	come after this calculation is performed.

	To prevent live merge failures when the base volume's LV is too small we
	request an extension to accomodate the worst case scenario and increase
	the base volume's LV by the size of the top volume's LV plus one
	additional chunk.  The LV will never be increased beyond the actual
	capacity of the VM disk.

	The old code extended the base volume's LV to the size of the top
	volume's LV which does not cover all the possible scenarios.

	After live merge completes, the base volume's LV may be larger than is
	necessary.  This will not impact the VM but a manual cleanup step could
	be used to reclaim some storage space.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1240360
	Continuous-Integration: Jenkins CI

2015-08-12  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix addressing
	HOSTDEV:
	Libvirt (domain_conf.c) does not expect the type for the host address,
	and drops it if we send it. This causes USB address matching to fail
	when parsing the domain XML.

	SR-IOV
	Interface device of type="hostdev" DO expect the address type as
	it cannot be infered by hostdev's type.

	Both versions expect 'type' in guest address.

	Continuous-Integration: Jenkins CI

2015-08-11  Shahar Havivi  <shaharh@redhat.com>

	v2v: import abort/done status fix
	when importing is done need to check if the user aborted, if so no
	need to change the job status to done.

	Continuous-Integration: Jenkins CI

2015-08-11  Petr Horáček  <phoracek@redhat.com>

	net: tests: fix testSelectiveRestoreDuringUpgrade
	There were mixed bonds' slaves on assertion. Now it's fixed.

	Continuous-Integration: Jenkins CI

2015-08-11  Greg Padgett  <gpadgett@redhat.com>

	storage: don't chmod local storage symlink
	Proper permissions for the local storage target directory are already
	verified before the local storage is connected, so there is no need to
	change the permissions once the symlink has been created.

	Additionally, there is no need to change the permissions of the symlink
	itself.  From 'man 1 chmod':

	  chmod never changes the permissions of symbolic links; the chmod
	  system call cannot change their permissions.  This is not a problem
	  since the permissions of symbolic links are never used.

	The chmod call was added in 93390aab8381bff869bd029bf121f6a1f3761e8e in
	a large patch with both refactoring changes and updates to the way
	permissions were checked for storage.  However, the chmod is not needed
	and is effectively redundant with the validation that runs when storage
	is connected.

	Bug-Url: https://bugzilla.redhat.com/1112171
	Continuous-Integration: Jenkins CI

2015-08-11  Shahar Havivi  <shaharh@redhat.com>

	v2v: Abort job need not to clean the job
	When aborting a v2v job there is no need to delete it from the job
	collection.  (The job deletion will be handled by the engine)

	Continuous-Integration: Jenkins CI

2015-08-11  Nir Soffer  <nsoffer@redhat.com>

	vm: Improve error handling when Vm._dom is None
	Vm._dom is initialized to None on when creating a vm, and set to None if
	the underlying libvirt domain has died. Since Vm._dom is modified by
	multiple threads, it is impossible to check for None before using it.
	Even if it was possible, we don't want to litter the code with None
	checks everywhere.

	Some code was using this pattern:

	    try:
	        self._dom.doSomething()
	    except AttributeError:
	        # Oh, it was None

	This code is not communicating well our intent. Worse, it hides
	AttributeError in doSomthing()!

	Most code never check self._dom before using it. In the rare cases it is
	None, we fail with this Traceback:

	    Thread-460::ERROR::2015-07-04 19:53:21,977::__init__::520::jsonrpc.JsonRpcServer::(_serveRequest)
	        Internal server error
	    Traceback (most recent call last):
	      File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 515, in _serveRequest
	        res = method(**params)
	      File "/usr/share/vdsm/rpc/Bridge.py", line 277, in _dynamicMethod
	        result = fn(*methodArgs)
	      File "/usr/share/vdsm/API.py", line 727, in freeze
	        return v.freeze()
	      File "/usr/share/vdsm/virt/vm.py", line 2882, in freeze
	        frozen = self._dom.fsFreeze()
	    AttributeError: 'NoneType' object has no attribute 'fsFreeze'

	This traceback is a poor way to say "the vm is not running".

	This patch introduces the DisconnectedVirDomain class. This object will
	raise NotConnectedError for any attribute access. Vm._dom is initialzied
	to DisconnectedVirDomain(vmid) on startup and after underlying libvirt
	domain has died.

	Code trying to talk with a dead vm will fail now with:

	    NotConnectedError: Vm '681f6b09-a9c3-4422-a7e2-2f607368718b' is not
	    running yet or was shut down.

	Code handling disconnected state is using now:

	    try:
	        self._dom.doSomething()
	    except NotConnctedError:
	        ...

	This communicates our intent, and does not hide any error from the
	underlying code.

	Code checking for None is using now:

	    if self._dom.connected:
	        ...

	Continuous-Integration: Jenkins CI

2015-08-10  Petr Horáček  <phoracek@redhat.com>

	net: monitor: validate passed groups argument
	If we pass an invalid groups argument, Monitor raises exception into
	another thread and therefore it's hard to find and debug such a problem.

	Now we validate passed groups in __init__ method in main thread.

	Continuous-Integration: Jenkins CI

2015-08-07  Roman Mohr  <rmohr@redhat.com>

	sampling: Handle numa nodes with zero memory assigned
	Fix zero division when a numa node has zero memory assigned and report
	a memory usage of 100% instead. One case where this can happen is when
	the server is not set up correcly.

	Bug-Url: https://bugzilla.redhat.com/1247058
	Continuous-Integration: Jenkins CI

2015-08-06  Yeela Kaplan  <ykaplan@redhat.com>

	sudoers: remove unused multipath policies
	These policies could have been removed once moving
	multipath configuration code as part of vdsm-tool.

	Continuous-Integration: Jenkins CI

2015-08-06  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Move unrelated method
	It makes sense to have the special methods such as __eq__, __ne__, and
	__hash__ together.

	Continuous-Integration: Jenkins CI

	storageServer: Fix MountConnection.__hash__
	The previous implementation was:

	- Not using all object state, generating same hash for non-equal
	  objects, where using all object state would generate different hash.
	- Mixing the hash in a poor way, instead of reusing built-in hashing
	  capabilities of a tuple.

	This change fixes last broken test.

	Continuous-Integration: Jenkins CI

	storageServer: Add MountConnection.__ne__
	Classes implementing __eq__ should also implement __ne__ so != work as
	expected. Add the missing implementation to MountConnection and to the
	ExampleConnection.

	This change fixes one broken test.

	Continuous-Integration: Jenkins CI

	storageServer: Fix MountConnection.__eq__
	The previous implementation was:

	- Using isinstance() instead of using self.__class__
	- Was not using all object state, so objects with different state were
	  considered as equal.

	This change fixes two broken tests.

	Continuous-Integration: Jenkins CI

2015-08-06  pkliczewski  <piotr.kliczewski@gmail.com>

	logging: remove log messages which give little or no value
	Some of the messages logged during jsonrpc request processing give no or
	little value when diagnosing the issues but are logged quite often.

	This patch removes those messages.


	Bug-Url: https://bugzilla.redhat.com/1239062
	Continuous-Integration: Jenkins CI

2015-08-06  Andrew Dahms  <andrewjdahms@gmail.com>

	Revised the format of output from the vdsm-tool vdsm-id command.
	Added a newline character to the end of output from the vdsm-id option
	for the vdsm-tool. Without this character, the prompt is displayed on
	the same line as the output from the command.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-08-06  Shahar Havivi  <shaharh@redhat.com>

	v2v: refactor create command
	When other inputs will be introduced (such as files and ova) there
	is need to create a different input for virt-v2v command.

	This patch make _create_command as function variable and each new
	factory method will introduce its own _create_command.

	Continuous-Integration: Jenkins CI

2015-08-06  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Handle disconnects only if endpoints match
	Until now we used to handle every disconnect event with no respect
	of which remote endpoint caused it.
	There are currently 3 different types of graphic events:
	1. Connected event someone connected to the port
	2. Initialized event - Someone had the right credentials to establish
	   the connection and the session has started
	3. Disconnected event - Someone disconnected from the port

	Now any connected event can be triggered even with no credentials and
	would eventually trigger the disconnected event due to being rejected.
	This means that a host on the public internet which gets scanned for
	opened ports and tried to intrude them would trigger the disconnect
	handling for the affected VM.
	This can cause that somone connected via Spice, VNC or even RDP with
	the guest agent installed on the VM gets randomly a locked screen (default
	behaviour).

	This patch addresses the above mentioned issue by performing a comparison
	of the remote endpoint that disconnected and remembering only initiated
	endpoints. In case that multiple connections are established, like in case
	of spice, the last initiated channel would be remembered and when that one
	disconnects, it will cause the disconnect handling to proceed.

	Due to some bug in the handling of graphic events in libvirt, SPICE
	connections currently do not include the port. A fix for this has been
	posted upstream and should eventually become available. Therefore, the
	handling has been implemented to not ignore the disconnect event when
	the clientPort value is an empty string.

	Bug-Url: https://bugzilla.redhat.com/1203891
	Continuous-Integration: Jenkins CI

2015-08-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing prefix definition for qemu-kvm-ev
	qemu-kvm-ev (Centos) "provides" qemu-kvm-rhev, Since it's also the same
	version this patch simplies the requirements on both
	CentOS and RHEL platforms and keep plain qemu on Fedora only.

	Continuous-Integration: Jenkins CI

2015-08-06  Nir Soffer  <nsoffer@redhat.com>

	iscsi: Improve ChapCredentials.__hash__
	The hash was mixed in a poor way, use instead built-in tuple hash which
	does a better work with less code.

	Continuous-Integration: Jenkins CI

	iscsi: Add missing ChapCredentials.__ne__
	Implement __ne__ so != operator works correctly for equal objects.

	This change fixes last broken test.

	Continuous-Integration: Jenkins CI

	iscsi: Fix ChapCredentials.__eq__
	Was implemented using __hash__, so objects with different credentials
	could be considered equal, or even totally unrelated objects could be
	considered equal, for example:

	   >>> ChapCredentials("user", "pass") == FooBar("blah")
	   True

	Continuous-Integration: Jenkins CI

2015-08-06  Francesco Romani  <fromani@redhat.com>

	build: restore pep8 automated check
	'pep8' was removed from the checks.

	I can't find the reason in the patch commit message [1],
	so it doesn't look intentional.
	This patch restores the check.

	[1] https://gerrit.ovirt.org/43845

	Continuous-Integration: Jenkins CI

2015-08-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	utils: remove legacy code for uuid
	In 3.6 version we won't support old registration
	schema. This patch removes the legacy code for collecting
	UUID from host.

	Continuous-Integration: Jenkins CI

2015-08-06  Martin Polednik  <mpolednik@redhat.com>

	fakevmstats: add config entry to enable/disable the hook
	Installing fake vmstats hook cases it to be automatically enabled,
	causing fake stats to be reported. This patch adds configuration
	directive to control the behavior, and disables the plugin by default.

	Bug-Url: https://bugzilla.redhat.com/1240298
	Continuous-Integration: Jenkins CI

2015-08-06  Allon Mureinik  <amureini@redhat.com>

	gluster: Allow "Replica" 1 domains
	Patch 322ce98d17e585b156891ed711063d5e2c0ce5de introduced the ability to
	verify the replica count when connecting to gluster storage, and set the
	default allowed replica count to 3.

	Contrary to the statement in that patch, "replica" 1 seems to be common
	in the field, and we do not want to break (too many) existing
	deployments.

	This patch includes:
	 - Changing the default configuration to support replica counts of 1 or
	   3.
	 - Update the description of this configuration value accordingly.
	 - Update the test to match the default configuration and validate that
	   having a value of '1,3' will indeed support replica counts of both 1
	   and 3.

	Bug-Url: https://bugzilla.redhat.com/1238093
	Continuous-Integration: Jenkins CI

2015-08-06  Nir Soffer  <nsoffer@redhat.com>

	nettestlib: Replace brctl with ip
	According to Antoni, we should get better error messages from ip.
	Testing show that the random failures in check_tc are gone now.

	Continuous-Integration: Jenkins CI

	netestlib: Remove code for 2.x kernels
	We support now 3.x or 4.x kernels only.

	Continuous-Integration: Jenkins CI

	nettestlib: Add requires_brctl and requries_tc decorators
	Lot of tests used nettestlib.checkDependencies() in setUp() to skip all
	tests if dependencies are not met. However, this function was checking
	for two features, but most tests only need one of them, so tests could
	be skipped for no reason.

	Now we new specific requires decorators:

	- @requires_brctl   raise SkipTest if running brctl fails
	- @requires_tc      raise SkipTest if creating a bridge and adding a
	                    qdisc fails.

	nettestlib.checkDependencies() was creating a bridge and deleting it for
	testing if we can run brctl. This could leave a stale bridge if deleting
	the device failed. Now we use safer "brctl show".

	Each test class is using now the specific requires decorator needed.

	Continuous-Integration: Jenkins CI

	nettestlib: Remove unneeded hack for improving randomness
	Python seed the random number generator from os.urandom() on startup, so
	different processes do not use the same seed, and produce different
	sequences of pseudo random numbers by default.

	Continuous-Integration: Jenkins CI

2015-08-06  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: fix bridged case of testDelNetworkWithMTU by increasing MTU
	Setting disable_ipv6 failed on test-network bridge because the bridge was
	never listed under /proc/sys/net/ipv6/conf/ although it was successfully
	created.

	It turns out that MTU of at least 1280 bytes (which is a minimum value
	mandated by IPv6 standard) is required for network devices to be listed
	under said directory.

	Continuous-Integration: Jenkins CI

	network: fix parameters to ConfigNetworkError
	Continuous-Integration: Jenkins CI

	network: wait for a bridge to appear before disabling IPv6 on it
	A traceback such as

	  File "/usr/share/vdsm/network/configurators/ifcfg.py", line 101, in configureBridge
	    sysctl.disable_ipv6(bridge.name)
	  File "/usr/lib/python2.7/site-packages/vdsm/sysctl.py", line 42, in disable_ipv6
	    with open('/proc/sys/net/ipv6/conf/%s/disable_ipv6' % dev, 'w') as f:
	IOError: [Errno 2] No such file or directory: u'/proc/sys/net/ipv6/conf/test-network/disable_ipv6'

	shows that a bridge was not yet created when _ifup in ifcfg's configureBridge
	already finished.

	This patch makes configureBridge wait for the bridge for up to 1s. If it is
	not created by then, a standard exception is triggered.

	Continuous-Integration: Jenkins CI

2015-08-06  Martin Sivak  <msivak@redhat.com>

	Skip hosted engine stats processing when it is not configured
	This changes the data collecting to ignore hosted engine when
	the host id is reported as None or 0.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1248539
	Continuous-Integration: Jenkins CI

2015-08-05  Adam Litke  <alitke@redhat.com>

	Live Merge: Allow extension of non-leaf raw volumes
	volume.extendSize() is currently prohibited for any non-leaf volume.
	For a very specific live merge scenario we must permit extension of an
	internal raw base volume.  Allow this usage and add a comment explaining
	the reasoning.

	The scenario:
	 - User begins with a raw block disk.
	 - User creates a snapshot.
	 - User enlarges the disk (diskSizeExtend)
	 - User performs live merge to remove the snapshot

	In this case the base volume is too small to accommodate the data
	from the child volume and an error is raised since libvirt cannot
	enlarge a block device.  The solution is to require engine to call
	extendVolumeSize on the base volume before requesting the live merge
	operation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1232481
	Continuous-Integration: Jenkins CI

	Live merge: Update base size after live merge
	When performing a live merge, data is copied from a top volume into a
	base volume.  If the top volume is larger than the base volume (which
	can happen if the drive size was extended), libvirt will change the size
	of the base volume to match that of the top volume.  When synchronizing
	metadata after the merge, we need to update the 'capacity' field of the
	base volume to reflect the new size.  We do this inside the
	LiveMergeCleanupThread to ensure that it gets retried in the event of
	storage connection problems or vdsm restarts.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1232481
	Continuous-Integration: Jenkins CI

2015-08-05  Fred Rolland  <frolland@redhat.com>

	fc-connect-server: Support FCP on connect server
	Add FCP support in in hsm._connectionDict2ConnectionInfo.

	Bug-Url: https://bugzilla.redhat.com/1242200
	Continuous-Integration: Jenkins CI

	fc-connect-server: Add FcpConnection class
	Add FcpConnection class in storageServer.py.
	All methods except eq, neq and hash are not implemented.

	This class permit the engine to call connectStorageServer on
	FC storage domain so that sdCache.refreshStorage and prefetchDomains
	will be performed on FC SD also.

	Bug-Url: https://bugzilla.redhat.com/1242200
	Continuous-Integration: Jenkins CI

	fc-connect-server: Move call to refreshStorage
	For clearer readability, move call to sdCache.refreshStorage from
	__prefetchDomains to connectStorageServer.

	Bug-Url: https://bugzilla.redhat.com/1242200
	Continuous-Integration: Jenkins CI

2015-08-05  Nir Soffer  <nsoffer@redhat.com>

	nettestlib: Fix string formatting
	Format string was using one-based indexing, causing IndexError when
	formating an object, hiding the real error from tc binary.

	Continuous-Integration: Jenkins CI

2015-08-05  Adam Litke  <alitke@redhat.com>

	Live Merge: Prevent merge when base volume is too small
	When a disk with snapshots is resized you can end up with an image chain
	containing volumes of different sizes.  For example: a VM may start with
	volume A, a snapshot operation causes volume B to be added to the chain,
	and a resize operation enlarges volume B.  This mixed-size chain
	presents a special case for live merge.

	Libvirt's virDomainBlockCommit behaves differently depending on whether
	the base volume is on block storage or file storage and whether
	the base volume is raw or qcow2:

	File volume, cow format:
	 - Update qcow header
	File volume, raw format:
	 - Truncate volume file to the new size
	Block volume, cow format:
	 - Update qcow header
	Block volume, raw format:
	 - Fail because qemu cannot extend a raw block device

	Since we know the raw block case is not possible we can detect this and
	return a special error message to engine.  To avoid this error, engine
	should use the SPM host to extend the raw volume to the correct size
	before starting the merge.

	We don't _have_ to change vdsm since the current code fails gracefully
	(albeit with a traceback in the logs).  If engine always performs the
	resize operation before calling merge we'll never see this error.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1232481
	Continuous-Integration: Jenkins CI

2015-08-05  Nir Soffer  <nsoffer@redhat.com>

	tests: Enhance permutations tests
	- Move nested class to module to avoid clumsy self.Class syntax. We don't
	  really need to have a nested class since it is not a TestCase class.
	- Test instance methods instead of class functions
	- Separate tests for unrelated features. We don't want tests for
	  expanded method to fail because we did not remove the original method.
	- Use hasattr() for attribute testing
	- Test also mulitple arguments
	- Add test for sub-classing permuted class.

	Continuous-Integration: Jenkins CI

2015-08-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register: general improvements
	- replace --node-fqdn to --node-address for a better naming fit
	- remove unused socket library
	- improvement in docstring

	Continuous-Integration: Jenkins CI

	register: use node name and fqdn when needed
	Currently, we collect host fqdn before registering but
	it's not required. This patch make registration be
	triggered without setting host fqdn, it will use node IP
	address.

	Continuous-Integration: Jenkins CI

2015-08-04  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: fix slow tests broken by fb3a4bd4
	Continuous-Integration: Jenkins CI

2015-08-04  Nir Soffer  <nsoffer@redhat.com>

	nettestlib: Extract nettestlib module
	ipwrapperTests and iproute2Tests were using tcTests as a library. Move
	the shared code to new module and use it from the test modules.

	Continuous-Integration: Jenkins CI

	tests: Remove hack for devices with same names
	After the test isolation issues in tcTests.py and ipwrapperTests.py were
	resolved, we are not expecting setup to fail because a device with same
	name exists, so we can remove the hack that used to skip tests.

	It is possible that slaves contains stale devices from previous run of
	the broken tests, but this should be solved by cleaning the slaves, not
	by hiding the error and skipping tests.

	Continuous-Integration: Jenkins CI

	tests: Fix ipwrapper tests isolation
	Similar to tcTests, tests were sharing same devices, so failure to
	delete a device would cause unrelated test to fail.

	Even worse, the Unicode tests used *same* device name on all tests. So
	running concurrent tests is not possible, and once we fail to delete a
	device, all builds will fail on this slave when tyring to create the
	same device again. This issue was hidden previously because we used to
	skip silently such failures.

	Now we use Unicode prefix with random suffix, so stale devices are
	unlikely to cause failures in other builds.

	To simplify cleanup, the Unicode tests was moved to its own test case
	class. To make it easier to work with the Unicode bridge name, we use
	plain ASCII ("\xd7\x90\xd7\x91\xd7\x92") instead of raw utf-8 ("אבג").

	Continuous-Integration: Jenkins CI

	tests: Isolate tcTests test properly
	Tests were sharing same devices - this is huge anti-pattern, as failure
	to delete a device in one test will cause the next test setup to fail.

	Devices are created now in setUp() so each test has its own devices.
	Since tearDown() is not called if setUp() failed, setUp() is cleaning up
	on failures.

	tearDown() was aborting early on the first error, possibly leaving stale
	devices around (breaking the next tests). Now all errors are logged and
	tearDown will fail if some devices could not be removed, revealing the
	errors in captured log.

	Continuous-Integration: Jenkins CI

2015-08-04  Dan Kenigsberg  <danken@redhat.com>

	call stop_event_loop upon exit
	For cleanliness, whomever starts a thread should stop it when it is no
	longer needed.

	We add a "wait" argument to stop_event_loop, so that the calling
	serve_clients() does not wait forever for a libvirt event to be handled.

2015-08-04  Martin Polednik  <mpolednik@redhat.com>

	vdsm: drop cluster version < 3.6 for ppc64le
	Due to moving from powerKVM to ppc64le, we should not support older
	cluster levels in newest VDSM for POWER8 platform.

	Continuous-Integration: Jenkins CI

2015-07-31  Francesco Romani  <fromani@redhat.com>

	vm: event: simplify send_status_event
	Now that VDSM is fully in charge of sending
	events to Engine, there is no longer need
	to protect the send_status_event call.

	This patch removes the safety checks and
	greatly simplifies the method.

	Continuous-Integration: Jenkins CI

2015-07-31  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register: remove legacy code
	The legacy code should be dropped. The new registration
	schema should only support Engine >= 3.4.

	Continuous-Integration: Jenkins CI

2015-07-31  Dan Kenigsberg  <danken@redhat.com>

	make pep8-1.4.6 (el7) happy
	Continuous-Integration: Jenkins CI

2015-07-31  Francesco Romani  <fromani@redhat.com>

	vm: switch to response.error()
	response.error() offers a nicer and cleaner
	way to report error responses instead of the bare
	errCode['something'], even when we are fine with
	the default generic message.

	This patch makes use of response.error() all across
	vm.py.

	Continuous-Integration: Jenkins CI

2015-07-31  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-reg: remove the sub-project
	As vdsm-reg is deprecated. At moment vdsm-tool has
	register verb which executes the registration
	and there is ovirt-register project.
	oVirt Node doesn't pull vdsm-reg anymore.
	Based on that, this patch removes vdsm-reg subproject
	to avoid dead code inside vdsm tree.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1231379
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-07-31  Dan Kenigsberg  <danken@redhat.com>

	virt: let Engine start a VM on an UNKOWN OS
	This superflouse validation was introduced as a "bandage" to avoid
	https://bugzilla.redhat.com/716705, where Vdsm failed to recognize
	VMs with "UNKOWN" os injected to their bios.

	Now that we recognize our VMs based on guest channels existence, we can
	let Engine start a VM on whatever host it deems valid.

	Backward compatibility caveat: if a VM is started on an UNKOWN os, and
	then migrated to an old Vdsm (pre ovirt-3.4.2), it would be killed when
	that old Vdsm is to be restarted. This would only affect users using
	Fedora-based hosts with ovirt-3.3 and ovirt-3.6 on the same cluster.
	Users of el-based hypervisors cannot migrate a VM started on a 3.6 host
	to a 3.3 one since el7->el6 migration is blocked by Engine.

	ovirt-3.3 has reached its end of supported life, so we should not care
	about these purely-theoretical users.

	Continuous-Integration: Jenkins CI

2015-07-31  Francesco Romani  <fromani@redhat.com>

	caps: report capabilities on UNKNOWN OS
	The capabilities reporting (getCapabilities API) does
	logic on libvirt version to report, or not, the RNG source
	availability.

	The libvirt version is found using the package version,
	but VDSM knows only how to interact with RPM and APT based
	system, so it is clueless when it runs on UNKNOWN OS.

	While it is still OK (from a VDSM PoV) to pass incomplete
	information about available packages to Engine, this
	makes the aforementioned RNG check logic fail.
	Effects of this failure:
	- Engine cannot connect to the VDS
	- stacktrace in the VDSM logs (excerpt follows):

	  File "/usr/share/vdsm/API.py", line 1314, in getCapabilities
	    c = caps.get()
	  File "/usr/share/vdsm/caps.py", line 665, in get
	    '-'.join((caps['packages2']['libvirt']['version'],
	KeyError: 'libvirt'
	Thread-14::DEBUG::2015-07-31
	11:16:52,699::stompreactor::305::yajsonrpc.StompServer::(send) Sending
	response

	This patch makes the getCapabilities API work again on
	UNKNOWN OS. To be conservative, if we don't know about libvirt,
	we report no RNG sources.

	Please note that this prevents UNKONWN OS host to join cluster
	with RNG sources configured.

	Continuous-Integration: Jenkins CI

2015-07-30  Ido Barkan  <ibarkan@redhat.com>

	net: ignore pass through ifcfg parameters for selective restoration
	Ignore keys in persisted networks that might originate from vdsm-reg.
	these might be a result of calling setupNetworks with ifcfg values
	that come from the original interface that is serving the management
	network. for 3.5, VDSM still supports passing arbitrary values
	directly to the ifcfg files, e.g. 'IPV6_AUTOCONF=no'. we filter them
	out here since kernelConfig will never report them.

	Continuous-Integration: Jenkins CI

2015-07-30  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Add tests for equality and hash
	Current __eq__ and __hash__ are wrong and have no tests. Add tests
	showing what works and what not.

	To make the tests results more clear, implement __str__. This can also
	be useful when logging the objects.

	Continuous-Integration: Jenkins CI

2015-07-30  Francesco Romani  <fromani@redhat.com>

	vmstats: avoid explicit string conversion
	Now that we streamlined the reporting of disk stats,
	we can get rid of explicit conversion loop and simplify
	the code.

	Continuous-Integration: Jenkins CI

	vmstats: report disks stats only if present
	avoid to report empty values for disks stats,
	as this may confuse Engine and let it to believe
	there is no disks at all.

	Continuous-Integration: Jenkins CI

	vmstats: do not report empty ioTune
	Do not report empty value for 'ioTune'
	stats, much like we do for balloonInfo, disks and networks

	In general, we should avoid to report empty values
	if the emptiness carries no meaning (noteworthy counterexample:
	vmJobs for live merge).

	Continuous-Integration: Jenkins CI

2015-07-30  Nir Soffer  <nsoffer@redhat.com>

	iscsi: Add ChapCredentials equality and hash tests
	Add tests before cleaning up the implementation. Mark __ne__ test as
	@brokentest for now, as it is not implemented.

	Continuous-Integration: Jenkins CI

2015-07-30  Francesco Romani  <fromani@redhat.com>

	vmstats: do not report empty balloonInfo
	Do not report empty value for 'balloonInfo'
	stats, much like we do for disks and networks

	In general, we should avoid to report empty values
	if the emptiness carries no meaning (noteworthy counterexample:
	vmJobs for live merge).

	Continuous-Integration: Jenkins CI

	vm: event: send status event on pause and resume
	Make sure to send to Engine the events when
	VM is paused and resumed.

	Continuous-Integration: Jenkins CI

	vm: event: send status event on IO Error
	Explicitely send back to Engine a status
	Event after an IO Error reported by libvirt.

	Continuous-Integration: Jenkins CI

	vm: make up pauseCode if libvirt is omitting it
	When VDSM receives one IOError notification from libvirt,
	it can override the VM pauseCode. The same pauseCode will
	be reported to Engine through Events or through the
	VM.getStats() API.

	For historical reasons, libvirt reliably reports only the
	'enospc' reason. In the other cases, the reason is an
	empty string, and this resets the pauseCode to empty string.

	Engine is not (anymore) expecting that.
	To make Engine happy(er), and to improve the quality of data
	VDSM reports in general, it is safe to report EOTHER
	if the pauseCode is not given onIOError.

	This patch does that.

	Continuous-Integration: Jenkins CI

2015-07-30  Nir Soffer  <nsoffer@redhat.com>

	periodic: Use thread names that can be used as system thread names
	Using new executor naming scheme, creating executor named "periodic"
	will create workers named "periodic/0", "periodic/1", ...

	Change also periodic scheduler thread to match this style.

	This is partial fix for bug 1141422.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

	executor: Set worker system name
	Previously we used to rename the workers using long name such as
	"periodic-executor-worker-3". These names are too long for setting
	thread system name (using pthread.setname()), and little too long in
	general.

	Since we managed worker ids in the Worker class, when creating multiple
	executors, workers ids did not much the number of workers in the
	executor.

	This patch changes the naming scheme to "executor-name/<worker-id>",
	similar to the way kernel threads are named.

	For example, when creating executor named "periodic" with 4 workers, the
	workers will use these names:

	    periodic/0
	    periodic/1
	    periodic/2
	    periodic/3

	If we create another executor such as "jsonrpc", it will create these
	worker names:

	    jsonrpc/0
	    jsonrpc/1
	    jsonrpc/2
	    jsonrpc/3
	    jsonrpc/4
	    jsonrpc/5
	    jsonrpc/6
	    jsonrpc/7

	If the executor name is too long, the system thread name will be
	truncated, as system thread names are limited to 15 characters.

	Continuous-Integration: Jenkins CI

	concurrent: Add Barrier class
	Barrier synchronizes multiple threads. The barrier is created in closed
	state, blocking all threads invoking wait(). When count threads have
	entered the barrier, it is opened and all threads return from wait().

	Barrier is useful for waiting until multiple threads are ready.
	Currently we are synchronizing multiple threads in the tests using
	time.sleep(), which make the tests slower and break randomly on
	overloaded CI slaves.

	Continuous-Integration: Jenkins CI

2015-07-29  Adam Litke  <alitke@redhat.com>

	virt: Add _getVolumeInfo helper
	The next patch needs to call into to storage to get detailed volume size
	information.  Add a helper to encapsulate this operation which makes
	error checking and exception raising consistent for all call sites.

	Continuous-Integration: Jenkins CI

	tests: Fix expandPermutations use with Mixins
	When using the expandPermutations decorator on Mixin classes or in
	classes which will be inherited from it is important to remove the
	PERMUTATION_ATTR from functions that have been processed.  Otherwise we
	will attempt to expand already expanded permutations when subclassing or
	mixing this class.

	Continuous-Integration: Jenkins CI

2015-07-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Use more random interface names
	Shorten the default prefix, allowing longer random suffix, and generate
	the name using utils.random_iface_name(), using the all 15 characters.

	One test was depending on shorter interface name, appending "A" to the
	existing device name. Using now "__nosuchiface__" which communicate the
	intent of the test better.

	Continuous-Integration: Jenkins CI

2015-07-29  Francesco Romani  <fromani@redhat.com>

	hyperv: enforce hypervclock presence
	It is not enough for libvirt to have the

	 <clock ...>
	  <timer name='hypervclock'>
	 </clock>

	element in the domain XML to actually enable the timer.
	Libvirt also wants to make sure that the timer is present.
	Hence, this patch adds the 'present=yes' attribute to enforce
	the timer activation.

	http://libvirt.org/formatdomain.html#elementsTime

	Bug-Url: https://bugzilla.redhat.com/1083529
	Continuous-Integration: Jenkins CI

2015-07-29  Dan Kenigsberg  <danken@redhat.com>

	net/api: drop support for legacy mgmt networks
	Continuous-Integration: Jenkins CI

2015-07-29  Nir Soffer  <nsoffer@redhat.com>

	mount: Better and simpler __hash__
	The hash values were mixed in a poor way. There is no need to implement
	this when we can use the hash function of the tuple object, which does a
	better job.

	For consistency, use self.__class__ for both equality test and computing
	the hash. This is also more portable pattern, since type(self) returns
	the same object for old style classes.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	tests: Silence momPolicyTests
	Each momPolicyTests test case was logging the same message 6 times when
	loading a policy file:

	2015-07-25 00:52:00,598 - mom.Policy - INFO - Loaded policy '00-defines'
	2015-07-25 00:52:00,598 - mom.Policy - INFO - Loaded policy '00-defines'
	2015-07-25 00:52:00,598 - mom.Policy - INFO - Loaded policy '00-defines'
	2015-07-25 00:52:00,598 - mom.Policy - INFO - Loaded policy '00-defines'
	2015-07-25 00:52:00,598 - mom.Policy - INFO - Loaded policy '00-defines'
	2015-07-25 00:52:00,598 - mom.Policy - INFO - Loaded policy '00-defines'
	2015-07-25 00:52:00,609 - mom.Policy - INFO - Loaded policy '04-cputune'
	2015-07-25 00:52:00,609 - mom.Policy - INFO - Loaded policy '04-cputune'
	2015-07-25 00:52:00,609 - mom.Policy - INFO - Loaded policy '04-cputune'
	2015-07-25 00:52:00,609 - mom.Policy - INFO - Loaded policy '04-cputune'
	2015-07-25 00:52:00,609 - mom.Policy - INFO - Loaded policy '04-cputune'
	2015-07-25 00:52:00,609 - mom.Policy - INFO - Loaded policy '04-cputune'

	To make debugging more interesting, these messages were not displayed
	when running only momPolicyTests.py. They are displayed only when
	running both momTests.py and momPolicyTests.py.

	Turns out that momTests.py has 6 test cases creating a mom server or
	client. Each time a server or client are created, a new
	logging.StreamHandler() was added to the "mom" logger. Since no cleanup
	was performed, when momTests.py finished, "mom" logger with 6 unwanted
	handlers writing to sys.stderr was left in the logging module.

	When loading mom policy, Policy logs a messages to "mom.Policy" logger,
	which propagates to mom logger and get written by all 6 handlers.

	This patch monkey-patches the root logger manager.loggerDict in
	momTests.py, so loggers added during the tests are dropped when the test
	ends.  Without the "mom" logger, "mom.Policy" logs go the root logger,
	which is captured by nose, so these logs are available when a test
	fails.

	Continuous-Integration: Jenkins CI

2015-07-29  Yeela Kaplan  <ykaplan@redhat.com>

	migration: fix parameters
	Continuous-Integration: Jenkins CI

2015-07-29  Ido Barkan  <ibarkan@redhat.com>

	net: always persist owned ifcfg files on ovirt node
	Continuous-Integration: Jenkins CI

	net: fix testSetupNetworksDeletesTheBridgeOnlyWhenItIsReconfigured
	since the tap object itself went out of scope, the kernel removed
	the device during the test since the file descriptor held by the
	Tap object was closed. The test was also fixed to remove the device
	before calling setupNetworks that would attempt to delete the bridge.

	Continuous-Integration: Jenkins CI

2015-07-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix error handling when checking dependencies
	We used to hide *all* exceptions and skip the tests with possible bogus
	message.

	When trying brctl, we skip the test only if we cannot run it, since this
	is the only error that can cause by missing bridge-utils. Any other
	error should fail the tests.

	When trying tc, we show the failure in the error message.

	Also removed pointless code opening and closing /dev/null, which should
	have been dropped in commit 61fff86c.

	Continuous-Integration: Jenkins CI

2015-07-28  Nir Soffer  <nsoffer@redhat.com>

	mount: Implement __ne__
	"""
	There are no implied relationships among the comparison operators. The
	truth of x==y does not imply that x!=y is false. Accordingly, when
	defining __eq__(), one should also define __ne__() so that the operators
	will behave as expected.
	"""
	See https://docs.python.org/2/reference/datamodel.html#object.__eq__

	This fixes the test_ne broken test.

	Continuous-Integration: Jenkins CI

	mount: More correct and simpler __eq__
	Instance of different classes should not be considered equal, as
	subclass may add new state not in the superclass.

	If an instance is missing an attribute it should have, we don't want to
	hide this error, and we certainly do not want to swallow *any* Exception
	during the check.

	This fixes the broken test_eq_subclass test.

	Continuous-Integration: Jenkins CI

	tests: Add Mount equality and hash tests
	The relevant code had no tests and I want to clean it up, so lets have
	some tests to make sure the cleanup does not break anything.

	Some of the tests fail since the implementation is wrong, mark them as
	@brokentest for now.

	Fix __repr__, which was giving bogus output when subclassing Mount.
	This makes the failing subclass test more clear.

	Continuous-Integration: Jenkins CI

2015-07-28  Francesco Romani  <fromani@redhat.com>

	vm: event: document event on reboot
	The guest agent onStatusChange callback
	automatically delivers RebootInProgess event
	when VM reboots: we don't need anything extra here,
	but it is worth to explicitely document this
	behaviour.

	Continuous-Integration: Jenkins CI

2015-07-28  Adam Litke  <alitke@redhat.com>

	tests: Create storagetestlib module
	The tests for VolumeMetadata want to reuse many of the functions that
	were implemented in manifest_tests.py.  Move these into a helper module
	that can be shared by all storage tests.

	Continuous-Integration: Jenkins CI

2015-07-28  Francesco Romani  <fromani@redhat.com>

	vmstats: make sure values are all strings
	Until we drop support of XML-RPC, we need
	to make sure that possibly large integers are
	reported as strings.

	This patch converts directly the values to strings,
	avoiding the need for a later conversion step.

	Continuous-Integration: Jenkins CI

2015-07-28  Martin Polednik  <mpolednik@redhat.com>

	vdsm: fix missing \ in specfile
	The next option shouldn't be treated as a command itself.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-07-27  Petr Horáček  <phoracek@redhat.com>

	net: configurators: persist custom bond option
	Until now, custom bond property was exposed only to
	before_network_setup hook and then dropped (so it was not
	passed to configurators and persisted). But this is not how
	custom *network* property behaves. We want these two custom
	properties to be symmetric - they have to be persisted
	(if unified persistence is used). Unlike custom network
	properties (which are known as 'special' by Engine), custom bond
	properties have to be reported in netinfo. Last but not least,
	we need this custom property to be able to tag bonding as
	'OVS Bond' so it will be handled by OVS hook, not by default
	configurator.

	This patch moves removal of custom property down to
	configurators. Thanks to it, custom property is persisted,
	but not set as a bond option.

	Custom property is not dropped only in configurators, but in
	models.py:Bond:areOptionsApplied as well - we don't want
	configurator to reconfigure bond when there is a custom
	property defined while its value is not used by configurator.

	Continuous-Integration: Jenkins CI

2015-07-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove redundant rhev_build_config_opt global
	By mistake this part of code was left after
	https://gerrit.ovirt.org/#/c/43845/

	Continuous-Integration: Jenkins CI

2015-07-27  Dan Kenigsberg  <danken@redhat.com>

	remove double whitespace after commas
	Continuous-Integration: Jenkins CI

2015-07-27  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Change state of the agent only after heartbeat processing
	Until now we have been setting the guest agent state to up,
	for every message we are receiving from the guest agent.

	With the new events implementation this has the side effect,
	that the data from the event has not been consumed yet but the
	change will trigger the event being fired that the VM is UP.

	This patch changes this old behaviour to only change the internal
	state on heartbeat messages, and only after the data has been
	consumed.

	Continuous-Integration: Jenkins CI

2015-07-25  Nir Soffer  <nsoffer@redhat.com>

	v2v: Use signal name instead of number
	Signal numbers are architecture specific. We should use only signal
	names available in the signal module.

	Continuous-Integration: Jenkins CI

2015-07-24  Yeela Kaplan  <ykaplan@redhat.com>

	vdscli: jsonrpc: add a creation method for client
	Allow connecting to vdscli either with an existing
	stomp client or create a new stomp client by using a
	given host and port.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138381
	Continuous-Integration: Jenkins CI

2015-07-24  Shmuel Melamud  <smelamud@redhat.com>

	api: 'device' property for RNG device
	Added 'device' property for RNG devices as VDSM relies on presence of
	this property.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1233825
	Continuous-Integration: Jenkins CI

2015-07-24  Nir Soffer  <nsoffer@redhat.com>

	multipath: Replace timing code with utils.stopwatch
	The old timing code was longer then the code it measured, and it was
	issuing 2 syscalls even if debug log was not enabled. Using the
	stopwatch contextmanager, we need only one line of code, and we measure
	the time only if we need to log it.

	Continuous-Integration: Jenkins CI

2015-07-24  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: standalone client
	Convenience method to create stomp client by providing information
	needed to connect like hostname, port, queue names that we want to use
	and optional ssl context.

	The client can send and receive messages and notifications.
	JsonRpcClient can work in both synchronous and asynchronous way and it
	uses an instance of Reactor to process I/O. Reactor is run in a thread
	so it is important to close the client once it is not needed.

	Standalone client is designed to exchange data with vdsm for external
	services and jsonrpc based vdscli.

	Usage example:
	# auto starts and requires calling close
	client = StandAloneRpcClient(host, port, 'jms.topic.vdsm_requests',
	                             str(uuid4()), sslctx, False)

	# or which manages client life cycle by using context manager 'running'

	from vdsm.utils import running

	with running(StandAloneRpcClient(acceptor._host, acceptor._port,
	                                 'jms.topic.vdsm_requests',
	                                 str(uuid4()), sslctx)) as client:

	# To invoke vdsm methods we can use one of many call methods
	client.callMethod('my_method_name', data, uuid)

	# To receive events we need to register a callback
	def callback(client, event, params):
	    pass

	client.registerEventCallback(callback)

	# It is important to close the client which stops the I/0 thread if not
	# managed by context manager
	client.close()

	Continuous-Integration: Jenkins CI

2015-07-24  Nir Soffer  <nsoffer@redhat.com>

	supervdsmServer: Fix typo (selfself)
	Continuous-Integration: Jenkins CI

	sudoers: Restrict usage of systemd-run
	In commit 608e92e1bdd70 (utils: Add systemd_run command modifier) we
	added systemd-run to the allowed commands in the sudoers configuration.
	This change introduced a security breach, allowing vdsm to run any binary
	using systemd-run.

	This patch restricts usage of systemd-run to the mount command when
	using glusterfs storage domain. Due to sudoers syntax, it is not
	possible to allow any option in the systedmd-run command, and we must
	specify the exact commend.

	We also use systemd-run also for ifup and dhclinet, but these run from
	supervdsm, so sudoers configuration is not needed.

	This is an ugly fix for this security issue. A nicer fix requires more
	work, calling the mount command in suprvdsm.

	Continuous-Integration: Jenkins CI

2015-07-23  Petr Horáček  <phoracek@redhat.com>

	net: dhcp defroute support for iproute2 and pyroute2
	Ifcfg configurator accepts default_route option in both static
	and dynamic addressing.  Until now, that was not case of pyroute2
	and iproute2 configurators.

	This patch passes default_route parameter down to iproute2
	and pyroute and allows us to overwrite default gateway.

	Continuous-Integration: Jenkins CI

2015-07-23  Nir Soffer  <nsoffer@redhat.com>

	xmlrpc: Fix the inheritance mess
	Now that the xmlrpc server is not listening for connections, there is no
	need to inherit from SimpleXMLRPCServer and its many super classes. The
	xmlprc server is a very simple object that takes connected sockets from
	a queue and starts a request handler for each socket in a new thread.
	Most of the logic in the server is in the request handler class.

	This patch implements this simple object, based on code from
	SocketServer, BaseHTTPServer, and SimpleXMLRPCServer. This makes it easy
	to understand and maintain, and remove dependencies on the fragile
	Python server class hierarchy.

	Continuous-Integration: Jenkins CI

2015-07-23  pkliczewski  <piotr.kliczewski@gmail.com>

	test: customize destination for an event
	During test run we need to customize destinations where events are sent.

	Continuous-Integration: Jenkins CI

	jsonrpc: handle timeout in callMethod
	When we do not receive any response from the server JsonRpcClient fails
	when calling callMethod.

	Continuous-Integration: Jenkins CI

2015-07-23  Dan Kenigsberg  <danken@redhat.com>

	net: rollback: fix log message
	commit f3cd10cfc introduced a helpful traceback to the log, but kept a
	redundant %s behind.

	Continuous-Integration: Jenkins CI

2015-07-23  Petr Horáček  <phoracek@redhat.com>

	network: add 'default_route' parameter to DhcpClient
	Non-ifcfg configurators handle 'default_route' option only with
	static IPs, but this should be allowed with dynamic as well (as it
	is done in ifcfg). Ifcfg configurator uses default_route=False
	by default and adds line 'DEFROUTE=no' to ifcfg script, to prevent
	default gateway overwriting.

	This patch enhances DhcpClient so it is able (and it does it by
	default) to disable standard default gateway overwriting.

	This new feature fixed AddDelDhcp test with Iproute2 configurator
	which used to destroy internet connectivity. It will be also used
	in following OVS hook and Iproute2 default_route option patches.

	Continuous-Integration: Jenkins CI

2015-07-23  Ido Barkan  <ibarkan@redhat.com>

	net_func_tests: Make use of TEST-NET range instead of future reserved range
	IPv4 has, according to RFC 5737, three network ranges that are
	specifically designed to be used for tests and code samples. Up
	until now we were using 240.0.0.0/24 that is part of 240.0.0.0/4
	which according to RFC 6890 is reserved for future use. Thus, it
	is more appropriate to use one of the test networks and this patch
	does just that.

	Continuous-Integration: Jenkins CI

2015-07-22  Francesco Romani  <fromani@redhat.com>

	vm: stats: do not send empty disks/networks
	VDSM used to inconditionally add keys for disks and networks
	in the stats value to be returned on Vm.getStats() API.

	If stats from libvirt are available, those keys will be
	overwritten with real data; otherwise, empty values are reported.

	If we use the same code path to piggyback data on vm_status
	events, this will confuse Engine and will make it believe
	there are no disks nor networks.

	Moreovero, in general, we should avoid to report empty values
	if the emptiness carries no meaning (noteworthy counterexample:
	vmJobs for live merge).

	So this patch makes sure that we report either full data
	for disks and networks, or nothing at all, avoiding empty values.

	Continuous-Integration: Jenkins CI

2015-07-22  Nir Soffer  <nsoffer@redhat.com>

	testlib: Fix permutations of decorated tests
	Our expandPermutations infrastructure assume that generated tests use the
	original test method, and break when using test decorators such as
	@slowtestest or @stresstest.

	The generated tests are registered incorrectly, overriding tests with the
	same first permutation argument. Assuming we have the following test:

	    @slowtest
	    @permutations([[1, 2], [1, 4]])
	    def test_permutations(self, a, b):
	        ...

	Instead of generating these tests:

	    test_permutations(a=1, b=2)
	    test_permutations(a=1, b=4)

	We generate only one test, dropping the first permutation:

	    test_permutations(kwargs=1)

	This happens because decorated method signature is converted from:

	    test_permutations(self, a, b)

	To the generic form:

	    test_permutations(*args, **kwargs)

	When expanding permutations, we drop the first argument (args), assuming
	it is self, and zipping the argument list with the rest of the argument
	names (kwargs), dropping the second argument, and generating the wrong
	argument string "kwargs=1".

	The issue seems unfixable, since we need the original wrapped function
	to get the original variables names, and we can have any number of
	wrappers around it.

	This patch fixes the issue in the same way nose and pytest handle this
	issue, by generating positional argument string: "1, 2". This is not
	nice as "a=1, b=2", but it works with decorated tests correctly.

	So in the example above, we are generated these tests correctly:

	    test_permutations(1, 2)
	    test_permutations(1, 4)

	Continuous-Integration: Jenkins CI

2015-07-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Cleaning libvirt requirements which are not required anymore
	Those requirements were needed by ci. commit 87cf34 introduced
	this complexity since libvirt-daemon >= 1.2.8-16.el7_1.2 was
	not yet available in Centos repositories.

	Continuous-Integration: Jenkins CI

	Remove supportedProtocols parameter which is not in use
	Requires to update MarshallingTestCase.java in engine side which
	validates getVdsCaps output.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234790
	Continuous-Integration: Jenkins CI

2015-07-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Revert "api: compat: fix api breakage of 'config' and 'netinfo' used by bootstrap"
	This reverts commit 410464a6561ddd99362e51e8280b590f0610ed42.

	Support rhevm-3.0 is not required anymore since ovirt-3.6 release.

	Continuous-Integration: Jenkins CI

2015-07-21  Nir Soffer  <nsoffer@redhat.com>

	hsm: Explain why we call validateNotSPM() twice
	The old comment was not clear, and this is important pattern.

	Continuous-Integration: Jenkins CI

	sp: Move spm validation methods to StoragePool
	These helpers were defined in hsm, but they check the pool internal
	state and constants, which hsm should not be involved with. This will
	allow using a new StoragePool that does not have an spmRole, needed for
	the new SDM mode.

	Continuous-Integration: Jenkins CI

	spbackends: Move backend functions to spbackends
	Move domainListEncoder() and domainListDecoder() to spbackends, since
	they are used only by the backends. This avoids circular dependency
	between the pool and the backends.

	Since the new functions are used only by the spbackends module, they are
	now private.

	Continuous-Integration: Jenkins CI

2015-07-21  Ido Barkan  <ibarkan@redhat.com>

	net: also support replacing VLAN device under a bridge
	Although editing networks without replacing the bridge was already
	supported, somehow supporting the adding/removal of a vlan device
	was forgotten. This was added in this patch, along with improving
	the test to simulate an added vlan and a connected vm to the bridge.

	Continuous-Integration: Jenkins CI

2015-07-21  Shahar Havivi  <shaharh@redhat.com>

	v2v: enable to use external virtio drivers for virtio
	virt-v2v new feature enable user to set drivers iso path for enabling
	virtio drivers.
	Previously virt-v2v support only virtio drivers from virtio-win package
	for RHEL users only.

	Continuous-Integration: Jenkins CI

2015-07-21  Martin Polednik  <mpolednik@redhat.com>

	hostdev tests: refactor common PCI addresses
	Due to repetative nature of addresses in tests, this patch factors them
	to a class attributes.

	Continuous-Integration: Jenkins CI

	hostdev: add test for SR-IOV guest addressing
	Like generic host devices, SR-IOV VFs can be configured for specific
	guest address. Same issue as with generic devices is keeping the
	addresses separated. This test is for verification that the guest
	address and host address are correctly created.

	Continuous-Integration: Jenkins CI

2015-07-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	validate listen_tls config value in libvirtd.conf
	Currently we don't validate this value which leads to broken
	behaviour in migration over ssl.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1148024
	Continuous-Integration: Jenkins CI

2015-07-21  Francesco Romani  <fromani@redhat.com>

	vmstats: fix bulk stats misinterpretation (disk)
	The current vmstats code is assuming that the bulk stats samples
	are in a different format than they really are.
	This mistake dates back to the lastest iterations of bulk stats
	development, when various approaches to fecth and store bulk stats
	samples were experimented, while looking for good performances.

	In the end, we settled for the simplest approach, for the sake of
	performance. Somehow, the translation patch was lost, most likely in
	one bad rebase.

	The effect of this mistake is that some disk stats
	were lost, while others are still correctly reported.

	This could explaain why it took so long to notice this failure: some
	data was still present and correctly reported.
	This patch recovers and reimplements the translation strategy,
	and makes sure that we access the bulk stats samples using
	the right keys.

	Continuous-Integration: Jenkins CI

	vmstats: fix bulk stats misinterpretation (net)
	The current vmstats code is assuming that the bulk stats samples
	are in a different format than they really are.
	This mistake dates back to the lastest iterations of bulk stats
	development, when various approaches to fetch and store bulk stats
	samples were experimented, while looking for good performances.

	In the end, we settled for the simplest approach, for the sake of
	performance. Somehow, the translation patch was lost, most likely in
	one bad rebase.

	The stats which are lost are the one which deals with multiple devices.
	The bug is that we try to access the samples using wrong keys,
	mistakenly assuming a nested namespace, while the samples are flat.

	Bug-Url: https://bugzilla.redhat.com/1227793
	Continuous-Integration: Jenkins CI

2015-07-20  Ido Barkan  <ibarkan@redhat.com>

	net: tests: skip testRestoreToBlockingDHCP if ifcfg persistence
	This test tests a part of vdsm-restore-net-config which runs only
	if there is unified persistence.

	Continuous-Integration: Jenkins CI

2015-07-20  Martin Polednik  <mpolednik@redhat.com>

	caps: add hw info reporting for ppc64le arch
	Currently, getVdsHardwareInfo only works for x86_64, i686 and ppc64.
	This patch adds support for ppc64le, where same logic as ppc64 (device
	tree parsing) applies.

	Bug-Url: https://bugzilla.redhat.com/1149262
	Continuous-Integration: Jenkins CI

	hostdev tests: fake totalvfs
	Deep down in call stack, _sriov_totalvfs is called. We should avoid
	touching the host at all due to possible side effects, and therefore
	_fake_totalvfs can be used.

	Continuous-Integration: Jenkins CI

	hostdev: add test for SR-IOV VF
	Hostdev uses interface element for SR-IOV VFs, and therefore needs to
	be also covered with additional test.

	Continuous-Integration: Jenkins CI

2015-07-20  Antoni S. Puimedon  <asegurap@redhat.com>

	net_tc: add support for mirroring all (not just IPv4) traffic
	Up until now the filter was only acting on packets with IPv4 headers
	because of the 'protocol ip' part of the tc filter. This makes the
	mirroring protocol agnostic.
	Caveat: this patch takes place only on networks defined after its
	application. It does not attempt to upgrade existing filters.

	Continuous-Integration: Jenkins CI

	arbitrary_vlan_name: Fix network deletion
	Up until now, when the network deletion operations were not being
	forced, the assertion that the bridge was clean, i.e., that it did
	not have other ports (vnics most likely) would fail because it
	expected

	    bondname.vlanid
	or
	    nic.vlanid

	when the name could be any string. This patch addresses the issue
	by making netinfo give us the exact vlan name.

	Bug-Url: http://bugzilla.redhat.com/1119182
	Continuous-Integration: Jenkins CI

2015-07-20  Ido Barkan  <ibarkan@redhat.com>

	netinfo: Drop ifcfg reading from _getNetInfo
	For backwards compatibility we need to report the bridge 'cfg' field
	in the network attributes dictionary. Up until now, this was done by
	re-reading the 'ifcfg' files of the bridge. After this change, we
	will just be adding the 'cfg' field that we already generated for the
	bridge device.

	Note that 'BOOTPROTO' reporting is already part of _devinfo, so we
	don't need that part.

	Continuous-Integration: Jenkins CI

2015-07-20  mmirecki  <mmirecki@redhat.com>

	vdsm hooks: report hook stderr to Engine if it fails an action
	When the hook script fails with an exit code 2, and the hook
	is defined to raise an exception, the execution of the command
	should stop and an appropriate error message should be propageted
	to the user. This change takes the std error of the failed hook
	script and passes it to the engine so that it can be presented
	to the user.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1219630
	Continuous-Integration: Jenkins CI

2015-07-19  Nir Soffer  <nsoffer@redhat.com>

	executor: Fix thread-unsafe call
	Deques support thread-safe, appends and pops from either side of the
	deque, but deque.clear() is not documented as thread-safe, so we should
	not assume it is.

	Now we take the condition before invoking clear, and the comment about
	thread-safety was fixed to match Python documentation.

	Continuous-Integration: Jenkins CI

	executor: Fix race when putting tasks
	When putting tasks into a TaskQueue, we used check the current number of
	tasks in a thread-unsafe way.  We assume that the thread-unsafe check
	can result in the worst case in few extra tasks in the task queue, which
	is not very interesting.

	However, if all workers are busy, and the task queue is almost full, it
	is possible that two threads will pass the size check, and the queue
	will contain more tasks then the maximum value. Once the queue size
	exceeded the limit, we allow any number of additional tasks.

	While this condition is unlikely, there is not reason to allow this
	behavior. Now we check the queue size in a thread safe way and we don't
	have to maintain the comment about the possible race.

	Since we take the condition anyway on every put, I don't expect a
	noticeable performance differences by taking the condition before the
	size check.

	Continuous-Integration: Jenkins CI

2015-07-19  Allon Mureinik  <amureini@redhat.com>

	hooks: Removed comment about EL6 kernel
	EL6 is no longer supported for VDSM, so the comment about not installing
	the nestedvt hook on EL6 is superfluous.

	Continuous-Integration: Jenkins CI

2015-07-18  Nir Soffer  <nsoffer@redhat.com>

	xmlrpc: Remove Python 2.6 only code
	We backported xmlrpc request handler from Python 2.7 to support
	HTTP/1.1. Since we do not support Python 2.6 now, this code is not
	needed.

	Continuous-Integration: Jenkins CI

2015-07-17  Francesco Romani  <fromani@redhat.com>

	vm: events: do not override Down status
	We want to reuse Vm._getVmStatus() in the events notification
	flows.
	However, in that method there is a race with the migration.SourceThread.
	If the thread is still alive() (Vm.isMigrating() == True) while the
	Vm._getVmStatus() runs, the Down status will not be reported;
	MigrationSource will be reported instead.

	Please note that this affects just and only the return value of
	Vm._getVmStatus(). Vm.lastStatus is not affected at all.

	To fix this misreport, we simply add "Down" status to the list
	of statuses which should be reported directly without further checks.

	The "Down" status is final, so there are no shortcomings
	in sight and this change seems easy and safe.

	Continuous-Integration: Jenkins CI

	virt: clientif: remove generic vm status event
	We added explicit event notifications in the
	relevant VM callbacks, so there is no longer need to have
	a generic handling in the libvirt eventloop.

	Continuous-Integration: Jenkins CI

	vm: events: do not send hashes in status messages
	Engine doesn't really benefit of hashes in each VM_status
	message. We should send it only whenever matters,
	like when VM goes PoweringUp/Up.

	Future patches may want to reintroduce it in other flows.

	Continuous-Integration: Jenkins CI

	virt: event: send status event on migrations
	Make sure to send to Engine the events when
	migration starts, ends or aborts.

	Continuous-Integration: Jenkins CI

	vm: event: emit event on guest status change
	Send back to Engine an Event each time the Guest Agent
	reports a status change.
	We report the VM status and the minimal amount about
	the VM running stats that is fast and cheap to gather.

	Continuous-Integration: Jenkins CI

	vm: event: emit event on setDownStatus
	Send explicitely an Event to Engine when
	we call setDownStatus, instead of when we
	receive notification from libvirt.

	This way, it is easier and cheaper to piggyback
	more useful data back to Engine.

	Continuous-Integration: Jenkins CI

	vm: event: emit event on domDependentInit
	When Vm.domDependentInit() terminates, the VM
	is lamost ready to go. If Engine queries the VM
	on this state, on the happy path, we report either
	POWERING_UP or UP depending also on the Guest Agent
	state.

	We should send an event to Engine ASAP, and toward
	the end is indeed a good place. But we cannot lie,
	ad assert the Vm is UP.

	So, to be on the safe side, we send POWERING_UP
	to Engine. The VM will be accessible through Console
	and migrateable, so nothing is lost after this decision.

	Continuous-Integration: Jenkins CI

	vmstats: factor disk iops stats into an helper
	Move the code with fetches the per-disk ops
	and data transferred in a little, separate helper.

	Only code move.

	Continuous-Integration: Jenkins CI

	vmstats: rename 'nic' function
	The vmstats module exports a 'nic' function, which
	produces the stats per-nic, in the format Engine expects.

	The problem here is that 'nic' is a too nice name, so there
	are other legitimate uses for it in other flows.

	To reduce the possibility of name clash, we just rename
	the function to the little less nice but little more revealing
	'nic_traffic'.

	This is also a little lie because 'nic_traffic' adds fields
	which aren't strictly related to traffic proper. Future patch
	will clean this further and remove the little lie.

	Rename only.

	Continuous-Integration: Jenkins CI

2015-07-16  Francesco Romani  <fromani@redhat.com>

	vm: event: add arguments to send_status_event
	Future patches want to control the vmstatus we
	send to Engine, putting VDSM in control -
	instead of blindly relaying data from libvirt event loop.

	This patch enhances Vm.send_status_event() to support
	future usages, without breaking compatibility.

	Continuous-Integration: Jenkins CI

	vm: stats: move vmstats translation code away
	In vm class we have code to reformat and translate
	the output of vmstats.produce() into the format that
	Engine expects.

	This is pure algorhytmic code which doesn't depend
	at all on Vm class state, so it is wasy and safe to
	extract it as pure function.

	Additionally, this code is moved into vmstats module,
	because of the (admittedly vague, but still stronger
	than on Vm class) bonds it has with vmstats.produce()
	function.

	Continuous-Integration: Jenkins CI

	vm: event: status is an enumeration, not as tuple
	The current send status event code sends the vm status
	as tuple (translated to array) not as single value enumeration.

	I can't see why this is needed, so this patch simplifies the code.

	Continuous-Integration: Jenkins CI

2015-07-16  Nir Soffer  <nsoffer@redhat.com>

	freeze: Avoid unneeded freeze during snapshot
	When taking a snapshot of a vm with Ceph disk, Vm.snapshot() is called
	after engine froze the vm. In this case we don't need freeze the guest
	during the snapshot.

	New engine versions will indicate the guest state using the new frozen
	flag. When working with older engines or when not using Ceph disks,
	behavior is unchanged.

	Continuous-Integration: Jenkins CI

	freeze: Cleanup snapshot using freeze() and thaw()
	Snapshot code was written before libvirt.virDomain.fsFreeze() and
	libvirt.virDomain.fsThaw() were available. We used the quiesce flag
	(VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE) to request freezing of guest
	filesystems during the snapshot.

	Because libvirt error reporting was not good enough, the code assumed
	that *any* exception raised from snapshotCreateXML() means failure to
	freeze the guest filesystems, and tried to take a snapshot again without
	the quiesce flag. This error handling is evil and wrong, and requesting
	snapshot twice after a failure sounds like a bad idea.

	This patches cleans up the code using the new freeze() and thaw()
	methods. We freeze() the guest before the snapshot, and thaw()
	afterwards, invoking snapshot exactly once.

	We handle only libvirtError around snapshotCreateXML(). Any other error
	is not expected and will fail loudly.

	When taking a memory snapshot, we are not freezing the guest, because
	qemu is pausing the vm in this case. We keep this behavior for now.

	Continuous-Integration: Jenkins CI

2015-07-16  Ido Barkan  <ibarkan@redhat.com>

	net: only backup ifcfg files if they are not already persisted.
	d6454e introduced backing up of ifcfg files that were not owned by
	vdsm before the current call. Now, after selective restoration was
	introduced, when a network is restored because it is different
	from it's persistence, it is edited. This is done by removing it
	(and it's ifcfg files) an re-add it. The result is that ifcfgs get
	backed up also because they were just deleted by the current call,
	and are now re-added. We end up with file placeholders that make vdsm
	ifdown them during restoration. This defeats the whole selective
	restoration feature.
	In order to preserve the original meaning of _backup, we now
	compute all the possible ifcfg files that are part of unified
	persistence and backup only the ones that are not.

	Bug-Url: https://bugzilla.redhat.com/1203422
	Continuous-Integration: Jenkins CI

2015-07-16  Darshan N  <dnarayan@redhat.com>

	gluster: handle an unhandled exception in gfapi.py
	This patch handles an un handled exception in gfapi.py
	which is related to gluster libgfapi. This exception was
	seen when glusterVolumsStatsInfo and glusterVolumeStatus
	verbs were invoked. Now this has been handled properly.

	Continuous-Integration: Jenkins CI

2015-07-15  Yeela Kaplan  <ykaplan@redhat.com>

	API: make irs usage compatible with all others
	Continuous-Integration: Jenkins CI

2015-07-15  Adam Litke  <alitke@redhat.com>

	tests: Add new manifest_tests and storagefakelib to Makefile
	As an oversight in earlier patches, manifest_tests.py and
	storagefakelib.py were not properly added to Makefile.am.  This meant
	that these files were not included in the vdsm-tests package.  Fix this.

	Continuous-Integration: Jenkins CI

2015-07-15  Francesco Romani  <fromani@redhat.com>

	virt: make vm events callback public
	The Vm class has a few methods which are meant to
	be called when libvirt reports events.
	Examples:

	Vm._onLibvirtLifecycleEvent
	Vm._onWatchdogEvent
	Vm._rtcUpdate

	So they should be public, and they should be named such that
	it is obvious they are meant to be callbacks.

	This patch only renames without code changes.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-07-15  Fred Rolland  <frolland@redhat.com>

	resize-lun: Rescan fiber channel devices
	The fc-scan utility currently scans in order to find new LUNs.
	In order to detect a resize of fiber channel LUNs, rescan of existing
	devices is needed.

	Bug-Url: https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

2015-07-15  Fabian Deutsch  <fabiand@fedoraproject.org>

	network: Recognize macvlans as fake devices
	macvlans are yet another type of virtual NICs.
	This patch allows vdsm to accept macvlan devices as fake NICs.
	It can be useful if vdsm is run inside a container, and the
	host's NICs are exposed to the container via macvlans.

	Continuous-Integration: Jenkins CI

2015-07-14  Francesco Romani  <fromani@redhat.com>

	virt: graphdev: support headless VM
	This patch adds support for headless VMs, aka VMs without
	a graphic device.

	Noteworthy side effects of this patch:
	* It is now possible to create a VM without any display
	  (aka headless VM), and they are supported.
	* The input 'display' parameter of the Vm.create API is
	  no longer mandatory
	* In the API schema, the display* parameters are now
	  marked as optional, even though Engine is expected to still
	  send them in the near/medium term.
	* setTicket can now fail if they are invoked against a VM
	  without graphic devices.

	Continuous-Integration: Jenkins CI

2015-07-14  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add tests for guest addressing
	PCI host devices have two addresses: first one of them being the address
	as seen on the host, the second one is how the device is seen in the
	guest. We have to make sure that these aren't mixed - these tests are
	here to catch possible address inconsistence.

	Continuous-Integration: Jenkins CI

	hostdev: add basic unit tests for XML
	Now VDSM has the needed tools to unit test the creation of host
	devices. This patch adds first batch of tests, that verify PCI and USB
	devices without supplied address. Future patches will expand the
	possibilities of test cases.

	Continuous-Integration: Jenkins CI

	hostdev: inline source address function
	Due to addressing changes, there is no additional value in
	_add_source_address function. Therefore, inlining it saves us some
	loc without obfuscating functionality.

	Continuous-Integration: Jenkins CI

	hostdev: fix hostdev addressing
	Host devices are special in a sense that in case of PCI, there are two
	addresses present - one for the host address (in source element), and
	one in the device body itself (how is the device seen on the host).

	We have to make sure to separate and make sure which address do we put
	where - the patch fixes an issue where the "guest" address was reported
	as a "host" address.

	Continuous-Integration: Jenkins CI

2015-07-13  Nir Soffer  <nsoffer@redhat.com>

	testlib: Document --enable-xxx-tests options
	We documented how to enable slow and stress test using environment
	variables. Now the nicer --enable-slow-tests and --enable-stress-tests
	options are also documented.

	Continuous-Integration: Jenkins CI

	testlib: Show fully qualified class name
	We typically have multiple test case classes in the same module, and
	looking in the tests results it is not clear where the tests are
	located.

	    RoundTests
	        test_round(n=0, size=1024, result=0)                        OK
	        test_round(n=1, size=1024, result=1024)                     OK
	        test_round(n=1024, size=1024, result=1024)                  OK
	        test_round(n=1025, size=1024, result=2048)                  OK
	        test_round(n=3.14, size=1024, result=1024)                  OK
	    StopwatchTests
	        test_debug                                                  OK
	        test_info                                                   OK
	        test_notset                                                 OK

	Now we show also the module name:

	    utilsTests.RoundTests
	        test_round(n=0, size=1024, result=0)                        OK
	        test_round(n=1, size=1024, result=1024)                     OK
	        test_round(n=1024, size=1024, result=1024)                  OK
	        test_round(n=1025, size=1024, result=2048)                  OK
	        test_round(n=3.14, size=1024, result=1024)                  OK
	    utilsTests.StopwatchTests
	        test_debug                                                  OK
	        test_info                                                   OK
	        test_notset                                                 OK

	Continuous-Integration: Jenkins CI

	testlib: Use nose.case.Test.getDescription()
	The version we have may be ok for Python 2.6, but nose version has
	additional code to support Python 2.7 changes, so we should use it.

	Continuous-Integration: Jenkins CI

	testlib: Remove unneeded methods
	VdsmTestRunner was implementing __init__() and run() for no reason.
	Maybe we used to do something in these methods in the past, but now they
	do nothing by invoke the superclass methods, so should remove them.

	Continuous-Integration: Jenkins CI

2015-07-13  Ido Barkan  <ibarkan@redhat.com>

	net: tests: only test kernel config if unified persistence
	Testing KernelConfig does not support ifcfg persistence.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1203422
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>
	Continuous-Integration: Jenkins CI

	net: if all devices are up, skip ifup during restoratrion.
	The usual case since 3.5.4 is that all devices ahve ONBOOT=yes and
	are expected  to be up during restoration. But if only some of them
	are down, it is better to be tedious and bring everything up with
	the right order.

	Continuous-Integration: Jenkins CI

2015-07-13  Fred Rolland  <frolland@redhat.com>

	resize-lun: Fix resizing when vg has multiple pvs
	When resizing a PV, LVM needs the other PVs that are part of the VG
	in the filters parameters. After resizing the PV, LVM has to update the
	metadata of the VG. This operation will fail if not all the PVs that are
	part of the VG are included in the filter parameters.

	Bug-Url:https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

2015-07-12  Ido Barkan  <ibarkan@redhat.com>

	net: support strings for 'bridged' in kernelConfig
	Because kernelConfig did not know how to normalize this parameter in
	running config, _should_keep_bridged got wrong parameters if
	setupNetworks edited a network with 'bridged': 'false'. This
	resulted in a bridge being left behind after the network was removed.

	Bug-Url: https://bugzilla.redhat.com/1237032
	Continuous-Integration: Jenkins CI

	net: restore-nets should support ONBOOT=no
	on 3.5.x devices were persisted with ONBOOT=no. Hence, the selective
	restoration would call setupNetworks with only a subset of the
	networks and create a partial running config.
	To fix this, we fix all ifcfg files to have ONBOOT=yes and verify
	all devices are up before computing what has changed since last
	call to setSafeNetworkConfig. This will make the following call to
	setupNetwork to merely update running config with the 'fixed'
	networks, if at all.

	Continuous-Integration: Jenkins CI

	net: flatten ifcfg.ConfigWriter
	Make startDevices and stopDevices public for further use.
	Also, promotoe them to be module level functions because they do not
	need to know about the ConfigWriter state.
	Also, sortDeviceIfcfgs is only used with them so make them call it
	always. While at it, make them pep8 compatible.

	Continuous-Integration: Jenkins CI

2015-07-10  Marcin Mirecki  <mmirecki@redhat.com>

	vdsm: variable name change to avoid naming conflict
	Changes:
	'response' conflicts with respons.py for handling errors
	replaced by 'result'

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-07-10  Shahar Havivi  <shaharh@redhat.com>

	v2v: Add factory method for ImportVm class
	Introducing factory methods for different import initialization
	sources:
	This patch set the from_libvirt() factory method, next patch will
	include from_files() and from_ova() factory methods

	Continuous-Integration: Jenkins CI

2015-07-10  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: moving heavy jsonrpc tests to integration dir
	Continuous-Integration: Jenkins CI

2015-07-10  Petr Horáček  <phoracek@redhat.com>

	utils: NoIntr* references moved from misc to utils
	Continuous-Integration: Jenkins CI

2015-07-09  Dan Kenigsberg  <danken@redhat.com>

	tcTest: skip tests if somehow same bridge name is reused
	My commit 61fff86c did not solve the problem of tests magically
	re-drawing the same bridge name as a formerly-started test. There is no
	need to mark these jobs as failure, as the problem is not in our code
	but in our broken test.

	Continuous-Integration: Jenkins CI

2015-07-09  Ido Barkan  <ibarkan@redhat.com>

	net: remove dead code from vdsm-restore-net-config
	Continuous-Integration: Jenkins CI

	net: wait for restored devices to be up
	If restore-net-config does not wait for all devices to be up, it
	might observe a transient kernel state where, for example, bonding
	devices might report no slaves. This makes restoration re-restore a
	bond because it is reported by the kernel as different from the
	persisted device.

	Bug-Url: https://bugzilla.redhat.com/1203422
	Continuous-Integration: Jenkins CI

2015-07-08  Francesco Romani  <fromani@redhat.com>

	lib: migration: add response.is_error helper
	Add helper function to make the code more explicit
	and self-documenting.
	The is_error function will raise the new MalformedResponse
	exception if the response value is missing one of
	the mandatory keys.

	This is new behaviour, but please note that previously
	the code either (rarely) checked for the presence of
	the keys, so no breakage, or just exploded with less
	clear KeyError.

	Continuous-Integration: Jenkins CI

	vm: simplify Vm._getVmStatus method
	Vm._getVmStatus returns a dict with just one key/value pair,
	being the computed vm status (unsurprisingly).

	This was done without a good reason, just to make the caller
	look uniform. But more and more we need just the status value,
	so the temporary dictionary is wasteful and redundant.

	So, this patch simplifies the code to return indeed just the value.

	Continuous-Integration: Jenkins CI

2015-07-08  Adam Litke  <alitke@redhat.com>

	StorageDomainManifest: move logBlkSize
	logBlkSize is also needed by the VolumeMetadata newVolumeLease function.
	Move it into the manifest class which is safe for VolumeMetadata to
	instantiate.

	Tests:
	 - file/block: getMetaParam
	 - block: get block sizes

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: move path getters
	getLeasesFilePath is needed by VolumeMetadata to implement the
	newVolumeLease function on block storage.  Move it into the Manifest
	class which can be safely instantiated.  Also move topically similar
	getIdsFilePath and getIsoDomainImagesDir.

	Tests:
	 - file: get the metadata path
	 - file: get the iso domain images path

	Continuous-Integration: Jenkins CI

2015-07-08  Francesco Romani  <fromani@redhat.com>

	virt: logging: introduce the 'virt' logger
	Add the 'virt' top level logger, to
	make it easier to separate the logging messages.

	Continuous-Integration: Jenkins CI

2015-07-08  Martin Polednik  <mpolednik@redhat.com>

	virt: fix VM creation logic condition
	We want to look up the CPU in tuple of CPUs, but we currently supply
	string instead of tuple.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-07-07  Adam Litke  <alitke@redhat.com>

	StorageDomainManifest: move BlockSD.getVSize
	getVSize is one of the first functions needed by the VolumeMetadata
	refactoring later on in the series.  BlockVolume.getVolumeSize currently
	calls into the StorageDomain to get the volume size.  Since
	VolumeMetadata cannot create StorageDomain objects we move getVSize into
	the manifest which can be safely instantiated.

	Tests added:
	 - file: getVSize using fake volume
	 - block: getVSize via lvm
	 - block: getVSize by examining "device" file

	Continuous-Integration: Jenkins CI

	StorageDomainManifest: introduce class heirarchy
	Many of the functions in the StorageDomain class family serve to provide
	information about the storage domain and its contents (ie. images and
	volumes).  Other functions manipulate image or volume metadata in a
	fine-grained, reusable way (ie. extendVolume).  As we refactor the
	storage code to operate without an SPM the new code will benefit from
	reusing these Storage Domain "manifest" functions.

	In order to make reuse clean and safe, we want to refactor the
	StorageDomain class by splitting the reusable elements into a
	StorageDomainManifest class.  The StorageDomain object will initialize
	and use a StorageDomainManifest object for much of its normal
	operations.  Meanwhile, the new SDM code may use a StorageDomainManifest
	object directly without having access to the non-sharable parts of
	StorageDomain.

	In an effort to reduce churn during the refactoring, when moving a
	method into its new class, I will leave behind a stub in the original
	class which simply passes the call through to the method's new location.
	Once all code has been refactored, I'll remove stubs for any methods
	which are not currently accessed outside of the class.

	This patch removes volumeTests.FileVolumeGetVSizeTest since it is not
	really a Volume test and it would be broken by this patch anyway.  It
	will be restored as a storageDomainManifestTest in a followup patch.

	Continuous-Integration: Jenkins CI

2015-07-07  Nir Soffer  <nsoffer@redhat.com>

	password: Allow pickling of protected password
	In commit 862d6440176c (password: Prevent password logging and
	persisting), we bloked pickling of protected passwords, to prevent
	accidental persisting of sensitive information.

	Turns out that when using iSCSI CHAP authentication, supervdsm is
	running iscsi.readSessionInfo(), returning a protected password. Under
	the hood, it tries to pickle the results and fails.

	We raise a very clear error when trying to pickle a ProtectePassword:

	    TypeError: ProtectedPassword object cannot be pickled

	However, this error is swallowed in supervdsm or in the underlying
	multiprocessing magic, and we get this unhelpful error in vdsm:

	    RuntimeError: Broken communication with supervdsm. Failed call to
	    readSessionInfo

	Since we run lot of code via supervdsm, and returning objects
	transparently is extremely convenient, it seems that blocking pickling
	was not a good idea.

	This patch enables pickling of ProtectedPassword, fixing iSCSI storage
	when using CHAP authentication.

	Continuous-Integration: Jenkins CI

2015-07-07  Candace Sheremeta  <cshereme@redhat.com>

	vdsm: removed optional markers for volUUID
	after examining the code, it's clear that the volUUID parameter
	for vdsClient's prepareImage command is NOT optional. therefore,
	I have removed any comments marking it as optional in the
	vdsClient documentation and in vdsmapi-schema.json

	Bug-Url: https://bugzilla.redhat.com/1115556
	Continuous-Integration: Jenkins CI

2015-07-07  Ido Barkan  <ibarkan@redhat.com>

	net: ignore bondingOptions in persistent networks.
	Up until https://gerrit.ovirt.org/#/c/42146/ bondingOptions were
	mistakenly part of persistent network attributes. So, if we are
	upgrading from an older enough version, we should drop this entry
	from the copied persistent networks. If we don't, the comparison
	between persisted and kernel config would needlessly fail.

	Continuous-Integration: Jenkins CI

2015-07-07  pkliczewski  <piotr.kliczewski@gmail.com>

	xmlrpc: use deque for incoming requests
	This patch changes how we manage queued requests.

	We suspect that there could be more queued requests so before stopping the
	server we want to drop all other requests and add sentinel to stop it.

	Continuous-Integration: Jenkins CI

2015-07-07  Nir Soffer  <nsoffer@redhat.com>

	snapshot: Add vdsClient freeze() and thaw() APIs
	These verbs are needed if you want to create a snapshot manually via the
	shell on a vm containing a ceph disk. Note that this requires access to
	cinder cli for creating the ceph snapshot, so this may not be very
	useful. However, having these verbs in vdsClient make it easy to test
	and debug these features.

	Continuous-Integration: Jenkins CI

	snapshot: Add VM.freeze() and VM.thaw() verbs
	This patch adds new verbs exposing Vm.freeze() and Vm.thaw(), required
	for taking a snapshot of network disks (such as Ceph).

	Continuous-Integration: Jenkins CI

	snapshot: Add Vm.freeze() and Vm.thaw() methods
	When using vdsm images, we implement a snapshot using qcow format; we
	add a new qcow image to the volume chain, with the current leaf as the
	parent image, and then we ask libvirt to switch to the new image.
	Libvirt is freezing the filesystems on the guest, switching the vm
	drives to use the new volumes, and thawing the guest filesystems.

	This flow cannot work for Ceph disks, which are using raw format. In
	Ceph, snapshots are created on the server side, and we do not use volume
	chains. After a snapshot it taken, the vm continue to write the same
	image, and is not aware that the server took a snapshot of the disk.

	To create consistent snapshot, we must freeze filesystems on the guest
	before we take a Ceph snapshot, and we must thaw guest filesystems after
	the snapshot was finished.

	To support live snapshot when a vm is using Ceph disks, we will use this
	flow:

	- Engine tell vdsm to freeze guest's filesystems
	- Engine create Ceph disk snapshot via Cinder
	- Engine tell vdsm to take a snapshot (for other disks and memory
	  snapshot)
	- Engine tall vdsm to thaw guest's filesystems

	This patch adds the new Vm methods invoking libvirt virDomainFSFreeze
	and virDomainFSThaw.

	Freezing or thawing filesystems can fail because of many reasons;
	libvirt driver does not support freezing, guest agent is not installed
	or not running or guest agent failure. We detect the first two cases, and
	treat any other libvirt error as guest agent failure.

	The errors are reported back to engine so it can handled them correctly.
	The current policy implemented in vdsm is to log freezing failures
	during snapshot, and retry the snapshot without freezing.  Future engine
	versions can change this policy based on the error code returned from
	new freezing APIs.

	Continuous-Integration: Jenkins CI

2015-07-07  Ondřej Svoboda  <osvoboda@redhat.com>

	network: avoid guest-host communication over IPv6 on bridges, unless requested
	On CentOS/RHEL 7, disable_ipv6=0 is the default so bridges allowed IPv6
	traffic even though it was not enabled (by setting a static address or
	using SLAAC or DHCPv6).

	Bug-Url: https://bugzilla.redhat.com/1219363
	Continuous-Integration: Jenkins CI

2015-07-07  Francesco Romani  <fromani@redhat.com>

	api: use recommended logging
	Update the logging in setLogLevel to use
	less convoluted and more modern idiom.

	Continuous-Integration: Jenkins CI

	vm: clock: always use rtc timer
	We should always use the <timer name='rtc' tickpolicy='catchup'/> attribute.
	It was removed only because of a misunderstandment of the libvirt docs.

	<timer name='rtc' tickpolicy='catchup'/> is actually needed for Windows
	guests as well. It provides the guest with time drift fix that is particularly
	required on loaded servers.

	Bug-Url: https://bugzilla.redhat.com/1215610
	Continuous-Integration: Jenkins CI

2015-07-07  Ondřej Svoboda  <osvoboda@redhat.com>

	gluster: use socket.getfqdn instead of 'hostname' binary
	VDSM still requires the binary though, it is called in e.g.
	  vdsm/vdsm-gencerts.sh.in

	Continuous-Integration: Jenkins CI

2015-07-06  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: marking slow tests with decorator
	Continuous-Integration: Jenkins CI

2015-07-06  Dan Kenigsberg  <danken@redhat.com>

	net: maintain legacy addNetwork/delNetwork APIs
	commits 43a6b9 and 167b02 changed the signature of addNetwork and
	delNetwork respectively. The name change, from "bridge" to "network" is
	highly reasonable, as we support non-bridged networks. However, it must
	not happen, as Engine 3.5 uses argument names in its json-rpc API.

	commits 3abcad and 1d015d modified the schema to the new signature, so
	they are reverted as well.

	With http://www.ovirt.org/Features/HostNetworkingApi implemented in
	engine-3.6, no one is going to call Vdsm's addNetwork/delNetwork any
	more. However, we must keep backward compatibility as long as engine-3.5
	is supported.

	Bug-Url: https://bugzilla.redhat.com/1229632
	Continuous-Integration: Jenkins CI

2015-07-06  Ido Barkan  <ibarkan@redhat.com>

	net: contrib: add veth cleanup to emergency_net_cleanup
	Continuous-Integration: Jenkins CI

2015-07-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing support in sysv and upstart
	sysvinit upstart scripts used to support el6,
	which has been dropped from the master branch.
	Both not required since el7. systemd scripts
	become the standard in fedora, el and debian.

	Continuous-Integration: Jenkins CI

2015-07-05  Dima Kuznetsov  <dkuznets@redhat.com>

	supervdsm: Add zombiereaper to supervdsm
	Supervdsm uses multiprocessing.Process to impersonate other users and
	check access. To avoid waiting on the subprocesses, we add all
	subprocesses that were not waited upon to zombiereaper.

	This patch can be merged once Python bug
	https://bugzilla.redhat.com/1210347 is closed.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=841486
	Continuous-Integration: Jenkins CI

2015-07-04  Nir Soffer  <nsoffer@redhat.com>

	xmlrpc: Improve logging during shutdown
	We did not have proper logging when stopping the server, making it hard
	to debug. Starting and stopping subsystems should have info level log
	messages in the caller thread and in the server thread.

	Continuous-Integration: Jenkins CI

	fc-scan: Replace timing code with utils.stopwatch
	Replace explicit timing code and monotonic_time re-implementation with
	new stopwatch contextmanager.

	Continuous-Integration: Jenkins CI

	utils: Add stopwatch for timing operations
	stopwatch is a context manager that make it easy to time block of code
	that may take significant amount of time.

	Example:

	    with stopwatch("Resized multipath map %r" % name):
	        _resize_map(name)

	Will log a debug message:

	    Resized multipath map 'dm-42': 0.12 seconds

	If debug log level is not enabled, this contents manager does nothing.
	The log can be disabled by disabling the vds.stopwatch logger.

	Continuous-Integration: Jenkins CI

2015-07-03  Francesco Romani  <fromani@redhat.com>

	migration: avoid stacktrace on known errors
	In migration code, if VM.migrationCreate() fails on destination host,
	we raise RuntimeError to abort the normal flow.
	However, in the recovery flow, we inconditionally log the stacktrace
	of the exception we catched.

	This is good for troubleshooiting, but it is a little pointless in
	this specific use case: we know already and precisely what failed.

	This patch adds a special-purpose exception for this specific, yet
	important, failure scenario, and avoids the stacktrace only when
	catching this exception.

	Continuous-Integration: Jenkins CI

2015-07-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Allow setting custom libvirt error message
	Fake Domain object was repeating the code in Error factory, and was
	using a default empty error message. Now we use Error and allow faking
	also the error message.

	Continuous-Integration: Jenkins CI

	tests: Add @recorded method decorator
	Manually recording function arguments and keywords again and again is
	not fun and error prone. This patch introduces a new decorator to make
	this task easier.

	To make a method recordable, mark the method you want to record:

	    class Foo:
	        @recorded
	        def foo(self, a, b, c=3):
	            pass
	        def bar(self):
	            return 42

	Methods decorated with @recorded will record all calls to the
	instance's __recording__ list:

	    f = Foo()
	    f.foo(1, 2, 4)
	    f.bar()
	    f.foo(2, 3)

	    print(f.__recording__)
	    [("foo", (1, 2), {"c": 4}), ("foo", (2, 3), {"c": 3})]

	The new decorator is used now by vmfakelib.Domain. It may be useful for
	other fake objects as well.

	Continuous-Integration: Jenkins CI

	tests: Record fake domain calls in a list
	Keeping calls in a list allows testing of multiple calls. We can check
	how many time a methods was called, what args and kwargs were used on
	each call, and we can verify the correct order of the calls.

	Continuous-Integration: Jenkins CI

2015-07-02  Ala Hino  <ahino@redhat.com>

	build: Change dependency on glusterfs-cli and glusterfs-fuse
	This is a revert of 766a54776555e6303b4ceae593c41bbfb0c764ae.

	Originally, glusterfs-cli and glusterfs-fuse were required only
	when not building vdsm on RHEV.
	We changed the spec file to always require
	gluster-cli and glusterfs-fuse in order to use gluster get volume
	info api to implement mounting gluster backup servers
	(https://gerrit.ovirt.org/41858).
	However, requiring these dependencies fails vdsm build on ppc64le.
	This patch revert requiring glusterfs-cli and glusterfs-fuse
	dependencies as were originally defined.

	Continuous-Integration: Jenkins CI

2015-07-02  Francesco Romani  <fromani@redhat.com>

	migration: use the response module
	Switch to response module for the sake of code
	clarity.

	Continuous-Integration: Jenkins CI

2015-07-02  Petr Horáček  <phoracek@redhat.com>

	tests: network: when using bonding, attach at least 2 slaves
	In some tests we attach just one slave to a bonding, it works
	with native linux bonding, but does not allow us to use existing
	for OVS bonding.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234867
	Continuous-Integration: Jenkins CI

	network: allow custom bondOption
	Allow 'custom' in bond options. This value will be accepted by
	Bond.validateOptions method but it will not be passed to configurator.

	Thanks to this patch, users will be allowed to pass custom properties
	to setupNetworks hooks.

	This path was reverted in past because of malfunction, now it should
	work, there is a new test for sure.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1234867
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-07-02  Francesco Romani  <fromani@redhat.com>

	virt: don't log password in update graphic device
	updateDevice invoked against a graphics device
	allows Engine (or any other caller) to change the
	SPICE ticket.

	This patch make sure the ticket is not logged.

	Continuous-Integration: Jenkins CI

2015-07-02  Ido Barkan  <ibarkan@redhat.com>

	net: run dhclient in its own process group.
	This is done to prevent systemd from killing supervdsm dhclient child
	processes during supervdsm stop (or restart). Forking dhclient in
	its own process group prevents systemd from doing this.
	Since dhclient is deliberately killed either directly by supervdsm or
	indirectly by executing ifdown on a device and since executing a
	process in a different process group is harmless, the separate
	cgroup is now the default behaviour.
	This patch also fixes https://bugzilla.redhat.com/1187244 in a less
	clumsy way than KillMode=process.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1228322
	Continuous-Integration: Jenkins CI

2015-07-02  Yaniv Bronhaim  <ybronhei@redhat.com>

	load_needed_modules verb is not required
	Since ovirt-3.6 systemd takes care of loading required kernel modules during
	installation by using vdsm-modules-load.d.conf

	Continuous-Integration: Jenkins CI

2015-07-02  Francesco Romani  <fromani@redhat.com>

	jsonrpc: vdscli: migration: fix migrationCreate
	In virt migration code, we do logic on the return
	value of VM.migrationCreate API, and we expect it
	to be a proper response, so with ['status']['code']
	field, plus all the extra fields that APIs can add
	(see schema for examples).

	Current jsonrpc code strips all but the extra fields,
	so jsonrpcvdscli has to force fit a success code.

	This patch simplify the code by just passing around
	a copy of the raw data, leveraging the response module.
	This way the code is both simpler and more conformant
	to the old XML-RPC vdscli API.

	Continuous-Integration: Jenkins CI

2015-07-01  Ala Hino  <ahino@redhat.com>

	gluster:refactor: User specified backup servers option
	Move handling user specified backup servers option from
	_get_backup_servers_option method to options property.

	Continuous-Integration: Jenkins CI

2015-07-01  Francesco Romani  <fromani@redhat.com>

	tests: add HostStatsThread._getCpuCoreStats test
	Next patch wants to refactor
	HostStatsThread._getCpuCoreStats into a free function,
	so this patch adds very basic test coverage.

	This test needs to be refactored as well, and will
	be done alongside the method refactoring.

	Continuous-Integration: Jenkins CI

	sampling: rename variables for clarity
	Rename:
	hs0 -> first_sample
	hs1 -> last_sample

	for clarity, and to conform to naming used elsewhere in the
	module/package. No changes in logic.

	Continuous-Integration: Jenkins CI

2015-07-01  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: create pv with custom dataalignment value
	Blivet creates pv with 1mb dataalignment forcefully for
	whatever given value. This patch uses lvm pvcreate command till
	this bug fixed in blivet.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1225831
	Continuous-Integration: Jenkins CI

2015-06-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Vdsm does not require tun device any more
	For many many years 6a915816, vdsm no longer creates tap devices directly,
	but uses libvirt instead. 

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-30  Ido Barkan  <ibarkan@redhat.com>

	tests: disable truncating diff in assert error messages
	Set the maximum length of a diff in failure messages by assert
	methods using difflib. When diffing long dictionaries this can make
	debugging easier. Also remove other specific uses of this setting.
	Without this setting a failing test messege might look like this:

	==============================================
	FAIL: testLongDiff (netinfoTests.TestNetinfo)
	-----------------------------------------------
	Traceback (most recent call last):
	  ...
	  self.assertEqual(first, seconds)
	AssertionError: {10: 63, 11: 72, 13: 65, 16: 72[truncated]...
	 != {2: 39, 3: 15, 20: 84, 37: 84, 50: 76, 53: [truncated]...
	Diff is 746 characters long. Set self.maxDiff to None to see it.
	----------------------------------------------------------------------

	Continuous-Integration: Jenkins CI

2015-06-30  Francesco Romani  <fromani@redhat.com>

	sampling: hoststats: switch to SampleWindow
	HostStatsThread has its own sampling storage code,
	like VmStatsThread had before the introduction of
	the SampleWindow class.

	The API of SampleWindow covers the HostStatsThread needs,
	so this patch ports HostStatsThread to SampleWindow,
	to reduce duplication.

	Continuous-Integration: Jenkins CI

2015-06-30  Ido Barkan  <ibarkan@redhat.com>

	net: tests: fix testSetupNetworksAddBondWithManyVlans
	testSetupNetworksAddBondWithManyVlans was calling getVdsStats. This
	call has nothing to do with testing multiple vlans per bond.
	Moreover, it failed the test. Since we specifically test
	getVdsStats in test_getVdsStats, it should only fail there.

	Continuous-Integration: Jenkins CI

2015-06-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Introducing vdsm preset systemd file
	http://www.freedesktop.org/software/systemd/man/systemd.preset.html

	systemd preset files are located under /usr/lib/systemd/system-preset/ -

	The prefix number tells the order priority. 90-default.preset enables
	ksmtuned.service which conflicts with vdsmd -
	therefore vdsmd priority is 85 - before the default preset and low enough
	 to not override other preset configurations if exists.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1094936
	Continuous-Integration: Jenkins CI

2015-06-30  Anton Marchukov  <amarchuk@redhat.com>

	Fixed scratchpad hook's image permissions and virtio device name
	Continuous-Integration: Jenkins CI

2015-06-30  Francesco Romani  <fromani@redhat.com>

	tests: HostStatsThread: sampling window tests
	Add test to ensure that the circular buffer
	for Host samples works as intended.

	Continuous-Integration: Jenkins CI

2015-06-30  Martin Polednik  <mpolednik@redhat.com>

	virt: use new mocking in hostdevTests
	With unified mocking mechanism for host devices, hostdevTests can now
	be converted to use the mechanism. This does not really change any
	functionality, but creates a pool of device XMLs that can be used in
	future tests.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-30  pkliczewski  <piotr.kliczewski@gmail.com>

	events: make sure to send only one event per status
	Initially we made an assumption that engine can handle more than one
	event containing the same status. The assumption is not true and there
	are flows where engine logic assumes only one status change.

	One of the problematic flows is vm destroy for which having duplicate
	means that the operation failed and recovery flow is triggered.

	Continuous-Integration: Jenkins CI

2015-06-30  Ido Barkan  <ibarkan@redhat.com>

	net: tests: test selective restore only if unified persistence
	testRestoreNetworksOnlyRestoreUnchangedDevices should be skipped if
	the persistence mode is ifcfg.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1203422
	Continuous-Integration: Jenkins CI

2015-06-29  Francesco Romani  <fromani@redhat.com>

	jsonrpc: vdscli: return raw error description
	The old XML-RPC based vdscli returns error responses if a method call
	fails, and never raises for those cases.
	If we want jsonrpcvdscli to be a drop-in replacement, then we must
	avoid to raise JsonRpcError on failures, and return error response
	directly.

	This patch does that.

	Continuous-Integration: Jenkins CI

2015-06-29  Amador Pahim  <apahim@redhat.com>

	Fix "print" syntax to work in python3
	Continuous-Integration: Jenkins CI

2015-06-29  Adam Litke  <alitke@redhat.com>

	Fix logging in LiveMergeCleanupThread
	The log object is located in the vm object, not in the
	LiveMergeCleanupThread.  Correct this logging statement which may have
	never been reached before.

	Continuous-Integration: Jenkins CI

2015-06-29  Ala Hino  <ahino@redhat.com>

	gluster: Verify volume is Replica 3
	Verify that only Replica 3 volumes are used in gluster storage domains.
	We enforce replica 3 because this is the recommended deployment for virt
	and gluster.
	We added a configuration to enable developers test gluster without
	the need to create replica 3 volumes.

	Bug-Url: https://bugzilla.redhat.com/1123052
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	gluster:refactor: Refactor GlusterFSConnection class
	Gluster volume info is required when validating that gluster volume
	is replica 3 and when calculating gluster backup servers option.
	volinfo property introduced to save multiple calls to get gluster
	volume info.
	self._volname and self._volfileserver introduced because they are
	used in multiple places in the code.

	Continuous-Integration: Jenkins CI

2015-06-29  Amador Pahim  <apahim@redhat.com>

	hook: diskunmap: To include UNMAP support for disk and lun devices
	This hook goes through VM definitions xml file and manipulate its
	disk device if it "disk" or "lun" and if the bus is "scsi" or "ide",
	adding "discard=unmap" option to "-drive" qemu command line patameter.

	UNMAP support was introduced by qemu 1.5 and it's intended to return
	the unused/freed blocks back to the storage, specially useful for
	thin provisioned LUNs.

	Result example:

	<disk device="disk" snapshot="no" type="block">
	        ...
	        <target bus="ide" dev="hda"/>
	        ...
	        <driver cache="none" discard="unmap" ... />
	</disk>
	<disk device="lun" sgio="filtered" snapshot="no" type="block">
	        ...
	        <target bus="scsi" dev="sda"/>
	        ...
	        <driver cache="none" discard="unmap" ... />
	</disk>

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-29  Martin Polednik  <mpolednik@redhat.com>

	virt: fix functional test graphics device for ppc64le
	The functional tests use qxl graphics device currently. Qxl isn't
	supported on ppc64le now, so using vnc for functional tests allow them
	to run without manual intervention.

	Continuous-Integration: Jenkins CI

2015-06-27  Nir Soffer  <nsoffer@redhat.com>

	ceph: Clear only ovirt secrets
	When clearing other secrets, unregister only ovirt secrets. This allow
	the administrator to add other secrets to libvirt. This is not strictly
	needed since we kind of own libvirt, but is more polite.

	Continuous-Integration: Jenkins CI

	ceph: Clear all secrets during startup and shutdown
	Libvirt secrets are needed only when vdsm is connected to engine. To
	ensure that we don't leave stale secrets or secrets which are not needed
	by the active storage domains, we clear all secrets when the service
	starting or stopping. Engine will register the required secrets when
	connecting to the host or when activating or deactivating storage
	domains.

	Continuous-Integration: Jenkins CI

2015-06-26  Francesco Romani  <fromani@redhat.com>

	tests: make permutations work
	A test was mistakenly rebinding a parameter,
	making the permutations irrelevant.
	This patch fixes that.

	Continuous-Integration: Jenkins CI

2015-06-26  Nir Soffer  <nsoffer@redhat.com>

	ceph: Add option to clear other secrets
	Typically engine will add new secrets when activating a Cinder/Ceph
	storage domain or when a user add new secret to an active domain. Engine
	will remove secrets when deactivating a domain, moving the host to
	maintenance, or when a user delete a secret form an active domain.

	When host is unreachable when engine try to unregister secrets, the host
	will contain stale or unneeded secrets. When the host becomes UP again,
	engine would like to register all the secrets required for the current
	active storage domains, and clear any other secret.

	Continuous-Integration: Jenkins CI

	ceph: Undefine existing secret if usage changed
	When re-defining a secret, libvirt does not allow to change the usage
	id.  We know that we will have to change the usage id in the next
	version, when moving secrets from Cinder provider to the storage domain
	using the Cinder provider.

	So now lookup existing secrets and undefine secrets with different
	usage id before defining new secret.

	Continuous-Integration: Jenkins CI

	ceph: Add vdsClient secrets verbs
	New verbs:

	  registerSecrects <secrets_file>       Register secrets from file in
	                                        json format

	  unregisterSecrets <uuid> ...          Unregister secrets registered
	                                        for specified uuids

	Secret file format:

	[
	    {
	        "uuid": "3a27b133-abb2-4302-8891-bd0a4032866f",
	        "usageType": "ceph",
	        "usageID": "ovirt/f7234e97-1e49-47a3-aaa4-5962fc99c1e4/3a27b133-abb2-4302-8891-bd0a4032866f",
	        "password": "bm8gcGFzc3dvcmQgZm9yIHlvdSEK"
	    },
	    {
	        "uuid": "2638b449-e076-474e-8e72-0a3130cd8f7b",
	        "usageType": "ceph",
	        "usageID": "ovirt/f7234e97-1e49-47a3-aaa4-5962fc99c1e4/2638b449-e076-474e-8e72-0a3130cd8f7b",
	        "password": "bXkgc2VjcmV0IHBhc3N3b3JkCg=="
	    }
	]

	Continuous-Integration: Jenkins CI

	ceph: Support ephemeral Libvirt secrets
	To support network disk using Libvirt secrets, we will configure Libvirt
	using ephemeral and private secrets. Libvirt keep such secrets only in
	memory, and never store them persistently. The secret are not revealed
	to any caller of libvirt, nor to any other node.

	The actual authentication key will be stored in the engine in a secured
	manner. We will pass the key over secured transport to Vdsm when
	activating a storage domain supporting network disks, and unregister the
	secrets when deactivating the storage domain or the host.

	New secret APIs:

	  registerSecrets(secrets)   Define Libvirt secrets specified in the
	                             secrets list and set their authentication
	                             key.

	  unregisterSecrets(uuids)   Undefine the Libvirt secrets identified by
	                             the provided uuids list.

	For more info see Libvirt documentation:
	https://libvirt.org/html/libvirt-libvirt-secret.html

	Continuous-Integration: Jenkins CI

2015-06-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register tool: Add lower() to compare fingerprints
	Make sure the fingerprints will match in cases user
	typed one letter with in upper and other in lower.

	Continuous-Integration: Jenkins CI

2015-06-26  Francesco Romani  <fromani@redhat.com>

	spec: serial console: require ovirt-vmconsole
	The ovirt-vmconsole package owns the ovirt-vmconsole
	user/group, and ships shared utility code.
	It doesn't add any service, so it is safe to depend
	on it to make sure the ovirt-vmconsole group is
	present on the system.

	Related-To: https://bugzilla.redhat.com/1229827
	Bug-Url: https://bugzilla.redhat.com/1223671
	Continuous-Integration: Jenkins CI

2015-06-26  Darshan N  <dnarayan@redhat.com>

	gluster: run restorecon for files created during geo-rep create.
	This patch runs restorecon on ssh directory and authorized_keys
	file if they are created as part of geoRepKeysUpdate verb.
	This is used by geo replication feature. When selinux is
	enabled, without this fix ssh between master and slave nodes
	fail.

	Bug-Url:https://bugzilla.redhat.com/show_bug.cgi?id=1230353
	Continuous-Integration: Jenkins CI

2015-06-26  Ido Barkan  <ibarkan@redhat.com>

	net: use KernelConfig instead of RunningConfig in setupNetworks
	Using RunningConfig is not enough because it is not necessarily
	equal to what is really configured in the kernel. Also, it might
	not be present at all (during boot). since this code runs only if
	the network is in _netinfo.networks, it is also safer to use
	KernelConfig.
	Note that just as in vdsm-restore-net-config, a KernelConfig instance
	and a {Persistent,Running}Config instance cannot be directly compared
	without normalizing the latter. This is because a few language
	differences and a few default values used in the latter.

	Continuous-Integration: Jenkins CI

2015-06-25  Ido Barkan  <ibarkan@redhat.com>

	net: fix possible 'stp' key duplication in persistent config
	Before the fix, In case the persistent config had {'STP': 'no'} the
	normalized config would be {'stp': False, 'STP': 'no'}.

	Continuous-Integration: Jenkins CI

	net: typo in KernelConfig
	Continuous-Integration: Jenkins CI

2015-06-25  Dan Kenigsberg  <danken@redhat.com>

	tests: netmodels: quick unbreak
	This patch moves the monkey-patching of bonding defaults file
	to the class level, so it affects all tests.

	Continuous-Integration: Jenkins CI

2015-06-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove el6 specific code from spec
	Continuous-Integration: Jenkins CI

	Removing libvirt configure fallback from spec
	we don't require using systemd-vdsmd and vdsmd scripts anymore for
	libvirt configure as we stop supporting vdsm versions that does not
	include vdsm-tool configure verb - this patch makes it impossible to
	upgrade from ovirt-3.3 directly to ovirt-3.6

	Continuous-Integration: Jenkins CI

2015-06-24  Ido Barkan  <ibarkan@redhat.com>

	net: tests: do not use KernelConfig.__eq__ in tests
	Until now, functional tests used the __eq__ to assert that a
	KernelConfig instance is equal to a RunningConfig instance. This
	hides the normalization process inside __eq__ and makes the life of
	the tester very hard if something really breaks. We trade some magic
	here for a better error message.

	Continuous-Integration: Jenkins CI

2015-06-24  Ala Hino  <ahino@redhat.com>

	build: Add dependency on gluster-cli
	Dependency on gluster-cli is needed in order to get gluster volume info.
	This volume info is needed in the patch that targets mounting gluster
	backup volume servers (gluster: Allow gluster mount with additional
	servers, commit: 87ae69ed7f60).

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-24  Petr Horáček  <phoracek@redhat.com>

	tests: netlink: update expected events
	If IPv6 is disabled in kernel, we don't get all expected events on
	dummy creation. I removed such events from our test, so it pass anyways.

	Continuous-Integration: Jenkins CI

2015-06-24  Pavel Zhukov  <pzhukov@redhat.com>

	Improve readability of _ownedIfcfg procedure
	Before this patch, _ownedIfcfg returned three possible values (True, False or
	None). It is clearer to return False or True explicitly.

	Furthermore, we don't need special treatment for ENOENT (no such file or
	directory) since we call this helper function only on existing files (yielded
	by iglobe).

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-24  Ido Barkan  <ibarkan@redhat.com>

	net: ifcfg: ONBOOT=yes on all persisted network files.
	This will cause network service to configure those networks long
	before vdsm starts. after https://gerrit.ovirt.org/#/c/42355/
	vdsm will only restore changed networks.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1203422
	Continuous-Integration: Jenkins CI

	net: during boot, restore only networks that were actually changed.
	This is an optimization that will shorten boot time when there are many
	networks. If also, all persisted networks will be persisted with onboot=true,
	then in most case, all the hard of restorattion will be done by network
	service and vdsm will only interfere to fix the changed networks and bonds.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1203422
	Continuous-Integration: Jenkins CI

	net: introducing KernelConfig
	KernelConfig can be created from a NetInfo object. It reflects the
	network kernel state and exposes an API similar to RunningConfig. At
	this stage, It can compare itself to a RunninConfig instance in order to
	be tested properly and prove it is 'correct'. Later, it should be able to
	tell which networks/bonds it obtained from the kernel are different
	from a given PersistentConfig's networks/bodns.
	This is useful at boot time in order to allow skipping restoring already
	configured networks.
	Since VDSM network api has language differences from netinfo module and
	also has many default parameters, KernelConfig tries to do 2 things:
	1. It tries to be expilict as possible (no defaults)
	2. It knows how to 'normalize' a running/persistent config so it would
	   also be explicit.

	Note the custom properties are never included in KernelConfig, as they only
	serve as hints to Vdsm and its hooks. Therefore, tests which set custom
	properties would certainly get into RunningConfig!=KernelConfig.
	These tests pass test_kernel_config=False so as not to fail.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1203422
	Continuous-Integration: Jenkins CI

	net: tests: wait for a specific state of a device
	5d6c571d added _waitForKnownOperstate. This improved tests
	reliability but it is not enough. It may happen that a test will
	fail because the initial device state is down and inside a
	nonChangingOperstate context manager, it changes to up. It is safer
	to ensure that the initial operation state is not only other than
	'unknown' but a specific one (most probably 'up').
	Also, the state names where replaced with constants in
	lib/vdsm/netinfo.py for future use.

	Continuous-Integration: Jenkins CI

	net: Drop default bonding options
	On old engines, no bonding options were provided to VDSM and it
	used to configure it's own default options. Nowadays, those options
	are always provided by engine. If a user will setup a network on an
	existing bond, VDSM takes ownership of the bond and configures the
	options on it.
	The code for the default options was very local and options were
	set 'too late' to be persisted. Hence this code was incorrect and
	is not needed anyway.
	The change in behavior is that from now on, if a bond with no options
	is explicitly requested, the kernel will be asked to create a bond
	without any options making the default kernel options effective.

	Continuous-Integration: Jenkins CI

2015-06-23  Nir Soffer  <nsoffer@redhat.com>

	vm: Gather disk replication private methods
	Move disk replication private methods together, bellow the public
	methods without any code change.

	Continuous-Integration: Jenkins CI

	vm: Delete Drive.diskReplicate before saving config
	When drive replication is finished, either by pivoting to the
	destination volume or keeping the source volume, Drive.diskReplicate
	must be deleted, to ensure that high watermark monitoring is correct.

	The current code could fail to delete diskReplicate if the disk was not
	found in Vm.conf, or saving state failed. This could lead to incorrect
	extend requests for non-existent volume.

	Continuous-Integration: Jenkins CI

2015-06-23  Ala Hino  <ahino@redhat.com>

	gluster: Allow gluster mount with additional servers
	Currently, engine supports mounting single gluster server. With this
	change, mount will include the other two gluster servers defined in the
	replica.  To do so, vdsm uses gluster get info api in order to get the
	IPs of the other two servers and then, builds mount command using
	gluster 'backup-volfile-servers' option.

	This patch does not change existing api, it only saves the user the
	work needed to mount other gluster severs. Before this patch, if user
	explicitly provided 'volfile-backup-servers' option, with this patch,
	it is not required anymore.

	Note that today vdsm has soft-dependency glusterfs-fuse and with this
	change, vdsm will have dependency on glusterfs-cli. If this dependency
	doesn't exist, there is an error when creating gluster storage domain.

	Bug-Url: https://bugzilla.redhat.com/1177777
	Continuous-Integration: Jenkins CI

2015-06-23  Darshan N  <dnarayan@redhat.com>

	gluster: Remove Vdsm's dependency on glusterfs-server pkg
	This patch removes dependency of vdsm package on
	glusterfs-server package. This removal of dependency
	is needed for ovirt-gluster HC use case.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1232197
	Continuous-Integration: Jenkins CI

2015-06-23  Francesco Romani  <fromani@redhat.com>

	vm: fixed broken usage of super()
	Fixes broken usage of super() in MissingLibvirtDomainError.

	Continuous-Integration: Jenkins CI

2015-06-23  pkliczewski  <piotr.kliczewski@gmail.com>

	test: make sure that jsonrpc test timeout
	We want to reuse recently created call method with timeout. By using it
	we would make sure to timeout when the response won't arrive. Whenever
	this situation happens we raise JsonRpcNoResponseError.

	When we added timeout method which takes more time to process than the
	client wait on it the code close server which is problematic. After slow
	method processing finishes and the server side is already closed the is
	nice stack trace on the console so we added a check so we won't pollute
	the console during test execution.


	Continuous-Integration: Jenkins CI

2015-06-23  Nir Soffer  <nsoffer@redhat.com>

	ceph: Report librbd1 package details
	Report librbd1 package details in getVdsCaps output.  Engine will use
	this information to validate adding a host or storage domain to a data
	center.

	Continuous-Integration: Jenkins CI

2015-06-23  pkliczewski  <piotr.kliczewski@gmail.com>

	events: send event explicitly after vm was started
	We need to make sure that we send 'PoweringUp' status. After we moved
	event send logic from _set_lastStatus to ClientIf we no longer send it.


	Continuous-Integration: Jenkins CI

2015-06-23  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Moving conf init things together
	Continuous-Integration: Jenkins CI

2015-06-23  Nir Soffer  <nsoffer@redhat.com>

	multipath: Minor style cleanups
	Unify CommandPath constants and align the comments.

	Continuous-Integration: Jenkins CI

2015-06-22  Nir Soffer  <nsoffer@redhat.com>

	Revert "ceph: Require ceph-common package"
	We cannot include Ceph packages with current vdsm spec, since ceph is
	not available on PPC.

	For accessing Ceph network disks, we need librbd1, which is recently
	required by qemu-kvm, so we do not need to require ceph-common with
	current code.

	We will have to fix vdsm spec to allow architecture based dependencies
	before we can require Ceph packages.

	This reverts commit a55ee250ff1809a7865e92aedbc698f4cea1db21.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-22  Ido Barkan  <ibarkan@redhat.com>

	net: tests: testAddVlanedBridgeless should use a standard name
	Names that do not start with NETWORK_NAME are not cleared by
	shell_helper emergency_net_cleanup command.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-22  Genadi Chereshnya  <gcheresh@redhat.com>

	libvirt: Replacing xml.dom.minidom with cElementTree module
	The change is done as etree is much faster than minidom.

	Continuous-Integration: Jenkins CI

2015-06-22  Francesco Romani  <fromani@redhat.com>

	migration: wait after the downtime is updated
	Currently VDSM updates the migration max downtime in
	a loop, waiting a given amount of time before to update
	the downtime.

	Until VDSM changes the downtime, we use the default QEMU value,
	which has little benefit for our needs.

	We want to use our algorithm quickly, so this patch makes
	the code wait just after each update.
	As further benefit, the downtime is now updated immediatly when
	migration starts.

	Continuous-Integration: Jenkins CI

	migration: allow one-step downtime settings
	In specific environments, it may be useful
	to have one-step downtime setting.

	This actually translates to just set the specified
	downtime and go ahead.

	Continuous-Integration: Jenkins CI

	migration: make downtime steps instance attributes
	Move the DowntimeThread steps from class constant
	to instance attribute, to make the code more testable.

	Continuous-Integration: Jenkins CI

	sampling: return correct vcpu positioning info
	In commit 262917767771ef590fad2a4266dad1c2a915e5ba
	We incorrectly started to report the full vcpu()
	output from libvirt. numaUtils code expects
	a subset of this data, so when NUMA is enabled
	(e.g. always for the hotplugMem feature), we
	start to spam the logs with

	File "/usr/share/vdsm/numaUtils.py", line 106, in
	getVmNumaNodeRuntimeInfo
	    _get_vcpu_positioning(vm))
	  File "/usr/share/vdsm/numaUtils.py", line 141, in
	_get_mapping_vcpu_to_pcpu
	    for (vcpu_id, _, _, pcpu_id) in infos:
	ValueError: need more than 1 value to unpack

	Every 15s, and we broke the numa sampling.

	This patch restores the correct behaviour.

	Continuous-Integration: Jenkins CI

2015-06-22  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Do not perform disconnect actions when destroyed
	Up until now, we did blindly try to perform actions like desktopLock
	on the guest agent, even if the VM was already destroyed.
	This can cause tracebacks to be present in the logs since we won't
	be connected to the guest agent channel anymore.

	Example of traceback:

	Traceback (most recent call last):
	  File "/usr/share/vdsm/virt/guestagent.py", line 357, in desktopLock
	    self._forward("lock-screen")
	  File "/usr/share/vdsm/virt/guestagent.py", line 227, in _forward
	    self._sock.send(message)
	  File "/usr/lib64/python2.7/socket.py", line 170, in _dummy
	    raise error(EBADF, 'Bad file descriptor')
	error: [Errno 9] Bad file descriptor

	This patch now at least checks that '_destroyed' is not 'True'.
	This will not solve this for all the cases, since there is still
	room for a race condition however should improve the times of this
	happening significantly.

	Bug-Url: https://bugzilla.redhat.com/1197460
	Continuous-Integration: Jenkins CI

2015-06-21  Nir Soffer  <nsoffer@redhat.com>

	vm: Save state only if disk was updated
	When updating disk parameters, there is no point in saving state if we
	did not find the disk and modify it.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	vm: Take _confLock when updating Vm.conf disk parameters
	This method updates multiple parameters, so we must lock the dict to
	prevent other threads from seeing inconsistent state.

	Continuous-Integration: Jenkins CI

2015-06-19  Francesco Romani  <fromani@redhat.com>

	vmstats: TypeError is unlikely with modern libvirt
	Modern libvirts, which we already require, make
	use of virTypedParameter, which the Python
	bindings make safe to transform in the proper
	native types.

	Thus, a TypeError is highly unlikely those days.

	Continuous-Integration: Jenkins CI

	vmstats: do not catch unlikely ZeroDivisionError
	Nowadays, the only foreseeable reason to have ZeroDivisionError
	in the vmstats functions, is when interval is zero.

	This case is in turn very very unlikely, as it should
	happen only in the extravagant case of two polling cycles racing
	together, saving bad bugs in the sampling code.

	So, drop the ZeroDivisionError from the handled
	exception, and we add an explicit guard to be sure
	we record these end-of-the-world-like cases.

	Continuous-Integration: Jenkins CI

	sampling: more detailed stale sampling reporting
	To improve troubleshooting, report timestamps
	of current and stale samples when discarding
	data for timestamp too old.

	We are already logging this event, so adding new
	information is quite cheap and can make
	troubleshooting easier.

	Continuous-Integration: Jenkins CI

2015-06-19  Dan Kenigsberg  <danken@redhat.com>

	sampling: use constants for counter bounds
	When we report cpu and network usage, we take two samples of Linux
	counters, and divide their difference by the elapsed time. If a sampled
	counter wraps around its upper bound, we might report an invalid
	negative value. To avoid that, we take the modulu of the difference.
	For example, assume that the first sample was (2**64 - 10) jiffies and
	30 jiffies have passed until the second sample, the difference would be
	the hugely negative value (30 - 2**64). Taking modulu 2**64 returns the
	correct value of 30 jiffies.

	JIFFIES_BOUND is taken from the size of clock_t and NETSTATS_BOUND -
	from the size of the fields of struct net_device_stats. I am not aware
	of any programmatic way to acquire this value, but they are both of 64
	bit size on x86_64 and ppc64.

	Taking modulu 2**32 works perfectly well, since two subsequent samples
	are unlikly to be that far apart, and it has the benefit of working well
	on a 32 bit host, too.

2015-06-19  Francesco Romani  <fromani@redhat.com>

	migration: fix spacing
	Continuous-Integration: Jenkins CI

2015-06-19  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: log number of request during period of time
	We want to understand how many requests were received by vdsm during
	specified time. Every interval we log known number of requests and we
	reset the value.


	Continuous-Integration: Jenkins CI

2015-06-18  Ido Barkan  <ibarkan@redhat.com>

	net: reset bonding options to defaults.
	When an existing bond is edited, replacing bonding options in the
	ifcfg file and ifdown+ifup is not enough. This is because ifcfg
	script will only set the options that are indicated. This is a
	bug since what is persisted is not what is eventually configured on
	the edited bond.
	This is solved by resetting the non default options back before ifup.
	testSetupNetworksResizeBond was changed to point at the bug and prove
	it is solved.

	Continuous-Integration: Jenkins CI

2015-06-18  Fred Rolland  <frolland@redhat.com>

	resize-lun: Cleanup getDeviceList
	Change parameter name to more appropriate.

	Continuous-Integration: Jenkins CI

	resize-lun: Resize devices in connectStorageServer
	While a host was not connected to a storage server, the underlying
	devices backing up a multipath devices may have been resized.

	To ensure host is synced with the devices state, we refresh storage,
	rescanning devices and resizing them if needed when the host connects to
	a storage server.

	Bug-Url:https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

	resize-lun: Support guids parameter in getDeviceList
	Add optional "guids" parameter to getDeviceList. If specified,
	getDevicesList will get info and test only these devices.

	In the resize LUN flow, we need to rescan and resize the devices before
	resizing the PV. Engine will invoke getDeviceList verb with specific
	LUNs ids.

	In getDeviceList we test PV creation and this is a heavyweight
	operation, using the guids parameter we limit the operation to the
	specified devices.

	Examples:

	    getDeviceList
	        return all devices

	    getDeviceList FCP
	        return only FCP devices

	    getDeviceList ISCSI guid1 guid2
	        return info for guid1 and guid2, assuming ISCSI type

	Bug-Url:https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

	resize-lun: Resize multipath maps in refreshStorage
	In StorageDomainCache, after calling multipath.rescan() we call
	multipath.resize_devices(). This is needed in case that the SCSI devices
	were resized on the storage server.

	It is called from getDeviceList during LUN resize flow, and
	connectStorageServer for the case when the host was not up when the LUN
	was resized.

	Bug-Url:https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

	resize-lun: Add resize map support in multipath
	In a scenario where a LUN has been increased on the storage server, and
	after rescan, the underlying devices are larger then the multipath map.
	We need to resize the multiapth map.

	This patch adds multipath.resize_devices() function that iterates over
	all multipath devices, check the if slave size is bigger then the
	multipath map, and resize the map if needed.

	Since resizing multipath maps requires root privileges, new
	superVdsm.resizeMap() function was added to perform the resize.

	Bug-Url:https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

	resize-lun: Add resizePV verb
	This series of patches add support resizing of a storage domain after
	a LUN was resized on the storage server.

	Main flow - the user initiates LUNs resize

	- Engine will invoke getDeviceList verb on all the hosts, with the
	  specific LUNs guid. getDeviceList will rescan and resize the multipath
	  map if needed.
	- If all the hosts are seeing the same LUN size, resizePV verb will be
	  invoked on the SPM, resizing the PV to the underlying device size.

	Secondary flow - a host recovers from maintenance/down state

	- When a host connects to the storage server, a rescan and resize of
	  multipath devices will be performed. This operation will make sure
	  that the host is synced with the storage server.

	This patch adds the resizePV verb. This verb calls pvresize on a device
	and returns the new PV size. This verb will extend the PV after a LUN
	was resized on the storage server. This is a SPM operation.

	Example outputs:

	    $ vdsClient -s 0 resizePV \
	            d24ebee6-ec30-4270-88a2-a8f38a5a804a \
	            5966cee6-ee28-454c-96bc-e318bed1291a \
	            360014057fac79f7f7dc4c15b29405f4e
	        size = '36104568832'

	    $ vdsClient -s 0 resizePV
	      Error using command: Wrong number of arguments provided, expecting 3
	      (3 required) got 0

	      resizePV
	          <sdUUID> <spUUID> <GUID>
	          Resize PV in Storage Domain - After a block device has been
	          resized in storage server, this method will cause the PV to use
	          the entire size of the block device

	Bug-Url:https://bugzilla.redhat.com/609689
	Continuous-Integration: Jenkins CI

2015-06-17  Allon Mureinik  <amureini@redhat.com>

	hooks: Fix RHEVM references in README file
	Replaced outdated references of rhevm-config to oVirt's engine-config.

	Continuous-Integration: Jenkins CI

2015-06-17  Nir Soffer  <nsoffer@redhat.com>

	spec: Remove duplicate mom requirement
	Commit 851b302be77a (Separate MOM to an external process) updated mom
	requirement so we require the same version when building for rhev or for
	other platforms. This patch removes the now unneeded condition.

	Continuous-Integration: Jenkins CI

2015-06-17  Martin Polednik  <mpolednik@redhat.com>

	virt: log skipped devices
	Since hostdev passthrough doesn't require all of the devices in the
	same iommu group to be assigned to VM but they still have to be
	detached, it might help future debugging to actually log skipped
	devices.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	virt: make SkipIOMMUPlaceholderDevice generic SkipDevice
	If we encounter the need to skip any device in future, the SkipDevice
	exception (in vmdevices.core) can be raised and caught to accomplish
	this in very consistent way.

	Continuous-Integration: Jenkins CI

2015-06-16  Yeela Kaplan  <ykaplan@redhat.com>

	jsonrpc: missing parameters on instantiation of Error
	Continuous-Integration: Jenkins CI

2015-06-16  Ido Barkan  <ibarkan@redhat.com>

	net: tests: testLowerMtuDoesNotOverride leaves a bond behind
	This might fail tests that come after with in hard to understand
	failures.

	Continuous-Integration: Jenkins CI

2015-06-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Vdsm version 4.16 and above does not support cluster level 3.3 and below
	Since Vdsm 4.16 we didn't keep cluster 3.3 and below support. This patch
	makes corrects the report of supported clusters and engine versions.
	oVirt-Engine 3.4 is still supported as tech-preview. For more
	information reach the attached bug.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1229177
	Continuous-Integration: Jenkins CI

2015-06-16  Yeela Kaplan  <ykaplan@redhat.com>

	daemonAdapter: remove traceback when using help option
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1120787
	Continuous-Integration: Jenkins CI

	spec: require kernel version to avoid sudo hanging
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1082638
	Continuous-Integration: Jenkins CI

	migration: raise and except only specific exceptions
	Right now on migration over JsonRpc we swallow
	any RuntimeError, when actually we might need to fail
	the migration.
	To avoid this we will do except clause only for
	very specific JsonRpcErrors.

	Continuous-Integration: Jenkins CI

2015-06-16  Francesco Romani  <fromani@redhat.com>

	virt: sampling: replace flag with Semaphore
	In order to detect stuck sampling calls, the SampleVM
	operation used a simple boolean flag to track if
	the code was running or not.

	However, this may lead to races if an operation unblocks
	just after the flag was set.
	This race is expected to do little harm, but could and should
	be improved anyway.

	To avoid race, we convert the boolean flag to a Semaphore.
	The Semaphore is used as glorified counter, so it should
	always be called with blocking=False.

	Continuous-Integration: Jenkins CI

2015-06-16  Martin Polednik  <mpolednik@redhat.com>

	hostdev: only allow pci devices to be iommu placeholders
	Only PCI uses VFIO driver, and therefore "granular" functionality
	doesn't really relate to USB or other kinds of devices.

	Continuous-Integration: Jenkins CI

2015-06-16  pkliczewski  <piotr.kliczewski@gmail.com>

	config: remove not needed option
	json_port is not used anymore. We do not open second port for jsonrpc
	specific communication. We use protocol detection instead.

	Continuous-Integration: Jenkins CI

2015-06-16  Ido Barkan  <ibarkan@redhat.com>

	shell_helper: print nets removed from libvirt
	Continuous-Integration: Jenkins CI

	net: tests: wrap setupNetworks calls
	This is done to allow the following patch to insert some logic into
	setupNetwork calls and remove self.vdsm_net bolerplate. '_caller' trick
	logic was also altered to support it.

	Continuous-Integration: Jenkins CI

2015-06-16  Yeela Kaplan  <ykaplan@redhat.com>

	jsonrpcvdscli: use subscription when creating a client
	This patch is required to enable the client to work
	with the new subscription and
	broker model that will be used in oVirt 3.6

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112594
	Continuous-Integration: Jenkins CI

2015-06-15  Ala Hino  <ahino@redhat.com>

	storageServer: Simplify subclass mountpoint overriding
	Define DIR constant that can be overriden by subclasses to provide custom
	storage domain directory. For example, GlusterFSConnection defines DIR as
	"glusterSD".

	Continuous-Integration: Jenkins CI

	tests: Add test for mount connection classes
	Add unit tests for MountConnection and GlusterFSConnection classes.

	Continuous-Integration: Jenkins CI

2015-06-15  Nir Soffer  <nsoffer@redhat.com>

	multipath-conf: Add (disabled) overrides section
	Upstream multipath is supporting new "overrides" section, allowing
	overriding certain options in all built-in devices options. Using this
	new section, we can remove the devices entries, and replace them with
	2 entries in the overrides section.

	The new section is currently disabled until this feature is available on
	all supported platforms.

	Comments in the generated multipath configuration will help users to use
	this option if it is already available on their platform.

	For more info see multipath-tools commit 3b40d0d9f39fe (libmultipath:
	add overrides section to multipath.conf).

	Relates-To: https://bugzilla.redhat.com/880738
	Continuous-Integration: Jenkins CI

2015-06-15  pkliczewski  <piotr.kliczewski@gmail.com>

	status: logging status values before sending event
	Continuous-Integration: Jenkins CI

2015-06-15  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Trigger event on guest agent status changes
	Continuous-Integration: Jenkins CI

2015-06-15  Martin Sivak  <msivak@redhat.com>

	Balloon should not work when guest agent is not present
	StatAvg returns 0 when there is no data available. We need to use Stat
	here so we get None and properly fail the condition.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1230208
	Continuous-Integration: Jenkins CI

	Increase MOM intervals between stats and policy evaluation cycles
	This lowers the load on multi-processor machines tremendously as seen
	during tests done by multiple customers and users.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1227714
	Continuous-Integration: Jenkins CI

	Separate MOM to an external process
	MOM won't be started as an internal thread anymore. Its preconfigured
	instance will be started as systemd service instead.

	VDSM will keep communicating with MOM as usual over MOM's RPC interface.
	This also updates setKsmTune to be logged only in TRACE mode to avoid
	log pollution.

	New mom-vdsm service requires VDSM to be Up and uses the config file
	/etc/vdsm/mom.conf. It also exposes its own RPC using unix domain
	socket /var/run/vdsm/mom-vdsm.sock.

	mom-vdsm will be restarted when vdsmd restarts and started when
	vdsmd starts (but errors in mom-vdsm do not propagate to vdsmd).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1227714
	Continuous-Integration: Jenkins CI

	Add support for KSM and CpuTune calls to XMLRPC for MOM to use
	MOM is moving to a separate process, but it still needs to be able
	to perform the same actions regarding KSM and QoS.

	This patch adds the missing pieces to be used before the jsonrpc
	client is ready.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1227714
	Continuous-Integration: Jenkins CI

2015-06-15  Ondřej Svoboda  <osvoboda@redhat.com>

	constants: remove unused EXT_* paths to binaries
	git grep (in the root of the repository) cannot find their use.

	Continuous-Integration: Jenkins CI

2015-06-15  Yeela Kaplan  <ykaplan@redhat.com>

	migration: Use jsonrpc during migration of vms
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112594
	Continuous-Integration: Jenkins CI

2015-06-15  pkliczewski  <piotr.kliczewski@gmail.com>

	virt: adding statusTime in milliseconds
	When sending vm status changes to the engine we can not guarantee the
	ordering. We use monotonic time to determine the order for single host
	and migration flow is solved on the engine side to sort out differences
	between monotomic time on different hosts.

	Continuous-Integration: Jenkins CI

	stomp: outgoing connection to a broker
	In this patch we introduce new config values:
	- broker_enable - it tells vdsm whether to connect to a broker on not.
	                  default value is false.
	- request_queues - contain list of queue names that vdsm should
	                   subscribe to.
	- event_queue - contains a queue name to which events are sent

	When we loose incoming connection we cleanup stomp subscriptions and we
	need to do the same for outgoing connection. It is important to know
	only about valid subscriptions.


	Continuous-Integration: Jenkins CI

2015-06-15  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: refresh lvm devices after brick create
	Issue:
	Brick create function in vdsm gluster module which creates lvm
	devices like pv, vg, thinlv and format the lv and mount it
	using python-blivet. In the brick creation process, the created
	vgs are not visible to lvm vgs command and the lvm devices and
	its details are not available or not listed by devices list
	function.

	Cause:
	On every successful brick creation the thin lv mount details
	will be updated into fstab entry to get the devices mounted
	automatically on reboot.

	Because of this visibility issue with lvm devices, the thin lvs
	which are mounted during brick create process are not getting
	mounted automatically on any number of reboot. The Blocking bug
	filed in https://bugzilla.redhat.com/show_bug.cgi?id=1227788

	Observations:
	This issue is observed in any plain RHEL6.6 or RHEL6.7 node
	with the latest kernel (2.6.32-567.el6.x86_64) and python-
	blivet installed with or without vdsm installed in the node.
	This issue identified in the rhel system where it has the
	default lvm configuration.

	Findings:
	According to LVM2 man page documentation, vgscan should
	take place automatically and the manuel vgscan required only
	when there is any hardware change. The created vg details should
	be updated automatically. But it fails here some how. This shows
	that, this is absolutely an lvm issue. We have to run pvscan
	or vgscan to make lvm see vgs or lvs. Bug for lvm filed in
	https://bugzilla.redhat.com/show_bug.cgi?id=1230495
	However there may be a little chances for blivet could cause
	this issue by passing some causing arguments to lvm. Blivet team
	is working on this to verify this.

	This issue never observed on any reboots or brick creates;
	when we execute a lvm pvs command or vgscan command at-least
	once afer any first brick create.

	Fix:
	This patch refresh lvm devices after brick create
	by running vgscan. This is a workaround patch and this
	will be removed once the lvm bz#1230495 is fixed.

	Kindly refer the bugs for any further details or logs.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1227742
	Bug-Url: https://bugzilla.redhat.com/1227788
	Continuous-Integration: Jenkins CI

2015-06-15  Bala.FA  <barumuga@redhat.com>

	gluster: add xfsprogs as dependency to gluster sub-package
	As glusterBrickCreate verb uses xfs filesystem as default, this patch
	add xfsprogs package as dependency.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1231210
	Continuous-Integration: Jenkins CI

2015-06-14  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: fix vg create failed first time during brick create
	Currently brick create uses vdsm lvm module for pv create and
	blivet to create a vg. This issue not occured if both pv and vg
	are created using blivet itself.
	But unfortunately blivet has few issues while creating a vg.
	Its able to create a vg with a pesize of minimum 1mb only.
	Also the vdsm lvm module has some issue while creating a vg.
	So this path uses lvm vgcreate command to create the vg
	as a workaround.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1226186
	Continuous-Integration: Jenkins CI

2015-06-14  Yeela Kaplan  <ykaplan@redhat.com>

	jsonrpcvdscli: create a client for vdsm with jsonrpc
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112594
	Continuous-Integration: Jenkins CI

	stomp: add an option to create a stomp client
	Continuous-Integration: Jenkins CI

	sslutils: move createSSLContext from clientIF
	This can no longer be a private method, since we
	need it for creating an ssl context on vm migration.
	and it should be a part of vdsm's interface.

	Continuous-Integration: Jenkins CI

2015-06-13  Yeela Kaplan  <ykaplan@redhat.com>

	jsonrpc: add a default timeout for client call
	Continuous-Integration: Jenkins CI

	utils: add a utility to create a connected socket
	Needed for use both in jsonrpc unit tests
	and jsonrpc migration

	Continuous-Integration: Jenkins CI

2015-06-13  Darshan N  <dnarayan@redhat.com>

	gluster: verbs to override/reset cli snapshot scheduling.
	This patch adds two verbs to override/reset gluster cli
	based snapshot scheduling. The verbs are as follows:

	*snapshotScheduleOverride: This verb sets the snapshot
	scheduling flag in meta-volume to ovirt, this means
	the snapshot scheduling job will be taken care by
	engine and the gluster won't be able to schedule
	snapshots. This has optional argument force. With
	force option, any existing gluster schedules will
	be disabled.

	*snapshotScheduleReset: This verb sets the snapshot
	scheduling flag in meta-volume to none, this means
	the snapshot scheduling job will no longer be taken
	care by engine.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1230342
	Continuous-Integration: Jenkins CI

2015-06-13  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: handle partition table corruption error
	Currently vdsm throws an exception if there is any corruption
	in the partitition entry of any device and returns an error
	for devices list and create brick. This path fixes this issue
	by just loggin the issue and continue with remaining devices.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1227781
	Continuous-Integration: Jenkins CI

2015-06-12  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add support for usb devices
	In order to support USB passthrough, we only have to pass usb hostdev
	compilant XML. Detaching and reattaching is not needed, and was
	implemented before due to documentation bug in libvirt.

	Continuous-Integration: Jenkins CI

2015-06-12  Adam Litke  <alitke@redhat.com>

	tests: Fix writing of logBlkSize property
	This recent patch[1] changed FakeBlockStorageDomain so that we would not
	attempt to write to readonly properties in the StorageDomain class.
	This patch extends that logic to also cover the logBlkSize property

	[1] https://gerrit.ovirt.org/#/c/42006/

	Continuous-Integration: Jenkins CI

2015-06-12  Dan Kenigsberg  <danken@redhat.com>

	hooks: noipspoof: allow multiple interfaces
	In this patch, the specified IPs are set on all interfaces. Note that
	this simplistic approach lets one interface spoof the IP of another.

	Continuous-Integration: Jenkins CI

2015-06-12  Darshan N  <dnarayan@redhat.com>

	gluster: Added an optional argument to mountBrokerSetup verb
	Added an optional argument called "partial" to mountBrokerSetup
	verb. This argument takes boolean value. If true only mount broker
	root creation is done as part of mountBrokerSetup, else along with
	root creation user addition and few mount broker options are also
	set.
	This is introduced because in only one of the slave node's all the
	operations mentioned above has to be done, this is synced to all
	the remaining nodes automatically. Only mount broker root creation
	has to be performed on all the slave nodes. Engine can call this
	verb with partial as false on one of the nodes and on all the other
	nodes verb can be called with partial set to true.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1220345
	Continuous-Integration: Jenkins CI

2015-06-12  Dan Kenigsberg  <danken@redhat.com>

	hooks: noipspoof: improve docstring
	The property's regexp must include the comma characters.

	Users should be reminded not to override their existing
	UserDefinedVMProperties.

	Continuous-Integration: Jenkins CI

2015-06-12  pkliczewski  <piotr.kliczewski@gmail.com>

	events: vm status notifications
	Whenever vm changes status we send notification to an engine with vmid
	and new status.

	Continuous-Integration: Jenkins CI

2015-06-12  Ondřej Svoboda  <osvoboda@redhat.com>

	configurators: remove duplicated 'from __future__ import absolute_import'
	Continuous-Integration: Jenkins CI

2015-06-12  Omer Frenkel  <ofrenkel@redhat.com>

	virt: memory hotplug for vm
	Introduces a new verb to hotplug memory to a running vm.
	the memory is plugged to a guest NUMA node.
	exposes it in the XML-RPC and JSON-RPC.

	http://www.ovirt.org/Features/Memory_Hotplug

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1224886
	Continuous-Integration: Jenkins CI

2015-06-11  Nir Soffer  <nsoffer@redhat.com>

	ceph: Add libvirt secret testing infrastructure
	New vmfakelib.Error function create a libvirt.libvirtError with specific
	error code, for testing code that must handle certain libvirt errors.

	vmfakelib.Connection supports now secret related methods:

	- secretDefineXML
	- secretLookupByUUIDString

	New vmfakelibTests module added to verify that the fakes are behaving
	like the real libvirt objects.

	Continuous-Integration: Jenkins CI

	ceph: Support authentication using libvirt secrets
	When using network disk and Libvirt secrets, for example cephx
	authentication, engine will send a new "auth" property, with the
	authentication information:

	    "auth": {"type": "ceph",
	             "uuid": "abcdef",
	             "username": "cinder"}

	Drive xml will have a "auth" element specifying the underlying Libvirt
	secret for authenticating with the remote server:

	    <auth username="cinder">
	        <secret type="ceph" uuid="abcdef"/>
	    </auth>

	A Libvirt secret using the provided uuid must be registered with Libvirt
	before starting the vm. This will be handled in the next patches.

	Continuous-Integration: Jenkins CI

2015-06-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix file list exception
	Continuous-Integration: Jenkins CI

2015-06-11  Dan Kenigsberg  <danken@redhat.com>

	force absolute imports where we can
	Implicit relative imports are confusing, as explained in
	https://www.python.org/dev/peps/pep-0328/. They have been dropped from
	Python 3, too.

	Unfortunately, we still use them extensively, but our lib and
	vdsm/network directories are almost free of them. This patch drops a
	single occurrence and makes sure that we do not happen to add new
	implicit relative imports by mistake under thess directories. Future
	patches would extend the white list until Vdsm is free of them.

	Continuous-Integration: Jenkins CI

2015-06-11  Nir Soffer  <nsoffer@redhat.com>

	ceph: Support hotunplug of network disks
	Vm._findDriveByUUIDs() was not considering network drives, failing with
	LookupError. Now we use drive diskType if available to find network
	drives.

	Continuous-Integration: Jenkins CI

	ceph: Validate network disk parameters
	If hosts or protocol are missing, raise ValueError during getXML
	validation. This is little nicer to debug then KeyError when value was
	not set, and avoid creation of invalid xml when specified value is
	empty.

	Continuous-Integration: Jenkins CI

	ceph: Initial support for network disk
	The previous code supported network disk by abusing Drive.volumeInfo
	dict to send network drive parameters. Instead, we are using the new
	diskType attribute, and adding network disk related attributes. This is
	more consistent with other types of disks.

	Example conf for network disk:

	    {
	        'diskType': 'network',
	        'hosts': [
	             {'name': '1.2.1.1', 'port': '6789', 'transport': 'tcp'},
	             {'name': '1.2.2.1', 'port': '6789', 'transport': 'tcp'},
	         ],
	         'path': 'poolname/volumename',
	         'protocol': 'rbd',
	         ...
	    }

	Continuous-Integration: Jenkins CI

	ceph: Require ceph-common package
	For running vms using ceph disks, we need librbd1 library, dynamically
	loaded by qemu when using network disk using the rbd protocol.

	In the next version, when we will implement ceph storage domain
	monitoring and operations on ceph disks, we will need also python-rados
	and python-rbd packages and rbd and rados command line tools.

	For debugging and support, we probably need the ceph command line tool.

	All these goodies are provided by the ceph-common package, so we prefer
	to have them installed.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-11  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix device verification with optional specParams
	specParams in hostdev are optional, and therefore we have to make sure
	not to access it when it's not set.

	Continuous-Integration: Jenkins CI

2015-06-11  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: subscription cleanup when connection lost
	When we loose network connection we need to cleanup all the subscription
	that are assosiated with it.

	Continuous-Integration: Jenkins CI

2015-06-11  Martin Polednik  <mpolednik@redhat.com>

	hostdev: improve iommu check
	For passthrough, we need to make sure that the system supports
	DMA remapping and has correctly grouped devices to IOMMU groups.
	Although more restrictive, it is safer to check both dmar and iommu
	groups.

	IOMMU group(s) existence can be determined by reading
	/sys/kernel/iommu_groups. This patch only extends the original
	remapping check to also consider iommu_groups.

	Continuous-Integration: Jenkins CI

2015-06-11  Ido Barkan  <ibarkan@redhat.com>

	Move _stpBooleanize to netinfo.
	And rename it. It will be used in the following patched from
	netconfpersistence.py

	Continuous-Integration: Jenkins CI

	net: missing Exception formatting value
	Continuous-Integration: Jenkins CI

	net: tests: also add line number in test that called setupNetworks
	This is useful when there is a need to analyze logs from tests with
	multiple setupNetworks calls.

	Continuous-Integration: Jenkins CI

2015-06-10  Martin Polednik  <mpolednik@redhat.com>

	tests: add way to easily mock host devices
	Currently, trying to use host device in unit test will result in an
	explotion (for good reason - we want to avoid touching the real
	hardware).

	This patch replaces host device's access to libvirt with access to
	file that specified the XML of the device.

	Continuous-Integration: Jenkins CI

	virt: allow a single dev from IOMMU group to be passed through
	This patch introduces new spec param for hostdev, indicating that the
	device should not be passed to host, but only detached and reattached.

	When assigning host device, engine still needs to send the whole group
	in vmCreate command, but devices that should not be present need to
	have this tag set.

	Continuous-Integration: Jenkins CI

2015-06-10  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: events
	Infrastructure which allows to send events.

	Stomp server is no longer responsible for managing connections and all
	the connection life cycle are done in _StompConnection.

	Continuous-Integration: Jenkins CI

2015-06-10  Federico Simoncelli  <fsimonce@redhat.com>

	gluster: fix volume name parsing in getVmVolumeInfo
	It is permitted to use slashes '/' in gluster mount strings even
	though they're prohibited in the volume name.
	In order to recognize and strip them out we should use getRealPath
	instead of getRemotePath that translates slashes into permitted
	underscores.

	It is now allowed to mount gluster volumes with slashes (serv:/volume)
	and correctly identifying the volume name and its information.

	Continuous-Integration: Jenkins CI

2015-06-10  Dudi  <dudi@redhat.com>

	vdsm: implement NUMA aware KSM policy
	Add monitored parameter ksm_merge_across_nodes to:
	1. momIf.py class - append to status report
	2. superVdsmServer file - enable writing to the kernel flag

	Update policy logic (a simple state machine) to 03-ksm.policy
	merge_across_nodes flag allowed to be changed only after unmerging
	all pages. This unmerge completion is tested on pages_shared flag == 0.

	Update policy parameter ksmMergeAcrossNodes to 00-defines.policy

	Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=840114
	Continuous-Integration: Jenkins CI

2015-06-09  Martin Polednik  <mpolednik@redhat.com>

	caps: workaround for libvirt's canonical name in machine types
	Libvirt is supposed to return the machine type as 'text' attribute of the
	XML. For the default machine type there is an alias in the "canonical"
	attribute. Still each machine type is a separate <machine> tag.
	In EL7 there is a regression in libvirt that the proper machine type's
	name is not reported, only the "canonical" alias is - as part of the
	default machine type entry.

	This patch is workaround so we don't miss the latest machine type
	and can be dropped once libvirt is fixed (bug 1229666).

	Bug-Url: https://bugzilla.redhat.com/1229396
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-09  Francesco Romani  <fromani@redhat.com>

	tests: console: tests for cleanup() and prepare()
	Add unit tests for the newly added cleanup()
	and prepare() methods of VM Console Device.

	Continuous-Integration: Jenkins CI

2015-06-09  Shahar Havivi  <shaharh@redhat.com>

	Report downtime for each live migration
	Libvirt reports how much time the VM was off-line via jobStats.
	We fetch the "downtime" key which returns the correct time,
	but the source and dest hosts need to be in sync.

	"downtime_net" key returns the similar results, but the hosts
	do not need to be in sync.

	See http://libvirt.org/html/libvirt-libvirt-domain.html#VIR_DOMAIN_JOB_DOWNTIME_NET
	and http://libvirt.org/html/libvirt-libvirt-domain.html#VIR_DOMAIN_JOB_DOWNTIME
	for the difference between the two.

	This patch change the call from downtime to downtime_net.

	Bug-Url: https://bugzilla.redhat.com/970711
	Continuous-Integration: Jenkins CI

2015-06-09  Ido Barkan  <ibarkan@redhat.com>

	network: wait for udev after configuring SRIOV
	After changing the number of virtual functions on an SRIOV device
	udev asynchronously adds them and then renames them from 'eth0'
	according to it's naming policy. Since that process is asynchronous
	and might take time, we have to wait for it to finish since
	subsequent reporting of hardware by vdsm must return a stable state.

	Continuous-Integration: Jenkins CI

	network: persist sriov devices number of vfs
	vdsm-restore-net-config will attempt to restore the number of vfs
	from the last successful change. This is done before network
	restoration so that networks can be configured based on the
	restored vfs.

	Continuous-Integration: Jenkins CI

2015-06-08  Ido Barkan  <ibarkan@redhat.com>

	net: bondingOptions should not be a part of runningConfig networks
	Since all attributes of _addNetwork are copied as a flat dictionary
	to running Config during _alterRunningConfig decorator,
	bondingOptions mistakenly found their way into runningConfig, and
	then into PersisstentConfig, as if they were part of the network
	attributes dictionary during the call.

	Continuous-Integration: Jenkins CI

2015-06-08  Francesco Romani  <fromani@redhat.com>

	vm: remove dup initialization of Vm._guestSockFile
	In Vm class' __init__, guestSockFile is initialized,
	and the re-initialized a few lines below with no use
	of this field in between.

	To reduce the confusion, this patch removes the first
	useless initialization.

	Continuous-Integration: Jenkins CI

	tests: bootstrap socket-related tests
	Add very first bits of socket handling tests.

	Continuous-Integration: Jenkins CI

	virt: move Vm._guestSockCleanup() into utils
	The Vm._guestSockCleanup() is a static method,
	but could be trivally made a function to remove
	code duplication and noise from vm.py

	Continuous-Integration: Jenkins CI

	virt: bind console to unix domain socket
	To support the serial console feature,

	http://www.ovirt.org/Features/Serial_Console

	VDSM needs to bind the guest console to
	an unix domain socket, to make possible
	for the ovirt-vmconsole package to reach it.

	Caveat Emptor:
	The unix domain socket directory must have the following
	permissions, ownership and SELinux attributes:

	/var/run/ovirt-vmconsole-console/
	drwxrwxr-x. vdsm qemu system_u:object_r:qemu_var_run_t:s0

	Bug-Url: https://bugzilla.redhat.com/1223671
	Continuous-Integration: Jenkins CI

	serial console: add code to prepare the path
	Add support for vmconsole path preparation.
	Ensures that the unix domain socket directory
	needed by ovirt-vmconsole integration exists and has
	the following permissions, ownership and SELinux attributes:

	/var/run/ovirt-vmconsole-console/ drwxrwxr-x. vdsm qemu system_u:object_r:qemu_var_run_t:s0

	Since /var/run is supposed to be on tmpfs, this is enforced at every startup.

	Bug-Url: https://bugzilla.redhat.com/1223671
	Continuous-Integration: Jenkins CI

	tests: rename HostStatsThread tests
	HostStatsThread -> HostStatsThreadTests
	for consistency.

	Continuous-Integration: Jenkins CI

2015-06-08  Nir Soffer  <nsoffer@redhat.com>

	tests: Do not assume that storage domain properties are writable
	We plan to make storage domain properties readonly as part of sdm
	refactoring. In fileSDTests and volumeTests we assumed that subclassing
	StorageDomain and setting self.sdUUID and self.mountpoint is possible,
	but this assumption is wrong, since the super class can change the
	implementation.

	Now we use properties on the testing subclass, so it works even if the
	super class made the properties readonly.

	Continuous-Integration: Jenkins CI

2015-06-08  Petr Horáček  <phoracek@redhat.com>

	netlink: make relative imports PY3 compatible
	Continuous-Integration: Jenkins CI

2015-06-08  Martin Polednik  <mpolednik@redhat.com>

	ppc64le: Fix CPU map parsing
	There is inconsistency in the platform naming: ppc64 in cpumap is used
	for both ppc64 and ppc64le platform. This patch fixes the caps logic, returning
	correct model in cpuFlags.

	This is similar to the existing x86/x86_64 workaround.

	Continuous-Integration: Jenkins CI

2015-06-08  Yeela Kaplan  <ykaplan@redhat.com>

	vdscliTests: add a test for connect with a timeout
	Continuous-Integration: Jenkins CI

	vdscli: add a timeout option for plaintext connections
	Continuous-Integration: Jenkins CI

2015-06-08  mmirecki  <mmirecki@redhat.com>

	caps: replacing minidom with ElementTree in caps.py
	minidom is replaced by ElementTree.py in caps.py. This is because ET is
	faster, has a nicer and better documented API, and we want
	to elinate using two similar libs in the code

	Continuous-Integration: Jenkins CI

2015-06-07  Dan Kenigsberg  <danken@redhat.com>

	net tests: add netUnifiedPersistenceTests.py to Makefiles
	commit 43e92359 added a new test, but did not include proper
	installation thereof.

	Continuous-Integration: Jenkins CI

2015-06-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	All modules configure should run on upgrade
	Currently we run only libvirt and multipath configure. The bugs raises
	when we add those calls to newer vdsm  version, and on upgrade the %postun
	script of the updated version is ran.

	For example, adding the new multipath configure in 3.6 won't persist on upgrade
	from 3.5 because the configure call does not exist in 3.5.

	With this patch from 3.6 and above we won't need
	to worry about other modules - all configurators will run on upgrade.

	Continuous-Integration: Jenkins CI

2015-06-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	spec: Remove --enable-chwon-hack option
	This option was used to enable the chown hack on EL7 and Fedora, and
	disable it on EL6. Since we do not support EL6, we can git rid of this
	configuration option.

	The lvm rules are always using the chwon hack now.

	Continuous-Integration: Jenkins CI

2015-06-05  Nir Soffer  <nsoffer@redhat.com>

	lvm: Always use chown hack
	Since we do not support EL6, we must always use the chown hack. This
	patch allow removing of the configure --enable-chown-hack option.

	Continuous-Integration: Jenkins CI

	lvm: Remove duplication in udev rules
	The horrible uuid pattern was repeated 5 times, making the source
	unreadable.  Now we build the udev patterns once, and use the built
	patterns to format the final output.

	Continuous-Integration: Jenkins CI

	lvm: Cleanup lvm udev rules
	Make the vdsm lvm rules suck less:

	- Check the vg name once, instead repeating the uuid pattern
	- Group rules with same settings (e.g, sanlock rules)
	- Document each group of rules
	- Remove irrelevant documentation, copied from dm-lvm.rules

	Releates-To: https://bugzilla.redhat.com/1149883
	Continuous-Integration: Jenkins CI

2015-06-05  Omer Frenkel  <ofrenkel@redhat.com>

	virt: add support for specifying vm maximum memory
	Added new parameter 'maxMemSize' to VM
	this parameter is sent from engine backend and passed to libvirt xml
	with the mandatory 'slots' attribute.

	this parameter is mandatory for memory hotplug.
	if this parameter is not passed, then it is not set in the libvirt xml,
	and hotplug for this vm will not work.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1224886
	Continuous-Integration: Jenkins CI

2015-06-04  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: calling super explicitly
	We call super explicitly and call __init__ which is godd practice. We
	keep a frame which can be inspected when handling this error.

	Continuous-Integration: Jenkins CI

	stomp: allow single stomp reactor
	We could use several instances of stompReactor to create stomp client or
	listener. Thanks to client and server side subscription implementation
	we can use single instance.

	Continuous-Integration: Jenkins CI

2015-06-04  pkliczew  <piotr.kliczewski@gmail.com>

	stompreactor: fix naming of default destination
	Continuous-Integration: Jenkins CI

2015-06-04  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: server side subscriptions
	Vdsm gains abitlity to manage subsctiptions and act as mini broker.
	We change model from connection centric to subscription centric.
	Following use cases are covered by this change:
	- clients can subscribe and exchange messages without executing vdsm API
	- legacy (3.5) client can interact with vdsm and messages will be
	  delivered to legacy response queue
	- a client can define to which queue/topic will reply by using REPLY-TO
	  header

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-04  Martin Polednik  <mpolednik@redhat.com>

	hostdev: destroy VM with hostdev even without IOMMU support
	Such VM can occur if it is started via vdsClient. Any attempt to
	destroy that VM would fail with exception without destroying the VM,
	therefore leaving it hanging in vdsm. This patch logs if reattach of
	hostdev without valid IOMMU configuration occurs and allows destroy to
	finish.

	Continuous-Integration: Jenkins CI

	hostdev: raise more meaningful exception without iommu support
	No VM with hostdev should ever be started without IOMMU. If it is
	started however, we want to inform the user with a bit more meaninful
	message that just the KeyError.

	Continuous-Integration: Jenkins CI

2015-06-04  Francesco Romani  <fromani@redhat.com>

	packaging: ship v2v.py in debian packages
	Fixes the lack of inclusion of vdsm/v2v.py
	in debian packages.

	Continuous-Integration: Jenkins CI

2015-06-04  Nir Soffer  <nsoffer@redhat.com>

	multipath: Simplify configuration data
	The configuration was using tuple of strings, instead of triple-quoted
	string. This made the configuration hard to read and painful to modify.

	Continuous-Integration: Jenkins CI

2015-06-03  pkliczew  <piotr.kliczewski@gmail.com>

	jsonrpc: remove not needed param
	Continuous-Integration: Jenkins CI

2015-06-03  pkliczewski  <piotr.kliczewski@gmail.com>

	reactor: move creation to clientIF
	It is final step performed in several patches to have single class
	responsible for processing i/o loop. Overall goal in number of changes
	was to simplify the code and have single responsibility per class. It
	was not the case with Protocoldetector and StompReactor before.

	Continuous-Integration: Jenkins CI

2015-06-03  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: client side subscription
	In this patch we introduce concept of subscription for client
	perspective. We move queuing functionality out of AsyncDispatcher to
	frame_handler. New StompRpcClient class is responsible for sending
	subscriptions and ClientRpcTransportAdapter class adds 'reply-to' header
	using subscriptions id.

	Continuous-Integration: Jenkins CI

2015-06-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	chmod for spmprotect.sh script is not needed and expose an error
	Without running make in storage/protect folder the spmprotect.sh won't
	appear while running configure and this raise an error.
	This chmod is not required - installing the file under
	/usr/libexec/vdsm/spmprotect.sh make it executable automatically.

	Continuous-Integration: Jenkins CI

2015-06-03  Douglas Schilling Landgraf  <dougsland@redhat.com>

	register: Add spec requirement for python-requests
	Register verb requires requests library. This patch
	also adjust the import order for non standard library in the verb.

	Continuous-Integration: Jenkins CI

2015-06-03  Federico Simoncelli  <fsimonce@redhat.com>

	utils: add command execution logging helpers
	Now that we're moving to a more wide use of CPopen in the code we
	still need consistent logging of command line executions.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-02  Ondřej Svoboda  <osvoboda@redhat.com>

	sourceroute: don't fail to remove a dynamic source route
	There is a known race when removing source routing on ifdown where the device
	going down was configured using ifcfg configurator (initscripts) and DHCP.

	Routes are removed on ifdown by dhclient (as stated in dhclient-script(8),
	HOOKS section) or the kernel, as ifdown-routes, a part of initscripts, claims:

	  The routes are actually dropped just by setting the link down, so nothing
	  needs to be done

	At the same time, VDSM's dhclient-script hook (sourceRoute.sh) is called by
	ifdown-eth with reason=STOP and triggers removal of source routing in VDSM's
	sourceRoute thread. The thread then tries to remove routes and routing rules,
	but is prone to failure if the routes are already removed as described above.

	Even though it was tested that in this particular use case (removing source
	routing on ifdown) it was not necessary for VDSM to try to remove routes
	itself, the behaviour of other parts of the stack is not guaranteed forever.

	iproute2 configurator, called by sourceRoute thread, now ignores the error
	message saying the route was already gone:

	  RTNETLINK answers: No such process

	Previously this error would prevent the removal of routing rules, which would
	persist on the system after ifdown. testSetupNetworksAddDelDhcp now passes
	in all cases.

	Continuous-Integration: Jenkins CI

	veth: replace veth.create with a context manager (from networkTests)
	The context manager creates and later destroys a veth pair, since both
	actions are tied together (as can be seen in netinfoTests, where
	veth.pair is now employed).

	There is hope (an existing patch) to teach the context manager to
	prevent NetworkManager from taking control of network devices used
	in tests.

	Continuous-Integration: Jenkins CI

2015-06-01  Nir Soffer  <nsoffer@redhat.com>

	vm: Add _findDriveConfigByName() helper
	The new helper eliminates duplicate code looking up drive configuration
	dict in Vm.conf in 4 methods.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-06-01  Ondřej Svoboda  <osvoboda@redhat.com>

	dummy: move dummy_if from samplingTests as dummy.device, use in netinfoTests
	Continuous-Integration: Jenkins CI

2015-06-01  Dan Kenigsberg  <danken@redhat.com>

	net: bonding: validate options based on pre-dumped ones
	The removed code created a bond device only to check if the provided
	options are recongnized by the kernel. This was buggy, as the options
	depends on the bonding mode. It was also redundant, as we already depend
	on pre-dumped maps of bond options per bond mode, so we can (and should)
	use it here, too.

	Continuous-Integration: Jenkins CI

2015-05-31  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Remove unused dom property from DomainDescriptor
	The 'dom' property of the DomainDescriptor class is no longer used.
	This patch removes this to ensure proper encapsulation.

	Continuous-Integration: Jenkins CI

2015-05-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	clean 'BuildArch: noarch' which is not required after fa8397a
	Continuous-Integration: Jenkins CI

	Remove requirements from spec which depends on specific platform
	Those requirements are now hidden in safelease package which vdsm requires.
	This removal allows to remove arch dependency which introduced in
	https://gerrit.ovirt.org/40738

	Continuous-Integration: Jenkins CI

2015-05-31  Ján Tomko  <jtomko@redhat.com>

	virt: cleanup: fix link to libvirt docs
	The API reference on the libvirt website was split into multiple
	pages in October:
	http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=67c08fcc

	Continuous-Integration: Jenkins CI

2015-05-31  Dan Kenigsberg  <danken@redhat.com>

	vmfex_dev: unbreak migration
	On migration destination, the hook should not attempt to modify the
	domxml, as the latter has been modified on the source already.
	The migration script should only prepare the "direct-pool" network, if
	it has not been prepared yet.

	Bug-Url: https://bugzilla.redhat.com/1224601
	Continuous-Integration: Jenkins CI

2015-05-31  Ondřej Svoboda  <osvoboda@redhat.com>

	firewall: move the context manager from networkTests to the module
	Continuous-Integration: Jenkins CI

2015-05-30  pkliczewski  <piotr.kliczewski@gmail.com>

	detector: close acceptor when stopping detection
	When closing MultiProtocolAcceptor we need to close dispatcher responsible
	for managing vdsm listening socket.


	Continuous-Integration: Jenkins CI

2015-05-30  Shahar Havivi  <shaharh@redhat.com>

	v2v: Add allocation type for disk conversion
	virt-v2v enable to choose disk allocation for the target disk (sparse,
	preallocate)

	Continuous-Integration: Jenkins CI

	v2v: add format for disk conversion
	Continuous-Integration: Jenkins CI

2015-05-30  Francesco Romani  <fromani@redhat.com>

	lib: pthread: allow to set system thread names
	Python allow to set user-friendly names for threads,
	but the given thread name will be visible only at python level,
	not at system level.
	The lack of thread names make hard to follow the resource
	consumption using system tools (htop, top, ps).

	This feature was requested for python library, but rejected:
	http://bugs.python.org/issue15500

	VDSM makes large use of threads until upcoming 4.17, and even
	in 4.17 there is still a fair amount of threads.

	This patch adds additional facilities to set the thread name at
	system level, to improve troubleshooting and performance analysis.

	Bug-Url: https://bugzilla.redhat.com/1141422
	Continuous-Integration: Jenkins CI

2015-05-29  Francesco Romani  <fromani@redhat.com>

	tests: sampling: more careful elapsedTime check
	When checking HostMonitor.get() with empty samples
	on a slow host, it is possible that elapsedTime will be
	very low but not zero, thus breaking the test with
	a false negative.

	To fix that, we fake time.time.

	Continuous-Integration: Jenkins CI

2015-05-29  Simone Tiraboschi  <stirabos@redhat.com>

	vdsm: hook for booting from an ISO image gathered via https
	Let the VM boot from an ISO image made available via an https URL without
	the need to import the ISO into an ISO storage domain.
	Plain http is not supported.
	syntax: httpsisoboot=http://server/path/to/disk.iso

	Bug-Url: https://bugzilla.redhat.com/917026
	Continuous-Integration: Jenkins CI

2015-05-29  Yeela Kaplan  <ykaplan@redhat.com>

	migration: Support SPICE seamless migration over NAT
	Continuous-Integration: Jenkins CI

2015-05-29  Shmuel Melamud  <smelamud@redhat.com>

	vm: Detect smartcard device by type
	Use 'type' instead of 'device' to detect smartcard devices. For
	consistency, devices that don't really use 'device' attribute must be
	detected by 'type'.

	Continuous-Integration: Jenkins CI

2015-05-29  Ondřej Svoboda  <osvoboda@redhat.com>

	tests: make assertSourceRoutingConfiguration more readable
	Continuous-Integration: Jenkins CI

2015-05-29  Dan Kenigsberg  <danken@redhat.com>

	drop vds_bootstrap
	ovirt-engine-3.0 needed vds_bootstrap.rpm in order to install new hosts.
	Now that we no longer support engine < 3.3, we can drop this old code.

	Continuous-Integration: Jenkins CI

2015-05-28  Ondřej Svoboda  <osvoboda@redhat.com>

	dhclient: use the same modern names for leases as initscripts do
	This affects iproute2 and pyroute2 configurators which run their own
	dhclients directly.

	Functional tests failed with both configurators because DHCPv4 lease files
	were never deleted as they contained a superfluous '4' in the name, which
	initscripts never had.

	(I added the 4s long before we realized we need to delete leases created
	by tests – so there would be no misdetection of DHCPv4/6 based on leases
	left behind by previous runs of the same test).

	Continuous-Integration: Jenkins CI

	models, configurators: replace the internal 'async' flag with blockingdhcp
	DHCP is queried asynchronously in usual situations so it is better to use
	'blockingdhcp' which is a flag that signals some exceptional flow
	(network restoration, for example).

	blockingdhcp is also a part of the API so now there is direct correspondence
	between network configurators' code and the API.

	Continuous-Integration: Jenkins CI

	ifcfg: extract a helper function (_exec_ifup) from _ifup
	Originally, ifup contained the helper function and was able to run it
	directly or in a thread (asynchronously, to avoid waiting on DHCP).

	In order to be able to remove NetDevice's "async" (asynchronous_dhcp)
	property, which (mostly) duplicates the blockingdhcp flag (which is
	exposed as a part of VDSM's API) the descendant functions are now used
	as follows:

	  _exec_ifup is called when "async" was not used and

	  _ifup now requires the "async" flag as a transitional step
	  (it will be able to extract both a network device name and
	   the flag from a NetDevice instance, as other configurators do)

	Continuous-Integration: Jenkins CI

2015-05-28  Allon Mureinik  <amureini@redhat.com>

	vm.py: Fix spelling mistake
	"Accomodate", while a common mistake, is still a mistake [1].

	[1] https://en.wiktionary.org/wiki/accomodate

	Continuous-Integration: Jenkins CI

2015-05-27  Ondřej Svoboda  <osvoboda@redhat.com>

	tests: also delete a legacy lease file if it exists
	At least on Fedora 21 and EL7 initscripts support two locations for dhclient
	lease files:

	/var/lib/dhclient/dhclient$ver-${DEVICE}.leases
	  if it is found to exist (maybe created accidentally by NetworkManager?)
	/var/lib/dhclient/dhclient$ver-${UUID}-${DEVICE}.lease
	  if the former did not exist (UUID is usually blank)

	If we do not account for the legacy location testSetupNetworksAddDelDhcp
	(bridged, DHCPv4 only) is going to fail because there is a leftover
	DHCPv6 lease from the previous run of itself (bridged, both DHCPs).

	Continuous-Integration: Jenkins CI

2015-05-27  Ido Barkan  <ibarkan@redhat.com>

	network: support PCI passthrough of SR-IOV network interfaces.
	This implementation uses the SR-IOV supporting libvirt API only
	when engine is passing a MAC address for the interface. Otherwise,
	vdsm defaults to the standard host device API.
	Only SR-IOV (Single Root I/O Virtualization) virtual function (VF)
	network devices can be assigned in this manner.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-26  Federico Simoncelli  <fsimonce@redhat.com>

	task: add the support for abort_callback
	This patch adds the support for defining a callback used to
	abort a long running task, e.g.:

	    long_operation = MyLongOperation()

	    def abort_long_operation():
	        long_operation.terminate()

	    # abort_callback registers the callback for the time
	    # of execution of the code block
	    with vars.task.abort_callback(abort_long_operation):
		long_operation.execute()

	When another thread (e.g. an external xml-rpc request) tries
	to abort the task (calling "stop"), the registered callbacks
	will be called.

	This patch defines the basic infrastructure to register abort
	functions for long running operations, the technology used to
	actually implement the interruption is left to the user.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-26  mmirecki  <mmirecki@redhat.com>

	caps: tests: add (more) unittests for caps.py
	minidom will be replaced by ElementTree in caps.py
	capsTests.py does not cover all the code which will need to be changed,
	so unit tests are added before the changes are made

	Continuous-Integration: Jenkins CI

2015-05-26  Amador Pahim  <apahim@redhat.com>

	Configure libvirt to generate VM's core dumps
	On RHEL 7, with default libvirt configuration, no VM core dump is generated
	after kill the qemu process.

	This patch is adding the required configuration to libvirt's systemd.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1220993
	Continuous-Integration: Jenkins CI

2015-05-26  Shahar Havivi  <shaharh@redhat.com>

	v2v: Job related actions
	Added few job related actions:
	Delete job
	Abort Job
	Get ovf (jobs output)

	Continuous-Integration: Jenkins CI

	schema: fix getMigrationStatus return value
	getMigrationStatus didn't return its return value via the API/schema

	Continuous-Integration: Jenkins CI

2015-05-26  Francesco Romani  <fromani@redhat.com>

	tests: negative tests for updateDevice - graphics
	Failures are more cumbersome to tests, due to need
	to inject errors or to cause them.
	Add tests for Vm.updateDevice for Graphics devices,
	to do basic sanity tests, and to help verification of
	the upcoming response.error() transition patches.

	Continuous-Integration: Jenkins CI

2015-05-25  Nir Soffer  <nsoffer@redhat.com>

	tests: Hide errors when testing noisy code
	configurator.remove_config try to remove all configurations even if some
	configurators fail, so it writes errors to stderr and continue. This
	behavior makes sense, but breaks tests progress display:

	    test_remove_config                                          can't remove configuration of module a
	Traceback (most recent call last):
	  File "/home/nsoffer/src/vdsm/lib/vdsm/tool/configurator.py", line 236, in remove_config
	    _removeConf(c)
	  File "/home/nsoffer/src/vdsm/lib/vdsm/tool/configurator.py", line 120, in _removeConf
	    getattr(module, 'removeConf', lambda: None)()
	  File "/home/nsoffer/src/vdsm/tests/toolTests.py", line 75, in removeConf
	    raise Exception('mock invalid remove conf')
	Exception: mock invalid remove conf
	OK

	Now we redirect stderr to stdout during this test, so the output is more
	pleasing:

	    test_remove_config                                          OK

	Continuous-Integration: Jenkins CI

2015-05-25  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster:fix NoneType error for some devices does not contain sysfsPath
	Currently devices list returns the list of available disks and
	its fs type properly. However it fails for some devices which does
	not contain sysfsPath and the dev details become None.

	This patch fixes this error by assigning empty dictonary if
	the dev is empty or None.

	Continuous-Integration: Jenkins CI

2015-05-25  Francesco Romani  <fromani@redhat.com>

	sampling: hoststats: rationalize getInterfaceStats
	The main job of the HostStatsThread._getInterfaceStats()
	method is to gather network stats.

	But this method also initializes the empty `stats' return
	dict with the default values.

	The initialization doesn't belong here, rather on the calling,
	orchestrating function, so this patch moves the initialization
	code outside.

	Continuous-Integration: Jenkins CI

2015-05-25  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	tests: fix redefinition pyflakes error
	The build fails with the following error in pyflakes
	version  "0.7.3-4" installed.
	./tests/functional/networkTests.py:93:
	      redefinition of unused 'vdsm' from line 28
	./tests/functional/networkTests.py:101:
	      redefinition of unused 'vdsm' from line 28
	make[1]: *** [pyflakes] Error 1

	Continuous-Integration: Jenkins CI

2015-05-25  Shmuel Melamud  <smelamud@redhat.com>

	vm: Detect RNG device by type
	In Vm._getUnderlyingRngDeviceInfo() method the RNG device must be
	detected in self.conf['devices'] list by 'type' attribute, not 'device'.
	See VmInfoBuilder.buildVmRngDevice() in the Engine for reference.

	Continuous-Integration: Jenkins CI

2015-05-25  Yeela Kaplan  <ykaplan@redhat.com>

	migration: Start using migrate3 instead of migrate2
	We would like to enable using the new libvirt
	migration parameters, this is the first step necessary.
	As new parameters can only be used with migrate3.

	Continuous-Integration: Jenkins CI

2015-05-25  Francesco Romani  <fromani@redhat.com>

	sampling: less verbose debug in _getInterfaceStats
	HostStatsThread._getInterfaceStats() needs
	to compute network tx/rx rate from the sampled data.

	To help troubleshoot rate miscalculations, a debug log
	was added, to show on error (rate > 100%) all the samples
	used for computation.

	The problem here is that the log iterates over the
	gathered samples. We want to use SampleWindow
	in HostStatsThread to reduce code duplication,
	but SampleWindow doesn't give access to raw samples yet.

	To move further, we drop this detailed log for the time
	being. Future patches may want to reintroduce it
	on top of SampleWindow.

	Continuous-Integration: Jenkins CI

	tests: hoststats: add test for empty stats
	If HostStats hasn't gathered enough samples,
	it should return a placeholder result with
	a few fields with predictable values.

	Add a test to ensure that.

	Continuous-Integration: Jenkins CI

2015-05-25  Nir Soffer  <nsoffer@redhat.com>

	mailbox: Rename mailbox monitor threads
	Name the HSM and SPM mail monitor threads "mailbox.HSMMonitor" and
	"mailbox.SPMMonitor" instead of the default Thread-1234.

	Continuous-Integration: Jenkins CI

	tests: Separate tests with similar fixtures
	The tests for exposed functions were testing multiple functions in one
	test. This cause unrelated failure to fail the whole test. The correct
	way to test this is having separate test for each function.

	Now we have separate test case class for the positive and negative
	tests, sharing the same configurators setup.

	Continuous-Integration: Jenkins CI

2015-05-24  Dan Kenigsberg  <danken@redhat.com>

	net tests: skip test_setupNetworks_on_external_bond
	commit f80e6162f introduced test_setupNetworks_on_external_bond that
	depends on a subtle difference in the semantics of restoreNetworks that
	depends on the persistence model. With unified persistence, the
	restoration re-creates the network structure in kernel. However, with
	ifcfg persistence, only the configuration files are written to disk.

	Until this difference is solved, this patch skips the test on when run
	with ifcfg persistence.

	Bug-Url: https://bugzilla.redhat.com/1223457
	Continuous-Integration: Jenkins CI

2015-05-24  Petr Horáček  <phoracek@redhat.com>

	network/models: check unified persistence only when it exists
	commit 73bbb27cb is re-configuring a bond if does not exist in
	self.configurator.runningConfig.bonds. However, runningConfig is not
	availabled in the ifcfg configurator.

	Bug-Url: https://bugzilla.redhat.com/1223457
	Continuous-Integration: Jenkins CI

2015-05-24  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Fix bug when mode is not specified
	We used to modify the directory bit on the mode parameter, which is
	ignored by os.makedirs(), so the mode directory bit is set. This ensure
	that when comparing existing path mode, we detect the error where a file
	exists in this path, instead of a directory.

	However, if the mode parameter was not specified, we did not check the
	file type when we get EEXIST error, so the function succeeded instead of
	failing loudly:

	    with open("file", "w"):
	        createdir("file")

	Replacing the smart code with explicit check for directory bit and
	permissions bits eliminate this bug and is more clear. Now we raise
	OSError with ENOTDIR errno in this case.

	Continuous-Integration: Jenkins CI

	tests: Wait until bridge is down before deleting it
	Previous code was using evil time.sleep(0.5), which tends to break on our
	overloaded slaves with this error:

	    RuntimeError: ("Command ['/usr/sbin/brctl', 'delbr', 'vdsmtest-QdYgr']
	    returned non-zero exit status 1.", '', "bridge vdsmtest-QdYgr is still up;
	    can't delete it\n")

	Now we wait up to 2 seconds for a proper 'down' netlink event. Before this
	change running tcTests.py took about 8.7 seconds. With this change, it takes
	only about 0.7 seconds. Hopefully this will also fix the random failures we see
	on the CI.

	Continuous-Integration: Jenkins CI

2015-05-22  Nir Soffer  <nsoffer@redhat.com>

	multiapth: Remove unsupported getuid_callout option
	This option is not supported since EL 7, and cause a warning when
	running multipath command line tool.

	This option was required on EL 6, so we kept it in our configuration to
	simplify the code. Now that we do not support EL 6, we can remove this
	and simplify the code.

	Bug-Url: https://bugzilla.redhat.com/1172186
	Continuous-Integration: Jenkins CI

	mailbox: Use threading instead of thread
	SPM MailMonitor thread was created using the thread.start_new_thread.
	This creates a thread with the unhelpful name "Dummy-1234". Also the
	locks used by this thread were created using thread.allocate_lock().

	I'm not aware of any advantages of using the lower level thread module,
	and searching vdsm history back to 2009 does not show any clue why this
	code was used.

	Now we use the threading module used for all other threads and locks in
	vdsm. This allows more helpful thread names in the next patches.

	Continuous-Integration: Jenkins CI

	vm: Support replication to different storage type
	When monitoring replicated drive, we must use hybrid approach; For
	block-based drive, we get the required extend info from libvirt. For
	file-based drives, libvirt cannot report the physical size of the drive,
	so we get it from the replica using irs.getVolumeSize().

	When extending replicated drive, we extend the drive or the replica
	only if they are chunked.

	Bug-Url: https://bugzilla.redhat.com/1058732
	Bug-Url: https://bugzilla.redhat.com/1058749
	Continuous-Integration: Jenkins CI

	virt: Add Drive.replicaChunked property
	When monitoring drive high watermark, it is not enough to check if the
	drive is chunked, since we may replicate a non-chunked drive to chunked
	replica, and the replica needs to be extended.

	Drive high watermark code will check now the watermark also on
	non-chunked drives, if they are being replicated to chunked storage.

	Continuous-Integration: Jenkins CI

	vm: Use blockRebase if blockCopy is not supported
	blockCopy is available in libvirt 1.2.8, but supported by the qemu
	driver only in 1.2.9. The recommended way to check for blockCopy
	availability is to try it and handle VIR_ERR_NO_SUPPORT error.

	This patch should be reverted when we require libvirt >= 1.2.9.

	Continuous-Integration: Jenkins CI

2015-05-22  Dan Kenigsberg  <danken@redhat.com>

	netinfo: handle never-expiring leases
	Bug-Url: https://bugzilla.redhat.com/1223530
	Continuous-Integration: Jenkins CI

	tcTests: base pseudo-random bridge names on PID, too.
	It seems that the Jenkins-driven mock test provides a too-reproducible
	environment, where two concurrent tests produce identical pseudo-random
	bridge names.

	This patch attempts to hack arround this by including the different
	process id of the concurrently-running test into the random hash.

	Continuous-Integration: Jenkins CI

2015-05-21  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: preparation of subscribtion class for subscription management
	So far subscription class was not used but it was designed to handle
	unsubscribe in __del__ method which is not the safest idea. We have
	decided to prepare it for proper unsubscription logic implement in:
	https://gerrit.ovirt.org/#/c/39969


	Continuous-Integration: Jenkins CI

	xmlrpc: renaming for pep8 compliance
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-21  Ondřej Svoboda  <osvoboda@redhat.com>

	shell_helper: fix _latest_version as all packages are now noarch
	Also, only look for vdsm* packages (~/rpmbuild may be used to
	compile other packages too).

	Continuous-Integration: Jenkins CI

2015-05-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	modify safelease executable path
	commit e6639515 dropped safelease code from Vdsm and
	added dependency on the external deployment of safelease.
	However, spmprotect.sh still looks for the safelease in the
	old location.

	Continuous-Integration: Jenkins CI

2015-05-21  laravot@redhat.com  <laravot@redhat.com>

	spbackends.py: setSpmStatus - expect tuple as param
	As part of change I049adecda40deb6f715e3aea2e3ada4030b518a3 setSpmStatus
	tuple param was removed, but filter() expects a function with a
	single argument which causes to a failure.

	Continuous-Integration: Jenkins CI

2015-05-20  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: introduction of header constants
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	jsonrpc: renaming for pep8 compliance
	Following renaming is done in this patch:
	 - stompReactor module
	 - BindingJsonRpc module

	Continuous-Integration: Jenkins CI

2015-05-20  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-tool: Add register verb
	The new verb register will make the registration from
	a node into the Engine. This verb supports old Engine
	registration schema and the new one as service.
	It's an alternative for bz#1135921 and bz#994451.

	This commit doesn't include the ovirt-node-plugin-vdsm
	changes to implement the new vdsm-tool register verb.

	See also:
	engine_page: vdsm-tool register verb integration
	https://gerrit.ovirt.org/#/c/41081/

	autoreg: vdsm-tool register verb
	https://gerrit.ovirt.org/#/c/41082/

	Feature page:
	http://www.ovirt.org/Features/VDSM/GenericRegistration

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-20  Nir Soffer  <nsoffer@redhat.com>

	vm: Use blockCopy for live storage migration
	We use now blockCopy for live-storage migration, allowing migration
	between mixed storage types.

	This command is a superset of the older blockRebase() when used
	with the VIR_DOMAIN_BLOCK_REBASE_COPY flag, and offers better control
	over the destination format, the ability to copy to a destination that
	is not a local file, and the possibility of additional tuning
	parameters. For more info see:
	https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainBlockCopy

	blockCopy was introduced in libvirt 1.2.8, but the Python binding was
	broken before 1.2.9. The fix was backported to Fedora in libvirt-python
	1.2.9-2 and to EL in libvirt-python 1.2.8-5.

	On Fedora 21, blockCopy from file to block was broken (bug 1214846).
	This was fixed in libvirt-daemon 1.2.9.3-1. This version is not
	available on Fedora 20 virt-preview repo, so practically this patch ends
	support for Fedora 20.

	Bug-Url: https://bugzilla.redhat.com/1200718
	Relates-To: https://bugzilla.redhat.com/1214846
	Continuous-Integration: Jenkins CI

	virt: Add getReplicaXML method
	This method returns destination disk xml required for blockCopy. We need
	basically the same logic for Drive and replic dict, so _getSourceXML()
	and _getDriverXML() are now module functions, accepting a dict like
	object.

	Continuous-Integration: Jenkins CI

	vm: Add required information to replica dict
	During LSM between mixed domain types, we need more information in the
	replica dict for creating destination disk xml and extending block-based
	replica.

	We keep the replica dict instead of dstDisk, and we also log it in error
	messages, since it contains more useful info.

	Since we must set the replica before preparing the volume, and we need
	the prepared path for getting the disk type, we persist the replica
	again after adding the replication info.

	Continuous-Integration: Jenkins CI

	vm: Unify replication terms
	There is no source and destination drives when replication a volume, so
	the term "drive" is more correct than "srcDrive". This not only more
	correct, but help to streamline the code.

	The replica volume info was kept in "dstDiskCopy" which does not reveal
	the intention of the code. Now this dict is named "replica".

	When setting Drive.diskReplicate, we refer to the dict as "replica"
	instead of "dstDisk", which is a leftover from older code.

	Continuous-Integration: Jenkins CI

2015-05-20  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: fix no attribute error
	This was introduced with the patch: https://gerrit.ovirt.org/#/c/40206/.
	In rhel6 and rhel7 this patch was passing the build.
	In fedora this was introducing AttributeError.
	This patch fixes that issue by selectively checking if attribute exists or not.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209493
	Continuous-Integration: Jenkins CI

2015-05-20  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Run glusterfs in its own cgroup
	When mounting glusterfs volume, glusterfs command is started in the
	vdsmd.service cgroup. When vdsmd exits, glusterfs dies and vms using
	gluserfs volumes pause. Now we run glusterfs mount command using
	systemd-run, so it run it its own cgroup, and last after vdsmd.service
	exit.

	In this example we have 2 glusterfs mounts:

	 - vdsm.slice
	   - vdsm-glusterfs.slice
	     - run-22137.scope
	       - 22180 /usr/bin/glusterfs ...
	     - run-21649.scope
	       - 21692 /usr/bin/glusterfs ...

	The glusterfs processes may run few minutes after a volume is unmounted;
	this happen also in the current code, running under vdsm cgroup.

	Mounting should not leave child processes in the caller process tree.
	This patch is a workaround until glusterfs fix this in the correct way.

	Bug-Url: https://bugzilla.redhat.com/1201355
	Continuous-Integration: Jenkins CI

2015-05-20  Darshan N  <dnarayan@redhat.com>

	gluster: Added volumeReplaceBrickCommitForce verb.
	This patch adds volumeReplaceBrickCommitForce verb,
	This verb replaces a gluster brick without any data
	migration.
	* volumeReplaceBrickCommitForce: It takes volumeName,
	currentBrick and newBrick as arguments. It returns
	success/failure.

	Continuous-Integration: Jenkins CI

2015-05-19  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: make sure to iherit from an object
	Continuous-Integration: Jenkins CI

	jsonrpc: rename setMessageHandler method
	Continuous-Integration: Jenkins CI

2015-05-19  Shahar Havivi  <shaharh@redhat.com>

	Migration: Prevent KeyError in migrateStatus
	MigrateStats only return progress when monitor thread is alive,
	When calling MigrateStats after the thread is dead we get KeyError.
	(when calling getMigrationStatus verb)

	Continuous-Integration: Jenkins CI

2015-05-18  Dan Kenigsberg  <danken@redhat.com>

	tcTests: add verbosity to addBridge failure
	All too often recently, testUtf8BridgeEthtoolDrvinfo (and others) fail
	with

	    CalledProcessError: Command '['/usr/sbin/brctl', 'addbr', 'vdsmtest-ME5LU']' returned non-zero exit status 1

	when run by Jenkins.

	This patch includes the stdout and stderr of the failing command so we
	can understand the issue better, and fix it or skip it.

	Continuous-Integration: Jenkins CI

2015-05-18  Francesco Romani  <fromani@redhat.com>

	virt: periodic: avoid pedantic log each step
	In the early debug days of the periodic Operation,
	I added a naive log each time the Operation fires.
	Nowadays this log helps a little, and we must have
	more refined way to troubleshood periodic (mis)firing,
	hence remove it.

	Continuous-Integration: Jenkins CI

2015-05-18  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: fix format type test-case error
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209493
	Continuous-Integration: Jenkins CI

	gluster: fix pyflakes error in mount point verification
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209475
	Continuous-Integration: Jenkins CI

2015-05-18  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vm: Allow to use 'serial' or 'virtio' type consoles
	This introduces the optional capability of using 'serial' type
	consoles for VMs.
	Using a serial console is supported by systems like FreeBSD which
	do not yet have virtio character device drivers. Also it is easier
	for most administrators to configure, since they quite often know
	the required configurations for linux systems to configure the serial
	device parameters on the kernel commandline and in the systems settings.

	This patch introduces a way too keep backwards compatibility and only
	uses 'serial' type consoles when explicitly told so.

	Bug-Url: https://bugzilla.redhat.com/1139159
	Continuous-Integration: Jenkins CI

2015-05-18  Darshan N  <dnarayan@redhat.com>

	gluster:Remove support for Replace gluster brick with data migration.
	This patch removes verbs related to replace gluster brick
	with data migration. Now only replace brick with commit
	is retained. As this feature is deprecated in
	glusterfs-3.7 on wards. These verbs were not consumed
	by engine, so it should not cause any backward-compatibility
	issues when removed. The list of verbs removed are as
	follows:
	  *volumeReplaceBrickStart
	  *volumeReplaceBrickAbort
	  *volumeReplaceBrickPause
	  *volumeReplaceBrickStatus
	  *volumeReplaceBrickCommit

	Continuous-Integration: Jenkins CI

	gluster: Adds a new element 'additionalFeatures' to getVdsCaps.
	This patch adds a new element 'additionalFeatures' to
	getVdsCaps, which gives the list of additional fetures supported
	by the host. This patch also adds additional gluster features
	supported in vdsm to the above list, if the host has vdsm support
	for features like snapshot, geo-replication and disk-provisoning
	they will be added to the list.

	Continuous-Integration: Jenkins CI

2015-05-18  Francesco Romani  <fromani@redhat.com>

	sampling: allow to get the nth-last sample
	HostStats thread need to access the second-last stored samples,
	to produce connlog.
	To cope with this requirement, we enhance SampleWindow class
	to allow to retrieve the nth-last sample.

	Continuous-Integration: Jenkins CI

2015-05-17  Ido Barkan  <ibarkan@redhat.com>

	net: Remove 3.0.0 network upgrade
	since ovirt-3.0, VDSM uses libvirt networks (with names prefixed
	vdsm-*) to store its own networks. Such networks were not defined in
	older versions of VDSM, and only Linux bridges were used. ovirt-3.5
	was the last version that supported the network upgrade to the new
	naming scheme.

	Continuous-Integration: Jenkins CI

2015-05-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding noarch for vdsm.spec
	Continuous-Integration: Jenkins CI

	remove safelease code and require the package instead
	This allows to have vdsm with noarch architecture in
	a follow-up patch.

	Continuous-Integration: Jenkins CI

2015-05-16  Darshan N  <dnarayan@redhat.com>

	gluster: New verb to mount & update fstab for meta-volume
	This patch adds a new verb 'MetaVolumeMount' to
	update fstab entry for meta-volume and mount it. This
	meta-volume is needed by various glusterfs features
	like snapshot-schedule, geo-replication etc. It is
	expected to be mounted on all gluster nodes. It takes
	an optional argument metaVolumeName.

	Continuous-Integration: Jenkins CI

2015-05-15  Shahar Havivi  <shaharh@redhat.com>

	v2v: Add convertExternalVm to vdsClient
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-15  Nir Soffer  <nsoffer@redhat.com>

	spec: Simplfy Fedora libvirt requirement
	We require now any Fedora version with libvirt 1.2.9 or later. This
	version is available in Fedora 21 and on Fedora 20 when using the
	virt-preview repo.

	Note that Fedora 20 virt-preview repo is not maintained any more, and
	Fedora 20 will be EOL in a month.

	Relates-To: https://bugzilla.redhat.com/show_bug.cgi?id=1214846#c11
	Continuous-Integration: Jenkins CI

2015-05-15  Dan Kenigsberg  <danken@redhat.com>

	testlib: drop python-2.6-specific code
	Noe that we no longer support el6 and its python-2.6, we can drop these
	backports.

	Continuous-Integration: Jenkins CI

2015-05-15  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: fix fstype unavailable for a formatted device
	Finds the fstype and add it to the device dictonary

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209493
	Continuous-Integration: Jenkins CI

2015-05-15  mmirecki  <mmirecki@redhat.com>

	replace minidom with ElelementTree
	netconfTest.py uses xml.dom.minidom, which is a slow module, for parsing
	and handling xml. The patch replaces this with xml.dom.ElementTree.

	Continuous-Integration: Jenkins CI

2015-05-15  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: raise proper execption if the given mount point is in use.
	Currently if an already used mount point is given for the brick
	create function, it does all the lvm tasks and returns Unexpected
	Exception when it tries to mout the device at the end of brick
	create scenario. This patch will check the availablity of the given
	mount point and returns an appropriate error message.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1209475
	Continuous-Integration: Jenkins CI

2015-05-15  Yeela Kaplan  <ykaplan@redhat.com>

	migration: remove getVmStats before migration
	Calling getVmStats before migration to check if the
	same vm exists on the destination host is redundant.
	If it does, then our system is in much bigger trouble
	and migration will fail anyway.
	and if the connection was not established we will fail
	in the next step of the migration anyway.

	Continuous-Integration: Jenkins CI

2015-05-14  Ido Barkan  <ibarkan@redhat.com>

	net: clearer log for unavailable bonds
	Continuous-Integration: Jenkins CI

	net: simplify _find_nets_with_available_devices algorithm.
	Continue statements make this algorithm a bit tricky to understand.

	Continuous-Integration: Jenkins CI

2015-05-14  Nir Soffer  <nsoffer@redhat.com>

	password: Prevent password logging and persisting
	Vdsm should not expose passwords in log messages. We have code in HSM,
	protecting some methods that accept connection lists, which may include
	a password parameter. However this is not the right place to protect
	passwords, as they are logged now by the jsonrpc server.

	This patch introduces the password library, providing:

	  ProtectedPassword     class for wrapping password value, so it is not
	                        logged or persisted by mistake.

	  protect_passwords     replace passwords value with ProtectedPassword
	                        object in nested structures.

	  unprotect_passwords   replace ProtectedPassword objects with the
	                        actual password value.

	The jsonprc server protect passwords in request parameters, and
	unprotect passwords in response result.  This is safest and simplest
	way, as we cannot forget to protect a method.

	The xmlrpc server handle protecting and unprotecting in the method
	level, since this is the only place where we can detect a password
	parameter.

	Passwords read from iscsi session and libvirt password file are also
	protected when they enter the application.

	Code that needs to access protected password value must access the
	password.value attribute.

	Note that xmlrpc server has incomplete and fragile password protection
	for non-irs methods (see wrapApiMethod). Fixing this needs more work.

	Bug-Url: https://bugzilla.redhat.com/1220039
	Continuous-Integration: Jenkins CI

2015-05-14  Shahar Havivi  <shaharh@redhat.com>

	v2v: Log obfuscate passwd provided by convertExternalVm
	Continuous-Integration: Jenkins CI

2015-05-14  Francesco Romani  <fromani@redhat.com>

	sampling: hoststats: kill sample() method
	HostStatsThread.sample() is a two-line method used only once.

	Remove it to reduce the code size, but also to make the code a
	little bit clearer.

	Continuous-Integration: Jenkins CI

2015-05-14  Nir Soffer  <nsoffer@redhat.com>

	vmstats: Fix cpu usage key names
	Since commit 9ba66c903083e (virt: Additional reporting of CPU usage in
	ns) we are accessing the wrong keys, filling the logs with:

	    Traceback (most recent call last):
	      File "/usr/share/vdsm/virt/vm.py", line 1338, in _getRunningVmStats
	        vm_sample.interval)
	      File "/usr/share/vdsm/virt/vmstats.py", line 37, in produce
	        cpu(stats, first_sample, last_sample, interval)
	      File "/usr/share/vdsm/virt/vmstats.py", line 78, in cpu
	        stats['cpuUsage'] = str(last_sample['system_time']
	    KeyError: 'system_time'

	Now we check the correct keys, and do this inside the try block handling
	missing keys, so errors are reported in a consistent way.

	Continuous-Integration: Jenkins CI

2015-05-14  Ido Barkan  <ibarkan@redhat.com>

	net: factor out _find_nets_with_available_devices.
	Aiming to simplify _filter_nets_bonds.

	Continuous-Integration: Jenkins CI

	net: remove support for sriov hook
	Now that vdsm supports sriov natively, it does not need a special
	hook for this. Moreover, allowing this hook to be installed might
	introduce bugs originating from the use of the two methods at the
	same time. vdsm now cannot be installed if hook-sriov package is
	already installed on the system.

	Continuous-Integration: Jenkins CI

2015-05-13  Petr Horáček  <phoracek@redhat.com>

	Revert "network: allow custom bondOption"
	This patch was based on misunderstanding of bond's 'areOptionsApplied'.
	Because of that, custom options were passed to configurator.

	This will be fixed in following patch.

	Continuous-Integration: Jenkins CI

2015-05-13  Fred Rolland  <frolland@redhat.com>

	spec: updated qemu-* requirements on EL
	Updated the build version for qemu-kvm-ev,qemu-kvm-rev,qemu-img-ev and
	qemu-img-rhev for a EL build on EL >= 7.

	The required qemu-img version solves a crash when using qemu-img convert
	-t none on some block storage devices (see
	https://bugzilla.redhat.com/show_bug.cgi?id=1203543 for details).

	Bug-Url: https://bugzilla.redhat.com/1199014
	Bug-Url: https://bugzilla.redhat.com/1209034
	Continuous-Integration: Jenkins CI

2015-05-13  Idan Shaby  <ishaby@redhat.com>

	spec: require qemu-*-ev on CentOS >= 7
	Added a requirement for qemu-kvm-ev and qemu-img-ev on CentOS >= 7.

	qemu-*-ev rpms are upstream version for qemu-*-rhev.
	These supply features needed that are not available in the regular
	qemu-*, for example 'Live Snapshot'.

	Continuous-Integration: Jenkins CI

2015-05-13  Petr Horáček  <phoracek@redhat.com>

	netlink: rtnl_put_link after rtnl_link_get_kernel
	According to netlink documentation [1] we have to decrement reference
	counter when we don't need link (obtained from rtnl_link_get_kernel)
	anymore, otherwise we cause a leak.

	This bug was found by John Taylor <jtt77777@gmail.com> [2].

	Note that even before [3] was merged, _get_link() failed to call
	rtnl_put after yielding the result of rtnl_link_kernel().

	[1] http://www.infradead.org/~tgr/libnl/doc/route.html#link_direct_lookup
	[2] https://bugzilla.redhat.com/show_bug.cgi?id=1158108#c18
	[3] https://gerrit.ovirt.org/#/c/40571/4/lib/vdsm/netlink/link.py

	Bug-Url: https://bugzilla.redhat.com/1158108
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	Revert "getRoute verb added"
	getRoute verb was introduced due to our mistake. It is not useful
	for its task, was never used by Engine, and was never part of a released
	version of vdsm. Instead of using it, Engine is to perform DNS resolution
	of the host name and compare it to the addresses found on the interfaces
	reported by getVdsCapabilities.

	This reverts commit 41a839fc1d7d2e30262b961e33bf25f733a8de02.

	Continuous-Integration: Jenkins CI

	network: allow custom bondOption
	Allow 'custom' in bond options. This value will be accepted by
	Bond.validateOptions method but it will not be passed to configurator.

	Continuous-Integration: Jenkins CI

2015-05-13  Shmuel Melamud  <smelamud@redhat.com>

	tests: Typo in TestVmDevicesXmlParsing
	'device': 'wawtchdog' -> 'device': 'watchdog'

	Continuous-Integration: Jenkins CI

2015-05-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: use %license macro
	Spec should be based on Fedora RPM GuideLines.
	https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-12  Darshan N  <dnarayan@redhat.com>

	gluster: revamp in geo-replication status and list verbs.
	This patch modifies geo-replication status and geo-replication
	list verbs to accomodate the corresponding changes in gluster
	geo-replication.

	Continuous-Integration: Jenkins CI

2015-05-11  Francesco Romani  <fromani@redhat.com>

	lib: add the response.success() helper
	This patch augments the response module with the success()
	helper, so VDSM code has now a nicer and cleaner alternative
	to the bare doneCode which was used before.

	response.success() also allows caller code to augment the
	response code with custom fields, as it is done many times
	in Vm class.

	Continuous-Integration: Jenkins CI

2015-05-11  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Additional reporting of CPU usage in ns
	As per request, we're now additionally reporting the VM CPU usage
	in nanoseconds

	Bug-Url: https://bugzilla.redhat.com/1172153
	Continuous-Integration: Jenkins CI

2015-05-11  Martin Sivak  <msivak@redhat.com>

	Cache the result of numaUtils.getVcpuPids
	The method that get the current NUMA cpu assignments
	burns quite a lot of CPU cycles to parse the libvirt
	XML all the time.

	This is not necessary as the XML only needs to be
	parsed again after it changes.

	This patch adds a NUMA vCpuPids cache to improve
	the overall NUMA stats performance.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1182094
	Continuous-Integration: Jenkins CI

2015-05-11  Shubhendu Tripathi  <shtripat@redhat.com>

	gluster: List activate-on-create volume snapshot option
	Modified the verb glusterSnapshotConfigList to list
	option activate-on-create as well.

	Bug-URL: https://bugzilla.redhat.com/1216056
	Continuous-Integration: Jenkins CI

2015-05-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove configure sanlock from %post installation
	There is no need to run this verb during post as the user should run the
	full configure flow after installation.

	This is redundant call that might cause conflicts during upgrades.

	Continuous-Integration: Jenkins CI

2015-05-09  Ido Barkan  <ibarkan@redhat.com>

	net: factor out _find_bonds_with_available_nics
	Aiming to break _filter_nets_bonds apart so it will be simpler and
	easier to read.

	Continuous-Integration: Jenkins CI

2015-05-09  pkliczew  <piotr.kliczewski@gmail.com>

	jsonrpc: allow processing of notifications
	The difference between regular request and notification in jsonrpc is
	lack of id for the latter. We prepare message processing code to be able
	to process both.


	Continuous-Integration: Jenkins CI

2015-05-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Move passwd (set saslpassword for libvirt) to vdsm-tool
	In this patch we stop calling saslpassword command directly,
	instead we move passwd logic to vdsm-tool configure.
	with that patch after rpm installation user will need to call configure
	to set the sasl libvirt password - therefore we remove those parts from spec,
	and update the manual accordingly.

	In additional this patch moves all related constants to passwd and replace
	usages.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1169338
	Continuous-Integration: Jenkins CI

2015-05-08  Dan Kenigsberg  <danken@redhat.com>

	python3: avoid python3-inconsistent syntax
	There is a long long way before vdsm becomes compatible with Python 3.
	This patch only makes sure that the way does not become even longer by
	inroducing new incompatible code.

	Continuous-Integration: Jenkins CI

	python3: fix forgotten python2-ish syntax
	A print statement and a few old-style octal literal hid in py.in files.
	Now `make python3` passes when run after `make`.

	Continuous-Integration: Jenkins CI

2015-05-08  Ido Barkan  <ibarkan@redhat.com>

	network: move NET_LOGICALNET_CONF_BACK_DIR to ifcfg
	It is not used elsewhere.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	network: do not try to clean running configuration
	This small optimization was also the behavior before this change,
	only now it is easier to read and is also logged.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

	network: factor out method from unified restoration logic.
	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-07  Ido Barkan  <ibarkan@redhat.com>

	net: remove el6 support for libnl binding
	Since 3.6 does not support el6 this commit reverts 2 other commits:
	02ab984 vdsm: Fix memory leak in netlink/link.py
	66aa7d8 libnl: workaround for _rtnl_link_get_kernel on el6

	The workaround is no longer needed hence also the fix for the memory
	leak it created.

	Continuous-Integration: Dan Kenigsberg <danken@redhat.com>

2015-05-07  laravot@redhat.com  <laravot@redhat.com>

	clusterLock: fix returned retval
	Change Id4b9227773e44d48b21aa4eaba7c7fe1ab599931 added accidently
	a third element to the returned tuple which breaks the expected
	behavior.

	This patch restores the previous returned value and adds parantheses
	to clarify what is returned.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1218325

2015-05-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding qemu-kvm-ev and qemu-img-ev to caps report
	ev suffix for those packages were added - report their versions for
	qemu-img and qemu-kvm packages.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1218581

2015-05-07  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: always print IPV6INIT=yes/no
	EL6's /etc/sysconfig/network-scripts/ifup-ipv6 had a condition:
	  [ "$IPV6INIT" = "yes" ] || exit 0

	which changed to an inverted one in EL7:
	  [[ "$IPV6INIT" = [nN0]* ]] && exit 0

	This makes IPV6INIT mandatory in ifcfg files.

2015-05-06  Nir Soffer  <nsoffer@redhat.com>

	spec: Libvirt 1.2.14 is not released yet
	In commit 87cf341acede (spec: Update libvirt-daemon and libvirt-python
	requirements) we required libvirt >= 1.2.14 on Fedora 22, but this
	version is not available yet. We will have to wait until this version is
	available.

2015-05-06  Federico Simoncelli  <fsimonce@redhat.com>

	utils: add CommandStream class
	This patch adds CommandStream a generic class to process the output of
	external commands (both stdout and stderr) as soon as available.
	For this purpose CommandStream provides the ability to define callbacks
	that will be executed when data is available from the external command.

	This class is the foundation for long-running commands that are able to
	provide their progress during execution: their output must be processed
	as soon as possible to maintain and report status updates.

2015-05-05  Francesco Romani  <fromani@redhat.com>

	sampling: statscache: more robust remove()
	It is possible that StatsCache.remove() is called for a VM
	not yet added to the cache. This would move VDSM into
	an inconsistent state, possibly preventing to re-run the same
	VM. This is obviously very bad and must be avoided.

	A prominent example of this is if a vmMigrationCreate succeeds,
	but the asynchronous libvirt domain startup fails.
	The source VDSM would correctly issue destroy(),
	but the stats cache removal on the destination would fail.

	It must be noted that in some still-unclear circumstances,
	VDSM receives multiple destroy requests. VDSM reacts correctly
	to those requests, except for the fact that this causes
	multiple removals from stats_cache, and everyone but
	the first would fail (as expected).

	This patch
	- makes StatsCache.remove() capable of supportting removal
	  of net-yet-added VMs
	- adds log warnings to make sure these events will not
	  hide more bugs, like the multiple removal due to the failure
	  to create underlying libvirt domain.

2015-05-05  Dan Kenigsberg  <danken@redhat.com>

	hooks: introduce before/after_get_stats hook points
	This patches adds a hook point that allows to modify the host statistics
	which Vdsm reports on its getVdsStats API. This hook can become useful
	if a hook writer would like to provide fake usage statistics to a fake
	network that is reported by an after_get_caps hook script.

2015-05-05  Federico Simoncelli  <fsimonce@redhat.com>

	block: convert getVolumeMetadataSlot into a contexmanager
	Using a contextmanager on getVolumeMetadataSlot allows us to hide the
	metadata slot lock inside the StorageDomain object instead of having to
	use it from other modules (e.g. formatConverter).

2015-05-05  Nir Soffer  <nsoffer@redhat.com>

	vm: Simplify error handling in diskReplicateStart
	Log only detailed exception in the outer try-except block, instead of
	detailed exception in the inner try-except block, and unhelpful
	exception in the outer block.

	virt: Improve spacing
	Separating logical blocks make it easier to to understand the flow.

	virt: Extract helpers for major XML elements
	Now drive xml is built using small helper methods creating each of the
	elements. This is more maintainable and will allow creating drive replica
	xml without code duplication.

	virt: Separate validation from getXML
	Extract _validate() method and move the validation code into it, and add
	missing tests for sgio and cow format.

	virt: Set source attributes consistently
	For "block" and "network" we were using source.setAttrs(key=value), but
	for file we were using less clear source.setAttrs(**dict).

	virt: Set default device in __init__
	Set Drive.device in __init__ instead of getXML().

	virt: Extract Drive.diskType property
	This is the first step in breaking getXML() to separate methods for
	rendering individual elements, required to create replica disk xml
	without code duplication.

	The diskType property is also required for Ceph support, where it will
	be sent from the engine. This property helps the rest of the code to work
	in the same way if diskType was sent from the engine (new engine) or
	deduced from blockDev and networkDev properties (old engine).

2015-05-05  Ido Barkan  <ibarkan@redhat.com>

	network: no need to log when network persistence path doesn't exist.
	When RunningConfig is instantiated, its underlying directory structure
	may not exist. This is perfectly OK on the start-up of a process.
	We prefer dropping the messages over having __init__ with side effects
	on the file system.

	The dropped messages were contaminating supervdsm.log and are a source of
	confusion and red herrings.

2015-05-05  Nir Soffer  <nsoffer@redhat.com>

	utils: Add systemd_run command modifier
	Using new cmdutils.systemd_run, you can modify a command so it will run
	as a service, using its own cgroup. This is handy when starting a long
	running command that should continue to run after the service starting
	it is terminated.

	The command will run as systemd service, and can be controlled using
	systemctl. For more info see systemd-run(1).

	Relates-To: https://bugzilla.redhat.com/1201355

2015-05-05  Francesco Romani  <fromani@redhat.com>

	virt: rename SampleVMs for clarity
	SampleVMs is a bad name. Change it
	to VMBulkSampler, which is a bit more explicative.

	No changes in logic, only renaming.

	vm: disappeared domain are not ready for commands
	It is possible that isDomainReadyForCommands races
	agains the shutdown path.
	The two operations are intrinsically asynchronous with
	each other (shutdown, if started from the outside, will
	always be asynchronous with everything).

	To make code more robust, we add one protection layer
	inside isDomainReadyForCommands, catching libvirtErrors
	for inexistent domains (no longer existent domains).

	It is fair to report that those domains aren't ready
	for commands.

	Along the way, we add tests to cover all the paths
	in Vm.isDomainReadyForCommands().

	periodic: improve isolation in VM dispatching
	Make VmDispatcher more robust:

	1. add try/except block inside the vm dispatching loop, to make sure
	that one exception doesn't prevent further dispatching.
	This may happen if for any reason runnable() or required() raise.

	2. catch exceptions to make sure to log vm id, to make troubleshooting
	easier.

	3. add tests to check the that dispatching continues in presence
	of exceptions inside the VmDispatcher loops (#1 above)

	periodic: simplify per_vm_operation
	per_vm_operation was added, as helper, together with
	_dispatched_operation, for the sake of code readability.

	However, the usage of a separate function and functools.partial
	produced the opposite effect.

	This patch redoes per_vm_operation as private inner function,
	making it closer to its users and coalescing two separate
	helpers in one.

	This also makes the code shorter, so better in at least one
	objective metric.

2015-05-04  Dan Kenigsberg  <danken@redhat.com>

	python3: use python3-compatible raising
	http://legacy.python.org/dev/peps/pep-3109/ has eliminated the raise
	statement with 2 or 3 expressions. However, in Python 2 they are the
	only way to tweak traceback of the raised exception.

	This patch introduces a new dependency on the "six" library, since its
	six.reraise() handles both cases. The code was auto-generated with
	the libmodernize.fixes.fix_raise_six fixer of python-modernize.

2015-05-04  Francesco Romani  <fromani@redhat.com>

	migration: typo: destServer attribute is private
	A typo in migration.py cause all migrations to fail.

	Bug-Url: https://bugzilla.redhat.com/1217362

2015-05-03  Francesco Romani  <fromani@redhat.com>

	vm: hyperv: hypervclock dosn't have 'tickpolicy'
	'hypervclock' (and kvmclock as well) does not
	support the tickpolicy attribute.

	This patch removes the setting, while preserving
	it for 'rtc' clocksources.

2015-05-03  Yeela Kaplan  <ykaplan@redhat.com>

	multiapth conf: Replace TM to VDSM

2015-05-01  Nir Soffer  <nsoffer@redhat.com>

	debug: Integrate manhole debugging service
	Manhole is in-process service that will accept unix domain socket
	connections and present the stacktraces for all threads and an
	interactive prompt.

	Usage:

	0. Install it

	   pip install manhole

	1. Enable it in vdsm.conf:

	   [devel]
	   manhole_enable = true

	2. Dive into vdsm:

	   $ nc -U /var/run/vdsm/vdsmd.manhole
	   Python 2.7.5 (default, Jun 26 2014, 11:55:39)
	   [GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
	   Type "help", "copyright", "credits" or "license" for more information.
	   >>> dir()
	   ['__builtins__', 'cif', 'dump_stacktraces', 'irs', 'os', 'socket',
	    'sys', 'traceback']
	   >>> irs.ready
	   True
	   >>>

	For more info see http://python-manhole.readthedocs.org/

2015-04-30  Ido Barkan  <ibarkan@redhat.com>

	Move udevadm to lib/vdsm
	udevadm is a handy tool that other parts of vdsm could use beside
	storage.

2015-04-29  Dan Kenigsberg  <danken@redhat.com>

	unbreak pyflakes
	Patch https://gerrit.ovirt.org/40346 did not maintain pyflakes
	cleanliness.

2015-04-29  Nir Soffer  <nsoffer@redhat.com>

	vm: Improve error handling in diskReplicateStart
	Move the call to Vm._setDiskReplica() just before the try block ensuring
	that this is operation is reverted on errors. Previously there were some
	lines before the try block, and an exception raised in these lines would
	leave the disk in replication state.

	vm: Extract _startDriveReplication method
	Vm.diskReplicateStart() is too long and contains complex error handling
	code which I like to simplify. Having block of libvirt specific details
	in the middle of this monster make it harder to understand and modify.

	vm: Remove unused live-merge extend code
	_getExtendCandidates contained unused code that may be needed for future
	version of libvirt, providing drive size info for internal volumes.
	Keeping unused code makes our life harder.

	vm: Rename temporary for clarity
	When extending drive size, we used both "currentSize" and
	"sizeRoundedBytes" for qemu image virtual size.

	Both names are not specific enough, as we are dealing with many sizes in
	this module (physical, capacity, allocated, apparentsize, truesize). It
	also confusing to use different name for the same value, as both values
	may be rounded up by qemu.

	Now we use curVirtualSize for the size before extending, and
	newVirtualSize for the size after extending.

	A comment added to explain why we use and return newVirtualSize and
	not the requested size.

2015-04-29  Ido Barkan  <ibarkan@redhat.com>

	network: clientSeen should have its default timeout

	unbreak InterfaceSampleTests.
	testHostSampleReportsNewInterface and
	testHostSampleHandlesDisappearingVlanInterfaces made simpler. The
	compromise here is not testing the HostSample() public interface, which
	is more correct, but harder to fake.

2015-04-29  Martin Polednik  <mpolednik@redhat.com>

	virt: add unit test for getUnderlying* family of methods
	Our tests did not cover the process of retrieving device information
	from libvirt XML. This patch is a first step to add such coverage on
	the side of unit tests.

2015-04-29  Francesco Romani  <fromani@redhat.com>

	profiling: add support for memory profiling
	There are many python memory profilers, but most of them are
	tailored for interactive usage, so additional integration work
	is needed to use them in a daemon, like VDSM.

	This patch adds support for dowser:
	<http://www.aminus.net/wiki/Dowser>
	<https://pypi.python.org/pypi/dowser/0.2>

	which has the following benefits which makes it in a better position
	to be used with VDSM:
	+ self contained, includes WEB UI
	+ allows live monitoring
	+ tailored for cherrypy usage, so friendly towards server applications.
	+ easily portable (pure package)

	It must be noted that dowser has some drawbacks as well
	- significat dependencies, both in number and in size (with respect
	  to VDSM standards): cherrypy, PIL
	- based on gc module

	As per the cpu profile already added, this code is meant to be
	used only as debug aid or in development environments.
	The feature is controlled by a config tunable and disabled by default;
	the feature disable itself if any dependency is missed.

2015-04-29  Ido Barkan  <ibarkan@redhat.com>

	Better logging for network restoration.
	Logging is done on the same log file of vdsm itself and it is now clearer
	when restoration is done, if the restoration succeeded or not, and if not,
	where it failed.

2015-04-28  Martin Polednik  <mpolednik@redhat.com>

	vmdevices: factor out default disk interfaces to storage
	One step in an ongoing effort to isolate device functionality.

2015-04-28  Ido Barkan  <ibarkan@redhat.com>

	shell_helper: show all VDSM processes status when restarting

2015-04-28  Francesco Romani  <fromani@redhat.com>

	profiling: move exceptions in a module
	In order to make them (so far, 'it') reusable
	across all the package, not only in the cpu module.

	No code changes, just reorganization.

	profiling: disambiguate profile identifiers
	Upcoming patches want to add memory profiling,
	so the CPU profiling will not be the only one.

	This patch changes all the profile related identifers
	by prepending the 'cpu_' string to reflect that.

2015-04-28  Ido Barkan  <ibarkan@redhat.com>

	network: moving changeNumvfs to network/api.py
	Later patches will add functionality which justifies keeping
	superdvdsmServer small

2015-04-28  Eldan Shachar  <eshachar@redhat.com>

	vm payload: Add Joliet FS support
	Current payload ISO only uses Rock Ridge extension, as a result
	Windows VMs can't use payloads with long filenames. This fix
	adds the Joliet extension to the generated ISO.

	Bug-Url: https://bugzilla.redhat.com/1205058

2015-04-28  Martin Polednik  <mpolednik@redhat.com>

	vmdevices: rename buildConfDevices to devSpecMapFromConf
	To keep a consistent naming across devices subsystem, this patch
	changes name of this method to conform naming defined in
	http://www.ovirt.org/Feature/VmDevices_rework#Current_state_of_devices

	vm.py: factor out device object creation from _run method
	This is an attempt to start more isolation of device related
	functionality in vm.py. This will allow us to move it to it's own
	module in future, and in the meantime give us more granularity for
	testing.

2015-04-27  pkliczew  <piotr.kliczewski@gmail.com>

	stomp: remove not used client

2015-04-27  Dan Kenigsberg  <danken@redhat.com>

	vm.py: avoid needless temporary list

	python3: eliminate tuple_params
	I liked tuple arguments, but they are gone from Python 3 due to
	pep-3113, and their current use in Vdsm was unwarranted.

2015-04-27  Francesco Romani  <fromani@redhat.com>

	vm: make sure {true,apparent}size is str in conf
	In commit 7a2ddbac86a0ed21050dd741d9f1f2b826adbccc
	we introduced the Vm._getVolumeSize helper, which
	makes the code nicer and cleaner.

	Unfortunately, it also adds an hidden side effect
	when it is called in _normalizeVdsmImg, because
	it returns a tuple of int()s.

	However, _normalizeVdsmImg is updating Drive config,
	which is expected to contain strings.

	Strictly speaking, the content has *not* to be strings
	- this is not documented not enforced anywhere -,
	but such data is copied verbatim in the result of
	getVMList(fullStatus=True, ...), so this breaks XMLRPC
	for any disk {true,apparent}size is bigger than 2G.

	To unbreak XMLRPC, then, we cast back the return
	value of _getVolumeSize() as strings.
	This is not the most correct solution, but restores
	the hidden assumption about data being string inside
	Vm.conf.

	vm: do not clean StatsCache on setDownStatus
	We should clean StatsCache, but only when a VM
	is released, not when it is set to Down.

	Otherwise, destroy will fail, leaving VDSM
	into an inconsistent state.

2015-04-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	tool: Remove leftover libvirtd.log rotating logic.
	Vdsm libvirt logging definitions were recently dropped in
	favor of libvirt defaults[1].  It is now up to libvirt to
	manage logging, rotating included.

	libvirt.logrotate is a file installed by libvirt's rpm and then
	modified by vdsm-tool. we need to stop modifying it, and drop
	modifications when libvirtd.conf updates to include [1] -
	When we have a version bump.

	[1]
	http://gerrit.ovirt.org/#/q/I251c2534d3284aa95bffa56143c449d5de887008,n,z

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1149757

	Remove redundant print which interfere yum output
	The print "removed configuration of module [module-name] successfully"
	is not necessary and better to avoid it.

	Remove libvirt configure code from debian prerm script
	The code which configure related services conf files is currently part
	of vdsm-tool configure verb. This verb is being called by ovirt deploy
	or manually by the user. This patch calls "vdsm-tool remove-config"
	which does that cleanup.

2015-04-27  Ido Barkan  <ibarkan@redhat.com>

	disconnecting a port from a bridge should not consider el6 anymore
	Also, require el7 version of iproute2 so users cannot install vdsm
	now on el6.

2015-04-26  Dan Kenigsberg  <danken@redhat.com>

	python3: use newer-style octal literals

2015-04-25  Martin Polednik  <mpolednik@redhat.com>

	vmdevices: rename makeDeviceDict to makeDevMap
	To keep a consistent naming across devices subsystem, this patch
	changes name of this method to conform naming defined in
	http://www.ovirt.org/Feature/VmDevices_rework#Current_state_of_devices

2015-04-25  Dan Kenigsberg  <danken@redhat.com>

	python3: booleans exist.

2015-04-24  Francesco Romani  <fromani@redhat.com>

	vm: remove unused constant
	The statistics handling code which uses the _MBPS_TO_BPS constant
	was moved into vmstats.py, hence this constant is now useless here.

2015-04-24  Nir Soffer  <nsoffer@redhat.com>

	vm: Simplify dict assignment
	Replace unneeded update with one value with simpler assign.

2015-04-24  Dan Kenigsberg  <danken@redhat.com>

	python3: lib2to3.fixes.fix_except
	Fix all occurances of old-style

	  except Except, e:

	unbreak pyflakes
	this should have been included in commit ec697835c.

2015-04-24  Francesco Romani  <fromani@redhat.com>

	virt: drop AdvancedStatsFunction
	AdvancedStatsFunction is not used anymore, replaced
	by SampleWindow or just by different code.

	virt: stats: drop {Advanced,Vm}StatsThread
	VmStatsThread and AdvancedStatsThread are
	not used anymore, so this patch drops them.

	vm: restore guestEventTime update
	When VM starts, it needs to update the guestEventTime field.
	This was mistakenly removed as side effect as commit
	8ba3a3f599ef9d3910ff69ce8d61d5e2c3d9176a

	Now this patch restores it to keep the VM state consistent.
	For the record, the known side effect of the above mistake
	is to not show up the 'Powering_Up' state.

	Along the way, drop a stale comment that should be removed
	earlier, when we dropped invocation of startVmStats.

	virt: periodic: port highWrite monitoring
	port the high water mark monitoring (aka disk threshold monitoring)
	to the new periodic operations infrastructure.

	At steady state, we will use QEMU events for performance reasons;
	moreover some storage flows, however, may still require polling.
	So this code may still be useful as fallback or as extra protection
	layer even when we get disk usage events.

	virt: stats: periodic sampling using bulk stats
	With a framework to run periodic, possibily blocking, monitoring
	operations deployed, we now can move the VM sampling task in this
	context quite nicely.

	This patch overhauls the sampling and makes it
	another task in the periodic.py framework.
	This is also made possible by the move to the
	bulk stats libvirt API.

	Benefits of this patch are
	- drop of the dreaded "one thread per VM" model
	- cleaner and more extensible code

	Bug-Url: https://bugzilla.redhat.com/1139217

2015-04-24  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: Always pop the frame for frame handler
	We do not need to check whether _frame_handler has attribute handle_frame
	because we have only two frame handlers. One is used when connecting and the
	other used when serving the content.

	Following classes are used use frame handlers:
	- AsyncClient (client)
	- StompAdapterImpl (server)

	Both of them provide handle_frame. We could keep this check if we plan to
	provide more implementations but currently there is no need to have more.

2015-04-23  Fred Rolland  <frolland@redhat.com>

	hsm: Report info needed for refreshing devices
	One of the way to increase the size of a Storage Domain
	is to increase the LUN size on the storage server.

	Devices that were resized on the storage server need to be
	resized also on the host.

	When GetDeviceList is called, a multipath rescan occurs.
	Therefore the underlying paths are refreshed.
	However, the PV still have the previous size.
	The devices needed to be refreshed can be discovered
	by comparing the path capacity and the PV size.

	The following fields are added to GetDevicelist:
	Capacity of path in the path status section, and size of PV.

	See output with the additional fields:

	{'GUID': '36001405bab880a35fc349e183390eb8e',
	  'capacity': '24696061952',
	  'devtype': 'iSCSI',
	  'fwrev': '4.0',
	  'logicalblocksize': '512',
	  'pathlist': [{'connection': '10.35.0.174',
	                'initiatorname': 'default',
	                'iqn': 'iqn.2015-01.com.rhevuser:444',
	                'port': '3260',
	                'portal': '1'}],
	  'pathstatus': [{'capacity': '24696061952',
	                  'lun': '0',
	                  'physdev': 'sda',
	                  'state': 'active',
	                  'type': 'iSCSI'}],
	  'physicalblocksize': '512',
	  'productID': 'block_backend_l',
	  'pvUUID': '07QE9o-UoSl-v8NP-JTkV-nE3F-nI7x-RgsoQM',
	  'pvsize': '24293408768',
	  'serial': 'SLIO-ORG__bab880a3-5fc3-49e1-8339-0eb8e882dc16',
	  'status': 'used',
	  'vendorID': 'LIO-ORG',
	  'vgUUID': 'hRpSR4-NTBV-z3Ki-K1N6-llGQ-en24-GGVf8Y'}

	Relates-To: https://bugzilla.redhat.com/609689

2015-04-23  Tomas Jelinek  <tjelinek@redhat.com>

	Added support for iothreads
	Added a new parameter 'numOfIoThreads' to VM and
	a new parameter 'pinToIoThread' to Drive's spec params.

	If not set, nothing happens.
	If set, the libvirt xml is enriched on two places:
	- The 'domain' will have a direct child <iothreads>N</iothreads>
	- The disk will have the 'driver' enriched by 'iothread="i"'

	The meaning is that the qemu will allocate N threads and pin the disk to the
	thread provided in it's spec params.

2015-04-23  Ido Barkan  <ibarkan@redhat.com>

	testBrokenNetworkReplacement does not need to consider el6 anymore

2015-04-23  Shahar Havivi  <shaharh@redhat.com>

	v2v: Convert VM from external source to Data Domain
	new verb: convert VM from external source (non-kvm) to Data Domain.
	The convertExternalVm() is implemented in v2v module and use
	the virt-v2v external tool to do actual VM conversion.

	More information can be view at the feature page:
	http://www.ovirt.org/Features/virt-v2v_Integration

2015-04-23  Allon Mureinik  <amureini@redhat.com>

	storage: Remove validateStorageServerConnection
	validateStorageServerConnection is inherently a racy (read: useless)
	call, as a storage server may become unreachable an instant after
	calling this method returns that it's OK.

	This call has been progressively cut away over the past several
	years:
	 - Commit 1f608f9f73680c021fde4a14f432e6e91ac3f3f9 turned it into a
	   noop call that returns 0 for any connection
	 - Commit a1cdccdff54af7aea8de49c06d8535079cd78bff marked it as
	   @deprecated

	Since oVirt Engine stopped calling it in 3.3.0, now, in 3.6.0, we
	can finally remove the call altogether. Note that this patch will make
	new VDSM versions incompatible with oVirt Engine older than 3.3.0.

	Bug-Url: https://bugzilla.redhat.com/730736

2015-04-23  Dan Kenigsberg  <danken@redhat.com>

	prepare for python 3's range
	This patch replaces xrange with range, but only where performence does
	not really matter. run-time usages of xrange would be replaced with
	six.moved.xrange in a future patch

2015-04-23  Ondřej Svoboda  <osvoboda@redhat.com>

	models: move IpConfig's members to NetDevice

	ifcfg: make _getIfaceConfValues pass ipv4, ipv6 to _createConfFile

	ifcfg: use _to_ifcfg_bool to shorten yes/no assignments

	models: move dynamic IP configuration parameters to IPv4 and IPv6

2015-04-22  Francesco Romani  <fromani@redhat.com>

	virt: support per-vm stats age
	It is possible that a VM goes rougue right at the startup,
	even before that any commmand is sent to it.
	To cover this case, VDSM marks a VM as unresponsive if stats
	are unavailable for too long, including the startup.

	This patch provides support in StatsCache to provide the
	same behaviour when switching to the new bulk stats sampling.

2015-04-22  Dan Kenigsberg  <danken@redhat.com>

	python3: use modern function and method attributes
	created with python-modernize -f lib2to3.fixes.fix_funcattrs -f lib2to3.fixes.fix_methodattrs

2015-04-22  John Taylor  <jtt77777@yahoo.com>

	vdsm: Fix memory leak in netlink/link.py
	The documentation for libnl says that calls to rtnl_link_get_by_name
	increment the reference counter and should be released by a call to
	rtnl_link_put().  That's not done in the
	_rtnl_link_get_kernel_workaround(sock, name) function where it is used
	and causes a memory leak.

	Transformed _get_link() to a context manager, add a C function prototype
	for the libnl rtnl_link_put function and if _rtnl_link_get_by_name() was
	used, call it in the finally block. This will decrement the reference
	counter so the eventual call to _nl_cache_free(cache) for the used cache
	will be able to free all of its link objects.

	Bug-Url: https://bugzilla.redhat.com/1158108

2015-04-22  Dan Kenigsberg  <danken@redhat.com>

	python3: eliminate long
	long and int are one. http://legacy.python.org/dev/peps/pep-0237/

2015-04-22  Francesco Romani  <fromani@redhat.com>

	tests: temporarily mark broken tests
	on CI, some vm *unit* tests try to reahc libvirt
	despite faking. This should not happen, and breaks
	the tests.

	Mark these tests as broken until we figure out
	the real issue, to unbreak CI.

2015-04-22  Allon Mureinik  <amureini@redhat.com>

	Stop supporting engine < 3.3
	Moving forwards to oVirt 3.6, we'd like to deprecate the support for
	older oVirt Engine versions.

	This patch removes the support for engines older than 3.3 and sets the
	foundation for removing old, deprecated, API calls that are no longer
	used in modern engines.

	Note: This patch only deals with supported ENGINES, not cluster or DC
	compatibility levels.
	I.e., this change allows VDSM to communicate with modern engines and be
	part of clusters/DCs with lower compatibility versions.
	If we wish to break the assumptions about SPM or HSM flows when working
	with modern engines, an additional patch(s) will be required to remove
	those cluster/DC versions.

	Relates-To: https://bugzilla.redhat.com/730736

2015-04-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Signs tests as broken due to wrong mocking
	Temporary solution to avoid broken uts:
	Both testHostSampleReportsNewInterface
	testHostSampleHandlesDisappearingVlanInterfaces try to communicate
	libvirt using libvirtconnection - we should mock this calls and remove
	the revert this patch.

2015-04-21  Francesco Romani  <fromani@redhat.com>

	spec: fix EPOCH of qemu rpm requirements
	In commit 1cd41107adb3dfd4816037ae84e0d12254511bc6
	I mistakenly left out the "epoch" field from the
	rpm requirements. This patch restores it to the
	appropriate values for supported platforms.

	Bug-Url: https://bugzilla.redhat.com/??????

2015-04-21  Martin Polednik  <mpolednik@redhat.com>

	hostdev: only detect IOMMU group for PCI devices
	When assigning USB and/or SCSI devices, the detach function is called
	to fetch attributes of the device. Assigning IOMMU group caused
	KeyError in this case as there are no IOMMU groups on usb/scsi buses.

2015-04-21  Francesco Romani  <fromani@redhat.com>

	virt: periodic: port queryBlockJobs
	Vm/Block Jobs monitoring is a fundamental
	part of live merge support. Most often, VMs
	do not have block jobs to monitor, so we should
	avoid unnecessary work for performance reasons.
	However, block jobs need to enter the QEMU monitor,
	so we also need to take countermeasures for possibly
	blocking operations.

	The periodic.py aka 'periodic operations' framework
	can accomodate both needs, so this patch moves the
	monitoring of the VM block jobs under the periodic.py
	umbrella, with no intended changes in behaviour nor
	in the output.

	The only code changes are limited to the glue code
	needed to adapt from former VmStatsThread framework.

	authors: add myself as contributor

2015-04-21  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Make socket blocking after detection
	Commit b25dbdcce4 (Have the protocol detector use the Reactor)
	introduced a regression, passing non-blocking sockets to the xmlrpc
	server and the tests.

	Before this commit, a socket was set to non-blocking mode when entering
	to the protocol detector, and was set to blocking mode when exiting the
	protocol detector.

	The xmlrpc server used to work by accident, because we use a timeout in
	the request handler, which set timeout on a socket, switching it to
	non-blocking mode. The jsonrpc server needs non-blocking socket, but it
	makes the socket non-blocking when accepting a socket.

	This patch restores the previous behavior, setting the socket to
	blocking mode when protocol detector pass the socket to the detector.

	protocoldetector: Do not expose internals
	Commit b25dbdcce4 (Have the protocol detector use the Reactor) exposed
	the internals of the protocol acceptor to the detectors.

	Previously detectors had a handleSocket() method, called to pass
	ownership of the client socket to the detector.  The new code replaced
	this with handle_dispatcher(), accepting a Dispatcher object.  The
	detectors are now responsible for calling dispatcher.del_channel(),
	removing the dispatcher from the event loop.

	This patch changes the detector interface so detectors get the client
	socket, and the protocol acceptor is maintaining the dispatcher.

2015-04-21  Dan Kenigsberg  <danken@redhat.com>

	convert print statements to functions
	Patch created with

	  python-modernize -f libmodernize.fixes.fix_print

	and manual fixes to pep8 damage. This is another tiny step towards
	python3 compatibility.

2015-04-21  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Fix has_expired check [3/3]
	Detector uses utils.monotonic_time(), which has a typical rsolution of 10
	milliseconds. This cause next_check_internal() to return 0 while has_expired()
	returns False. This cause a busy poll loop until utils.monotonic_time() returns
	a larger value, which takes typically 10 milliseconds.

	Now has_expired() returns True when reaching the deadline, eliminating the
	busy loop.  Comparing test_reject_very_slow_client profiles before and
	after this change show that the busy loop was eliminated.

	This change is a rather small improvement, eliminating 100-500 functions
	calls per connection on my laptop, probably more on fast servers.

	Sat Apr 18 16:54:48 2015    test-use-ssl-before.prof

	    743 function calls (750 primitive calls) in 0.006 seconds

	    Ordered by: call count
	    List reduced from 186 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       34    0.000    0.000    0.005    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	       22    0.000    0.000    0.000    0.000 socket.py:223(meth)
	       18    0.000    0.000    0.000    0.000 __init__.py:598(Logger.filter)
	       16    0.000    0.000    0.000    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	       16    0.000    0.000    0.001    0.000 betterAsyncore.py:51(Dispatcher.readable)
	       16    0.000    0.000    0.000    0.000 betterAsyncore.py:54(Dispatcher.writable)
	       16    0.000    0.000    0.000    0.000 utils.py:1220(monotonic_time)
	       13    0.000    0.000    0.000    0.000 pthreading.py:66(RLock.acquire)
	       13    0.000    0.000    0.000    0.000 pthread.py:95(RLock.lock)
	       11    0.000    0.000    0.000    0.000 posixpath.py:51(normcase)

	Sat Apr 18 16:55:09 2015    test-no-ssl-before.prof

	    1002 function calls (1009 primitive calls) in 0.007 seconds

	    Ordered by: call count
	    List reduced from 139 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       93    0.001    0.000    0.002    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	       46    0.000    0.000    0.001    0.000 betterAsyncore.py:51(Dispatcher.readable)
	       46    0.000    0.000    0.001    0.000 betterAsyncore.py:54(Dispatcher.writable)
	       46    0.000    0.000    0.001    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	       45    0.000    0.000    0.000    0.000 utils.py:1220(monotonic_time)
	       24    0.000    0.000    0.000    0.000 betterAsyncore.py:159(AsyncoreEvent.writable)
	       24    0.000    0.000    0.000    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	       24    0.000    0.000    0.000    0.000 protocoldetector.py:60(_AcceptorImpl.readable)
	       24    0.000    0.000    0.000    0.000 betterAsyncore.py:79(<lambda>)
	       24    0.000    0.000    0.000    0.000 asyncore.py:324(AsyncoreEvent.readable)

	Sat Apr 18 17:16:19 2015    test-use-ssl-after.prof

	    649 function calls (656 primitive calls) in 0.007 seconds

	    Ordered by: call count
	    List reduced from 187 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       22    0.000    0.000    0.001    0.000 socket.py:223(meth)
	       18    0.000    0.000    0.000    0.000 __init__.py:598(Logger.filter)
	       18    0.000    0.000    0.004    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	       13    0.000    0.000    0.000    0.000 pthreading.py:66(RLock.acquire)
	       13    0.000    0.000    0.000    0.000 pthread.py:95(RLock.lock)
	       11    0.000    0.000    0.000    0.000 posixpath.py:51(normcase)
	       10    0.000    0.000    0.000    0.000 threading.py:1153(currentThread)
	        9    0.000    0.000    0.000    0.000 __init__.py:713(MyMemoryHandler.format)
	        9    0.000    0.000    0.000    0.000 process.py:59(current_process)
	        9    0.000    0.000    0.000    0.000 __init__.py:693(MyMemoryHandler.acquire)

	Sat Apr 18 17:16:31 2015    test-no-ssl-after.prof

	    524 function calls (531 primitive calls) in 0.006 seconds

	    Ordered by: call count
	    List reduced from 140 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       17    0.000    0.000    0.001    0.000 socket.py:223(meth)
	       16    0.000    0.000    0.000    0.000 __init__.py:598(Logger.filter)
	       13    0.000    0.000    0.001    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	       11    0.000    0.000    0.000    0.000 pthreading.py:66(RLock.acquire)
	       11    0.000    0.000    0.000    0.000 pthread.py:95(RLock.lock)
	        9    0.000    0.000    0.000    0.000 posixpath.py:51(normcase)
	        9    0.000    0.000    0.000    0.000 threading.py:1153(currentThread)
	        8    0.000    0.000    0.000    0.000 __init__.py:713(MyMemoryHandler.format)
	        8    0.000    0.000    0.000    0.000 process.py:59(current_process)
	        8    0.000    0.000    0.001    0.000 __init__.py:736(MyMemoryHandler.handle)

	protocoldetector: Fix busy read loop [2/3]
	Profiling test_reject_very_slow_client reveal another issue in
	protocoldetector._ProtocolDetector dispatcher. The detector checks if it
	has expired in handle_read, but it is done too late, causing the reactor
	to busy loop calling handle_read:

	Sat Apr 18 16:44:11 2015    test-use-ssl-before.prof

	    480783 function calls (480797 primitive calls) in 1.050 seconds

	    Ordered by: internal time
	    List reduced from 188 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	    20880    0.275    0.000    0.825    0.000 asyncore.py:170(poll2)
	    83521    0.198    0.000    0.333    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	    20880    0.126    0.000    0.574    0.000 betterAsyncore.py:209(Reactor._get_timeout)
	    41759    0.082    0.000    0.233    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	    20880    0.079    0.000    0.095    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	    20880    0.055    0.000    0.891    0.000 asyncore.py:205(loop)
	    41759    0.047    0.000    0.214    0.000 betterAsyncore.py:51(Dispatcher.readable)
	    41759    0.044    0.000    0.205    0.000 betterAsyncore.py:54(Dispatcher.writable)
	    20878    0.041    0.000    0.105    0.000 protocoldetector.py:93(_ProtocolDetector.next_check_interval)
	    20883    0.027    0.000    0.047    0.000 utils.py:1220(monotonic_time)

	Sat Apr 18 16:44:53 2015    test-no-ssl-before.prof

	    538369 function calls (538376 primitive calls) in 1.049 seconds

	    Ordered by: internal time
	    List reduced from 145 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	    23388    0.282    0.000    0.814    0.000 asyncore.py:170(poll2)
	    93551    0.187    0.000    0.318    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	    23388    0.129    0.000    0.579    0.000 betterAsyncore.py:209(Reactor._get_timeout)
	    46774    0.082    0.000    0.234    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	    23388    0.079    0.000    0.096    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	    23388    0.056    0.000    0.881    0.000 asyncore.py:205(loop)
	    46774    0.045    0.000    0.205    0.000 betterAsyncore.py:51(Dispatcher.readable)
	    46774    0.043    0.000    0.200    0.000 betterAsyncore.py:54(Dispatcher.writable)
	    23386    0.040    0.000    0.106    0.000 protocoldetector.py:93(_ProtocolDetector.next_check_interval)
	    23388    0.029    0.000    0.049    0.000 utils.py:1220(monotonic_time)

	Now we check if a dispatcher has expired in readable(), closing the
	dispatcher. This remove the dispatcher from the reactor event loop
	immediately. Profiling the same test after this change show expected
	behavior:

	Sat Apr 18 16:54:48 2015    test-use-ssl-after.prof

	    743 function calls (750 primitive calls) in 0.006 seconds

	    Ordered by: internal time
	    List reduced from 186 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	        1    0.001    0.001    0.001    0.001 sslutils.py:291(SSLHandshakeDispatcher._set_up_socket)
	      8/9    0.000    0.000    0.006    0.001 asyncore.py:170(poll2)
	        9    0.000    0.000    0.001    0.000 __init__.py:242(LogRecord.__init__)
	       34    0.000    0.000    0.005    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	        1    0.000    0.000    0.000    0.000 pthread.py:129(Cond.wait)
	        9    0.000    0.000    0.001    0.000 betterAsyncore.py:209(Reactor._get_timeout)
	        9    0.000    0.000    0.000    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	        1    0.000    0.000    0.000    0.000 ssl.py:294(SSLSocket.close)
	        1    0.000    0.000    0.004    0.004 protocoldetectorTests.py:191(AcceptorTests.check_very_slow_client)
	        4    0.000    0.000    0.000    0.000 socket.py:185(_socketobject.__init__)

	Sat Apr 18 16:55:09 2015    test-no-ssl-after.prof

	    1002 function calls (1009 primitive calls) in 0.007 seconds

	    Ordered by: internal time
	    List reduced from 139 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	    23/24    0.001    0.000    0.004    0.000 asyncore.py:170(poll2)
	       93    0.001    0.000    0.002    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	       24    0.000    0.000    0.002    0.000 betterAsyncore.py:209(Reactor._get_timeout)
	       24    0.000    0.000    0.000    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	        8    0.000    0.000    0.001    0.000 __init__.py:242(LogRecord.__init__)
	       46    0.000    0.000    0.001    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	        1    0.000    0.000    0.000    0.000 pthread.py:129(Cond.wait)
	    23/24    0.000    0.000    0.004    0.000 asyncore.py:205(loop)
	       45    0.000    0.000    0.000    0.000 utils.py:1220(monotonic_time)
	       46    0.000    0.000    0.001    0.000 betterAsyncore.py:51(Dispatcher.readable)

	protocoldetector: Fix busy poll loop [1/3]
	Watching top during protocoldetector tests show very high (100%) cpu
	usage during the slow client test. Profiling test_detect_slow_client
	test show that the reactor is running a busy poll loop:

	Sat Apr 18 15:43:05 2015    test-use-ssl.prof

	    191917 function calls (191928 primitive calls) in 0.367 seconds

	    Ordered by: internal time
	    List reduced from 197 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	     6598    0.091    0.000    0.325    0.000 asyncore.py:170(poll2)
	    32987    0.074    0.000    0.143    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	     6598    0.036    0.000    0.160    0.000 betterAsyncore.py:209(Reactor._get_timeout)
	     6598    0.024    0.000    0.029    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	    13194    0.022    0.000    0.064    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	     6598    0.015    0.000    0.343    0.000 asyncore.py:205(loop)
	     6597    0.012    0.000    0.068    0.000 asyncore.py:105(readwrite)
	    13194    0.012    0.000    0.057    0.000 betterAsyncore.py:51(Dispatcher.readable)
	    13194    0.012    0.000    0.069    0.000 betterAsyncore.py:54(Dispatcher.writable)
	     6595    0.011    0.000    0.029    0.000 protocoldetector.py:87(_ProtocolDetector.next_check_interval)

	Sat Apr 18 15:46:09 2015    test-no-ssl.prof

	    184319 function calls (184329 primitive calls) in 0.359 seconds

	    Ordered by: internal time
	    List reduced from 148 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	     6340    0.090    0.000    0.320    0.000 asyncore.py:170(poll2)
	    31696    0.073    0.000    0.139    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	     6340    0.035    0.000    0.155    0.000 betterAsyncore.py:209(Reactor._get_timeout)
	     6340    0.022    0.000    0.026    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	    12678    0.022    0.000    0.062    0.000 betterAsyncore.py:69(Dispatcher.next_check_interval)
	     6340    0.015    0.000    0.338    0.000 asyncore.py:205(loop)
	    12678    0.012    0.000    0.057    0.000 betterAsyncore.py:51(Dispatcher.readable)
	     6339    0.012    0.000    0.064    0.000 asyncore.py:105(readwrite)
	    12678    0.012    0.000    0.068    0.000 betterAsyncore.py:54(Dispatcher.writable)
	     6338    0.011    0.000    0.028    0.000 protocoldetector.py:87(_ProtocolDetector.next_check_interval)

	The root cause is not implementing writable() method, inheriting the
	writable() method from asyncore.dispatcher, returning True. The reactor
	poll the sockets for POLLOUT, and since a socket is always writable if
	you never write to it, the reactor is waking up immediately. This
	creates a busy loop, invoking poll 6340 times for handling one
	connection, sending one line.

	Now we implement writable(), so the reactor wakes up only when data can
	be read from a socket, or when a dispatcher has expired. Profiling same
	test after this show expected behavior:

	Sat Apr 18 15:53:40 2015    test-use-ssl-after.prof

	    686 function calls (697 primitive calls) in 0.005 seconds

	    Ordered by: internal time
	    List reduced from 199 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	        4    0.001    0.000    0.001    0.000 asyncore.py:416(AsyncoreEvent.__getattr__)
	        2    0.000    0.000    0.000    0.000 pthread.py:129(Cond.wait)
	        9    0.000    0.000    0.000    0.000 __init__.py:242(LogRecord.__init__)
	        4    0.000    0.000    0.000    0.000 socket.py:185(_socketobject.__init__)
	        4    0.000    0.000    0.004    0.001 asyncore.py:170(poll2)
	       24    0.000    0.000    0.000    0.000 socket.py:223(meth)
	       16    0.000    0.000    0.004    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)
	        1    0.000    0.000    0.004    0.004 protocoldetectorTests.py:184(AcceptorTests.check_slow_client)
	       15    0.000    0.000    0.000    0.000 pthread.py:95(RLock.lock)
	        1    0.000    0.000    0.000    0.000 ssl.py:294(SSLSocket.close)

	Sat Apr 18 16:23:43 2015    test-no-ssl-after.prof

	    541 function calls (551 primitive calls) in 0.006 seconds

	    Ordered by: internal time
	    List reduced from 145 to 10 due to restriction <10>

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	        2    0.002    0.001    0.002    0.001 threading.py:561(_Event.__init__)
	        8    0.000    0.000    0.001    0.000 __init__.py:242(LogRecord.__init__)
	        2    0.000    0.000    0.000    0.000 pthread.py:129(Cond.wait)
	        1    0.000    0.000    0.001    0.001 protocoldetectorTests.py:184(AcceptorTests.check_slow_client)
	    20/21    0.000    0.000    0.001    0.000 socket.py:223(meth)
	        8    0.000    0.000    0.001    0.000 __init__.py:736(MyMemoryHandler.handle)
	        3    0.000    0.000    0.000    0.000 socket.py:185(_socketobject.__init__)
	       13    0.000    0.000    0.000    0.000 pthread.py:95(RLock.lock)
	        8    0.000    0.000    0.001    0.000 __init__.py:1302(Logger.callHandlers)
	       10    0.000    0.000    0.004    0.000 betterAsyncore.py:139(Dispatcher._delegate_call)

	protocoldetector: Fix next_check_interval
	Commit b25dbdcce4 (Have the protocol detector use the Reactor) added the
	check_next_interval() interface, returning the timeout until the next
	check. However the implementation in some of the dispatchers was wrong,
	always returning 0. This cause the event loop to run a busy polling loop
	instead of waiting until the next dispatcher check time.

2015-04-20  Francesco Romani  <fromani@redhat.com>

	virt: vmxml: remove writexml hack
	VDSM >= 3.6 will run on python >= 2.7,
	hence it is time to drop this ancient writexml
	hack.

2015-04-20  Ido Barkan  <ibarkan@redhat.com>

	DhclientLeases does not need to be skipped if el6 (el6 is not supported anymore)

	remove support for legacy bonds.
	Legacy bonds only apply in el6 which is not supported in master anymore

	dnsmasqDhcp does not need to consider el6 anymore

	delete_dhclient_leases does not need to consider el6 anymore

2015-04-20  Darshan N  <dnarayan@redhat.com>

	gluster: adds a verb to check if a gluster volume is empty
	This patch adds a verb volumeEmptyCheck which checks if a
	gluster volume is empty or not. This verb takes gluster
	volume name as an argument and returns a flag
	volumeEmptyCheck. This check is needed during geo-replication
	create, as it is recomemded to have the remote volume
	to be empty. So while creating a geo-rep session engine
	has to check if slave volume is empty.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1207960

2015-04-19  Martin Polednik  <mpolednik@redhat.com>

	hostdev: remove usb detach/reattach calls
	These calls were introduced to allow behaviour as stated by libvirt
	documentation, which was wrong in regard to USB. There is no need for
	any kind of detach/reattach calls to be made.

2015-04-19  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix detector read loop
	Detector read loop was ignoring empty string returned from recv(),
	signaling disconnected socket, and was calling recv() again, blocking
	until process shutdown. During shutdown, the call would return into a
	partly shutdown interpreter, failing with impossible AttribueError.

2015-04-19  Dan Kenigsberg  <danken@redhat.com>

	unbreak pyflex test
	due to commit 5c3ab8c

2015-04-18  Martin Sivak  <msivak@redhat.com>

	Fix the CPU quota MOM policy computations
	This changes the way we compute period and quota to what
	is described in the documentation:

	The maximum CPU load percentage is related to the total computing
	power the host has.

	Two issues are also fixed by this:

	- the period could get below 1000 with low enough percentage
	  or high enough vCPU count and libvirt won't accept that

	- the quota number was higher than period when vCPU count was
	  lower than the number of physical CPUs, effectively disabling
	  the CPU limits

	An additional improvement in performance should be visible for
	VMs that do not use cpu limiting (using 100% as the limit),
	because the policy disables cgroups limit tracking in that case.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1207610

2015-04-18  Shahar Havivi  <shaharh@redhat.com>

	Build fix: missing v2v directory
	Creation of v2v directory is missing from Makefile

2015-04-18  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: Remove redundant code

	stomp: Make sure the \0 is a last char in the buffer
	We need to provide sanity check to be sure that buffer contains \0 as
	last character.

	Bug-Url: http://bugzilla.redhat.com/1169100

2015-04-18  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: make subscription class local

	jsonrpc: extending buffer size
	For performance reasons we want to process bigger chunks of data when
	processing incoming messages from the engine.

	Most of the engine messages are less then 4k so this means that single
	recv call returns at least one complete message.

	stomp: parsing buffer refactoring
	Refactored how we manage buffer and parser state in Parser class.
	We have decided to drop dependency on cStringIO due to need of
	searching which is not possible without converting.

	Due to need for searching and required conversion this change makes
	processing faster.

	stomp: resetting outgoing buffer
	When we loose connectivity there can be still heartbeat frame in
	outgoing buffer and we need to be sure that we clear the buffer before
	responding with CONNECTED frame.

	stomp: Stomp encoder\decoder improvements
	We need to make sure to escape special characters during encoding and
	decoding. During encoding, use more efficient string join instead of
	string concatenation due to its speed.

2015-04-18  Nir Soffer  <nsoffer@redhat.com>

	dump-volume-chains: Nicer output when no volumes found
	When no volumes found, print clear message instead of title and no
	output:

	    $ vdsm-tool dump-volume-chains ce362d37-ba2f-47c4-b46c-d71ee24019a8

	             (no images found)

2015-04-18  Francesco Romani  <fromani@redhat.com>

	vm: hyperv: switch to 'hypervclock' clock source
	Move to 'hypervclock' clock source, as it is recommended by
	the 'HyperV enlightenment' enhancement patchset.

	A noteworthy side effect of this change is the disappareance of the
	'track=guest' attribute for clock source for windows guests, which
	we introduced in commit f59abc1c321fa0f.

	The reason we added 'track=guest' back in time are outlined here:
	  http://libvirt.org/formatdomain.html#elementsTime

	However, that was done only for hyperv guests, under the assumption that
	1. only windowses benefit from this setting
	   https://support.microsoft.com/en-us/kb/2687252
	2. other OSes either didn't care or didn't gain anything.

	Now we want to switch from name=rtc to name=hypervclock, but we run this
	issue (quoting libvirt docs):

	  track
	    The track attribute specifies what the timer tracks, and
	    can be "boot", "guest", or "wall". Only valid for
	    name="rtc" or name="platform".

	Hence, if we move from "rtc" to "hypervclock", the "track=guest"
	attribute must go away, only because hypervclock doesn't support it.

	Bug-Url: https://bugzilla.redhat.com/1083529

2015-04-17  pkliczewski  <piotr.kliczewski@gmail.com>

	protocoldetecor: fd leak fix
	When running networkTests (xmlrpc) we noticed that each connection to
	vdsm leaks a fd. After the investigation we noticed that even that
	SSLSocket is closed the fd was not released. M2C releases fd by calling
	raw socket.close() in __del__ method. This means that there is somewhere
	referece kept to a socket object. After further investigation it was
	clear that socket reference is hold by Dispatcher object.

	There was an issue when we create new dispatcher and not pass map param
	socket_map is used instead. socket_map is never updated after initial
	creating which creates ref leak.

	betterAsyncore: remove method binding
	We want to restore mechanism that was used in 3.5 and not use method
	binding. Here are the reasons why we want to revert functionality:
	- The code is easier to understand and maintain
	- We need to implement method unbinding so this code is more concise
	- We had no issues with this code being used in 3.5

2015-04-17  Francesco Romani  <fromani@redhat.com>

	virt: sampling: add StatsCache docs and tests
	Improve commit 3bc0043822 adding tests and
	docstrings for StatsCache.

2015-04-17  Martin Polednik  <mpolednik@redhat.com>

	functional tests: add basic device verification
	With upcoming refactoring in getUnderlying* family of methods, we need
	to add atleast some test coverage. This test aims to be very wide,
	veryfing that the device parsing logic works at the highest level.

2015-04-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Mark time sensitive tests as @stresstest
	Piotr reported that the xxx_many tests were failing on slow machines.

	The xxx_many tests are sentivie to timing may fail on slower machines.
	They are not meant for runing on overloaded CI slaves.

	These tests are marked now as @stresstest. To run them you should use:

	    ./run_tests_local.sh --enable-stress-test

	Or:

	    make check-all

	virt: Continue to collect extend candidates after errors
	Previously, if we had one bad drive that libvirt fail to get watermarks,
	we would stop collecting extend candidates and log a traceback. This
	would cause a vm to pause, since we may never extend any of its disks,
	and the log would be littered with unhelpful tracebacks.

	Now we log an error in such case and continue to collect extend
	candidates, so error with one disk cannot effect other disks.

	virt: Fix handling of improbable allocation size
	If qemu reports improbable allocation value, we pause the vm to prevent
	corruption. Unfortunately, just before pausing the vm, we attempt to log
	an error with list of arguments instead of a string, and crash before
	pausing the vm:

	    TypeError: not all arguments converted during string formatting

	Now we log the error message and pause the vm.

	virt: Use Drive.getNextVolumeSize() for validation
	When validating drive watermarks in Vm._shouldExtendVolume(), we were
	not using Drive.getNextVolumeSize() since it used to rely on cached
	values of drive size, which may lead to vm being paused if cached values
	are stale.

	The code used special calculation bypassing Drive.volExtensionChunk
	property, which was considering drive replication status.  Now that
	Drive.getNextVolumeSize() is not using cached values, there is no
	reason for special calculation.

	virt: Remove redundant bool()
	Comparisons yield boolean values, there is no need for creating a new
	bool() from the result.

	See https://docs.python.org/2/reference/expressions.html#not-in

	virt: Improve volume extension info readability
	Format dict using one line per item and sort by the key. This makes the
	code easier to read and modify.

	virt: Extract Vm.__extendDriveReplica method
	Vm.extendDriveVolume() was either calling Vm.__extendDriveVolume, or
	implementing extending of drive replica. This is mixing different level of
	abstraction in one method which makes the code harder to understand and
	lead to code duplication.

	Now replica extension is handled in new Vm.__extendDriveReplica()
	method, simplifying Vm.extendDriveVolume().

	Before we use getattr(drive, "DiskReplicate", None) to check if drive
	has an attribute. Now using hasattr to make the intent of the code more
	clear.

	virt: Introduce Vm._setVolumeSize helper
	We have two place invoking self.cif.irs.setVolumeSize(), ignoring errors
	without documenting the reason. This patch adds Vm._setVolumeSize()
	helper that raises on errors, eliminating such code.

	We use setVolumeSize() when extending a disk. First we set volume size to
	0, marking it as in transaction. Then we update the guest about the new
	size via libvirt, and finally we store the new size in the volume.

	In the first setVolumeSize() call setting volume size to 0, it is clear
	that we want to fail the operation, so using _setVolumeSize() the
	request fails without additional error handling code.

	The second setVolumeSize() call updating the volume to the actual new
	size is done after the vm was updated and can use the new device, so it
	is not clear if we should fail the request or just warn about the
	incorrect meta data in the volume (size=0). This patches changes the
	behavior to fail the request in this case.

	vm: Introduce Vm._getVolumeSize() method
	There are too many places calling self.cif.irs.getVolumeSize(), then
	checking for nonzero res["status"]["code"], raising random exception,
	or converting returned strings to integer.

	This patch introduce a new method that:

	- Raise StorageUnavailableError on nonzero status code, so we don't have
	  to check for errors when we cannot handle them, and we cannot forget.

	- Return VolumeSize namedtuple with integer values, making the calling
	  code less error prone and nicer to work with.

	This change reveal one call site that was not checking for
	getVolumeSize() errors, and could fail with KeyError. Now it will fail
	with StorageUnavailableError which is more helpful for debugging.

	virt: Unify Drive size units
	Previously we used to keep some Drive size values in bytes and some in
	megabytes, and return next and max volume size in megabytes. We had lot
	of code converting sizes from megabytes to bytes. This mess makes
	the code harder to understand and error prone.

	Now we keep all size values in bytes and return next volume size in
	bytes, simplifying lot of code.

2015-04-15  Yeela Kaplan  <ykaplan@redhat.com>

	migration: change destServer attribute to private

2015-04-15  Francesco Romani  <fromani@redhat.com>

	vm: hyperv: support more libvirt optimizations
	This patch adds support for more of the libvirt optimizations for HyperV,
	the 'vapic' and 'spinlock' settings.

	The optimizations are both for stability and for performance, and they
	are added on top of the existing basic HyperV support.

	The parameters are hardcoded and not externally configurable because
	they are not supposed to be changed very often, if changed at all;
	moreover, this patch already implements the optimal recommended settings.

	Bug-Url: https://bugzilla.redhat.com/1083529

2015-04-15  Shahar Havivi  <shaharh@redhat.com>

	Fix MigrationStatus schema
	MigrationStatus json schema is broken

2015-04-15  Ido Barkan  <ibarkan@redhat.com>

	unbreak crossImportsTests
	get_python_lib(plat_specific=True) returns
	/usr/lib64/python2.7/site-packages which is no longer true for vdsm
	installations.

2015-04-14  Allon Mureinik  <amureini@redhat.com>

	spec: clean up selinux requirement
	While spec files support the syntax of
	package_name >= package_name-version, it's ugly and doesn't follow
	the standards of vdsm's spec file.

	This patch cleans up the bad form used for selinux's requirement.

2015-04-14  Ido Barkan  <ibarkan@redhat.com>

	shell_helper: remove unneeded build statements

2015-04-14  Ondřej Svoboda  <osvoboda@redhat.com>

	vdsm_hooks: always build vmfex_dev (regardless of --enable-hooks)
	This makes the hook shipped by default with VDSM rpm.

2015-04-12  Ido Barkan  <ibarkan@redhat.com>

	storage: introducing vdsm-tool dump-volume-chains
	This command queries VDSM about the existing structure of image
	volumes and prints them in an ordered fashion with additional
	info per volume.

2015-04-11  pkliczewski  <piotr.kliczewski@gmail.com>

	stomp: make sure we use the minimum space for Frame instance variables
	We are expecting to process large number of frames so we want to make
	sure we use minimum space for instance variables.

2015-04-11  Shahar Havivi  <shaharh@redhat.com>

	v2v: Introduce OutputParser
	OutputParser is a parser for virt-v2v process output.
	It analyze the phases of copying disk and each copy disk progress
	and generate stream of parsing events.

2015-04-11  Ido Barkan  <ibarkan@redhat.com>

	vdscli: make _ADDRESS and _PORT public

2015-04-11  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Configurable actions on console disconnect
	We're now introducing configurable actions to be executed on spice disconnect.
	The action is defined on ticket creation. The actions can be any of:
	- None (No action taken)
	- Screen Lock (Lock screen executed by the guest agent)
	- Logout (Logout of the current session - Executed by the guest agent)
	- Reboot (Reboot the virtual machine)
	- Shutdown (Shutdown the virtual machine)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1171638

2015-04-11  Darshan N  <dnarayan@redhat.com>

	gluster: Handle gluster exceptions in json rpc mode.
	This patch adds code to handle gluster exceptions in
	JSON rpc mode. Earlier gluster exceptions were not
	propagated properly in json rpc mode.

	Bug-Url: https://bugzilla.redhat.com/1207150
	Bug-Url: https://bugzilla.redhat.com/1184380
	Bug-Url: https://bugzilla.redhat.com/1184376

2015-04-11  Ondřej Svoboda  <osvoboda@redhat.com>

	vmfex_dev hook: also uninstall from before_device_migrate_destination

2015-04-11  Ala Hino  <ahino@redhat.com>

	build: Update required device-mapper-multipath version
	Changed vdsm spec file to require device-mapper-multipath version that solves
	segfault in multipath.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1199217

2015-04-09  Nir Soffer  <nsoffer@redhat.com>

	vdsm-tool: Sort imports

2015-04-08  Ala Hino  <ahino@redhat.com>

	udevadm: Handle errors and timeouts in udevadm.settle()
	In commit 4c10d3d10c (multipath: Wait for udev events after rescan) we started
	to invoke udevadm.settle() during multipath.rescan(). Since rescan is performed
	in the storageRefresh thread, and we did not handle exceptions, a timeout in
	udevadm.settle() will cause HSM initialization to fail and leave vdsm in
	"initializing" state.

	udev timeout behavior is undocumented. Looking into the code, we found two types
	of logic:
	- On el6, el7 and f20, if timeout occurs, rc=1 and timeout info
	  printed to stdout
	- On f21, timeout is ignored. We opened bz for udev to fix this:
	  https://bugzilla.redhat.com/1209474

	Handling the errors in settle() rather than propagating them seems more useful
	because we do not want to fail the entire operation only because udev fails to
	wait for events.  This is the same behavior implemented in hba.rescan.

	Relates-To: https://bugzilla.redhat.com/1205877

2015-04-08  Nir Soffer  <nsoffer@redhat.com>

	spec: Update libvirt-daemon and libvirt-python requirements
	The errata RHBA-2015:0742-05 fixes bug 1177220 by updating libvirt to
	version 1.2.8-16.el7_1.2.  Details from the advisory follow:

	When using the QEMU emulator to search for a file name in a backing
	chain, QEMU previously searched for an incorrect string. As a
	consequence, QEMU was unable to perform blockpull and blockcommit
	actions involving the affected part of the backing chain. With this
	update, libvirt queries the QEMU version of the string associated with a
	backing chain element. As a result, it is now possible to create
	multiple snapshots and then use consecutive blockcommit actions to clear
	the snapshots. (Bug 1203119)

	In order to resolve the problems with live merge we must require this
	version of libvirt on EL7 hosts. On Fedora this fix is available only in
	1.2.14, which available only on Fedora 22. When running on Fedora < 22,
	we don't have any fix yet to this issue.

	This version of libvirt also includes a fix for LSM (Bug 1176673). The
	libvirt flag VIR_DOMAIN_BLOCK_REBASE_COPY_DEV was added to libvirt and
	the python bindings and will be used by vdsm to make sure block disks
	are handled properly by libvirt.  We need both libvirt-daemon >=
	1.2.8-16.el7_1.1 and libvirt-python >= 1.2.8-7.el7_1.1 for a complete
	fix to the problem.

	Note that we can require new libvirt-daemon only when when building
	RHEV, since our CI is still using Centos 7.0.

	Bug-Url: https://bugzilla.redhat.com/1158563
	Bug-Url: https://bugzilla.redhat.com/1176673

	vdsm-tool: Remove unneeded imp import
	In commit 07beba9e139 (Hack vdsm >=4.16.x for vdsm-tool import issues
	during upgrade) an unneeded imp import was added. This patch removes the
	additional imp import as imp is already used in this module.

2015-04-07  Ido Barkan  <ibarkan@redhat.com>

	network: Force blocking DHCP when restoring networks
	This is done right before restoring the network configuration, and
	before calling setupNetworks. It forces the configurator to wait for
	an IP address to be configured on the devices before restoration is
	completed. This prevents VDSM from possibly report missing IP
	addresses on interfaces that had been restored right before it was
	started.

2015-04-07  Nir Soffer  <nsoffer@redhat.com>

	betterAsyncore: Fix event loop data stealing [2/2]
	In this patch we override asyncore.dispatcher.del_channel() and set
	dispatcher.connected to False after a dispather was removed from the
	event loop. This breaks out of the pending data read loop in
	Dispatcher.handle_read_event().

	betterAsyncore: Fix event loop data stealing [1/2]
	When a dispatcher is removed from the event loop from a handle_read()
	handler, and the underlying socket has pending data, the event loop
	could steal data from the socket, invoking handle_read() multiple times,
	detecting multiple connections for one connection.

	In this patch we add little sleep before handling the request in the
	protocol detectors, revealing this issue in the protocolDetector tests.

	Following is protocol detector log from failing
	test_detect_uppercase(use_ssl=True), sending one request:

	-------------------- >> begin captured logging << --------------------
	vds.MultiProtocolAcceptor: INFO: Listening at 127.0.0.1:39304
	vds.MultiProtocolAcceptor: DEBUG: Adding detector <protocoldetectorTests.Echo object at 0x29878d0>
	vds.MultiProtocolAcceptor: DEBUG: Adding detector <protocoldetectorTests.Uppercase object at 0x2987690>
	vds.MultiProtocolAcceptor: DEBUG: Running
	ProtocolDetector.AcceptorImpl: INFO: Accepting connection from 127.0.0.1:32855
	ProtocolDetector.Detector: DEBUG: Using required_size=9
	ProtocolDetector.Detector: INFO: Detected protocol uppercase from 127.0.0.1:32855
	ProtocolDetector.Detector: INFO: Detected protocol uppercase from 127.0.0.1:32855
	ProtocolDetector.Detector: INFO: Detected protocol uppercase from 127.0.0.1:32855
	ProtocolDetector.Detector: INFO: Detected protocol uppercase from 127.0.0.1:32855
	ProtocolDetector.Detector: WARNING: Unrecognized protocol: ' testing '
	--------------------- >> end captured logging << ---------------------

	Note that same connection from 127.0.0.1:32855 was detected 5 times! In the
	application, this would cause one connection to be handled by multiple threads
	in xmlrpc or jsonrpc servers.

	The last event show data stealing - "uppercase: " was stolen from the
	socket buffer by the event loop.

2015-04-07  Amador Pahim  <apahim@redhat.com>

	iscsi: Fix iscsi_host path lookup for hardware iSCSI.
	In commit a78793935e (Configure iSCSI iface.net_ifacename), we
	introduced the iface.net_ifacename probe for active sessions. We use
	the sessionID to locate /sys/class/iscs_host/host* and read the
	netdev attribue.

	However, we looked up the session in /sys/devices/platform/host*
	which is correct only for software iSCSI. For hardware iSCSI, the
	session is located in /sys/devices/pci*/*/*/*/host*.
	This patch locates the host using the real iscsi_session path, which
	works for both software and hardware iSCSI.

	Bug-Url: https://bugzilla.redhat.com/1197292

2015-04-07  Nir Soffer  <nsoffer@redhat.com>

	spec: Simplify libvirt dependencies
	Replaced nested if-else structure with single ifs per ditro/version,
	which are easier to understand and maintain.

	On Fedora, we required libvirt instead of libvirt python - this looks
	like a mistake that works becuase we require also libvirt-daemon-xxx
	packages. Now we require libvirt-daemon like in rhel >= 7.

	Relates-To: https://bugzilla.redhat.com/1158563
	Relates-To: https://bugzilla.redhat.com/1176673
	Relates-To: https://bugzilla.redhat.com/1200718

2015-04-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using vdsm-tool restore-conf in init script instead of direct call
	This caused a bug on vdsm upgrade from 4.14 to 4.16 (see commit message
	in https://gerrit.ovirt.org/#/c/39408/). Using vdsm-tool fix
	the import from site-packages. This patch adds the --force option to the
	verb.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1200467

	Hack vdsm >=4.16.x for vdsm-tool import issues during upgrade
	Since oVirt 3.5 (vdsm 4.16) we started to install vdsm site-packages under
	/usr/lib (python_sitelib). In sys.path the import order first check
	under
	/usr/lib64. While upgrading vdsm 3.4 to >=3.5 we perform configure call in
	%postun which calls vdsm-tool, vdsm-tool tries to import vdsm.tool which
	exists both under /usr/lib and under /usr/lib64 in this specific case
	before all vdsm 3.4 files were removed. In such case we get failures all
	over.

	This patch hacks the import part and takes care of importing vdsm.tool
	from the /usr/lib on upgrade.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1200467

2015-04-02  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix RescanTimeoutsTests
	In commit 4c10d3d10c (multipath: Wait for udev events after rescan) I
	removed unneeded and badly implemented minimal timeout, and the unneeded
	optional arguments in iscsi.rescan() but forgot to update the tests.

	In this patch:

	- remove the now unneeded and broken test for minimal timeout
	  (the test was passing while the code was broken)
	- simplify the testing infrastructure
	- instead of passing arguments to rescan, monkey-patch the config.
	- use safe monkey-patching.
	- use monotonic_time
	- use real process so we get SIGCHLD when the scan is finished;
	  otherwise, the tests may pass while the code is broken
	- add test for normal operation

2015-03-31  Adam Litke  <alitke@redhat.com>

	Live Merge: work around racy libvirt pivot
	Libvirt version 1.2.8-16.el7_1.2 introduced a bug where the synchronous
	call to blockJobAbort (which we use to pivot to the new leaf after an
	active layer merge completes) will return before the domain XML has been
	updated.  This makes it look like the pivot failed when it actually
	succeeded.  This means that vdsm state will not be properly synchronized
	and we may start the vm with a stale volume in the future which will
	corrupt the VM's storage.  See
	https://bugzilla.redhat.com/show_bug.cgi?id=1202719 for more details.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1206722

2015-03-31  Francesco Romani  <fromani@redhat.com>

	virt: sampling: add StatsCache
	StatsCache is a small helper class which will be used
	by the bulk stats sampling code to properly deal with
	blocked calls, to avoid overwriting fresh samples
	with stale one and to easiliy retrieve the per-vm
	stats from the bulk stats.

	virt: stats: split up stats production
	VDSM needs to translate the stats it gathered -mostly
	from libvirt- in the format established in the
	VDSM schema, which is the format the consumers
	of its API (read: Engine) expect.

	To do so, we used to have a bunch of methods in
	the VmStatsThread class. But such methods actually
	used few if any at all of the class state, so
	it is better to make them simple functions.

	This is what this patch does.

2015-03-31  Dan Kenigsberg  <danken@redhat.com>

	drop needless import to make pylakes happy
	should have been part of commit 4c10d3d10.
	iscsiTests.RescanTimeoutTests is to be fixed in another patch.

2015-03-31  Francesco Romani  <fromani@redhat.com>

	numa: unbreak tests after move to periodic
	Due to a rebase mistake, this hunk which
	fixes the tests after the move to periodic operations,
	was included into the wrong change.

	This patch extracts to unbreak current master.

	virt: periodic: port updateNumaInfo
	Move the NUMA info gathering from sampling thread
	to periodic operations.

	No intended changes in output.

	virt: numa: move activation check in the caller
	The existing NUMA position reporting code is activated
	only if a VM is configured with 'virtual NUMA', referred
	in the code as 'guest Numa Node'.
	If this configuration is absent, the NUMA sampling just
	does nothing.

	Besides naming, this makes the code a bit harder to read
	and to reason about, since often readers assume NUMA positioning
	reporting always executed.

	To make this easier to read, and to make room for future patches
	which want to move NUMA sampling in periodic operations,
	we move this check into the calling site(s), with no other intended
	changes in the flow of code.

	virt: periodic: port updateVolume
	During the lifetime of a VM, its volumes need
	to be updated. This is a task carried by the
	'updateVolumes' operation, which was formerly
	piggybacked in the sampling threads.

	But actually 'updateVolumes' is a perfect candidate
	to motivy the need of a 'periodic operations' infrastructure
	to run bookkeeping tasks of the VMs.

	So, this patch bootstraps the usage of the newly
	added 'periodic' infrastructure by moving 'updateVolumes'
	away from sampling threads, and making it a periodic operation.

	virt: periodic: dispatch work to VMs
	This patch adds a class to demultiplex an Operation on per-VM
	operation. This is useful to minimize interference
	among VMs in case of one operation gets stuck.

	Alternative approaches have veen considered, but them
	did not provided clear advantages to this approach:

	- use per-VM operations, like it was done in the earliest
	scalable_sampling concepts. This guarantees the highest
	VM safety, as no more than one sampling operation can
	be done to a given VM in a given time instant, but fits
	poorly with libvirt bulk stats API, and add pressure to
	Scheduler and Executor (OTOH, we have object living longer).

	- move demultiplexing in Operation class this way Operation
	becomes less generic, and more tied to VM.

	virt: introduce support for periodic operations
	In order to keep track of the state of a VM,
	the virt code needs to perform periodic operations,
	most notably statistics sampling and bookkeeping.
	Currently, these operation are piggybacked
	in the sampling threads, just because this is a simple
	and cheap way to run some code asynchronously
	and periodically.

	Besides overloading 'sampling' with bookkeeping,
	these operation can't fit nicely in the bulk stats
	approach that we want to adopt to improve scalability.

	What we really need is a reliable method to run async,
	periodically operations on VM instances.
	Later, we can fit sampling in this framework
	in a nicer and cleaner way.

	As part of the sampling improvement effort, we added
	two generic utilities which provide great buliding
	blocks to create a periodic operations infrastructure,
	'executor' and 'scheduler'.

	So, this patch lays down the basic infrastructure
	to run async/periodic VM-related operations, and start
	moving bookkeeping operations to them.

2015-03-31  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Wait for udev events after connect
	Connecting to iSCSI target starts a storm of udev events, that may not
	be handled yet when iscsiadm terminates. This may lead to missing
	devices and failures when creating storage domain.

	Now we wait until current udev events are handled after connecting,
	using new udevadm.settle(). The timeout can be configured using the
	new irs:scsi_settle_timeout option.

	Bug-Url: https://bugzilla.redhat.com/1205877

	multipath: Wait for udev events after rescan
	Previously we were using time.sleep(2) for waiting at least 2 seconds
	after starting iSCSI sessions rescan. This wait was useless for two
	reasons:
	- The sleep was interrupted as soon as iscsiadm process terminated
	- Udev events generated by the SCSI scan and by processing udev rules
	  may not been handled yet when iscsiadm existed.

	This patch replaces the minimal scsi timeout with udevadm.settle(),
	waiting until current udev events are handled.  Since we perform both FC
	and iSCSI scan, the correct place for waiting is in multipath.rescan()
	and not in iscsi.rescan().

	A new configuration was introduced, allowing fine tuning of settle
	timeout in the field.

	    [irs]
	    scsi_settle_timeout = 5

	Relates-To: https://bugzilla.redhat.com/1205877

2015-03-30  Francesco Romani  <fromani@redhat.com>

	spice: allow to disable the agent file transfer
	Spice has agent based file transfer support.
	This option can be disabled in QEMU, and  libvirt has support
	to pass this flag to the underlying QEMU.

	This patch expose this capability in VDSM, in the VM definition,
	implementing the VDSM part of bz983019.
	The new parameter is optional and enabled by default for backward
	compatibility.

	No XML changes are produced at all unless the new parameter is
	specified.

	Bug-Url: https://bugzilla.redhat.com/983019

	packaging: bump libvirt requirements
	With RHEL/Centos 7.1 out of the door, it is
	time to bump our libvirt requirements.

2015-03-30  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: use the atomic dict.setdefault() instead for check and set
	This is faster and simpler.

	jsonrpc: Properly log and return an error if the threadFactory fails
	Otherwise if scheduling fails there will be a thread error and no
	messages will be handled while VDSM still runs.

	jsonrpc: Fix callMethod in JsonRpcClient
	In order to call a verb using JsonRpcClient we have several methods that
	we can use. We can call method asynchronosuly (call_async) or
	synchronously (call). callMethod help with building JsonRpcRequest and
	raises an Error in case of any issues occuring on the other side.
	callMethod was using call_batch which is not needed so we have decided
	to merge both methods and get rid of call_batch as well as fix issues
	around single vs batch.

	jsonrpc: Properly initialize RuntimeError for JsonRpcError
	Without this, the error doesn't have a proper message when printed\logged

	asyncore: heartbeat fix
	When getting new timeout for asyncore loop we get None several times in
	a row we are forced to wait for dispatcher event. We expect to process
	heartbeat events so we need to set timeout to asyncore default value
	which is 30 seconds.

2015-03-30  Darshan N  <dnarayan@redhat.com>

	gluster: Fix arguments name for geo-replication status verb.
	Fixed arguments name in apiwrapper and vdsmapi-gluster-schema
	for geo-replication status verb.

2015-03-28  Nir Soffer  <nsoffer@redhat.com>

	udevadm: Add udevadm wrapper
	Add udevadm wrapper for running udevadm tool. In the current version the
	wrapper implement only the settle() command, which should be used to
	wait for events after modifying scsi connections.

	Relates-To: https://bugzilla.redhat.com/1205877

2015-03-27  Ido Barkan  <ibarkan@redhat.com>

	no need to call setupNetworks with empty argument during network restoration
	It is not smart to trust setupNetwork implementation so that it is really a
	no-op when called with empty input.

2015-03-27  Francesco Romani  <fromani@redhat.com>

	tests: add negative tests for setNumberOfVcpus
	Failures are more cumbersome to tests, due to need
	to inject errors or to cause them.
	Add tests to do basic sanity tests, and to help
	verification of the upcoming response.error() transition
	patches.

2015-03-27  Dan Kenigsberg  <danken@redhat.com>

	net: sourceroute: demote error log message
	DHCP server may provide vdsm with partial IP information (one of IPADDR,
	NETMASK or GATEWAY is missing). This is not Vdsm's fault, and should not
	marked as an error.

2015-03-27  Martin Polednik  <mpolednik@redhat.com>

	ppc64le: add fake kvm support
	Fake kvm requires correct cpu model and flags for ppc64le. This patch
	adds ppc64le detection for this in caps.

2015-03-27  Nir Soffer  <nsoffer@redhat.com>

	utils: Add round() helper
	We have the same rounding code all over, which does not make the code
	more fun to work with. This patch adds utils.round() utility to
	eliminate this duplication.

2015-03-27  Shmuel Melamud  <smelamud@redhat.com>

	virt: configurable sampling interval for HostStatsThread
	Sampling interval for HostStatsThread was hardcoded and set to 2s which
	is too short.

	Added new configuration option host_sample_stats_interval for this
	purposes. Sampling interval is set to 15s by default.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1185279

2015-03-27  Francesco Romani  <fromani@redhat.com>

	clientIF: stop VmStatsThread on shutdown
	Explicitily stop VmStatsThreads when VDSM is shutting down.
	This patch makes the flow faster and safer when libvirtd crashes
	Without this patch, the VmStatsThread exit on shutdown because
	they find Vm._dom equals None, and they exit with a stacktrace
	as soon as they woke up for their polling.

	With this patch, we make things explicit.

	Relates-To: https://bugzilla.redhat.com/1203210

	vm: add stopVmStats method
	Add a method to allow clients of Vm class to shutdown
	the VmStatsThread.

	virt: make _initVmStats public
	A followup patch want to add an explicit stopVmStats method.
	Currently, we have a private helper to start the Vm Stats Thread:
	_initVmStats.

	It could be surprising to have a private method to start and
	a public one to stop, so this patch renames _initVmStats into
	startVmStats to make the flows symmetric, with no further
	changes in the code flow.

2015-03-27  Petr Horáček  <phoracek@redhat.com>

	virt: keep libvirt's <driver> element
	Most commonly, vdsm does not supply the <driver> element to libvirt, so
	that libvirt is able to apply its logic for setting the correct one
	(qemu/vhost).

	Once libvirt has chosen the driver, it must not change. When link state
	is modified, the chosen driver must be stated explicitly.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1200418

2015-03-26  Francesco Romani  <fromani@redhat.com>

	virt: ExpiringCache: implement __nonzero__
	Truthy test is now required by bulk stats sampling code.

2015-03-26  Martin Polednik  <mpolednik@redhat.com>

	ppc64le: Add default device configs for this arch
	PPC64le is very similar in terms of what we do in vdsm to PPC64. This
	patch updates branches to consider default devices and busses.

	ppc64le: virt: support for running ppc64le systems
	Our architecture check lacked ppc64le. This patch fixes it by adding it
	as a supported architecture and adding default machine type for it.

2015-03-26  Francesco Romani  <fromani@redhat.com>

	vm: method to check if dom is ready for commands
	add a method to VM object to check if the underlying libvirt
	domain is ready to accpet commands.

	Here we want to easily rule out known-bad situations rather
	than look for known-good situations.

2015-03-26  Darshan N  <dnarayan@redhat.com>

	gluster: modified parsing logic in snapshot config list.
	Modified snapshot config parsing logic to return only
	effective-hard-limit as snapmax-hard-limit in volume
	config. As the remaining two values are not relevant.

2015-03-26  darshan n  <dnarayan@redhat.com>

	gluster: get rdma port number as part of volume status.
	In glusterfs volume status command is modified to
	retrive rdma port number along with tcp port. This
	patch adds parsing of the newly added rdma port
	number. The modified gluster volume status verb
	returns the rdma port as follows.

	{'name': NAME,
	   'bricks': [{'brick': BRICK,
	               'hostuuid': UUID,
	               'port': PORT,
	               'rdma_port': RDMA_PORT  #newly added
	               'status': STATUS,
	               'pid': PID}, ...],
	          'nfs': [{'hostname': HOST,
	                   'hostuuid': UUID,
	                   'port': PORT,
	                   'rdma_port': RDMA_PORT  #newly added
	                   'status': STATUS,
	                   'pid': PID}, ...],
	          'shd: [{'hostname': HOST,
	                  'hostuuid': UUID,
	                  'status': STATUS,
	                  'pid': PID}, ...]}

2015-03-26  Darshan N  <dnarayan@redhat.com>

	gluster: Modified geo-rep verbs to include newly added "user"
	In this patch all the geo-replication related verbs have
	been modified to include user name as an argument. This
	is need to execute all gluster cli commands, when geo-
	replication session is set with a non-root user. This
	patch also modifies geo-rep list and status verbs to
	list the remote user name which was newly added in gluster
	cli.

2015-03-26  darshan n  <dnarayan@redhat.com>

	gluster: Patch adds geo-replication create and delete verbs.
	This patch adds the feature geo-replication session create and delete.
	It exposes two verbs:
	*glusterVolumeGeoRepSessionCreate- This verb sets up session to remote
	volume of remote gluster cluster for given volume name.
	*glusterVolumeGeoRepSessionDelete- This verb deletes previously
	created session.

2015-03-26  Ala Hino  <ahino@redhat.com>

	misc: Support zero-time in getReadDelay()
	We found out that dd returned the following output:

	    "517 bytes (517 B) copied, 0 s, Infinity B/s"

	The root cause for getting zero/Infinity stats in dd is erratic
	behavior of clock_gettime. Testing in the field shows that
	clock_gettime() using CLOCK_MONOTONIC may return the same value
	for duration of up to 11 milliseconds.

	We ran a tool sampling current time using clock_gettime(), and
	recording the uniqe readings and the difference between the
	previous and the current sample:

	    #samples  difference
	     177      0.000000001
	     175      0.000999812
	    9462      0.000999813
	     183      0.000999814
	       1      0.001999626
	       1      0.010997944
	       1      0.011997756

	In dd, if the start time is equal to the end time, dd returns
	"0 s, Infinity B/s"

	misc.readpeed() fails to parse that output. This causes the domain
	monitor to fail and the domain to move into invalid state. This failure
	could cause the host to become non-operational, leading to migration
	storm while storage is actually valid.

	misc.readpeed() changed to parse the returned output.

	Engine tested and is not affected by this change.

	Bug-Url: https://bugzilla.redhat.com/1191549

2015-03-25  Ido Barkan  <ibarkan@redhat.com>

	Prevent systemd to kill dhclient once vdsm-network service is stopped
	When upgrading VDSM or for that matter, stopping vdsm-network process,
	systemd would kill all the descendants of the service (including dhclient).
	When vdsm-network starts again, it discovers /var/run/vdsm/nets_restored and
	does not restore any network, possibly leaving the system with interfaces
	that have an IP with a timer but no dhclient to renew it. Adding
	KillMode=Process tells systemd to only kill the service main process and
	nothing more.

	Bug-Url: https://bugzilla.redhat.com/1187244

2015-03-25  Darshan N  <dnarayan@redhat.com>

	gluster: Adds new verb to setup geo-rep mount broker.
	This patch adds a new verb to setup mount broker for
	gluster geo-replication:

	geoRepMountBrokerSetup: This verb takes remote user name,
	group name and remote volume name as argument. and
	sets the mount broker need for non-root geo-replication.

	This patch adds a dependency on glusterfs-3.7dev. This
	version of glusterfs can be found at:
	http://download.gluster.org/pub/gluster/glusterfs/nightly/glusterfs/

2015-03-25  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	spec: revert build dependency on non-existing blivet
	commit 1a54863 added a dependency on blivet that is not
	available on el7 and f20. Reverting this to fix CI issues.

2015-03-25  Martin Polednik  <mpolednik@redhat.com>

	vmdevices: implement getUnderlyingRngDeviceInfo
	RNG device lacked this function, causing it to be inconsistent when
	analyzing device attributes. Creating it corrects this inconsistence
	and adds alias and address field parsing which is also used for
	persistent device addressing.

2015-03-25  Francesco Romani  <fromani@redhat.com>

	schema: temporarily skip getMigrationStatus
	Commit b8df0ff261c unveiled an existing inconsistency
	betwen the return value of VM.getMigrationStatus() API
	and the schema.
	As result, schema validation tests, thus master,
	are broken.

	Investigation on Engine side suggests that Engine
	does not really cares about new keys, so we
	have the chance to properly fix, cleanup and modernize
	this verb with no hurry.

	However, to quickly unbreak master, this patch
	just skips the schema validation of the getMigrationStatus
	verb, until it is fully worked on.

2015-03-25  Darshan N  <dnarayan@redhat.com>

	gluster: Adds new verbs to setup gluster geo-replication.
	This patch adds two new verbs to setup gluster
	geo-replication:

	geoRepKeysGet: This verb executes the gsec create
	command and then reads the collected public keys generated
	by gsec create command. It returns the collected public
	key as a list of strings.

	geoReoKeysUpdate: This verb takes user name and
	public key collection as argument. It appends the
	public keys to the user's authorized_keys file.

2015-03-25  Shubhendu Tripathi  <shtripat@redhat.com>

	gluster: Corrected return value of gluster volume snapshot create
	Earlier Gluster was returning only UUID of the created volume
	snapshot. Recently it started returning created snapshot name
	as well with appended timestamp.
	Corrected the VDSM verb glusterVolumeSnapshotCreate to return
	both UUID and snapshot name.

2015-03-25  Allon Mureinik  <amureini@redhat.com>

	spec: upgrade selinux dependency for gluster
	Upgrade the SELinux policy dependency in order to require a fix that
	prevents creating GlusterFS domains on EL7.

	Bug-Url: https://bugzilla.redhat.com/1177651

2015-03-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	Restart supervdsmd service always and not only on-abort
	Currently we restart the service only after SIGKILL (on-abort) but the
	desire behaviour should be always restarts when the process goes down.

2015-03-24  Yeela Kaplan  <ykaplan@redhat.com>

	spec: configure multipath on upgrade
	Use vdsm-tool to configure vdsm on upgrade -
	post uninstall.

	If we don't vdsm fails to start automatically
	after start.

2015-03-24  Nir Soffer  <nsoffer@redhat.com>

	lib: Simplify and generalize concurrent.tmap()
	The previous version of tmap had few issues:

	- Used non-daemon threads, so the caller application may be blocked on
	  shutdown if a mapped function got stuck.
	- Assumed that mapped functions do not raise, limiting the usefulness of
	  this utility.
	- Logged exceptions for functions that do raise - libraries should not
	  log behind you back.
	- Dropped all errors but the last one, so the caller could not handle
	  them.
	- Assumed that all errors are equal, and raised the last error.

	This version fixes these issues by making tmap() simpler and more
	generic. The function is mapped to the values, and the result is a 2
	namedtuple (succeeded, value), holding either the result of the
	function, or the exception raised by the function.

	The caller is responsible now for handling the errors, and logging them
	if needed.

	lib: Add vdsm.concurrent library
	Move misc.tmap to new module. We will probably need to move some other
	utilities to the new module later.  The tmap utility will be used to
	simplify fc-scan and multipath-resize helpers.

	tmap() was moved as is from misc for easier review. The next patch will
	clean it up a little bit. The tests were rewritten in a simpler way.

2015-03-24  Vitor de Lima  <vdelima@redhat.com>

	caps: Do not use lscpu on ppc64
	Recent RHEL for power and powerKVM correctly show the
	topology of ppc64 hosts, so it is not required the use of 'lscpu'
	to obtain this information.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1148092

2015-03-24  Martin Polednik  <mpolednik@redhat.com>

	ppc64le: fix cpuinfo caps parsing
	Our capability parsing for CpuInfo ignored ppc64le platform. This patch
	adds ppc64le as a POWER platform and fixes raised RuntimeErrors.

	ppc64le: add as architecture
	RHEL 7.1 for PPC is uses architecture name ppc64le. It is therefore
	needed to support this architecture in specfile.

2015-03-23  Petr Horáček  <phoracek@redhat.com>

	network: tests: add error code checking

2015-03-23  pkliczewski  <piotr.kliczewski@gmail.com>

	asyncore: adding __impl attribute

2015-03-23  Nir Soffer  <nsoffer@redhat.com>

	contrib: Add logdb tool for importing logs to a database
	Using a database we have more power to dissect big amount of logs and
	extract useful statistics.

	Examples:

	  Breakdown of vgs calls every 10 minutes interval:

	    $ logdb vdsm-all.db vdsm.log.*
	    $ sqlite3 vdsm-all.db "
	        select
	          datetime(strftime('%s',timestamp)/600*600,'unixepoch')
	          as interval,count()
	        from messages
	        where
	            func = 'cmd' and
	            text glob '*/sbin/lvm vgs*' and
	            timestamp > '2015-03-11 05:30:00'
	        group by interval
	        "
	    2015-03-11 05:30:00|2
	    2015-03-11 05:40:00|5
	    2015-03-11 05:50:00|8
	    2015-03-11 06:00:00|16
	    2015-03-11 06:10:00|2
	    2015-03-11 06:20:00|2
	    2015-03-11 06:30:00|2
	    2015-03-11 06:40:00|2
	    2015-03-11 06:50:00|2

	  Show vm xml for vms started on 2015-03-11:

	    $ sqlite3 vdsm-all.db "
	        select timestamp,text from messages
	        where
	            text glob '*<domain *' and
	            date(timestamp) = '2015-03-11'
	        "

2015-03-23  Shahar Havivi  <shaharh@redhat.com>

	RFE: Report downtime for each live migration
	Added new value to migrateStatus verb: downtime.
	downtime reports the actual time that the VM was offline (ie not
	available for the user).

2015-03-23  Ido Barkan  <ibarkan@redhat.com>

	split network restoration from vdsmd.service
	Right now the task of doing network restoration is delegated to the
	vdsmd service initialization. Since systemd does not expect that
	a long lived deamon such as dhclient will stay alive after
	ExecStartPre stage, it might kill dhclient, if that was spawned on
	dhcp persistent interfaces.

	This patch splits systemd vdsm service into 2 dependant units:
	1. vdsm-network.service which upgrades unified persistence and 3.0.0
	   networks if needed and then restore networks as its main mission

	2. vdsmd.service which reconfigures the persistent network configuration
	   of vdsm using the configured net_configurator

	Note that from now on, disabling vdsmd cannot render the machine
	inaccessible as the vdsm networks will be started upon boot.
	Note also that since it is inconvenient to implement logic on service
	files, vdsm-restore-net-config learned how to no-op when nets_restored
	mark exists and this functionality was removed from the bash part.

	Bug-Url: https://bugzilla.redhat.com/1187244

2015-03-23  Francesco Romani  <fromani@redhat.com>

	virt: remove unwanted 'response' aliasing
	In quite a few place we used the name 'response'
	for variables holding the result of an API call.

	After the introduction of the 'response' module,
	this created unwanted aliasing, with room for subtle
	annoying bugs like

	AttributeError: 'dict' object has no attribute 'success'

	With some pyflakes, this may also cause the error

	vm.py:1234: redefinition of unused 'response' from line 41

	thus breaking the build.

	To fix this, we look for variables which used the 'response'
	name, and we just rename them to 'result', without changing
	the program flow.

2015-03-22  Francesco Romani  <fromani@redhat.com>

	vm: use response.error() with custom message
	Use the newly introduced response.error() in
	Vm flows when we need to use a custom
	error message.

	lib: introduce the 'response' module
	It happens sometimes that it is needed to overwrite
	the predefined error message with something more
	specific to the circumstances.

	In general, the handling of response code
	feels clumsier than it should.

	To improve things, we bootstrap the little helper
	'response' module, starting with a function
	which allow to override the error message.

2015-03-21  Martin Polednik  <mpolednik@redhat.com>

	hostdev: remove detection of device vmId
	vmId detection only reported back what engine sent, making it useless.
	Since no detection for oVirt-external VMs was/is present, we can drop
	current state of detection and possibly reintroduce it later if needed.

2015-03-21  pkliczewski  <piotr.kliczewski@gmail.com>

	tests: making as broken

2015-03-20  Francesco Romani  <fromani@redhat.com>

	profiling: import yappi outside lock
	Importing modules with locks held is dangerous and
	may lead to deadlock.
	Better to move the import of the yappi module outside the lock.

2015-03-20  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: add ability to get dictionary directly from JsonRpcRequest

	jsonrpc: Remove JsonRpcClientPool
	It was created before the reactor was able to manage
	client connections as well.

	This makes using the JsonRpcClient much simpler.

	Have the protocol detector use the Reactor
	The current implementation duplicates a lot of the code in the reactor.
	This removes a lot of the duplicate code and prepares the ground for a
	single reactor for VDSM.

	asyncore: Move ssl buffer handling to dispatcher
	This is boilerplate code that all dispatcher implementations must do to
	prevent a deadlock in the loop. Putting it in the dispatcher makes the
	problem transparent to the implementation.

	asyncore: dynamic tick support
	Currently the reactor uses a fixed tick of 0.5 seconds. This feature
	changes it so that dispatchers can request a different tick time.

	The minimal tick from all requested tick intervals will be used each
	iteration.

2015-03-20  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add after_hostdev_list_by_caps hooking point
	In order to allow oVirt deployment maintainers some customization over
	which host devices are hidden to oVirt or do modification/quirks for
	specific hardware, new hooking point, after_hostdev_list_by_caps is
	introduced. This hooking point is another _json_hook, meaning that
	it receives device json representation and is free to modify it.

	This hook needs to be used with caution: modifying the device forest
	(multiple trees) may lead to engine's inability to parse it and use
	it correctly. Safe modification are removing leaf nodes and whole
	trees. Although engine may not be able to parse broken tree correctly,
	it should not explode or cause inconsistent database state.

2015-03-20  Candace Sheremeta  <cshereme@redhat.com>

	vdsm: added documentation for downloadImage method
	Added documentation for downloadImage in vdsClient.
	Gave a clearer description of what the methodArgs
	parameter is and how it should be used. Formatted
	documentation according to standard used in other
	methods in vdsClient. See comments for copy of
	output.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128736

2015-03-20  Ido Barkan  <ibarkan@redhat.com>

	no need for quotes in supervdsmd service file
	systemd interprets them as part of the string

2015-03-20  Dan Kenigsberg  <danken@redhat.com>

	spec: temporarily revert build dependency on non-existing blivet
	commit 1a54863 added a dependency on blivet that is not yet available on
	el7 and f20. Instead of completely reverting it, or waiting for a proper
	support for older blivet (https://gerrit.ovirt.org/38942/) this patch
	drops the build requirement, which is to be enforced during install time
	only of vdsm-gluster.

2015-03-20  Francesco Romani  <fromani@redhat.com>

	vm: do not poll for scheduler parameters
	The scheduler parameters aren't actually stats, but
	configuration data[1], which will not change unless
	someone asks libvirt to do so.

	VDSM is supposed to be the lone controller of libvirt,
	so it is safe to assume (as we already do in a quite
	lot of flows) that nothing will change behind his back.

	So, stop to poll for scheduler parameters, and store
	the change instead.

	A future patch will add support for tune events, in
	the (unlikely) case someone else indeed start
	to mess around with libvirt bypassing VDSM.

	+++

	[1] as we were reminded into
	https://bugzilla.redhat.com/show_bug.cgi?id=1199002#c2

2015-03-19  Yeela Kaplan  <ykaplan@redhat.com>

	jsonrpc: for checking the event use the class method
	instead of checking the event itself

2015-03-19  Idan Shaby  <ishaby@redhat.com>

	lvm: Raise an exception if missing physical volume
	Raise InaccessiblePhysDev when getting a pv which is not in lvm cache.

	When lvm.getPV() tries to get a cached PV object from its cache, there
	is a possibility that the physical volume is not in the cache anymore.
	In such a case, we should raise a relevant storage exception, instead of
	letting the code fail at a random point later when trying to access
	an attribute of None object.

	Bug-Url: https://bugzilla.redhat.com/1048696

2015-03-18  Timothy Asir  <tjeyasin@redhat.com>

	gluster: add createBrick verb
	This patch adds new verb createBrick which
	creates pvs from the given or list of available devices
	and create a thin lv out of it.

2015-03-18  Yeela Kaplan  <ykaplan@redhat.com>

	sslTests: set timeout to transport through the ctor

	vdscli: allow a connection with a configurable timeout
	Add an option to connect to vdscli with any configurable
	timeout, to allow the user a larger timeout than the
	default ssl 60 seconds.
	Especially useful for long duration storage operations.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1190207

2015-03-18  Francesco Romani  <fromani@redhat.com>

	vm: rename internal method for clarity
	_getVcpuLimit actually updates a field,
	so rename it accordingly.

2015-03-18  Adam Litke  <alitke@redhat.com>

	clusterLock: Make inquire retval consistent
	Callers of clusterLock.inquire() expect a tuple with two values to be
	returned.  The SANLock flavor gets this right but LocalLock returns a
	single None when the lock has no owners.  It should return None, None.

	storage: Stop using tempnam in deleteImage
	tempnam does not guarantee that the entire requested prefix is part of
	the resulting file name but we rely on the whole prefix to be present to
	identify the images for garbage collection.  tempnam is a bit of
	overkill anyway since we already have a guaranteed unique file name (the
	image UUID) and locking to prevent races.

2015-03-18  Francesco Romani  <fromani@redhat.com>

	API: getVMList: compatibity with internal clients
	After the addition of the 'onlyUUID' parameter, the external
	API of VDSM is now backward compatible:

	- in XMLRPC, we always set explicitely onlyUUID=False, so no room for
	  breakage
	- in JSONRPC, we have Host_getVMList_Call (short status), on which
	  * if onlyUUID is provided from the outside, we use it
	    (works with Engine >= 3.5.1)
	  * if onlyUUID is NOT given (Engine 3.5.0), we default as True,
	    and doing so we preserve the backward compatibility
	- in JSONRPC, in Host_getVMFullList_Call (full status), we use
	  onlyUUID=False explicitely, so no issue hee

	The internal API, however, changed behaviour.
	Being the API internal, it doesn't usually need special care,
	but this time we need, because MOM is a supported client of
	this API.

	With the current 'onlyUUID' defaults, clients of API.py
	will get a list of UUIDs instead of a list of Short Status.

	To fix this, and given the findings outlined in the above bullet points,
	we just switch the default value of 'onlyUUID' to cover this use case.

	Bug-Url: https://bugzilla.redhat.com/1196327
	Related-To: https://bugzilla.redhat.com/1196735

	API: onlyUUID should affect only short status
	this patch makes the 'onlyUUID' parameter take effect only
	if 'fullStatus' equals False (short status was asked).

	depending on 'fullStatus' boolean parameter, the getVMList API can
	return either full or short VM status.
	Due to a bug originally introduced before 3.5.0, short status
	was incorrectly produced as list(UUIDs), but it is meant to be
	a list(dict(vmId:UUID, status:vmStatus), )

	The 'onlyUUID' parameter was added to preserve
	backward compatibility with early Engines 3.5.x, but it is meant
	to fix short status (fullStatus=False), and should not always affect
	output.

	Instead, the current code always produces short and broken status
	if 'onlyUUID' equals True, with the side effect that also fullStatus
	is affected.

	Bug-Url: https://bugzilla.redhat.com/1196327
	Related-To: https://bugzilla.redhat.com/1196735

2015-03-18  Shubhendu Tripathi  <shtripat@redhat.com>

	gluster: Fetch disperse count and redundacy count for volume
	Modified the verb glusterVolumeInfo to fetch disperse count
	and redundancy count also.

2015-03-17  Dan Kenigsberg  <danken@redhat.com>

	vmTests: unbreak tests on el6
	test_change_cd_failure and testReadPauseCodeDomainPausedCrash have been
	failing since they used too-new libvirt error codes.

2015-03-16  Saggi Mizrahi  <smizrahi@redhat.com>

	asyncore: Move generic reactor functionality
	This is part of a larger move to unify the protocol detector and the
	stomp reactor.

	In this phase we move all the functionality not specific to stomp to a
	generic Reactor class.

	This patch still keeps the original StompReactor to minimize changes
	outside of yajsonrpc.

2015-03-16  Martin Perina  <mperina@redhat.com>

	host stats: Add number of in/out migrations
	Adds number of incoming and outgoing VM migrations into HostStats.

	Bug-Url: https://bugzilla.redhat.com/1113664

2015-03-16  Yeela Kaplan  <ykaplan@redhat.com>

	sslutils: call named arguments with their name

2015-03-16  Petr Horáček  <phoracek@redhat.com>

	network: models: tag non-VDSM devices used by VDSM
	When we setup network over pre-existing vlaned bond, models.py skip
	configuration of pre-existing devices under a vlan (because they are not
	to be changed) in order to not ifdown possibly used devices. Due to this
	behaviour we don't persist mentioned networks and therefore we are not
	able to restore them.

	Now we check if device is a part of vdsm, if not, we configure and
	persist it.

2015-03-13  Candace Sheremeta  <cshereme@redhat.com>

	vdsm: marked headers as optional in ImageSharingMethodArgsHttp
	while inspecting the code to update documentation for
	downloadImage, I determined that the headers parameter
	is optional for ImageSharingMethodArgsHttp, but was
	not marked as such

2015-03-13  Dan Kenigsberg  <danken@redhat.com>

	libvirt configurator: listen to ipv6, too
	By default, libvirtd listens to all local addresses, ipv4 and ipv6
	alike. Our setting of listen_addr="0.0.0.0" changes that to ipv4 only.

	This patch drops this config to enable future migration of ipv6.

2015-03-13  laravot@redhat.com  <laravot@redhat.com>

	monitor: return whether the reported status is actual
	When the domain monitoring results are reported after the domain
	monitor was started. The first monitoring run may haven't been yet
	completed - which causes the returned status to be determined as OK
	by the engine (leads to domain status change).

	It was attempted to change the inital returned status in the past but it
	broke the host activation flow in the engine (see change I8e0df) and
	therefore the inital results can't be changed (backward comptability) -
	therefore in this change i add a new info that indicates whether the
	reported status is actual or not.

	When providing the engine the information on whether the returned status
	is actual or not, the engine can decide how to act upon the monitoring
	result and ignore it if it's irrelevant.

	Bug-Url: https://bugzilla.redhat.com/1183977

2015-03-13  Allon Mureinik  <amureini@redhat.com>

	image.py: reference exception as e when required

2015-03-13  Petr Horáček  <phoracek@redhat.com>

	network: persistence: skip bonds owned and used by vdsm
	When upgrading bonds to unified persistence, we should skip foreign bond
	(a bond that has ifcfg-bond lacking the "generated by vdsm" header).
	However, if any of these bonds is used by a vdsm network, it must be
	persisted. Otherwise, calling restore_net removes the bond (when it
	cleans current running config) but it fails to re-create it from the
	persistent config.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1154399

2015-03-13  Timothy Asir Jeyasingh  <tjeyasin@redhat.com>

	gluster: storage devices list provides device size in MiB
	Currently it returns unit size along with device size in
	KiB/MiB/GiB.. based on the size. This patch fixes this issue
	to return the values in MiB.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=1201263

2015-03-12  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Do not count time spent on migrationCreate against timeout
	Currently, the measured time for the source migration timeout includes
	the time spent on the destination host. This is bad because the time
	spent for some actions during the vm creation can be very expensive and
	time consuming.
	This patch, excludes the time spent during the destination vm creation
	from the measured time.

	The change is not expected to introduce regressions on the source, since
	even now we would hang on the migrationCreate call.

	Bug-Url: https://bugzilla.redhat.com/1188543

2015-03-12  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix creation and deletion of multiple udev rules
	When attaching multiple devices from the same group, each of the
	devices needs to be detached and then later reattached to the host.
	The udev rule creation is hooked into this routine to give qemu access to
	the /dev/vfio endpoint. This patch corrects behaviour of udev if the file
	already exists or does not exist due to creation or deletion of VM.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1099760

2015-03-12  Dima Kuznetsov  <dkuznets@redhat.com>

	caps: Fix access to /sys/class/iommu
	This patch fixes OSError during getVdsCapabilities introduced in
	https://gerrit.ovirt.org/#/c/37701/

	On some systems (such as el6), iommu is not present, causing 
	getVdsCapabilities to not return properly. This patch can be reverted when
	we no longer want to be able to run on el6.

2015-03-12  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Log the the duration time of the migration
	For post mortem analysis in regards to migration times, this patchset
	will additionally log the time the successful migration took.
	This will help us in future to determine how long migrations took on a
	certain system.

2015-03-12  Martin Polednik  <mpolednik@redhat.com>

	hostdev: display hostdev passthrough support in caps
	Passthrough support can be  read via sysfs /sys/class/iommu, where
	support would be indicated by presence of dma remapping indicator -
	dmarX (where X >= 0). This patch exposes this fact in caps via
	hostdevPassthrough key.

	Hostdev support is indicated by 2 settings - Intel VT-d or AMD-Vi
	and kernel iommu support, both of these are handled by this
	implementation.

2015-03-12  Francesco Romani  <fromani@redhat.com>

	clientIF: add method to get all registered VMs
	add a new method to extract all the registered VMs.
	Future patches need to iterate on a snapshot
	of vmContainer.

2015-03-10  Martin Sivak  <msivak@redhat.com>

	Move NUMA collecting code to stats thread
	NUMA collecting was performed any time the .get() method was
	invoked. That caused a serious slow down. This patch moves
	the collecting to where all the other stats are collected.

	I measured the performance of getAllVmStats before and after
	this patch was applied on a host with local storage and
	two NUMA enabled VMs using:

	# time for x in $(seq 100); do
	#   vdsClient -s 0 getAllVmStats >/dev/null;
	# done

	The results for unpatched VDSM:

	real	0m21.093s
	user	0m11.998s
	sys	0m1.690s

	The results for patched VDSM:

	real	0m18.485s
	user	0m12.009s
	sys	0m1.846s

	And the results for both patched and unpatched VDSM when no
	NUMA enabled VM is started are very similar:

	real	0m18.298s
	user	0m11.878s
	sys	0m1.699s

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1182094

2015-03-10  Martin Polednik  <mpolednik@redhat.com>

	hostdev: remove rom, file and bar settings from API
	Those settings require a specific file to be present on every host
	that would use these parameters. This patch removes their exposure
	because no such mechanism was introduced.

2015-03-10  Ondřej Svoboda  <osvoboda@redhat.com>

	network: order 'ipv4' before 'ipv6' and rename 'blocking' to 'blockingdhcp'

	models: remove IpConfig's namedtuple (NetDevice.ipConfig)

	iproute2, pyroute_two: use IpConfig directly (NetDevice.ipconfig)
	NetDevice.ip now always contains an IpConfig so we can access IpConfig's
	attributes without the diversion through IpConfig's namedtuple.

	ifcfg: stop using IpConfig's namedtuple altogether

	ifcfg: use IpConfig in _createConfFile instead of its namedtuple
	Note that _getIfaceConfValues() now returns an IpConfig object (updated with
	information from an ifcfg file) instead of an IpConfig.ipConfig namedtuple.

	ifcfg: stop reading from NetDevice.ipConfig namedtuple in _getIfaceConfValues
	_getIfaceConfValues updates a copy of a NetDevice's IP configuration before
	actually configuring it. The changes must not be brought back to the original
	IpConfig so deep copy is performed.

	The namedtuple is still returned by _getIfaceConfValues (for now) but in
	the next patch the copied IpConfig will be returned directly.

	ipconfig.bootproto is not compared against None for compatibility reasons
	(it could contain a zero-length string, for instance). It will be converted
	to a boolean 'dhcpv4' soon.

2015-03-10  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: use monotonic timer instead of clock

	asyncore: Move AsyncoreEvent to betterAsyncore

2015-03-10  Francesco Romani  <fromani@redhat.com>

	vm: stats: cache metadata value
	vcpuLimit can be set only by Engine (or anyone else
	impersonating it using the UpdateVmPolicy API).

	It seems a little wasteful to poll, albeit infrequently
	(every 15s), for changes in a value which we know
	when and how it will change.

	Instead of doing so, this patch adds a simple cache
	variable, to be transparently updated after
	each UpdateVmPolicy.

	Please note that the same approach was taken for I/O
	tune, based on the assumption that VDSM is the only
	controller of libvirt.

	Since this assumption is ingrained in the very roots
	of how VDSM works, it seem fair to extend to (V)CPU
	tune as well.

	vm: add 'name' property
	add a 'name' property, to Vm class, and add it to the
	Vm.getStats() output.

	This is needed to better integrate with MOM.

	Also, clean up a tiny bit the internals of the Vm class
	to use the new property.

2015-03-10  Timothy Asir  <tjeyasin@redhat.com>

	lvm:moved metadatasize as an optional param for pv create in lvm module
	Allow metadatasize as an optional param for pvcreate. This feature is
	required for gluster brick creation. Currently this param is not an
	optional one.

2015-03-09  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: Change _AsyncoreEvent to use EventFD
	_AsyncoreEvent originally used a pipe which is a waste of an FD and
	depends on assumptions about how the kernel buffers pipes.

	It also required us to synchronize access using a lock.

	Moving to EventFD fixes all those issues and simplifies the
	implementation.

	infra: Introduce EventFD support
	This patch adds a wrapper for the eventfd(2) functionality.

	For more information check the inline documentation.

2015-03-09  Ondřej Svoboda  <osvoboda@redhat.com>

	models: rename NetDevice.ip to ipconfig to be more descriptive
	And also to avoid ambiguity with IPDB in pyroute_two.

	Now there are still instances of IPConfig's namedtuple, called 'ipConfig',
	which is very confusing, but this is to be removed (simply renamed, which
	actually motivated the change) in the coming patches.

2015-03-09  Francesco Romani  <fromani@redhat.com>

	vm: abort vm start if can't read pid
	If for whatever (quite unlikely) cause
	the PID can't be read, or it is invalid,
	abort the creation of the VM.

	In recovery flow, we should'nt overwrite the PID,
	because there is no reason to believe it changed
	meantime - and most likely, it has not.

	Bug-Url: https://bugzilla.redhat.com/1128458

2015-03-09  Dan Kenigsberg  <danken@redhat.com>

	sos plugin: collect /var/lib/vdsm
	ovirt-3.5's vdsm started placing important persistent information under
	/var/lib/vdsm. This information should be collected for post-mortem
	debug.

	Related-To: https://bugzilla.redhat.com/1195989

2015-03-09  Francesco Romani  <fromani@redhat.com>

	tests: bootstrap changeBlockDev tests
	add very basic tests.

2015-03-08  Darshan N  <dnarayan@redhat.com>

	gluster: volume snapshot list verb.
	This Patch adds new verb to get the snapshot
	list for a volume and across cluster.

	*glusterVolumeSnapshotList: gives the list of all the snapshots
	present in a volume if volume name is provided. Else It gives
	list of all snapshot across the cluster
	Returns:
	{'v1': {'snapshots': [{'name': 'snap1_v1',
	                       'description': description of the snapshot,
	                       'id': '8add41ae-c60c-4023-'
	                                       'a1a6-5093a5d35603',
	                       'createTime': {'timeZone': 'IST',
	                                      'epochTime': 1414427114},
	                       'snapVolume': '5eeaf23def3f446d898e1de8461a6aa7'
	                       'snapVolumeStatus': 'ACTIVATED'}, ...],
	        'snapRemaining': 252},
	 'v2': {'snapshots': [{'name': 'snap1_v2',
	                       'description': description of the snapshot,
	                       'id': '8add41ae-c60c-4023'
	                                       '-a1a6-1233a5d35603',
	                       'createTime': {'timeZone': 'IST',
	                                      'epochTime': 1414427114},
	                       'snapVolume': '5eeaf23def3f446d898e1123461a6aa7'
	                       'snapVolumeStatus': 'DEACTIVATED'}, ...],
	        'snapRemaining': 252},...
	}

2015-03-08  Darshan n  <dnarayan@redhat.com>

	gluster: volume snapshot config list and set verbs.
	This patch adds new verbs to list and set the
	configuration of gluster volume snapshots.

	*glusterSnapshotConfigList: get the snapshot configuration.
	This verb gives the snapshot configuration for the cluster
	and for all the volumes present in it.
	Returns:
	{'system':{'snap-max-hard-limit': 'hardlimit',
	           'snap-max-soft-limit': 'softLimit',
	           'auto-delete': 'enable/disable'},
	 'volume':{'name' :
	            {'snap-max-hard-limit: 'hardlimit',
	             'effective-hard-limit: 'EffectiveHardlimit',
	             'snap-max-soft-limit': 'softLimit'}
	          }...
	}

	*glusterVolumeSnapshotConfigList: Get the snapshot
	configuration for a volume. Volume name should be provided
	as an argument, configuration for that volume along with
	cluster snapshot configuration is listed.
	Returns:
	{'system':{'snap-max-hard-limit': 'hardlimit',
	           'snap-max-soft-limit': 'softLimit',
	           'auto-delete': 'enable/disable'},
	 'volume':{'name' :
	            {'snap-max-hard-limit: 'hardlimit',
	             'effective-hard-limit: 'EffectiveHardlimit',
	             'snap-max-soft-limit': 'softLimit'}
	          }
	}

	*glusterSnapshotConfigSet: Set snapshot configuration
	at cluster leval. The possible configurations that can
	be set are:
	snap-max-hard-limit, snap-max-soft-limit and auto-delete

	*glusterVolumeSnapshotConfigSet: Set snapshot configuration
	at volume leval. Volume name has to be provided as argument.
	And the configurable parameter is snap-max-hard-limit.

2015-03-08  Adam Litke  <alitke@redhat.com>

	qemu-img: Handle image end offset on different lines of output
	Current code assumes that qemu-img check output will place the image end
	offset in the second line of output but it can appear later:

	$ sudo qemu-img check
	/rhev/data-center/.../41b2b944-77f0-40d5-a681-c63e0dbb7482
	No errors were found on the image.
	70088/98304 = 71.30% allocated, 0.17% fragmented, 0.00% compressed clusters
	Image end offset: 4594466816

	Update the scanner so it can find it on any line from the second until
	the end of output.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1196072

2015-03-06  pkliczewski  <piotr.kliczewski@gmail.com>

	api: introducing onlyUUID parameter for getVMList verb
	Due to vdsm sending only an array of vmids in a response to getVMList
	the engine asks separately using VM.getStats which creates unnecessary
	load. In order to fix this issue we introduce a new parameter 'onlyUUID'
	which is set to True by default. Engine 3.5.0 still wants to get an
	array of vmids, but for all other versions we set 'onlyUUID' to False
	which returns map of vmids and statuses.


	Bug-Url: https://bugzilla.redhat.com/1196735
	Related-To: https://gerrit.ovirt.org/#/c/38448

2015-03-06  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add hostdev device definition
	Using hostdev infrastructure for attaching a detaching devices
	to/from host and passing them to VMs, this patch introduces the
	device endpoint that is used for passing devices to VMs via
	libvirt's hostdev element

2015-03-06  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Additional reporting of IO statistics
	As per request, we're now additionally reporting:
	- Read and write operations per VM and disk
	- Read and written bytes per VM and disk

	Bug-Url: https://bugzilla.redhat.com/1172153

2015-03-06  Nir Soffer  <nsoffer@redhat.com>

	virt: Avoid pointless extension requests
	After a drive is extended to the maximum volume size, if the guest
	keeps writing, the image may pass the drive's watermark for early
	extension.

	On this condition, current extend logic is trying to extend the drive
	every 2 seconds. This results in fruitless extensions failing in 
	lvextend because the requested size is equal to the current size. These
	extension requests may delay real requests, perform unneeded io, and fill
	up the log with bogus errors and warnings.

	Now we check if the drive was fully extended and do not try to extend it
	further.

	Bug-Url: https://bugzilla.redhat.com/1195768

2015-03-05  pkliczewski  <piotr.kliczewski@gmail.com>

	Revert "json-rpc: fix the Host.getVMList return value"
	This reverts commit e7ebfdeb7b036ce10f25a3b26657e6414644fc55.

	Bug-Url: https://bugzilla.redhat.com/1196327

2015-03-04  Martin Polednik  <mpolednik@redhat.com>

	vmdevices: remove duplicate slot in audio device
	Alias slot is created by Base device, no need to re-create it.

2015-03-03  Francesco Romani  <fromani@redhat.com>

	json-rpc: fix the Host.getVMList return value
	Host.getVMList() should return either VmDefinition or
	VmShortStatus depending on the parameter fullStatus.

	The return value in case fullStatus=False was wrong,
	as it was just a list of UUIDs, while VmShortStatus
	is supposed to be a dictionary holding (at least)
	vmId and vmStatus.

	This change made life harder to Engine monitoring code.
	Missing the status, Engine's monitoring had no choice
	but to call Vm.getStats() after each getVmList(), and that
	has a not-negligible performance cost.

	This patch makes the JSON-RPC output compliant to the
	schema, to what Engine's monitoring expects and also
	to XML-RPC output.

	Bug-Url: https://bugzilla.redhat.com/1196327

2015-03-03  Ondřej Svoboda  <osvoboda@redhat.com>

	testSetupNetworksOverDhcpIface: fix dnsmasq invocation on EL6
	All other DHCP tests already ask dnsmasq not to serve DHCPv6 which it does not
	support on EL6. Follow suit and let our dnsmasq wrapper use dnsmasq as DHCPv4
	server only.

	Without this patch, the test is skipped with
	"dnsmasq: bad command line options".

2015-03-03  Dan Kenigsberg  <danken@redhat.com>

	dumpStorageTable: less statement-like prints

2015-03-03  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: children count of <interface/> is 0 which broke a condition
	Commit If1a704cd53db56d64a3da6a056a322a6b35ee2bd resulted in getVdsCaps
	failing with an "Unexpected exception" which prevented VDSM from starting (on
	upgrade_300_nets).

2015-03-03  Dan Kenigsberg  <danken@redhat.com>

	restore_nets: during rollback, ignore removal of a missing bond
	If a bond is removed outside vdsm, attempting to restore networks to the
	last known-good set of configuration currently fails.

	With this patch, if vdsm is asked to remove an already-missing bond
	device during an attempt to restore networking, this descripency is
	ignored, and restore_nets would go on attempting to restore further
	networks, hopefully restoring connectivity to the host.

	The accompanying test verifies that restore_nets survive after such
	removal. It also verifies that adding a network on top of an
	already-existing bond ends with the bonding device being consumed into
	the running (and later, persistent) config.

2015-03-02  Petr Horáček  <phoracek@redhat.com>

	network: test: remove bond with removed enslaved nics

	init: fix network service status checking
	In init file, we check if network service is running by its status
	return code. Problem is, that this code is "always" 0, therefore we never
	start network service when needed (for example, it's not autostarted
	on CentOS 6).

	`service network status` returns lists of configured and active devices,
	if the list of active devices (on the last row) does not contains all
	VDSM's ONBOOT=yes devices, it means, that network service did not start
	our devices and we should call service network start.

2015-03-02  Saggi Mizrahi  <smizrahi@redhat.com>

	asyncore: Remove AsyncChat
	No one uses it.

	betterAsyncore: Bind the dispatcher implementation
	This patch modifies the way the implementation is accessed in the
	dispatcher. It binds all the methods on __init__() saving time during
	each method call.

2015-03-02  Ondřej Svoboda  <osvoboda@redhat.com>

	api: correct the order of parameters in _bridge_reconfigured
	The wrong order was harmless because both parameters are passed to !=
	which is commutative.

2015-03-02  Ala Hino  <ahino@redhat.com>

	tests: Add missing empty line

2015-03-01  Genadi Chereshnya  <gcheresh@redhat.com>

	netinfo: Replacing  xml.dom.minidom with cElementTree module
	The change is done as etree is much faster than minidom
	It requires cElementTree module to be installed

	With multiple paragraphs if necessary.

2015-02-26  Nir Soffer  <nsoffer@redhat.com>

	virt: Clarify error handling
	In diskSizeExtend, error handling was correct but less clear then it
	should be. We have try except block, returning one value on success, and
	other value on errors.

2015-02-26  Madhu Pavan Kothapally  <kmp@linux.vnet.ibm.com>

	tests: InterfaceSampleTests are failing with IOError
	Both testHostSampleHandlesDisappearingVlanInterfaces and
	testHostSampleReportsNewInterface are failing due to IOError.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1195594

2015-02-26  Nir Soffer  <nsoffer@redhat.com>

	virt: Allocate additonal space for cow internal data
	In change I4098dfc07 (virt: Fix limit when calculating next volume size) we
	fixed drive size limit so drive volume is limited by drive capacity. This
	change introduced a regression where vm is paused when trying to fill up a
	drive, and there is no way to resume it, since qemu cannot complete the write.

	To allow a guest to use the entire drive capacity, we must allocate extra space
	for cow internal data. Since it is tricky to compute the exact value, we use
	the same estimate (1.1) used for converting raw volumes to cow and merging
	volumes.

	Relates-To: https://bugzilla.redhat.com/1195768

2015-02-25  Nir Soffer  <nsoffer@redhat.com>

	vm: Fix LSM when using libvirt >= 1.2.8
	Libvirt 1.2.8 introduced a regression where disk type is converted from
	"block" to "file" after blockRebase. This breaks our extend logic, leading
	to unwanted extension of up to the disk virtual size, practically making
	it preallocated. In 3.5, this used to extend the disk without limit
	using all free space on the vg.

	Libvirt 1.2.9 introduced a new VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag
	for fixing this issue. This flag must be used when calling blockRebase
	with block-based disk. This fix was backported to EL7.1 in
	libvirt-1.2.8-16.el7_1.1 and libvirt-python-1.2.8-6.el7_1.1.

	This patch uses VIR_DOMAIN_BLOCK_REBASE_COPY_DEV when available, fixing
	this issue in EL7.1 and Fedora 21. Other platforms are not affected by
	this issue because they are running older libvirt versions.

	We assume that we are always working with local libvirt daemon, and
	having the flag in the libvirt python bindings means that libvirt daemon
	support the flag.

	Bug-Url: https://bugzilla.redhat.com/1176673

2015-02-25  Francesco Romani  <fromani@redhat.com>

	tests: move find() helper into testlib
	Recently the vmTests gained a find() helper
	function to make xml tests less fragile,
	allowing to assertXMLEqual() only the minimal
	amount of XML.

	This patch moves this helper into testlib,
	to make it easily available to other test suites.

	Only code moving and import fixing.

2015-02-25  Ondřej Svoboda  <osvoboda@redhat.com>

	_addNetwork: never try to set mtu=None to an existing bridge
	On my EL6 host I tried to configure the 'ovirtmgmt' network manually, so it
	becomes a libvirt network (and in this case I would be able to reproduce
	a case when a gateway is duplicated by our dynamic source route thread).

	  vdsClient -s 0 setupNetworks 'networks={ovirtmgmt:{nic:eth0,bootproto:dhcp}}'

	The command failed, however (Unexpected exception):

	  MainProcess|Thread-1000::INFO::2015-02-18 10:55:08,731::api::304::root::(_addNetwork) Adding network ovirtmgmt with vlan=None, bonding=None, nics=[u'eth0'], bondingOptions=None, mtu=None, bridged=True, defaultRoute=True,options={u'bootproto': u'dhcp', 'implicitBonding': True}

	  MainProcess|Thread-1000::DEBUG::2015-02-18 10:55:08,732::ifcfg::460::root::(_persistentBackup) backing up ifcfg-ovirtmgmt: DEVICE=ovirtmgmt
	  ONBOOT=yes
	  TYPE=Bridge
	  DELAY=0
	  STP=off
	  BOOTPROTO=dhcp
	  MTU=1500
	  DEFROUTE=yes
	  NM_CONTROLLED=no
	  HOTPLUG=no

	  MainProcess|Thread-1000::DEBUG::2015-02-18 10:55:08,733::utils::623::root::(execCmd) /sbin/ip link set dev eth0 mtu None (cwd None)
	  MainProcess|Thread-1000::DEBUG::2015-02-18 10:55:08,738::utils::643::root::(execCmd) FAILED: <err> = 'Error: argument "None" is wrong: Invalid "mtu" value\n\n'; <rc> = 255

	  MainProcess|Thread-1000::ERROR::2015-02-18 10:55:14,507::supervdsmServer::108::SuperVdsm.ServerCallback::(wrapper) Error in setupNetworks
	  Traceback (most recent call last):
	    File "/usr/share/vdsm/supervdsmServer", line 106, in wrapper
	      res = func(*args, **kwargs)
	    File "/usr/share/vdsm/supervdsmServer", line 203, in setupNetworks
	      return setupNetworks(networks, bondings, **options)
	    File "/usr/share/vdsm/network/api.py", line 855, in setupNetworks
	      logger, _netinfo)
	    File "/usr/share/vdsm/network/api.py", line 690, in _add_missing_networks
	      implicitBonding=True, _netinfo=_netinfo, **d)
	    File "/usr/share/vdsm/network/api.py", line 225, in wrapped
	      ret = func(**attrs)
	    File "/usr/share/vdsm/network/api.py", line 328, in _addNetwork
	      _update_bridge_ports_mtu(net_ent.name, mtu)
	    File "/usr/share/vdsm/network/api.py", line 246, in _update_bridge_ports_mtu
	      ipwrapper.linkSet(port, ['mtu', str(mtu)])
	    File "/usr/lib/python2.6/site-packages/vdsm/ipwrapper.py", line 630, in linkSet
	      _execCmd(command)
	    File "/usr/lib/python2.6/site-packages/vdsm/ipwrapper.py", line 525, in _execCmd
	      raise IPRoute2Error(error)
	  IPRoute2Error: ['Error: argument "None" is wrong: Invalid "mtu" value', '']

2015-02-24  Francesco Romani  <fromani@redhat.com>

	vm: fix race in shutdown reason reporting
	This patch fix a race in the reporting of
	the shutdown exit reason.

	Relates-To: https://bugzilla.redhat.com/557125

2015-02-23  Ala Hino  <ahino@redhat.com>

	tests: Use permutations for separating test failures

	tests: Enhance ReadSpeed.testReadSpeedRegExp unit test
	Test changed to be more readable.

	Currently, the test defines a parameterized template and a list of
	outputs to be tested. For each output, the test replaces
	the parameters in the template with the corresponding values from
	the output.

	This patch makes the test more straightforward by removing the
	templating mechanism.

2015-02-23  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: convert yes/no <-> True/False using _from_ifcfg_bool and _to_ifcfg_bool
	Use them to format the defaultRoute=True/False property to DEFROUTE=yes/no
	without the need to replace the value in IpConfig's namedtuple first and
	also to override the property with information from an existing ifcfg file.

	If DEFROUTE is not present it is stored as None and not printed to an ifcfg
	file at all. To simplify the situation (as seen in other configurators) only
	True/False could be used in the future not only in defaultRoute but in other
	IP configuration parameters.

	models: make IpConfig deal with blank configuration from NetDevice gracefully
	This patch is a part of a bigger change striving to remove IpConfig's
	namedtuple which merely adds an unnecessary layer in network configurators
	and to introduce a boolean 'dhcpv4' parameter in setupNetworks (to mirror
	the 'dhcpv6' parameter) which will deprecate the legacy 'bootproto' parameter.

	As the first milestone IpConfig now gains the ability to initialize itself
	with no parameters so it is possible to gradually replace the usage of the
	namedtuple (IpConfig.ipConfig) in configurators (and in models.NetDevice)
	with IpConfig itself (NetDevice.ip, soon to be renamed to NetDevice.ipconfig).

	Next, the @property NetDevice.ipConfig, which just wraps information stored
	in IpConfig (and its members IPv4 and IPv6) can be removed.

	Finally, IpConfig will move from the string 'bootproto' to a boolean 'dhcpv4'.

	I think it is supported to configure (if a user pleases) a network with no IP
	configuration. Hence, I removed the ConfigNetworkError exception ("You need to
	specify IPv4 or IPv6 or both address").

2015-02-20  Francesco Romani  <fromani@redhat.com>

	profile: transform into a subpackage
	this patch tranforms the profile module into the
	profiling subpackage, to make room for the memory
	profiling module.

	No code change besides moving around and fixing imports.

2015-02-20  Ondřej Svoboda  <osvoboda@redhat.com>

	testStaticNetworkConfig: check a network's IPv4 address
	We should also verify bridged and unbridged configuration directly from
	the bridge or the dummy nic because we want the engine to refer to their
	reported information instead of reading the duplicated information from
	the network's dict.

2015-02-19  Nir Soffer  <nsoffer@redhat.com>

	tests: Add ValidateNotRunningAsRoot
	Some tests simulate failures that happen only when running as
	unpriviliged user. When running as root, the test will fail although the
	test code is fine.

	This patch adds @ValidateNotRunningAsRoot decorator, skipping decorated
	tests when running the test suite as root.

	tests: Add tests for filesUtils.createdir
	Add few trivial tests before refactoring.

2015-02-19  Petr Horáček  <phoracek@redhat.com>

	network: api: allow removal of bond with no slaves
	If we try to remove a bond with no slaves attached, VDSM explodes and
	doesn't allow us to repair the network.

	This patch moves checking of slaves up the stack, only to 'edit' and
	'add' bond's functions.

	'remove' bond function is able to objectivize slaveless bond and allows us
	to remove it.

	Bug-Url: https://bugzilla.redhat.com/1183728

2015-02-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding support for cluster level 3.6

2015-02-19  Petr Horáček  <phoracek@redhat.com>

	tests: reorganize imports in utilsTests.py

	network: filter out networks with unconfigured bonds

2015-02-19  Francesco Romani  <fromani@redhat.com>

	tests: fix return value
	fix tests to conform to the new internal API.

2015-02-19  Ondřej Svoboda  <osvoboda@redhat.com>

	_get_gateway: allow duplicated gateways if they are in fact the same routes
	This happens with a DHCP libvirt network (e.g. the ovirtmgmt bridge) for which
	1) dhclient(-script) adds a gateway to the main table and also
	2) dhclient-script notifies VDSM's dynamic source routing thread which adds
	   the same gateway to a dedicated routing table (and corresponding routing
	   rules)

	In this configuration the gateway acquired via DHCP(v4) was not reported so
	let's start reporting it now.

	Before solving the referenced bug, only gateways from the 'main' routing table
	would be reported, not the ones in separate tables. Since dhclient(-script) is
	not supposed to handle source routing we have to consult all tables which VDSM
	itself creates.

	Bug-Url: https://bugzilla.redhat.com/1186330

2015-02-19  Nir Soffer  <nsoffer@redhat.com>

	tests: Replace workaround for caching during tests with invalidation
	Replace the workaround added to avoid caching of _supports_src_cache
	with cleaner memoized invalidation.

	tests: Enable again utils.memoized in the tests
	Tests that may leave dirt in memoized functions should invalidate the
	functions during teardown.

	Since we disabled memoizing becuase of pulluted memoized functions in
	caps module, caps tests invalidate all memoized functions now.

2015-02-19  Ondřej Svoboda  <osvoboda@redhat.com>

	_get_gateway: formally require an interface for lookup
	All callers pass the interface name so let's simplify even further, after
	I27c1c97e1b59ab45cc1bb3e7a358021c62c919d2 started to require routes_by_dev.

	testSetupNetworksAddDelDhcp: check that IPv4 gateways are reported correctly

2015-02-18  Nir Soffer  <nsoffer@redhat.com>

	utils: Add memoized invalidation
	We learned in the hard way that memoizing and monkey-patching do work
	nicely together. However, disabling memoizing during the tests means
	that we do not test the same code in the application.

	This patch adds invalidate() method to memoized functions, so tests can
	clean up properly after they modify memozied data.

	This can also be used by application code to invalidate memoized
	functions in certain conditions.

2015-02-18  Martin Polednik  <mpolednik@redhat.com>

	vmTests: move device tests out of vmTests
	vmTests.py, like vm.py, has grown in size a lot. Since some of the
	devices are already isolated in their own class, we can easily move
	this out to different module. Also some of the devices were in the
	TestVM class, where they don't belong and are therefore also moved out.

2015-02-18  Shahar Havivi  <shaharh@redhat.com>

	v2v: fix wrong handling of errCode in get_external_vms
	Opening connection via libvirt didn't return proper error code but
	failed with exception.

2015-02-18  Timothy Asir  <tjeyasin@redhat.com>

	gluster: add _getDeviceDict function to reuse common code
	Added internal function to return device dictonary which can be
	used for storageDevicesList and any subsequent function.
	Updated _canCreateBrick internal function to return False for
	the device which type belongs to 'lvmthinlv'
	Added device format uuid into storageDeviceList which was
	missing in the existing function.

2015-02-18  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Improve logging when creating directories
	Log the mode when specified and format octal numbers only when needed by
	the current logging level.

2015-02-18  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfoTests: no need to import each and every netinfo function
	The list of imports from netinfo uncontrollably grew with netinfo members
	that were used only once or a small number of times.

	testSetupNetworksAddDelDhcp: shorten before adding checks for gateways

2015-02-18  Petr Horáček  <phoracek@redhat.com>

	network: remove unused execCmd outputs

2015-02-17  Ondřej Svoboda  <osvoboda@redhat.com>

	ifcfg: remove an unused function _getConfigValue

2015-02-17  Francesco Romani  <fromani@redhat.com>

	vm: guestagent: do not access guestinfo directly
	guest info should be get using the getGuestInfo()
	method and not using the guestInfo field directly.

	This patch fixes that.

2015-02-17  Nir Soffer  <nsoffer@redhat.com>

	virt: Fix limit when calculating next volume size
	Drive.getNextVolumeSize() limit was wrong in two ways. First,
	Drive.truesize is *not* the drive true size on block-based drive (it
	is a duplicate of Drive.apparentsize). Second, Drive.truesize is using
	bytes but the code assumed that it is using megabytes. The result was
	that next volume size was limited only by the vg free size.

	Drive.getNextVolumeSize() requires now a capacity argument.  To prevent
	the confusion with mixing different size units, we use now safer naming
	convention.

	Vm.extendDriveVolume() requires now a capacity argument. The capacity
	was already available but unused in the drive monitoring code.

	When starting live storage migration or live merge, we use now
	libvirt.virDomain.blockInfo() to get drive capacity for the initial
	extension.

2015-02-17  Petr Horáček  <phoracek@redhat.com>

	tests: netlink: remove expected event missing in EL7

2015-02-17  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: report DHCP from configuration to avoid confusion after stopping DHCP
	Note: this concerns reporting of DHCP for networks only, not for individual
	devices, so far. (If we require the engine to read network configuration from
	the devices, typically bridges, we will have to report DHCP, as configured on
	the network, even for the devices.)

	Until now, after moving away from reporting DHCP based on ifcfg files, VDSM
	relied on dhclient's lease files. Even after a network was reconfigured to
	stop using DHCP and thus dhclient was stopped, DHCP would still be reported
	from the still valid leases (which preserve the state of network configuration
	as obtained from a DHCP server, to rebind later to the same address if
	allowed).

	Although I introduced this behaviour intentionally, VDSM must stop reporting
	dhcpv4 and dhcpv6 for a network that is reverted to static configutation
	(which is to be effective immediately not to confuse the engine and the user).

	The currently active network configuration is queried to find out if DHCPv4/6
	is to be reported, or not. If a network is not configured, leases are
	consulted again.

	testSetupNetworksAddDelDhcp reverts from DHCP-configured network to static
	configuration and checks that DHCP is no longer reported (indeed, netinfo
	returns the configured values for networks, now).

	pep8: fix `make check` on EL6
	Sadly http://danken.fedorapeople.org/python-pep8-1.4.5-2.el6.noarch.rpm is
	not enough now.

	I may just be lazy to recompile python-pep8 from a newer source package
	and fake python(abi) = 2.7 dependency. Or, I can apply this patch and have
	`make check` running.

2015-02-17  Nir Soffer  <nsoffer@redhat.com>

	fileSD: Optimize getAllVolumes on file storage
	The previous implementation was using O(N^2) search to detect template
	images and volumes. When working with storage domain with large number
	of disks created from the same template, getAllVolumes becomes very
	slow, delaying flows such as vm startup and recovery.

	This patch reimplements getAllVolumes using O(N) search, cutting the
	time to process 5000 volume paths from 9 to 0.065 seconds.

	Profiling on scale setup show that getAllVolume cpu time per call
	dropped from 44 to 1.3 seconds, and the total cpu time used for
	preparing 20 images drop from 884 to 28 seconds.

	Before this patch:

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       ...
	       20    0.153    0.008  884.109   44.205 hsm.py:3188(HSM.prepareImage)
	       20    7.242    0.362  883.014   44.151 fileSD.py:414(NfsStorageDomain.getAllVolumes)
	   214840  866.080    0.004  866.080    0.004 fileSD.py:444(<genexpr>)
	      ...

	With this patch:

	   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	      ...
	       20    0.128    0.006   28.302    1.415 hsm.py:3188(HSM.prepareImage)
	       20   10.391    0.520   26.579    1.329 fileSD.py:415(NfsStorageDomain.getAllVolumes)
	     ...

	Bug-Url: https://bugzilla.redhat.com/1179950

2015-02-16  Nir Soffer  <nsoffer@redhat.com>

	virt: Check if a drive is chuhked before extending
	Previously extendDriveVolume() was checking if a drive is a block device
	and assumed that callers checked the drive format. The check was unneeded
	when called from extendDrivesIfNeeded(), and spreading the logic between
	different methods makes the code harder to understand.

	Now extendDriveVolume() requires that callers are doing the required
	checks and callers are checking Drive.chunked before calling it.

	When we support LSM between mixed storage domain, Drive.chunked will
	encapsulate the logic for handling replication of file-based drive to
	block based storage domain.

	In merge(), we are always dealing with cow volumes, so checking for
	blockDev is enough. Using Drive.chunked for clarity.

	tests: Remove workaround for caching during tests
	In change Ibd986403a we disabled utils.memoize during testing, so we can
	drop the workaround added to avoid caching of _supports_src_cache.

2015-02-16  Francesco Romani  <fromani@redhat.com>

	tests: disable memoization in testrunner
	memoization during tests is harmful, because
	it adds another one hidden layer of global state
	shared across test runs.

	This may lead -and actually did- to hard
	to debug failures in apparently unrelated code.

	The net result is waste of developer's time,
	and decreased trust in automated tests
	because of mysterious failures.

	To fix that, we now monkeypatch in testrunner
	only utils.memoized with a fake which avoids caching.

2015-02-15  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: show the dnsmasq command on failure to ease debugging on EL6

	dummy: unify parameter 'dummy_name' naming with a variable name already used

2015-02-14  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: delete our lease files also on EL6
	EL6's initscripts name them with one less dash and the extension *.leases,
	unlike recent ones (*.lease). (Inside the two dashes there may be a UUID if
	set in an ifcfg file.)

	  dhclient--veth_wjG7pxZqwg.lease (EL7), dhclient-veth_wjG7pxZqwg.leases (EL6)

	networkTests: remove a broken workaround for NM interfering in DHCP tests
	When introducing testDhclientLeases which tested DHCPv4 only I let the test
	suite add an IPv4 address to the client side of a veth pair (on the other
	there is dnsmasq serving as a DHCP server) so NetworkManager will not run
	its own dhclient there. I also added this workaround to testSetupNetworks-
	AddDelDhcp).

	There is a more appropriate way to unmanaging devices, and that is by passing
	NM_CONTROLLED=no in an ifcfg file to nmcli conn load, although this workaround
	is probably specific to distributions that use ifcfg network configuration
	(as an Arch user I may address this later, but patches are welcome).

	Ever since I added IPv6 capability to the dnsmasq wrapper used in both tests
	they require that NM be stopped or told not to manage veths because it sets
	the sysctl property disable_ipv6 on all devices out of security concerns, see
	e.g. https://bugzilla.redhat.com/show_bug.cgi?id=1102064

	If NM is running the two tests are skipped with the message added recently:

	  SKIP : Failed to add the IPv6 address fdb3:84e5:4ff4:55e3::1/64 to device
	  veth_xrSWAagFYW: ['RTNETLINK answers: Permission denied']; NetworkManager
	  may have set the sysctl disable_ipv6 flag on the device, please see e.g.
	  RH BZ #1102064

	At least Fedora 21 and EL7 are affected, EL6 is not because it relies on the
	'network' initscript. The NM versions on Fedora 21 and EL7 are currently:

	  0.9.9.1-35.git20140326.4dba720.el7 and
	  0.9.10.1-1.4.20150115git.fc21

	Let's remove the imperfect approach now.

	In the following patches we will inform NetworkManager to "unmanage" both
	veth sides (and later also dummies) by passing an ifcfg file with
	NM_CONTROLLED=no in it.

2015-02-14  Francesco Romani  <fromani@redhat.com>

	tests: forbid tabs in schema
	Our schema parser doesn't like tabs.
	Add a test to detect them, to avoid wasting times
	chasing them in the editor.

	schema: require vmId in {Exited,Running}VmStats
	On commit bb45b4b619c9a30a8fb35865fbd99f680295ac15
	we were reminded in an harsh way that vmId must
	always be present in the Vm.getStats() output.

	One of the problems was that the vmId field was injected
	the Vm.getStats() output by API.py, and this value was
	not documented in the schema.

	So, this patches update the schema to reflect the
	reality of the Engine's needs.

	Related-To: https://bugzilla.redhat.com/1191405

2015-02-13  Francesco Romani  <fromani@redhat.com>

	tests: clear libvirtconnection cache
	the libvirtconnection has a cache to reuse connections,
	and this caching doesn't play well with the monkeypatching
	which we do in tests. 

	In libvirtconnectionTests, we create fake libvirt objects,
	most notably fake virConnect-s. Unfortunately, the test fails
	to clean up properly the libvirtconnection cache.

	So, the test runs just fine in isolation, but if run in batch
	like in 'make check', later tests which expect the real object
	become broken.

	The failure presents itself like the following:

	AttributeError: 'virConnect' object has no attribute 'getMemoryStats'

	This patch fixes this error adding a facility to clear
	the libvirtconnection cache, and clearing it after each
	test.

2015-02-13  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: give an instructory message when an address could not be added
	On recent Fedoras and EL7 NetworkManager sets the sysctl property disable_ipv6
	on some interfaces (including veths) silently, as a workaround to IPv6LL
	(link-local address) assignment clash between NM and the kernel, see e.g.
	https://bugzilla.redhat.com/show_bug.cgi?id=1102064

	In the next commits this problem will be addressed by telling NM to unmanage
	our veth pairs and dummy devices.

2015-02-13  Petr Horáček  <phoracek@redhat.com>

	network: change objectivizeNetwork to private

2015-02-13  Nir Soffer  <nsoffer@redhat.com>

	virt: Add Drive.chunked property
	Previously the logic for extending a drive was part of the vm god-class.
	This makes the code little more readable, and encapsulate the logic in a
	better location.

	virt: Invalidate drive blockDev when path changes
	After live storage migration between mixed domain types, a drive
	blockDev must be reinitialized. We initialize this property in __init__
	for cdrom or floppy devices, or lazily for other devices, and cache the
	computed value for later calls.

	The initialization was moved to single location, to make it easier to
	understand the code.

	Drive.path is now a property so modifying it after LSM invalidates
	cached blockDev value.

	For easier debugging, each time Drive.path changes we log the old and
	new values.

2015-02-11  Darshan n  <dnarayan@redhat.com>

	gluster: Added gluster snapshot restore verb.
	This patch adds verb to restore gluster volume
	snapshot.

	*glusterSnapshotRestore: Restores a gluster volume snapshot.
	Takes snapshot name as an argunment.
	Returns:
	{'volumeName': 'vol1',
	 'volumeUuid': 'uuid',
	 'snapshotName': 'snap2',
	 'snapshotUuid': 'uuid'}

2015-02-11  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add support for reporting usb addresses
	This patch extends the address field in hostdev tree that holds map of
	address fields relevant to the device. This is required in order to
	passthrough a usb device.

	usb_device is used because it is libvirt standard used for viable
	devices.

	devices: remove redundant slot
	'device' slot is defined in Base class (core.py), there is no need
	to have it in child classes.

2015-02-11  Amador Pahim  <apahim@redhat.com>

	qemu-img: check/use "-T src_cache" option in convert/rebase when available
	"qemu-img" is used for operations like disk move or snapshot delete.
	This process reads data using the hypervisor page cache. As this data might
	be hotter than any VM memory the system starts swapping out memory pages of
	the running VMs.

	vdsm already uses "-t none" option to avoid cache for output image. Now
	"qemu-img" introduced a new "-T src_cache" to avoid cache for the
	input image (bz#1116558).

	This patch is testing if qemu-img has the new "-T src_cache" option available
	for convert and rebase commands and using it with "-T none" when true.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138690

2015-02-11  Francesco Romani  <fromani@redhat.com>

	virt: add ExpiringCache
	ExpiringCache is a simple cache with expiring time attached
	to keys. This class implements parts of the dict() interface,
	but do not aims to be a full replacement for dict()s.
	ExpiringCache is thread safe.

2015-02-11  Shahar Havivi  <shaharh@redhat.com>

	v2v: additional info for disk and network
	disk now return type ('disk', 'cdrom' etc)
	network now return type ('e1000', 'rtl' etc)

2015-02-11  Nir Soffer  <nsoffer@redhat.com>

	virt: Move status constant to vmstatus
	_get_lastStatus was creating a temporary tuple using values from
	vmstatus. The repeating "vmstatus." tells us that the code belongs to
	the vmstatus module.

2015-02-11  Arik Hadas  <ahadas@redhat.com>

	vm: add missing vm id to get stats of down vm
	The stats that are returned for a VM which is down does not contains the
	id of the VM.

	This was broken by 7f577ab94b35f2cb2560d3ae49d6b0f753588474, which failed
	to put the vmId in the 'Exited Vm Stats', but only in the 'Running Vm Stats'

	That causes a regression since the engine uses this id,
	without it hibernated VM is not destroyed, but remains down on the host.
	Thus, adding the vm-id back.

	Bug-Url: https://bugzilla.redhat.com/1191405

2015-02-10  Dima Kuznetsov  <dkuznets@redhat.com>

	signals: Handle signals to non-main threads
	This patch addresses an issue of signals being delayed in supervdsm,
	in attempt to add zombiereaper to supervdsm, zombiereaper did not
	receive signals it was supposed to receive.

	When any thread in python receives a signal, python's signal handler
	(running in that thread) marks the signal as received and writes down that
	the main thread should handle any arrived signals. When main thread
	calls signal.pause(), it goes to sleep until it receives a signal (on
	main the main thread itself).
	If during that time, a signal is received on any other thread, it is not
	handled until main thread itself receives any other signal (because of what
	the signal handler does)

	I've reported the issue here, also with a simple reproducing script:
	https://bugzilla.redhat.com/show_bug.cgi?id=1114434

2015-02-10  Ondřej Svoboda  <osvoboda@redhat.com>

	dnsmasqDhcp: fix an inverted condition
	Anywhere _except_ EL6 we want to use dnsmasq with --bind-dynamic.

2015-02-10  Francesco Romani  <fromani@redhat.com>

	vm: make _getNicStats a function
	_getNicStats used to be a classmethod of VmStatsThread,
	but there are no valid reasons anymore to keep it like that.

	This patch makes it a plain function, to make room
	for more refactoring in this area.

	There are no changes in logic.
	Except for moving code around, the only significant change
	is the removal of the now-useless 'cls' argument.

	vm: make MBPS_TO_BPS a module constant
	There is no good reason anymore to have MBPS_TO_BPS a class constant,
	so this patch moves it to module level, in order to make room for more
	future cleanup.

	vmchannels: downgrade logs about expected flows
	virt flows have plenty of steps logged, but some of them
	aren't worth of the user's attention, so downgrade them.

2015-02-10  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: report a gateway for statically configured networks
	Bug-Url: https://bugzilla.redhat.com/1186330

	networkTests: also check we successfully report an IPv4 gateway
	Bug-Url: https://bugzilla.redhat.com/1186330

	networkTests: use IP_MASK, there's no need for prefix2netmask

	ipwrapper: remove the unused function 'routeList'

2015-02-10  Nir Soffer  <nsoffer@redhat.com>

	tests: Add tests for drive disk type
	Test Drive.networkDev and Drive.blockDev before refactoring these
	properties.

	tests: Rename test class
	It is easier to grok the tests results when the name of the test case
	starts with meaningful word, instead of "Test".

	TestFoo
	  test_xxx
	  test_yyy

	FooTests
	  test_xxx
	  test_yyy

	tests: Add drive_config helper
	Instead of repeating all drive options for each test, add a helper
	function to create drive configuration specifying only the interesting
	options for the specific test.

2015-02-10  Petr Horáček  <phoracek@redhat.com>

	network: store non-Vdsm ifcfgs with unified persistence
	Unified restoration first removes everything in the running config and
	then tries to regenerate everything that's in the persisted config,
	problem is, that original devices are not persisted.

	In this patch we (temporarily) use ifcfg persistence for non-Vdsm devices
	(even when unified persistence is set), so we are able to restore them.

	Bug-Url: https://bugzilla.redhat.com/1188251

2015-02-09  Ondřej Svoboda  <osvoboda@redhat.com>

	_get_gateway: reformat a list comprehension for readability

2015-02-08  Nir Soffer  <nsoffer@redhat.com>

	tests: Move drive shared tests to storage module
	Move virt.vmdevices.storage.Drive shared tests to vmStorageTests module.

	Refactor the old test so each test case is a separate method so one
	failure does not effect other test cases.

	tests: Remove unused imports
	Commit 507179aa3a1f left unused imports breaking pyflakes check.

2015-02-08  Ondřej Svoboda  <osvoboda@redhat.com>

	kill_dhclient: log whenever we stop a previously running dhclient
	When VDSM wants to run its own dhclient it has to stop a dhclient that was
	serving the given interface. This important action was not logged previously
	so let's do that now so it's easier to locate (even unsuccessful) VDSM's
	attempts to replace a DHCP client.

2015-02-07  Ido Barkan  <ibarkan@redhat.com>

	reorder methods of netconfpersistence module
	Trying to improve readability by placing public methods first

2015-02-07  Francesco Romani  <fromani@redhat.com>

	tests: profile: use make_config from testlib
	Recently a generic utility to build new
	custom instances of VDSM config was added to testlib.
	This function is equivalent, but more generic, to the
	one previously bundled with profileTests.

	This patch makes profileTests use the code from testlib.

2015-02-06  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Cleanup logging when mount fails
	- Log the OSError text if os.rmdir fails instead of an unhelpful traceback
	- Use logging.exception instead of exc_info=True
	- Use "mountpoint" instead of "mount point"
	- Use %r for revealing whitespace bugs in paths
	- Unify logging messages

	storageServer: Fix connection error handling
	We used to log a traceback and then raise the original error instance
	(with a truncated traceback), which would cause another useless
	traceback for the same error.

	Now we keep the original exception info and re-raising it, so it is not
	masked by errors raised during cleanup. Since we raise useful exception,
	we don't need the additional log; having 2 tracebacks for same error is
	not helping anyone.

2015-02-06  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: do not confuse dhclient with invalid configuration
	When testing the ability to parse dhclient -6 leases we passed
	  db-time-format not applicable;

	as configuration to dhclient, signalling rather to ourselves that dhclient
	formats time values in its leases in 'default' (full date) or 'local'
	(second since epoch) format only in DHCPv4 mode.

	Since dhclient complains in logs about an unknown db-time-format let's just
	create an empty file instead.

2015-02-06  Darshan n  <dnarayan@redhat.com>

	gluster: volume snapshot activate and deactivate verbs.
	This patch adds two new verbs to activate and deactivate
	gluster volume snapshots.

	*glusterSnapshotActivate: Activates gluster volume
	snapshot. It takes force as optional argument. when
	force is provided snapshot is activated forcefully.
	Returns success/failure.

	*glusterSnapshotDeactivate: Deactivates gluster volume
	snapshot. Returns success/failure.

2015-02-06  ndarshan  <dnarayan@redhat.com>

	gluster: geo-replication configuration related verbs.
	This patch adds three new verb related to geo-replication
	configuration.

	Verbs:
	 * glusterVolumeGeoRepConfigList
	    - Lists all the configuration for the session.
	      Returns:
	       {georepConfig:{'optionName': 'optionValue',...}
	       }

	 * glusterVolumeGeoRepConfigSet
	    - Sets the configuration value for a given
	      configuration.
	      Returns:bool

	 * glusterVolumeGeoRepConfigReset
	    - Sets the configuration to its default value
	      Returns:bool

2015-02-06  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: order VDSM modules after its libraries

	networkTests: order VDSM libraries after system libraries

2015-02-05  Dan Kenigsberg  <danken@redhat.com>

	Revert "Require newer dhclient on el7"
	This reverts commit e22a79bace890b69858b93b77c953ce8068598ee.
	We may need to conflict with dhcp server, but never to require it.

2015-02-05  Nir Soffer  <nsoffer@redhat.com>

	tests: Move virt storage tests to new module
	This patch moves virt.vmdevices.storage.Drive.getXML tests to new
	vmStorageTests module. Future patches will move the rest of the Drive
	releated tests.

	Moved tests were refactored to make them more reliable, readable and
	easier to modify.

	- Each test case has its own test method, so failure of one test case
	  does not effect others.
	- Device configuration was indented and sorted
	- Unneeded logic was eliminated

2015-02-05  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Added support for reporting the timezone and os info
	The guest agent reports now the timezone and more detailed
	os information. This patch introduces the support for those
	new messages.

	OS info reporting in the guestagent:  http://gerrit.ovirt.org/#/c/28938
	Timezone reporting in the guestagent: http://gerrit.ovirt.org/#/c/28013

	Guest-Agent-API-Version: 2
	Bug-Url: https://bugzilla.redhat.com/869296

2015-02-05  Dan Kenigsberg  <danken@redhat.com>

	Require newer dhclient on el7
	I don't want to hear about dhclient bug
	https://bugzilla.redhat.com/show_bug.cgi?id=1116004
	again.

2015-02-05  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove unused import
	Recent commit left unused import, breaking the build.

2015-02-04  Petr Horáček  <phoracek@redhat.com>

	tests: assertLess is not a part of TestCaseBase on el66

2015-02-04  Ido Barkan  <ibarkan@redhat.com>

	Allow passing custom properties when removing networks.
	This allows greater flexibility when writing hooks. For example, it will be
	possible to perform proper cleanups after setupNetwork occurs.
	Engine still needs to pass the custom properties on network removal For this
	to be fully functional.

	tests: 'ip link del dev <bridge>' fails on el6 if the bridge device is still up.

2015-02-04  Darshan n  <dnarayan@redhat.com>

	gluster: volume snapshot create and delete verbs.
	This patch adds three new verbs to create and delete
	gluster volume snapshots.

	*glusterVolumeSnapshotCreate: Creates gluster volume
	snapshot. It returns uuid of the created snapshot.

	*glusterSnapshotDelete: Deletes gluster volume
	snapshot. Snap name should be provided as argument,
	that snapshot will be deleted. Returns success/
	failure.

	*glusterVolumeSnapshotDeleteAll: Deletes gluster volume
	snapshot. Volume name should be provided as argument,
	all snapshots for that volume will be deleted.
	Returns success/failure.

2015-02-04  Antoni S. Puimedon  <asegurap@redhat.com>

	net_func_tests: Rollback only when an error happens
	Up until now, net_func_tests used RollbackContext that always
	performs all the rolling back operations on context exit. This patch
	adds a flag to RollbackContext that if explicitely set to True, will
	only perform the rollback operations in case the context was left
	due to an exception.

2015-02-04  Petr Horáček  <phoracek@redhat.com>

	network: api: be consistent with bootproto = None

	netlink: replace ipwrapper monitor

2015-02-04  Frantisek Kobzik  <fkobzik@redhat.com>

	vdsm: Fix return value of _setTicketForGraphicDev
	Invoking VM.updateDevice method via json api expects result to contain
	vmList attribute, however, this method doesn't always contain it in
	case of updating graphics device.
	This patch adds the attribute.

2015-02-04  Ido Barkan  <ibarkan@redhat.com>

	Better logging for networks that are added twice.
	This is useful in tests mainly but may come handy in real world scenario also.

	Handle bridge reconfiguration
	This fixes a regression that was introduced in
	3951f078d840f6c99d3e72b8ef95a94c6fad4094. When a bridged network is
	reconfigured, for example, changing its IP or its bootproto, vdsm would change
	nothing, since it would try to leave the bridge intact. Comparing the required
	configuration (setupNetworks arguments) to the running configuration solves
	this.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1184497

2015-02-03  Ido Barkan  <ibarkan@redhat.com>

	netinfo: routes_by_dev parameter is never None anyway so _get_gateway can be simplified.

2015-02-03  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add support for reporting scsi addresses
	This patch extends the address field in hostdev tree that holds map of
	address fields relevant to the device. This is required in order to
	passthrough a scsi device

2015-02-03  Dan Kenigsberg  <danken@redhat.com>

	restore-net-config: set main thread name
	restore-net-config's log flow to supervdsm.log, and are a bit hard to
	discern.

2015-02-03  Martin Polednik  <mpolednik@redhat.com>

	numvfs: fix schema mistake
	Mistake slipped through where schema mentions deviceName while
	API mentions device_name. This patch changes the name in API in
	order to be consistent with rest of API.

2015-02-03  Dima Kuznetsov  <dkuznets@redhat.com>

	bridge: Make VdsmError more verbose
	Before:
	Traceback (most recent call last):
	  Line 10, in <module>
	    raise VdsmError(1, 'a message 1')
	VdsmError

	After:
	Traceback (most recent call last):
	  Line 24, in <module>
	    raise VdsmError(2, 'a message 2')
	VdsmError: [error 2] a message 2

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1181646

2015-02-03  Martin Polednik  <mpolednik@redhat.com>

	hostdev: implement numvfs changing
	This patch implements functionality, where user desires to change
	number of virtual functions for given physical function. This is done
	via sysfs, with a little addition that before changing the number of
	functions, they have to be removed entirely.

2015-02-03  Francesco Romani  <fromani@redhat.com>

	virt: move all_channels into DomainDescriptor
	before the introduction of the DomainDescriptor
	class, we had a bunch of functions/methods who
	repeteadly parsed the VM XML Domain using the slow
	minidom module.

	The introduction of the DomainDescriptor opens
	the gate for both more efficient and cleaner processing.

	DomainDescriptor should provide methods to return
	high-level objects, not low-level ones, e.g, XML document
	nodes, which are inevitabily tied to the underlying xml
	library being used.

	The first step in this (long) journey is to move
	vmxml.all_channels into the DomainDescriptor.
	This allow us to have both nicer code in vm.Vm
	and to save us one unneeded XML parsing.

	vm: use DomainDescriptor in setTicket
	setTicket used to fetch and parse yet again the Domain XML.
	Since there is no known good reason to do so, this patch
	changes the code to make use of the DomainDescriptor,
	in order to gain a bit more of performance and of code brevity.

	executor: introduce the executor library
	Executor is a thread pool augmented with the
	capability of discard blocked worker threads,
	by replacing them with fresh ones.

	This is needed to accomodate the needs of the sampling code.
	The sampling needs to deal with possibly blocking libvirt
	calls which needs to enter into the QEMU monitor,
	thus can get stuck due to QEMU being in D state.

2015-02-02  Nir Soffer  <nsoffer@redhat.com>

	storage.monitor: Streamline names
	Rename internal classes using shorter names, considering the package
	namespace. For example:

	    storage.monitor.DomainMonitorStatus -> storage.monitor.Status

	In this case the name is more correct, as this is not the status of the
	single DomainMonitor object but status of one of the monitor threads.

	Since DomainMonitorThread was renamed, the logger was renamed too. We do
	not need muliple loggers for the DomainMonitor and the MonitorThread, so
	both of them use now the Storage.Monitor logger.

	storage.monitor: Use lowercase module name
	storage.domainMonitor was using pep8 incompatible and too specific
	module name.

2015-02-02  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add dynamic udev rule creation for iommu groups
	Detaching a device from a host (via detach_detachable) spawns
	a new vfio endpoint in /dev/vfio/$name, where $name = iommu group
	number. In order to start a VM with this endpoint assigned (= vm
	with device passed through) we need rw permissions for QEMU.

	This patch adds dynamic udev rule creation/deletion for when device is
	detached/reattached from or to the host.

	Creating an udev rule will happen one time for each IOMMU group, that
	is passed through to the host. That means we're expecting the call to
	only happen on VM creation, where the number of such VMs is very limited
	(possibly 1 or few).

2015-02-02  Nir Soffer  <nsoffer@redhat.com>

	rpc: Replace misuse of assert with TypeError
	Asserts are optimized out when running with -O or when using
	PYTHONOPTIMIZE environment variable.  This assert seems like a security
	related check, and it should never be right to ignore this check.

	Replaced with TypeError, which is the expected error when passing
	non-existing argument to a function.

	I'm not very happy about this, since this hides a security failure,
	pretending to be a Python calling error. Anyway this is better then
	the assert.

	mailbox: Log traceback after fatal failures in mailbox monitors
	Mailbox monitor threads were not logging fatal error properly. Now these
	threads use our standard @traceback decorator to ensure that failures
	are logged properly.

	Relates-to: https://bugzilla.redhat.com/1117795

2015-02-02  ndarshan  <dnarayan@redhat.com>

	gluster: geo-replication pause and resume session
	This patch adds two new verbs to pause and resume
	geo-replication session between master and slave
	volume.

	Verbs:
	glusterVolumeGeoRepSessionPause
	   This verb Pauses a geo-replication session between
	a local and a remote volume. It retruns boolean
	output.

	glusterVolumeGeoRepSessionResume
	   This verb resumes a geo-replication session between
	a local and a remote volume. It retruns boolean
	output.

2015-02-01  Martin Polednik  <mpolednik@redhat.com>

	hostdev: add support for reporting pci addresses
	This patch adds addr field into hostdev tree that holds map of
	address fields relevant to the device. This is required in order to
	avoid parsing the pci name (such as pci_0000_05_fe_1).

2015-01-29  Martin Polednik  <mpolednik@redhat.com>

	hostdev: remove physfn attribute in physfn
	Previously, detecting physfn was done via finding capabilities
	inside capabilities element, where address element pointed to physfn.
	This caused capabilities element in physfn with type 'virt_functions'
	to wrongly reference physfn in physfn. This patch fixes the bug,
	adding check for type attribute inside capabilities element, therefore
	removing the wrongful referencing.

2015-01-29  Adam Litke  <alitke@redhat.com>

	Live Merge: Update drive.format after active layer merge
	A merge of the active layer can change the drive format from cow -> raw
	if a snapshot was merged into a raw backing file.  In that case we must
	correct the VM Drive metadata to ensure the drive is handled properly
	after the merge has finished.

2015-01-28  Dan Kenigsberg  <danken@redhat.com>

	hostdev: report 'net' devices and their interface name

2015-01-28  ndarshan  <dnarayan@redhat.com>

	gluster: Added geo-replication session list and session status
	This patch adds the features geo-replication session list and
	session status.
	It exposes two verbs:

	*glusterGeoRepSessionList- It provides geo-replication session
	list of all sessions or between specified local volume and all
	its remote-volumes or between a specified local and remote volume.
	Returns:
	{'volume name':{
		 sessions: [{sessionKey: 'unique identification for session ',
		     remoteVolumeName: 'name of remote volume involved in session'
	             bricks: [{host: 'local host',
	                      hostUuid: 'uuid of brick host',
	                      brickName: 'local brick',
	                      remotehost: 'slave',
	                      status: 'status',
	                      checkpointStatus: 'checkpoint status',
	                      crawlStatus: 'crawlStatus'}]....
	         }]....
	  }
	}

	*glusterGeoRepSessionStatus- It provides detailed status of
	geo-replication session between a local and remote volume.
	Returns:
	{'volume name': {
	 	sessions: [{sessionKey: 'unique identification for session ',
	             remoteVolumeName: 'name of remote volume involved in session'
	             bricks: [{host: 'local host',
	                      hostUuid: 'uuid of brick host',
	                      brickName: 'local brick',
	                      remotehost: 'slave',
	                      status: 'status',
	                      checkpointStatus: 'checkpoint status',
	                      crawlStatus: 'crawlStatus'
	                      filesSynced: 'nos of files syncd',
	                      filesPending: 'nos of files Pending',
	                      bytesPending: 'nos of bytes pending',
	                      deletesPending: 'Nos of deletes pending',
	                      filesSkipped: 'Nos of files skipped'}]...

	        }]....
	  }
	}

2015-01-28  Federico Simoncelli  <fsimonce@redhat.com>

	utils: move nice ionice sid and sudo out of execCmd
	Utility commands as nice, ionice, setsid and sudo should be reusable
	with regular Popen calls. In order to make them composable this patch
	moves them out of execCmd.

2015-01-27  Francesco Romani  <fromani@redhat.com>

	virt: cleaner getAllVmStats
	the api.Global.getAllVmStats method was implemented reusing
	api.Global.getVMList and api.VM.getStats().

	This lead to unnecessary work, and a lot of layering traversal
	with objects being wrapped in responses, which in turn are
	promptly discarded and rewrapped again to obtain the final
	result. All of this without any clear benefit.

	This patch drops all the layering and use simple and lean
	methods to obtain the same result doing much less work.
	Unfortunately, total performance gains are expected
	to be negligible because this function was already
	very low in the profiling data.

	Related-To: https://bugzilla.redhat.com/1177634

	tests: add test case for getAllVmStats
	bootstrap test case for Host.getAllVmStats
	external API.

	Due to the racy behaviour of running stats,
	this test is added as broken.

	vm: properly implement readPauseCode
	When restarted, VDSM needs to know if a VM was paused for
	disk space exhausted, in order to properly extend the disk(s)
	before to (re)start it again.

	Since the move to libvirt, this code was not implemented.
	However, a couple of libvirt APIs which somehow are gone
	unnoticed so far, make it possible to implement it.

	This patch rebuilds readPauseCode on top of these APIs.
	Currently, readPauseCode reports these codes:

	NOERR  - if everything was fine.
	ENOSPC - if one or more disks was filled.
	EOTHER - if one or more disks exprienced any other error.

2015-01-27  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: use os.path instead of string concatenation
	supervdsmServer uses string concatenation to construct paths to
	udev rules. In python, using os.path collection of functions is
	the preferred way to handle filesystem paths. This patch implements
	using os.path tools.

2015-01-27  Shahar Havivi  <shaharh@redhat.com>

	v2v: add volume size to disk info
	Added size in bytes for each disk size.
	The size is needed by oVirt Engine for volume creation when import will
	take place.

2015-01-27  Martin Polednik  <mpolednik@redhat.com>

	supervdsm: remove unused constants
	Constants KB and TEST_BUFF_LEN are not used anywhere in the
	code, therefore being obsolete and not required. This patch simply
	removes them, unpolluting the code a bit.

2015-01-27  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix too delicate tests
	protocoldector tests were assuming that another thread will wake up
	exactly after 2.0 seconds, and were failing randomly if the other
	thread woke up 2 milliseconds later. We cannot make such assumptions in
	tests, in particular not when the test are running on overloaded vms.

	We use now additional grace time that practically make the issue
	disappear (without eliminating the test-only race).

	protocoldetector: Make cleanup more deterministic
	Protocol detector was setting the next cleanup time on each cleanup, by
	adding the cleanup internal to the currnet time. Since cleanup was done
	after processing all the events, and cleanup time was reached, this
	introduced small non-deterministic drift to the cleanup time, making the
	logic harder to test.

	Adding additional logging show that the server cleans up 2 milliseconds too
	late, causing the test to fail.

	1422041252.455594: vds.MultiProtocolAcceptor DEBUG Adding detector <protocoldetectorTests.Echo object at 0x7f49ba4c4410>
	1422041252.455715: vds.MultiProtocolAcceptor DEBUG Adding detector <protocoldetectorTests.Uppercase object at 0x7f49ba4c4450>
	1422041252.455924: vds.MultiProtocolAcceptor DEBUG Running
	1422041252.455979: vds.MultiProtocolAcceptor DEBUG Using required_size=9
	1422041252.456336: vds.MultiProtocolAcceptor DEBUG Adding connection 127.0.0.1:42807
	1422041252.456397: AcceptorTests DEBUG client 127.0.0.1:42807 waiting...
	1422041252.456564: AcceptorTests DEBUG client 127.0.0.1:42808 waiting...
	1422041252.456640: vds.MultiProtocolAcceptor DEBUG Adding connection 127.0.0.1:42808
	1422041252.456872: vds.MultiProtocolAcceptor DEBUG Adding connection 127.0.0.1:42809
	1422041252.456926: AcceptorTests DEBUG client 127.0.0.1:42809 waiting...
	1422041252.457131: vds.MultiProtocolAcceptor DEBUG Adding connection 127.0.0.1:42810
	1422041252.457197: AcceptorTests DEBUG client 127.0.0.1:42810 waiting...
	1422041252.457416: vds.MultiProtocolAcceptor DEBUG Adding connection 127.0.0.1:42811
	1422041252.457470: AcceptorTests DEBUG client 127.0.0.1:42811 waiting...
	1422041253.456519: vds.MultiProtocolAcceptor DEBUG cleaning up pending connections (elasped 1.000919)
	1422041253.456709: vds.MultiProtocolAcceptor DEBUG Removing connection 127.0.0.1:42807
	1422041254.456889: AcceptorTests DEBUG client 127.0.0.1:42807 woke up
	1422041254.457284: AcceptorTests DEBUG client 127.0.0.1:42808 woke up
	1422041254.457373: vds.MultiProtocolAcceptor DEBUG Detected protocol echo from 127.0.0.1:42808
	1422041254.457416: vds.MultiProtocolAcceptor DEBUG Removing connection 127.0.0.1:42808
	1422041254.457633: vds.MultiProtocolAcceptor DEBUG cleaning up pending connections (elasped 2.002052)
	1422041254.457727: vds.MultiProtocolAcceptor DEBUG Removing connection 127.0.0.1:42811
	1422041254.457781: vds.MultiProtocolAcceptor DEBUG Removing connection 127.0.0.1:42809
	1422041254.457828: vds.MultiProtocolAcceptor DEBUG Removing connection 127.0.0.1:42810
	1422041254.458750: AcceptorTests DEBUG client 127.0.0.1:42809 woke up
	1422041254.458858: AcceptorTests DEBUG client 127.0.0.1:42811 woke up
	1422041254.459377: AcceptorTests DEBUG client 127.0.0.1:42810 woke up

	This patches changes the calculation so it is more deterministic. We don't know
	when the server will wake up and how much time will be spent handling the
	events, but know eexactly what is the next cleanup time.

	Note that this does not prevent failures of the tests, since they are too
	delicate, depending on task scheduling. This will be fixed in the next patch.

2015-01-27  Darshan N  <dnarayan@redhat.com>

	schema test: limit line length in gluster schema
	This patch checks and limits the line length in gluster
	schema(vdsmapi-gluster-schema.json). And fix the lines
	in gluster schema having line length greater than 80
	characters.

2015-01-27  Nir Soffer  <nsoffer@redhat.com>

	zombiereaper: Raise if used incorrectly
	zombiereaper was trying to reap pid when it was not initialized
	properly. This lead to slient failures and and leaking zombies processes
	for the process lifetime.

	In commit 0636b8607b (Revert "supervdsm: Add zombiereaper to supervdsm")
	we removed zombiereaper from supervdsm, but there are still callers that
	assume it is inizialized. This patch ensures callers will fail loudly if
	zombiereaper was not initialzied.

	The tests are more carefull now not change the Python process state when
	importing tests from the test module.

2015-01-26  Francesco Romani  <fromani@redhat.com>

	numa: reformat to be pep8-friendlier
	reformat and make the code more pep8 compliant
	to improve readability, with no changes in
	behaviour.

	numa: avoid needless list comprehension
	A generator expression fits better and achieves
	the same result.

	numa: use defaultdict to simplify the code
	Leverage defaultdict(set) instead of reinventing it
	locally and partially, with no changes in logic.

2015-01-26  Darshan N  <dnarayan@redhat.com>

	gluster: Add geo-replication start and stop session
	This patch adds two new verbs to start and stop
	geo-replication session between local and remote
	volume.

	Verbs:
	glusterVolumeGeoRepSessionStart
	   This verb starts a georeplication session between
	a local and a remote volume. It retruns boolean
	output.

	glusterVolumeGeoRepSessionStop
	   This verb stops a georeplication session between
	a local and a remote volume. It retruns boolean
	output.

2015-01-26  Francesco Romani  <fromani@redhat.com>

	tests: mark testRunningStats as broken
	tests/vmApiTests was an early attempt to test that
	the output of API verb [vdsm.virt.]VM.getStats()
	was compliant to the schema.

	Because of how the sampling code currently
	works, to check for running stats is racy.
	Moreover, much more solid schemaCompliancyTests was
	recently added.

	The best course of action in the medium/long term
	is to refacor both the sampling and the testing
	code. To have more testable code will avoid races
	in the tests.

	Until that time, to avoid noise and to waste time,
	this patch marks the current broken test as such.

2015-01-26  Amador Pahim  <apahim@redhat.com>

	Handle iscsi iface.net_ifacename for existing iface
	Using a new version of engine which provides netIfaceName as an iscsi
	connection option, hypervisor has to properly handle this option.

	- For non-existent iscsi iface, nothing changes. We will create
	  the device using the netIfaceName coming from engine.
	- For already present iscsi iface:
	 * If iface.net_ifacename is empty, we update iface using the value
	   coming from engine.
	 * If iface.net_ifacename has a value and the value is different from
	   the netIfaceName coming from engine, we raise an exception and skip
	   the iface configuration. Manual intervention will be needed.

2015-01-26  Shahar Havivi  <shaharh@redhat.com>

	v2v: separate top level vm information to a method
	for a clearer code separate general vm information to a method from vm
	iteration logic.

2015-01-26  Nir Soffer  <nsoffer@redhat.com>

	schedule: Introduce scheduling library
	This moudule provides a Scheduler class scheduling execution of
	callables on a background thread. This should be part of the new
	scalable vm sampling implemntation.

	See the module docstring and tests for usage examples.

2015-01-24  Allon Mureinik  <amureini@redhat.com>

	spec: Require newer qemu-kvm-rhev version for EL6
	Require a newer qemu-kvm-rhev version that solves an issue with running
	a VM with more than 23 snapshots.

	Note that this issue was solved in qemu-kvm-0.12.1.2-2.422.el6. Modern
	EL6.6 releases already contain newer versions than that, so this patch
	serves mainly as a safeguard.

	Bug-Url: https://bugzilla.redhat.com/1113583
	Relates-To: https://bugzilla.redhat.com/1067576

2015-01-23  Petr Horáček  <phoracek@redhat.com>

	netlink: handy monitor context manager

	netlink: event monitor with timeout

2015-01-22  Dan Kenigsberg  <danken@redhat.com>

	tests: dummy: provide more info upon failure
	Expose a bit more information regarding the underlying failure when
	failing to remove or set IP on a device.

2015-01-22  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: sort imports from Python libraries, separate 3rd party nosetests

2015-01-22  Dan Kenigsberg  <danken@redhat.com>

	net tests: unbreak pyflakes
	My recent version of http://gerrit.ovirt.org/35061 has dropped a
	reference to time.sleep, but did not remove the import of the time
	module.

	net stats: expose sample timestamp

	net stats: drop statsAge from statistics
	statsAge has been reported by getVdsStats and getAllVmStats since ever,
	but it has never been consumed by Engine. This patch drops this element,
	since we would like to report sampleTime in a following patch, and would
	not like to report duplicate information.

2015-01-22  shlad  <a.shlado@gmail.com>

	net stats: add tx/rx statistic to getInterfacesStat

2015-01-22  Francesco Romani  <fromani@redhat.com>

	numa: restore compatibility with python 2.6
	Commit 6c8477355877bf2e tried to be a good one,
	but it was overzealous and that lead to a failure
	on python 2.6.

	The failing commit:
	- paranoidly checked for the presence of the
	  'pid' attribute on the 'vcpu' subelement.
	  Original code didn't. If the XML changes or lacks
	  this attribute for whatever reason, it should
	  not be fixed or handled here. Instead, we
	  should just stop to poke in libvirt's private data.

	- added tests to cover cases on which libvirt's
	  private XML isn't constructed the way we expect.
	  Again, proper solution is still the above one,
	  not trying to cover up.

	This commit removes the overzelousness, and makes
	the code working again on python 2.6.

	numa: rename _getHostNumaNodesCpuMap for clarity
	no code changes, only renaming

	numa: rename _getVcpuRuntimePinMap for clarity
	rename only, no code changes.

	numa: rename variables for clarity
	Rename the return value of
	getVcpuNumaMemoryMapping()
	to improve readability.

	No changes in logic, only in naming.

	Bug-Url: https://bugzilla.redhat.com/??????

	numa: rename _getVmNumaNodesCpuMap for clarity
	No code changes, just rename

	numa: virt: remove one more minidom user
	The NUMA support code relies on libvirt's internal XML representation
	to build its state and to track VCPU placement.

	A side effect of this already questionable usage is that VDSM has
	to parse a large XML document -larger than a VM domain definition,
	since the private representation contains libvirt's internal
	bookkeping data each time it is asked for NUMA stats.

	While we look for a more robust and more efficient way
	to reconstruct this information, this patch switches
	to a more efficient XML processing to offer some short-term
	quick help.

2015-01-21  Ido Barkan  <ibarkan@redhat.com>

	disconnect bridge port on rhel 6
	This fixes a bug introduced in d6d7db4ca24606d35acafe6e92b1ee031c0c8fe1
	Where del network learned how to disconnect a bridge port.  Since rhel6 ip link
	command does not support 'nomaster', we also try brctl.

2015-01-21  Yeela Kaplan  <ykaplan@redhat.com>

	spec: require selinux that allows logrotate to manage virt_cache
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131460

2015-01-21  Amador Pahim  <apahim@redhat.com>

	Simplify tests for qemuimg to allow additional capabilities checks
	Tests are mocking execCmd() to fake _supports_qcow2_compat(). To allow
	other capabilities checks inside convert(), this patch is:
	 - Creating a new class for compat tests.
	 - Moving compat commands tests from create/convert iclass to compat class.
	 - Testing the _supports_qcow2_compat() itself.
	 - Removing the need of mocking execCmd() inside convert tests.
	 - Mocking _supports_qcow2_compat() for convert and create tests.

2015-01-21  Federico Simoncelli  <fsimonce@redhat.com>

	image: use qemu-img convert to copy internal volumes
	According to the qemu-img manual:

	 You can use the backing_file option to force the output image to be
	 created as a copy on write image of the specified base image; the
	 backing_file should have the same content as the input's base image,
	 however the path, image format, etc may differ.

	The benefits to use qemu-img convert instead of dd to copy the internal
	volumes are:

	- we unify operations under just one tool that is specific for image
	  manipulations

	- copying images from block domains we won't copy the entire chunk
	  (1Gb) but only the amount of data really in use

	- qemu-img when copying images tries to re-sparsify them, so on certain
	  occasion the destination image will be shrinked to a smaller size

	The downside is the additional call to getParentVolume (that seems
	trascurable compared to the amount of data that we're going to copy).

	The following statistics were gathered using:

	 coreutils-8.4-37.el6.x86_64
	 kernel-2.6.32-504.1.3.el6.x86_64
	 qemu-img-rhev-0.12.1.2-2.415.el6_5.3.x86_64

	each copy ran 5 times; the reported values are the average and the
	standard deviation:

	- dd 3Gb data volume on block domain: 67.16s +-2.19s [1]
	- qemu-img 2Gb data volume on block domain: 37.60s +-0.32s

	- dd 2Gb data volume on file domain: 79.02s +-7.44s
	- qemu-img 2Gb data volume on file domain: 56.92s +-12.37s

	All the volumes contained the same (u)random data which is the
	worst case: qemu-img is forced to transfer each cluster of the image
	as dd does (in all the other cases qemu-img transfers less data).
	The only case where the amount of data transfered is different is
	explicitly mentioned.

	[1] here dd pays the price of having to copy the entire chunk of
	    allocated space (3Gb vs 2Gb of real data). Anyway even when
	    normalized to the same amount of data it's still slower.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1156115

2015-01-21  Petr Horáček  <phoracek@redhat.com>

	netlink: event monitor
	Current event monitor is implemented as a wrapper around `ip monitor`
	command.  It sometimes returns before the underlying monitor is properly
	started. However, it's used just in a few tests.

	We want to implement more natural version of monitor - wrapper around
	the libnl library. With this monitor we will be able e.g. to monitor
	`ifup` operation on a new device and guarantee properly created network
	before returned.

2015-01-21  Ido Barkan  <ibarkan@redhat.com>

	adapt host outbound qos link share values so they would be always divisible by 8
	This was needed due the fact that tc reports those parameters back after
	rounding them down to multiples of 8, causing vdsm to report rounded
	numbers back to users. Since link share parameters has no absolute meaning,
	only relative one, using multiples of 8 should work around this.

	Bug-Url: http://bugzilla.redhat.com/1174829

2015-01-20  Piotr Kliczewski  <piotr.kliczewski@gmail.com>

	Revert "supervdsm: Add zombiereaper to supervdsm"
	Introduction of zombiereaper is causing communication failures between
	vdsm and supervdsm. The change register signal handler which causes
	multiprocessing to fail.

	There was python bug opened to fix multiprocessing issue but it was not
	backported to 2.6.

	It is also not included on el7's python-2.7.5 so we are reverting on master as well.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1168217
	Related-To: https://bugzilla.redhat.com/1181624

2015-01-20  Yeela Kaplan  <ykaplan@redhat.com>

	multipath configurator: raise only if service is active
	If multipathd is active, configuration must be reloaded
	actively by vdsm, otherwise it will be reloaded once
	multipathd starts.

	Configuration will fail only in case multipathd is active
	and cannot be reloaded.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1173487

2015-01-20  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Fix race in protocoldetector tests
	To test removal of stale connections, we were waiting 2 cleanup
	intervals on the client side, to make sure that the server would wake up
	and remove the our stale connection.

	However, since the server runs in a separate thread, and the cleanup
	timeout was initialized when the server was started, it was possible
	that the server did not wake up yet when the client woke up and try to
	send a message. This caused test_reject_very_slow_client_concurrency()
	to fail from time to time.

	Now we initialize _next_cleanup when the object is created, so we know
	exactly when the server should wake up, eliminiating this race.

2015-01-20  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt test: check the full range of replaceable chars in filtering
	The string filtering now checks the full range of characters
	which have to be replaced

	Bug-Url: https://bugzilla.redhat.com/1179696

2015-01-20  Yeela Kaplan  <ykaplan@redhat.com>

	service: make service compatible with systemctl reload rc
	When reloading service with systemctl and the service is inactive
	rc is 1.
	Same scenario on service return rc 0.

	We want service reload rc to be consistent on vdsm
	and reload is failing when service is down
	so we will adapt sysV to systemd.

2015-01-20  Francesco Romani  <fromani@redhat.com>

	tests: deduplicate clientIF fakes
	both clientIFTests and vmfakelib modules
	had an implementation of clientIF fake.

	Some tests could have specific needs for Fakes,
	and it may have sense to have specific Fakes
	tied to specific tests, when one size does not
	fits all (fake.VM is rapidly going this route).

	However, duplication of code is always lurking,
	so there is should be a clean and not debatable
	case to have specific (= duplicate) Fakes.

	It doesn't seem the case for faking ClientIF yet,
	so this patch reunite the two implementations
	into one, to be placed into vmfakelib.

2015-01-20  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Optimize guest agent string filtering
	The filtering gains a bit of speed by:
	- NO more calling 'ord'
	- Moving all possible restricted chars to the set
	- Mapped the chars to unichr and put then into a frozenset
	- Having only one if
	- Using an array to iterate over the unicode string
	- And remove the function call for each element

	This brought up a performance gain of ~43%

	Bug-Url: https://bugzilla.redhat.com/1179696

2015-01-19  Dan Kenigsberg  <danken@redhat.com>

	tests: mark test_reject_very_slow_client_concurrency as broken
	Too often does this test fail with

	FAIL: test_reject_very_slow_client_concurrency(use_ssl=False) (protocoldetectorTests.AcceptorTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/home/jenkins/workspace/vdsm_master_unit-tests_merged/tests/testlib.py", line 65, in wrapper
	    return f(self, *args)
	  File "/home/jenkins/workspace/vdsm_master_unit-tests_merged/tests/protocoldetectorTests.py", line 157, in test_reject_very_slow_client_concurrency
	    self.check_concurrently(self.check_very_slow_client, use_ssl)
	  File "/home/jenkins/workspace/vdsm_master_unit-tests_merged/tests/protocoldetectorTests.py", line 236, in check_concurrently
	    self.assertTrue(all(done))
	AssertionError: False is not true

2015-01-19  Timothy Asir  <tjeyasin@redhat.com>

	Add remoteServer parameter into gluster volumes list
	Currently glusterVolumesList does not accept remoteServer parameter.
	This adds remoteServer parameter to get the list volumes from
	a remote host.

2015-01-19  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix SR-IOV VF test
	VF incorrectly used PF definition for testing and verification
	(copy-paste mistake). This patch changes the test to use correct
	definitions.

2015-01-19  Ondřej Svoboda  <osvoboda@redhat.com>

	testSetupNetworksAddDelDhcp: Extend to also consider DHCPv6
	Test that DHCPv4, DHCPv6 and dual-stack configurations work.

2015-01-18  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: Make sure the \0 is read before slicing the buffer
	In python if you try and slice past the end of the list\string you get
	an empty string and not an IndexError

	The original code check that we got all the data and sliced past the
	ending \0. But on rare cases where the message ended exactly with all
	the content but the \0 was not received.

	The slicing code would silently ignore the fact that the index doesn't
	exist and would return an empty string and switch the parser state
	making all future data have the wrong offset.

	This in turn made the command '\0SEND' instead of 'SEND' which has no
	handler and where silently ignored. The only way to solve this was to
	reconnect.

	Bug-Url: http://bugzilla.redhat.com/1181233

2015-01-18  Dan Kenigsberg  <danken@redhat.com>

	spec: only gluster requires blivet
	commit 7e49db74d introduced a gluster-only dependecy on python-blivet.

	The dependency should have been localized to vdsm-gluster, and only on
	platforms that have the package. When it is not available, its relevant
	test shouldbe skipped.

	net config: make sure ifcfg files are not persisted on node
	When setting up networking, a multitude of ifcfg files may be modified.
	If we are using the (default) 'unified' persistence mode, we expect that
	none of these modification is to be persisted for the next boot.

	However already-persisted ifcfg files would; unpersisted files won't,
	which lead to the inconsistent state reported in the bug.

	In this patch we make sure that none of our changes to ifcfg files is to
	be persisted.

	Bug-Url: https://bugzilla.redhat.com/1165203

2015-01-17  Dima Kuznetsov  <dkuznets@redhat.com>

	spec: Unlist remove file from spec file
	Patch http://gerrit.ovirt.org/#/c/36711/ removed
	tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out but it was still
	listed in the spec, breaking 'make rpm' target.

2015-01-17  Nir Soffer  <nsoffer@redhat.com>

	tests: Move assertXMLEqual to testlib [4/4]
	This patch introduces testlib.XMLTestCase and move assertXMLEqual up to
	the new class.

	tests: Move assertXMLEqual to testlib [3/4]
	This patch separates extracting xml fragments from asserting. The path
	argument to assertXMLEqual was removed, and tests that used it are using
	now the new find(xml, match) helper for extracting the needed fragment.

2015-01-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Move assertXMLEqual to testlib [2/4]
	This patch changes the the element argument to xml string, so the
	funcion is not tied to xml.dom.minidom.

	tests: Make it easy to debug assertXMLEqual failures
	The previous code was normalizing xmls by replacing indentation with
	single space, and compared normalized xml using assertEqual. This made
	it very hard to debug failures:

	    AssertionError: '<disk device="lun" sgio="unfiltered" snapshot="no"
	    type="block"> <source dev="/dev/mapper/lun1-xxx"/> <target
	    bus="scsi" dev="sda"/> <serial>54-a672-23e5b495a9ea</serial> <driver
	    cache="none" error_policy="stop" io="native" name="qemu"
	    type="raw"/> </disk>' != '<disk device="lun" sgio="unfiltered"
	    snapshot="no" type="block"> <source dev="/dev/mapper/lun1"/> <target
	    bus="scsi" dev="sda"/> <serial>54-a672-23e5b495a9ea</serial> <driver
	    cache="none" error_policy="stop" io="native" name="qemu"
	    type="raw"/> </disk>'

	Now we normalize xmls by reindenting them, and when xmls do not match,
	we display the indented xmls to make it easy to find the differences:

	    AssertionError: XMLs are different:
	    Actual:
	    <disk device="lun" sgio="unfiltered" snapshot="no" type="block">
	        <source dev="/dev/mapper/lun1-xxx" />
	        <target bus="scsi" dev="sda" />
	        <serial>54-a672-23e5b495a9ea</serial>
	        <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw" />
	    </disk>

	    Expected:
	    <disk device="lun" sgio="unfiltered" snapshot="no" type="block">
	        <source dev="/dev/mapper/lun1" />
	        <target bus="scsi" dev="sda" />
	        <serial>54-a672-23e5b495a9ea</serial>
	        <driver cache="none" error_policy="stop" io="native" name="qemu" type="raw" />
	    </disk>

	tests: Cleanup getAllVolumes tests for block storage
	The old tests had few issues:

	- Careless monkey-patching leaving lvm module patched with fake getLV
	  function, possibly breaking the next tests.
	- Not closing open files when they are not needed any more. This is not
	  critical in testing context, but we don't like to see this bad style
	  anyway, when it can be done correctly in more clear code.
	- Readability could be better

	Also add TODO for future improvements in this code.

	tests: Remove getAllVolumesTests
	Remove the minimal FileStorageDomain.getAllVolumes tests, replaced
	by fileSDTests module, and move the BlockStorageDomain.getAllVolumes
	tests to blockSDTests module.

	The block storage getAllVolumes tests were moved without any change
	(except simplified imports) to make the patch easier to reivew. The old
	tests have various issues that we will fix in the next patch.

	Add tests for getAllVolumes
	Profiling show that FileStorageDomain.getAllVolumes is too slow, taking
	more than 30% of cpu time when starting or recoverting 20 vms with 3000
	disks on NFS storage domain. Each call in this setup took 44 seconds of
	cpu time.

	This patch adds tests documenting the somewhat surprizing behavior of
	getAllVolumes to make sure we do not break it in the next patch.

	Relates-To: https://bugzilla.redhat.com/1177634

	test: Move assertXMLEqual to testlib [1/4]
	assertXMLEqual should be part of testlib, so we can use it in other
	tests easily. To do that, we need to:

	1. Remove unused assertXMLNone
	2. Remove the dependency on xml.dom.minidom
	3. Separate finding xml fragment from asserting
	4. Move assertXMLEqual up to testlib.VdsmTestcase

	This pach removes the unused assertXMLNone method.

2015-01-16  Francesco Romani  <fromani@redhat.com>

	virt: move GraphicsDevice into devices subpackage
	Move the Graphics class and its related utilities
	into the devices subpackage.

	Also, rearrange code -without changes besides scatthering
	it around to make it less awkward to use for clients
	outside the package.

	Example: staticmethod -> module function.

2015-01-16  Ondřej Svoboda  <osvoboda@redhat.com>

	testSetupNetworksAddDelDhcp: Delete a lease file left over by dhclient
	The non-obvious reason we must not leave lease files laying around
	is that the extended version of the test would, in bridged cases, detect
	DHCPv4 or DHCPv6 even in permutations in which either was not requested,
	because we reuse a bridge name.

2015-01-16  Timothy Asir  <tjeyasin@redhat.com>

	gluster: add glusterStorageDevicesList verb
	This patch adds new verb glusterStorageDevicesList
	which provides list of storage devices detail in the node.

	Output format is
	{'deviceInfo': [{ 'name': DEVICE_NAME,
	                  'devPath': DEVICE_PATH,
	                  'devUuid': DEVICE_UUID,
	                  'bus': BUS,
	                  'model': DEVICE_TYPE,
	                  'fsType': FILE_SYSTEM_TYPE,
	                  'mountPoint': MOUNT_POINT,
	                  'size': DEVICE_SIZE,
	                  'uuid': DEVICE_FILE_SYSTEM_UUID,
	                  'createBrick': ALLOWED_OR_NOT }, ...]}

2015-01-16  Martin Polednik  <mpolednik@redhat.com>

	hostdev: fix el6 'format' issue
	Since we're using python 2.6 in RHEL6 deployments, the formatting
	string in python is expecting numbered placeholders in the string.
	This patch adds in order to pass el6 unit tests.

2015-01-15  Francesco Romani  <fromani@redhat.com>

	virt: cleaner getVMList implementation
	Avoid wasteful work and make
	the verb implementation cleaner with no
	changes in behaviour.
	Performance gains are unfortunately negligible.

	vm: cleaner retrieval of graphics stats
	Device object and device configuration
	data are kept in sync, so there is no need to scan all the
	device configuration data to report it to Engine.

	Instead, just iterate on the Graphics Device classes.
	This new code is also a bit faster in the microbenchmarks, but
	since this method is already very low on profile, total
	performance gain is negligible.

	Related-To: https://bugzilla.redhat.com/1177634

2015-01-15  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: report 'dhcpv6' based on dhclient-6 leases

	netinfo: Split a DHCPv4-specific portion from a branch in _parse_lease_file
	The lines starting with "  expire" are only in v4 leases, not in v6.

	netinfo: Do not require the callers of _get_dhclient_ifaces to know the paths
	Make _DHCLIENT_LEASES_GLOBS a default value of _get_dhclient_ifaces, so as to
	localize the lease files code and data in one place.

	And remove a redundant comment in _DHCLIENT_LEASES_GLOBS (the owner of the
	directory is implied).

	netinfo._parse_lease_file: change order of branches, to aid reading
	We first encounter the line "lease {", so let us handle it first, too.
	The original order was a premature speed optimization.

2015-01-15  Dan Kenigsberg  <danken@redhat.com>

	net test: unbreak qosTests
	commit a42f9854 moved a function without touching its test.

2015-01-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Rename assertXML to assertXMLEqual
	New name is more clear and fit nicely with other asserts such as
	assertXMLNone.

2015-01-14  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using --enable-koji to configure spec for koji build
	In vdsm.spec we use fedora_koji_build variable to determine few changes
	between other builds to koji specific. Having --enable-koji flag to
	configure.ac allows to generate the spec easily only by running
	configure with --enable-koji.

2015-01-14  Francesco Romani  <fromani@redhat.com>

	tests: fix pyflakes glitch
	Fixes:
	./tests/toolTests.py:253: local variable 'args' is assigned to but never
	used

2015-01-14  Ido Barkan  <ibarkan@redhat.com>

	push _qos_to_str_dict down to tc.cls right before it is really needed
	This method handles the command line parameters hence it belongs to the
	layer that calls the command line. Also, using it only at the last
	moment keeps qos options machine readable so it is easier to modify
	them if it is needed.

2015-01-14  Yeela Kaplan  <ykaplan@redhat.com>

	spec: Require curl
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1139554

2015-01-13  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Remove unneeded else block
	The code is about handling existing directories, not about taking one of
	two choices. Using early return on errors and keeping the normal code
	path is more clear.

2015-01-13  Ondřej Svoboda  <osvoboda@redhat.com>

	tests: Support DHCPv6 in dnsmasq and dhclient wrappers
	Also account for EL6's dnsmasq not supporting DHCPv6.

2015-01-13  Antoni Segura Puimedon  <toni@midokura.com>

	contrib: add useful shell functions to assist in vdsm development
	With this file, that you can just source from your ~/.zshrc, or ~.bashrc
	it is much more convenient to do common tasks such as install the packages
	you just build, uninstall vdsm, etc.

2015-01-13  Mooli Tayer  <mtayer@redhat.com>

	tool: change configure verb logic.
	If configurator.configure() is called when configure(isconfigured()=NO,
	validate()=False and force()=False), and InvalidConfig is raise.

	In fact, configuration should be performed.

	A new test covers all of this method's
	truth table, so that all edge cases are tested..

	tool: change in configurators import.

2015-01-13  Petr Horáček  <phoracek@redhat.com>

	ipwrapperTests: prevent infinite stuck
	In case when iterator.next() has nothing to return, thread stuck.
	To prevent this case, we added timeout to testMonitorInteration test.

2015-01-13  Ondřej Svoboda  <osvoboda@redhat.com>

	testSetupNetworksAddDelDhcp: Assert for source routing only in DHCPv4 cases
	The test will be parametrized for checking the combinations of DHCPv4
	and DHCPv6.

2015-01-12  Mooli Tayer  <mtayer@redhat.com>

	tool: configurator module names optional, defaults to file name.

	tool: small doc format change.

	tool: autoload modules.
	Configurator modules are loaded once in the beginning
	of vdsm-tool's operation.

	Once vdsm-tool uses autoloading adding new
	configurators does not requires changing
	configurators.py but only module logic and packaging.

	This also enables Manual installation of modules.
	If desired, we could have a /etc/vdsm/configurators.d
	in the future.

	The import of validate_ovirt_certs needed a change due
	to autoload.

2015-01-12  Amador Pahim  <apahim@redhat.com>

	Set sysctl to allow iSCSI multipath with multiple NICs in the same subnet
	When two or more interfaces are in the same subnet, the default OS
	behaviour won't allow the independent traffic between local NICs and
	iSCSI targets.

	These sysctl tweaks are needed to have iSCSI multipath working in
	such topology:

	  eth1 (192.168.25.200) --|
	                          |-- iSCSI Target (192.168.25.10)
	  eth2 (192.168.25.201) --|

	For the ARP flux problem, where the machine may respond to ARP requests
	from both Ethernet interfaces, we are setting "arp_ignore=1" and
	"arp_announce=2"

	To allow multiple iSCSI connections in a multiple NIC per subnet
	configuration, reverse path filtering must be loosened with
	"rp_filter=2" for the interfaces.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112861

2015-01-12  Petr Horáček  <phoracek@redhat.com>

	utils: move NoIntrCall from storage/misc.py to utils.py
	NoIntrCall and NoIntrPoll functions are defined on two different places.

	We would like to use NoIntrCall in networking too, so i moved it from
	storage/misc.py to utils.py.

2015-01-12  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Modernize functions that recognize the usage of DHCP from lease files

	IpConfig: Rename inet4 and inet6 parameters

2015-01-11  Nir Soffer  <nsoffer@redhat.com>

	virt: Silense pyflakes about unused imports
	Recent virt merge left apparantly unused imports, breaking the build.
	Add reference to these names to make pyflakes happy again.

	virt: Add missing import
	Recent virt merge migrated a constant to another module, leaving the
	required import behind, breaking the application.

	tests: Remove unused imports
	Recent virt merge left behind some unused imports, breaking the build.

2015-01-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	For rhel<=6 build only for x86 platforms
	qemu-img package does not exist for other archs

2015-01-10  Dan Kenigsberg  <danken@redhat.com>

	make check: fix pyflakes test
	Commit 321eabf5 broke pyflakes test by overriding the output of "find"
	with a limitted WHITELIST. This patch appends the WHITELIST to all found
	*.py files.

2015-01-10  Ido Barkan  <ibarkan@redhat.com>

	rename tc._classes as it is used publically

2015-01-10  Nir Soffer  <nsoffer@redhat.com>

	lvm: Handle special "unknown device" pv_name
	When a pv is missing (e.g. device was lost or target is disconnected),
	lvm return the special value "unknown device". Keeping this value cause
	vdsm to fail in an unhelpful way when checking device properties when
	trying to access "unknown device":

	    OSError: [Errno 19] Could not find dm device named `unknown device`

	Now we check lvm output and filter out pvs named "unknown device". If a
	pv is missing, it will not be listed in the vg pv_name list, and in the
	pvs cache.

	When reloading vgs, we will see now this error:

	    vg 04598ee3-46ff-4bb3-b8b2-4434f375302e has pv_count 2 but pv_names
	    ('/dev/mapper/1IET_00070003',)

	Previously this error was not logged since vg.pv_name included also
	"unknown device".

	When reloading pvs, we will see a new error:

	    Missing pv: wPIujw-Wmcj-V2O6-r8Fl-X485-mXm7-UxCO3Q in vg:
	    04598ee3-46ff-4bb3-b8b2-4434f375302e

	Finally, a missing pv will show this error during domain selftest:

	    StorageDomainAccessError: Domain is either partially accessible or
	    entirely inaccessible: ('04598ee3-46ff-4bb3-b8b2-4434f375302e',)

	This error was masked before by the OSError above.

	Bug-Url: https://bugzilla.redhat.com/1176517

2015-01-10  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Remove 'ipv6' parameter we won't use, and an outdated, invalid TODO
	_parseLeaseFile is going to support parsing of both dhclient -4 and -6
	lease files and it will need no extra parameter/switch.

	netinfo: Rename and export only one bondOpts() function
	_bondOpts(), originally without _, now serves as a low-level reader of all
	bonding properties. The public bondOpts() never returns read-only values
	and special options such as 'slaves'.

2015-01-09  Francesco Romani  <fromani@redhat.com>

	virt: move NetworkInterfaceDevice into vmdevices
	No code changes besides import fixes and the renaming:
	vm.NetworkInterfaceDevice -> vmdevices.network.Interface

	virt: move Drive class into vmdevices subpackage
	No code changes besides import fixes.

	virt: make vmdevices a subpackage
	This patch transforms the vmdevices module into a subpackage,
	to make it suitable to host the remaining, big devices
	in nicely separate modules.

	A few decisions where made for the sake of practicality
	and to make this patch minimal, although meaningful:

	- the subpackage retains the 'vm' prefix instead the simpler
	  'devices', to reduce name clashes.
	- not-empty __init__, hosting subpackage imports and constants.
	  Nothing else will go there.
	- 'small' devices moved into a generic module named 'core',
	  which is the shortest yet meaningful name I could find.

	No changes besides import fixes and code being scatthered around.

	virt: sampling: fix order of imports

	numa: fix schema omission
	document the missing 'nodeIndex' field
	which is actually sent from Engine.

2015-01-08  Dan Kenigsberg  <danken@redhat.com>

	init: wait for network service
	The network service is not synchronous. It returns before all of the
	interfaces that it started are actually up.

	This is particularly problematic when upgrading from ovirt-3.4 to
	ovirt-3.5, as one of the first pre-run tasks is to upgrade network
	configuration to the "unified persistence" model.

	This patch waits up to 10 seconds for vdsm-controlled interfaces to
	obtain their IPv4 address. It's a hack, an ugly hack, that does not solve
	the inherent race. The race would be solved only when we tap into
	netlink's event monitor and stall ifup until the interface is actually
	up.

	Bug-Url: https://bugzilla.redhat.com/1174611

2015-01-08  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Make bootproto4 a boolean and rename it while it is still unused
	No other protocol (BOOTP) is supported and the future 'dhcpv6' flag will
	be a boolean as well (related to the already existing 'dhcpv6' flag
	in setupNetworks).

2015-01-08  Dan Kenigsberg  <danken@redhat.com>

	vmTests: clean after assertBuildCmdLine
	Before this patch, assertBuildCmdLine left a temporary
	    /tmp/tmp_Pj21g9ffe28b6-6134-4b1e-8804-1185f49c436f.recovery
	file behind, since it monkey-patched P_VDSM_RUN with no trailing slash.

	This patch fixes this mistake, but it also makes assertBuildCmdLine use
	more modern testlib functions for mokey-patching and tempdir.

2015-01-07  Dan Kenigsberg  <danken@redhat.com>

	ip route: parse only first part of each route
	This patch makes sure that the output of `ip route show table all` has
	one line corresponding to exactly one route. It then ignores whatever
	follows the first backslash of a route text. The motivation is to ignore
	'cache' lines, which are of no interest to Vdsm at the moment.

	ip route: parse route flags
	Previously, routes like

	    unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101
	    broadcast 240.0.0.255 dev veth_23  table local  proto kernel  scope link  src 240.0.0.1

	(the latter occuring natually in kernel's "local" routing table)
	would just spew warnings in source routing tests. This is because we
	parse routes from all routing tables, not just for interfaces we manage,
	to avoid calling iproute2 multiple times.

2015-01-07  Ido Barkan  <ibarkan@redhat.com>

	fix unsupported errno system symbol on RHEL6
	Replace ENOTSUP with EOPNOTSUPP that is supported on older distributions.
	This bug was introduced on 4cf9ba7fb4df09c75fc1bce000225334e8ed5b8c
	and shouldn't be backported.

	fixed a key error in _delNetwork
	When _delNetwork was called from _delBrokenNetwork its netinfo
	is adapted so it would be able to remove the broken netwrok.
	Without this patch, trying to remove a broken bridgeless network fails
	With a KeyError due to a missing bootproto element.

	Traceback (most recent call last):
	  File "/usr/share/vdsm/supervdsmServer", line 100, in wrapper
	    res = func(*args, **kwargs)
	  File "/usr/share/vdsm/supervdsmServer", line 200, in setupNetworks
	    return setupNetworks(networks, bondings, **options)
	  File "/usr/share/vdsm/network/api.py", line 798, in setupNetworks
	    configurator=configurator)
	  File "/usr/share/vdsm/network/api.py", line 404, in _delBrokenNetwork
	    implicitBonding=False, _netinfo=_netinfo)
	  File "/usr/share/vdsm/network/api.py", line 223, in wrapped
	    ret = func(**attrs)
	  File "/usr/share/vdsm/network/api.py", line 462, in _delNetwork
	    net_ent.ip.bootproto = _netinfo.networks[network]['bootproto4']
	KeyError: 'bootproto4

	This was introduced by commit 1886113ee096f2d414738be0c5b11ca5079a5a3c
	and should/shouldnot be backported to the stable branch.

2015-01-06  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Format mismatches only when needed
	For formating list of mismatches, we can implement __repr__ on the
	Mismatch class instead of explicit formating. This is generaly better
	since we pay for formatting only when logging level requires formatting.

	This also eliminate, pyflakes-0.8.1-3.el6 warning:

	    vdsm/storage/storageServer.py:427: list comprehension redefines 'e' from line 421

	storageServer: Fix Mismatch initialization
	Commit e57e0bdb3e was verified only with the positive flows, since it is
	hard to simulate connection mismatch. In case of a real mismatch,
	attmpting to log the mismatches would raise "TypeError: not enough
	arguments for format string" hiding the real error.

	This patch adds some trivial tests and initialize the "args" instance
	variable.

2015-01-06  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: regression on setupNetworks
	During schema and code alignemnt Host_setupNetowrks entry was removed
	from command_info. Adding back the entry and fixing schema verification
	test.


	Bug-Url: https://bugzilla.redhat.com/1178536

2015-01-06  Ido Barkan  <ibarkan@redhat.com>

	Added errno.ENOTSUP to excepted tc error codes
	As reported in https://bugzilla.redhat.com/show_bug.cgi?id=1165257#c9
	on RHEL 7, when removing a non existent tc object an ENOTSUP
	is returned instead of ENOENT or EINVAL.

2015-01-06  Amador Pahim  <apahim@redhat.com>

	New sysctl module for run-time changes.
	Some sysctl tunables must be dynamically set to configure system in given
	situations. Those sets won't persist after boot.

	This patch is creating the sysctl module to allow such configuration and preparing
	this module with the functions needed to handle rp_filter configuration. Since sysctl
	tunables can only be set by root user, supervdsmServer is used as proxy. Further
	use of this module can be based in rp_filter configuration.

	Notice that to have mandatory changes sysctl.d/vdsm.conf still should be used.

2015-01-06  Daniel Erez  <derez@redhat.com>

	API: move diskSizeExtend logic from BindingXMLRPC
	In order to make cold extend disk usable
	with JSON-RPC, move logic verifying specified
	VM id from 'BindingXMLRPC -> diskSizeExtend' into
	'API (VM class) -> diskSizeExtend'
	[since there's no other mediator for this logic
	to both xml/json rpc protocols].

	Bug-Url: https://bugzilla.redhat.com/1178499

2015-01-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	For koji build enable hooks rpms
	Build for fedora require rpms build for all vdsm hooks.

2015-01-02  Francesco Romani  <fromani@redhat.com>

	vm: log xml from/to libvirt at 'info' level
	The XML which VDSM sends or receive to libvirt
	is a critical piece of information for troubleshooting
	issues, and we must make sure to log it unless the user
	really want VDSM to be really silent.

	So, bump the relevant logs from 'debug' to 'info',
	even if we know the xml dump is actually debug
	information.

2015-01-02  Oved Ourfali  <oourfali@redhat.com>

	Revert "jsonrpc: Image_upload missing in command_info"
	This reverts commit 691a6f49b785b725439230a3f0bf55a9e71f539b, as it
	was not needed on the master branch. We should have backported
	http://gerrit.ovirt.org/35533 instead.

2015-01-01  Oved Ourfali  <oourfali@redhat.com>

	jsonrpc: Image_upload missing in command_info
	Bug-Url: https://bugzilla.redhat.com/1177952

2014-12-31  ibarkan  <ibarkan@redhat.com>

	improve testSetupNetworksNiclessBridgeless readability

2014-12-31  Yeela Kaplan  <ykaplan@redhat.com>

	Revert 'Create default multipath.conf during install'
	Revert http://gerrit.ovirt.org/#/c/30704
	as the original problem of nonexistent multipath
	configuration on vdsm start is resolved by:
	http://gerrit.ovirt.org/#/c/30909
	which configurates multipath before vdsm starts
	using the vdsm configuration tool.

2014-12-30  Nir Soffer  <nsoffer@redhat.com>

	tests: Make pyflakes happy with apparently unused variable
	Pyflakes was upset by what looks like an unused local variable.  The
	local variable was used to keep a reference to a Receiver instance that
	must be live during this test.

2014-12-30  Shahar Havivi  <shaharh@redhat.com>

	adding missing import for errCode

2014-12-30  Amador Pahim  <apahim@redhat.com>

	Fix schema
	Current schema is presenting the build error:

	 ValueError: 'HostDeviceParams' comment mentions 'physfn' which is not defined

	This patch is adding the missing 'physfn'.

2014-12-30  Mooli Tayer  <mtayer@redhat.com>

	tool: configurators package should only contain configurators.
	in preperation for autoloading modules. Moving configfile.py out.

	tool: change configurators from classes to modules.
	Currently we have:
	|-- configurators                    package
	|   |-- certificates.py              module
	|   |   |-- ModuleConfigure          class
	|   |-- libvirt.py                   module
	|   |   |-- ModuleConfigure          class
	|   |-- sanlock.py                   module
	|   |   |-- ModuleConfigure          class

	I am suggesting to make this flatter:
	|-- configurators                    package
	|   |-- certificates.py              module
	|   |-- libvirt.py                   module
	|   |-- sanlock.py                   module

	Defaults moved from the less visible __init__.py to
	the configurators consumer. What was once named a ModuleConfigurer is now called
	a configurator module.

2014-12-29  Martin Polednik  <mpolednik@redhat.com>

	hostdev: report physfn
	Each sr-iov virtual function is actually a separate function on a pci
	bus. Libvirt reports these functions on the same level as physical
	functions, but sysfs provides us means of determining which pf does
	given vf belong to. This is useful in order to correctly construct the
	tree.

2014-12-29  Dima Kuznetsov  <dkuznets@redhat.com>

	infra: Switch utils calls to filecontrol
	Change all call to functions moved to filecontrol to appropriate module
	and remove old calls from utils

	spec: Enable vhostmd on non-koji Fedora builds
	with_vhostmd is configurable since vhostmd is missing from Centos 6/7 +
	EPEL. For everywhere else, we want to set with_vhostmd=1

	Recently, we've added

	 http://jenkins.ovirt.org/job/vhostmd_create-rpms_el6/
	 http://jenkins.ovirt.org/job/vhostmd_create-rpms_el7/

	which let us ship vhostmd within oVirt repos.

	So basically, we can take vhostmd if it's not el, or if it's built out of koji.

	qemu-img: Allow creation of zero-sized volumes
	In previous version if size is zero it was omitted from the command

2014-12-28  Shahar Havivi  <shaharh@redhat.com>

	v2v: adding os support version for v2v
	as well as fixing for broken test in el6.
	el6 does not support etree syntax that is use to parse xml in v2v as
	well as virt-v2v import from vmdk (libvirt image) is not supported in
	el6.

2014-12-25  ibarkan  <ibarkan@redhat.com>

	be smarter about forcing bridge removal

2014-12-24  ibarkan  <ibarkan@redhat.com>

	tests: Improve assertNetworkExists and assertNetworkDoesntExist
	Both should also verify that bridges actually exist or absent.
	Currently we only assert that bridged networks are stored in libvirt.

	fixing race while sampling interfaces
	The race condition is that a vlan device is reported by getLinks and then
	it is no longer there by the time InterfaceSample is called

	Bug-Url: https://bugzilla.redhat.com/1173929

2014-12-23  Yeela Kaplan  <ykaplan@redhat.com>

	oopTests: Use monkeypatch for changing idle time

	sd: remove unused volumeExists method
	Last used by: http://gerrit.ovirt.org/18274

2014-12-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding %configure flags for rhev_build

2014-12-23  Ido Barkan  <ibarkan@redhat.com>

	tests, tool: Suffix veth and dummy names with random strings
	With much lower chance to collide we can simplify the process of creating
	the virtual network devices.

2014-12-23  pkliczewski  <piotr.kliczewski@gmail.com>

	schema: verify line length to be shorter than 80

	schema: verification of API.py and schema during UT
	In order to automate verification of API changes with schema we added
	a unit test which breaks build if there is any discrapency.

	The verification covers most of issues found:
	- number of args in verb and schema
	- optional args in schema vs default args in api
	- return value in command_info and schema

	Due to API module being loaded for schema verification we needed to
	fix bridgeTests.py

2014-12-23  Dima Kuznetsov  <dkuznets@redhat.com>

	infra: Add filecontrol module
	Added module with fcntl convenience functions

2014-12-23  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Infer 'bootproto4' just from the existence of a DHCP lease
	If we found an active (not outdated) DHCPv4 lease for an interface we don't
	have to check if we have an address. Most probably it will be there.
	If it weren't we would not be concerned about 'bootproto4' attribute anyway.

	netinfo, tests: Rename internal 'dhcp4' variables to get in line with 'dhcpv6'

2014-12-23  Federico Simoncelli  <fsimonce@redhat.com>

	Using with_rhev flag in spec to configure rhev changes if required
	This flag will allow to set specific restrictions when building vdsm
	as part of rhev.

	* dumpStorageTable.py was moved[1][2] from vdsm-cli to vdsm package.

	  As result when updating vdsm without vdsm-cli there is a conflict
	  between the old vdsm-cli and the new vdsm packages.

	  Our old bootstrap code which is shipped with rhevm-3.0 installs
	  packages one by one, failing any bootstrap if such conflict exists.

	  The temporary simplest solution is to pull vdsm-cli into dependency try
	  of vdsm package, this dependency will be removed in future when
	  newer vdsm-bootstrap be distributed to all rhevm machines.

	[1] Ic9dfdc2
	[2] http://gerrit.ovirt.org/1889

	* Disabling creation of gluster packages during vdsm make process
	  As described in bz1031707, vdsm 3.3.0 should not provide vdsm-gluster
	  rpm

2014-12-23  Alon Bar-Lev  <alonbl@redhat.com>

	api: compat: fix api breakage of 'config' and 'netinfo' used by bootstrap
	rhevm-3.0 depends on previous vdsm-bootstrap which uses config and
	netinfo packages.

	config and netinfo packages are now moved to the 'formal' vdsm api located
	at vdsm namespace.

	In order to allow rhevm-3.0 install vdsm-4.9.6 the legacy config and
	netinfo should be available.

	The old bootstrap code does not start the libvirtd service before
	using the netinfo module.

	The current vdsm.netinfo needs running libvirtd or it fails.

	This patch starts the libvirtd service during the import of the
	compatibility module.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=867922
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=870734

2014-12-22  ibarkan  <ibarkan@redhat.com>

	There is no need to decorate all tests with RequireDummyMod
	This is since setupModule already needs the dummy module to be loaded in order
	to add dummy links. So even tests that are not decorated with RequireDummyMod
	actually require it.

	teach addNetwork to add a netwrok to an existing bridge
	Although this adds an additional ossible flow for addNetwork,
	this commit does not yet change VDSM's behavior as the situation
	where a bridge should already exist should still not yet happen.

2014-12-22  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Minor cleanup
	Various cleanups, addressing Federico and Dan comments from the previous
	patch:

	- Make match() private
	- Replace str(e) with "%s" % e, to avoid (unlikely) unicode encoding
	  errors when converting to string.
	- Use "mismatches" instead of "mismatch"

2014-12-21  Mooli Tayer  <mtayer@redhat.com>

	tool: cleanup old enum names in comments left over from 34046.
	I forget about them in one of the rebases:
	http://gerrit.ovirt.org/#/c/34046/2..4/lib/vdsm/tool/configurators/__init__.py,cm
	(They where actually replaced in a later commit)

2014-12-21  ibarkan  <ibarkan@redhat.com>

	teach delNetworks to remove a network entity under a bridge
	By leaving the bridge intact, VDSM will be able to allow
	partial network editing while VMs are connected to it.
	Inter-VM networking on the bridge is also preserved during
	network editing.
	This commit does not yet change VDSM's behavior.

2014-12-18  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: update doctext to inclode json-rpc

2014-12-18  Mooli Tayer  <mtayer@redhat.com>

	spec: remove redundant 'Requires(X): policycoreutils-python'.
	Having an rpm as both 'Required' and 'Required(post/preun) is redundant';
	a 'Required' dependency is present for post/preun.

	There where two possible solutions here: remove the 'Required(X)'
	or remove the 'Required' lines. I choose the first since an rpm
	dependency for stage x, is a dependency for all stages before x.
	This is done so that rpm will never ask to install a package when
	trying to remove one[1]. This means that we practically need
	policycoreutils-python for all stages (except postun).

	See also:
	[1] Context Marked Dependencies:
	http://www.rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html

	[2] related vdsm patches:
	8409, 10000

2014-12-17  Allon Mureinik  <amureini@redhat.com>

	spec: kernel requirements on EL6
	kernel-2.6.32-465.el6 solves a few NFSv4 issues.
	Since VDSM supports NFSv4, it should require this kernel version to
	ensure it avoids those bugs.

	Note that this fix is not relevant for EL7 and modern Fedora builds,
	which use kernel versions from the 3.x generation.

	Bug-Url: https://bugzilla.redhat.com/1075123

2014-12-17  Francesco Romani  <fromani@redhat.com>

	vmdevices: move devices type into hwclass module
	This patch moves the device types in a new
	'hwclass' module, and renames the various vm.${NAME}_DEVICES
	into the corresponding hwclass.${NAME}
	with no changes in behaviour.

	This patch, has little value on its own, but is
	needed to move away more code from vm into vmdevices.

2014-12-17  Dima Kuznetsov  <dkuznets@redhat.com>

	doc: Add index for vdsm-infra package

2014-12-17  Shahar Havivi  <shaharh@redhat.com>

	External hypervisor VMs integration
	Added v2v module - added ability to list VMs from external source
	(non KVM) via libvirt.

	The v2v module aims to add the ability to vdsm to integrate with
	external hypervisors and import VMs directly to storage domain.
	It will have an API for listing VMs with basic properties (such as name,
	disks and network) as well as an API for importing an actual VM from
	external hypervisor.

	v2v module will use virt-v2v to convert the VM from other hypervisors as
	well as libvirt for listing existing VMs.

2014-12-17  Dima Kuznetsov  <dkuznets@redhat.com>

	doc: Remove create_sl.sh
	sphinx does not require this.

2014-12-17  ibarkan  <ibarkan@redhat.com>

	There is no need to decorate all tests with ValidateRunningAsRoot
	This is since setupModule already requires root previliges when
	Adding dummy links. So even tests that are not decorated with
	ValidateRunningAsRoot actually require root previliges.

2014-12-16  Nir Soffer  <nsoffer@redhat.com>

	storageServer: Improve iscsi connection logging
	We have several bugs where iscsi storage connection are not disconnected
	properly, but the logs contains no info that can help debugging such
	issue. Now it should be very clear why disconnect operation is skipped.

2014-12-16  Petr Horáček  <phoracek@redhat.com>

	netlink: return link/addr/route's name only when available
	When we try to get information about a removed device without a
	corresponding cache, _get_link() will end up with ENODEV exception.

	This case may happen, for example, when we catch DELLINK event-object
	(which includes related link's id) and then try to get info about a
	related link that has also been deleted.

	Now _link/route/addr_functions() always return indexes and if it is
	possible, label too. ENODEV error raised by _link_index_to_name
	(in case of not available device) is ignored.

	This patch is needed by following 'netlink: event monitor'[1] patch. In
	case, when we catch NEWLINK event, everything works great and we are
	able to return related device's name. However, when we catch DELLINK
	event, we are not able to get name of related link (which has been
	already deleted), so we at least return its ID from event object. (If we
	have old links stored somewhere, we could use ID to map them. It could
	be handy, when we use EventMonitor in interpreter for some debugging
	too.)

	[1] I23ea72986564c5a115e36be0e7cf679c28c8ea96

2014-12-16  Amador Pahim  <apahim@redhat.com>

	Fix pep8 compliance after 6b1b446

2014-12-16  Nir Soffer  <nsoffer@redhat.com>

	spec: Require newer selinux-policy-targeted on EL7
	In EL7 and fedora, selinux did not allow sanlock to send signals to
	vdsm. When the master domain is not accessible on the spm, sanlock was
	trying to terminate and kill vdsm, but since it is not allowed to send
	signals to vdsm, the attempt would fail and the watchdog would reboot
	the machine.

	The new policy fixes this issue, and now vdsm should terminate cleanly
	or will be killed without rebooting the machine.

	We need also a package for Fedora, but the package was not released yet.

	Bug-Url: https://bugzilla.redhat.com/1141658
	Relates-to: https://bugzilla.redhat.com/1172147
	Relates-to: https://bugzilla.redhat.com/1142454
	Relates-to: https://bugzilla.redhat.com/1152594

2014-12-16  Amador Pahim  <apahim@redhat.com>

	iscsiadm.iface_list() to return iface.net_ifacename
	Currently iface_list() only returns a list with iface names. In order to
	properly instantiate the corresponding iface class, this patch adds to
	iface_list() all parameters returned by the command 'iscsiadm -m iface' in
	a tuple of namedtuples, each one representing a distinct iface.

	The issue that pushed this code was iface class not being instantiated
	with proper iface.net_ifacename. This patch is using the new
	iface_list() format to catch iface.net_ifacename and pass it to iface
	class instatiation.

2014-12-16  ibarkan  <ibarkan@redhat.com>

	convert sampling classed to new style classes
	The use of old style classes is discourged in modern Python

2014-12-16  Antoni Segura Puimedon  <toni@midokura.com>

	utils: Make CommandPath try to find the executable
	Before this patch, if the executable was not one of the proposed
	paths in the parameters, it would raise straight an ENOENT OSError.
	With this patch, it will use distutils find_executable before
	bailing out.

2014-12-16  Martin Pavlasek  <mpavlase@redhat.com>

	vdsm: fix typo: vcpuLimit - 'limit' was in lower-case
	There are several occurences with 'Limit' so it seems that is just typo
	(only one occurence with lower case).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1143992

2014-12-16  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Move 'dhcp4' parameters to the end in helper functions

2014-12-16  ibarkan  <ibarkan@redhat.com>

	rename _libvirtNets2vdsm as it is used publicly

	fix docstring format

2014-12-16  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Retrieve a VLAN's NIC after its ID in getVlanBondingNic
	Obviously, we cannot supply a VLAN's underlying device (eth0) to getVlanID,
	it has to be the VLAN (eth0.100) itself.

	Fixes: http://gerrit.ovirt.org/18182

2014-12-16  ibarkan  <ibarkan@redhat.com>

	rename nets to libvirt_nets for readability

2014-12-16  Francesco Romani  <fromani@redhat.com>

	vm: promote some debug messages to warn
	Promote to 'warn' some logs which reveal
	behaviour that may surprise the user.

	This patch is part of the preparation for
	the switch to default log level to 'info'
	in VDSM.

2014-12-15  Francesco Romani  <fromani@redhat.com>

	vm: promote some debug messages to info
	Promote to 'info' some logs which
	are high level and important enough to deserve it.

	This patch is part of the preparation for
	the switch to default log level to 'info'
	in VDSM.

	migration: promote debug to info
	Some logs we emit in the migration flows
	are more suitable as info() than as debug().

	This patch is part of the preparation for
	the switch to default log level to 'info'
	in VDSM.

2014-12-15  Petr Horáček  <phoracek@redhat.com>

	tcTests: bridge deleted before downed

2014-12-15  ibarkan  <ibarkan@redhat.com>

	Simplify testAddVlanedBridgeless
	There is no need for the networks dictionary.

2014-12-15  Mooli Tayer  <mtayer@redhat.com>

	spec: bump policycoreutils-python >= 2.0.83-19.47.el6_6.1
	On el6.6 the version with the fix is:
	policycoreutils-2.0.83-19.47.el6_6.1 [1]
	On el6.7 it is
	policycoreutils-2.0.83-19.48.el6 [2]

	[1] https://bugzilla.redhat.com/show_bug.cgi?id=1148800
	[2] https://bugzilla.redhat.com/show_bug.cgi?id=1148062

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1139873

2014-12-13  David Caro  <dcaroest@redhat.com>

	Allowing to skip checks from command line
	We were forcing the value of with_checks in the spec, overriding any value
	passed from any external source (rpmmacros, command line, etc.)

2014-12-13  Martin Polednik  <mpolednik@redhat.com>

	hostdev: report totalvfs
	Totalvfs is a parameter defined by hardware that tells us how many
	virtual functions we can spawn (if bandwidth of the bus allows it).
	This patch adds totalvfs field to host device tree to device params.
	The value is read from /sys/bus/pci/devices/x/sriov_totalvfs where x
	is name of the device in the format of nnnn:nn:nn.n.

2014-12-13  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Image_upload
	Align naming between API.py and schema.

2014-12-12  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: VM_updateVmPolicy
	Align naming between API.py and schema.

	jsonrpc: LVMVolumeGroup_create
	Align naming between API.py and schema.

2014-12-12  Nir Soffer  <nsoffer@redhat.com>

	hba: Run fc-scan in supervdsm
	On master zombiereaper is available in supervdsm, so we can run fc-scan
	from suprevdsm instead of using sudo.

2014-12-12  Petr Horáček  <phoracek@redhat.com>

	ipwrapperTests: prevent infinite stuck of iterator
	Sometimes, ipwrapper monitor.start() is not fast enough and it's
	returned before it's proper started and listening. In this case, monitor
	doesn't catch the first created device and iterator.next() stuck
	forever.

	I included quick sleep() fix, to prevent this problem until we get new
	netlink-based event monitor.

2014-12-12  Dan Kenigsberg  <danken@redhat.com>

	net tests: fix api.addNetwork call
	commit 7b39590d4 forgot to rename the function in this test.

2014-12-11  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Host_delNetwork
	Newly modified API verb needs aligment with schema.

2014-12-11  Francesco Romani  <fromani@redhat.com>

	vm: sampling: docs: document expected data format
	Add docstrings to sample functions to document
	the expected output.

	It is hopefully more practical to keep this
	doc up to date instead of digging into the libvirt
	python bindings to rediscover the wheel each time.

2014-12-11  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Host_getVMList
	Align naming between API.py and schema.

2014-12-11  Martin Polednik  <mpolednik@redhat.com>

	hostdev: make caps in listByCaps truly optional
	In order to make the api cleaner, removes the need to specify the
	caps parameter (defaulting to None which means all devices)

2014-12-10  Ondřej Svoboda  <osvoboda@redhat.com>

	supervdsmServer: Remove needless parentheses
	Amends: http://gerrit.ovirt.org/35311

2014-12-10  ibarkan  <ibarkan@redhat.com>

	rename netEnt to net_ent

2014-12-10  Francesco Romani  <fromani@redhat.com>

	virt: make domain_descriptor.py API pep8-friendly
	Only changes in naming.

2014-12-10  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: VM_getStats
	Align naming between API.py and schema.

	jsonrpc: VM_snapshot
	Align naming between API.py and schema.

2014-12-10  Dan Kenigsberg  <danken@redhat.com>

	net tests: rename temporary variable
	vdsm_net is too confusing with self.vdsm_net.

2014-12-10  Ondřej Svoboda  <osvoboda@redhat.com>

	testSetupNetworksAddDelDhcp: Check for DHCPv4 also on the device (or bridge)

2014-12-10  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Make pep8/flake8 happy with the indentation

2014-12-10  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: StoragePool_updateVMs
	Align naming between API.py and schema.

	jsonrpc: StoragePool_removeVM
	Align naming between API.py and schema.

	jsonrpc: StoragePool_getDomainsContainingImage
	Align naming between API.py and schema.

	jsonrpc: StoragePool_getBackedUpVmsList
	Align naming between API.py and schema.

	jsonrpc: StoragePool_getBackedUpVmsInfo
	Align naming between API.py and schema.

	jsonrpc: StoragePool_disconnect
	Align naming between API.py and schema.

	jsonrpc: StoragePool_destroy
	Align naming between API.py and schema.

	jsonrpc: StoragePool_connect
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_getVolumes
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_extend
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_detach
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_deactivate
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_create
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_attach
	Align naming between API.py and schema.

	jsonrpc: StorageDomain_activate
	Align naming between API.py and schema.

	jsonrpc: Image_teardown
	Align naming between API.py and schema.

	jsonrpc: Image_sparsify
	Align naming between API.py and schema.

	jsonrpc: Image_reconcileVolumeChain
	Align naming between API.py and schema.

	jsonrpc: Image_prepare
	Align naming between API.py and schema.

	jsonrpc: Image_download
	Align naming between API.py and schema.

	jsonrpc: Host_stopMonitoringDomain
	Align naming between API.py and schema.

	jsonrpc: Host_startMonitoringDomain
	Align naming between API.py and schema.

	jsonrpc: Host_getStorageDomains
	Align naming between API.py and schema.

	jsonrpc: VM_getDiskAlignment
	Align naming between API.py and schema.

	jsonrpc: Host_addNetwork
	Newly modified API verb needs aligment with schema.

	jsonrpc: VM_setIoTune
	Align naming between API.py and schema.

2014-12-10  Antoni S. Puimedon  <asegurap@redhat.com>

	Make _addNetwork and _delNetwork private

	network: Make vdsmd delNetwork use supervdsmd setupNetworks
	delNetwork is part of a very old and deprecated API that we have to
	eventually shed off in the next major release. It makes sense to
	just make an adapter so that we can simplify network.api to keep
	a single entry point.

2014-12-10  Francesco Romani  <fromani@redhat.com>

	vm: ensure graphics configuration data in recovery
	Graphics Devices may be not sent by Engine. To cover that VDSM
	reconstructs them from other VM configuration data - which is safe to do
	since the information is there, just organized in a different way.

	The recovery path skips that step, so the configuration is inconsistent.
	Later in the creation path the configuration is assumed to be present
	(either fixed by VDSM or given by Engine), but it is not, and this makes
	the domain initialization fail in the last stages.

	This is evident when upgrading Hosted Engine.
	This issue was unnoticed so far because the reccomended upgrade path
	is to migrate VMs away from the host being upgraded, and that avoid and
	triggers the existing safety nets for the missing configuration data.

	Bug-Url: https://bugzilla.redhat.com/1168709

2014-12-10  Ondřej Svoboda  <osvoboda@redhat.com>

	testSetupNetworksAddDelDhcp: Improve readability

2014-12-10  Antoni S. Puimedon  <asegurap@redhat.com>

	network: Make vdsmd addNetwork use supervdsmd setupNetworks
	addNetwork is part of a very old and deprecated API that we have to
	eventually shed off in the next major release. It makes sense to
	just make an adapter so that we can simplify network.api to keep
	a single entry point.

2014-12-09  Petr Horáček  <phoracek@redhat.com>

	libnl: non-existing link returns exception instead of None
	Because of backward compatibility we use two different functions for
	getting the link in _get_link(). In case of non-existing device,
	rtnl_link_get_by_name() returns None, rtnl_link_get_kernel() raises
	NLE_NODEV exception.

	To make _get_link() function consistent, we return link as None in the
	case of NLE_NODEV exception.

2014-12-09  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: VM_setCpuTuneQuota
	Align naming between API.py and schema.

	jsonrpc: VM_setCpuTunePeriod
	Align naming between API.py and schema.

2014-12-09  David Caro  <dcaroest@redhat.com>

	Fixed parted utils for newer parted
	In the newer parted, the new flag 'esp' is added to the 'boot' flag on all
	partitions.

	Also fixed issue where we returned the trailing commas when a partition had
	more than one flag.

2014-12-09  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Host_setupNetworks
	Align naming between API.py and schema.

2014-12-09  Allon Mureinik  <amureini@redhat.com>

	spec: fix selinux-policy requirement for EL6
	Bug-Url: https://bugzilla.redhat.com/1160808

2014-12-09  Francesco Romani  <fromani@redhat.com>

	janitorial: fix pep8 glitch
	Fixes this pep8 error:

	./tests/functional/utils.py:245:25: W292 no newline at end of file

2014-12-08  ibarkan  <ibarkan@redhat.com>

	tests: factor out api calls response parsing
	This will prevent unclear KeyError Exceptions when the service has failed to
	load or when an api call has raised an exception.

2014-12-08  Yeela Kaplan  <ykaplan@redhat.com>

	Move multipath configuration to vdsm-tool configurator
	Previously multipath is reconfigured on each vdsm
	service restart.

	multipath.conf should not be changed since important changes
	done by the sysadmin are needed and might be overwritten.

	vdsm will fail to start if multipath configuration is
	required.

	Multipath will be reconfigured only on user demand
	using "vdsm-tool configure --module multipath".

	as part of the move to using vdsm tool configurator for multipath,
	we want to consolidate the configuration of multipath with
	other configurators, such as libvirt.
	Rotating the configuration file will end up deleting the
	original multipath conf file for the user,
	- pre vdsm installation. So we'll use backup files with
	timestamp instead of rotation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1076531

2014-12-08  Dan Kenigsberg  <danken@redhat.com>

	net tests: allowDhcp is no-op if there is no firewall
	firewall.allowDhcp is intended to allow DHCP traffic to the tested
	interface. With this patch, we assume that if we find no firewall
	service running, DHCP is already allowed.

	This change allows DHCP-related tests to run when no firewall is
	running on host.

2014-12-07  Yeela Kaplan  <ykaplan@redhat.com>

	ioprocess: reduce log level to INFO
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1170510

2014-12-05  Francesco Romani  <fromani@redhat.com>

	vm: make _set_lastStatus safer
	It is not safe to set concurrently state of a VM, because
	the function which does that is not-trivial and racy.

	This is a concrete risk in the case of QEMU dying
	(or being killed, like in rhbz#1142776) unexpectedly
	on Migration Source.

	In this case, the race between the libvirt event handler
	and the migration.SourceThread becomes evident, and
	could end up in messing the Vm state.

	This patch introduces a lock to make concurrent invocations
	of _set_lastStatus safe(r).

	Bug-Url: https://bugzilla.redhat.com/1142776

2014-12-05  Petr Horáček  <phoracek@redhat.com>

	network: unified configureLibvirtNetwork parameters
	configureLibvirtNetwork() parameters in iproute2 and pyroute_two
	configurators are changed to fit the ifcfg's ones which was introduced
	in 122c03886c4f42aa8c563e429aa7f4a9a1eb5a5b.

2014-12-04  Martin Polednik  <mpolednik@redhat.com>

	vdsm: expose hostdev via vdsClient
	Exposes current API verb hostdevListByCaps by vdsClient,
	using pretty tree graphical structure.

2014-12-04  Nir Soffer  <nsoffer@redhat.com>

	tests: Add tests for registering instancemethod
	Event class cannot be used with instance methods, so we must use partial
	holding weak reference to the object. This code is used in StoragePool,
	and these tests validate that this works and serve as example code for
	Event.

2014-12-04  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: Introduce IPv6_ADDRESS_AND_CIDR

	networkTests: Reorganize parameters to dnsmasq and improve comments

2014-12-04  Allon Mureinik  <amureini@redhat.com>

	storage: Fix VMPathNotExists text
	Bug-Url: https://bugzilla.redhat.com/1169512

2014-12-04  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: Fix operator precedence so a parameter to dnsmasq is not empty
	--dhcp-option=3 (with the missing ,<router> part) forces dnsmasq not to pass
	any gateway to DHCP clients, in contrast to sending the gateway of the system
	dnsmasq is running on, when this parameter is not used.

	No tests employ this functionality nowadays (they did before source route
	testing) but let's be correct.

2014-12-04  Antoni S. Puimedon  <asegurap@redhat.com>

	net_func_tests: add calling method name to setupNetworks
	It is usually difficult to know which test originated the
	setupNetworks calls in the logs. This patch makes it easier to debug

2014-12-03  Martin Sivak  <msivak@redhat.com>

	Add the missing --enable-rhev definition to configure.ac
	This fixes an error reported by autogen.sh when
	--enable-rhev was on the command line.

2014-12-03  Martin Sivak  <mars@montik.net>

	Restore the default value of rhev_build in the spec file

2014-12-03  Francesco Romani  <fromani@redhat.com>

	sampling: live merge: avoid wasteful picklecopy
	The Vm.queryBlockJobs() API always return a fresh dictionary,
	so it is safe to copy it directly, saving a picklecopy.

	virt: log.error(exc_info=True) -> log.exception()
	This patch just replaces the occurrences of

	log.error('something', exc_info=True)

	with the recommended idiom

	log.exception('something').

	No changes in behaviour.

2014-12-03  Dima Kuznetsov  <dkuznets@redhat.com>

	hooks: Remove sudo use from ethtool_options hooks
	This hook is running from supevdsm context therefore runs as root.

2014-12-03  Francesco Romani  <fromani@redhat.com>

	vdscli: 'port' argument must be an int
	The 'port' parameter of the cannonizeHostPort
	function should be an int, not a string, and
	should be treated as such.

	This patch fixes the code to so, removing
	TODOs along the way.

	tests: add vdscli.cannonizeHostPort unit tests
	This patch adds tests to cannonizeHostPort as is.
	Future patches will address the FIXMEs and the
	quirks of the function, bulding on the safety
	added by these test.

	xmlrpc: remove useless 'serverPort' attribute
	The BindingXMLRPC class used to have one
	'serverPort' attribute, which was used only on the migration
	path.

	Since commit 3be9ad1f278 was merged some time ago, this
	attribute is unused and could be removed.

	This patch does that.

	vdscli: rename constants and make them private
	the various d_* constants found in the vdscli
	module should not be exported and their naming
	should reflect they are private.

2014-12-02  Yeela Kaplan  <ykaplan@redhat.com>

	sosreport: remove Base class
	Use of Base class inheritance breaks with sos>=3.1

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1167828

2014-12-02  Adam Litke  <alitke@redhat.com>

	irs: Directly register domain state change callbacks
	Currently, domain state change callbacks aren't actually registered
	until a storage pool is connected.  In a hosted engine environment there
	is not a traditional storage pool associated with the storage domain
	that is hosting the engine VM so in this case the event doesn't get
	registered.  Since storage pools are becoming deprecated, there is no
	reason to delay callback registration based on connectStoragePool.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1157421

	clientIF: Use a weakref.proxy when registering contEIOVMs
	Our storage Event class is taking a weakref on the callback function
	that is passed into Event.register.  Unfortunately weakrefs on bound
	methods are dead on arrival.  See this [1] discussion for more
	information.  Use the same approach as StoragePool._upgradeCallback and
	use a weakref.proxy to build the callback function.

	[1] http://code.activestate.com/recipes/81253/

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1157421

2014-12-02  Dan Kenigsberg  <danken@redhat.com>

	Revert "use SASL_USERNAME instead of its upstream value"
	This reverts commit b4da9f55ee0010f516212393f5d0562c59603bd3.

	use SASL_USERNAME instead of its upstream value
	commit 98a2692fe reverted broken code, but it also added new code, that
	the reviewer failed to notice. This patch fixes it.

	Bug-Url : https://bugzilla.redhat.com/show_bug.cgi?id=1168689

2014-12-02  Yeela Kaplan  <ykaplan@redhat.com>

	constants: remove unuesd service constant
	Use have been moved to service.py

2014-12-02  Martin Polednik  <mpolednik@redhat.com>

	vdsm: add functionality to reattach host devices
	Release call (libvirt's reAttach call) is mandatory to properly
	reattach device back to host, unbinding it from VFIO driver and
	binding it back to host driver.

	vdsm: add functionality to detach host devices
	Detach call (libvirt's dettach/detachFlags call) is required to
	properly detach device from host. Dettaching device from the host means
	unbinding it from it's driver and binding it to VFIO driver, which
	serves as KVM device driver.

2014-12-02  ibarkan  <ibarkan@redhat.com>

	remove updating libvirt_nets, it has no effect

	factor out hook logic in setupNetworks

	removed unused argument copies

	factor out parts of setupNetworks for better readability

	do not delete networks from parameters

2014-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Changing persisted value to libvirt logrotate configure
	Setting persisted to false means that is-configured won't check the
	status of this file. This to avoid differences between ovirt-3.4
	configuration to ovirt-3.5 in /etc/logrotate.d/libvirtd

	In ovirt-3.4 we set the prefix of the configuration without the conf
	version, therefore in 3.5 we alerted that libvirt is not configured
	and asked to run vdsm-tool configure all-over again without having any
	differences between the versions.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1168695

2014-12-01  Yeela Kaplan  <ykaplan@redhat.com>

	sosreport: Don't try to collect info from sockets
	sosreport gets an IOError trying to collect data
	from svdsm.sock:
	'caught IO error copying /var/run/vdsm/svdsm.sock'

2014-12-01  Adam Litke  <alitke@redhat.com>

	storage: Search only the current image for children
	The getChildren method of FileVolume is currently searching all images
	in the storage domain for children.  A glob of all metadata files in the
	SD is cached and then passed to grep to look for the child volumes.  The
	problem is that deleteVolumes takes an exclusive lock on the image
	namespace only.  If deletes are active on other images at the same time
	we'll get errors with missing files.

	The code attempts to report the children of a template base volume.
	However, this is not needed now and is not expected to be required in
	the future.  The getVolsOfImage API should be used for templates.
	Therefore, we can fix this race by limiting the search for children to a
	single image.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1069610

	Live Merge: Proactively extend merge target volume
	Since libvirt is not yet providing the write watermark information for
	all volumes, we need to employ a workaround to support live merge on
	block-based storage.  When starting a merge, we can request the base
	volume (merge target) to be extended to the size of the top volume
	(merge source) plus one chunk to accomodate active writing.  This may
	cause some over-extension of the merge target volume but the upside is
	that the merge should complete without active monitoring.  Future
	versions of oVirt will take advantage of an upcoming libvirt enhancement
	to report write watermarks for all volumes which will allow on-demand
	volume extension.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1155583

	Do not extend volume beyond truesize
	When calling getNextVolumeSize on a volume that is close to fully
	allocated, the function can return a value larger than the volume's real
	capacity.  Add an explicit ceiling to prevent this.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1155583

2014-12-01  Francesco Romani  <fromani@redhat.com>

	tests: fix HostStatsThread tests
	In commit 4567f368bc3b initial tests for HostStatsThread
	were added. Unfortunately, the patch was verified
	on branch, not on master, so master branch broke
	when the patch got merged.

	The mistake slipped into because
	* the parent patch contained the code which made the
	  test work ok, and was abandoned (see below).
	* 4567f368bc3b applied cleanly against mastr.

	This followup patch fixes that in the following way
	- mark test as broken: the existing behaviour is *not*
	  to continue in presence of errors - see
	  http://gerrit.ovirt.org/#/c/29401/ abandoned
	  for that reason.
	- wrap a real HostSample to be more correct
	- add a timeout to avoid hang indefinitely.

2014-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Revert Ib7808f4f217ba3d6d30a60fab6233e36a29f0098 and add set-sasl to spec
	To avoid upgrade issue and set the sasl password during installation,
	this workaround change the use in vdsm-tool to direct call.

	Bug-Url : https://bugzilla.redhat.com/show_bug.cgi?id=1168689

2014-12-01  ibarkan  <ibarkan@redhat.com>

	rename networkAttrs to attrs

	rename networksAdded to connectivity_check_networks

	move _netinfo and libvirt_nets decleration right before it's used

2014-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fixed %post script error during upgrade
	During post script we initiates vdsm-tool set-saslpasswd call. On
	upgrade we have mixed code that may lead to an error while calling
	vdsm-tool script, as in the related bug.
	In this patch we move the call to set-saslpasswd to init scripts. In
	pre-script phase we can be sure that the newer code is running.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1168689

2014-12-01  Francesco Romani  <fromani@redhat.com>

	tests: sampling: add initial HostStatsThread tests
	This patch adds a unit test to HostStatsThread.

	Relates-To: https://bugzilla.redhat.com/1113948

2014-12-01  Dima Kuznetsov  <dkuznets@redhat.com>

	Remove orphaned files
	This patch removes files than are neither mentioned in any code nor
	shipped int the dist tar file.

2014-11-30  Dima Kuznetsov  <dkuznets@redhat.com>

	debian: Add noipspoof files to dist

2014-11-30  Yeela Kaplan  <ykaplan@redhat.com>

	supervdsm: enable coredumping
	Enable coredump both on el6 (sysvinit)
	and on el7 (systemd).
	Also, limit core size to 0 in case of
	enable_core_dump is set to False

	Bug-Url: https://bugzilla.redhat.com/1167814

2014-11-28  Petr Horáček  <phoracek@redhat.com>

	libnl: workaround for _rtnl_link_get_kernel on el6
	If we pass just a link's name to rtnl_link_get_kernel(), el6's kernel
	is not able to return link object. For this case we created
	a workaround with cache and rtnl_link_get_by_name().

2014-11-28  Ondřej Svoboda  <osvoboda@redhat.com>

	networkTests: Make DEFROUTE controllable so the system's gateway is preserved
	testSetupNetworksAddDelDhcp, a test on a veth pair (with dnsmasq and
	a VDSM-invoked dhclient), has recently been adapted to account for source
	routing. Other two tests using dhclient directly however result in
	the replacement of the system's default route.

	Fix this situation on Fedora and RHEL by instructing their dhclient-script
	not to set the gateway on the veth.

2014-11-28  Antoni S. Puimedon  <asegurap@redhat.com>

	dummy_nics: add hotplug=no so udev does not ifup them
	In EL6 udev/initscripts execute ifup if an ifcfg file exists for the
	just plugged device (which applies often for virtual devices). Due
	to how troubling this functionality is they removed it from el7/F20+
	but in el6 it can disrupt our configuring with parallel ifups,
	overriding of bond slaves config, etc.

	drv_name: Make drv_name support unicode types
	Our json serialization and de-serialization for both the hooks and
	persistence add unicode text to the flows of our codebase.

	Before we would only have "foo". Now we have as well u"foo".
	In order to make it work in unicode we also need to provide for real
	unicode characters u"トトロ".

2014-11-28  Federico Simoncelli  <fsimonce@redhat.com>

	build: expose rhev_build to make rpm

2014-11-27  Martin Sivak  <msivak@redhat.com>

	Introduce new rhev_build spec file variable and use it for mom
	This new rhev_build variable will contain 1 if VDSM is being
	built in brew as part of the official RHEV product.

	It will contain 0 otherwise (oVirt and Fedora).

	This allows us to adapt to slightly different versions and/or
	package names in RHEV environment.

2014-11-27  Genadi Chereshnya  <gcheresh@redhat.com>

	netinfo: Displays active slave for the bond in getVdsCaps vdsmapi-schema: Adding Active slave support networkTests: Test to check if active slave exists
	Adding active slave field for the bond in the getVdsCaps
	Adding active slave in vdsmapi-schema.json
	Displays an active slave if exists or displays '' when there is no active slave

2014-11-27  Yeela Kaplan  <ykaplan@redhat.com>

	sosreport: use service status instead of initd script
	Using initd script obviously fails on el7...

2014-11-27  Vitor de Lima  <vdelima@redhat.com>

	caps: Do not memoize CPU topology
	This patch prevents the CPU topology from being memoized, this is
	needed in order to support host CPU hotplugging, to avoid using
	disabled logical CPUs and to rescan for topology changes in ppc64.

2014-11-26  Francesco Romani  <fromani@redhat.com>

	live merge: fix usage of getLastSample
	In commit 359c7b60b6125cae0ac47b64dfcffde1dd91c9b7
	I forgot to update the sampleVmJobs code to make
	use of the new getLastSample() API.

	This broke live merge, and this patch fixes that.

2014-11-26  ibarkan  <ibarkan@redhat.com>

	Remove unused proxyLock member from SuperVdsmProxy
	The usage was removed in 812fe75

2014-11-26  Nir Soffer  <nsoffer@redhat.com>

	hba: Rescan using SCSI layer
	Since commit b6a27493a4 (Rescan SAN devices before rebuilding multipath
	bindings) in Jan 2009, we perform scsi scan during multiapth rescan flow.

	In Sep 2013, commit 66c24c1996 (iscsi: Iscsi rescan cleanup) removed scsi scan,
	assuming that iscsiadm --rescan was good enough.  iscsiadm do perform scsi
	scan, but only for scsi_host with iscsi connection.  Since this change, new
	LUNs created on FC storage server are not discovered by hosts.

	In commit 674337d8f9 (multipath: Rescan also FC devices), we tried to fix HBA
	rescanning by using issue_lip.  But issue_lip was proved to be disruptive, (see
	bug 1157681) and was disabled in commit 48fa75287e (multiapth: Disable hba
	rescanning 22 by default).

	This patch restores the missing scsi scan for fc_hosts, enabling discovery of
	new FC LUNs in the multiapth rescan flow.

	Since scsi scan is a blocking operation, we perform the scan using external
	command line tool, ensuring that vdsm cannot get stuck. This tool can be also
	useful outside of vdsm.

	In the fc-scan tool, we perform the scan in parallel, so blocking on
	unresponsive fc_host will not prevent discovery of new devices on other
	fc_hosts.

	Bug-Url: https://bugzilla.redhat.com/1159839
	Relates-To: https://bugzilla.redhat.com/1123637
	Relates-To: https://bugzilla.redhat.com/1157681

2014-11-26  Francesco Romani  <fromani@redhat.com>

	tests: split SampleWindow tests
	Reorganize and rationalize the unit tests after
	the introduction of SampleWindow class.

2014-11-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Arranging format of configure flags to avoid conflicts later

2014-11-25  ndarshan  <dnarayan@redhat.com>

	gluster: proper check in gfapi.py to avoid segfault in libgfapi
	This patch adds proper checks in gfapi.py to avoid
	segmentation fault in libgfapi.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1162640

2014-11-25  Francesco Romani  <fromani@redhat.com>

	utils: add monotonic_time function
	We currently use time.time() to get timestamp
	with (near) second precision.
	We we just need the difference between two instants
	in time, os.times() provide safer alternative
	because it is more resilient with respect to
	system clock adjustments, and can never go
	backwards.

	This function add a simple monotonic_time() function
	based on os.times().

	The drawback of this function is lower resolution.
	The actual resolution depend on the kernel configuration,
	but a commonly found value is ten milliseconds.

	sampling: rename variables to make code nicer
	Rename internal variables of SampleWindow
	methods to make the code nicer and easier
	to read.

	No changes in behaviour.

	vm: log exceptional monitor unresponsive case
	In past ages we added an explicit case to mark
	monitor unresponsive.

	This case may be no long relevant. In order
	to gather evidence against or supporting
	this hypotesis, add an explicit log line
	when this case is applied.

	Also, extract the relevant code in a helper
	method, and add a couple of unit tests.

	virt: sampling: factor numa stats in a method
	This patch moves the NUMA stats collection into
	an helper method, to make the code more consistent
	and a bit tidier.
	No functional changes.

2014-11-24  Martin Sivak  <msivak@redhat.com>

	Instruct MOM to ignore ballooning when guest agent is not running
	This makes use of the new MOM feature (valid function) and
	associated guest memory collector (GuestMemoryOptional).

	The ballooning part of the policy will be ignored when guest agent
	is not running while the rest of the policy is still evaluated.

	The most notable change is that MOM used to ignore the whole
	policy when guest agent was not available.

2014-11-24  Dima Kuznetsov  <dkuznets@redhat.com>

	tests: Add sourceroutingTests and qosTests to make check

	tests: Fix API change in sourceroute.py
	Fix signature change introduced in http://gerrit.ovirt.org/#/c/34067

2014-11-24  Nir Soffer  <nsoffer@redhat.com>

	lvm: Disable chown hack for EL6
	Testing EL6 revealed that the new vdsm lvm udev rules required for EL7
	introduced a race which causes createVolume to fail randomly on some
	machines.

	Since commit 9240b8c5782 (lvm: Do not use udev to set permissions on
	vdsm images), devices are created with default permissions - root:disk.
	Then udev run chown which set the permissions to vdsm:qemu.  Because of
	udev "watch" feature, this permission dance happens twice when creating
	a logical volume:

	    root:disk -> vdsm:qemu -> root:disk -> vdsm:qemu

	Typically when lvcreate returns the permissions changes are done, but
	sometimes it may return while the events are processed. Then when we run
	qemu-img, it fail because the disk permissions are not vdsm:qemu.

	On EL6 we don't need to use the chown hack; We used it because it looked
	like a simple solution that works everywhere. So now we use the old udev
	rules format on EL6, and the new format (chown hack) on EL7 and Fedora.

	By default, we build the old udev format. To enable the new format,
	configure with --enable-chown-hack. The spec enables the chown hack
	on EL7 and Fedora trough configure.

	To create a different rule depending on the configuration, the udev rule
	is generated now by a python script.

	On EL7 using our chown hack, the race does not exist. We also verified
	that using a script creating 600 disks, and using automated QE tests.

	Bug-Url: https://bugzilla.redhat.com/1160620

2014-11-22  Ondřej Svoboda  <osvoboda@redhat.com>

	tests: Add and use assertRuleExists and assertRuleDoesntExist
	DHCPv6-enabled testSetupNetworksAddDelDhcp needs a better diagnosis.

2014-11-22  Vitor de Lima  <vdelima@redhat.com>

	Add missing version comment in onlineCpus
	The onlineCpus property of the capabilities command was missing a
	comment reporting in which version it was introduced.

2014-11-21  ibarkan  <ibarkan@redhat.com>

	avoid reading ifcfg files in netinfo
	getting runtime network information is better via quering
	more standard netinfo api's rather than reading ifcfg configuration
	files which is more error prone.

	We need to confine reading ifcfg files only in the context of
	dealing with the ifcfg configurator.

2014-11-20  Sandro Bonazzola  <sbonazzo@redhat.com>

	sos: remove vdsm pki private keys collection
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1162784

2014-11-20  Francesco Romani  <fromani@redhat.com>

	jsonrpc: have simplejson as soft dependency
	In commit ec58bca5cb18 we added dependency to
	the external simplejson package to gain some speed,
	especially on RHEL/Centos 6.x.

	We discovered the hard way that python-simplejson
	was moved out of the base system in RHEL/CentOS 7,
	and put into the EPEL repository.
	This is alone makes ec58bca5cb18 not good enough.

	We still want to get the JSON codec speedups, so
	to this patch
	* moves the requires to RHEL/Centos 6.x only
	* makes simplejson a soft dependency.

	Bug-Url: https://bugzilla.redhat.com/1155146

2014-11-20  Roy Golan  <rgolan@redhat.com>

	mom.d: make CpuTuneEnabled True by default
	we should ship vdsm with that policy enabled otherwise cpu tuning isn't
	taking place at all as the policy isn't evaluated.

	future: control this policy parameter at runtime as well

	Bug-Url: https://bugzilla.redhat.com/1143992

2014-11-20  Sandro Bonazzola  <sbonazzo@redhat.com>

	sos: fix config import
	config module is in not a platform-specific module so
	it's in lib and not in lib64 tree.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1164215

2014-11-19  ibarkan  <ibarkan@redhat.com>

	make isVDSMInterface and it's helpers static

2014-11-19  Petr Horáček  <phoracek@redhat.com>

	libnl: make link cache optional for link/route/addr_info

2014-11-19  Antoni S. Puimedon  <asegurap@redhat.com>

	host QoS: have service curve parameters be integers
	It does not make sense to represent fraction of bits, specially when
	we get the information from the kernel (though indirectly) and the
	kernel external representation is in integer bps.

	change qosOutbound for a nested 'hostQos':{'out': bandwidth_params}
	The engine had some semantics associated to the original (and never
	used, but shared with vnic traffic shaping) host QoS. That makes it
	a good idea to take a sort of a clean-slate approach to this feature
	that I did not originally take, but I do here in this patch.

	The difference is that it used to be:

	    {'blue': {'nic': 'em1', 'qosOutbound': {'ls': 8 * 1024 ** 2}}}

	and now it will be:

	    {'blue': {'nic': 'em1', 'hostQos': {'out': {'ls': 8 * 1024 ** 2}}}}

2014-11-18  Antoni S. Puimedon  <asegurap@redhat.com>

	libnl: drop libnl-1 dependency
	El6.6 is out. Since the next release of vdsm will not support
	earlier releases than that, we can finally depend exclusively on
	libnl3 and remove libnl1 glue code.

	The next step should be to leverage the extra things that libnl3
	gives us that we could not use up until now, e.g., routes support
	for source routing.

2014-11-18  Ondřej Svoboda  <osvoboda@redhat.com>

	bondopts: Add defaults for new bonding options
	The new options are:
	arp_all_targets, lp_interval, packets_per_slave, tlb_dynamic_lb

	Without this patch, they are reported even if they have default values.
	This is harmless but quite confusing, as we only want to report options
	with values differing from their defaults (which are mode-dependent).

	netinfoTests:testGetBondingOptions, whose purpose is to alert
	us that we are missing some defaults, should now pass again.

2014-11-18  Nir Soffer  <nsoffer@redhat.com>

	multipath: Fix booting from multipath device
	When booting EL6 system from multipath device, boot will fail because
	/sbin/scsi_id is not included in initrd. /sbin/scsi_id is a symlink to
	/lib/udev/scsi_id, which is included in initrd. Now we use the correct
	documented path.

	Bug-Url: https://bugzilla.redhat.com/1124450

2014-11-18  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfoTests: suggest to refresh bonding defaults in a unit test
	With the unfortunate, but pragmatic move from determining the defaults
	at runtime to distributing them as a file we might not always be
	up to date when the kernel introduces new bonding options.

	The unit test will now suggest to run `vdsm-tool dump-bonding-defaults`
	when new options are found instead of just failing.

	As we moved from reading the defaults from a reference bond we can no
	longer trigger read errors, thus assertNotRaises was removed from the test.

2014-11-18  Francesco Romani  <fromani@redhat.com>

	utils: faster albeit less general deepcopy
	VDSM makes intense use of deepcopy() to ensure
	correctness of the returned Vm data.
	The usage of deepcopy can be reduced, but in order
	to do so a significant amount of work is due
	to clean up and refactor the affected flows.

	For the short/medium term, deepcopy() will be needed;
	unfortunately, deepcopy has a quite significant cost.
	The function must guarantee to do the right thing
	an to behave correctly with all the types and combinations
	thereof, so it does quite some bookkeeping.

	VDSM, however, does not need so much care for its
	usage of deepcopy().
	VDSM uses deepcopy with Vm.conf, which will contain
	only python primitive types, arranged in a structure
	only moderately nested and complex, without fancy
	things like classes or generators.

	Moreover, this data must be pickle-able, because
	VDSM already uses pickle as checkpointing machinery.

	So, for VDSM intents and purposes, both existing and
	foreseeable, we can replace deepcopy with a much
	simpler and faster function, leveraging
	the pickle module, like the one suggested on:

	http://stackoverflow.com/a/1411229

2014-11-18  ibarkan  <ibarkan@redhat.com>

	refactor StaticSourceRoute for better testability
	changed the way this object is built such that most of the relevant
	information is known at object creation time. This allows better
	testability as the routing rules and ip rules generators can be
	always accessed directly by tests.

2014-11-18  Francesco Romani  <fromani@redhat.com>

	sampling: extract SampleWindow class
	The existing AdvancedStatsFunction does actually
	two different things: wraps a client-provided
	callable, and implements a sliding window for samples.

	This patch splits the two responsabilities.
	Other than cleanup for the sake of clarity and testability,
	future sampling refactoring patches will still
	need to store samples and handle a sliding window;
	but samples will be given instead of grabbed
	(inversion of control, think the new libvirt bulk stats API)
	so this also improve code reuse.

	tests: backport assertAlmostEqual
	vm migration tests depend on the 'delta'
	keyword argument of the assertAlmostEqual method.

	This patch adds the backport of this method,
	thus unbreaking the tests on python 2.6.

	jsonrpc: switch to the simplejson module
	During testing, we discovered that on RHEL 6.x
	and Centos 6.x we unnecessarily lose performance
	because the JSON module shipped with python 2.6
	does not include speedups found in python 2.7
	and onwards.

	The standard library module is based on the
	simplejson package, and RHEL 6.x/Centos 6.x already
	provide an updated simplejson rpm.

	Then, this patches makes yajsonrpc use simplejson,
	to recover speed at nearly zero cost.

	To ease development and deployment, this patch
	always make VDSM require simplejson, even
	on platforms shipping a modern enough python
	distribution.

	Bug-Url: https://bugzilla.redhat.com/1155146

	clientIF: strip unneeded logging
	Everything we log inside clientIF.createVm is either
	redundant or with little value.

	Highlights
	* if we need to debug vmContainerLock, there are better
	  and more comprehensive ways to do that
	* no need to log error, it should be reported anyway.

	So this patch strips all the logging from this method.

	vm: replace try/finally with 'with'
	The creation of VM is throttled using a bounded semaphore.
	This patch
	* replaces the try/finally construct with 'with' to make
	  code (a tiny bit) nicer ad smaller
	* drops the log lines around the lock, because
	  - we are now guaranteed the code is correct and always
	    release the lock
	  - if we care about performances and timings (e.g.time spent
	    in locked region) we need more precise instrumentation
	    anyway.

2014-11-17  Sandro Bonazzola  <sbonazzo@redhat.com>

	pep8: fix pep8 on generated vdsm.py

2014-11-17  Yeela Kaplan  <ykaplan@redhat.com>

	oopTests: replace 'if None' with try except clause
	When asserting if the instance is None at the end of the test,
	we already assume that it should be None,
	or else the test fails.
	This means that the 'if None' check is redundant and
	can be moved into a try except clause because in case
	of test failure we still want the relevant logs.

2014-11-17  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Fix polling timeout
	The event loop was calculating timeout in seconds, but poll timeout
	should be milliseconds. This caused poll to wait up to 30 milliseconds
	instead of 30 seconds where there are no events to handle.

	Profiling a system running one vm for 5 mintues show _process_events is
	dominating the profile, taking 55% of cpu time:

	    Mon Nov 17 00:22:02 2014    vdsmd-master.prof

	         14440725 function calls (14721061 primitive calls) in 16.907 CPU seconds

	    Ordered by: internal time
	    List reduced from 3079 to 10 due to restriction <10>

	    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	 2241981    5.685    0.000    9.445    0.000 protocoldetector.py:108(MultiProtocolAcceptor._process_events)
	 4501127    1.442    0.000    1.442    0.000 time:0(time)
	 2246162    1.396    0.000    1.396    0.000 __builtin__:0(poll)
	 2242305    0.737    0.000    0.737    0.000 __builtin__:0(max)
	    6566    0.352    0.000    0.536    0.000 spark.py:211(Parser.buildState)
	   50705    0.170    0.001    0.373    0.000 copy.py:144(deepcopy)
	     127    0.158    0.001    0.158    0.001 cpopen.cpopen:0(createProcess)
	   10394    0.154    0.000    0.154    0.000 __builtin__:0(open)
	  154006    0.132    0.000    0.269    0.000 encoder.py:284(JSONEncoder._iterencode)
	    2533    0.124    0.000    0.141    0.000 pthread.py:133(Cond.timedwait)

	With this patch we can see that number of functions calls decreased by 76% and
	total cpu time decreased by 57%:

	    Mon Nov 17 00:33:44 2014    vdsmd-poll-timeout.prof

	         3344648 function calls (3624721 primitive calls) in 7.340 CPU seconds

	    Ordered by: internal time
	    List reduced from 3069 to 10 due to restriction <10>

	    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	      6435    0.346    0.000    0.518    0.000 spark.py:211(Parser.buildState)
	       122    0.166    0.001    0.166    0.001 cpopen.cpopen:0(createProcess)
	     10202    0.157    0.000    0.157    0.000 __builtin__:0(open)
	     50705    0.148    0.001    0.329    0.000 copy.py:144(deepcopy)
	        98    0.140    0.001    0.140    0.001 posix:0(fork)
	    154178    0.115    0.000    0.236    0.000 encoder.py:284(JSONEncoder._iterencode)
	      2496    0.113    0.000    0.131    0.000 pthread.py:133(Cond.timedwait)
	      5870    0.112    0.000    0.153    0.000 spark.py:103(Parser.addRule)
	      3325    0.109    0.000    0.194    0.000 __init__.py:226(LogRecord.__init__)
	     28264    0.103    0.000    0.384    0.000 protocoldetector.py:108(MultiProtocolAcceptor._process_events)

	Now we calculate the the timeout correctly, and improved variable names
	make this code unlikely to break again.

2014-11-17  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: diskSizeExtend missing in command_info
	Bug-Url: https://bugzilla.redhat.com/1161115

2014-11-16  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Wrong key name for getDevicesVisibility
	Bug-Url: https://bugzilla.redhat.com/1159637

2014-11-14  Federico Simoncelli  <fsimonce@redhat.com>

	multipath: add specific fail entry for emc-vnx
	As few other storage arrays also the emc-vnx is forcing the
	queue_if_no_path option on the multipath device.

	This patch adds a specific section for the device maintaining
	the emc defaults but forcing to fail the io instead of queuing.

	In case of queuing we observed that the processes were blocked
	on io and among other things it prevented the storage pool to
	be reconstructed.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1098769

	qemuimg: add backing file to convert
	This patch adds the support for the backing file in the convert qemu-img
	command.

2014-11-14  Artyom Lukianov  <alukiano@redhat.com>

	Change clientIF to get port as string and not as int from config.
	Bug-Url: https://bugzilla.redhat.com/1163771

2014-11-14  pkliczewski  <piotr.kliczewski@gmail.com>

	vm: state change missing return value
	Return arguments where ignored in schema for pause and resume verbs.
	We had to update command_info with following verbs to returned
	'vmList' dictionary required by the engine.


	Bug-Url: https://bugzilla.redhat.com/1163089

2014-11-13  Mooli Tayer  <mtayer@redhat.com>

	spec: bump policycoreutils-python version to 2.0.83-19.47.
	New version contains fix for:
	seobject.booleanRecords().modify(...)
	AttributeError: booleanRecords instance has no attribute 'load'

	The bz for the policycoreutils bug is:
	https://bugzilla.redhat.com/show_bug.cgi?id=1148800

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1139873

2014-11-13  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Makefile: add whitelist files to pyflakes and pep8 check
	We should run pyflakes and pep8 check in vdsm-reg-setup.in for example.
	We already have whitelist for pep8. this adds the files also to pyflakes
	check.

2014-11-13  Martin Sivak  <msivak@redhat.com>

	Fix ballooning behaviour of freshly received VM
	There is an issue with freshly received VMs. MOM might ask for
	the current balloon status before the stats threads collect all
	data. The target will be reported as 0 in that case and the VM
	will be requested to return all its free memory.

	The balloon info method won't return any data before it
	has everything ready after this fix is applied.

	This also fixes the unittest that was using balloon for checking
	whether the stats system works.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1123274

2014-11-12  ibarkan  <ibarkan@redhat.com>

	clean dhclient processes that are left after functional tests
	using a context manager to kill dhclient process that
	outlives the functional test

2014-11-12  Dima Kuznetsov  <dkuznets@redhat.com>

	tests: Avoid printing objects that reference None
	One of the current ioprocess tests checks who holds reference to the
	ioprocess object, but since only a weak reference is stored, if the
	object is freed, we check who holds reference to None, and apparently
	quite a lot things do.

	vdsm-reg: Fix closed log file descriptors
	When calling createDaemon(), all file descriptors are closed, including
	the file descriptors held by log handlers. This patch moves logging
	configuration below the daemonization to make sure the file descriptors
	stay open.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1150238

2014-11-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	fixing pyflakes errors

2014-11-11  Federico Simoncelli  <fsimonce@redhat.com>

	blockVolume: remove inexplicable fixme comment
	There's no apparent reason for this fixme. Since the line is raising an
	exception the "fix me" string appears in the tracebacks making our code
	appear sloppy.

	I searched for other inexplicable fixmes but it seems that this was the
	only one.

2014-11-10  Dima Kuznetsov  <dkuznets@redhat.com>

	vdsm-reg: make vdsm-reg-setup PEP8-happy

2014-11-10  ibarkan  <ibarkan@redhat.com>

	pretty print json in vdsm persistency files
	Adding indentation is making the json a lot more human readable

2014-11-10  Dima Kuznetsov  <dkuznets@redhat.com>

	vdsm-reg: Fix redundant control flow

2014-11-09  Yeela Kaplan  <ykaplan@redhat.com>

	misc: use utils.persist/unpersist instead of execcmd

	Use utils.persist instead of importing ovirt-node Config

	utils: add unpersist for symmetry

	utils: change persistFile to persist
	For style reasons. This way it's compatible with other
	calls in the utils module.

	utils: Use ovirt node for persist files

2014-11-09  Dima Kuznetsov  <dkuznets@redhat.com>

	supervdsm: Add zombiereaper to supervdsm
	Supervdsm uses multiprocessing.Process to impersonate other users and
	check access. To avoid waiting on the subprocesses, we add all
	subprocesses that were not waited upon to zombiereaper.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=841486

2014-11-07  ibarkan  <ibarkan@redhat.com>

	fix broken TestConfigNetwork.testAddNetworkValidation
	this was broken after http://gerrit.oveir.org/34538
	was merged.

2014-11-07  Frantisek Kobzik  <fkobzik@redhat.com>

	vm: return displayIp as a string in default case
	Previously, default value of displayInfo.displayIp was number 0. This patch
	changes it to string '0' so that it conforms to the schema.

2014-11-07  Shahar Havivi  <shaharh@redhat.com>

	libvirtconnection: add function to create a new connection
	Added a new function open_connection(), which accept credentials and uri,
	This will open a new libvirt connection and will not be handled by the
	wrapMethod() and will not be stored by the __connection dictionary.

	The new function will be needed by the v2v future patches which will need
	to connect to a remote libvirt given an uri.

2014-11-07  Nir Soffer  <nsoffer@redhat.com>

	guestagent: Simpler and safer disk mapping hash
	Previously diskMapingHash was initialized to the magic value 0, or to
	hash of a sorted json dump of the diskMapping dict. Now diskMappingHash
	is always a real hash, and is read only.

	The hash is computed automatically when the value of guestDiskMapping is
	changed, and there is no way to forget to update the hash.

	guestagent: Use new style class
	Using old style class is a trap for innocent developers. They do not
	support properties in a nasty way, and should be forbidden in vdsm code.

	domain_descriptor: More careful falsy check
	Using "if self._devices" works with xml.minidom, but if we switch our xml
	library to xml.etree, empty element is considered falsy, which will
	create same hash for different xml.

	While this may be a non-issue, using "if self._devices is not None" is
	more correct and predictable.

	domain_descriptor: Eliminate magic hash init value
	We used to initialize devices hash to 0 when there are no devices. There
	is no need for using this magic value. Hashing an empty string does not
	require additional comments and is more general.

	The magic "0" hash value was exposed in the past in the stats xml, and
	could be used for detecting a fresh domain without any devices, but this
	value is not exposed any more since we introduced the guest agent disk
	mapping hash.

2014-11-07  Mooli Tayer  <mtayer@redhat.com>

	tool: bugfix function called as attribute.
	to fix bug, introduced in commit 8f87f21, instead of using
	selinux.is_selinux_enabled I suggest using the recently added
	utils.get_selinux_enforce_mode().

	In both cases the code means to check if selinux != disabled
	(permissive | enforcing).

2014-11-07  Daniel Erez  <derez@redhat.com>

	storageServer: remove dead code from getSessionInfo
	storageServer -> getSessionInfo:
	cleanup of unused code ('sessions' varibale is never used).

2014-11-07  Francesco Romani  <fromani@redhat.com>

	vm: return full copy of the conf data on status()
	It is unsafe for status() to return a shallow copy
	of the Vm.conf data.

	Many modules (e.g. copy, json) of the python standard
	libary make use of the iteritems() method when dealing
	with dicts, so they can explode while iterating on
	data being mutated by the creation thread.

	This can be triggered just if someone (Engine) queries for
	Vm status while the creation thread is running, like

	Traceback (most recent call last):
	   File "/usr/lib/python2.6/site-packages/yajsonrpc/__init__.py", line 242, in sendReply
	     encodedObjects.append(response.encode())
	   File "/usr/lib/python2.6/site-packages/yajsonrpc/__init__.py", line 140, in encode
	     return json.dumps(res, 'utf-8')
	   File "/usr/lib64/python2.6/json/__init__.py", line 237, in dumps
	     **kw).encode(obj)
	   File "/usr/lib64/python2.6/json/encoder.py", line 367, in encode
	     chunks = list(self.iterencode(o))
	   File "/usr/lib64/python2.6/json/encoder.py", line 309, in _iterencode
	     for chunk in self._iterencode_dict(o, markers):
	   File "/usr/lib64/python2.6/json/encoder.py", line 275, in _iterencode_dict
	     for chunk in self._iterencode(value, markers):
	[...]
	RuntimeError: dictionary changed size during iteration

	This patch makes it always return a full copy.

	Bug-Url: https://bugzilla.redhat.com/1148583

	tests: make pyflakes happy with outOfProcess tests
	This patch fixes

	python -c 'import pyflakes; print("pyflakes-%s" % pyflakes.__version__)'
	pyflakes-0.8.1
	find . -path './.git' -prune -type f -o \
		-name '*.py' -o -name '*.py.in'  | xargs
	/home/fromani/.local/bin/pyflakes | \
		grep -w -v "\./vdsm/storage/lvm\.py.*: list comprehension
	redefines 'lv' from line .*" | \
		while read LINE; do echo "$LINE"; false; done
	./tests/outOfProcessTests.py:31: 'config' imported but unused

2014-11-07  Mooli Tayer  <mtayer@redhat.com>

	spec: remove redundant check.
	if not fedora 0%{?fedora} evaluates to 0.

2014-11-07  Francesco Romani  <fromani@redhat.com>

	vm: safe(r) Vm.conf update in creation thread
	A VM is created asynchronously for performance's sake.
	It is registered in the internal vmContainer inside VDSM
	as early as possible, while real initialization is carried in
	background in the creation thread.
	While creation thread runs, the Vm status is queryable by Engine.

	In the VM creation thread, the code will change the device
	configuration data received from Engine, by adding new devices
	(example: graphic device is added) or by fixing the fields in existing
	device configuration
	(example: for disks configuration, truesize/apparentsize is added).

	The creation thread incorrectly does not take any lock while it is
	changing Vm.conf['devices'], so concurrent access can fail because
	it can find data mutating while iterating.
	This is just made evident by the recent switch to JSON-RPC, but
	it is a quite old flaw in VDSM.

	This is known to break in at least two cases: JSON encoding
	and deepcopy() itself, because both modules in the standard
	library use iteritems() internally when dealing with dicts().

	Since VM creation thread always need to prepare conf data and to
	update it, the best fix is to prepare it without modifying Vm.conf
	unsafely and to update it atomically.

	This patch does that for buildConfDevices().

	Bug-Url: https://bugzilla.redhat.com/1143968

2014-11-04  Yeela Kaplan  <ykaplan@redhat.com>

	spec: require latest version of IOProcess
	This version includes an important fix for
	IOProcess being referenced by the communication thread

2014-11-04  Francesco Romani  <fromani@redhat.com>

	vm: migration: exponential downtime increment
	Migration downtime is calculated using an interpolation
	using the current downtime step (up to a configurabile
	maximum) and the maximum downtime.

	The downtime is incremented at each downtime step until
	it reaches the maximum, or the migration is finished.

	This patch changes the interpolation formula from linear
	to exponential, being the new one:

	d = c ** s + k

	where d is the downtime, s is the step and c is the
	exponentiation base computed in such a way
	of when s = S (number of steps to perform),
	then we will have d = D (selected downtime).
	K is a constant added to make sure that downtime 'd'
	is never equal to zero.

	The rationale for this patch is that moving linearly from
	the minimum to maximum downtime limit isn't very useful:
	if if we took 1s downtime for a migration that could complete
	with 0.1s downtime, that's very bad, but if we take 11s to
	complete a migration that could finish in 10s, it's not a
	big deal.

	So, it makes more sense to step towards the final hard limit
	exponentially rather than linearly.
	In addition, because most of the attempts will be much shorted
	than the final hard limit, it won't blow out the total time to
	complete migration nearly as badly.

	Please note that this patch still preserve an linear
	increment of the wait time.

	Along the way, we take the chance to bootstrap unit
	tests for vdsm/virt/migration.py.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1004101

2014-11-03  Yeela Kaplan  <ykaplan@redhat.com>

	oop: fix tests

2014-11-03  Ondřej Svoboda  <osvoboda@redhat.com>

	hooks: Add a hook to configure IPv6 networking through custom properties
	The hook forwards 'ipv6addr', 'ipv6gateway', 'ipv6autoconf' and 'dhcpv6'
	properties to the API.

2014-11-03  Yeela Kaplan  <ykaplan@redhat.com>

	tests: add unit tests for IOProcess per SD

2014-11-03  Saggi Mizrahi  <smizrahi@redhat.com>

	ioprocess: Have tests check ioprocess and not RFH

2014-11-03  Yeela Kaplan  <ykaplan@redhat.com>

	oop: Use a single instance of IOProcess per SD
	Next step after switching from RFH to IOPROC is to
	use a single IOProcess instance for each SD.

	Currently only a single IOProcess instance is used
	for all SDs.

	To avoid load on the system by holding many unused
	IOProcesses we will maintain dictionary:
	KEY - domainID, VALUE - (timestamp, IOPROC)
	When IOProc for domainID is used we will renew the
	timestamp, or delete the item from dictionary

	We will also maintain another dictionary:
	KEY - domainID, VALUE - IOPROC weakref,
	that will allow us to check if IOPROC obj is
	still alive or needs to be recreated.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1126206

	utils: Move functionality from storage.misc
	move persistFile into utils

2014-11-03  Liron Aravot  <laravot@redhat.com>

	schema: fix guest disk mapping versioning
	The guest disk mapping report feature is being merged to the ovirt-3.5
	branch now, as the current version is 4.16.8 the version on the master
	branch should be fixed as well.

2014-11-01  Petr Horáček  <phoracek@redhat.com>

	setupNetworks: doesn't remove broken nw from runningConfig
	This patch extends http://gerrit.ovirt.org/#/c/22354/:
	network/api.py:setupNetworks() removes broken networks - if network
	is not listed in netinfo, but it's in libvirt, _delBrokenNetwork()
	is called.

	The problem is that when the network doesn't have an existing device,
	we only remove it from libvirt and leave it in RunningConfig.

	TODO: this problem occurs on 3.4 with libvirt 1.2.9

	Now _delBrokenNetwork() remove broken network from runningConfig.

	NOTE: This patch doesn't handle the case, when the network is only in
	RunningConfig, not in libvirt, not in netinfo. This should be solved in
	a separate patch.

2014-11-01  Antoni S. Puimedon  <asegurap@redhat.com>

	openstacknet: Fix migration when using security groups
	When migrating, the destination libvirt receives an xml already
	altered by before_device_create like this test one:

	    <?xml version="1.0" encoding="utf-8"?>
	    <interface type="bridge">
	        <mac address="00:1a:4a:16:01:51"/>
	        <model type="virtio"/>
	        <source bridge="qbrtest_port_i"/>
	        <target dev="taptest_port_i"/>
	    </interface>

	The issue is that before_device_create hooking point is not part
	of the migration and it is the only thing that creates the security
	groups bridge and the necessary veths. In order to have migration
	working, then, it was necessary to add a hook that on the hooking
	point 'before_device_migrate' does the security groups bridge and
	veths creation.

	Bug-Url: https://bugzilla.redhat.com/1048880

2014-10-31  Petr Horáček  <phoracek@redhat.com>

	netinfo:nicSpeed(): fix nicSpeed condition
	In `if s not in (2 ** 16 - 1, 2 ** 32 - 1) or s > 0` first part doesn't
	make sense with OR. Changed to AND.

	I changed conditions to make the function more readable and created unit
	test, to be sure that function returns correct values.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1157224

2014-10-31  Martin Polednik  <mpolednik@redhat.com>

	devices: rename VideoDevice to Video
	No functionality changes, only naming

2014-10-30  Nir Soffer  <nsoffer@redhat.com>

	domain_descriptor: Use stable devices hash
	Commit af09a3ff50 changed the way we compute the devices hash. Before
	this commit, we used:

	    hash(devxml.toxml())

	And now we use:

	    hash(devxml)

	Hashing minidom xml element returns a different hash for objects with
	same xml content. It is possible that another libary will compute a
	correct hash from parsed xml, but we should not depend on this.

	tests: Start DomainDescriptor tests
	Adding some tests before fixing hashing implementation.

2014-10-29  Dan Kenigsberg  <danken@redhat.com>

	vdsm.config, vdscli: use function-like print statements
	Get ready for python3 support, some day.

2014-10-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix typo in test name

2014-10-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix attribute error on sebool is-configure
	The indentation was added wrongly in previous patch

2014-10-29  ibarkan  <ibarkan@redhat.com>

	relax the validation multiple networks on the same interface
	the only validation that is now left on the vdsm side is that there are
	no 2 networks using the same vlan tag that are connected to the same
	interface concurrently. Also, no 2 untagged networks can be connected to
	the same interface.

	Bug-Url: https://bugzilla.redhat.com/1049476

2014-10-29  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix random failures on el6
	The reject tests were relaying on the behavior in Fedora 20, but on el6
	the concurrent reject tests sometimes behaves differently. On Fedora 20,
	recv() was always returning an empty string, but on el6, sometimes
	socket.error "connection reset by peer" was raised.  Now both results
	are considered as disconnection.

2014-10-28  Mooli Tayer  <mtayer@redhat.com>

	tool: sebool is-configured when selinux is disabled will always be MAYBE
	Otherwise if selinux is disabled, we get an exception[1]

	[1]:
	>>> sebool_obj = seobject.booleanRecords()
	Traceback (most recent call last):
	  File "<stdin>", line 1, in <module>
	  File "/usr/lib64/python2.6/site-packages/seobject.py", line 2032, in __init__
	    semanageRecords.__init__(self, store)
	  File "/usr/lib64/python2.6/site-packages/seobject.py", line 240, in __init__
	    self.sh = self.get_handle(store)
	  File "/usr/lib64/python2.6/site-packages/seobject.py", line 267, in get_handle
	    raise ValueError(_("SELinux policy is not managed or store cannot be accessed."))
	ValueError: SELinux policy is not managed or store cannot be accessed.

2014-10-28  Francesco Romani  <fromani@redhat.com>

	tests: move more fakes into vmfakelib
	This patch move more Fakes into the common
	library, to avoid duplication and to give them
	better spotlight.

	Beside renames (e.g. FakeSuperVdsm -> fake.SuperVdsm)
	there are no code changes.

2014-10-28  pkliczewski  <piotr.kliczewski@gmail.com>

	ssl: ssl protocol configurable
	We make ssl protocol configurable in config.py.


	Bug-Url: https://bugzilla.redhat.com/1154184

2014-10-28  Mooli Tayer  <mtayer@redhat.com>

	tool: change enumeration naming.
	Suggesting a name change of isconfigured() return values:
	from: CONFIGURED, NOT_CONFIGURED, NOT_SURE
	to:   YES       , NO            , MAYBE

	tool: extend ModuleConfigurer documentation.

2014-10-28  Ondřej Svoboda  <osvoboda@redhat.com>

	vdsm: capture warnings in log only if supported
	python_warnings_enable is off by default but let's protect ourselves
	if we forget that logging.captureWarnings is not in Python 2.6

2014-10-27  ibarkan  <ibarkan@redhat.com>

	VDSM hook for random network allocation during VM power on
	This hook is useful in cases where one has a set
	of equivalent networks, and wants to distribute
	VMs evenly among them, so the networks share the
	traffic
	load.
	The more VMs allocated with networks, the
	tendency of VMs to be evenly distributed among
	networks rise.
	The hook uses CustomDeviceProperties and a property
	called 'equivnets' which is a whitespace separated list
	of network names. When the VM is started, a random
	network is allocated to it.

	Bug-Url: https://bugzilla.redhat.com/1065405

2014-10-27  Martin Polednik  <mpolednik@redhat.com>

	virt: move balloon device to vmdevices.py
	No real code changes

	virt: move watchdog device to vmdevices.py
	No real code changes

	virt: move tpm device to vmdevices.py
	No real code changes

	virt: move rng device to vmdevices.py
	No real code changes

2014-10-26  Dan Kenigsberg  <danken@redhat.com>

	testrunner: capture warnings in log only if supported

2014-10-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix use with wrong func name

2014-10-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	tool: moving setup booleans verb to be part of the configurators
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1157185

	Moving getSELinuxEnforeMode to utils

2014-10-24  Martin Polednik  <mpolednik@redhat.com>

	virt: move console device to vmdevices.py
	No real code changes

	virt: move smartcard device to vmdevices.py
	No real code changes

	virt: move redir device to vmdevices.py
	No real code changes

	virt: move sound device to vmdevices
	No code changes. This is part of ongoing effort to
	move virtual devices from vm.py to vmdevices.py.

2014-10-24  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: cannot put link down on vNIC
	There was no updateDevice method on VM object in the API module. The
	name was vmUpdateDevice which is in conflict with current schema.

	This method was missing from command_info so it was updated.

	Bug-Url: https://bugzilla.redhat.com/1156399

2014-10-24  Dan Kenigsberg  <danken@redhat.com>

	spec: janitorial: drop with_systemd_macros and with_tmpfiles
	Nowadays we can assume that /usr/lib/tmpfiles.d and systemd_macros exist
	whenever systemd does.

	spec: janitorial: drop references to fedora 18
	We no longer support anything below Fedora 19, so ancient complexities
	can be ignored.

2014-10-23  Francesco Romani  <fromani@redhat.com>

	virt: vm: sanitize earlier the 'smp' parameter
	In the VM creation path, in the Vm._run()
	method, we ensure the presence of the 'smp' parameter,
	which is used in the creation path to build
	the VM Domain XML to be fed to libvirt.

	However, parameter sanitization is better done earlier,
	so this patch moves the check in the Vm.__init__ method,
	and also adds a couple of tests to ensure the 'smp'
	parameter is correct.

	virt: migration: use running() for downtime thread
	Now that migration.DowntimeThread() conforms to the
	interface required by utils.running(), we can make
	use of this context manager and make the code a little
	nicer and shorter.

	virt: migration: avoid implicit thread start
	migration.DowntimeThread used to implicitely
	start() itself at the end of its __init__().

	This is bad practice, so this patch removes
	the implicit start and make the method be called
	when needed.

	virt: migration: rename cancel->stop method
	The most common meaning of  'cancel' is
	'halt operation and discard the current progress',
	which DowntimeThread doesn't do -and there is
	no point in doing.

	What cancel() method does is actually just halt
	the thread without affecting the output, so this
	patch renames the method to stop() in order
	to make it less surprising and and also consistent
	with migration.MonitorThread.

	Besides that there are no changes in behaviour.

	virt: migration: rename helper function
	rename helper function to be a bit more consistent
	with the new style guidelines.

2014-10-23  Vitor de Lima  <vdelima@redhat.com>

	caps: Additional ppc64 hardware information
	Includes extra information (manufacturer and product name) about ppc64
	hosts in the getVdsHardwareInfo command. This extra information is
	obtained from the device tree and skipped in case it is missing.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1149262

2014-10-23  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: introduce caching the parsed domain XML
	This patch replaces the repeatively parsed domain XML with a pre-parsed
	and cached implementation.
	Additionally it comes with convenience functions for accessing the devices
	sub-tree

2014-10-23  Martin Polednik  <mpolednik@redhat.com>

	virt: move controller device to vmdevices.py
	No real code changes

2014-10-23  Francesco Romani  <fromani@redhat.com>

	conf: sampling: drop unused tunables
	With the recent consolidation of disk stats
	and added support for one-item sample windows,
	a bunch of tunables has become obsolete.

	These tunables were already unsupported, so
	any configuration which was making use of
	them was likely already broken,
	so this patch just drops them.

	virt: sampling: use getLastSample
	This patch makes use of the new
	getLastSample method when a sample
	window is not needed.

	No intentional changes in behaviour.

	libvirt: do not always log failed libvirt calls
	The libvirtconnection module provides libvirt connection handling
	for VDSM. libvirt connection and domain objects have their callable
	methods transparently wrapped, to let VDSM automatically
	detect and react to disconnection.

	A side effect of this wrapping is that exceptions are intercepted
	before to be reraised and delivered to the caller, and a
	quite cryptic and not very informative message is logged for
	each exception.

	Given that the wrapper is -and has to be- generic, this logging
	has no choice in turn but to be generic, but this adds little
	value to logs, and surely adds noise and concern to the user.

	Proper action must be done in the client code, which must handle
	exception correctly and do whatever it is needed, maybe
	just log the error, maybe silencing it.

	So, this patch just drops the extra debug log.

	sampling: update module docstring
	Make sampling module docstring reflect reality.

2014-10-22  Francesco Romani  <fromani@redhat.com>

	vm: sampling: use collections.deque
	The AdvancedStatsFunction class uses a circular buffer
	of configurable size to store samples.

	The standard library provides us a simpler and faster
	recipe to achieve the same result with less code.

2014-10-22  Amador Pahim  <apahim@redhat.com>

	Configure iSCSI iface.net_ifacename
	When using multiple local devices in same subnet to have MPIO, we need to bind
	each iscsi session to a network device, otherwise system will choose any
	interface in the same subnet to use for the iSCSI session.

	Engine now sends the netIfaceName, which defines the network device to be used
	for each iscsi session. This patch enables vdsm to consume netIfaceName and
	configures iscsi iface accordingly.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112861

2014-10-22  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Unify log messages
	We stare at vdsm logs for hours, lets make it little nicer.

	protocoldetector: Avoid unneeded syscalls
	When cleaning up non-responsive connections, it is enough to get the
	current time once, and it also make the code little bit more clear.

	protocoldetector: Use values() instead of items()
	Iterating over items is useful when we need the keys, but we don't.

2014-10-22  Francesco Romani  <fromani@redhat.com>

	spec: fix libvirt dependency for fedora and RHEL7
	In commit 395c77c90c0bc we bumped the libvirt requirement
	to 1.2.3, which is found on RHEL 7.1 snapshots and
	in fedora 20 with virt-preview repos.

	This rules out RHEL 7.0 and Centos 7.0, thus a quite
	relevant part of users.

	This patch downgrades the libvirt requirements to 1.1.1
	both for rpm and deb based systems with the following
	rationale:

	* commit 395c77c90c0bc already has soft dependency and
	  could handle gracefully an old libvirt.
	* CentOS/RHEL 7.0 provides libvirt 1.1.1, so it is fine
	  out of the box. [1]
	* Fedora 19 has libvirt 1.0.5.8 by default, but the
	  virt-preview repo which already recommend provides
	  libvirt 1.1.3 [2]
	* Fedora 20 has libvirt 1.1.3 by default and libvirt 1.2.9
	  through the virt-preview repo. [3]

	References:
	[1] http://mirror.centos.org/centos/7/os/x86_64/Packages/
	[2] https://repos.fedorapeople.org/repos/crobinso/virt-preview/fedora-19/
	[3] https://repos.fedorapeople.org/repos/crobinso/virt-preview/fedora-20/

	Bug-Url: https://bugzilla.redhat.com/??????

2014-10-21  Nir Soffer  <nsoffer@redhat.com>

	protocoldetector: Introduce _close_connection
	In http://gerrit.ovirt.org/33982 we learned that having to both remove a
	connection and close the socket is error prone. We have 4 places where
	we do this, and one other place where we remove a connection, and close
	the socket only if detection failed.

	This patch simplifies the rules and removes duplicate calls to
	self._remove_connection() followed by socket.close() by introducing
	_close_connection(). _close_connection() is used for all fatal errors,
	and _remove_connection() is used only when detection is successful.

	Having this method, we can clean up connection handling around protocol
	detection. Previously we used to remove the connection before trying to
	detect the protocol, and if protocol detection failed, the socket was
	closed. This also fixes logging, so we first report that a protocol was
	detected, and then report that the connection was removed.

	protocoldetector: Remove connection after handshake error
	Commit e414fa9ff9 added support for asynchronous SSL handshake, but did
	not clean up properly after handshake error.

	Normally, the closed connection would be removed later by the periodical
	cleanup. However leaving closed socket registered with the poller is not
	a good idea.

	While verifying this fix, I found an unexpected failure mode - when
	trying to connect to vdsm using an http client instead of https. For
	example, this command:

	    vdsClient 0 getVdsCaps

	Causes a busy loop, handling write event on the *closed* socket, logging
	this error:

	    Detector thread::DEBUG::2014-10-10 00:13:29,709::protocoldetector::226
	    ::vds.MultiProtocolAcceptor::(_process_handshake) Error during
	    handshake: http request

	The busy loop ends after about 90 seconds, writing 1163139 errors and
	crating 175MB log.

	An interesting question is why do we get write events on a closed
	socket? Digging into M2Crypto source reveals that Connection.close()
	does *not* close a socket, and it is actually closed in __del__. Since
	we hold a reference to the connection, it is closed only when the
	connection is removed from the _pending_connections map. See
	https://github.com/M2Crypto/M2Crypto/blob/53d740ebd0fabf0346ebead4646b6f4a2e3ef782/M2Crypto/SSL/Connection.py#L63

	This patch removes the connection if the handshake fails, and ensures
	that we do not try to handle write event on a removed connection.

	The event loop is handling read event and write event on pending
	connections. If a connection is removed while handling a read event,
	there is no need to handle write event on the same fd.  This is a common
	problem with asynchronous event loops. asyncore had the same issue in
	older versions.

2014-10-21  Francesco Romani  <fromani@redhat.com>

	tests: ppc: fully fake arch for recovery tests
	In commit 8d03325348 we added a new recovery
	test, which will work on PPC64 as well as on
	X86_64, with basic unit tests.

	The tests were supposed to fake the underlying
	architecture, but they didn't fully.
	This patch completes the job.

2014-10-21  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Bridge.py reducing logging level
	There are two messages which are logged as warning but do not provide
	any value in production.


	Bug-Url: https://bugzilla.redhat.com/1151867

2014-10-21  Ondřej Svoboda  <osvoboda@redhat.com>

	tc tests: Fix compilation by adhering to and praising PEP8
	The syntax for block comments is now checked by pep8,
	which requires that (E265) block comment should start with '# '.

	Amends: I5f2d64c3dbc621f062274afb343ad56048b36180

2014-10-21  Nir Soffer  <nsoffer@redhat.com>

	protocolDetector: Remove unneeded poll flags
	Protocol detector was using uneeded poll flags in the eventmask; POLLHUP
	and POLLERR are output only, as documented in poll(2) and Python library
	reference:
	https://docs.python.org/2.6/library/select.html#select.poll.register

	POLLPRI is needed only to detect out-of-band data, which the other side
	can send using MSG_OOB flag, as documented in send(2). Since we don't
	use out-of-band data, we don't need to check for it.

	Since the READ_ONLY_MASK contains only select.POLLIN, and the
	READ_WRITE_MASK was used only once, they were removed.  Developers
	maintaing this code are expected to know these constants.

	tests: Add protocoldetector tests
	Add tests for protocoldetector.MultiProtocolAcceptor using both ssl and
	non-ssl transport.

2014-10-21  Dan Kenigsberg  <danken@redhat.com>

	network.api: use function-like print statements

	netinfo: drop unused graph() function

2014-10-20  Saggi Mizrahi  <smizrahi@redhat.com>

	vdsm-infra: zombie-reaper refactor
	In a general intent to better organize how infra libraries and utilities
	are organized.

	It uses zombie-reaper as a sample use case and adds documentation for it.

2014-10-20  Dan Kenigsberg  <danken@redhat.com>

	netinfo.getIpInfo: handle slashless address
	Apparently, 32 bit prefix is not reported within the address field.

2014-10-20  Saggi Mizrahi  <smizrahi@redhat.com>

	ioprocess: Move and reword rename() warning
	The warning was appearing even when people use the function in the
	correct manner.

	Let it be on the record that my original intent was to move the log line
	to only display when a non-empty directory is being renamed instead of
	every time.

	But one of the requirements from my reviewers was to use the warnings
	module instead making things more "correct" in the price of making the
	line itself useless as no one turns on warnings in VDSM and there
	is no way to atomically ignore warnings in a thread safe manner for
	parts of the code so we can't even turn them on. Also, warnings go to
	stderr by default which means that even if you turn them on no one will
	see them.

	Note: I only use the bug in the bug-url as it's partially related and it
	feels to trivial to get a new bug opened and acked.

	Bug-Url: http://bugzilla.redhat.com/1131867

	core: Add python warnings boilerplate
	In order to use python's built-in warnings module there some things you
	have to set up so they appear in the log.

	The options devel/enable_python_warnings in the config is responsible
	for turning the warnings on and is turned-off by defaults.

	Also enabled warnings for unit tests by defaults.

2014-10-20  Antoni S. Puimedon  <asegurap@redhat.com>

	tc tests: Fix icmp test frame to have payload
	In Ic6c5684ca8833807cf1dc05e9ccc4d97391c6168 I changed the original
	packet to have a proper long and nice description. I generated the
	frame with 'scapy' and I did not include any payload to ICMP.

	For some reason, the jenkins unit tests pass but on my machines it
	is causing the mirroring target not to see the frame. This patch
	fixes the issue.

2014-10-16  Nir Soffer  <nsoffer@redhat.com>

	multiapth: Disable hba rescanning by default
	Since commit 85d46e4572 we are scanning both iscsi bus and hbas when
	issuing multipath.rescan(). We did not find any bad effects when testing
	in our QE lab, but we have reports from customers that these rescans have
	bad effects on FC connections.

	This patch disables hba rescanning by default, so users can use this
	feature if works for them, until we investigate this issue and provide
	better solution.

	This should have been part of the original patch, since we cannot test
	all kinds of storage servers in the same setup and load used by all
	users. If hba rescanning cannot be used with certain storage server, it
	should be possible to disable this feature.

	Bug-Url: https://bugzilla.redhat.com/1152587

2014-10-16  Antoni S. Puimedon  <asegurap@redhat.com>

	nwfilter: Do not attempt to re-define the nwfilter when not undefining
	Undefining a filter is an operation that can fail. The fact that we
	had the same exception swallowing for two operations, looking up and
	discovering led us to the wrong assumption then of defining again the
	filter even when it had been looked up fine but could not be
	undefined.

	The most sensible behavior to take for 3.5 is to just consider the
	failure to undefine properly and re-define it only in the case of
	failure to look up.

	Bug-Url: https://bugzilla.redhat.com/1150718

2014-10-15  Saggi Mizrahi  <smizrahi@redhat.com>

	docs: remove old docs
	The don't even compile

2014-10-15  Martin Betak  <mbetak@redhat.com>

	vdsm: Add support for VIR_MIGRATE_COMPRESSED parameter
	Add support for configuring the VIR_MIGRATE_COMPRESSED migration
	parameter in libvirt to compress repeated pages.

	This flag enables the XBZRLE compresson of same memory pages which is
	beneficial for certain workloads, e.g. database server with many
	duplicate data in memory.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1151001

	vdsm: Add support for VIR_MIGRATE_AUTO_CONVERGE parameter
	Add support for configuring the VIR_MIGRATE_AUTO_CONVERGE migration
	parameter in libvirt forcing convergence of given live migration.

	This parmeter can be used when we want to guarantee convergence of
	migration even at the cost of incremental slowing down of the guest.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1151001

2014-10-15  Yeela Kaplan  <ykaplan@redhat.com>

	Change file() to open() continued
	Update file calls to open calls due to file's deprecation,
	and also use with statements to take care of closing files.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128715

	use with statement to take care of unclosed files
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128715

2014-10-15  Dima Kuznetsov  <dkuznets@redhat.com>

	open: Change file() to open()
	Update file calls to open calls due to file's deprecation.

	This patch does not convert all calls, more patches will follow.

	Relates-To: https://bugzilla.redhat.com/show_bug.cgi?id=1128715

2014-10-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix patchDecorators so decorated function will actually run
	Commit 5c5a0d9c5 introduced a fancy decorator for cleaning up the mess
	when we monkey patch conifguratiors. Unfortunatly, this decorator has an
	unexpected side effect, of *not* running the decorated function, so the
	test would always pass, even if the code is broken.

	This patch replaces this decorator with a much simpler one that let the
	real decorator (MonkeyPatch) do the right thing.

2014-10-14  Dan Kenigsberg  <danken@redhat.com>

	net: source route: don't attempt to configure invalid values
	If a DHCP server provides Vdsm with invalid ip/netmask/gateway supervdsm
	logs a not-very-useful

	    "ipaddr, mask or gateway not received"

	Instead, this patch logs dhclient's faulty information before passing it
	to the source route configurator, which hopefully would provide the
	local admin more clues regarding the failure.

2014-10-14  ibarkan  <ibarkan@redhat.com>

	Functional test for Multiple Gateways source routing
	adding assertions on the source routing definitions that are configured
	when the network is configured with DHCP.

2014-10-14  Nir Soffer  <nsoffer@redhat.com>

	supervdsmServer: Do not use udev to set permissions on external luns
	Before plugging external luns to vms, we setup up a temporary udev rule
	for setting device permissions. Using this rule will cause the device to
	loose the libvirt selinux label if a device has a change event.

	This is the same issue we had with vdsm images, but with external luns
	we do not trigger change events, so the issue is unlikely. However, if
	it happens, it will cause a vm to pause.

	This patch applies the same fix, use chown instead of udev USER and
	GROUP directives.

	Relates-To: http://gerrit.ovirt.org/33875
	Relates-To: https://bugzilla.redhat.com/1147910

2014-10-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding pkgs version details to POWERKVM os
	In getCaps vdsm does not report about qemu-* libvirt mom and kernel rpms
	versions over PPC arch.
	Same as other rhel\fedora dists, the rpms are named the same.
	Therefore this patch adds the same handling to POWERKVM arch.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1151488

2014-10-13  Martin Polednik  <mpolednik@redhat.com>

	vdsm: introduce hostdev module
	Hostdev module serves the purpose of encapsulating functions
	related to reporting, acquiring and releasing host devices
	(nodeDevices in libvirt terms)

2014-10-12  Mooli Tayer  <mtayer@redhat.com>

	tool: fix typo 'environemnt'->'environment'

	toolTests: change mock objects creation.

	toolTests: change boolean logic.
	1. change  should_fail to should_succeed.
	2. change
	if !should_fail:
	    return True
	return False

	to:
	return should_succeed

2014-10-12  Federico Simoncelli  <fsimonce@redhat.com>

	task: remove unused canAbortRecover

2014-10-12  Nir Soffer  <nsoffer@redhat.com>

	assert: Replace asserts with validation function
	Replace 2 asserts for number of arguments with exiting validateArgTypes
	function, that raise a clear error instead of the cryptic assert.

	Another assert was removed as the code already used validateArgTypes
	just after it.

2014-10-12  Mooli Tayer  <mtayer@redhat.com>

	toolTests: clean leftover debug output.

2014-10-10  Petr Horáček  <phoracek@redhat.com>

	`tc qdisc del device x ingress` changed err code
	In new kernel, operation `tc qdisc del device dummy_x ingress`
	changed error code of 'no ingress exists' from EINVAL to ENOENT.

	CentOS 6.5
	$ ip link add dummy_ni type dummy
	$ tc qdisc del dev dummy_ni ingress
	RTNETLINK answers: Invalid argument

	Fedora 20
	$ ip link add dummy_ni type dummy
	$ tc qdisc del dev dummy_ni ingress
	RTNETLINK answers: No such file or directory

	Now qos.py:_fresh_qdisc_conf_out() ignores ENOENT too.

2014-10-10  Francesco Romani  <fromani@redhat.com>

	sampling: document block stats libvirt flag
	Document why we use the cryptic VIR_TYPED_PARAM_STRING_OKAY.

	Comment-only, no code changes.

	virt: sampling: consolidate disk statistics
	We used to have two different sampling, and thus two
	libvirt calls per sampling, per disk.
	One sampling gathers basic disk data and R/W rate;
	the other one gathers the disk latency.

	Most often, as the default values are unchanged, the
	configuration for these sampling is identical, so it is safe
	and cheaper to read all the needed information in one go,
	saving one libvirt call without losing any information.

	These sampling uses two different libvirt calls.
	sampleDisk, which gathers the disk I/O rate, uses the older
	virDomainGetBlockStats call;
	sampleDiskLatency, which gathers disk latency, uses the newer
	and more flexible virDomainGetBlockStatsFlags;

	Inside libvirt, these two calls are implemented on top
	of the same QEMU monitor function (qemuMonitorGetBlockStatsInfo).
	The newer call returns all the data gathered by the QEMU monitor,
	while the older call returns just a subset of it.

	Other differences in the API exists, like the return type
	and the presence of the flags, but those can safely be considered
	of no interest for VDSM.

	virt: stats: make _calcDiskRate a function
	used to be a method, but never uses 'self',
	so make it a function.

	No changes in behaviour, except the drop of the
	unused 'self'.

	virt: sampling: extract disk latency calculation
	This is a preparation patch for the merge
	of sampleDisk and sampleDiskLatency

2014-10-10  Vitor de Lima  <vdelima@redhat.com>

	caps: Report online logical CPUs
	Introduces a new information in the capabilities command which reports
	the list of logical CPUs that are online during its execution.

	This is necessary because the kernel allows logical CPUs to be disabled
	and enable on-the-fly, and ppc64 hosts have only one enabled logical
	CPU per core and several CPU threads disabled. So this patch is needed
	in order to validate CPU pinning configurations and count the number of
	logical CPUs properly.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1148092

2014-10-09  Federico Simoncelli  <fsimonce@redhat.com>

	utils: remove return redundant parenthesis

2014-10-08  Nir Soffer  <nsoffer@redhat.com>

	lvm: Do not use udev to set permissions on vdsm images
	udev has changed the rules recently, so setting USER, GROUP, or MODE
	will change also the selinux label behind your back. This issue caused
	vms to pause after extend, rendering thin provisioning disk useless.

	We had a temporary fix, applying a static selinux label on vdsm images,
	but this breaks libvirt security. This patch avoids this issue by not
	using udev to set any permissions, thus preserving the secure selinux
	labels set by libvirt.

	This patch replaces the following commits with a simpler and hopefully
	longer lasting fix which does not need any platform specific code.

	d8d6c17 gitignore: Ingore vdsm-lvm.rule.tpl
	00fbc83 lvm: Modify lv selinux label only if not labablled as libvirt image
	b2268e4 spec: Enable lvm selinux fix for Fedora
	75fc495 lvm: Set libvirt image selinux label on block devices backing vdsm images

	Bug-Url: https://bugzilla.redhat.com/1149883
	Relates-To: https://bugzilla.redhat.com/1147910

	tests: assertIsNone is not available on Python 2.6
	This patch fixes the build on jenkins EL6 slaves.

2014-10-08  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: typo: unlink is in os not in os.path
	When this code path was reached it caused an exception and left the VM
	during recovery in 'PAUSED' state and all communication with the guest
	was no longer available.

	Bug-Url: https://bugzilla.redhat.com/1136982

2014-10-07  Vitor de Lima  <vdelima@redhat.com>

	vm: Fix error with missing cdrom in conf
	Avoids referencing the cdrom parameter in conf in case it is missing.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1145728

2014-10-07  Francesco Romani  <fromani@redhat.com>

	sampling: allow window=1 in AdvancedStatsFunction
	A few sampling functions do not need a real sampling window,
	yet they are forced to use window=2 because it is the minimum
	allowed size.

	This patch adds support for the window=1 special case, and a new
	method to fetch the sample on this case, because the existing
	API does not fit really well.

	This patch also adds the initial wave of unit tests for
	AdvancedStatsFunction.

2014-10-07  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: default args values in wrong order
	Default arguments values of a method were passed in wrong order due to
	wrong if condition.


	Bug-Url: https://bugzilla.redhat.com/1148499

2014-10-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	Signs vdsm upgraded version for special treatment if required
	In ovirt-3.2 (vdsm 4.10.x) we didn't perform vdsm-tool configure call
	during uninstall. This cause failure on first vdsm run if configure is
	required. This patch signs during pre installation the upgraded
	package version by creating a file with the version string.
	During init script we read this file and determine the required
	operation. This patch only adds the treatment for 4.10.x which will
	perform vdsm-configure call. After handling the upgrade we will remove
	the file to avoid running the same operation on next reset.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1111935

2014-10-06  Saggi Mizrahi  <smizrahi@redhat.com>

	protocol_acceptor: Make SSL handshake asynchronous

2014-10-06  Nir Soffer  <nsoffer@redhat.com>

	volume: Log the correct error when creating a volume fails
	When a volume creation failed because of CannotCreateLogicalVolume
	exception, we used to lie and log "volume already exists". This log
	confused and wasted many developers hours. Now we log the exception
	value instead.

	Bug-Url: https://bugzilla.redhat.com/1143830
	Relates-To: https://bugzilla.redhat.com/1142710

2014-10-06  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfotests: Do not assume the existence of /var/lib/vdsm/bonding-defaults.json
	The cached bonding defaults file is not available before installation
	so it cannot be used in 'make check'. Use the one from the source tree
	in this case.

2014-10-06  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Cleanup logging
	- Use INFO level for the important state change message, and uppercase
	  VALID and INVALID for extra visibility.
	- Add few debug messages that may help debugging.
	- Replace non-standard exc_info with logging.exception.
	- Simplify messages text and remove unneeded words.

2014-10-03  Martin Polednik  <mpolednik@redhat.com>

	vdsm: refactor has_channel using etree
	has_channel is a helper function currently located in vmxml,
	which decides whether channel with given name exists in domain's
	xml. This patch refactors this function to use dom and adds simple
	test to verify it is acting as before.

2014-10-03  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: remove obsolete getVolumePath verb
	We can remove the getVolumePath verb as it was never officially in use.

2014-10-03  Martin Polednik  <mpolednik@redhat.com>

	virt: move general devices to vmdevices
	No code changes. This is part of ongoing effort to
	move virtual devices from vm.py to vmdevices.py.

2014-10-02  Dan Kenigsberg  <danken@redhat.com>

	kaxmlrpc: fix ancient comment text

2014-10-02  Nir Soffer  <nsoffer@redhat.com>

	volume: Fix exception re-rasing
	When re-raising and excepition, the correct way is:

	    raise

	And not:

	    raise e

	The later form create a new useless traceback, strating at the point were the
	exception was re-raised:

	    Traceback (most recent call last):
	      File "raise.py", line 14, in <module>
	        raise e
	    Exception: testing

	Instead of the original traceback, showing the original call stack:

	    Traceback (most recent call last):
	      File "raise.py", line 11, in <module>
	        a()
	      File "raise.py", line 2, in a
	        b()
	      File "raise.py", line 5, in b
	        c()
	      File "raise.py", line 8, in c
	        raise Exception("testing")
	    Exception: testing

2014-10-02  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving python_sitearch to python_sitelib
	VDSM uses pure python code, therefore there is no need to use
	specific sitearch at all while installation vdsm-python files

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1141669

2014-10-01  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: mssing verbs in command info
	Missing clone image structure and image sync data in command info.


	Bug-url: https://bugzilla.redhat.com/1148498

	ssl: ssl_accept blocks after reboot
	When rebooting host most of the times ssl_accept blocks when there is
	new connection established just after socket is opened. Setting timeout
	on socket seems to help but when testing I noticed sometimes there is
	still connection blocked on ssl_accept.

2014-10-01  Nir Soffer  <nsoffer@redhat.com>

	gitignore: Ingore vdsm-lvm.rule.tpl
	In a previous commit I forgot to add this new template to the ignore
	list, which breaks the build. I will be punished for this.

	lvm: Modify lv selinux label only if not labablled as libvirt image
	When using the faulty version of systemd that removes libvirt image
	labels from block devices, this patch has no effect. However when a fix
	is available and libvirt image label exists, vdsm will not change the
	original libvirt label. This allows the increase protection for virtual
	machines.

	Bug-Url: https://bugzilla.redhat.com/1127460

	spec: Enable lvm selinux fix for Fedora
	In case we cannot get the real fix in systemd quickly, this patch
	enables the temporary hack on Fedora.

	Bug-Url: https://bugzilla.redhat.com/1127460

	lvm: Set libvirt image selinux label on block devices backing vdsm images
	The SELinux sVirt protection for QEMU virtual machines is setup in such
	a way that a domain can only access files or devices which are labelled
	svirt_image_t label. Libvirt sets this label on block devices backing
	images when it starts a vm.

	On Fedora 19, 20 and EL 7, the selinux label on the block device is lost
	after refreshing a logical volume.  The root cause of this issue is
	systemd-udevd, trying to "preserve" the selinux label upon device change
	event.

	Loosing the selinux label causes the vm to pause. The only way to use
	the vm is to restart the vm.  Practically, this breaks thin provisioning
	on block storage, since after each automatic extend, a logical volume
	must be refreshed.

	This patch adds a temporary hack, by updating vdsm lvm rules to set the
	libvirt image selinux label on vdsm images. This change should be
	reverted when a fix is available in systemd-udevd.

	This hack is enabled by default only for EL7, since we hope to get a
	fix for systemd-udevd soon for Fedora.

	To enable this hack on other platforms:

	    ./configure --enable-chcon-hack

	Bug-Url: https://bugzilla.redhat.com/1127460
	Releates-To: https://bugzilla.redhat.com/1147910

2014-10-01  Francesco Romani  <fromani@redhat.com>

	virt: sampling: more cautious disk stats check
	In commit d6d0eb763e623 we changed the disk stats
	collection to deal with the benign case of
	known-missing disk stats samples, to avoid add
	bogus error on the logs.

	Unfortunately a case was missing in the live
	storage migration flow, which causes

	TypeError: argument of type 'NoneType' is not iterable

	in the logs defeating the purposes of the
	originating change.
	This patch fixes this issue by adding the missing
	check.

2014-09-30  Antoni S. Puimedon  <asegurap@redhat.com>

	addNetwork script: Prevent empty bond and vlan from reaching RunningConfig
	The consumers of the addNetwork script pass empty parameters, e.g. ""
	in order to fill the positional arguments that the script takes. The
	problem with that is that those parameters were being passed to
	addNetwork without modification, and that includes the
	_alterNetworkConfig wrapper that makes addNetwork requests reach
	runningConfig (and eventually PersistentConfig).

	Due to the issue above, a stored network could contain entries like
	'bonding': '' and 'vlan': '' that would mess with selective network
	restoration.

	Bug-Url: https://bugzilla.redhat.com/1144639

	vdsm_reg: Make vdsm-reg persist the management bridge it creates
	In the vdsm_reg flow, for the oVirt node, the management bridge is
	created using addNetworks. This puts the management network in the
	RunningConfig ( /var/run/vdsm/netconf/nets ). Then it notifies the
	engine of the registration request.

	When the engine approves the request, it starts the deployment, part
	of which is to start vdsmd. In the common init tasks of vdsmd there is
	the restore_nets task that, if /var/run/vdsm/nets_restored does not
	exist, it will clear all the networks in RunningConfig and configure
	again those in PersistentConfig. The issue is that in a clean
	installation there won't be any PersistentConfig, and thus the system
	will lose connectivity.

	In order to solve this issue, the best course of action is to persist
	RunningConfig as PersistentConfig as soon as the management network
	has been created by vdsm-reg (and strictly before the registration
	request is sent to the engine).

	Bug-Url: https://bugzilla.redhat.com/1144639

2014-09-30  Mooli Tayer  <mtayer@redhat.com>

	toolTests: Fix undefined name usage introduced by 32713.
	pyflakes complained:
	./tests/toolTests.py:309: undefined name 'Libvirt'.

2014-09-30  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: hotunplug spelling issue
	Bug-Url: https://bugzilla.redhat.com/1147458

2014-09-30  Mooli Tayer  <mtayer@redhat.com>

	tool-tests: use variable from conf version in template files.
	Replace LATEST_CONF_VERSION with current value from libvirt configure.

	This will save having to update all toolTests_*.conf files each
	time we bump a version.

2014-09-29  Nir Soffer  <nsoffer@redhat.com>

	spec: qemu-img is required during the tests
	The tests use vdsm/qemuimg module, which checks where qemu-img is
	located. We can probably mock it but it does not seem worth the effort.

	spec: Sort BuildRequires sections

2014-09-29  Mooli Tayer  <mtayer@redhat.com>

	tool: remove AUTHOR from vdsm-tool manual page.
	"lists authors of the documentation or program.  Use of an AUTHORS
	section is strongly discouraged.  Generally, it is better not  to
	clutter  every  page with a list of (over time potentially numer‐
	ous) authors; if you write or significantly amend a page,  add  a
	copyright notice as a comment in the source file.  If you are the
	author of a device driver and want  to  include  an  address  for
	reporting bugs, place this under the BUGS section."

	see "man 7 man-pages" from the man-pages package .

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1146469

2014-09-29  Ondřej Svoboda  <osvoboda@redhat.com>

	vdsm: No need to 'import threading'
	This fixes the build after "vdsm: making PM 'on' and 'off' sync".

	netinfo, tool: Add a vdsm-tool to determine bonding defaults offline
	dump-bonding-defaults reads bonding option defaults (per mode) and saves them
	to /var/lib/vdsm/bonding-defaults.json. VDSM loads the file once at runtime
	and refers to this static information of defaults when reporting bonding
	options of bonds in the system.

	As the bonding defaults are bound to the used kernel it is the responsibility
	of the packager (or the sysadmin in customized setups) to regenerate the file
	by running (during the build, or installation, respectively):

	vdsm-tool dump-bonding-defaults

	It is currently not advised to run the tool on startup because NetworkManager
	may ifup the reference bond, making the tool unable to determine all options.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1142701

2014-09-29  ndarshan  <dnarayan@redhat.com>

	gluster: Temporary fix for supervdsm memory leak.
	     Supervdsm memory leak is caused by memory leak in libgfapi
	(BZ:1093594) which is used by verb glusterVolumeStatsInfoGet to
	retrive the volume statistics. The libgfapi method glfs_fini()
	is not cleaning up the memory, so everytime the verb is invoked
	memory gets added up(~20-30MiB). This verb is invoked by engine
	every 5 minutes for volume capacity feature. So supervdsm memory
	usage shoots up when gluster is enabled.

	    This patch provides a temporary fix until libgfapi issue is
	resolved. In this patch libgfapi method calls are executed as
	script using execCmd(), by this libgfapi invocation is not part
	of supervdsm process.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1142647

2014-09-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix typo in filename - ibm_powerkvm-release
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131965

2014-09-29  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Move private functions to end of module
	_supports_qcow_compat() is a private helper and should be after public
	functions.

	tests: Add tests for qcow2 comapt option when converting images
	Since qemuimg.convert() uses utils.watchCmd instead of utils.execCmd,
	FakeExecCmd was modified so it can patch both functions.

	This patch is separate from the actual fix, to allow easy backporting of
	the actual fix, without backporing the testing infrastructure, which is
	missing in older versions.

	Relates-To: https://bugzilla.redhat.com/1139707

	qemuimg: Create qcow2 compat 0.10 images when converting existing images
	Commit 1f7c3ac2c handled only creation of new images. This patch adds the
	required -o compat=0.10 option when converting existing images.

	_supports_qcow2_compat() accepts a command argument and invokes the
	specific command to detect if the compat option is supported.

	Bug-Url: https://bugzilla.redhat.com/1139707

2014-09-29  Eli Mesika  <emesika@dhcp-0-211.tlv.redhat.com>

	vdsm: making PM 'on' and 'off' sync
	Consider the following scenario:

	DC1 with H1 (with PM) and H2 on cluster C1
	another host H3 on DC1 cluster C2

	When we are blocking the communication with iptables from H2 to H1 PM
	card and use the default proxy preferences (cluster, dc) a Restart
	operation will always fail.

	VDSM should perform start/stop sync and return the correct script
	returned code in order that engine will know that H2 fails to perform
	the operation and will try to use H3 as a proxy for the failed operation

	This patch changes the fenceNode function to be sync when 'on' 'off'
	operation are used in the same manner of 'status' operation and return
	the correct exit code of the invoked fencing script to the caller.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1139643

2014-09-26  Dan Kenigsberg  <danken@redhat.com>

	spec: do not require qemu-kvm-rhev on Fedora
	qemu-kvm-rhev is required for oVirt's feature completeness. However it
	is not shipped within Fedora. When Vdsm is built for Fedora, we cannot
	require it. However, when built for oVirt and downstream RHEV, it is
	simpler and nicer to have a strict hard requirement.

	spec: split qemu-kvm* requirement to its own %if
	qemu-kvm* dependency is about to become even more complex, and as such
	it is granted a special %if section.

2014-09-26  Ondřej Svoboda  <osvoboda@redhat.com>

	ipwrapper.addrFlush: flush only globally routable addresses
	Link-local address must be kept for DHCPv6 support.
	This patch makes iproute2 configurator play nice so
	even after removing a network from an interface it is
	still usable for DHCPv6.

	Fixes: I5708c4db6f6d450536bd243a0475164b89f46f93

2014-09-25  Dan Kenigsberg  <danken@redhat.com>

	spec: allow all archs in Fedora
	As long as Vdsm is in Fedora, its Fedora build must abide to the rules
	and allow building on all supported Fedora architectures.

	Bug-Url: https://bugzilla.redhat.com/1141669

	hook: noipspoof: consume libvirt's clean-traffic filter
	This hook converts all vnic filters of a VM to the clean-traffic filter.
	The list of valid IP addresses is specified as a VM-wide custom
	property.

	A VM-wide custom property has been chosen since Engine does not allow
	setting per-VM vnic properties (but rather only vnic-type ones).

2014-09-25  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Error out if we failed to change a bond's mode
	This is currently caused by NetworkManager (even with a 'server'
	configuration). Please see BZ 1136843.

	Also check for the failure in a unit test.

2014-09-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: avoid require numactl to some platforms
	Avoid numactl issues with s390, s390x, arm platforms.
	Patch provided by Cole Robinson <crobinso@redhat.com>.

2014-09-24  ndarshan  <dnarayan@redhat.com>

	gluster: Fix for build failure when with_gluster=0
	Currently vdsmapi-gluster-schema.json file is not collected
	by anything when built with_gluster=0, which is causing build
	failure. Modified spec to exclude vdsmapi-gluster-schema.json
	file when gluster is not enabled.

2014-09-23  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: validate storage pool in prepareImage
	If the storage pool is specified (non-blank) we should validate that
	we're connected.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1130995

	sd: IncorrectFormat cannot be decoded
	If the volFormat and/or preallocated parameters are not within the
	supported values it's most likely impossible to try and convert them
	into names.

2014-09-22  Liron Aravot  <laravot@redhat.com>

	vm, guestagent: return hash should include also the disk mapping

	vm: return diskMapping on status()
	status() is used by API.Global.getVMList and should return also the disk
	mapping retrieved by the guest agent.

2014-09-21  Martin Perina  <mperina@redhat.com>

	fence: Fix description and JSONRPC marshalling for fenceNode API
	1) Fixes description of fenceNode return value
	2) Fixes marshalling of fenceNode return value for JSONRPC

	Bug-Url: https://bugzilla.redhat.com/1143860

2014-09-19  Antoni S. Puimedon  <asegurap@redhat.com>

	make the promisc property compliant with old pyflakes
	el6 pyflakes is older than the addition of setters and deleters for
	python class properties. Thus, it wrongly detects the syntax:

	    @x.setter
	    def x(self, value)

	As a redefinition of x. Thankfully, it is possible to use
	the property builtin to achieve the same result without being
	flagged as re-defining.

	Bug-Url: https://bugzilla.redhat.com/1134851

2014-09-18  Martin Sivak  <mars@montik.net>

	Do not reference qemu hook on RHEL 6 in spec file
	The previous patch skips the qemu hook installation on RHEL 6,
	but still references it in the %files section.

	This fixes that.

	Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1138340

2014-09-18  Dan Kenigsberg  <danken@redhat.com>

	drop dead ksmtuned-related code
	mom has replaced ksmtuned completely, and is expected to be running
	whenever Vdsm is. We can safely remove the unused ksm module.

2014-09-18  Martin Sivak  <msivak@redhat.com>

	Add a libvirt migration hook to filter out min_guarantee element
	libvirt removed the silent support for min_guarantee element.
	That will break migrations of long running machines and
	resume of machines that were paused with the element still
	in their XML.

	VDSM was updated and new machines won't contain the offending
	element. This fix will remove it when a running machine is migrated
	or resumed.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138340

2014-09-18  Petr Horáček  <phoracek@redhat.com>

	pyroute2: IPv6 support
	IPv6 support added to pyroute2 configurator.

2014-09-18  ndarshan  <dnarayan@redhat.com>

	gluster: Fix for json-rpc issue wrt gluster commands.
	This patch adds spec file entry for missing apiwrapper
	module and moved vdsmapi-gluster-schema.json from
	vdsm/gluster/ to vdsm/rpc/.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1124481

2014-09-17  Nir Soffer  <nsoffer@redhat.com>

	tests: Unify fake execCmd mechanism
	qemuimg tests were using two mechanisms for faking utils.execCmd. The
	old one was supporting faking a single command, no arguments validation,
	and no way to control the retruned values of the call. This also used
	textwrap module and partial functions where simpler ways can be used.

	Now all tests are using the new mechanism, supporting:

	- faking multiple commands, (e.g. call foo and then call bar based on
	  foo return value)
	- checking input arguments (e.g. was it called with -foo "bar"?)
	- returning any value from the call (e.g return 0, '', '' on success,
	  or return 1, '', 'error' on errors).

	Sine this change requires rewriting of all the tests, I also normalized
	the tests names to pep8 style, as they were very hard to read. This
	could be a separate patch, but I don't think we would like to waste time
	reviewing and verifying another patch for this.

2014-09-17  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: sslerror during accept should be logged on warning
	We need to log sslerror which happened during accept using warning
	level. Logging it on error may be confusing to users.

	Bug-Url: https://bugzilla.redhat.com/1141850

2014-09-17  Petr Horáček  <phoracek@redhat.com>

	network/api.py: delete network's orphans + test
	When addNetwork fails on ifup, it leaves orphan devices.

	setupNetworks function is changed to remove leftovers in case of
	addNetwork's ConfigNetworkError with code ERR_FAILED_IFUP.

	testHonorBlockingDhcp tests for bridge leftovers.
	testNetworksEmergencyDevicesCleanup tests for leftovers of more
	complex network which overwrites existing devices.

	Two/four added tests takes almost five minutes so they (and
	testHonorBlockingDhcp) are marked as @slowtest.

	pyroute2: use pyroute2's routes handling
	Use pyroute2's routes handling instead of ipwrapper.

	pyroute2: DHCPv6 support
	DHCPv6 support added to pyroute2 configurator.

2014-09-17  Francesco Romani  <fromani@redhat.com>

	tests: split tests fakes in a module
	For the VM tests, we gathered a fair amount of Fake
	helper objects. Is time to move them in a module,
	in order to make it simpler for the other tests
	to use them, and also to avoid to vmTests.py
	become another vm.py, before it's too late.

	Code changes are limited to renaming
	* for better clarity; or
	* to avoid redundancy or name clashing.

2014-09-17  Nir Soffer  <nsoffer@redhat.com>

	qemuimg: Create qcow2 compat 0.10 images
	Recent qemu versions introduced a new default qcow2 format (1.1), which
	is not compatible with older versions of qemu. For example, EL6 host
	cannot create snapshots if an image was created on EL7 host.

	This patch uses the "compat" option to create images in the older format
	(0.10), which are are compatible with different versions of qemu.

	The "compat" option is not available on older qemu-img, so we have to
	use the "-o ?" option to detect the availability of the "compat" option
	before creating an image. This is the same method used by libvirt.

	When all supported platforms provide the "compat" option, we can remove
	the "compat" detection code. Chanding the compat version will require
	a new storage domain format.

	Bug-Url: https://bugzilla.redhat.com/1139707

2014-09-16  Francesco Romani  <fromani@redhat.com>

	vm: always log when guest CPU state changes
	In order to improve debuggability of VDSM,
	add a log when the guest CPU state changes.

	Since this event is supposed to be sporadic,
	this will not add noise to the logs.

	Relates-To: https://bugzilla.redhat.com/1131548

	test: fix typos and repair vmTests
	A couple of errors sneaked into master after commit 2ec1f8e7cb8c
	likely because automation test has whitelisting to avoid excessive load.
	This patch fixes that.

2014-09-16  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: wrong usage of optional arguments in ctor
	When ctor arguments are marked as optional in schema the code compares
	argument names with '*' from schema with request names without '*'.
	This behavior result in passing wrong number of arguments to a method.


	Bug-Url: https://bugzilla.redhat.com/1141510

2014-09-16  Francesco Romani  <fromani@redhat.com>

	vm: declass warning for unsupported pause code
	When VDSM starts, it resyncs the VM state with libvirt.
	Unfortunately, libvirt does not provide yet all the
	informations VDSM needs, most notably the pause reason
	if a VM was paused.
	Thus VDSM spews a warning about that.

	We have bugs filed to the relevant dependencies since
	a few months, so it's time to declass this warning
	to a less worrysome message.

	Related-To: https://bugzilla.redhat.com/1129587

	tests: vm: add unit tests for setBalloonTarget

	vm: graphdev: fix device hooks post migration
	the _deviceXML attribute was not regenerated on
	destination VM after migrations.

2014-09-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Use more clear name
	false_mock is misterious name, specially when used as false_mock=False.
	Reading the code reveal that false_mock=True means that the mock should
	fail. Hopefully renming it to should_fail will make this more clear.

	When creating a mock, using optional argument notation "should_fail=True"
	is more clear then just "True".

2014-09-15  Petr Horáček  <phoracek@redhat.com>

	getRoute verb added
	New verb in vdsClient `getRoute <ip>` returns name of the device
	assigned to IP. It uses `ip route get <ip>`.

	Bug-Url: https://bugzilla.redhat.com/1117303

2014-09-15  Fabio Pliger  <fabio.pliger@gmail.com>

	vm: implement VM.sdIds as read-only property
	Changed the VM object sdIds list attribute. It used to be a list that
	kept a copy of the storage domains in use in an additional list (with
	all the difficulties of keeping the list in sync). That list has been
	replaced with a property that returns the storage domains in use
	getting them directly from the the vm devices in use.

	Relates-To: https://bugzilla.redhat.com/1094518

2014-09-15  Antoni S. Puimedon  <asegurap@redhat.com>

	tc: Integrate Host QoS with network deletion via setupNetworks
	This patch makes it possible to leverage the network.tc package
	to remove outbound Host network Quality of Service.

	When deleting the last shaped network of a device the qdiscs will
	be deleted so that they go back to being the kernel default (just
	a single pfifo_fast, at the moment).

	tc: Integrate Host QoS with network addition via setupNetworks
	This patch makes it possible to leverage the network.tc package to
	configure outbound Host network Quality of Service. The following
	patch should add support for deleting the QoS entities when deleting
	the associated network.

	It is not legal to configure a shaped network over a device that
	backs a non shaped network and vice-versa.

	One can configure it just like this:

	    In [1]:from vdsm import vdscli
	    In [2]: c = vdscli.connect()
	    In [3]: c.setupNetworks({
	        'bar':{'nic': 'eth1',
	        'qosOutbound': {
	            'ls': {'m1': 4 * 1000 ** 2,
	                   'd': 100 * 1000,
	                   'm2': 3 * 1000 **2},
	            'ul':{'m2': 8 * 1000 ** 2}},
	        'defaultRoute': False,
	        'bridged': False,
	        'vlan': 11}}, {}, {'connectivityCheck': False})
	    Out[3]: {'status': {'code': 0, 'message': 'Done'}}
	    In [4]: c.getVdsCapabilities()['info']['networks']['bar']['qosOutbound']
	    Out[4]:
	    {'ls': {'d': 100000.0, 'm1': 4000000000.0, 'm2': 3000000.0},
	     'ul': {'d': 0, 'm1': 0.0, 'm2': 8000000.0}}

	net_models: make network hierarchies iterable
	network hierarchies are tree-like data structures that contain all
	the devices in a network. It is useful to be able to iterate through
	the 'tree' in order to retrieve hierarchy properties such as vlan
	tag and backing device (nic or bond) of the network topology.

	This patch adds that with proper unit tests.

	tc_wrapper: Fix errno parsing for multiline error text
	Sometimes tc appends an extra text after the parseable error. E.g.:

	    RTNETLINK answers: Invalid argument\nWe have an error talking to the kernel\n

	This patch makes it possible to handle such cases

	QoS: Remove broken libvirt-based host network QoS
	Back when the current host network level QoSa was added, it was
	thought that libvirt had a way of configuring and honoring the
	Quality of Service definitions that we were giving it. Unfortunately
	that was an unimplemented part of their api, which forced us to
	design a new implementation with different semantics.

	This patch removes most of the host based network QoS implementation
	from the codebase to prepare vdsm for the following patches which
	will use the new tc package to provide outbound host network QoS.

	tc: add command line wrappers for qdiscs, classes and filters
	Up until now there were ad-hoc wrappers in __init__.py for the cases
	in which we needed to perform an operation.

	This patch adds to each of the entities modules:
	    - cls
	    - filter
	    - qdisc
	some more generic operations:
	    - add (except filter, can use replace instead)
	    - delete
	    - replace
	    - show

	With these new wrappers, it will be possible to start the
	integration of addNetwork/delNetwork with tc to implement the QoS
	flow.

2014-09-14  Dan Kenigsberg  <danken@redhat.com>

	fix typo introduced by Ie8140fe1

2014-09-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Remove dead code
	Commit 36a81b5aef added the legacy getServices interface, which is not
	part of the ModuleConfigurator. The new services property is inherited
	from the super class, so there is no need to implement it.

	tests: Use frozenset instead of set
	Using frozenset ensures that bad code trying ot mutate the return value
	of requires() will fail.

	Instead of replacing all set(...) calls with frozenset(...), I'm
	creating the frozenset in __init__, so there is no way to create an
	instance with the wrong type. This also cleans up code that creates a
	mock configurator without any requirements.

2014-09-13  Martin Polednik  <mpolednik@redhat.com>

	use super instead of direct parent call for NIC
	Super allows us to call parent class without having to specify
	its name, simplifying further moving of the class and possibly
	more inheritance.

2014-09-13  Francesco Romani  <fromani@redhat.com>

	config: introduce a devel section
	This patch introduces a 'devel' configuration section,
	in order to unclutter a bit the already crowded 'vars'
	section.

	An additional important benefit of this move is to clearly
	mark that some tunables should never turned on in production
	environments, unless exceptional circumstances, like a
	performance problem being debugged.

	For the same reason, is acceptable to move these options
	across minor versions (e.g. 3.5 to 3.6).

	This patch also makes room for future options which are
	currently being discussed, like memory profiling or
	a debug manhole service.

	tests: add simple balloon functional testcase

2014-09-13  Martin Polednik  <mpolednik@redhat.com>

	use super instead of direct parent call for Drive
	Super allows us to call parent class without having to specify
	its name, simplifying further moving of the class and possibly
	more inheritance.

2014-09-12  pkliczewski  <piotr.kliczewski@gmail.com>

	upgrade: vdsm-jsonrpc needs to obsolete vdsm-api
	vdsm-api was removed during jsonrpc implementation and now we need to
	make sure that it is removed when we upgrade from older version.

	Bug-Url: https://bugzilla.redhat.com/1140694

	jsonrpc: when None is set as default value Bridge.py fails
	When None is set as default value for parameter which uses custom type
	Bridge.py fails.

2014-09-12  Dan Kenigsberg  <danken@redhat.com>

	net: getLinks: avoid redundant list creation
	Returning an iterator is cheaper than creating a possibly-long
	throwaway list.

2014-09-11  Francesco Romani  <fromani@redhat.com>

	vm: rename obsolete buildCmdLine method
	In past times, VDSM used to run QEMU.
	The Vm._buildCmdLine method was in charge
	to build the QEMU executable command line.

	Nowadays we use libvirt as middleware, with no
	plans to come back, so this method does a different
	thing.

	This patch renames this method, with no behaviour
	change, to reflect the reality.

	Please note that this method is mostly orchestration
	of vmxml.Domain calls;
	Future patches will split this code from vm.py
	to vmxml.py.

2014-09-11  Petr Horáček  <phoracek@redhat.com>

	hook: fix macspoof hook
	The hook should be build with default VDSM build.

	Enabling mac-spoofing is required for the appliance specifically for
	dhcp agent which is connected to the networks bridge by a port (one or
	more dhcp agent per network). In order for packets not to be blocked by
	ebtable rules (introduced by nwfilter), mac-spoof should be enabled.

	Bug-Url: https://bugzilla.redhat.com/1139155

2014-09-11  Nir Soffer  <nsoffer@redhat.com>

	make: Add check-all target
	The previous patch made it easy to skip the stress and slow tests, and
	hard to run them. This make it easy again to run the stress and slow
	tests:

	    make check-all

	tests: Disable slow and stress tests by default
	Currently developers must use this crazy long command line when
	running the tests:

	    NOSE_SKIP_STRESS_TESTS=1 NOSE_SKIP_SLOW_TESTS=1 make check

	If you don't add the environment variables, you are wasting your time
	waiting for slow and stress tests, or worse, stress tests may fail
	because your system is overloaded.

	This patch disables slow and stress tests by default, so the common way
	to run the tests is just:

	    make check

	To enable slow and stress tests, you can use new shorter environment
	variables:

	    NOSE_STRESS_TESTS=1 NOSE_SLOW_TESTS=1 make check

	The new environment variables are also documented now.

2014-09-11  Antoni S. Puimedon  <asegurap@redhat.com>

	ethtool: remove debian and configure.ac python-ethtool references
	Commit a5e6b0843b6193d578f59cfe40303eaadf1c02ce aimed to remove any
	python-ethtool reference outside vdsm-bootstrap. Regrettably, I missed
	these few places that I fix now.

2014-09-10  Nir Soffer  <nsoffer@redhat.com>

	make: Run fast checks before slow ones
	Previously the slow tests where run before the fast pyflakes and pep8
	checks, so developer discover unused arguments or whitespace issues only
	after 1-2 minutes instead of few seconds.

	Now make check runs the fast checks before the slow ones, saving
	developer time.

	This is implemented by extracting the unrelated checks from check-local
	into separate phony targets. This is useful when debugging specific
	issues or when creating automated jobs that run specific checks.

	tool: Remove duplicate names
	The configurators modules were duplicating the module name in the class
	name:

	    libvirt.Libvrit

	This is not only ugly, but does not describe what this class is. Now all
	the configurtors modules define a Configurator class instead:

	    libvirt.Configurator

	This also has the nice property that it is now harder to import class
	names into other modules, so people will import the modules instead.

2014-09-10  Martin Sivak  <msivak@redhat.com>

	Do not add the memtune/min_guarantee element to the libvirt xml
	VDSM does not need to put the min_guarantee to the libvirt XML.
	It was only set and then nobody was accessing it. It will break
	compatibility with tools that read data through libvirt directly,
	but we do not officially support that anyway.

	This part will fix all new VMs. Old VMs need a migration
	hook that will be included as another patch.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138340

2014-09-10  Antoni S. Puimedon  <asegurap@redhat.com>

	ethtool_opts: provide a way to apply to all slaves
	There was a hole in the feature that this hook services in that it
	was not possible to apply some opts to all the slaves in the
	cases when the combination of settings was not appliable to all
	the slaves in a single ethtool command.

	This patch solves the bug by adding a special device name that
	the admin can use when defining the custom network opts, i.e.,
	'*' that will mean that the special device name will be replaced
	with each of the slave names, one at a time, and run as many ethtool
	procs as there are slaves in the bond.

	Bug-Url: https://bugzilla.redhat.com/1126478

2014-09-10  Francesco Romani  <fromani@redhat.com>

	sampling: do not produce stats for missing disks
	Adding of a new disk using hotplug (hotplugDisk verb)
	can trigger an error during the stats reporting (getVmStats verb).
	This error is transient, so it was likely got unnoticed so far.

	When a disk is hot-plugged, VDSM correctly updates the list
	of the drives of a VM.
	When stats for such a VM are asked, VDSM iterates over the list of
	the drives of a VM, and  looks up for disk samples of each drive.
	The stats are collected (by default) every 60s, and VDSM considers
	the oldest and the newest samples; so, until the oldest set of
	samples collected includes values for the hotplugged disk,
	we will have an error.

	We have a vulerabilility window up to
	(sampling_window * sampling_interval)
	in the worst case. With default values this is 2 * 60s = 120s.
	After that, everything goes back to normality, and the
	stats for the new disk are reported correctly.

	This patch fixes this issue by just ignoring stats for disks
	which are part of a VM, but for which samples aren't
	yet available.

	Bug-Url: https://bugzilla.redhat.com/1119051

2014-09-10  Petr Horáček  <phoracek@redhat.com>

	configurators: runDhclient moved iproute2 > __init__.py
	Function _runDhclient is moved from iproute2.py to __init__.py,
	so we can use it in pyroute_two.py.

2014-09-10  Antoni S. Puimedon  <asegurap@redhat.com>

	unified_persistence: only consider bonds created/touched by vdsm
	When upgrading a system to unified persistence we were considering
	any non empty bond as a bond to persist under unified persistence.
	This was not consistent with our implementation of ifcfg.flush that
	only considers ifcfg files with the vdsm authoring header.

	The patch fixes the behavior by making ifcfg flush and
	unified_persistence upgrade consistent in it's ownership semantics,
	i.e., we will not touch nor consider for persistence files not
	markedly authored by vdsm.

	A side effect of the lack of consistency was that a bond that was
	providing connectivity to a machine could be made to be onboot no
	if it was not immediately the backing device of ovirtmgmt.

	Bug-Url: https://bugzilla.redhat.com/1128140

2014-09-09  Petr Horáček  <phoracek@redhat.com>

	revert: libvirt is happy with redefinition of an existing nwfilter
	Bug-Url: https://bugzilla.redhat.com/1138807

2014-09-09  Antoni S. Puimedon  <asegurap@redhat.com>

	sourceroutethread: fix logging string formatting

2014-09-08  Petr Horáček  <phoracek@redhat.com>

	networkTests: IPv6 added to testGetRouteDeviceTo

	tests/functional/dummy.py: addAddr IPv6 support
	IPv6 address support added to dummy's addAddr function.

2014-09-08  Francesco Romani  <fromani@redhat.com>

	vm: document disk stats collection on recovery
	The disk handling flow in the recovery path may be
	surprising, due to the interaction of moving parts.

	Until we properly clean up and refactor this flow,
	add a comment to document the behaviour.

2014-09-08  Yeela Kaplan  <ykaplan@redhat.com>

	spec: Require latest ioprocess
	Latest IOProcess(0.12) includes a new patch for
	the python bindings that deals with a memory leak.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1124369

2014-09-08  Antoni S. Puimedon  <asegurap@redhat.com>

	ethtool: remove vdsm dependency on ethtool
	We only leave a dependency in the bootstrap package as it is
	deprecated anyway and touching it would do more harm than good.

	ethtool: remove some more usages
	This patch continues with the removal of the python ethtool
	dependency, as it is not really necessary now that the libnl
	bindings are mature.

	sampling: remove ethtool dependency
	The flags are already part of the link object. There was no good
	reason to ask the system again for this data.

2014-09-08  Martin Polednik  <mpolednik@redhat.com>

	vdsm: move video device to vmdevices
	No code changes, only moving around

2014-09-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Additional tool tests for exposed functions

2014-09-06  Martin Polednik  <mpolednik@redhat.com>

	vdsm: initial split of vm devices
	Initial boostrapping of devices. This is effort to move
	things out of vm.py to their modules in order to improve readability
	and isolate functionality.

2014-09-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	ppc: Over ppc arch vdsm reports UNKNOWN as operationSystem in getVdsCaps
	Vdsm currently checks only /etc/redhat-release path which exists over
	fedora installation for ppc arch but not on PowerKVM platforms.
	Over PowerKVM platforms we should read /etc/ibm_powerkvm-release to
	retrieve the release version.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131965

2014-09-06  Federico Simoncelli  <fsimonce@redhat.com>

	mount: fix _loopFsSpecsTimestamp global definition
	The variable _loopFsSpecsTimestamp should be defined as global before
	its first use within a function.

2014-09-04  pkliczewski  <piotr.kliczewski@gmail.com>

	storage domain detach with force fails
	In jsonrpc schema masterSdUUID and masterVersion are marked as optional.
	We need to provide default values for both arguments.


	Bug-Url: https://bugzilla.redhat.com/1110831

2014-09-04  Francesco Romani  <fromani@redhat.com>

	vm: avoid race while setting guest cpu status
	Inside the Vm class, the state swapping is not atomic.
	This is because the reported state is function of two internal fields,
	lastStatus and guestCpuRunning, which may be updated concurrently
	and not atomically.

	One clear example for this is BZ1111938, on which we see a
	race between pause(), onLibvirtLifeCycle() and getStats(),
	which makes a Vm incorrectly reported as 'Paused'
	(instead of 'Saving State'), which confuses Engine.

	To fix this, we make use of the guestCpuLock everywhere
	we change the state of the guest CPU, in order to synchronize
	access to the field with respect to pause() and cont() methods.

	While good enough for the short term, more aggressive
	refactoring is needed in this area.

	Bug-Url: https://bugzilla.redhat.com/1111938

2014-09-04  pkliczewski  <piotr.kliczewski@gmail.com>

	setNumberOfCpus marshalling issue
	xmlrpc uses vmID twice to construct VM object and to run setNumberOfCpus.
	In xmlrpc we provide implementation how we instantiate API object and
	invoke a verb so we do not care how the parameters are used.

	Whereas in jsonrpc we use "reflection" so we can't use the same parameter
	twice.


	Bug-Url: https://bugzilla.redhat.com/1138181

2014-09-02  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: check volume existence in prepareImage
	This patch introduces a check in prepareImage to return a consistent
	error (VolumeDoesNotExist) when the volume to prepare is not found.

	Before this patch the error was:

	 UnboundLocalError: local variable 'leafInfo' referenced
	   before assignment

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1133617

2014-09-02  Adam Litke  <alitke@redhat.com>

	Live Merge: add reconcileVolumeChain verb
	If a live merge operation is catastrophically interrupted (we completely
	lose the host on which the VM was running during the merge) engine must
	have a way to discover what happened by examining storage only.

	When the active layer was being merged, it's critical to know whether
	the the pivot completed or not.  Choosing the wrong leaf volume could
	result in data corruption.  When an internal volume is being merged the
	situation is less dire but providing a way for engine to resolve the
	final status of the merge provides for a substantially better user
	experience since the snapshot can be unlocked to allow a cold merge to
	be attempted.

	This new verb must run on SPM and is only valid for images which are not
	in use by running VMs.  It will use qemu-img to examine the actual
	volume chain and will correct the vdsm metadata if needed.  Finally, the
	current volume chain is returned.  This chain can be used by engine to
	understand what happened with the interrupted merge command.

	virt: Resolve snapshot type after prepareVolumePath
	The Drive.blockDev property depends on the presence of the volume path
	locally.  Therefore, it is not safe to call until after the new snapshot
	volume path has been prepared.  Use a lambda function to delay the call
	until the information is needed.

	Live Merge: Suspend disk stats collection during pivot
	When pivoting to the new volume after an active layer merge, there is a
	brief period where the vdsm metadata is out of sync.  During this time,
	the disk stats collection thread will raise an exception since the drive
	cannot be referred to by its old path.  Therefore we disable stats
	collection during this short window until the metadata can be
	synchronized.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109918

	Live Merge: Simplify pivot flow
	The pivot part of a Live Merge can be made a synchronous operation which
	simplifies our flows.  We're already doing cleanup in a thread so just
	do the pivot and wait for it (very short) to complete and then continue
	directly to the volume chain sync part of the cleanup.

	This is much simpler than doing the pivot and waiting another sample
	interval to try the sync portion.

	Live Merge: Mark active layer ILLEGAL before pivoting
	A block commit of the active layer takes place in two phases.  First,
	data is copied from the current leaf to its parent.  During this time,
	all writes to the disk are mirrored to both volumes.  When this process
	converges the two volumes are and will remain identical due to ongoing
	drive mirroring by qemu.  At this point we instruct libvirt to perform a
	pivot from the current leaf to the new leaf.  Once this is complete we
	synchronize our metadata and end the job.

	If we are catastrophically interrupted (lose contact with the host)
	between the pivot request and final metadata synchronization there is
	currently no way to know whether the pivot actually happened.  This
	could be dangerous because restarting the VM on another host with the
	wrong leaf volume could lead to data corruption.

	The solution is to mark the current leaf ILLEGAL before requesting a
	pivot.  Since the volumes are identical at this point it will always be
	safe to rerun the VM using the new leaf.  A subsequent patch will take
	advantage of this ILLEGAL marker to provide engine with a reliable and
	correct volume chain for this recovery scenario.

	Live Merge: Extend internal block volumes during merge
	Libvirt will be exposing the high write watermark for internal volumes
	directly in the domain XML.  An <allocation/> element will be added to
	each member of the image chain.  This patch implements the missing logic
	for _getMergeWriteWatermarks using this new API.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109920

	Live Merge: Get volume chain for multiple drives
	A future patch wants to get volume chain information for all drives in
	one call.  Rather than getting the domXML once per drive, allow
	_driveGetActualVolumeChain to accept a list of drives and parse the
	information all at once.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109920

2014-09-02  Martin Polednik  <mpolednik@redhat.com>

	vdsm: remove protected attribute access in VmStatsThread
	Accessing internal elements is evil, VmStatsThread accessed
	vm devices through _vm._devices[DISK_DEVICES], which can be
	replaced by _vm.getDiskDevices()

2014-09-02  pkliczewski  <piotr.kliczewski@gmail.com>

	getVMFullList fails when processing externally managed vms
	When we send 22k response we get -1 during send. After the investigation
	we found that m2crypto ignores error codes and returns -1. We are not
	sure which error is returned. It can be one of SSL_ERROR_WANT_WRITE,
	SSL_ERROR_WANT_READ, SSL_ERROR_NONE, SSL_ERROR_ZERO_RETURN.

	When we get -1 we need to get back to poll loop so we override send
	method and return 0 when we see -1 which fixes the issue.


	Bug-Url: https://bugzilla.redhat.com/1135959

2014-09-01  Nir Soffer  <nsoffer@redhat.com>

	tool: Make configurators more Pythonic
	The configurations used to have Java like getters, which make the code
	more clumsy then it should be. This patch convert the getters to read
	only properties.

	The types returned by the getters were mutable, which may lead to
	calling code to modify the returned value without any error. Now the
	configurators return immutable types.

	There was no documentation about the purpose and the semantics of the
	getters, which makes it harder for new developer to modify this part.
	Now ModuleConfigure document these properties.

	There should be no change in the behavior.

2014-09-01  Mooli Tayer  <mtayer@redhat.com>

	tool: fix pyflakes errors[1].
	recently I broke master at change 31293.

	[1]
	./lib/vdsm/tool/configurators/libvirt.py:29: 'NotRootError' imported but unused
	./lib/vdsm/tool/configurators/sanlock.py:24: 'NotRootError' imported but unused

	vdsm-tool: use geteuid() instead of getuid() for root check.
	This is expected to have no consequence. checking for effective user id
	is more accurate for permissions check.

	vdsm-tool: changing root checking in configurator.
	Checking for root as we currently do in configure of libvirt and
	sanlock is not enough. Currently this will fail during the
	isConfigured() check since it does not have premissions to the
	files it attempts to check:
	"OSError: No such file or directory: /etc/libvirt/libvirtd.conf"

	It is easy to see that this check is needed for all the exposed
	methods of configurator. I'm suggesting to do it in the exposed
	verbs in a uniform manner.

2014-09-01  Dan Kenigsberg  <danken@redhat.com>

	libvirtd.log: time to be less verbose
	After several years, we can drop log verbosity to libvirt's default.
	Currently, libvirt logs are filling up ovirt-nodes that run dozens of
	VMs.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1125237

2014-09-01  pkliczewski  <piotr.kliczewski@gmail.com>

	Force flag not optional for detach storage domain
	Default value of force flag for detach sd not set but it should be
	optional according to schema.


	Bug-Url: https://bugzilla.redhat.com/1134290

2014-09-01  Genadi Chereshnya  <gcheresh@redhat.com>

	netinfo: Return Mac of bond slaves in lower case
	getVdsCaps returns MAC of all interfaces in lower case and for bond slaves
	it returned it in upper cases - fixing inconsistency

	Bug-Url: https://bugzilla.redhat.com/1116810

2014-08-31  Adam Litke  <alitke@redhat.com>

	qemuimg: Handle new output format
	The current qemu-img info parsing logic assumes that if the output is
	long enough, the backing image will appear on line 6.  In newer qemu
	versions, some additional information has been added to the output.  In
	the case of no backing file, the additional lines will fail to parse.
	Handle this by trying to parse line 6 as a backing file and ignoring
	regex parse errors for this line only.

	Sample output from qemu-2.0.0-rc1:

	[alitke@lager qemu-2.0.0-rc1]$ ./qemu-img info base.img
	image: base.img
	file format: qcow2
	virtual size: 1.0G (1073741824 bytes)
	disk size: 196K
	cluster_size: 65536
	Format specific information:
	    compat: 1.1
	    lazy refcounts: false
	[alitke@lager qemu-2.0.0-rc1]$ ./qemu-img info leaf.img
	image: leaf.img
	file format: qcow2
	virtual size: 1.0G (1073741824 bytes)
	disk size: 196K
	cluster_size: 65536
	backing file: base.img
	Format specific information:
	    compat: 1.1
	    lazy refcounts: false

2014-08-31  Yeela Kaplan  <ykaplan@redhat.com>

	oop: Use Storage.oop logger
	Use storage logger to avoid oop logs in /var/log/messages.
	Storage logger is configured to not send messages to syslog.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131867

	spec: require latest ioprocess version
	this will help with reducing ioprocess logs
	to the vdsm log.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1124369

2014-08-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Use stdout for regular output message in removeConf func

2014-08-29  Petr Horáček  <phoracek@redhat.com>

	Deprecated string.join() replaced
	Deprecated string.join(execfn, " ")) was replaced by
	' '.join(execfn)).

	ipwrapper: event monitor: wait after kill
	proc.kill() function alone leaves zombies, so i added
	proc.wait() after it.

2014-08-28  Dan Kenigsberg  <danken@redhat.com>

	tests: fix typo
	I've pushed a wrong version of the patch instead of the verified one

2014-08-28  Vinzenz Feenstra  <vfeenstr@redhat.com>

	spec: Only build x86_64 and ppc64 architectures
	We're not supporting any other architectures than x86_64 and ppc64
	at the moment. This patch restricts the rpm builds to those
	architectures.

2014-08-27  Ondřej Svoboda  <osvoboda@redhat.com>

	iproute2, dhclient: Deal with v4/v6 protocols separately
	When taking over DHCP services, stop the previously running dhclient
	only if the protocol matches. Similarly, flush only the respective
	adresses (also keep link-local v6 addresses for DHCPv6 functionality).

	api, iproute2, dhclient: Support DHCPv6
	First, propagate 'dhcpv6' through add/setupNetworks.
	The forgotten property can now reach ifcfg configurator, which has
	already supported DHCPv6, and iproute2 configurator, which
	(using dhclient) now learned DHCPv6 too.

	DHCPv6-only setup needs dhclient 4.2.7-2.fc20, or BZ 1129500 fix
	to be backported to RHEL 6 and 7 (this should happen shortly).

2014-08-27  Nir Soffer  <nsoffer@redhat.com>

	tool: Create configurators once
	Commit e5e80540e8 replaced the configurators dict with a function,
	creating a configuration dict on each call. The code added in this
	commit invoke the function many times for each run on the tool, creating
	10's of instances of the configurators. This change is not needed to
	acomplish the purpuse of that patch, and is rather pointless.

	This patch reverts the unrelated change, keeping the configurations in a
	module constant. This change also simplify the tests.

2014-08-27  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Only report bootproto4=dhcp when we have an address
	A DHCPv4 lease might still be valid. As the address is unused, however,
	it cannot be said that the interface has been configured using DHCPv4.

2014-08-27  Petr Horáček  <phoracek@redhat.com>

	networkTests: UNKNOWN operstate
	Sometimes kernel is not fast enough to write new device's
	/sys/class/net/$devicename/operstate in time, in this case
	originalState read by networkTests:nonChangingOperstate is
	'UNKNOWN' and test which it uses fails.

	This problem occurs with iproute2 on this tests:
	- testAddNetworkBondWithManyVlans(kwargs=True)
	- testSetupNetworksAddNetworkToNicAfterBondResizing(kwargs=True)
	- testSetupNetworksDelOneOfBondNets

	I added new function _waitForKnownOperstate(device) which waits
	for operstate other than UNKNOWN. This function is called before
	every 'with nonChangingOperstate(BOND_NAME)'. I don't use it
	before 'with nonChangingOperstate(nics[0])', because nics'
	operstate seems to be UNKNOWN for all the time (bug #1133159).

	New function uses signal.alert() timeout because monitor's loop
	blocks code until it gets the right value.

2014-08-27  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Fix unsafe status handling
	DomainMonitor status was updated in a unsafe way, assuming that another
	thread will never ask the status in the middle of an update. The code
	was written as if creating a new status object is expensive operation
	that should be avoided.

	Instead of having long living status object in the monitor, I create new
	forozen copy each monitor interval (10 seconds). The frozen copy ensure
	that careless developers trying to modify a status will get what they
	deserve.

2014-08-26  Martin Polednik  <mpoledni@redhat.com>

	vdsm: isolate VmDevice xml generation method
	VmDevice class uses helper function 'createXmlElem' to ease generating
	of XML for devices. This patch moves the function to xmldom in the form
	of new parent class for VmDevice, separating the logic and xml
	generation. (inspired by http://gerrit.ovirt.org/#/c/17694/)

2014-08-26  Artyom Lukianov  <alukiano@redhat.com>

	Send to cannonizeHostPort port parameter as string instead of integer.
	Bug-Url: https://bugzilla.redhat.com/1127776

2014-08-26  Saggi Mizrahi  <smizrahi@redhat.com>

	mount: Remove a redundant call to speed things up
	This way we query sysfs less times and everyone is happy.

	Also update the copyright message it appear our lawyer overlords.

2014-08-26  Dima Kuznetsov  <dkuznets@redhat.com>

	mounts: Optimize mount loop device resolution
	Existing code was re-reading mtab for each /proc/mounts entry.
	Added lookup dictionary that translates /dev/loop spec to actual file
	spec.

	Lookup is reinitialized each time mtab is changed.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112779

2014-08-26  Mooli Tayer  <mtayer@redhat.com>

	configfile: sort dict items inserted to config files for consistency.
	See comment  one at bug.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1127877

2014-08-26  Dan Kenigsberg  <danken@redhat.com>

	tests: checkSudo should skip if bin/sudo is missing
	If the unit tests are run with no sudo binary installed,

	    OSError: [Errno 2] No such file or directory

	is raised instead of the test being skipped.

2014-08-26  Antoni S. Puimedon  <asegurap@redhat.com>

	el6_tests: fix toolTests to use VdsmTestCase so that assertIn is available

2014-08-26  Francesco Romani  <fromani@redhat.com>

	vm: xml: add  method to extract all the channels
	The VM code needs to iterate on all the agent channels
	to possibly fix the links.

	However, it doesn't need, nor it should, directly
	parse the XML again, because we are moving all
	the XML-related processing into the vmxml module.

	This patch is another step on this direction.
	Please note that this patch mostly moves code around.
	More aggressive refactoring is planned for future work.

	Along the way, we bootstrap the vdsm/virt/vmxml.py
	test module, because vmTests.py is too big already.

2014-08-25  Nir Soffer  <nsoffer@redhat.com>

	tool: Fix TypeError when configuration check fails
	When is-configured and validate-config failed for some modules, we got a
	TypeError trying to join a list of configurator objects, instead of list
	of strings.

	    TypeError: sequence item 0: expected string, Sanlock found

2014-08-22  Nir Soffer  <nsoffer@redhat.com>

	tool: Remove pointless __init__ methods
	Some configurators had pointless __init__ methods. There is not need to
	implement these if they are empty. Keeping them only cause developers to
	copy and paste this useless code when they create new configurators.

2014-08-22  Francesco Romani  <fromani@redhat.com>

	vm: make the 'destroyed' field private
	it is used only internally, so no reason to expose it.

	vm: simplify the shutdown exit reason
	A VM could be cleanly shutdown in two ways,
	either from inside (user shutdown) or from engine
	(admin shutdown).

	In turn, the shutdown process can involve various
	shutdown methods (guest agent, acpi, forced).

	Currently we use a couple of booleans to detect
	all the various cases, but this is clumsy and
	some paths aren't well covered, so wrong states
	may be reported.

	This patch simplify the reporting by adding an
	explicit, private, 'shutdownReason' field.

	Bug-Url: https://bugzilla.redhat.com/557125

	vm: do not use _dom for powerdown
	We must avoid the proliferation of trivial helper methods, but
	using private VM fields across modules is a greater evil, even
	if modules are part of the same package and affine, like vm.py and
	vmpowerdown.py

	To avoid that, a new simple method is added to request clean
	shutdown of a VM through ACPI events.

2014-08-21  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix Python 2.6 compatibility
	Recent tests use set comprehension which is available only in Python
	2.7, failing builds on EL machines.

	tool: Fix help message when is-configured fails
	When is-configured fails for some modules, the help message suggested an
	incorrect invocation:

	    vdsm-tool configure module-name

	Instead of the correct:

	   vdsm-tool configure --module module-name

	tool: Use space after comma when formatting lists
	When formating list of modules in error message, we used to do:

	    foo,bar,baz

	Now lists are formatted in more readable way:

	    foo, bar, baz

2014-08-21  Adam Litke  <alitke@redhat.com>

	Live Merge: Update path using libvirt supplied value
	When libvirt pivots the active layer after a live merge, the live XML is
	updated to reflect the path of the new active layer.  The new path is
	copied from the backingStore pointer of the old active layer.  Since
	that is a relative path, libvirt makes it absolute but it will not
	remove the '../' path component since that is not always correct (even
	though it would be correct for our environment).  When syncing the
	volume chain, we must use the same path as libvirt does, otherwise
	future calls to libvirt may fail.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109920

	Live Merge: Return more info from _driveGetActualVolumeChain
	In followup patches, we want to return more information about each path
	component from _driveGetActualVolumeChain.  We need the actual path as
	given in the domain XML in order to properly update our metadata after
	an active layer merge.  We also want to use this function to return high
	write watermark information for block volumes.  This patch just converts
	the format returned by _driveGetActualVolumeChain from a simple list to
	a list of named tuples.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109920

2014-08-21  Nir Soffer  <nsoffer@redhat.com>

	tool: Fix another Python 2.6 compatibility issue
	Commit 096cc03d2f replaced the configurators tuple with a dict, using
	dict comprehension syntax, which is not available on Python 2.6. Now we
	use the good old dict() syntax instead.

	We also silence a pep8-1.4.5 complaint.

	tool: Fix compatibility with Python 2.6
	Commit 398d016b58 was merged too quickly, before Python developers could
	add set literals to Python 2.6. Since this is quite late now to add it,
	I think we should use the good old set() syntax.

	tool: Fix error message for non-existing module
	When user specify non existing module (e.g. foo)using the --module
	option, he would get this confusing error:

	    UsageError: error: argument --module: invalid choice: foo (choose from ['foo'])

	While the availabe modules are certificates, libvirt, and sanlock.

	Now the error display the available modules, sorted, and formatted in a
	user friendly way, instead of as Python list:

	    UsageError: error: argument --module: invalid choice: foo
	    (available: certificates, libvirt, sanlock)

	The relevant test use now real names, so errors look like real errors,
	which help to format them properly.

	tool: Raise UsageError when used incorrectly
	Commit e5e80540e8 added a new type of error, when user try to configure
	non existing module. The test for this feature expect a SystemExit
	exception, but the code was actualy raising a KeyError.

	Seems that both the test and the code are wrong, so now a UsageError is
	raised in this case.

2014-08-20  Francesco Romani  <fromani@redhat.com>

	vm: remove guest agent channels tunables
	We had tunables to disable vm/ga channels creation from a long time,
	but it was just on debug purposes and these settings should never
	be used in production.

	Moreover, we acttually rely on the channel being here (see
	RHBZ#1126887).

	Since it is now possible the achive the same results through hooks,
	it is time to drop these tunables.

	Relates-To: https://bugzilla.redhat.com/1126887

2014-08-20  Mooli Tayer  <mtayer@redhat.com>

	vdsm-tool: roll out self signed certificates in vdsm-tool.
	This is handled in a new 'ModuleConfigure' named 'certificates'.
	Libvirt module now requires 'certificates'.

	certificates are not remove during removeConf.

	previously certificates where generated on init.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1127877

	vdsm-tool: suppoort dependencies between ModuleConfigure

	vdsm-tool: simplify getting modules by names.

	vdsm-tool: reorgenize module configurers.
	configurators are different from other vdsm tool exposed
	entities since they have their own lifecycle (defined
	by ModuleConfigure) and they deserve their own directory.

	this happens now since configurator is getting messy
	and it is time to split it into different
	ModuleConfigure file. In addition more are expected
	to join soon.

2014-08-20  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Handle and store serial to guest device names mapping
	The serial to guest device name mapping helps to identify 'physical' hard
	drives in the guest OS from the outside and correlate our disk images to
	those drives and their name in the guest OS.

	Guest agent implementation: http://gerrit.ovirt.org/#/c/31465/

	Bug-Url: https://bugzilla.redhat.com/1127607

2014-08-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove redundant prints during rpm installation
	Those stdout prints are invalid and doesn't assist to the user.
	If configure fails vdsmd won't start and the user will need to
	investigate it. But stdout prints in the installation phase won't
	assist.

2014-08-19  Yeela Kaplan  <ykaplan@redhat.com>

	configurator: Too many constants to import separately
	needed for following patch (configure multipath)
	where we import even more constants

2014-08-19  Petr Horáček  <phoracek@redhat.com>

	networkTests: assertBondDoesntExist with nics=None
	When assertBondDoesntExist is used with nics=None, it raises an
	error "'NoneType' object is not iterable".

	I changed it to assert nics only when defined.

2014-08-19  Ondřej Svoboda  <osvoboda@redhat.com>

	iproute2, netinfo: Change the location of our dhclient lease files
	To prepare for DHCPv6 support, name the files 'dhclient[46]-iface.leases.
	The plural not only mirrors the 'generate_lease_file_name' function
	in initscripts but also reflects the fact that there is usually more
	than one lease in the files.
	DHCPv4 lease files now carry a '4' in the name for simplicity, explicitly
	suggesting the DHCP flavour used.

	Also simplify globs representing our and 3rd party lease files locations.

2014-08-19  Francesco Romani  <fromani@redhat.com>

	vm: detect migration completed on recovery
	If VDSM is down when a migration completes, it will
	miss the migration completion event on the
	onLibvirtLifeCycleEvent callback, and thus needlessly
	wait the full migration timeout before actually
	asking libvirt for the domain state and get back in sync.

	BZ1104733 provided a quite complex demonstration
	of the fact this scenario is unlikely, but possible.

	To handle this situation, we
	- connect early to the domain, on recovery.
	  We know this is safe because on recovery we iterate on
	  very domain list libvirt provided to us moments before,
	  so the domain will be present.
	- inspect the domain state *before* waiting for migration
	  termination, and skip the wait if the domain is detected
	  running.

	A nice side-effect of this patch is also to clarify a tiny bit the
	creation flows in Vm._run().

	Bug-Url: https://bugzilla.redhat.com/1104733

	vm: ensure valid Vm._dom before domDependentInit
	If we reach the _domDependentInit stage of a VM
	creation, for every possible flow, including
	recovery, we must guarantee that the _dom
	attribute is not None, thus VDSM and libvirt
	are connected.

	Quite a lot of errors could be ignored on
	recovery, but this cannot, ever.

	This patch moves the '_dom is not None'
	check inside _domDependentInit, and makes
	it mandatory for each flow.

2014-08-19  Michal Skrivanek  <michal.skrivanek@redhat.com>

	update fake caps to match updated PPC support to match the engine side (I75ea7ce447853f653cc45044cbf8ede64c0a8bb9)

2014-08-19  Francesco Romani  <fromani@redhat.com>

	virt: sampling: extract disk rate calculation
	This is a preparation patch for the merge
	of sampleDisk and sampleDiskLatency

	vm: xml: add a method do append custom device XML
	add a method to vmxml.Domain to append the XML representation
	of a device. This is used to update the XML after the hooks are
	been run.

	This is needed to achieve better isolation among
	vm.Vm and vmxml.Domain, and brings us one tiny step closer
	to the isolation of all XML-related processing into vdsm/virt/vmxml.

	vm: avoid duplicate import
	Vm._getVmPolicy added another minidom import just to use parseString.
	There is no need for it since we already imported it as _domParseStr
	from a long time.

2014-08-19  Dan Kenigsberg  <danken@redhat.com>

	virt: keep on sampling before /var/run/vdsm/client.log exists
	My commit 24c8e24 has introduced a serious bug: if vdsm is started
	before /var/run/vdsm/client.log is created (which is the common case for
	new installations), the host-sampling thread would stop when it fails to
	find it.

	This patch explicitly handles the case of a missing
	/var/run/vdsm/client.log on the two locations that attempted to read its
	time.

	Bug-Url: https://bugzilla.redhat.com/1111234

2014-08-15  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Remove spammy 'Trying to connect fileno' log message
	This message is repeated almost every second for every VM where
	no connection to the VM can be established. This can be a lot of
	log messages which have actually no value and are creating a huge
	load of noise.

	This patch removes the logging of this message.

	virt: Avoid timeout log spam due to channel timeouts
	Currently vmchannels.Listener is logging every timeout events every
	30 seconds (based on guest_agent_timeout config value):
	vmChannels::91::vds::(_handle_timeouts) Timeout on fileno 106.

	This patch changes this behaviour to keep track if a timeout has
	been logged before and in that case wouldn't log it again until
	a new event (like incoming data) has been received.

	Bug-Url: https://bugzilla.redhat.com/1096312

2014-08-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix rare deadlock in profile threads tests
	There is a rare deadlock in yappi profiler, when starting a profile in
	the same time a thread is started. This caused the
	ThreadsProfileTests.test_running_threads to fail once in a while.

	The deadlock happens when yappi find a new thread it does not know yet,
	and try to get the thread class name. If the first call happen to be the
	_active_limbo_lock.acquire, yappi calls back into python
	threading.currentThread, which returns a _DummyThread, which try to lock
	again _active_limbo_lock to register itself and deadlocks. See [1] for
	complete details about this.

	Since we start yappi profiles first thing on startup, this bug should
	not effect vdsm in production.

	Now the tests wait until the thread is fully started before running the
	profiled function, avoiding the possible deadlock.  I verified this
	change by running the failing tests 1000 times in a loop, without any
	failure. Before this, we could not get 100 successful runs.

	[1] https://code.google.com/p/yappi/issues/detail?id=48

2014-08-14  Utkarsh  <utkarshsins@gmail.com>

	sparsify: integrating virt-sparsify into vdsm
	This patch adds virt-sparsify support in vdsm. Sparse disk images
	which are being used grow in size over a period of time but still
	have considerable amount of free space that may be shrunk back
	using virt-sparsify utility provided by libguestfs.

	The detailed expected execution flow is as follows-

	* The user selects a sparse volume to run virt-sparsify on to reclaim
	  free space.
	* User creates a new destination volume using createVolume of the
	  same virtual size as the source volume.
	* User creates a snapshot of the source volume, which will be used
	  as a temporary volume for virt-sparsify (--tmp prebuilt:file)
	* User runs sparsify (implemented in this patch) providing as
	  arguments temporary volume and destination volume.
	  (source volume is just the parent of temporary volume, so user
	  doesn't need to specify that)
	* Once sparsify is done (pass or fail) user removes the temporary
	  volume.
	* User may now check and verify the destination volume, and
	  optionally remove the source volume.

2014-08-14  Dima Kuznetsov  <dkuznets@redhat.com>

	utils: Remove duplicate set non-blocking functions
	Current code had 2 implementations of functions that turned on the
	O_NONBLOCK flag on file descriptors, none of which were in lib, to avoid
	creating yet another implementation for lib code to use, one of existing
	implementations was moved to utils.

2014-08-14  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Create GuestAgent instance in __init__ and connect later
	This is not only a cosmetic improvement. There are cases where we
	are trying to call methods of the GuestAgent before the instance was
	created. To avoid these race conditions we're creating the instance of
	the guest agent already in the __init__ phase.

2014-08-14  Jiri Moskovcak  <jmoskovc@redhat.com>

	hosted-engine: don't log the whole backtrace for expected problems
	when deploying host for hosted engine, vdsm starts using the HE
	broker api before the deployment is finished, and the required config
	file is not writen, so it results in the exception which polutes the
	log

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1045053

2014-08-14  ndarshan  <dnarayan@redhat.com>

	gluster: Modification of logic for volume capacity calculation.
	This patch modifies the logic for gluster volume capacity
	computation. Earlier the volume capacity was calculated
	wrt non root user. Now logic is modified to calculate
	volume capacity wrt root user.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1129619

2014-08-14  Dima Kuznetsov  <dkuznets@redhat.com>

	log: Change vdsm log file to enforce user/group
	This commit adds a new log handler that extends WatchedFileHandler,
	This handler checks current user and group and checks with the expected
	values, to make sure logs are created with correct permissions. In case of bad
	access RuntimeError is thrown.

	This patch also updates logger.conf to use this handler.

2014-08-14  Petr Horáček  <phoracek@redhat.com>

	networkTests: BOND_NAME constant changed to bond11
	getVdsCaps on rhel6 reports bond0-4 as existing
	regardless of their true existence (see
	_report_legacy_bondings).

	This confuses the testing changes in upcoming
	patches, hence we prefer to test a bond name with
	no legacy burdens.

2014-08-14  Dima Kuznetsov  <dkuznets@redhat.com>

	vdsClient: alternative ways to provide password
	Current method to provide password for vdsClient commands is typing it
	in the command line. The BZ1032525 requests to provide safer way.

	The patch implements new alternatives to provide command's password
	value instead of a plain text.

	This change introduces an new field, 'auth=', usage:
	 * auth=[alt:value] with following posibilities:
	 ** auth=file:path - read password from the first line of the file
	                     pointed by path
	 ** auth=env:name - read password from the environment variable 'name'
	 ** auth=pass:password - use plaintext password, provided in case would
	                         want to depricate the old format altogether.

	This change affects the following commands:
	Group 1:
	 * connectStorageServer
	 * disconnectStorageServer
	 * validateStorageServerConnection
	 Commands in this group pass password as part of conList format, such as
	 id=...,user=...,password=...
	 These commands can drop password= altogether, and use only auth=, if
	 both are provided, auth= takes precedence.

	Group 2:
	 * desktopLogin
	 * discoverST
	 Commands in this group receive password as a mandatory  argument, at
	 a known index, for example: [address] [user] [pass], to avoid breaking
	 compatibility, password argument has to be specified, even when using
	 auth=, where auth= can come anywhere after all the mandatory arguments.
	 For example: vdsClient someCommand 127.0.0.1 user - auth=method:...
	 (note the '-')

	Group 3:
	 * setVmTicket
	 auth=... can be passed only after '--' parameter, to avoid collision
	 with the fifth optional parameter
	 For example:
	 vdsClient setVmTicket 127.0.0.1 user - disconnect -- auth=method:...

	Bug-Url: https://bugzilla.redhat.com/1032525

2014-08-13  Petr Horáček  <phoracek@redhat.com>

	tests: functional as a package
	I added __init__.py to functional tests' folder, so now we can
	import its modules from unit tests.

	Veth devices are shown as NICs + test
	Veth LinkType was not listed in tuple, therefore veths were
	evaluated as NICs.

	New test adds dummies and veths with _fakeNics prefix and with
	non _fakeNics prefix and then verify if fake nics are shown in
	netinfo.nics() and the others are not.

	Bug-Url: https://bugzilla.redhat.com/1125177

2014-08-12  Antoni S. Puimedon  <asegurap@redhat.com>

	selinux.restorecon: encode filename to utf-8 string
	selinux python bindings take only a char * as input, not a unicode
	string (C.f. https://bugzilla.redhat.com/908916). For this reason, we
	need to encode a potential unicode string into a utf-8 char string.

	Bug-Url: https://bugzilla.redhat.com/1128074

2014-08-12  Francesco Romani  <fromani@redhat.com>

	vm: more generic recovery check
	On recovery, VDSM checks each VM listed by libvirt
	to see if it should take care of it.
	The check is done by using some system properties
	added in the smbios domain element, which is lacking
	outside x86_64.

	As result, recovery finds no VMs on PPC64.

	This patch makes VDSM use the vm guest agent channels
	to do the recovery check, since they are avaialble
	on all plataforms.

	Bug-Url: https://bugzilla.redhat.com/1126887

	vm: graphdev: update the _devices field
	this patch let the Graphic Devices instances in _devices
	be updated from the fresh data from libvirt.

2014-08-12  Antoni S. Puimedon  <asegurap@redhat.com>

	tc: add hfsc class parsing support
	In order to add Quality of Service reporting and configuring to vdsm,
	it is necessary to be able to parse Hierarchical Fair Service Curves
	class printouts as provided by the 'tc' iproute2 tool.

	This patch follows in the steps of vdsm/network/tc/qdisc.py by
	providing a spec dictionary based parser that simplifies a lot the
	verification (a test is provided as well).

2014-08-12  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfoTests: Do not try to read bonding options
	A user running the tests usually does not have sudo permissions
	to create a bond.

2014-08-12  Antoni S. Puimedon  <asegurap@redhat.com>

	tc_wrapper: Fix errno reporting
	When tc fails in and of itself, it returns with code 1. When it is
	due to kernel error as relayed by the kernel in rtnl_talk, it sets
	the return code to 2 and prints like so:

	    fprintf(stderr, "RTNETLINK answers: %s\n",
	            strerror(-err->error));

	Thus, if wrapper._process_request is to raise proper errno
	verifiable error codes in its TrafficControlExceptions, it is
	necessary that we do the inverse process, strerror -> errno.

	After this patch:

	When deleting a non-existing class as root:

	In [6]: wrapper._process_request(['class', 'del', 'dev', 'em1',
	                                  'classid', '1:2'])
	TrafficControlException:
	(2, 'RTNETLINK answers: No such file or directory\n',
	['/usr/sbin/tc', 'class', 'del', 'dev', 'em1', 'classid', '1:2'])

	And as regular user:
	In [49]: wrapper._process_request(['class', 'del', 'dev', 'em1',
	                                   'classid', '1:2']
	TrafficControlException:
	(1, 'RTNETLINK answers: Operation not permitted\n',
	['/usr/sbin/tc', 'class', 'del', 'dev', 'em1', 'classid', '1:2'])

	Both being the correct errno codes.

	tc_filter: make use of _parser for getting the relevant items
	The previous patch introduced a lot of parsing methods for the new
	qdisc tc module. This patch changes the already existing filter
	module to use them.

2014-08-11  Francesco Romani  <fromani@redhat.com>

	vm: graphdev: fix parameter passing
	This patch fixes the parameter passing to updateDevice.
	The problem is I originally overlooked how hook params are
	supposed to be passed to the hook.

	The tests with this patch highlights the problem:

	File "vdsm/vdsm/virt/vm.py", line 4408,
	in _setTicketForGraphicDev
	hooks.before_vm_set_ticket(self._lastXMLDesc, self.conf, params)
	File "/home/fromani/Projects/upstream/vdsm/tests/vmTests.py", line 1403,
	in _check_ticket_params
	self.assertEqual(params, TICKET_PARAMS)
	AssertionError: {'params': {'userName': 'admin', 'userId':
	'fdfc627c-d875-11e0-90f0-83df133b58cc [truncated]... != {'userName':
	'admin', 'userId': 'fdfc627c-d875-11e0-90f0-83df133b58cc'}
	- {'params': {'userId': 'fdfc627c-d875-11e0-90f0-83df133b58cc',
	? -----------

	+ {'userId': 'fdfc627c-d875-11e0-90f0-83df133b58cc', 'userName':
	'admin'} ? +++++++++++++++++++++

	    'userName': 'admin'}}

	Here the meaning of 'params', per API spec, is the same as setTicket.
	'params' should be a StringMap.

	Unfortunately, updateDevice accepts a single argument:

	'params': 'vmUpdateDeviceParams' (quoting spec again)

	Confusion arises by the nesting of 'params', hence the bug.
	The hook receives the nested params instead of the plain StringMap
	it should receive as per spec.

	Moreover, no hooks are using graphics devices, so this bug slipped
	unnoticed. The new tests will help this to not happen again.

	As nice side effect, this allows a cleaner and shorter
	implementation.

2014-08-11  Nir Soffer  <nsoffer@redhat.com>

	tests: Introduce AssertingLock
	When we want to test locking, we don't want to poke into object
	internals and check the state of objects locks, or even worse, mock out
	object lock.

	This patch introduces the AssertingLock, which unlike regular locks,
	never blocks when you try to acquire a lock somebody else is holding.
	Instead, this lock raises AssertionError, failing the test.

	Assuming that Foo object implements the context manager and use a lock,
	we can verify this by:

	    single_thread = AssertingLock()
	    foo = Foo()

	    def check():
	        with foo:
	            with single_thread:
	                time.sleep(0.1)

	Now we can run check in several threads; if foo is implemented
	correctly, single thread will be able to enter the foo context. If foo
	does not lock properly, multiple thread will enter this context, and
	then fail when trying to enter the AssertingLock.

	Turns out that in the SamplingMethodTests, I used a BoundedSemaphore for
	this purpuse which is incorrect. Incorrect code can be hidden becuase
	the testing threads would block instead of failing the tests. This code
	uses now an AssertingLock instead.

2014-08-09  Antoni S. Puimedon  <asegurap@redhat.com>

	tc: add qdisc parsing for some hfsc, ingress, pfifo_fast, etc
	This patch adds qdisc parsing capabilities to vdsm/network/tc.py which
	will aid in adding QoS configuring and reporting support. The queuing
	disciplines that can be parsed completely are:
	    - fq_codel,
	    - hfsc,
	    - ingress,
	    - pfifo_fast,
	    - sfq

	For an qdisc data like:

	    qdisc pfifo_fast 0: dev eth0 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
	    qdisc pfifo_fast 0: dev eth1 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
	    qdisc drr 1: dev eth2 root refcnt 2
	    qdisc tbf 10: dev eth2 parent 1:10 rate 32000Kbit burst 64Kb lat 4295.0s
	    qdisc tbf 20: dev eth2 parent 1:20 rate 3200Kbit burst 100Kb lat 4294.7s
	    qdisc tbf 30: dev eth2 parent 1:30 rate 800000Kbit burst 100Kb lat 4295.0s
	    qdisc ingress ffff: dev eth2 parent ffff:fff1 ----------------

	it would return the following dicts:

	    {'kind': 'pfifo_fast', 'handle': '0:', 'pfifo_fast': {'priomap': [1, 2, 2,
	     2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1]}, 'refcnt': '2', 'dev': 'eth0',
	     'root': True}
	    {'kind': 'pfifo_fast', 'handle': '0:', 'pfifo_fast': {'priomap': [1, 2, 2,
	     2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1]}, 'refcnt': '2', 'dev': 'eth1',
	     'root': True}
	    {'root': True, 'kind': 'drr', 'handle': '1:', 'refcnt': '2', 'dev': 'eth2'}
	    {'kind': 'tbf', 'handle': '10:', 'parent': '1:10', 'dev': 'eth2'}
	    {'kind': 'tbf', 'handle': '20:', 'parent': '1:20', 'dev': 'eth2'}
	    {'kind': 'tbf', 'handle': '30:', 'parent': '1:30', 'dev': 'eth2'}
	    {'kind': 'ingress', 'handle': 'ffff:', 'parent': 'ffff:fff1',
	     'dev': 'eth2'}

	Note that there is some basic information reported for unsupported
	qdisc classes (like tbf and drr).

2014-08-09  Petr Horáček  <phoracek@redhat.com>

	networkTests: assertBridgeDoesntExist added
	New assert added, i need it in a following patch:
	http://gerrit.ovirt.org/31018/

	dummies and veths with changeable prefix
	Veth's and dummy's create() functions have unrequired attribute
	prefix.

2014-08-09  Allon Mureinik  <amureini@redhat.com>

	spec: Require qemu-kvm-rhev in EL
	In EL qemu-kvm does not support live snapshots. In order to support
	them, qemu-kvm-rhev is required. This package is now available in the
	ovirt-releases repository [1].

	[1] http://www.ovirt.org/Vdsm_Developers

	Bug-Url: https://bugzilla.redhat.com/1127763

2014-08-08  Dan Kenigsberg  <danken@redhat.com>

	Drop ExclusiveArch
	Vdsm supports ppc, and should be built for ppc also for el7.

2014-08-07  Martin Perina  <mperina@redhat.com>

	fencing: Skip fencing if host is maintaining its lease
	1) Adds fencingPolicy parameter to fenceNode API call. The parameter is
	   optional, but it's supposed to be used in oVirt >= 3.5.
	2) fencingPolicy parameter can contain storageDomainHostIdMap, which
	   is a map of storage domains and host ids
	3) If clusterlock reports that host is live on at least one of specified
	   storage domains, the fence agent execution is skipped and host is
	   considered alive

	Bug-Url: https://bugzilla.redhat.com/1090799

2014-08-07  Antoni S. Puimedon  <asegurap@redhat.com>

	tc_tests: break down _ICMP into more understandable bits
	_ICMP used to be defined as just a long hex string and it was
	difficult to remember what each byte stood for. With this change,
	I made a breakdown with scapy, pasted it and broke down the hex
	string into smaller significant pieces.

2014-08-06  Federico Simoncelli  <fsimonce@redhat.com>

	fileSD: getMountsList should be a private function
	Renaming getMountsList with private prefix as the function is not
	expected to be used outside of fileSD.

	fileSD: include gluster in getMountsList
	It is not exactly clear what previous change broke scanDomains but
	looking at the code it seems that gluster was never explicitly handled.

	This patch adds the explicit support for gluster in scanDomains fixing
	the problem of missing storage domain links in the pool directory.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1116585

2014-08-06  Nir Soffer  <nsoffer@redhat.com>

	fencing: Introduce getHostLeaseStatus API
	When fencing another host, we like to check if the other host has access
	to storage, to prevent unwanted fencing of a lively host. This patch
	adds an internal API for getting another host status on monitored
	domains.

	The new getHostLeaseStatus API returns a dictionary of monitored domains
	UUIDs and host lease status for each domain, as reported by the cluster
	lock.  The caller will apply a fencing policy using this data to decide
	if host is lively enough to prevent fencing.

	Here is an example result:

	    {'04e604d3-71eb-41e0-a8a3-74404bdd9d75': 'live',
	     '09049dc6-2007-492e-afd9-3ec201775b2a': 'dead',
	     '20501ea5-cf6b-453a-b23d-a708c28cec1f': 'live',
	     '2b02c759-2e4a-4cf0-9b8e-37a6ec77f821': 'unavailable',
	     ...
	     'fc348be8-18f4-42ff-8421-9043203e13a6': 'live'}

	See clusterlock.py for the possible statuses and their meaning.

	Bug-Url: https://bugzilla.redhat.com/1110172

2014-08-06  Federico Simoncelli  <fsimonce@redhat.com>

	sp: add logging for stale domain link collection
	This patch adds logging to the stale domain link collection in order to
	better track links life-cycle.

	Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1116585

	sp: improve variables in _linkStorageDomain
	In order to avoid future confusion on _linkStorageDomain variables,
	they have been renamed with more meaningful names.

	Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1116585

	sp: fix storage domain link detection
	It seems that the storage domain link detection never worked. This patch
	fixes the intended behavior.

	Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=1116585

2014-08-05  Yoav Kleinberger  <ykleinbe@redhat.com>

	rpm: make vdsm-python package noarch
	The vdsm-python package should be noarch. It seems that this was simply
	forgotten previously. This patch fixes this issue.

2014-08-05  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: logging requests and responses
	There was missing information what requests and responses were coming in
	and going out from vdsm.

	Bug-Url: https://bugzilla.redhat.com/1124813

2014-08-05  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Refine names
	The domain monitor use to have monitoredDomains and poolMonitoredDomains
	properties. The word "monitored" in these names is unneeded, as the
	class is called DomainMonitor, and it does not keep other lists of
	domains.

	I replaced the _domains variable to the more specific _monitors, since
	this dict keep domain monitors, not domain objects.  This is required
	now to prevent confusion, since the new domains property does not return
	the dict but its keys.

	Finally, when we get a monitor from the _monitor dict, we call it
	monitor instead of domainThread. It is true that this object is related
	to a domain and it run in a thread, but responsibility of this object is
	monitoring.

2014-08-04  Dima Kuznetsov  <dkuznets@redhat.com>

	packaging: Make vdms_reg bridge configurable
	Added -with-reg-bridge-name= option to configure script which defaults
	to ovirtmgmt.

	packaging: Changes for official builds
	Made engine name and smbios values configurable and moved out
	hard-coded values into configuration script:
	 * registration URI
	 * qemu-kvm/qemu-img package names.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1119020

2014-08-03  Dima Kuznetsov  <dkuznets@redhat.com>

	spec: Move /lib files to /usr/lib
	Fedora 19+ and EL7 stopped using /lib which is now a symbolic link to
	/usr/lib and deprecated installing files to /lib.

	We store the following files in /lib:
	 * systemd configs:
	 Not present on EL6, if using systemd always install to /usr/lib.

	 * udev rules:
	 Checks if current version is EL6 and installs to old or new path
	 accordingly.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1121494

2014-08-01  Antoni S. Puimedon  <asegurap@redhat.com>

	net_configurators: Fix optional configurator importing
	With the arrival of the first truly optional (its dependencies do not
	need to be installed) configurator, i.e., pyroute_two, a flaw in my
	getConfiguratorClass was exposed.

	With this patch, all configurators should explicitly define a
	    is_available()
	method that returns True if it is required and False if it is
	optional and some of its dependencies are missing. Additionally,
	all the extra dependency importing should not raise.

2014-08-01  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Introduce cancellation points
	While monitoring domain, the monitor perform some operations that we
	would like to avoid if the monitor thread was stopped while running
	the _monitorDomain method. Example operations are accessing shared
	storage, which may block for long time, or acquiring a host id.

	This patch adds the @cancelpoint decorator, that can be used to mark
	methods as cancellation points. Some of the domain monitor thread
	methods are marked as cancellation points, ensuring that a monitor will
	stop as soon as possible when stopped.

	domainMonitor: Extract domain monitoring methods
	The _domainMonitor method was extremely long and was doing too much.
	This patch breaks it to multiple small methods to make it easier to
	understand and modify.

	One of the planned changes is to allow _domainMonitor to abort in the
	middle if a monitor is stopped. Implementing this in the original method
	would only make it worse. To make it easy, operation that may take lot
	of time were extracted into separate methods.

	This patch does not change the behavior of the monitor, only move code
	around.

	domainMonitor: Ensure that host id is released
	Previously unexpected exception could cause the domain monitor thread to
	exit without releasing the host id. Stale host id will prevent removal
	of logical volume and the underlying devices, and prevent stopping of
	sanlock, requiring a reboot to upgrade a host.

	Now try finally block ensures that host id is is always released.

	domainMonitor: Stop domain monitors concurrently
	Deactivating a host connected to lot of storage domains takes too much
	time. This is caused by stopping each domain monitor thread and waiting
	until the thread exit before stopping the next one.

	If you stop vdsm when connected to many storage domains, vdsm may be
	killed before all domains monitors are stopped. This may leave
	unreleased host ids held by sanlock, which prevent stooping of sanlock,
	and requires a reboot to upgrade the host.

	This patch changes stopMonitoring() to accept an iteratable of sdUUIDs
	instead of single value. When stopping multiple monitor threads, instead
	of stopping each thread and waiting until the thread exit, we first stop
	all threads, and then wait until all of them exit.

	I tested this patch on Fedora 19 machine connected to 30 storage
	domains. The time to stop all monitors dropped from 67 to 10 seconds.
	Profiling show that most of the time is spent waiting for sanlock to
	release the host id.

	image: Detect cycles in image volume chain
	When sorting volume chains, we could get into an endless loop if there
	was a cycle in the volume chain, for example, a volume claiming to be
	its own parent.  The endless loop create a new volume object on each
	iteration, and adds it to the chain list, and will stop only when no
	more memory is available or vdsm is stopped.

	Now ImageIsNotLegalChain is raised as soon as a cycle is detected.

	Bug-Url: https://bugzilla.redhat.com/1125197
	Relates-To: https://bugzilla.redhat.com/1124498

2014-08-01  Francesco Romani  <fromani@redhat.com>

	migration: deprecate != 'online' migrations
	Since long time the only supported method for migration
	is actually 'online'. In the API schema, the methods
	are actually an enumeration with a single value ('online').

	This patch adds an explicit deprecation reminder.

2014-07-31  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: remove Link cli parser
	Nowadays we only use the Link object creation from dictionary (in
	the netlink Link gathering flow. This code was deprecated and
	unused (except for some tests). It is the time to get rid of this.

2014-07-31  Alon Bar-Lev  <alonbl@redhat.com>

	build: add missing root folder files into tarball
	tarball should contain all source control files plus
	generated files.

2014-07-31  Genadi Chereshnya  <gcheresh@redhat.com>

	netinfo_tests: load bonding module for Centos7
	In Centos7 bonding module is not automatically loaded
	Added decorator to testGetBondingOptions to load bonding module
	in case it is not loaded

2014-07-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	RHEL7 works with systemd and requires systemd macros and tmpfiles.d conf
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1122198

	Remove dmidecode build requirement

2014-07-31  Dan Kenigsberg  <danken@redhat.com>

	net: Mark removed interfaces with NM_CONTROLLED=no
	Bug-Url: https://bugzilla.redhat.com/1124876

2014-07-31  Petr Horáček  <phoracek@redhat.com>

	pyroute2: unused import removed

	pyroute2: REQUIRED_BONDINGS condition removed
	netinfo.REQUIRED_BONDINGS condition removed from pyroute2 configurator as in
	iproute2 (commit 341b6fb5a6487bd4d01e55fded2b8caad7d97035).

	pyroute2: optional configurator added
	Pyroute2 was added as new optional configurator. pyroute2 library, which it
	requires, is not listed as a dependency because it is not strictly necessary.
	If you want to use this configurator, you have to install current library
	version (0.2.12) from pip or GitHub https://github.com/svinota/pyroute2. If
	someone tries to use it and does not have it installed, it writes an ERROR log
	and uses Ifcfg instead.

	Necessary changes were made in spec file, debian install file and Makefile
	because of the new file network/configurators/pyroute_two.py

	It makes sense to have iproute2 and pyroute2 options in config file.
	pyroute_two looks ugly. Anyway we can not rename pyroute_two.py too because of
	import conflicts with library.

2014-07-31  Robert Cernak  <robocernak@gmail.com>

	Pyroute2 network configurator
	Network configurator used for setting network devices.
	Configuration is done using pyroute2 library.

2014-07-30  Nir Soffer  <nsoffer@redhat.com>

	spec: Create default multipath.conf during install
	/etc/multipath.conf does not exits after multipath is installed. This
	causes multipathd to fail silently when started as vdsmd rquired
	service. Later, when vdsm install new configuration and try to reload
	multipathd, it fails and panics.

	Example multipathd start on RHEL 7:

	    [root@reserved-0-247 ~]# systemctl start multipathd
	    [root@reserved-0-247 ~]# systemctl status multipathd
	    multipathd.service - Device-Mapper Multipath Device Controller
	       Loaded: loaded (/usr/lib/systemd/system/multipathd.service; enabled)
	       Active: inactive (dead) since Fri 2014-07-25 13:55:48 IDT; 14min ago
	               start condition failed at Fri 2014-07-25 14:10:04 IDT; 2s ago
	               ConditionPathExists=/etc/multipath.conf was not met

	On EL6, multipathd run when configuration is not available, blacklisting
	all devices. It log this message to /var/log/message in this case:

	    Jul 25 15:25:28 dhcp-1-210 multipathd: /etc/multipath.conf does not
	    exist, blacklisting all devices.

	This patch uses mpathconf to create a default multipath.conf if the file
	does not exists during installation. This configuration blacklist all
	devices, simulating the behavior of multipathd on EL6.

	Bug-Url: https://bugzilla.redhat.com/1120209

2014-07-30  Dan Kenigsberg  <danken@redhat.com>

	net tests: add a minimal test for getVdsStats
	This patch verifies that the vlan devices added by
	testSetupNetworksAddBondWithManyVlans are reported by getVdsStats.

2014-07-30  Antoni S. Puimedon  <asegurap@redhat.com>

	iface_sampling: Fix debug logging samples
	Currently we have a debug logging entry whenever the tx/rx rates go
	over 100%. In this log, we try to help debugging of the issue by
	printing the sample value of rx and tx for all the samples in the
	AVERAGING_WINDOW (size 5).

	The problem comes from the fact that the decision to log is taken
	by checking samples hs0 and hs1 iterating over all the devices
	existing on the older hs1. However, there is no guarantee that
	the devices would exist in hs2, hs3, ..., hs_AVERAGING_WINDOW.

	The fix is to simply not include the samples for which the device
	is missing.

	Bug-Url: https://bugzilla.redhat.com/1116577

2014-07-29  Antoni S. Puimedon  <asegurap@redhat.com>

	dhclient: fix kill_dhclient for dhcp reconfigure flow
	When configuring a device with dhclient, we always ask dhclient to
	kill any dhclient daemon that there might be running for the device,
	so that the new dhclient that we (or initscripts) launch will not
	abort due to it.

	Unfortunately, I did not know nor consider that dhclient, when
	checking the interface for discovering, checks that it does not have
	any IP address configured other than '0.0.0.0'. Thus, in order for
	the new dhclient invokation to succeed all the way to daemonization,
	it is necessary to flush the ip addresses of the device.

	Another mistake it had was assuming that the pidfile would be
	found by dhclient -x, but it only knows to look on a path that
	is not used by initscripts nor other tools.

	Bug-Url: https://bugzilla.redhat.com/1122477

2014-07-29  Petr Horáček  <phoracek@redhat.com>

	iproute2: overwrite existing bridge if necessary
	When iproute2 tries to add new network over existing bridge, brctl raises an
	error: AssertionError: ["device test-network already exists; can't create
	bridge with the same name"] while ifcfg handles that situation without
	a problem.

	I changed iproute2's addBridge to ignore this error.

	I've already wrote a test for this case http://gerrit.ovirt.org/#/c/30578/

	networkTests: old bridge overwrite
	New created network should overwrite old bridge with the same name.

2014-07-29  Francesco Romani  <fromani@redhat.com>

	vm: split migration completion in smaller methods
	Refactor _waitForIncomingMigrationFinish in smaller
	methods for clarity and to prepare for better
	timeout handling. The method was renamed for better
	clarity: in the case of dehibernation it wasn't
	waiting for anything.
	No functional changes.

2014-07-28  Dan Kenigsberg  <danken@redhat.com>

	API.updateTimestamp: use touchFile
	Opening a file for writing with the file() constructor is frowned upon.
	Particularly when we have a library function that does the intended
	action properly.

2014-07-28  Adam Litke  <alitke@redhat.com>

	virt: Change log level for disk stats collection failure
	When hotplugging a new disk, samples for the newly added device will not
	be immediately available which results in a KeyError Traceback in
	vdsm.log.  Since this condition is expected, downgrade the logging level
	from exception to warning.  In the case of a hot plugged disk, the
	failure resolves once enough samples have been collected.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1112998

	Live Merge: support active layer commit
	Libvirt is currently adding support for merging the active layer.  This
	operation works similar to a block copy job since it has two phases.  In
	the first phase, data is merged from the active layer into base.  During
	this phase mirroring ensures that active IO is also directed to the base
	snapshot.  Phase 1 is complete when 'cur' == 'end' in the block job
	info.  Vdsm triggers the second phase of the job by calling the
	blockJobAbort function with a special PIVOT flag which instructs libvirt
	to pivot the disk from the active layer to the base.  Once this is
	complete, libvirt will stop reporting the job and vdsm will handle
	post-job cleanup as usual.

	This patch depends on currently unreleased libvirt and qemu features
	that are targeted for a near term release.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109918

	Live Merge: Ignore libvirt block job events
	Since VDSM needs to handle missed block job completion events that may
	have been emitted while the daemon was stopped, it is best to not rely
	on the events at all and initiate all cleanup operations from the
	existing polling function.  Since a volume chain sync can be a
	relatively expensive operation involving HSM calls, run it in a separate
	thread.  Depending on the current state of the storage, the sync may
	need to be retried.

2014-07-28  Antoni S. Puimedon  <asegurap@redhat.com>

	tc: replace mirred filter parsing with a generic filter parser
	For now, we only need to parse filters with mirred actions. This
	must change in order to implement the Quality of Service feature,
	which will require parsing classes, queuing disciplines and other
	kinds of filters.

	This patch adds a generic parsing filter and lays the structure
	for iterating over other Traffic Control entities.

2014-07-28  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Cleanup imports
	- Import only modules, except sdCache and config that we import
	  everywhere. This should be fixed by converting them to modules since
	  they are singeltons anyway - in another patch.
	- Import standard library modules before vdsm
	- Import vdsm library modules before package modules
	- Use relative imports for package imports
	- Sort imports in each group

2014-07-27  Saggi Mizrahi  <smizrahi@redhat.com>

	stomp: Server side heartbeat implementation

2014-07-24  Nir Soffer  <nsoffer@redhat.com>

	init: Start vdsmd after required services
	When using systemd, vdsm was restarted concurrently with the services it
	requires. This caused a race where vdsm may try to access one of those
	services before they are started.

	This patch use systemd.unit's "After" option to ensure that
	vdsmd starts only after the required services are started.

	Relates-to: https://bugzilla.redhat.com/1120209

2014-07-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Arrange pthreading requirement to 0.1.3-3 which includes locked() impl

2014-07-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Changing isconfigured parameter semantics
	Currently isconfigured holds boolean and that way the name is misleading as
	True doesn't mean the module is actually configured. This patch changes
	that and put in isconfigured just the ret value of isconfigured() on the
	specific module instead of calling it twice, and later on we use this
	parameter to decide when to reconfigure the module or not.

2014-07-22  Yeela Kaplan  <ykaplan@redhat.com>

	oop: add missing utils.forceLink
	Bug-Url: https://bugzilla.redhat.com/1120721

2014-07-22  Ondřej Svoboda  <osvoboda@redhat.com>

	tests, schema: Replace deprecated uses of bootproto 'static' with 'none'
	'none' has settled to signify static network configuration both in initscripts
	(see sysconfig.txt or search for "Interface Configuration Files") and VDSM
	(mostly in functional network tests).

2014-07-22  Dan Kenigsberg  <danken@redhat.com>

	connectivity log: add to spec with proper ownership
	Without this hackery, connectivity.log is owned by root on ovirt-node
	which prevents Vdsm from starting.

	Bug-Url: https://bugzilla.redhat.com/1120049

2014-07-21  Dan Kenigsberg  <danken@redhat.com>

	connectivity log: report dropped devices
	When a networking device is removed from the host it (and its most
	recently recorded state) is logged to connectivity.log

	Bug-Url: https://bugzilla.redhat.com/1111234

	connectivity log: report if Engine has been seen recently
	Vdsm monitors when it has been accessed by a client (most probably
	Engine). If Vdsm finds out that it has not been accessed for the last 30
	seconds (twice the Enginei's polling rate), "recent_client:False" is
	logged to the connectivity.log. When polling is restored,
	"recent_client:True" is reported.

	Bug-Url: https://bugzilla.redhat.com/1111234

	connectivty log: log duplex state
	Add detected changes of full/half duplex to connectivity.log

	Bug-Url: https://bugzilla.redhat.com/1111234

2014-07-21  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: lastclient info in jsonrpc
	In xml binding there is a hack for getCapabilites which before
	sending response adds listclient and lastClientIface.

	We can not modify API.py to provide this information in a common place
	because it is meaningless for mom thread , or any other in-process API
	consumer.

	We provide similar hack for jsonrpc at the level where we have enough
	information to send back required information.

	Bug-Url: https://bugzilla.redhat.com/1099500

2014-07-20  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: reducing logging noise
	Removed log entires which are not critical to understand how requests
	are processed. Fixed few spelling mistakes.

2014-07-20  Lukas Bednar  <lbednar@redhat.com>

	hsm.py: volUUID is not member of HSM class
	this issues was found using static analysis of code.
	it was causued by 24ad94dd, this change should be backported to all
	branches which contains change mentioned above.

2014-07-18  Adam Litke  <alitke@redhat.com>

	Live Merge: improve log messages
	Make it easier to debug live merge flows by reporting the job ID
	whenever it is available.  This will make the messages more istent and
	easy to correlate.

	Live Merge: Stop scanning volume chains at VM startup
	During VM create (or recovery) we are scanning the volume chain of each
	disk to catch and handle metadata sync issues.  These can happen if a
	block job completed while vdsm was not running or if a block job
	completed when the VM was running on another host but the metadata could
	not be corrected before it was restarted on this host.

	Both of these negative flows are relatively rare but the volume chain
	scanning code incurs a startup penalty on every create/recoverVM.  Drop
	the scanning and handle these cases differently.  To address the first
	scenario, we are going to move away from using the libvirt events and
	rely solely on our cached _blockJobs info stored in the VM recovery
	file.  For the second case, we are going to cooperate with the engine
	and allow it to resubmit the same live merge command when the end state
	of the first submission is ambiguous.  Vdsm will handle the resubmit by
	ensuring the metadata is synchronized.

2014-07-18  Francesco Romani  <fromani@redhat.com>

	virt: move _DomXML into the xml module
	Move virt.vm._DomXML into virt.vmxml.Domain
	Fix paths and imports (e.g. vmxml.Element -> Element),
	no functional changes.

	virt: xml: add utility functions
	Add utility functions factoring out common
	operations over the `devices' element of the domain XML.

2014-07-18  Dan Kenigsberg  <danken@redhat.com>

	Do not update timestamp on API.getVMList
	Commit 95302a moved the call to _updateTimestamp from the XMLRPC binding
	to the API level. This has the adverse effect of having a local API
	call, that does not use networking at all, to update the client
	timestamp.

	Since MoM calls getVMList periodically, this effectively breaks the
	connectivityCheck feature of the setupNetworks and editNetwork API
	calls: even if such a call breaks network configuration, Vdsm thinks
	that it is still reachable by a client, and maintains the broken
	configuration instead of reverting it.

	Bug-Url: https://bugzilla.redhat.com/1119024

2014-07-17  Federico Simoncelli  <fsimonce@redhat.com>

	supervdsm: remove unused lsblk module
	The method getLsBlk was added in commit 6ee565b without any explanation
	on why it's needed. I couldn't find any trace of this being ever used.

2014-07-17  Martin Sivak  <msivak@redhat.com>

	Support ioTune values >2^31 in getStats over xml-rpc
	This fixes issue with getStats over xml-rpc when ioTune value
	is accidentally increased beyond cca 2e9 (2GB per second).

2014-07-17  Federico Simoncelli  <fsimonce@redhat.com>

	supervdsm: remove unused md_utils module
	The method getMdDeviceUuidMap was added in commit b9b6ca2 without any
	explanation on why it's needed. I couldn't find any trace of this being
	ever used.

	volumeTests: add BlockDomainMetadataSlotTest
	A new test has been added to check the metadata slot selection.

2014-07-16  Francesco Romani  <fromani@redhat.com>

	vm: make _isDomainRunning more robust
	The Vm._dom atrribute may be set to None
	asynchronously by the _onQemuDeath callback.

	This patch makes sure that the
	Vm._isDomainRunning method can cope with this fact.

2014-07-16  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Degrading epoll errors in vmchannels to log level INFO
	Error events from epoll are quite common due to lost connections
	on shutdown, migrations or suspension of VMs, since this is not
	a critical error the message gets degraded to INFO.

	Bug-Url: https://bugzilla.redhat.com/1102549

2014-07-16  Francesco Romani  <fromani@redhat.com>

	vm: use vmxml.Element in snapshot method
	Use vmxml.Element instead of xml.dom.minidom.Element
	in vm.snapshot
	No functional changes.

	vm: use vmxml.Element in setLinkAndNetwork
	Use vmxml.Element instead of xml.dom.minidom.Element
	in vm.setLinkAndNetwork.
	No functional changes.

	vm: replace minidom.Element for memory snapshots
	The _memorySnapshot method used to manipulate directly
	xml.dom.minidom.Element items.
	This patch allow the code to do the equivalent by using
	vmxml.Element instead.

2014-07-15  Francesco Romani  <fromani@redhat.com>

	virt: move __hacked_writexml in the vmxml module
	No reason to keep this hack under the spotlight,
	and give to vm.py some much needed relief.
	No code changes.

2014-07-15  Yeela Kaplan  <ykaplan@redhat.com>

	fix error handling in isdir and islink
	isdir and islink implemented using ioprocess will
	throw an exception in case of stat failure because of
	errno ENOENT, while it should return False.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1115123

2014-07-15  Francesco Romani  <fromani@redhat.com>

	virt: introduce a XML processing module
	this patch bootstrap a XML processing module for the
	virt package, by extracting the core class:

	virt.utils.XMLElement -> virt.vmxml.Element

	The module is named 'vmxml' and not just 'xml'
	to avoid name clashing with python stdlib inside
	the new module, (see imports), and because just
	'xml' seem a bit too generic here.

2014-07-15  Nir Soffer  <nsoffer@redhat.com>

	tests: Separate test runner from test library
	The test runner was used both as a script and as a library for testing
	utitilies. This cause the module to be imported twice, performing
	various hacks twice.

	Runnning pthreading.monkey_patch() twice fails with upstream pthreading,
	which ensure that monkey pataching is not too late. The check in
	pthreading should be fixed, but it expose the problem in the testrunner.

	This separate the library code from the script realted code and hacks
	that must run once in the context of the test runner script, fixing
	the double invocation of pthreading.monkey_patch().

	Bug-Url: https://bugzilla.redhat.com/1119172

2014-07-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Configure modules without --force flag when isconfigure returns false
	In http://gerrit.ovirt.org/#/c/28007 we introduced enum for isconfigured
	return value. This allows to recognize when module conf should be
	overrided or not. But during that we omitted the configure phase for calls
	without --force flag. This patch adds that back.

2014-07-14  Enrico Tagliavini  <enrico.tagliavini@gmail.com>

	tests: Add symlink mount test
	Some filesystems like gfs2 resolves symlink (as /dev/mapper/name or
	/dev/vg/lv), and the real device will appear in /proc/mounts instead of
	the original device symlink specified on the command line. This adds a
	test for this case.

	This test use a symlink to a backing image mounted using the loop
	device. This is a simple way to simulate the same issue when using gfs2.

	Bug-Url: https://bugzilla.redhat.com/888711

2014-07-14  Martin Sivak  <msivak@redhat.com>

	Remove noisy log message from CPU metadata collector
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1119336

	Change method names in vmtune.py to the PEP8 style

	Add API.VM.getIoTunePolicy
	This method can be used by MoM to retrieve the current ioTune
	boundaries from the domain xml metadata section.

	Add API.VM.setIoTune
	This allows MoM (and the engine if necessary) to set the iotune
	limits for disk devices.

2014-07-14  Martin Polednik  <mpoledni@redhat.com>

	vdsm: disable virtio-rng on rhel < 6.6
	Virtio-rng support was added in libvirt 1.0.3, and is missing in
	EL 6.5 (It is supported since libvirt version 0.10.2-31 only).
	The support is indicated by not sending the rngSources in hostCapabilities.

2014-07-14  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: Shuting down protocol detector fails
	When protocol detector is stopped during shutdown, an exception was
	raised. The stop code ignores EPIPE which means that the other side of
	the pipe is disconnected.

	Bug-Url: https://bugzilla.redhat.com/1115104

2014-07-13  Nir Soffer  <nsoffer@redhat.com>

	mailbox: Fix unsafe locking
	In setMaxHostID, both _inLock and _outLock are acquired and released in
	an unsafe way, not ensuring that the locks are released on errors.  Both
	locks use now with block. The rest of the file use currently try finally
	but I plan to convert these to with in a later patch.

	Relates-to: https://bugzilla.redhat.com/1117795

2014-07-12  Martin Sivak  <msivak@redhat.com>

	Add setIoTune and getIoTunePolicy to the xml-rpc API

2014-07-12  Francesco Romani  <fromani@redhat.com>

	virt: migration: use contextmanager for monitor
	This patch factors the monitor thread
	control in a context manager to make code
	clearer and less cluttered.

	virt: migration: replace magic number
	replace a magic constant with the symbolic name to clarify
	the intent of the code.

	What the code does is to check the migration job is still active.
	The symbolic name was found by checking the docs:

	http://libvirt.org/html/libvirt-libvirt.html#virDomainJobInfo

	(beware of misalinged comments).
	'jobType' can be one of
	http://libvirt.org/html/libvirt-libvirt.html#virDomainJobType

2014-07-11  Martin Sivak  <msivak@redhat.com>

	Add IO tunables support to updateVmPolicy
	This allows the engine to set the hard and soft limits for IO.
	MoM will then use those limits as a boundaries for dynamic
	iotune updates.

2014-07-11  Francesco Romani  <fromani@redhat.com>

	tests: fix pep8 errors
	Commit: a2890d5d614e856a44102d61576a8591a8d2e52f
	introduced pep8 and pyflakes errors in tests.
	This patch fixes that.

2014-07-11  Ondřej Svoboda  <osvoboda@redhat.com>

	netmodelsTests: Test IPv6.validateAddress and IPv6.validatePrefixlen
	Use addresses with prefixes to test the latter function.

2014-07-11  Francesco Romani  <fromani@redhat.com>

	vm: fix getVmPolicy return type.
	in case of error, getVmPolicy will return a VDSM API return
	value, which may confuse the caller.
	This patch makes getVmPolicy returns explicitely None on error,
	and let the caller handle this condition and bail out correctly.

2014-07-11  Nir Soffer  <nsoffer@redhat.com>

	mailbox: Remove fatal, uneeded, and racy check
	After errors in _checkForMail, the error handling code check if the
	_inLock is locked and release it. This check is pointless as
	_checkForMail use try finally block to acquire and release this lock.
	There is no chance that this lock will not be released when returning
	from _checkForMail.

	This check cause the mailbox thread to exit when using pthreading 1.3,
	which reveal the fact that the locked() method was never implemented by
	pthreading. This eliminate the fatal failure.

	Bug-Url: https://bugzilla.redhat.com/1117795

2014-07-10  Francesco Romani  <fromani@redhat.com>

	virt: migration: simplify the remote port handling
	When the destination port for migrations is not explicitely
	given, the current code in _setupVdsConnection does a clumsy
	gimmick to get it from the BindingXMLRPC internals.

	This unnecessarily makes the coupling stricter.
	Instead, just use the port specified as per configuration,
	which is the same setting the XMLRPC bindings are using
	anyway.

2014-07-10  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Accept all stomp commands
	Protocol detector needs to accept all stomp commands. The connection can
	be lost at any time with the engine so we need to make sure that we
	still accept incoming connections from the engine.

	Bug-Url: https://bugzilla.redhat.com/1115044

	vdsm: check attribute not object type
	Checking existance attribute is more flexible than checking object
	type.

2014-07-10  Nir Soffer  <nsoffer@redhat.com>

	pep8: Fix indentation violation

2014-07-10  Antoni S. Puimedon  <asegurap@redhat.com>

	net: skip network restoration if its physical devs are missing
	When performing network restoration on boot it is important that the
	operation configures as many networks as it can and that the
	operation does not fail so that vdsm can start.

	In case a device breaks down, it is possible that the host had other
	networks configured that would still allow remote access after
	reboot.

	This patch allows this use case by filtering out bond and net
	configuration depending on missing physical devices. It also
	introduces error level logs to make it very apparent when
	troubleshooting.

	Bug-Url: https://bugzilla.redhat.com/1113091

2014-07-09  Yoav Kleinberger  <ykleinbe@redhat.com>

	tests: revived forgotten test
	It appears that the original author meant for the writeLargeData to be a
	test, but forgot the `test' prefix.
	Moreover, previously the test asserted data>4096, where data is a
	string, which in python is always True. I simplified it a bit, and
	removed the trivial assertion.

2014-07-09  Mooli Tayer  <mtayer@redhat.com>

	configurator.py: fix _removeFile to do as described in it's doc string.
	Remove file in a non racy way without using the utils.rmFile()
	which assumes the file exists.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109569

	configurator.py: call Node's delete() for file deletion on node.
	delete() unpersists and shreds the file. the previous call to unpersist
	after deleting a file is wrong.

2014-07-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	deployUtil: add %s for logging call
	In commit d78b36b50 introduces a logging call missing
	%s which generates TypeError. With this error ovirt-node
	registration is not able to complete.This patch adds the %s.

2014-07-09  Antoni S. Puimedon  <asegurap@redhat.com>

	upgrade: fix seal persistence for oVirt node
	The oVirt node filesystem is not persistent by default. However, it
	has a mechanism to persist files and directories. It is necessary
	for a mechanism such as the upgrade sealing, that depends on files
	surviving reboots, to make sure that the files are persisted.

	This bug had a crucial effect on the referenced bug. On boot:
	- the upgrade to unified script would run before restore-nets
	- Since restore-nets hadn't run, nothing would be on running config
	- upgrade to unified would save that empty running config as
	  persisted
	- restore-nets would then run and restore to a non existing
	  configuration.

	Bug-Url: https://bugzilla.redhat.com/1108571

2014-07-09  Martin Sivak  <msivak@redhat.com>

	Refactor XMLElement to virt.utils
	This is needed to avoid cyclic dependencies when other files
	need the xml helper class.

	Refactor updateVmPolicy to use DOM manipulation
	This allows updating the old values instead of just setting
	new data. It will be needed when more sections than cputune
	are present in the metadata xml, because libvirt can only set
	the full metadata block (no partial updates).

2014-07-09  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: Get rid of unused methods
	In the move to libnl's netlink interface to the kernel networking
	information we stopped using several of ipwrapper's methods. This
	patch removes those that had no usage whatsoever.

	ifcfg: make default route network be started by sysV
	With the change to unified persistence, the networks defined by vdsm
	are only started and restored on boot by vdsmd itself. The issue with
	this is that if vdsmd fails to start for whichever reason, that may
	impede remote access to the machine.

	This patch is a transitional improvement (future releases will have
	separate vdsm-network and vdsmd services and initializations).

	This patch solves the issue by making all the interfaces that are
	needed for the network that is defined to carry the default route
	(typically the management network) have ONBOOT=yes. Setting this
	makes the initscripts network service configure the network itself.
	So for the default route network, the boot process is going to:
	    a) sysV or systemd start network.service,
	    b) network.service goes over all the ifcfg files and ifups those
	       with ONBOOT=yes
	    c) vdsmd start will call vdsm-network-restore-config which will:
	        + flush ifcfg files
	        + call setupNetworks to restore all the defined networks.

	It's easy to see that if (c) does not happen we will be left with
	only the default route network, so remote access will still be
	possible.

2014-07-09  Martin Sivak  <msivak@redhat.com>

	Add soft dependency on libvirt's metadata support to stats collector
	There is an issue with libvirt on CentOS 6. The available version does
	not support part of the metadata API. This generates an error message
	every 15 seconds.

	This patch workarounds this by logging the error only once.

	Revert once libvirt supports the xml element metadata on CentOS.

	See bug: https://bugzilla.redhat.com/show_bug.cgi?id=1115039

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1114968

2014-07-08  Dan Kenigsberg  <danken@redhat.com>

	connectivty log: more readable changes
	Before this patch, the name of a new interface, as well as the name of
	an interface with a changed property, was not recorded in
	/var/log/connectivity.log. This patch add an <iface_name>: qualifier to
	make the log more informative.

2014-07-08  Ondřej Svoboda  <osvoboda@redhat.com>

	models: Reorder bonding options so the mode is applied first
	The option lacp_rate, for instance, is exclusive to the mode
	802.3ad (4) and changing it under the default mode balance-rr (0)
	results in "Operation not permitted" error.

	Guard against this by ordering the mode first (and the rest of
	options alphabetically).

2014-07-08  Nir Soffer  <nsoffer@redhat.com>

	utils: Remove unused code

2014-07-08  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: replace the last dependency on ethtool with netlink
	After the last work on the lib/vdsm/netlink package and the extensive
	usage of it throughout netinfo, there was little reason to continue
	to have two libraries for our network information gathering. We still
	have vdsm/network/tc.py and testing dependencies on ethtool that will
	soon be gone. When that happens, we can remove it from packaging
	requirements.

2014-07-07  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: Missing hostId parameter on reconstructMaster verb
	Json schema was not consistent with API.py for StoragePool class and
	reconstructMaster method. There was missing hostId parameter.

	Please note that there is parameter ordering difference for coresponding
	xmlrpc poolReconstructMaster method.


	Bug-Url: https://bugzilla.redhat.com/1115466

	vdsm: extend image over jsonrpc
	Schema file was not consistend with API.py. All the verbs should use
	the same constructor param names as it is defined in API.py.

	Bug-Url: https://bugzilla.redhat.com/1113670

	vdsm: verifyingTransport testing
	Changing unused command line test to unit test. SecureXMLRPCServer is
	not used by vdsm code base and it was moved to verifyingTransportTests
	to be used to make sure that Verifing* classes work.

2014-07-07  Daniel Erez  <derez@redhat.com>

	hsm:  deleteImage - fix string format
	getExclusiveLock -> namespace should be formatted
	as '"%s_%s" % (imgUUID, sdUUID)'.

2014-07-07  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: drop unused intToAddress
	Back when we introduced ipwrapper's Route class (commit
	9903861228c4b16fa5636f626e7548f8f0d0f41f), we dropped the only
	usage of netinfo's intToAddress. Since it had a very specific
	usage, it is safe to drop it.

	netinfo: drop unused NetInfo.getBridgelessNetworkForIface
	Commit fb443166d483dbff199f7e35313304f849b98470 not only changed the
	method so that it would return only a single network, but also
	removed its only usage. It is time to drop it.

	netinfo: drop generally unused NetInfo.getNicBondings
	getNicBondings was only used as a rather verbose convenience method
	for getNicBonding. It is better to just have a simplified version
	inside getNicBonding.

2014-07-07  Adam Litke  <alitke@redhat.com>

	Live Merge: Explicitly save block job info
	When we removed _blockJobs from the VM.status() it had the unfortunate
	side effect of causing block job info to not be saved by VM.saveState().
	Fix this by explicitly adding it to toSave.

2014-07-07  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: remove deprecated getaddr and getnetmask
	In 5fa87504543719fdc827d2284738a7723b8a5973 we started using libnl
	to retrieve both ipv4 addresses and netmask and these methods fell
	into deprecation. It's time to get rid of this old ethtool using
	code.

	netinfo: remove unused getipv6addrs
	In 5fa87504543719fdc827d2284738a7723b8a5973 we started using libnl
	to retrieve both ipv4 and ipv6 addresses and this method fell into
	deprecation. It's time to get rid of this unused code.

	netinfo: add gateway reporting to all devices
	by adding gateway reporting to all the devices we make it possible
	to for a vdsm client to gather which is the gateway of the device
	that is to be used for providing link to a bridged (VM) network.

	netlink: add route retrieval capability
	Currenlty we use iproute2 external processes and parsing to retrieve
	the ip routes and rules that are on the system. This patch implements
	the information retrieval using libnl, lowering the resource needs
	and increasing the performance.

	As an example, to retrieve the the routes that we are interested in
	for source routing we would now do:

	    In [9]: list((route for route in netlink.iter_routes() if route['oif'] == 'dummy_90' and route['scope'] == 'universe' and route['family'] == 'inet')
	    )
	    Out[10]:
	    [{'destination': '240.0.0.0/24',
	      'destination_length': 24,
	      'family': 'inet',
	      'gateway': '240.0.0.1',
	      'oif': 'dummy_90',
	      'scope': 'universe',
	      'source': None,
	      'source_length': 0,
	      'table': 252},
	     {'destination': 'none',
	      'destination_length': 0,
	      'family': 'inet',
	      'gateway': '240.0.0.254',
	      'oif': 'dummy_90',
	      'scope': 'universe',
	      'source': None,
	      'source_length': 0,
	      'table': 252}]

	Note that it would be easy to extend for the inet6 family and that
	the table number is wrong in el6 because libnl-1 only has an uint8
	for the table instead of the 32bits of rta_table. For this reason,
	on el6.5 the filtering by table is not possible (as we report None).
	Libnl3 distros, on the other hand, can do a fast and correct
	filtering just checking the table number.

	The performance as measured by ipython is:
	    %timeit list((route for route in netlink.iter_routes() if route['oif'] == 'dummy_90' and route['scope'] == 'universe' and route['family'] == 'inet'))
	    1000 loops, best of 3: 907 us per loop

	While the current solution, before parsing and filtering is:
	    In [16]: %timeit ipwrapper.routeShowTable('4026531841')
	    1000 loops, best of 3: 1.81 ms per loop

	netlink: make the scope string stable across libnl1-3
	For globally scoped routes, libnl1 reports 'universe' and libnl3
	reports 'global'. This patch makes sure that we only get 'global'.

2014-07-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving vdsm-logrotate config under vdsm conf dir
	The outcome of putting the conf under logrotate.d was daily run of
	logrotate that specified in logrotate.conf which runs the logrotate.d
	scripts. Moving it under vdsm conf dir will allow to use only cron job
	for the rotation without system intervention.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1113264

2014-07-07  Daniel Erez  <derez@redhat.com>

	hsm: deleteImage - lock image by imgUUID and sdUUID
	hsm -> deleteImage:
	An image can reside on two storage domains concurrently
	(e.g. during LSM flow: between syncImage and deleteImage phases).
	Hence, deleting an image should take an exclusive lock on both
	image and storage domain IDs.

	I.e. since the image can exist on two storage domains concurrently,
	we cannot take both exclusive locks with the same name.

	Note: the modified lock in this patch is the only one uses merely an
	image UUID.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1097648

2014-07-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding requirement for cyrus-sasl-lib and modify the default path
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1114993

2014-07-05  Adam Litke  <alitke@redhat.com>

	virt: Restore BC for block type live snapshots
	Commit 02741ce introduced a regression in older hosts running libvirt <
	1.2.2 where libvirt rejects the type='block' and source/dev combination.
	Eric Blake suggested that this could be worked around by supplying the
	old format and new format in the domainshapshot XML document.  This
	union would continue to work as before on old hosts but would pick up
	the correct block snapshot behavior on newer versions.  Basically, we
	still express the disk type but we repeat the newPath inside both a dev
	and file attribute.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1115126

2014-07-04  Martin Sivak  <msivak@redhat.com>

	Collect current QoS settings for IO devices and report through RunningVmStats
	This info will be used by mom when updating the IO limits and by engine
	to report the current QoS settings to the user.

2014-07-04  Antoni S. Puimedon  <asegurap@redhat.com>

	net: remove last dependency on ifcfg persistence
	Up until now, some of the most corner case behavior (removal of
	partially broken networks) was only working for ifcfg persistence
	or ifcfg configurator + unified persistence.

	This patch cleans the api from ifcfgisms.

2014-07-04  Francesco Romani  <fromani@redhat.com>

	migration: add properties and string constants
	This patch adds constants for state and method and helper properties
	to avoid the client code to mess up with the migration.SourceThread
	internals, and to make the migration code looks a bit nicer.

2014-07-03  Martin Sivak  <msivak@redhat.com>

	Improve the _validateIoTuneParams so the params are passed as argument
	This removes side effects from the method and makes it possible to
	use the validator independently on the current Vm settings.

	Another advantage is that it is now much easier to write a unittest
	for the method.

	Fix the API definition for cpu tune methods

2014-07-03  Adam Litke  <alitke@redhat.com>

	Live Merge: Add liveMerge capability to vdsCaps
	It is desirable for engine to know up front if a host can support live
	merge so the UI can either enable or disable the 'Delete' snapshot
	command based on presence of the feature.

2014-07-03  Dan Kenigsberg  <danken@redhat.com>

	sriov hook: allow VFs with nonzero pci domain
	This patch is the smallest change needed to expose a host nic with non-zero pci
	domain to a guest.

	The hook does a questionable detour via libvirt in order to extract the pci
	address of the specified nic. This begs for simplification in a follow up patch.

	Bug-Url: https://bugzilla.redhat.com/1092425

2014-07-03  Francesco Romani  <fromani@redhat.com>

	vm: drop redundant hasattr()
	I don't see how it is possible for a Vm instance to *not* have the
	updateGuestCpuRunning method, therefore I remove the hasattr() check
	before to call it.

	tests: make api check support falsey values
	the current vmApiTests assume truthy values in the replies.
	The schema actually doesn't requires that, and falsey values
	(e.g. empty lists) are actually valid.

	This patch fixes the tests to support them.

2014-07-03  Dan Kenigsberg  <danken@redhat.com>

	introduce connectivity log
	Users have been requesting to have access to a simple log file that
	tracks host connectivity. This patch adds /var/log/vdsm/connectivity.log
	for that purpose. It adds a line for any change of connectivity of
	tracked interfaces.

	Note that the connectivity change is not implemented with `ip monitor`,
	since the latter seems to ignore link speed changes, which are required
	to be logged.

	Bug-Url: https://bugzilla.redhat.com/1111234

	HostStats: stop storing list of host ifids and speeds
	Current code keeps an almost-up-to-date list of host interface names as
	a data member of the HostStatsThread. This information is redundant,
	since host ifids are already available in HostSample.interfaces.

	With the list of ifids, this patch removes a list of their respective
	speed. Each speed is stored, instead with its respective
	InterfaceSample.

	eliminate sampling.BaseSample
	For quite some time, BaseSample is not a common base class of anything.
	It serves no meaningful abstraction, so this patch inlines into its only
	user.

	HostStats: recalculate total line rate every time
	This should have been done when we started supporting host plugging in
	commit b7b29e6.

2014-07-03  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Fix unsafe iteration of domain monitor status
	When we generate repoStat response, we used to iterate over the
	monitored domains, getting the status for each monitor. This naïve
	approach does not consider that a monitor may be removed from the domain
	monitor dict during the iteration.

	Since the only usage now is getting the status for all domains, I
	changed getStatus to return an iterator returning all domains status in
	a safe manner.

2014-07-03  Liron Aravot  <laravot@redhat.com>

	core: GET requests - use Range header
	This patch replaces the use of the custom Size header with use of http
	Range header.
	(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35)
	Note that the use is similar to the use that was done with the Size header.
	The motivation is to use the standard http header (instead of supporting a
	custom header) and not to fully comply with the spec (as there are existing
	gaps).

	After this change the Range header is mandatory to issue a get request for an
	image and support ranges between zero and specified last byte position.

2014-07-03  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Fix unsafe iteration
	Using dict.iteritems() is safe only if nobody else can modify the
	dictionary while iterating. However in DomainMonitor, others threads can
	add or remove items during the iteration, so we must use dict.items(),
	which copies the keys and values atomically.

	dict.iteritems() is useful when we have huge dict and we don't want to
	create a huge list of items, but in case of the domain monitor, where we
	have less then 100 monitors, there is not need for fancy iteration.

	While modifying this line, I also improve the names to make the code
	more clear, this can be separated to another patch but I don't think it
	is needed in this case.

2014-07-02  Antoni S. Puimedon  <asegurap@redhat.com>

	netlink: simplify string conversion methods
	There are multiple string handling needs shared between the netlink
	modules. This patch unifies them to simplify all the modules.

	netlink: move netlink into a lib vdsm subpackage
	netlink.py was increasingly getting new netlink entities making the
	module difficult to follow. This patch splits each entity on a
	separate module of a netlink package so that each new module is
	easy to reason about.

2014-07-02  Nir Soffer  <nsoffer@redhat.com>

	api: Make remove optional
	According to the scheama, the "remove" argument in
	StoragePool.disconnect is optional, but in API it is defined as
	positional argument and requires a value.

	This error was probbaly hidden by the fact that engine send False when
	using xmlprc. But when using jsonrpc the this cause the method to call
	to fail, which eventually cause host to be stuck in "Unassigned" state
	in the engine side. This fix the error on the vdsm side.

	Bug-Url: https://bugzilla.redhat.com/1115033
	Relates-to: https://bugzilla.redhat.com/1115044

2014-07-01  Federico Simoncelli  <fsimonce@redhat.com>

	sd: fix volume path returned by linkBCImage
	In a previous commit (c072945 One shot prepare) we involuntarily
	changed the path used for virtual machine images from:

	 /rhev/data-center/<spUUID>/<sdUUID>/images/<imgUUID>/<volUUID>

	to:

	 /rhev/data-center/mnt/blockSD/<sdUUID>/images/<imgUUID>/<volUUID>

	This patch reverts to the previous path in order to minimize the
	differences between different versions of vdsm that could lead to
	live migration issues, e.g.

	 libvirtError: invalid argument: invalid path ... not assigned to
	 domain

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1059482

2014-07-01  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: do not report devices that disappear
	There was a race in getLinks that consisted on devices disappearing
	between them being reported by netlink and information being
	retrieved by the Link class (driver info).

	This patch solves it by reporting just those links that suceed.

	Bug-Url: https://bugzilla.redhat.com/1113948

2014-07-01  Nir Soffer  <nsoffer@redhat.com>

	bridge: Show more info when method call fail
	When the bridge try to run a method dynamically and the number of
	arguments does not match the function definition, we get an unhelpful
	TypeError. Now a more specific and verbose error is raised:

	    Traceback (most recent call last):
	      File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py",
	      line 480, in _serveRequest
	        res = method(**params)
	      File "/usr/share/vdsm/rpc/Bridge.py", line 254, in _dynamicMethod
	        raise InvalidCall(fn, methodArgs, e)
	    InvalidCall: Attempt to call function: <bound method
	    StoragePool.disconnect of <API.StoragePool object at 0x7f77046397d0>>
	    with arguments: (1, u'2440ff3d-275f-42e6-b204-7d055b26b174') error:
	    disconnect() takes e xactly 4 arguments (3 given)

	(Traceback lines wrapped for the commit message)

	Relates-to: https://bugzilla.redhat.com/1115033
	Relates-to: https://bugzilla.redhat.com/1115044

2014-07-01  Francesco Romani  <fromani@redhat.com>

	vm: add direct import of advancedstats helpers
	This is purely a transitional patch towards
	the move of VmStatsThread from vm.py to sampling.py.

	This patch adds directly import of the VmStatsThread
	dependencies, in order to make the move of such class
	exactly a trivial matter of cut/paste plus fixing imports,
	with exactly zero changes needed to VmStatsThread itself.

	Thus the final patch will be more easily
	verifiable.

2014-06-30  Yeela Kaplan  <ykaplan@redhat.com>

	Add missing validateQemuReadable to oop
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1114499

2014-06-30  Martin Polednik  <mpoledni@redhat.com>

	faqemu hook: move memory limitation to config
	*** WARNING: this patch changes default behaviour for faqemu, increasing
	memory usage to what is supplied in vmCreate call unless changed in
	/etc/vdsm/vdsm.conf ***

	This patch removes memory constraints of faqemu, moving one global
	constraint to configuration. Setting this to '0' causes memory element not
	be touched by the hook, using nonzero value sets the memory limit.

	Usage of > 20 MB memory is required
	when running faqemu with system kernel/initramfs combo.

2014-06-30  Dima Kuznetsov  <dkuznets@redhat.com>

	vdsm-tool: Add logging configuration.
	Added the following flags:
	-l/--logfile
	-v/vv/vvv/--v/vv/vvverbose
	-a/--append

	These flags allow specifying where to put the log, how verbose should it
	be, and should it truncate the log file before writing.

	vdsm-tool: Change upgrade mechanism
	The upgrade decorator is a mechanism within vdsm-tool to allow commands
	to only run once. It has flags to override, but being a function
	decorator, it did not have any direct access to command line arguments
	and did access via sys.argv[2:].

	The patch: http://gerrit.ovirt.org/#/c/27481/ adds flags to vdsm-tool and
	will break upgrade and its argument parsing. I'm proposing to change the
	upgrade from being a decorated function, to a function that operates on
	an upgrade object (interface documented in apply_upgrade docstring) and
	the command line arguments.

	This also allows to have a single argument parser for both
	general upgrade flags and specific per-upgrade flags (no current
	upgrades define flags but we might want this in future, available via
	extendArgParser method, see docs).

2014-06-28  Francesco Romani  <fromani@redhat.com>

	virt: replace status string with constant
	during the extraction of migration.py some status strings
	survived to the port to vmstatus. This patch fixes this.

2014-06-27  Francesco Romani  <fromani@redhat.com>

	vm: janitorial: detect if dom is running
	this patch extracts a little helper method
	to detect if the underlying libvirt
	domain is running.

2014-06-27  Martin Sivak  <msivak@redhat.com>

	Extract the DOM to Drive name, alias and path logic to reusable method

2014-06-27  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: adding docstring to MultiProtocolAcceptor and ConnectedTcpServer
	MultiProtocolAcceptor and ConnectedTCPServer now have docstring
	explanation how they work.

	test: fixing cif getinstance issue
	During running jsonrpc test cif.getInstance fails due to missing logger.
	We mock getInstance method to return fake cif.

2014-06-26  Dan Kenigsberg  <danken@redhat.com>

	vdscli: no need to generate using autoconf
	.in files are cumbersome and non-pythonic. As such, they should be
	avoided when possible. The only autoconf-related value in vdscli was the
	default value for the trust store. This value is already available from
	config.py, which is still auto-confingured.

2014-06-26  Maor Lipchuk  <mlipchuk@redhat.com>

	detach: Support force detach on Storage Domains with old pools.
	Force detach of storage domain only being supported on storage domains
	which are part of pool.  For supporting import Data Storage Domain
	feature, we should also support force detach of Storage Domain which are
	not connected to any pool.

	The force detach will clear the SP_UUID meta data of the imported
	Stroage Dimain, when a BLANK_UUID will be passed from the client
	and will enable the engine to attach it to other DC in ifferent setups.

2014-06-26  David Caro  <dcaroest@redhat.com>

	Adding the possibility to skip checks on rpmbuild
	This way you can build the rpms skipping the tests just defining the variable
	with_check to 0 when running rpmbuild, also skipping checks by default when
	building on el* based hosts

2014-06-26  Francesco Romani  <fromani@redhat.com>

	vm: hyperv: make hw clock friendlier to windows
	This patch sets the local time as windows reportedly
	expect. According to libvirt docs:

	" Most operating systems expect the hardware clock to
	be kept in UTC, and this is the default.
	Windows, however, expects it to be in so called 'localtime'."
	http://libvirt.org/formatdomain.html#elementsTime

	This is the reccommended setting for windows and reportedly
	has stability benefits for live migrations.

	The new setting is enabled on top of the hyperv optimizations,
	and is disabled by default for backward compatibility.

	Bug-Url: https://bugzilla.redhat.com/1107835

	vm: hyperv: initial windows hyperv support
	This patch adds explicit support for hyperv optimizations.
	The optimizations are both for stability and for performance.
	Engine, or any other client, can enable them by supplying a new
	optional parameter 'hyperVenable' in the Vm parameters at
	creation time.

	As default, the new settings are disabled for backward compatibility.

	The parameters are hardcoded and not externally configurable
	because they are not supposed to be changed very often, if
	changed at all; moreover, we implement the optimal recommended
	settings.

	Bug-Url: https://bugzilla.redhat.com/1110305

2014-06-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-upgrade: adds wrapper to ovirt-node-upgrade
	Currently ovirt-node provides ovirt-node-upgrade tool which
	should replace vdsm-upgrade. This patch re-write vdsm-upgrade
	as wrapper of ovirt-node-upgrade for legacy systems.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1079087

2014-06-26  Francesco Romani  <fromani@redhat.com>

	janitorial: move isVdsmImage into utils
	this patch moves vdsm/virt/vm.isVdsmImage into utils without code
	changes. In doing so, we bootstrap the vdsm/virt/utils module,
	which will contain the common shared code in the virt package,
	to shed some load from vm.py.

	This change is a preliminary step to the move of VmSamplingThread
	from vm.py to sampling.py.

2014-06-25  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: Removal of management_ip info in getCaps
	'management_ip' property containing ip of vdsm
	was removed from the result of getCapabilities because it
	it was never used by the engine.

2014-06-25  Francesco Romani  <fromani@redhat.com>

	virt: do not access devices directly outside Vm
	VmStatsThread used to access directly the _devices and conf
	fields of vm.Vm.
	This patch does a little cleanup by introducing helper getters
	to mediate the access to the devices for the Vm clients,
	VmStatsThread being the first.

	this patch add little benefit on its own but paves the road
	to extract VmStatsThread from vm.py and put it in sampling.py.

2014-06-25  Nir Soffer  <nsoffer@redhat.com>

	misc: Fix possible deadlock when entering sampling method
	If a thread entered a sampling method and got the lock, it must exit and
	release the lock. This code try to ensure this using try finally block.
	However, before the try, we log a message about entering the sampling
	method. If this log call raises, the lock will never be released,
	causing all other threads entering this methods to wait forever.

	The possibility of logging failure is very low, but we have seen this in
	the field with older Python versions. It is likely that most of the code
	is not safe considering such errors, but this particular case it is
	trivial to write the code safely.

2014-06-25  Dima Kuznetsov  <dkuznets@redhat.com>

	log: Remove metadata.log
	This log exists only in the spec file and logger.conf.
	Removing because not used by VDSM.

2014-06-25  Nir Soffer  <nsoffer@redhat.com>

	xmlrpc: Move related classes to new xmlrpc module
	The xmlrpc infrastructure is not general utility and does not belong in
	utils.py. This patch does not make any change except moving the xmlrpc
	classes and imports to a new module and updating the code that imported
	them previously from utils.py.

2014-06-25  Dima Kuznetsov  <dkuznets@redhat.com>

	vdsm-tool: Add args to remove_saslpasswd
	In a recent patch added, all commands receive arguments, starting with
	their name, this patch changes signature to avoid this:
	Traceback (most recent call last):
	   File "/usr/bin/vdsm-tool", line 209, in main
	     return tool_command[cmd]["command"](*args)

2014-06-25  Nir Soffer  <nsoffer@redhat.com>

	multipath: Rescan also FC devices
	When rescanning devices, we used to update ISCSI devices, and then run
	multipath to update device mapping. However, we never rescanned FC
	devices.

	We used to believe that "multipath -r" was triggering a rescan of FC
	devices and solving this issue. This may have been true in older
	versions but certainly does not work with current RHEL release, and was
	removed in the previous patch.

	This patch adds the missing FC rescan using the issue_lip sysfs api,
	recommended in the RHEL Storage Administration Guide.

	Bug-Url: https://bugzilla.redhat.com/1071654

2014-06-24  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Add 'bootproto4' to all devices
	Previously, this information (which deprecated the use of
	ifcfg BOOTPROTO property) was added only to devices used by
	networks.

	By advertising bootproto4 (either "none" or "dhcp")
	for all devices, a new scenario is now possible.

	When installing a new host, devices now clearly show in their
	bootproto4 parameter that they were either configured by dhclient
	("dhcp") or their address was set manually ("none"), regardless
	of an ifcfg file having been used.

	Bug-Url: https://bugzilla.redhat.com/987813

	netinfo: Move _devinfo out of _*info to avoid passing more parameters later

2014-06-24  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: sslTests updated to use sslutils
	sslTests used ssl code from SecureXMLRPCServer which was moved to new
	module.

2014-06-24  Nir Soffer  <nsoffer@redhat.com>

	sslutils: Document M2Crypto threading initialization
	As documented and painfully recognized long ago in, using M2Crypto in a
	multi-threaded server such as Vdsm requires explicit initialization.

	M2Crypto was initialized but the code was not docuemnted properly. This
	lead to the initialization being removed in this patch:
	http://gerrit.ovirt.org/#/c/28858/4/lib/vdsm/verifyingtransport.py

	Hopefully, improved documentation and moving it to the sslutils module
	will prevent such attempts in the future.

	Relates-to: http://www.heikkitoivonen.net/m2crypto/api/M2Crypto.threading-module.html
	Relates-to: https://bugzilla.redhat.com/482420

	misc: Simplify DynamicBarrier implemenation
	DynamicBarrier uses a threading.Condition. The condition
	already contain a lock, used to synchronize enter() and exit().

	Within the critical sections in enter() and exit(), only one thread can
	run. When a thread call self._cond.wait(), the condition lock is
	released atomically and the next thread waiting on the condition lock
	continue to run. When a thread return from self.cond.wait(), it get the
	condition lock and run, while all other threads are waiting on the
	condition lock. This is ensured by threading.Condition, both Python
	builtin and pthread_cond when using pthreading.

	To keep a boolean state of the barrier, we don't need another lock, a
	boolean is just fine.

	Previously, when trying to exit a barrier without entering it, a
	ThreadError was raised:

	    thread.error: release unlocked lock

	Now a more specific and useful message is raised:

	    AssertionError: Attempt to exit a barrier without entering

2014-06-24  Dan Kenigsberg  <danken@redhat.com>

	report clusterLevel 3.5

2014-06-24  Yeela Kaplan  <ykaplan@redhat.com>

	Final separation of IOProcess and RFH
	From now on vdsm will either fully use
	remoteFileHandler implementation or
	IOProcess implementation for out of process(oop).

	Additional oop functionality
	The following functionality for ioprocess is added in this
	patch:
	directTouch
	truncatefile
	padToBlockSize

	ioprocess implementation
	change-Id: I132129315c73e880d998a13f84e822a9d4fec2a6
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1083771

	oop: Add an option to configure oop implementation
	The final goal is to replace remoteFileHandler implementation
	for outOfProcess with ioprocess.
	We will do this in a series of steps
	The first step is to add an option to manually configure
	which one of the two implementations is to be used:
	rfh or ioproc.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1083771

2014-06-23  pkliczewski  <piotr.kliczewski@gmail.com>

	utils: Missing m2c dependency
	When vdsm-python used as standalone there is missing dependency on
	m2crypto which is required for using ssl related code.

	Bug-Url: https://bugzilla.redhat.com/1111601

	tests: extending timeout for jsonrpc tests
	Tripling timeout to lessen the probability that jsonrpc tests do not
	fail on overloaded machines.

2014-06-23  Yoav Kleinberger  <ykleinbe@redhat.com>

	clarify that scsiKey parameter is not passed on
	In this patch I add documentation to make plain that the scsiKey parameter is
	a legacy from older code. In the code itself, I changed the parameter
	name so that this is clear to the next developer that comes along, and
	hopefully will save him/her a wild goose chase.

2014-06-22  Francesco Romani  <fromani@redhat.com>

	virt: stats: get rid of _getStatsInternal
	it was used on just one place anyway.

2014-06-20  pkliczewski  <piotr.kliczewski@gmail.com>

	utils: fixing optional parameters
	Adding names for optional parameters so we do not need to
	depend on ordering.

2014-06-20  Nir Soffer  <nsoffer@redhat.com>

	misc: Use with statement instead of try finally
	Using with make the code much more readable and ensure that you cannot
	forget to release a lock, or place the try finally incorrectly.

	We probably can fix this in other places, but since this is very
	delicate code, it is best to do this is tiny steps.

2014-06-20  Adam Litke  <alitke@redhat.com>

	Live Merge: Fix backing chain xml parsing
	The backingStore element is optional inside of a disk XML block.  It
	will be missing for disks with no backing files (ie. new VM based on
	the blank template).  Handle this case by breaking out of the loop
	rather than returning an error.

2014-06-20  Francesco Romani  <fromani@redhat.com>

	tests: add an helper schema compliancy check class
	This patch extracts the schema compliancy methods
	in a self-contained, reusable class.

	tests: split API schema conformancy tests
	this patch splits the VM API schema tests from the main unit tests body
	with no functional changes.

2014-06-20  Martin Sivak  <msivak@redhat.com>

	Enable CPU monitoring functionality in new mom

	Use str type for vcpuQuota to prevent xml-rpc errors

2014-06-20  Antoni S. Puimedon  <asegurap@redhat.com>

	ifcfg: use oVirt node's to remove files
	Doing this, when flushing the old network configuration, oVirt node
	will take care to unmount and unpersist the files, as well as
	removing them.

	The bug was that ifcfg.flush runs at boot and tries to remove all the
	ifcfg files, but those that are persisted are untouchable due to
	the bindmount.

	Bug-Url: https://bugzilla.redhat.com/1104035

	utils: make isOvirtNode always return a boolean
	Up until now, if the first condition that isOvirtNode was False, the
	function would return a list (generated by glob). This patch fixes
	that as all the consumers use this function for its truthiness.

2014-06-20  Adam Litke  <alitke@redhat.com>

	Fix exception in _getUserCpuTuneInfo and _getCpuCount
	If the cpu tune metadata is not present in a VM's domain xml then
	_getUserCpuTuneInfo will fail with the following exception:

	Traceback (most recent call last):
	  File "/usr/share/vdsm/virt/vm.py", line 2846, in _getRunningVmStats
	    decStats = self._vmStats.get()
	  File "/usr/share/vdsm/virt/vm.py", line 571, in get
	    self._getUserCpuTuneInfo(stats)
	  File "/usr/share/vdsm/virt/vm.py", line 421, in _getUserCpuTuneInfo
	    if eInfo['vcpuLimit']:
	KeyError: 'vcpuLimit'

	This aborts the rest of VM stats collection and causes lots of problems
	for other flows which depend on VM stats (such as Live Merge).

	The same applies to _getCpuCount where the value can be empty in case
	libvirt has issuess accessing the cgroup controllers (currently this
	happens on Fedora 20).

	Fixed by fist checking the availability of the key.

2014-06-20  Antoni S. Puimedon  <asegurap@redhat.com>

	ifcfg: perform blocking dhcp when in rollback
	When rolling back configuration, be it on boot or due to loss of
	connectivity, it is best to know if something goes wrong as early as
	possible. One important part of this is knowing if ifup (and
	specially its dhclient component) succeeded.

	When booting up, parallel dhcp initializations are troublesome and
	can sometimes fail, it is better to perform network restoration
	serially as with ifcfg persistence (initscripts serializes its device
	ifups).

2014-06-19  Francesco Romani  <fromani@redhat.com>

	virt: sampling: make sure balloon values are str
	This patch avoids XML-RPC integer overflows by ensuring
	all the balloon stats are string values.

	vm: add known case for graceful destroy to fail
	In commit 09c2f40ebc318bbd188696fd7d02d2dc73d03256
	we changed the releaseVm flow to be more strict and do not swallow libvirt
	exceptions when domain destruction fails. In these cases the destroy()
	API call will now fail.

	Unfortunately, one particular case escaped verification, and broke.
	When a migration succesfully ends, libvirt notifies a 'Stopped' event,
	with detail VIR_DOMAIN_EVENT_STOPPED_MIGRATED.
	In response to this, VDSM correctly puts the VM as Down, but does not
	trigger the internal onQemuDeath callback, which will invalidate the
	domain handle (Vm._dom field).

	The sequence of events is further demonstrated by this excerpt
	(Logs trimmed for brevity):

	vm.Vm::(_onLibvirtLifecycleEvent)
	vmId=`56d1c657-dd76-4609-a207-c050699be5be`::event Stopped detail 3
	opaque None
	vm.Vm::(cancel) vmId=`56d1c657-dd76-4609-a207-c050699be5be`::canceling
	migration downtime thread
	vm.Vm::(stop) vmId=`56d1c657-dd76-4609-a207-c050699be5be`::stopping
	migration monitor thread
	vm.Vm::(run) vmId=`56d1c657-dd76-4609-a207-c050699be5be`::migration
	downtime thread exiting
	root::(wrapper) Unknown libvirterror: ecode: 42 edom: 10 level: 2
	message: Domain not found: no domain with matching uuid
	'56d1c657-dd76-4609-a207-c050699be5be'
	root::(wrapper) Unknown libvirterror: ecode: 42 edom: 10 level: 2
	message: Domain not found: no domain with matching uuid
	'56d1c657-dd76-4609-a207-c050699be5be'
	vm.Vm::(setDownStatus)
	vmId=`56d1c657-dd76-4609-a207-c050699be5be`::Changed state to Down:
	Migration succeeded (code=4)

	Later, when Engine sends a Destroy command as part of the normal flow,
	in releaseVm we will find a supposedly valid _dom handle (being not
	None), and then the domain destruction will be triggred.
	But being actually the handle stale, the call and will fail for
	missing domain; then in turn the whole destroy() API call will fail.

	It is worth to be noted that 09c2f40ebc318bbd188696fd7d02d2dc73d03256
	only made evident that in this case VDSM was out of sync with libvirt.

	This patch address this problem by adding a known benign case
	on which the gracful destruction can fail.

2014-06-19  Adam Litke  <alitke@redhat.com>

	LiveMerge: fix delete while iterating
	A coding mistake slipped into the onBlockJobEvent handler.  We are
	iterating a dictionary while deleting items.  We need to iterate over
	the keys in this case, not the k,v pairs.

2014-06-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	getServices returns wrong order for depended services for libvirt module
	Configure verb runs over getServices returned list and stop those
	services, configure vdsm, and start them in reverse order. In this patch
	I fix current order which starts vdsm before supervdsmd service

2014-06-18  Dan Kenigsberg  <danken@redhat.com>

	vdscli: drop Windows support
	In prehistorical ages, Engine used to run on Windows, and vdsClient
	could be installed there. This is no longer the case, and there is no
	reason to carry this baggage any longer.

2014-06-18  Martin Sivak  <msivak@redhat.com>

	Remove CPU monitoring from MOM config till MOM patch is ready

2014-06-18  Adam Litke  <alitke@redhat.com>

	fileVolume: Fix getChildren for NFS paths
	Since NFS-based volume paths contain ':' characters, a simple split()
	when parsing grep output will be problematic.  Better use rsplit(':', 1)
	so we don't chop up the path unintentionally.

	example:

	/rhev/data-center/mnt/192.168.2.1:_home_storage_data/aa595433-e281-4886-ab75-6863552a19b9/images/04651881-b154-49f0-a6e0-ce15c66891aa/e42398c8-2073-4a62-b8c2-fd0aac1325bf.meta:PUUID=0b491657-066a-4d21-9464-b97b693325b2

	should split to:
	[0] /rhev/data-center/mnt/192.168.2.1:_home_storage_data/aa595433-e281-4886-ab75-6863552a19b9/images/04651881-b154-49f0-a6e0-ce15c66891aa/e42398c8-2073-4a62-b8c2-fd0aac1325bf.meta
	[1] PUUID=0b491657-066a-4d21-9464-b97b693325b2

	but right now we get:
	[0] /rhev/data-center/mnt/192.168.2.1
	[1] _home_storage_data/aa595433-e281-4886-ab75-6863552a19b9/images/04651881-b154-49f0-a6e0-ce15c66891aa/e42398c8-2073-4a62-b8c2-fd0aac1325bf.meta
	[2] PUUID=0b491657-066a-4d21-9464-b97b693325b2

2014-06-18  Dan Kenigsberg  <danken@redhat.com>

	libvirtconnection: refactor: open a new connection in special function
	This patch splits opening of a new connection to qemu:///system into a
	new function, distinct of further decorations. get() is a cumbersome
	function that could use some trimming.

2014-06-18  Nir Soffer  <nsoffer@redhat.com>

	correctness: Use new-style class when using @property
	Commit 802e88c60c added a @property to few historic old-style classes.
	This works when reading the property value, but does not create a
	read-only property as it should. To have a read-only property, the class
	must be a new-style class (inherit from object). This patch converts
	clientIf, Disaptcher and HSM to new-style classes.

	For more info see:
	https://docs.python.org/2.6/library/functions.html#property

2014-06-18  Francesco Romani  <fromani@redhat.com>

	virt: tests: add missing 'display' parameter
	This patch brings the recovery functional tests
	up-to-date with the last Graphics Device changes
	by re-adding the still-mandatory 'display' parameter.

2014-06-18  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Report bonding options as a dictionary of strings
	The values of bonding options are read from the kernel
	as one or two strings. If there is only one string,
	the value is actually numeric. If there are two,
	the value is an enumeration, with a symbolic name in
	the first string, a numeric code in the second string.

	To simplify the API from the current state (reporting
	the options as "raw" arrays of one or two strings),
	the only value reported now is the number in both cases,
	left in its textual representation.

	The key was changed from 'options' to 'opts'
	to mirror 'opts' in _bridgeinfo.

	A bond info dictionary is thus changed to (abriged):
	'bond4': {
	    'cfg': {'BONDING_OPTS': 'miimon=150 mode=3'},
	    'opts': {'miimon': '150', 'mode': '3'}
	}

	Bug-Url: https://bugzilla.redhat.com/987813

2014-06-18  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Update .gitignore location of vdsm-api.html changed

2014-06-17  Francesco Romani  <fromani@redhat.com>

	tests: fix FakeGuestAgent field
	fix guestIPs, which is supposed to be
	"A space separated string of assigned IPv4 addresses"
	and not a list.

	vm: abort and report error if domain destroy fails
	The call of vm._dom.destroy() is not expected to fail.
	However, if the failure is not impossible, and in
	that case VDSM should detect that and report the
	error instead of blindly go ahead.

	This patch let releaseVm() bail out with an error
	as soon as possible if destroy() fails.

	Due to entanglement of the error floes, the more correct
	way to handle this error conditions is also the nicer,
	by splitting the destroy attempts into submethods.

	vm: narrow down try/except block in releaseVm
	In releaseVm, we have a too wide try/except block;
	only self._dom.destroy() can actually raise libvirtError,
	so this patch narrows down the block size.

	vm: improve the logging when destroying domains
	The logging of the failures of the domain destruction
	in releaseVm was messy and confusing.
	This patch improve the logging and make sure that errors
	aren't silently ignored.

2014-06-17  Nir Soffer  <nsoffer@redhat.com>

	misc: Document and test SamplingMethod
	SamplingMethod implementation was confusing, undocumented and untested.
	This patch document why it must work as it its implemented, and add
	tests verifying its behavior.

2014-06-17  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Make bonding functions private and move them before _getNetInfo
	This is a cleanup after merging just two bondopts patches.
	One of the unmerged patches, whose purpose was to reset
	a bond’s options to default values, needed the functions
	to be public.

2014-06-17  pkliczewski  <piotr.kliczewski@gmail.com>

	vdsm: jsonrpc reboot issue
	When rebooting a host using power management UI there was an issue that
	proxy host failed to start it. The issue was that jsonrpc code expects
	power attribute as it is specified in the schema but it was missing when
	running other commands than status. 

	Now for commands on and off we provide power attribue as 'unknown' which
	fixes the issue.

2014-06-17  Federico Simoncelli  <fsimonce@redhat.com>

	sd: make preallocate optional in volume validation
	In the current effort to move to the new storage API the preallocate
	option may be omitted and therefore should not be validated.

	Relates-To: http://bugzilla.redhat.com/show_bug.cgi?id=1097843

	sd: unify validateCreateVolumeParams
	One validateCreateVolumeParams is enough, there's no real need to have
	it both in the domain and volume object.

2014-06-17  Nir Soffer  <nsoffer@redhat.com>

	profile: Allow disabling threads when using the decorator
	yappi supports profiling all threads (default) or only the thread where
	the profiler was started from. This patch add this option to the profile
	decorator. This is is probably not going to be used very much, but
	useful when you need it.

	New threading tests verify that yappi indeed work correctly with other
	threads, even those that started before yappi was started.

	profile: Support yappi clock types
	yappi supports both "cpu" clock and "wall" clcok. The default "cpu"
	clock is handy when you want to see when time is spent running code. The
	wall clock is handy when you want to understand when time is spent
	running or sleeping.

	See test_cpu_clock and test_wall_clock if the difference between the
	clock is not clear.

	profile: Support yappi builtins option
	yappi support profiling also builtin python functions. This patch adds a
	new configuration value to enable profiling builtins in an application
	wide profile, and a new builtins kwarg to the profile decorator.

	This option can be handy when trying to understand why code is
	expensive.

	profile: Test profile decorator format
	The option to set profile format using a profile decorator was not
	tested. Lets test it before we add new options to this decorator.

	tests: Add assertNotRaises assertion
	Typically we like failing assertions to cause a test failure, and any
	other error to cause a test error. However, in some case we like any
	error to be considered as test failure.  For example, if I'm testing
	code writing a file, and the test is verifying the code by parsing the
	file, we can have many possible errors that mean test failure - missing
	file, parsing error, and sometimes just any error. In this case, we may
	get a test error instead of a failure, and waste time suspecting error
	free test code.

	This patch add a new assertNotRaises assertion, making it easy to get a
	test failure in such cases.

	This assertion can be used inline:

	    self.assertNotRaises(func, "foo", bar=2)

	Or as a context manager:

	    with self.assertNotRaises():
	        that_func('foo')
	        other_func(bar=2)

	The test will fail if any error was raised.

2014-06-16  Kobi Ianko  <kianku@redhat.com>

	Adding "updateVmPolicy" api
	Adding an API method "updateVmPolicy".
	The method will be called from the engine
	when a VM SLA parameter will change, for now
	it will support the change of vcpuLimit.

	Adding utility methods and conf for CPU limit MOM integration
	Adding a MOM policy to monitor CPU tuning parameter.
	Adding methods to vm.py to gather cpu tune information from the vm

	Adding API methods for CPU limit MOM integration
	Adding API methods to vm.py to integrate with MOM's collectors and controllers
	Two new functions were added to the vdsm api:
	VM.setCpuTuneQuota
	This function sets a new quota value to the VM using the libvirt api.
	Input: a Int value representing the quota as explained
	       at "http://libvirt.org/formatdomain.html#elementsCPUTuning".
	VM.setCpuTunePeriod
	This function sets a new period value to the VM using libvirt api.
	Input: a Int value representing the period as explained
	       at "http://libvirt.org/formatdomain.html#elementsCPUTuning".

2014-06-16  Nir Soffer  <nsoffer@redhat.com>

	pthreading: Monkeypatch threading module first
	When using Python 2 we must monkey patch threading module before any
	other module is imported. Next version of pthreading will raise if
	monkey_patch() is called too late.

2014-06-16  Francesco Romani  <fromani@redhat.com>

	vm: fix guest agent stats field
	In commit 068fc28d I mistakenly removed an explicit int() conversion
	because I overlooked the code, and thought the result was going to
	be an int() anyway.

	I was wrong, and the result is a float, which breaks the schema which
	dictates the affected field to be an uint.

	This patch restores the explicit conversion to make the code compliant
	with the schema again.

2014-06-16  Saggi Mizrahi  <smizrahi@redhat.com>

	protocol_detection: reuse address so that VDSM doesn't have to wait after a crash

2014-06-16  Xavi Francisco  <xfrancis@redhat.com>

	persistentDict: Do not warn about missing checksum when metadata is empty
	When parsing the storage metadata, when none is present, accept the metadata
	as valid and log that there's no metadata. In this case  do not log a warning
	informing no checksum is found as there is no metadata.

	Bug-Url: https://bugzilla.redhat.com/1073989

2014-06-16  Nir Soffer  <nsoffer@redhat.com>

	utils: Correct and faster list2cmdline
	subprocess.list2cmdline dominates the profile on idle vdsm with many storage
	domains, using more than 10% of cpu time. We use this function to format
	commands in the log, so it is possible to copy the command to the shell and run
	for debugging.

	Turns out that this is undocumented function used on Windows to convert
	argument list to string compatible with the MS C runtime. Using repr(), it
	works on Linux for simple commands, but does not get quoting right with complex
	commands.

	This patch replaces the function with a correct, simple and efficient
	implementation compatible with Linux shells. The new function should not be
	used with repr(), which render its output useless.

	I tested this patch on Fedora 19 machine connected to 30 storage domains,
	running 10 minutes profiling session as spm.  Without this patch
	subprocess.list2cmdline() is the most expensive function responsible for 12.5%
	of cpu time:

	    Thu Jun  5 23:15:18 2014    vdsmd.prof

	             2139104 function calls (2202966 primitive calls) in 16.652 seconds

	       Ordered by: internal time
	       List reduced from 1785 to 10 due to restriction <10>

	       ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	         2151    1.816    0.001    2.140    0.001 subprocess.py:579(list2cmdline)
	       97/128    1.407    0.015   11.004    0.086 threading.py:753(Thread.run)
	        10221    0.494    0.000    1.028    0.000 __init__.py:242(LogRecord.__init__)
	         5397    0.478    0.000    1.575    0.000 misc.py:125(findCaller)
	         8508    0.422    0.000    0.641    0.000 spark.py:211(Parser.buildState)
	        50336    0.404    0.000    0.463    0.000 genericpath.py:85(_splitext)
	  32657/32664    0.273    0.000    0.815    0.000 misc.py:110(_shouldLogSkip)
	        50095    0.271    0.000    0.271    0.000 pthread.py:95(Lock.lock)
	         2147    0.266    0.000    0.517    0.000 subprocess.py:1406(CPopen._communicate_with_poll)
	  50331/50336    0.238    0.000    0.708    0.000 posixpath.py:104(splitext)

	With this patch, utils._list2cmdline() uses only fraction of the cpu time:

	         2158    0.085    0.000    0.118    0.000 utils.py:652(_list2cmdline)

	Note: the profile was performed with older version of this patch, the
	current version is simpler more efficient.

2014-06-16  darshan n  <dnarayan@redhat.com>

	gluster: Get size information of a gluster volume.
	New vdsm gluster verb to get free, used and total size of
	gluster volume. This verb uses libgfapi to get the statistics
	related to volume. This patch makes use of ctypes to utilize
	the libgfapi. This patch also enhances glusterVolumeStatus
	verb to return volume size info as well when status option
	is set to detail.

	verb: glusterVolumeStatsInfoGet

	Output format:
	{"sizeTotal": LONG as STR, "sizeFree": LONG as STR, "sizeUsed": LONG as STR}

2014-06-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Fix FakeClientIF interface
	clientIF was missing the "ready" property, which caused random failures
	on jenkinks:

	    AttributeError: FakeClientIf instance has no attribute 'ready'

	xmlrpc: Disable unwanted BaseHTTPServer logging
	BaseHTTPServer log incoming requests to stderr, which is redirected to
	/dev/null in production. During the tests, stderr is used to display
	test results. In both cases, the default http logging is useless, and we
	have our own logging.

2014-06-15  Nir Soffer  <nsoffer@redhat.com>

	sp: Nest try-finally for temporary secure change
	There were two instances where the same try-finally block was used for
	both acquiring a lock and setting the pool as secure for a block of
	code:

	     acquire lock
	     try:
	         set secure
	         code that needs both lock and secure state
	     finally:
	         set unsecure
	         release lock

	This type of usage is incorrect. try-finally block should be used for
	one change to ensure that the change is finally reverted, and to make
	the intention of the code clear.

	This patch use nested try-finally blocks, one for the lock, and one for
	the secure state:

	     acquire lock
	     try:
	         set secure
	         try:
	             code that needs both lock and secure state
	         finally:
	             set unsecure
	     finally:
	         release lock

	Because of the extra nesting, comments inside the nested code were
	reformatted and missing punctuation was added.

	I considered replacing the nested try-finally with a secured context
	manager, but since the current code uses try-except-finally, using a
	context manager would create an even deeper nesting or extracting some
	new private methods. To keep minimal changes, I avoid this direction.

	It seems that the secure state block can become smaller - some method
	inside the secured block are @unsecured. I kept the secure block
	semantics are they are now, and will check minimizing the secured block
	in a later patch.

2014-06-15  Antoni S. Puimedon  <asegurap@redhat.com>

	net_func_tests: add test for reconfiguring broken bridged network
	This test checks that bridged networks with missing ports are
	successfully redefined on command. It is related to the syncing
	issues described in https://bugzilla.redhat.com/861701

2014-06-13  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Move _*info back together

2014-06-13  Nir Soffer  <nsoffer@redhat.com>

	sd: Fix wrong usage of properties on old style class
	StorageDomain is an old style class but usess properties, which are
	supported *only* for new style classes. This is a nasty corner in Python
	where you can define @property on old style classes and they seems to
	work in some of the cases, and break in others. The current code happen
	to work because we never try to assign to the read only properties.

	The patch change StorageDomain to be a new style class, and fix the
	tests assuming an old style class.

	For more info see:
	https://docs.python.org/2.6/library/functions.html#property

2014-06-13  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Report current system values for bonding options
	Instead of reading bonding options from ifcfg files,
	use /sys/class/net/BONDNAME/bonding to fetch "live" values.
	Return only those that differ from defaults, introduced in b3f6e0.

	The options are presented in two ways: as a "legacy" string of
	opt=value pairs, separated by spaces, known from ifcfg files,
	and as a dictionary with option names as keys and with arrays
	of strings as values. The arrays can contain a single string
	if an option is numerical or two strings if an option is symbolic
	(name first, code second).

	A bond info dictionary can look like this (abriged):
	'bond4': {
	    'cfg': {'BONDING_OPTS': 'miimon=150 mode=3'},
	    'options': {'miimon': ['150'], 'mode': ['broadcast', '3']}
	}

	Functional network tests now check that bonding options were
	applied.

	Bug-Url: https://bugzilla.redhat.com/987813

2014-06-13  Dan Kenigsberg  <danken@redhat.com>

	Report legacy bond devices instead of actually creating them
	Engine <= 3.2 expects to see bonding devices bond0-bond4 predefined on
	each host. Therefore, Vdsm creates them on boot, and never deletes them.
	This add cumbersome logic, which has lead to bugs.

	Instead, this patch simply reports the existence of the 5 expected
	bonds, instead of actually creating them.

	Note that bond0-bond4 were generated only on el6. Therefore this patch
	limits the reports to that operating system.

	Bug-Url: https://bugzilla.redhat.com/1064208

2014-06-13  bruce  <xiao-lei.shi@hp.com>

	vm: Collect vm numa node runtime pin information
	Get the information that vm numa node runtime pin on which host numa
	nodes.

	Bug-Url: https://bugzilla.redhat.com/1100202

2014-06-12  Dan Kenigsberg  <danken@redhat.com>

	vdscli: avoid ssl-specific localhost heuristic
	Unlike it used to, Vdsm no longer checks its client's identity versus
	the content of the client certificate.

	Therefore, there is no need for the too-clever mechanism of guessing the
	local host adderess from the ssl certificate. That mechanism is known to
	have caused pains when the subject name of the certificate became
	non-resolvable for whatever reason (Cf. http://gerrit.ovirt.org/28107 ).

2014-06-12  Mooli Tayer  <mtayer@redhat.com>

	configurator.py: extract reconfiguration of x is done to verb level.

	Configfile.py: improve indentation of multiline if statments.

2014-06-12  Enrico Tagliavini  <enrico.tagliavini@gmail.com>

	mount: Check if mount specification is a symlink
	If a Posix compatible file system is used as a backend for the VM images
	the mount device can be a symlink. The common case is LVM. Both devices
	in /dev/mapper/ and /dev/$VG/ are symlinks do /dev/dm-$N.

	Currently in CentOS 6.5 when using GFS2 /proc/mounts always point to the real
	device, even if a symlink has been used as argument of the mount command.
	Example in my current system:

	    /dev/dm-13 /rhev/data-center/mnt/_dev_mapper_vg__is5000-lv__virtstorage
	    gfs2 rw,seclabel,noatime,nodiratime,hostdata=jid=0,nobarrier 0 0

	In this case the check performed by the getRecord() method fails since
	the record and the device in /proc/mounts are different. The former is
	the symlink, the latter /dev/dm-$N.

	This change checks if the record is an existing symlinks, and resolves
	it before comparing the record with /proc/mounts.

	On the other hand if the mount command doesn't resolve the symlink, like
	when using ext4 file systems, the comparison with the original given
	spec must still be performed. If either one matches the storage is
	mounted.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=888711

2014-06-12  Mooli Tayer  <mtayer@redhat.com>

	replace configure_libvirt.py with python code.
	The port is to behave as similar as possible to the old
	sh code. python should allow easier testing (tests added)
	and better overall readability.

	A testing matrix [1] documents my tests of this feature.

	The new code uses temp files and replace instead of line by line
	editing for durability.

	removeConf verb has been added and used in the spec file.

	known behavior changes.
	0.)order of configuration values added to config files has
	changed. This does not seem to cause any issues.

	1.)isConfigured() now also tests libvirt's
	logrotate file for vdsm configuration section.

	2.)configuration version is now added to /etc/logrotate.d/libvirt
	like all the other files. (used to be '## beginning of ...' with
	out version). this will allow versioning of this file.
	No errors in removing old configuration.

	3.)removeConf (now a verb and not done in vdsm.spec.in)
	now calls ovirt_store_config when running on ovirt node.
	(I guess before after removing vdsm rpms and restart
	the vdsm configuration would re appear)

	4.) log_filters inside libvirtd.conf used to be:
	"3:virobject 3:virfile 2:virnetlink      3:cgroup..."
	That was due to the following sh line:
	set_if_default "${lconf}" log_filters "\"3:virobject 3:virfile 2:virnetlink \
	    3:cgroup 3:event 3:json 1:libvirt 1:util 1:qemu\""
	now it is
	"3:virobject 3:virfile 2:virnetlink 3:cgroup..."
	both work fine.
	[1] http://www.ovirt.org/Configure_libvirt_testing_matrix

	changes in configfile.py.
	1.) remove suffix space from '# VDSM backup '. This way we maintain backward comp
	with libvirt_configure.sh

	2.) on ovirt node wrap calls to rename with ovirt node unpersist and persist.
	these calls use the new node namespace being ovirt.node.utils.fs.Config.

2014-06-12  Adam Litke  <alitke@redhat.com>

	LiveMerge: Extend internal volumes during live merge
	During a live merge operation data is written to the target of the
	commit (the base volume).  This means that for block-based images, we
	must monitor the base volume and the leaf volume for extension.

	Since libvirt is not providing watermark information for internal
	volumes yet, return an empty set for now until we get the API we need.

	The libvirt bug for the missing API is:
	https://bugzilla.redhat.com/show_bug.cgi?id=1041569

	LiveMerge: Sync volume chain information after live merge
	When a block job event comes in from libvirt or when vdsm notices that a
	block job is no longer running on a disk, we need to check the volume
	chain according to qemu and sync our vm state with that information.

	The items that require synchronization are:
	 - VM.conf['devices'] and VM._devices:
	   * Update volumeID if the active layer was merged
	   * Update volumeChain to remove merged volumes
	 - Image chain
	   * If the merged volume(s) had children, the child's parent UUID must
	     be set to point to its new parent.  For file-based domains, this
	     update can be completed immediately.  Block-based domains maintain
	     the parent UUID in two places: the storage domain's metadata LV and
	     as a LV tag on the volume LV itself.  As HSM we can update the
	     metadata LV but the tags cannot be changed except by SPM.  So,
	     split setParent into two parts so we can update just the metadata
	     LV here.  We will let deleteVolumes clean up the LV tag since it is
	     an SPM operation.

2014-06-12  Alon Bar-Lev  <alonbl@redhat.com>

	utils: add isOvirtNode function.

2014-06-12  Mooli Tayer  <mtayer@redhat.com>

	configurator.py: sort imports alphabetically

2014-06-12  Adam Litke  <alitke@redhat.com>

	build: Remove unused import json
	One of my patches added an unused import for json in vm.py.  Remove it
	and fix the build.  My apologies.

	LiveMerge: Add merge verb and related machinery
	This patch enables the submission of an actual live merge operation to
	the underlying VM.  Once submitted, we poke the stats thread to make
	sure block job information is updated and persist the given merge
	parameters in the VM Disk conf.  This ensures that in case vdsm restarts
	during a block job we will not forget to handle it the next time we are
	started.

	Limitations:
	 - Does not yet work when the active layer is involved due to [1]

	[1] https://bugzilla.redhat.com/show_bug.cgi?id=1062142

	LiveMerge: Add block job info to VM stats
	Live merge operations are transient jobs.  This means that once started,
	qemu and libvirt only know about them as long as they are running.  As
	soon as they finish an event may be emitted but then all traces of the
	block job are gone.  In order to work with transient jobs of this nature
	the manager (engine) needs to know two pieces of information: 1) Is my
	job still running, and 2) once it has stopped, did it succeed or fail.
	This patch provides a reliable answer to the first question.  When a new
	block job is created, the engine will supply a UUID to represent the job
	and this UUID will be persisted by vdsm along with other identifying
	information.  When collecting VM stats, only VM disks with an associated
	job ID will be checked for block jobs.  All active block jobs will be
	returned in the stats.  When a block job expires, the job ID is removed
	from the VM conf and it will no longer be reported.  Due to caching of
	stats, care must be taken to properly refresh the job information in a
	thread-safe way when a new job is created.  Vdsm must guarantee that any
	jobs created will always be represented in calls to getVmStats that
	happen after a call to the future merge verb.

	virt: Refactor drive extension
	A future live merge patch will require the ability to send extend
	messages for internal drive volumes.  To make this easier, refactor
	the code a bit:
	 - Introduce a function that selects candidate volumes
	 - Introduce a function that chooses whether a volume should be extended
	 - getNextVolumeSize should take the current size as a parameter rather
	   than assuming it is self.apparentsize
	 - Pass volumeID explicitly to the extension functions since it may
	   differ from drive.volumeID
	 - When validating a resize, only update the drive if the leaf volume
	   was extended

2014-06-11  Martin Polednik  <mpoledni@redhat.com>

	vdsmapi-schema: fix typo in tpm device
	Small typo in documentation, VmTpmDeviceType is in no way related
	to smartcard.

2014-06-11  Kobi Ianko  <kianku@redhat.com>

	Refactoring reportError func
	Extracting the error function from inner function to class level function.

2014-06-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove usage print on vdsm-tool.UsageError and use it on ExtraArgsError
	This print add usage explanation of vdsm-tool command on error. There is
	no need for such print Unless UsageError refers actually to the verb
	usage, but currently we use it for any usage error.
	On ExtraArgsError catch we add this usage print

2014-06-11  Ondřej Svoboda  <osvoboda@redhat.com>

	netlink: Do not truncate InfiniBand HW addresses anymore

2014-06-11  Adam Litke  <alitke@redhat.com>

	LiveMerge: Add support for deleting merged volumes
	Once a live merge has completed the merged volumes that have previously
	been unlinked from the chain need to be deleted.  We can use the
	existing deleteVolume verb with one minor change for block volumes.
	When deleting a live-merged volume, its former child may have a stale LV
	tag pointing back to this volume.  This occurs because an HSM host
	resolves the block job completion event and can only update the parent
	UUID in the storage domain's metadata LV (not in the LV Tags).  In this
	special case, we sync the LV tag of the child to match the metadata LV
	prior to validating the delete operation.

	Also, don't validate deletes in hsm.py since we already perform
	validation in the volume-specific implementations.

	virt: Lookup conf and device by path
	Live merge requires the ability to lookup a VmDevice and its associated
	conf entry given a disk path.  Provide these helper methods.

2014-06-11  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: json over stomp available on the same socket
	Changes required to have both supported protocols detected on the same
	socket opened by vdsm.

	jsonrpc: xmlrpc protocol detection
	Protocol detection added which only recognize xmlrpc and there is still
	additional socket to handle jsonrpc related communication.

2014-06-10  Antoni S. Puimedon  <asegurap@redhat.com>

	iproute2: raise ConfigNetworkError when dhcp fails and blockingdhcp is set
	It is important that a ConfigNetworkError exception is raised when
	doing the addressing synchronously, otherwise it fails silently.

2014-06-10  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Hacked InfiniBand speed.
	Currently, the kernel errors out with EINVAL when
	reading the speed of ib* devices. Report a speed
	of 10000 for them.

	Handle dummy devices' IOError gracefully.

	Bug-Url: https://bugzilla.redhat.com/1103469

2014-06-10  Nir Soffer  <nsoffer@redhat.com>

	logging: Use 'Storage' log handler for logging storage reports
	This patch enables 23 storage loggers by making them child loggers of the
	Storage logger. Before that change all those logs were used the root
	handler.

2014-06-10  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: ssl related code moved to single module
	New sslutils module was created to keep all ssl related code.
	Unit tests will be added later.

	jsonrpc: Json processing issues fixed
	Number of issues fixed:
	- Default value was missing in SP.disconnect
	- Host.setupNetworks and Image.download was returning True where as it
	should return information according to schema
	- Bridge.py did not processed order of optional parameters properly.
	For fencing flow second optional parameter is ued which caused the
	issue. Fix provide default value for any optional parameters in between.

	jsonrpc: Moving xml rpc related modules in to rpc package
	In order to keep all the modules in single place we move xml rpc module
	into the package where old vdsm-api code already resides.

	jsonrpc: vsam-api removal
	vdsm-api was removed and all rpc related code was moved to rpc package
	within vdsm. The code is packaged as part of vdsm-jsonrpc rpm.

	Removed package was design to hold jsonrpc schema and its parsing code.
	Jsonrpc related code was packaged already in jsonrpc. Together with
	jsonrpc being required we do not need vdsm-api anymore.

	jsonrpc: Removal of not needed reactors
	Json over tcp reactor is not needed at all and proton reactor won't be
	released in 3.5.

2014-06-10  Adam Litke  <alitke@redhat.com>

	virt: Filter internal data for getVMList API
	Filter out all keys that begin with '_' when returning detailed VM
	information via the getVMList API.  This is needed by live merge which
	will persist block job information in a '_blockJobs' key.  We don't want
	that data to be made public

	virt: Specify snapshot type
	Libvirt 1.2.2 introduced the 'type' attribute to the source element in a
	domainsnapshot XML document.  This attribute allows you to specify
	'block' as the type (which we should be doing on block domains).
	Leaving this out creates a snapshot of type 'file' which has some
	troubling side effects.  For one, it changes the disk type from block to
	file.  This interferes with libvirt's write watermark detection causing
	the wrong value to be returned.  In turn, vdsm will extend the drive
	until it consumes the entire block storage domain.  See bug 1091094 [1].

	[1] https://bugzilla.redhat.com/show_bug.cgi?id=1091094

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1091094

2014-06-10  Dan Kenigsberg  <danken@redhat.com>

	net models: simplify error condition
	An attempt to add a bonding device with no nics ends with a different
	error, depending whether the bond is already define in the kernel or
	not. This surprising behaviour means that the functional test
	testFailWithBadParam fails if BONDING_NAME is removed from the kernel.

	This patch unifies the error code, returning ERR_BAD_PARAMS in both
	cases.

	net models: simplify condition
	Bond.objectivize() is always called with a non-None bonding name. No
	need to complicate an internal condition to validate this.

2014-06-09  Nir Soffer  <nsoffer@redhat.com>

	nfsSD: Remove unneeded and expensive mount check
	NFS Storage domain used to check if the domain is mounted in the selftest
	method. This check dominates the profiles on a system with many NFS storage
	domains. This check happens during the monitoring flow, before we run dd to
	read a file from the remote server. If the domain is not mounted, dd will fail
	to read the file. This patch remove the unneeded and expensive check.

	I tested this patch on RHEL 6.5 system connected to 45 NFS storage domains. The
	test included starting the test host as spm, waiting 4 minutes, then creating a
	template from a vm with one system disk and one empty disk. After 10 minutes,
	puting both hosts to maintenance. During this test, vdsm cpu usage has huge
	spikes (5-300%), and while the storage operation is running, it consume about
	200% constantly. Even worse, when trying to put the host to maintenance, one
	host responded only after about 7 tries - it looks that vdsm does not behave
	well under such load.

	In the profile, we can see that the mount checks (isMounted) dominates
	the profile:

	    Sun May 25 17:48:03 2014    nfs-selftest-spm.prof

	             10478858 function calls (10548072 primitive calls) in 619.277 CPU seconds

	       Ordered by: cumulative time
	       List reduced from 1985 to 20 due to restriction <20>

	         ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       790/1958    0.000    0.000  495.314    0.253 domainMonitor.py:186(DomainMonitorThread._monitorDomain)
	      4308/4452  182.416    0.042  451.408    0.101 threading.py:481(Thread.run)
	          38/45    0.000    0.000  437.224    9.716 domainMonitor.py:163(DomainMonitorThread._monitorLoop)
	          36/49    0.000    0.000  389.649    7.952 utils.py:750(wrapper)
	      2077/2135    1.971    0.001  384.503    0.180 mount.py:148(getMountFromTarget)
	      2012/2100    0.120    0.000  383.153    0.182 mount.py:137(isMounted)
	  105751/109301    0.000    0.000  380.141    0.003 mount.py:121(_iterMountRecords)
	      1836/1958    0.264    0.000  333.065    0.170 nfsSD.py:105(NfsStorageDomain.selftest)
	  466934/466985   70.404    0.000  330.915    0.001 mount.py:42(_parseFstabLine)
	  106768/107120   20.775    0.000  286.090    0.003 mount.py:78(_resolveLoopDevice)
	  365495/366408   12.537    0.000  260.821    0.001 mount.py:64(_iterateMtab)
	    10669/12758    0.556    0.000  199.831    0.016 sdc.py:51(DomainProxy.getRealDomain)
	    11452/12758    0.282    0.000  169.311    0.013 sdc.py:101(StorageDomainCache._realProduce)
	        241/242    0.000    0.000  158.204    0.654 sdc.py:93(StorageDomainCache.produce)
	  941546/941554   66.137    0.000  128.888    0.000 posixpath.py:311(normpath)
	    11924/12515    0.406    0.000  116.818    0.009 sdc.py:48(DomainProxy.__getattr__)
	            136    0.056    0.000  112.311    0.826 sdc.py:133(StorageDomainCache._findDomain)
	            136    0.042    0.000  110.590    0.813 nfsSD.py:131(findDomain)
	            136    0.248    0.002  101.375    0.745 nfsSD.py:115(findDomainPath)
	4279715/4279780   25.588    0.000   91.276    0.000 mount.py:70(_parseFstabPath)

	With this patch, cpu usage still has spikes, but typically at (3-40%). During
	the create template operation, there were about 10-20 secodns where vdsm
	consumed about 180% cpu.

	    Sun May 25 18:20:52 2014    nfs-selftest-spm-2.prof

	             5106574 function calls (5188395 primitive calls) in 302.323 CPU seconds

	       Ordered by: cumulative time
	       List reduced from 2002 to 20 due to restriction <20>

	         ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	      4339/4465   59.113    0.014  236.219    0.053 threading.py:481(Thread.run)
	      1133/2550    0.342    0.000  222.124    0.087 domainMonitor.py:186(DomainMonitorThread._monitorDomain)
	          41/45    0.000    0.000  213.524    4.745 domainMonitor.py:163(DomainMonitorThread._monitorLoop)
	          41/49    0.000    0.000  204.217    4.168 utils.py:750(wrapper)
	    14210/16433    0.000    0.000  133.085    0.008 sdc.py:51(DomainProxy.getRealDomain)
	    15206/16433    1.243    0.000  127.866    0.008 sdc.py:101(StorageDomainCache._realProduce)
	        129/136    0.062    0.000  122.497    0.901 sdc.py:133(StorageDomainCache._findDomain)
	        135/136    0.000    0.000  114.658    0.843 nfsSD.py:121(findDomain)
	        135/136    0.204    0.002  103.037    0.758 nfsSD.py:105(findDomainPath)
	    14778/16187    0.530    0.000   99.758    0.006 sdc.py:48(DomainProxy.__getattr__)
	           2550    0.214    0.000   88.393    0.035 fileSD.py:258(NfsStorageDomain.getReadDelay)
	           2550    1.529    0.001   88.155    0.035 misc.py:198(readspeed)
	           2662    0.823    0.000   85.840    0.032 utils.py:646(execCmd)
	        141/142    0.029    0.000   73.539    0.518 mount.py:137(isMounted)
	            195    0.353    0.002   73.002    0.374 mount.py:148(getMountFromTarget)
	    13977/14823    0.000    0.000   72.712    0.005 mount.py:121(_iterMountRecords)
	        244/245    0.000    0.000   65.844    0.269 sdc.py:93(StorageDomainCache.produce)
	    54958/55112   12.500    0.000   64.269    0.001 mount.py:42(_parseFstabLine)
	    14291/14537    3.456    0.000   54.202    0.004 mount.py:78(_resolveLoopDevice)
	          10801    3.400    0.000   51.056    0.005 remoteFileHandler.py:286(RemoteFileHandlerPool.callCrabRPCFunction)

	Comparing both profile we can see that:

	- cpu seconds dropped from 619 to 302 (-51%)
	- Number of functions calls dropped from 10478858 to 5106574 (-51%)
	- Time spent in isMounted dropped from 383 to 73 seconds (-80%)

	We should investigate later why isMounted is called so many times, and consider
	optimizing this code. We should also investigate the create template flow, to
	understand why it cause a such a big spike in cpu usage.

	The system behavior experienced while testing this patch, is similar to what
	bug 1081962 describes.

	Bug-Url: https://bugzilla.redhat.com/1099856
	Relates-to: https://bugzilla.redhat.com/1081962

2014-06-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	pep8 and logic fix for commit 36136c1
	1. Didn't catch in validation pep8 1.4.6 violation
	2. Didn't catch wrong group validation on my environment
	3. Fix isconfigured tests

2014-06-09  Dan Kenigsberg  <danken@redhat.com>

	Make pyflakes-0.8 happier
	Without this patch, pyflakes-0.8.1 complains about

	 ./vdsm/network/sourceroute.py:153: list comprehension redefines 'rule' from line 146

	I do not agree with this complaint of newer pyflakes versions, but I do
	not mind enough to fight it.

2014-06-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Setting enum for isconfigured return value and change override semantics
	isconfigured now returns CONFIGURED, NOT_CONFIGURED and NOT_SURE. This to
	ease and clarify the override semantics.
	If module returns CONFIGURED it means that also on force vdsm won't need to
	reconfigure it, as the module configured properly. Although if configured
	returns NOT_SURE, it means, vdsm already configured the module, but on
	force we desire to override those configuration to defaults.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1088805

2014-06-08  Dan Kenigsberg  <danken@redhat.com>

	build: log pyflakes version
	This may be useful in order to trace inconsistent errors in builds.

2014-06-08  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: fix version to family parameter name
	In commit e435e680fdae8f1baaf8dac549c72db32c07549f there is a change
	to add ipv6 support to various ipwrapper functions. During the
	review process it was suggested to change the parameter from
	'version' to 'family' but I missed one of the parameters.

2014-06-07  Francesco Romani  <fromani@redhat.com>

	vm: rename method for clarity
	rename _getGuestStatus for clarity and
	to reduce the clashing with _getGuestStats.

	virt: stats: move the guest stats in a method
	this patch moves the guest statistics gathering in
	a separate method.

2014-06-06  Antoni S. Puimedon  <asegurap@redhat.com>

	upgrade_unified: fix for nicless and bridges with vnics
	The upgrade script had a mistake when dealing with bridged networks
	that made it not consider bridgeless networks nor bridges that had
	vnics on them.

	This bug would have made that a bridge with nic eth2 and several
	vnics would have setup a network targetting:
	'eth2vnet0vnet1'

2014-06-06  Federico Simoncelli  <fsimonce@redhat.com>

	api: remove obsolete volume prepare and teardown
	The prepare and teardown volume API were never officially supported,
	engine never used them and they were never exposed in vdsClient.
	Additionally as reported in rhbz#1104672 prepareVolume was broken.
	In a recent change (de40063) we exposed prepareImage and teardownImage
	providing a similar functionality.

	Relates-To: https://bugzilla.redhat.com/show_bug.cgi?id=1104672

2014-06-06  Dan Kenigsberg  <danken@redhat.com>

	net: janitorial: format log messages lazily

	_findLiveSnapshotSupport: do not assume that guest <features> exist

2014-06-06  Nir Soffer  <nsoffer@redhat.com>

	blockVolume: Fix NameError when validating volume parameters
	Commit 5cd8c83ba62 was liberally verified, leaving undefined name. Fixed
	now thanks to pyflakes and make check.

	tests: execCmd stress test is not broken now
	Since commit ce66d754, utils.execCmd stress tests should always succeed.

2014-06-05  Nir Soffer  <nsoffer@redhat.com>

	gitignore: Ignore new generated man page
	Commit 3762a03added3 added vdsm-tool manual, but did not upadte
	.gitignore, which broke "make check".

2014-06-05  Federico Simoncelli  <fsimonce@redhat.com>

	volume: fix validateCreateVolumeParams exception
	The validateCreateVolumeParams check was returning an inconsistent
	exception: IncorrectFormat with the parent volume uuid as argument.
	The IncorrectFormat exception should return a format and not a
	volume uuid.

2014-06-05  Andrew Dahms  <andrewjdahms@gmail.com>

	This commit adds a man page for the vdsm-tool command line utility.
	This commit adds the file vdsm-tool.1.in to the vdsm-tool directory,
	updates the vdsm-tool make file and the vdsm spec file to include and
	install the new man page for vdsm-tool to the /usr/share/man/man1 directory.

2014-06-05  Nir Soffer  <nsoffer@redhat.com>

	utils: Decrease cpu usage when executing commands
	After optimizing list2cmdline, we can see that the profile is dominated by
	utils.execCmd() and related functions such as AsyncProc._processStreams().
	This code is quite complex, using fancy classes such as AsyncProc and
	_streamWrapper, and using epoll to poll for 3 file descriptors. These are
	useful when reading asynchronously from multiple streams without risk of
	deadlock.  However, for invoking commands synchronously, polling 2 file
	descriptors, CPopen.communicate, using poll, is safe and much more
	efficient.

	This patch avoids wrapping of the CPopen object with AsyncProc when
	executing commands in sync mode.

	I tested this on two identical RHEL 6.5 machines connected to 32 storage
	domains.  Each one run 5 minutes as spm, and 5 minutes as hsm during 10
	minutes profiling session. The first system was running the previous
	patch in this branch:

	    Tue May 13 09:47:10 2014    /var/run/vdsm/vdsmd.prof

	             8410533 function calls (8466483 primitive calls) in 70.879 CPU seconds

	       Ordered by: internal time
	       List reduced from 1872 to 10 due to restriction <10>

	       ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	      1281887    3.404    0.000    6.038    0.000 utils.py:557(AsyncProc._processStreams)
	       131670    2.162    0.000    2.174    0.000 pthread.py:98(Lock.unlock)
	        24898    2.134    0.000   10.016    0.000 utils.py:466(_streamWrapper._readNonBlock)
	       114437    1.992    0.000    2.018    0.000 pthread.py:95(Lock.lock)
	        17996    1.916    0.000   21.293    0.001 io.py:492(BufferedReader.readline)
	       98/136    1.912    0.020   23.986    0.176 threading.py:481(Thread.run)
	         5918    1.829    0.000    6.438    0.001 misc.py:125(findCaller)
	        57658    1.738    0.000    1.821    0.000 genericpath.py:85(_splitext)
	        10005    1.644    0.000    3.479    0.000 __init__.py:226(LogRecord.__init__)
	         2452    1.497    0.001    8.357    0.003 utils.py:623(AsyncProc.wait)

	       Ordered by: cumulative time
	       List reduced from 1872 to 10 due to restriction <10>

	       ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	        34/36    0.007    0.000   68.214    1.895 utils.py:770(wrapper)
	           32    0.069    0.002   67.969    2.124 domainMonitor.py:163(DomainMonitorThread._monitorLoop)
	     985/2040    0.728    0.001   67.471    0.033 domainMonitor.py:186(DomainMonitorThread._monitorDomain)
	         2450    0.447    0.000   53.669    0.022 utils.py:666(execCmd)
	         2040    0.093    0.000   46.161    0.023 blockSD.py:594(BlockStorageDomain.getReadDelay)
	         2040    0.131    0.000   45.845    0.022 misc.py:222(readspeed)
	         2040    0.310    0.000   45.696    0.022 misc.py:192(_readfile)
	         2447    0.133    0.000   33.060    0.014 utils.py:633(AsyncProc.communicate)
	       98/136    1.912    0.020   23.986    0.176 threading.py:481(Thread.run)
	    17994/17996    0.250    0.000   21.544    0.001 io.py:532(BufferedReader.next)

	The seconds system was running with this patch:

	    Tue May 13 09:47:04 2014    /var/run/vdsm/vdsmd.prof

	             1988663 function calls (2044070 primitive calls) in 36.675 CPU seconds

	       Ordered by: internal time
	       List reduced from 1871 to 10 due to restriction <10>

	       ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	       98/136    6.643    0.068   19.059    0.140 threading.py:481(Thread.run)
	         9508    1.566    0.000    2.801    0.000 __init__.py:226(LogRecord.__init__)
	         5795    1.511    0.000    4.948    0.001 misc.py:125(findCaller)
	        56250    1.312    0.000    1.405    0.000 genericpath.py:85(_splitext)
	         2361    1.306    0.001    2.084    0.001 subprocess.py:1344(CPopen._communicate_with_poll)
	        38915    0.881    0.000    2.766    0.000 misc.py:110(_shouldLogSkip)
	    56233/56250    0.827    0.000    2.239    0.000 posixpath.py:94(splitext)
	         9508    0.713    0.000    5.644    0.001 __init__.py:1204(Logger.callHandlers)
	        32083    0.598    0.000    0.598    0.000 misc.py:84(checkForSkip)
	    6953/6965    0.591    0.000    0.627    0.000 pthread.py:133(Cond.timedwait)

	       Ordered by: cumulative time
	       List reduced from 1871 to 10 due to restriction <10>

	       ncalls  tottime  percall  cumtime  percall filename:lineno(function)
	        34/36    0.001    0.000   27.957    0.777 utils.py:770(wrapper)
	           32    0.041    0.001   27.767    0.868 domainMonitor.py:163(DomainMonitorThread._monitorLoop)
	     840/1957    0.404    0.000   27.454    0.014 domainMonitor.py:186(DomainMonitorThread._monitorDomain)
	       98/136    6.643    0.068   19.059    0.140 threading.py:481(Thread.run)
	         2365    0.338    0.000   17.226    0.007 utils.py:666(execCmd)
	    9507/9508    0.187    0.000   14.434    0.002 __init__.py:1155(Logger._log)
	    8640/8738    0.243    0.000   14.430    0.002 __init__.py:1034(Logger.debug)
	         1957    0.067    0.000   13.107    0.007 blockSD.py:594(BlockStorageDomain.getReadDelay)
	         1957    0.101    0.000   12.933    0.007 misc.py:222(readspeed)
	         1957    0.131    0.000   12.815    0.007 misc.py:192(_readfile)

	Comparing the profiles show:

	- Number of function calls dropped from 8410533 to 1988663 (-76%)
	- Number of cpu seconds dropped from 70.8 to 36.6 (-48%)
	- Time spent in execCmd dropped from 53.6 to 17.2 seconds (-67%)

2014-06-05  Federico Simoncelli  <fsimonce@redhat.com>

	api: expose prepare and teardown image
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1092166

2014-06-05  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: Stomp support
	The mini broker turned up to be much more work than I expected.
	This is an intermediate solution. VDSM will accept broker like
	message but will ignore most of them and not enforce policy.

	This is so that we can get the engine talking in the correct way and
	work on the mini broker stress free. This also means that we can release
	VDSM without the mini broker using a message format that is future
	ready.

	It is expected from the engine to send the CONNECT and SUBSCRIBE frames
	even though VDSM doesn't yet enforce them because future VDSM's probably
	will.

2014-06-04  Nir Soffer  <nsoffer@redhat.com>

	mutipath: Remove unneeded and dangerous -r parameter
	Since commit dbf2089488 (Jul 9 2013) multipath call was change to use
	the -r flag, forcing a reload of the device map. This was tested to fix
	a case where new lun is created on the storage server, while a host was
	connected, and the new device is not available when issuing the
	getDeviceList command. According to a comment on gerrit, the change was
	tested for ISCSI and FC storage types, but there is no documentation of
	the testing procedure. The related bug was verified, but has no
	information about how it was verified.

	We have two related bugs:

	- Bug 1078879 tell us that invoking multipath with the -r flag sometimes
	  triggers a segfault in the multipathd daemon. In the bug, multipath
	  developer suggests that as long as multipathd daemon is running,
	  there is no need to invoke multipath to detect new devices, and
	  "multipath -r really isn't useful for much of anything".

	- Bug 1071654 tell us that devices rescanning is broken on FC storage
	  domains (although the -r flag is used). I reproduced this bug using
	  storage QE FC server.

	This patch removes the -r flag. To be on the safe side, I left the
	multipath call as it was since the first multipath commit in 2009. We
	will work with kernel and multipath developers further on removing this
	call if it is indeed unneeded.

	Bug-Url: https://bugzilla.redhat.com/1078879
	Relates-to: https://bugzilla.redhat.com/1071654
	Relates-to: http://gerrit.ovirt.org/17263

2014-06-04  Federico Simoncelli  <fsimonce@redhat.com>

	sp: ensure that master domain is active
	It's not possible to be connected to a pool where the master domain
	is attached (and not active).
	In case the engine tries to send a domain map (memory backend) in
	which the master domain is attached the operation should fail.

2014-06-03  Francesco Romani  <fromani@redhat.com>

	vm: move getBalloonInfo in the stats thread
	To gather the ballon stats, we used to make a direct libvirt
	call in the getStats() body. This is dangerous, because
	getStats() should not contain costly calls, and should
	just gather data.

	This patch reimplements the balloon information getter as a
	sampling function, and moves it into the VmStatsThread
	to make things more robust.

	As remainder to avoid to sneak costly calls in getStats,
	this patch also adds a docstring in getStatsInternal.

2014-06-02  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Ensure not to handle no longer tracked fds in epoll
	In some cases it is possible that events from epoll are received before the
	socket is closed. This patch ensures that we're ignoring events which belong
	to fds we are not tracking (anymore).

	Bug-Url: https://bugzilla.redhat.com/1102072

2014-06-02  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing unused logErr parameter from execCmd

2014-05-31  Federico Simoncelli  <fsimonce@redhat.com>

	volume: fix constants in validateCreateVolumeParams
	This patch solves a problem related to the use of the volume constants.
	The issue, introduced in 9d15a8c, was hid by subsequent patches in the
	same series.

2014-05-30  bruce  <xiao-lei.shi@hp.com>

	vm: Create vm numa node according to the node index
	For vm numa node in libvirt, the node index is decided by the cell
	sequence of the configuration xml. So we sort the node items according
	to the node index and build the dom xml with the sequence.

	Bug-Url: https://bugzilla.redhat.com/1099814

2014-05-30  Federico Simoncelli  <fsimonce@redhat.com>

	volume: unify cow format check on creation
	The same check performed both in fileVolume and blockVolume has been
	moved to the base volume class. Now validateCreateVolumeParams in
	fileVolume doesn't contain anything specific and it has been removed.

	blockVolume: prepare volumes for shrinkToOptimalSize
	The qemu-img check command needs the entire volume chain in order to
	be able to open the image.
	Up until now shrinkToOptimalSize worked only for base volumes, in the
	other cases it was failing with:

	 QImgError: ecode=1, stdout=[], stderr=[
	   "Could not open '(image path)': No such file or directory"]

2014-05-30  Liron Aravot  <laravot@redhat.com>

	core: introducing uploadImageToStream
	Adding uploadImageToStream  verb which allows to retrieve image data from
	vdsm to the requester over HTTP.
	GET requests arriving to the server  to default paths that we use
	today for request handling ('/', '/RPC2') will be treated
	as retrieve requests.
	The retrieve operation  itself is being executed within a task, that's
	needed to indicate that there's an operation executed by
	the host.

	core: BindingXMLRPC - exporting logic out from do_PUT.
	moved logic out from do_PUT method so it could be used by other
	operations as well.

	core: generify "streamDownloadImage" related methods
	This patch generifies the related "streamDownloadImage" methods in
	image/imageSharing to be have more generic name as they could be used
	with any passed fileObj.

	core: removal of unneeded callback passing
	The callback can be executed from sp.py after completing the operation,
	eliminating the need to pass it to imageSharing.

	core: imageSharing - export logic to functions
	The "copy" logic within imageSharing.streamDownloadImage() can be
	generified and exported out to be used by any operation. In this patch it's
	being exported to the copyData function with the appopiate
	generification.

2014-05-30  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: unify vm ovf management lock
	Taking one lock per VM definition could be extremely slow (especially
	when the engine sends 100 ovf). In one case it took more than 3 minutes
	to take 76 locks. This patch unifies the VM locks into a generic one.
	There was no real advantage in the current implementation, in fact if
	by any chance updateVM was stuck trying to persist a VM definition it
	is understood that also removeVM would get stuck at file-system level.
	Moreover storing 100 ovf is a quite fast operation (if it doesn't get
	stuck) and it is not supposed to starve removeVM.
	Multiple removeVM calls are still executed in parallel because the
	generic lock is acquired in shared mode.

	Relates-To: https://bugzilla.redhat.com/show_bug.cgi?id=1100527

2014-05-29  Liron Aravot  <laravot@redhat.com>

	BindingXmlRPC - do_PUT to return created task id in header
	Currently the execution result of "download" to image is being returned
	as json written to the response message body, this patch changes it so that
	in case of failure the failure details (error code and message) would be
	returned as json in the message body while in case of succesful
	task creation the task id would be returned in a header.
	this is needed so that when the abillity to upload an image from vdsm
	would be added, both operations will return a similar result (as in the
	"upload" operation the response message body would contain the contain the
	image data so we'll need to return the task id within the header).

2014-05-29  Martin Perina  <mperina@redhat.com>

	caps: Collect kdump status
	Adds kdump configuration status to caps module. The status can contain:

	  -1 - UNKNOWN (it's set if some error appears during status check)
	   0 - DISABLED (kdump is not loaded or fence_kdump is not configured)
	   1 - ENABLED (kdump is loaded properly and fence_kdump is configured)

	The status will be reported as part of getCapabilities response in key
	'kdumpStatus'.

	The value will be displayed in webadmin in General tab inside Host view
	and it will also be used in kdump detection part in fencing flow.

	Bug-Url: https://bugzilla.redhat.com/1079821

2014-05-28  Daniel Erez  <derez@redhat.com>

	vm: added missing diskReplicate slot in Drive class
	Following commit I6e8dadabdd02d3b44606f215c4bc7b7e306a591a,
	added missing 'diskReplicate' slot in VM -> Drive class.

	Currently, live storage migration fails due to an exception [1]
	on 'diskReplicateStart' method.

	[1] AttributeError: 'Drive' object has no attribute 'diskReplicate'

	vm: wrong message formatting leads to an exception
	vm -> diskReplicateStart:
	wrong string formatting in error log leads to
	the following exception:
	"TypeError: not enough arguments for format string".

2014-05-28  Antoni S. Puimedon  <asegurap@redhat.com>

	ifcfg: remove and re-create bonds when they are not to be destroyed
	In order to make sure that bonds that should be left undestroyed,
	but do not have users, are set with the default options and devoid
	of any previous configuration, we delete the bond and its ifcfg
	file and create new ones.

	Bug-Url: https://bugzilla.redhat.com/1097674

	caps: add reporting of all ipv4 addresses
	With this patch, we add a new field to the reported device
	information. This new field is 'ipv4addrs', that just like the
	current 'ipv6addrs' reports all the addresses of the device (each
	for its own address family). With this new reporting, now 'addr'
	and 'netmask' are specifically reporting the primary address.

2014-05-28  Martin Sivak  <msivak@redhat.com>

	Fix memShared units when reported from MOM
	MOM reports the ksm_pages_sharing value in raw pages.
	Both VDSM and engine expect megabytes, so this patch adds
	the necessary conversion.

	This also moves the PAGE_SIZE_BYTES to caps.py to avoid
	circular dependency.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1072030

2014-05-28  Yaniv Bronhaim  <ybronhei@redhat.com>

	dmidecode: Handle missing values
	Make all hwInfo fields in API optional, and change property retrieval so
	it cannot fail, also, get rid of all keys that contain no actual
	information.

	The engine will assume that all the missing keys are not available and
	report/display an according message (rather than sending 'Not
	Specified')

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1089393

2014-05-27  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm_config: move download certificate
	DHCP servers might delay to deliver the ip address
	and we can't download the engine certificate from
	vdsm-config stage. This patch is moving the download
	certificate from vdsm-config to vdsm-reg-setup.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1065368

2014-05-27  Antoni S. Puimedon  <asegurap@redhat.com>

	net_tests: add reusing dhclient owned iface
	https://bugzilla.redhat.com/1100264 showed us that we are lacking
	testing of interface reusing, specifically about reusing dhclient
	owned devices. This patch covers this hole in our test coverage.

2014-05-26  Liron Aravot  <laravot@redhat.com>

	avoid waiting for event forever
	When executing put request to vdsm in order to upload data to image, in
	case of exception before a task was started we may wait for the event
	forever, if no task was created there's no need to wait and the error
	can be returned immediately.

2014-05-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Remove rsyslog requirement and leave the check of syslog fd availability
	Some use syslog-ng instead of rsyslog daemon, this provides the same fd
	to communicate with syslog. Instead of hard requirement in spec file, we
	leave the check during pre-start and update the output.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1083100

2014-05-26  Francesco Romani  <fromani@redhat.com>

	virt: stats: move core static stats in a method
	this patch reorganizes the code to move all the
	stats which will not change after a VM is booted
	into a separate method,

2014-05-26  Antoni S. Puimedon  <asegurap@redhat.com>

	network: publish and honor blockingdhcp setting
	blockingdhcp is an old unpublished network option that allows the
	user to specify that the network configuring should wait for the
	result of upping a dhcp configured interface. When moving to the
	packed (as oposed to unpacked, i.e., **opts) options for
	objectivizeNetworks, this option stopped reaching the network
	models, and thus, stopped being applied.

	This patch re-enables blockingdhcp, publishing it in the API so
	that we continue to honor it.

	iproute2: stop non-vdsm dhclient before we run our own
	It is possible that a device that we re-use, like for example a nic
	or a bond in the installation flow could have a dhclient process
	running for them. That would effectively make the vdsm dhclient run
	fail due to dhclient's detection of it having a 'dhcp agent' already
	running. This patch solves it by pre-emptively telling dhclient to
	kill clients for existent devices that we are about to attempt to
	configure.

	Bug-Url: https://bugzilla.redhat.com/1100264

2014-05-26  Mooli Tayer  <mtayer@redhat.com>

	ConfigFile.py: test for key=val pattern only after replacing old lines.
	Only after changing an old line (by removing or adding a prefix to it)
	should we consider the line as an old key=val pair - We do not replace
	old configuration keys if they exist in a configuration file.

	ConfigFile.py: provide backward compatibility with '# by vdsm' comments.
	see 'Backward compatibility:' at ConfigFile doc for detailed description.

	vdsm-tool: prefix private methods and properties with _

	ConfigFile.py: include default section wrapping comments.
	Since ConfigFile.py represents common operations on config files
	it should also include the default comments vdsm inserts.
	Only version has no default to allow different callares
	have different configuration version.

	ConfigFile.py: improve documentation

	vdsm-tool: add unprefixLines() to configfile.py.
	New method removes 'prefix' from each line starting with it.
	No editing is done on new content added by this config file.

	This method will be used to remove '# VDSM backup' comments
	put inside libvirt logrotate file.

	Changed doc string of prefixLines to reflect the link
	between the two methods.

	Tests included (see testPrefixIdempotencey in toolTests.py).

	unprefixLines is the reverse function of prefixLines so that
	unprefixLines(prefixLines(file)) = file.

2014-05-26  Federico Simoncelli  <fsimonce@redhat.com>

	volume: use qemuimg and remove custom qemuConvert
	This patch removes the custom qemuConvert implementation. It is safe
	to drop the ddWatchCopy part because:

	- it was initially introduced to workaround a bug in qemu-img that was
	  preventing it from working with raw volumes on block devices [1]
	- it was later on used to try and maintain the preallocation of a
	  volume on file domains, but it was covering only one specific case
	  (raw to raw) and in the most common case of copyCollapsed (cow chain
	  to raw) was using qemu-img (not maintaining the preallocation)
	- given bz#1097843 we are trying to phase out preallocation on file
	  domains because it is hard (or sometimes impossible) to guarantee,

	This patch has just shown that there are at least two cases where we
	were (and are) not able to guarantee preallocation (mergeSnapshot and
	copyCollapsed).

	[1] the problem is that qemu-img is designed to maintain sparseness
	when possible. This means that if it fails to detect that the
	destination is a block device then it will seek instead of writing
	zeroes, leving some of the previous data in place.
	This has been fixed since some time and Kevin Wolf mentioned that
	the code is now really explicit about this case being handled (force
	to write zeroes if the destination is raw on a block device).
	Moreover vdsm has been already relying on qemu-img to convert cow to
	raw and it seems that we never hit any issue.

	Related-To: http://bugzilla.redhat.com/1097843

2014-05-26  Francesco Romani  <fromani@redhat.com>

	spice: allow to disable the to clipboard copypaste
	since version 0.9.3, libvirt allows to optionally disable copy and paste
	in the spice protocolol:

	http://libvirt.org/formatdomain.html#elementsGraphics

	this patch expose this capability in VDSM, in the VM definition.
	The new parameter is optional and enabled by default for backward
	compatibility.

	No XML changes are produced at all unless the new parameter is
	specified.

	Bug-Url: https://bugzilla.redhat.com/1052959
	Bug-Url: https://bugzilla.redhat.com/800155

	vm: drop wasteful time.sleep() in releaseVm
	After inspection of the libvirt code, turns out
	the time.sleep(30) we currently have in the releaseVm
	flow is redundant and wasteful.

	Libvirt (1.2.x) already has hardcoded timeout to handle
	the QEMU process termination, and this patch leverages that.

	Before this patch, the sequence of events triggered
	by the dom.destroy() call in the worst case scenario
	(QEMU not responding) is:
	- send SIGTERM (clean shutdown request)
	- wait 10s (libvirt, hardcoded)
	- (fails)
	- log error (libvirt, vdsm)
	- wait 30s (vdsm)
	- send SIGTERM (clean shutdown request)
	- wait 10s (libvirt)
	- (fails)
	- log error (libvirt)
	- send SIGKILL (forced shutdown request)
	- wait 5s( libvirt, hardcoded)
	total time: 10+30+10+5 = 55s (all hardcoded!)

	With this patch, the flow becomes:
	- send SIGTERM (clean shutdown request)
	- wait 10s (libvirt, hardcoded)
	- (fails)
	- log error (libvirt, vdsm)
	- send SIGTERM (clean shutdown request)
	- wait 10s (libvirt)
	- (fails)
	- log error (libvirt)
	- send SIGKILL (forced shutdown request)
	- wait 5s( libvirt, hardcoded)
	total time: 10+10+5 = 25s (no values hardcoded in VDSM)

	Bug-Url: https://bugzilla.redhat.com/1091389

2014-05-26  Antoni S. Puimedon  <asegurap@redhat.com>

	ifcfg: Prevent ifup from failing due to existing dhclient
	When configuring a device with bootproto=dhcp it is possible that
	the device, if pre-existent, had a running dhclient instance that
	would make ifup fail. This is especially true in the oVirt
	deployment flow when we configure the management network over
	a device that very likely already had a dhclient running.

	Up until now this has not hit us hard (though it has polluted logs)
	due to the fact that we ifup dhcp in asyncronous mode and return
	success before the failure.

	Bug-Url: https://bugzilla.redhat.com/1100264

	ifcfg: Put hotplug=no for virtual devices
	In el6 systems, udev can trigger an ifup call when a device is
	created. The issue with the triggering is that when we create a
	virtual device, e.g. a vlan, we do so via ifup, so what will
	happen is:

	we write ethX.Y
	initscripts creates the
	  vlan device with id Y
	  on top of ethX.                      udev detects the new device
	        | Process 1                              | Process 2
	initscripts finished doing             udev calls initscripts' ifup
	ifup, possibly calling dhclient            for the new vlan device
	                                       initscripts possibly calls
	                                           dhclient

	The issue is that the two processes can do the dhclient in whichever
	order and one dhclient will prevent the other from succeeding. Only
	one ifup should be called for each device, so we need hotplug=no to
	prevent Process 2 from succeeding in its ifup.

	Our current usage of ifcfg files does not set hotplug=no
	so that when the user replaces a physical card by hot-unplugging
	and hot-plugging there will be an auto configuration. This behavior
	is maintained by the fact that we only set hotplug=no for those
	devices for which we control the whole life cycle, i.e., vlans,
	bonds and bridges.

	Bug-Url: https://bugzilla.redhat.com/1097818

2014-05-26  Adam Litke  <alitke@redhat.com>

	storage: Split setParent volume operations
	For efficiency on block domains we store a volume's parent UUID in two
	places: as an LV tag on the Volume LV itself, and in the metadata LV of
	the block domain.  For file domains the parent UUID is stored only in
	the volume's metadata file.  This works fine now but when we introduce
	live merge we will have a problem.  On block domains the LV tag can only
	be updated by the SPM and the metadata LV can be updated by the HSM
	host.  On file domains, the metadata file can only be updated by the HSM
	host.  When a live merge completes we will need to update the volume
	chain as soon as possible to match what qemu is actually using.  In
	order to do this from the HSM host (where the live merge completes) we
	need to split setParent into two parts.

	setParentMeta can always be called by the HSM host that is running the
	VM and by an SPM if the volume is not in use.

	setParentTag must only be called by the SPM.

	A common implementation of setParent is added to the Volume base class
	and will ensure compatibility with all existing callers of setParent.

	In the live merge case, we will call setParentMeta when the merge
	completes and will call setParentTag from the deleteVolume SPM verb
	where we actually remove the merged volume.

2014-05-23  Dan Kenigsberg  <danken@redhat.com>

	sourceroute: fix logging arguments

2014-05-23  Nir Soffer  <nsoffer@redhat.com>

	utils: Add execCmd sync mode failing stress tests
	This patch adds couple of tests that stress exceCmd sync mode under high
	concurrency. I added the tests to ensure that the next patch, avoiding
	AsyncProc in sync mode, does not introduce any regressions.

	I tested this on two 8 cores machines with 16G or RAM. One is i7-3770
	running RHEL 6.5, and the other i7-4770 running Fedora 19. I run
	utilsTests.py 10 times on each machine, with the next patch and with
	current code.

	When run with the next patch (using Popen.communicate), using 200
	threads:

	- Python cpu usage is about half of maximum (400% of 800%)
	- Load average in top up to 60
	- utilsTests.py completes in 75 on the faster machine, and 170 seconds
	  on the other.
	- All 10 runs completed successfully.

	When run with the current code (using AsyncProc.communicate), it was too
	slow with 200 threads, so I used only 50 threads:

	- test_write_stdin_read_stderr always fail immediately with OSError,
	  even with 1 thread.
	- Python cpu usage reach close to maximum (798% of 800%)
	- Load average in top up to 45
	- utilsTests.py completes in 98 seconds on the faster machine and 158
	  seconds on the other.
	- On the RHEL 6.5 machine, the tests seems to deadlock after 8 runs,
	  consusing 100% cpu with no progress for 40 minutes.

	Seems that the current execCmd implementation is not reliable and
	scalable as the built-in Python implementation.

2014-05-22  Yeela Kaplan  <ykaplan@redhat.com>

	Remove unused remote file handler method (directWriteLines)

2014-05-22  Francesco Romani  <fromani@redhat.com>

	virt: graphdev: handle ticket for multiple devices
	This patch extends the ticket support for the
	multiple graphics devices scenario.

	This is done by extending the VM.updateDevice API
	to support the Graphics Devices in addition to the
	Network Devices. The parameters which can be updated
	are the one which allow to set a ticket
	for graphics.

2014-05-22  Arik Hadas  <ahadas@redhat.com>

	always teardown snapshot's memory volume
	Teardown the memory volume of snapshot with memory as part of 'finally'
	block to ensure it is done in case an exception is thrown in the
	'snapshot' method as well.

2014-05-22  Federico Simoncelli  <fsimonce@redhat.com>

	volume: use qemuimg and remove custom qemuRebase
	This patch substitutes a custom qemuRebase function with the more
	standard implementation in qemuimg module.

	volume: remove unused imgPath argument from clone
	This patch removes the unused imgPath argument from clone and all its
	related methods.

2014-05-22  Francesco Romani  <fromani@redhat.com>

	virt: graphdev: support multiple graphics devices
	This patch allows a Vm to have more than one Graphics Devices,
	so a we can now have multiple consoles (e.g. SPICE and VNC
	at the same time).

	With this feature, a user can switch clients without restarting that VM.
	Another possible use case is the regular users using SPICE for
	performance and the administrator using VNC for portability.

	Bug-Url: https://bugzilla.redhat.com/976044

2014-05-21  Federico Simoncelli  <fsimonce@redhat.com>

	task: prevent tasks with the same id to be queued
	This patch prevents a task to be queued if its id is already used
	by another task. Previously the task already present in the queue
	would have been lost.

	taskManager: improve task queuing error logging
	This patch improves the task queuing error by adding the id of the task.

	build: add profile-stats to extra-dist files
	The profile-stats script must be distributed. This also solves a build
	problem during the pep8 check (E902 IOError):

	 [Errno 2] No such file or directory: 'contrib/profile-stats'

2014-05-21  Francesco Romani  <fromani@redhat.com>

	stats: change log to exception for missing stats
	Once we have explicitely handled the common error
	conditions for missing stats, we should now consider
	really 'exceptional' the case of a missing stat.

	stats: avoid log if cpu stats are known missing
	There are some known cases on which the cpu stats cannot
	be available, for example if not enough samples are yet
	collected.

	Those cases are already handled by the current code,
	but a message is logged anyway, even if it is a known
	and benign case of  expected missing sample.

	This patch add explicit handling for the benign missing
	cpu stats case, to avoid to produce log noise when it is
	expected to not have the cpu stats.

	virt: migration: always run migration monitor
	Before this patch the migration monitor thread is always
	run, unless the migration monitor interval configuration option
	is explicitely set to zero.

	This patch moves this check inside the migration.Monitor class.
	This patch provides admittedly little benefit on its own,
	in the form of minor cleanup, but is a step toward the unification
	of monitor and downtime threads.

2014-05-21  Martin Betak  <mbetak@redhat.com>

	vdsm: Add force and timeout options to VM.shutdown
	Added optional parameters 'timeout' and 'force' to
	shutdown in vdsm and vdsClient.

	Timeout represents number of seconds to wait before falling back to next
	alternative method of shutdown/reboot.

	If 'force' is True and all graceful methods fail, we reset/destroy the VM.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1054070

2014-05-21  Dima Kuznetsov  <dkuznets@redhat.com>

	pep8: Add non .py sources to PEP8_WHITELIST

2014-05-21  Francesco Romani  <fromani@redhat.com>

	stats: avoid log if disk latency is known missing
	There are some known cases on which the disk latency stats
	are not available, for example if recovery is in progress.

	Those cases are already handled by the current code,
	but a message is logged anyway, even if it is a known
	and benign case of  expected missing sample.

	This patch add explicit handling for the benign missing disk
	latency stats case, to avoid to produce log noise when it is
	expected to not have the disk latency stats.

2014-05-21  Xavi Francisco  <xfrancis@redhat.com>

	storage: Add custom mount options to NFS SD
	When creating or modifying a NFS Storage Domain a user should be able to
	pass more mount options to the underlying host.

	This patch implements a way to pass custom mount options to the
	storageServer using the same approach as the PosixFS SD.

	Bug-Url: https://bugzilla.redhat.com/1087059

2014-05-21  Dima Kuznetsov  <dkuznets@redhat.com>

	vdsm-tool: update to print function
	Update prints to python3 print function

	vdsm-tool: Add command name to args for command
	Each command now receives its own copy of 'sys.argv'-like argument list,
	starting with command name and all its arguments.

	Added exception each command can throw in case wrong params were passed.
	Exception handler for this exception prints the doc string for the
	command.

	Some command functions were split because they're called both from vdsm
	code and vdsm-tool code, so the vdsm-tool expose goes to a wrapper
	function first and ensures the parameters are there, then passes to the
	actual function.

	vdsm-tool: Change exception reporting
	General environment issues will raise EnvironmentError, Execution failures
	will raise RuntimeError. For specific vdsm-tool usage this patch introduce
	vdsm.tool.UsageError as the root class for exceptions to present to the user.
	Usage errors are only printed to the screen preceded by "Error:" and do
	not generate a stack trace.

2014-05-21  Francesco Romani  <fromani@redhat.com>

	schema: mark cpuShares optional
	'cpuShares' is declared as optional, so it should be prefixed
	with an asterisk.

2014-05-21  Dima Kuznetsov  <dkuznets@redhat.com>

	misc: remove readfile function.
	readfile() function was only used inside its own tests, and due to
	recent changes of file-system type detection being removed, it began
	reading always reading with O_DIRECT.

	Its tests do not pass on F20 since they do not read an aligned block
	size, but since nothing uses this code but the tests itself we can
	simply remove it.

2014-05-20  Adam Litke  <alitke@redhat.com>

	LiveMerge: Remove old merge APIs
	The old merge and mergeStatus APIs were never adopted and in order to
	make way for the new live merge feature let's remove this dead code
	first.

2014-05-20  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Read default bonding options
	A randomly-named reference bond is created once to obtain
	the defaults for all bonding modes.

	Some sysfs entries are ignored as they are not actually
	"options", e.g. 'active_slave', 'ad_partner_mac'.

	Related-To: https://bugzilla.redhat.com/987813

2014-05-20  Francesco Romani  <fromani@redhat.com>

	tests: add more tests for graphics devices
	this patch adds a few more sanity tests for
	the graphic devices.

	virt: stats: move vm status detection in a method
	this patch moves the detection of the status of a VM
	in a separate method. No functional changes.

	virt: stats: move vm runtime stats in a method
	this patch gathers all the stats values which
	can change during the life o a VM in a separate
	method.

	vm: floppy: remove special 'readonly' handling
	floppy devices used to have an explicit extra check
	on the image permissions to determine if the image
	had to have the 'readonly' attribute set.

	Engine is already sending this information, and this
	check is already done previously in vm.Drive.getXML()

	Moreover, this check is not only redundant, but it is
	one of the legacy remaining places vdsm can get stuck
	if the ISO domain becomes inaccessible when a VM is
	started, because no out-of-process I/O is used.

	To address those issues, this patch always mark the
	floppy image read-only, and removes the explicit
	additional check and all the code which was used
	only by it.

	This patch purposefully undoes what was done to fix
	https://bugzilla.redhat.com/show_bug.cgi?id=674357
	because nowadays there is no longer use for floppy
	devices outside sysprep, but this is already out of
	direct user control.

	Bug-Url: https://bugzilla.redhat.com/755528
	Relates-To: https://bugzilla.redhat.com/674357

2014-05-20  Dima Kuznetsov  <dkuznets@redhat.com>

	pep8: Fix indentation in supervdsmServer
	Fix pep8 issue in supervdsmServer and added its path to PEP8_WHITELIST
	to make sure don't oversee other pep8 issues in the file.

2014-05-20  Francesco Romani  <fromani@redhat.com>

	vm: fix 'port' reporting with SSL enabled
	If spice is configured with ssl enabled, the 'port' attribute
	may be missing. This patch fixes that.

	The port allocation behaviour in libvirtt may be surprising. If we supply

	    <graphics autoport="yes" keymap="en-us" passwd="*****"
	passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice">
	        <channel mode="secure" name="main"/>
	        <channel mode="secure" name="inputs"/>
	        <channel mode="secure" name="cursor"/>
	        <channel mode="secure" name="playback"/>
	        <channel mode="secure" name="record"/>
	        <channel mode="secure" name="display"/>
	        <channel mode="secure" name="usbredir"/>
	        <channel mode="secure" name="smartcard"/>
	        <listen type='address' address='127.0.0.1'/>
	    </graphics>

	note port=1 and tlsPort=-1 in input
	we will get in output

	    <graphics type='spice' tlsPort='5900' autoport='yes'
	listen='127.0.0.1' keymap='en-us' passwdValidTo='1970-01-01T00:00:01'>
	      <listen type='address' address='127.0.0.1'/>
	      <channel name='main' mode='secure'/>
	      <channel name='display' mode='secure'/>
	      <channel name='inputs' mode='secure'/>
	      <channel name='cursor' mode='secure'/>
	      <channel name='playback' mode='secure'/>
	      <channel name='record' mode='secure'/>
	      <channel name='smartcard' mode='secure'/>
	      <channel name='usbredir' mode='secure'/>
	    </graphics>

	note no 'port' in output

	However, if we do not specify the channels in input

	    <graphics type='spice' port='-1' autoport='yes' listen='127.0.0.1'>
	    </graphics>

	We will get 'port' in output in addition to 'tlsPort', which was
	expected.

	    <graphics type='spice' port='5900' tlsPort='5901' autoport='yes'
	listen='127.0.0.1'>
	      <listen type='address' address='127.0.0.1'/>
	    </graphics>

	Bug-Url: https://bugzilla.redhat.com/1099425

2014-05-19  Francesco Romani  <fromani@redhat.com>

	pep8: fix line too long
	commit b867894ea34ec710cc261646edf3283b90f2dec4 introduced a pep8
	error. This patch fixes that.

	virt: graphdev: add the GraphicsDevice class
	this patch introduces the Graphics Device class to be used
	to define the Vm display properties.
	No more than one Graphics Device is supported.

	If VDSM receives a Graphic Device definition, it uses that;
	otherwise, tries to fallback to display* parameters received as input.

	VDSM will continue to supply the legacy display* parameters
	in stats output and in the conf dictionary (VmDefinition)
	to preserve the backward compatibility. This includes migrations,
	so a VM created with a single new style graphic device can be
	migrated to old VDSMs without breaking cluster compatibility.

2014-05-17  Nir Soffer  <nsoffer@redhat.com>

	utils: Cleanup command logging
	A new dictionary was created for selecting the "SUCCESS" or "FAILED"
	message for the debug log. This is pointless when debug messages are not
	logged. Replaced with nicer and probably more efficient conditional
	expression.

	repr(err) was invoked even when debug messages are not logged. Use now
	%r format, so conversion is done only when log message is formatted.

2014-05-16  Francesco Romani  <fromani@redhat.com>

	vm: report exit reason if restore state fails
	The exit reason code needs to be reported an all error paths.
	It was mistakenly left out on the restoreState error path,
	most likely because this path is different because the exitMessage
	is overwritten.

	This patch ensures exitReason is always reported.

	stats: avoid log if disk stats are known missing
	There are some known cases on which the disk stats cannot
	be available, for example if recovery is in progress.

	Those cases are already handled by the current code,
	but a message is logged anyway, even if it is a known
	and benign case of  expected missing sample.

	This patch add explicit handling for the benign missing
	disk stats case, to avoid to produce log noise when it is
	expected to not have the disk stats.

2014-05-15  Amador Pahim  <apahim@redhat.com>

	hooks: macbind - Attach vm nics to specified bridge
	This hook support binding specified vNIC identified by its mac address
	to custom/other bridge than the currently defined bridge in ovirt.
	This hook is also capable of binding a vNIC to a openvswitch bridge.

	This hook differs from existing "exnet" hook in 2 points:
	 - It is not dependent on a network defined in libvirt. macbind works
	 with any existing bridge on the system.
	 - It is per VM and not per virtual nic. User have an option to change
	 the attachment of one or more virtual nic to different bridges in that
	 specific 'vm run', even-though the vnic is permanently attached to a
	 different bridge.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1091005

2014-05-15  Nir Soffer  <nsoffer@redhat.com>

	sp: Remove uneeded error handler
	domainMointor module does not raise StorageException and handling it
	does not help anyone.

2014-05-15  Xavi Francisco  <xfrancis@redhat.com>

	storage: Add logging on filesystem altering operations
	The rationale behind this patch is to add logging on
	filesystem altering operations. Before, no trace was given when creating or
	deleting symbolic links or removing or renaming files and folders.
	This patch tries to solve this adding debug messages before the
	operations are executed.

	This patch only includes the logging in the VDSM process so no out of
	process log management is needed.

2014-05-15  Nir Soffer  <nsoffer@redhat.com>

	misc: Cleaner readspeed
	When checking reading speed from storage, we used to actually read the
	data from the dd process into vdsm, just to drop it on the floor. This
	makes no sense since we are interested only in the 3 lines of statistics
	read from dd stderr.

	This patch uses execCmd directly instead of using the generic _readfile
	and configure dd to write the data to /dev/null.

	Profiling show no significant change in cpu usage, but doing less work
	is always better than doing more work.

2014-05-15  Federico Simoncelli  <fsimonce@redhat.com>

	volume: use qemuimg and remove custom createVolume
	This patch substitutes a custom createVolume function with the more
	standard implementation in qemuimg module.
	As a side-effect the 'preallocate' flag for the clone method became
	useless and it has been removed.

2014-05-15  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Spaces around operators

2014-05-15  Federico Simoncelli  <fsimonce@redhat.com>

	volume: remove unneeded rebaseVolumeRollback logging
	This patch removes some unneeded extra logging, tasks failures are
	already logged by the task framework in Task._run().

2014-05-15  Dan Kenigsberg  <danken@redhat.com>

	caps: drop a non-surprising error report
	Commit 60dd97a84 changed getVdsCaps to report whether we support live
	snapshots. Usually, not having the relevant architecture in libvirt's
	capapbilities is indeed a bug. However, this is not the case when we are
	faking kvm support.

2014-05-14  Dima Kuznetsov  <dkuznets@redhat.com>

	pep8: Fix pep8 in vdsm-tool
	Added PEP8_WHITELIST to avoid such things in the future.

2014-05-14  Nir Soffer  <nsoffer@redhat.com>

	profile: Add script for printing profile statistics
	This script make it easy to get the typical statistics from a profile.
	See the script docstring for more info.

2014-05-14  Federico Simoncelli  <fsimonce@redhat.com>

	fileVolume: create file volume with correct mode
	This patch removes a race in the volume file permissions between
	creation and file_setrw. Now there's no window of time where the
	volumes may have permissions that are not restrictive enough.
	The correct mode is now also explicit using the VOLUME_PERMISSIONS
	constant.

2014-05-14  Dan Kenigsberg  <danken@redhat.com>

	hooks: introduce before/after_get_caps hook points
	This patches adds a hook point that allows to modify the capabilities
	which Vdsm reports on its getVdsCapabilities API. This hook can become
	useful if a hook writer would like to fake the existence of networks or
	cpu flags.

2014-05-14  Dima Kuznetsov  <dkuznets@redhat.com>

	fakevmstats: Fix debian install paths.
	Remove non-existant file.

2014-05-14  Federico Simoncelli  <fsimonce@redhat.com>

	fileVolume: avoid full size truncation for cow
	During the creation of a new file volume we are supposed to truncate the
	file to its full capacity only if the format is raw. In the cow case we
	should just prepare an empty placeholder to be initialized later on by
	qemu-img.

2014-05-14  Nir Soffer  <nsoffer@redhat.com>

	profile: Introduce profile decorator
	The profile decorator can be used for profiling certain code path, where
	whole application profile is not needed.

	To profile a function, decorate it:

	    from profile import profile
	    import slowmodule
	    ...
	    @profile('expensive_stuff.prof')
	    def test_expensive_stuff():
	        slowmodule.do_expensive_stuff()

	The recorded profile will include all threads running or started while
	my_function was executed.

	Note that you cannot use application wide profile and function profile
	in the same time. To prevent confusion, a profile.Error is raised if you
	try to start a profile while the profiler is already running.

	sp: Remove invalid validation of stale meta data
	When refreshing a storage pool, we used to validate the the metadata
	before refreshing the pool. This validation fail if the storage domain
	was just upgraded from old format where metadata was storaged on the
	medadata lv, to the new format keeping metadata in the lv tags.

	The validation is pefromed now after the refresh, ensuring that the
	metadata is correct after a successful refresh.

	Bug-Url: https://bugzilla.redhat.com/954169

2014-05-13  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Capture migration start time after the semaphore was accquired
	Previously the migration start time was captured at the start of the
	MigrationSourceThread which leads to aborting migrations when the VMs
	had too long to wait for the accquisition of the migration semaphore.

	This patch captures the start time in the moment the migration really
	begins. Additionally this patch logs the time the migration took to
	accquire the migration semaphore to improve debugging of the logs.

	Bug-Url: https://bugzilla.redhat.com/1090109

2014-05-13  Dima Kuznetsov  <dkuznets@redhat.com>

	hooks: Add hook for fake VM stats
	Added 4 new hook-able events:
	 * before_get_vm_stats
	 * after_get_vm_stats
	 Called upon getVmStats() API call.

	 * before_get_all_vm_stats()
	 * after_get_all_vm_stats()
	 Called upon getAllVmStats() API call.

	Also added 'fakevmstats' hook, that is performed on
	after_get_all_vm_stats event and inserts random fake statistics for the
	VM.

2014-05-13  Federico Simoncelli  <fsimonce@redhat.com>

	fileVolume: remove unneeded size conversion in _create
	It quite some time that blockVolume._create is already treating the
	size argument as an integer (e.g. in the SECTORS_TO_MB computation).
	The two places where size is set are: createVolume (hsm.py) where
	validateN does the integer conversion and volume.getSize where
	there's and explicit call to int.

2014-05-12  Stanislav Mikhalevich  <msio57@gmail.com>

	gluster: correct GLUSTER_RPM_PACKAGES
	The patch makes correct GLUSTER_RPM_PACKAGES
	structure for list comprehension (caps.py:454)

2014-05-12  Nir Soffer  <nsoffer@redhat.com>

	sp: setDomainRegularRole is implemented by backend
	Commit ab6014b394 factored out metadata access to pool backend, but left
	one call to StoragePool.setDomainRegularRole() that is implemented now
	by the backend. Detected by pylint.

	Bug-Url: https://bugzilla.redhat.com/1096227

	spec: Require iscsi-initiator-utils >= 6.2.0.873-21
	From version 6.2.0.873-7 up to version 6.2.0.873-20, there is a
	regression in iscsi-initiator-utils, which cause creation of iscsi
	storage domain to fail.

	Vdsm requires now version 6.2.0.873-21 which fixed this regression.

	Bug-Url: https://bugzilla.redhat.com/1076603

2014-05-09  Antoni S. Puimedon  <asegurap@redhat.com>

	bridge_opts: Add iproute2 configurator support
	This patch implements bridging option setting for the iproute2
	configurator (after the previous patch added it for the ifcfg
	configurator).

	Implementing this allows the user of the iproute2 configurator
	to set bridge options like 'forward_delay=2000 multicast_snooping=0'

2014-05-09  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: fix setStoragePoolDescription execution
	In commit ab6014b the pool metadata operations were moved to the pool
	backend, while the call to setStoragePoolDescription was left as it was,
	leading to an attribute error.

	StoragePoolMemoryBackend does not maintain any information about the
	pool so setStoragePoolDescription it is not supported.
	It is safe to ignore the setStoragePoolDescription request because in
	StoragePoolMemoryBackend there's no place where to persist the value
	and engine never tries to read this information.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1096212

2014-05-09  Antoni S. Puimedon  <asegurap@redhat.com>

	bridge_opts: Add ifcfg configurator support
	bridge_opts is a new custom netwrok property that allows to tweak
	the VM networks bridge behavior by passing a string such as:
	    'max_age=2100 forward_delay=300'

	This patch makes processing of such options part of vdsm proper by
	including its processing in the ifcfg configurator.

2014-05-09  Francesco Romani  <fromani@redhat.com>

	vm: report exit reason for migration failed
	this patch add reporting for an explicit exit
	reason when migration fails, instead of
	generic error.

	Relates-To: https://bugzilla.redhat.com/697277

2014-05-09  Nir Soffer  <nsoffer@redhat.com>

	tests: Use testrunner.namedTemporaryDir
	Some tests were working hard ensuring proper cleanup when a test fails,
	instead of using the existing infrastructure.

	tests: Ensure cleanup when tests fail
	Some tests were using an optimstic approach:

	    create_temporary_stuff()
	    self.assertTrue(maybe_false)
	    cleanup_temporary_stuff()

	Other tests, testing directory cleanup code, were not trying to clean up
	at all, assuming that the code works.

	This patch ensure proper cleanup of temporary files when test fails.

2014-05-09  Antoni S. Puimedon  <asegurap@redhat.com>

	net_persistence: Make unified persistence default
	Up until now, we've been using the legacy ifcfg persistence to store
	and retrieve network configurations. This patch switches the default
	to 'unified' so that we'll be able to depend on it moving forward.

	Unified persistence stores its persistence in three places:
	- In transaction data: memory,
	- Current configuration: /var/run/vdsm/netconf/{nets,bonds}
	- Persisted configuration:
	      /var/lib/vdsm/persistence/netconf/{nets,bonds}

	Configurators are responsible to implement a flush method that cleans
	the system from its own persistence files.

	ifcfg: set onboot=no when persistence is 'unified'
	Up until now the ifcfg network configurator had been setting up
	onboot=yes so that when starting up the computer, network.service
	would bring up the vdsm networks and devices. This, however, is
	counter productive when using the 'unified' net_persistence setting
	as the boot up process would:
	1. network.service would create the devices and networks
	2. vdsm-restore-net-config would remove all the networks
	3. vdsm-restore-net-config would flush the ifcfg files
	4. vdsm-restore-net-config would bring up the networks and devices
	   again

	In the case of dhcp, that would imply a lot of duplicated address
	assignment time. Thus, this patch eliminates the step one from
	above.

2014-05-09  Mooli Tayer  <mtayer@redhat.com>

	configfile.py utility for common config file editing operations.
	Add utility to edit config files that is backward compatible
	with libvirt_configure.sh. Support for common operations used
	by vdsm tool. Context managed and commits file upon __exit__
	by replacing original file with a temporary file.

	Also provide a wrapper around ConfigParser to allow read only
	of file with no ini sections([section]).

2014-05-09  Antoni S. Puimedon  <asegurap@redhat.com>

	network: fix unrecognized engine values for STP
	The engine sends STP settings in a 'yes'/'no' range of values, which
	is disjoint from what I set as acceptable in
	I6a1a37485ae40b8c9f2037c671daa3e4c6ac3f90

	This patch fixes the stp booleanization so that it accepts what the
	engine has always sent.

2014-05-09  Nir Soffer  <nsoffer@redhat.com>

	tests: Use testrunner.TEMPDIR
	Storage functional tests used to define their own temporary directory
	path. They use now the testrunner default TEMPDIR which suits also the
	storage tests.

2014-05-09  Francesco Romani  <fromani@redhat.com>

	caps: report if QEMU supports live snapshots
	Depending on QEMU version and configuration, live snapshotting
	may be not supported. In that case, a request sent by engine
	will of course fail.

	Until version 1.2.3, libvirt did not expose any information about
	the live snapshot support, so VDSM, and then engine, had no
	option other than assume this was supported.

	This patch adds detection and reporting of QEMU live snapshot
	support, so engine can make informed choices like, for example,
	disable the relevant fields in the UI.

	Bug-Url: https://bugzilla.redhat.com/1009100

2014-05-09  Antoni S. Puimedon  <asegurap@redhat.com>

	unified_persistence: Fix whitelist value types
	The upgrade script didn't convert the types to what the vdsm schema
	expects for the data in the whitelist.

	This patch addresses that by having a dictionary that has a value
	handling method for each of the elements in the whitelist.

2014-05-09  Francesco Romani  <fromani@redhat.com>

	tests: virt: add infrastructure to test getStats
	This patch adds the initial infrastructure and the first
	very basic tests for the getStats() method.

2014-05-08  Federico Simoncelli  <fsimonce@redhat.com>

	volume: fix qemuRebase function signature
	A sloppy rebase of commit bb50245 hid a necessary update of the
	qemuRebase function signature.

	volume: unify the backing file path computation
	This patch unifies the backing file path computation logic in a single
	function (getBackingVolumePath).

2014-05-08  Nir Soffer  <nsoffer@redhat.com>

	fileUtils: Remove support for direct io on memory filesystems
	In commits e8f3848d12 and 127936c994, we added support for memory based
	filesystems such as tempfs and ramfs. This allows direct io tests to
	work when using temporary files in /tmp. These patches disabled direct
	io when reading or writing to such filesystems.

	Turns out that the code for checking file system type, required for
	these changes, has O(N^2) complexity, and profiles we did in the field
	on RHEV-H systems with many storage domains show that this code is major
	performance issue. We suspect that this issue is related to several
	other bugs and customer cases.

	Further, code using direct io, such as DirectFile, shouldn't try to
	outsmart the caller, disabling direct io magically.  The test writer
	should use the appropriate filesystem for such tests.

	This patch removes the support for memory filesystems, needed only for
	some tests. To prevent failures of the these tests, we use now /var/tmp
	instead of /tmp.

	I tested disabling memory filesystems on two setups.  The first was a
	single customer RHEV-H machine running 3.3 (test performed by customer),
	and the second 2 Fedora 19 hosts running master. Both systems are
	connected to 30 storage domains, are idle and have no vms running. On
	the RHEV-H machine, after disabling memory filesystems, average cpu
	usage dropped from 240% to 17%.  On the Fedora systems, average cpu
	usage dropped from 10% to 5% when running as spm, and from 5% to 3% when
	running as hsm.

	Bug-Url: https://bugzilla.redhat.com/1090664
	Relates-to: https://bugzilla.redhat.com/1074097
	Relates-to: https://bugzilla.redhat.com/1081962
	Relates-to: http://gerrit.ovirt.org/9595
	Relates-to: http://gerrit.ovirt.org/9661

2014-05-08  Francesco Romani  <fromani@redhat.com>

	vm: fix odd migration progress reporting
	migration progress should not start from 100,
	otherwise the user will see smething like:

	progress: 100 -> 0% ... X% ... 100%

	A real-word scenario that shows the need for this patch is
	the following:
	If during the the initialization of migration we experience
	some delay, for example DNS resolve issues, libvirt returns 0
	for all the progress values, and that incorrectly triggered
	the old shortcut, leading to an incorrect initial progress
	value of 100.

2014-05-08  bruce  <xiao-lei.shi@hp.com>

	sampling: Collect numa related statistics
	This patch modifies the HostStatsThread in sampling module to add
	function of collect host numa related statistics data.
	It will add two keys in the rpc response of getVdsStats whose value
	are the host's numa related statistics information.
	Key cpuStatistics, the value is a map, each item follows this format:
	{'cpuCoreId':{'nodeIndex':int, 'cpuIdle':'str', 'cpuSys':'str',
	              'cpuUser':'str'}}
	cpuCoreId      - The id of this cpu core
	nodeIndex      - The numa node index that this cpu core belongs
	cpuIdle        - The idle percentage of this cpu core
	cpuUser        - The user consumed percentage of this cpu core
	cpuSys         - The system consumed percentage of this cpu core
	Key numaNodeMemFree, the value is a map, each item follows this
	format:
	{'nodeIndex':{'memFree':str, 'memPercent':int}}
	nodeIndex      - The index of numa node
	memFree        - The free memory of this numa node in MB
	memPercent     - The used memory percentage of this numa node

	Bug-Url: https://bugzilla.redhat.com/1069303

	caps: Modify numa functions to public
	Modify numa related functions in caps module to be public since they
	are called in other modules.

	vm: Modify memory units of numa node
	This patch is based on http://gerrit.ovirt.org/#/c/25254/ to modify the
	memory units. Since there is a limitation in xmlrpc to transfer large
	integer, this patch modify the memory value to string format in MB unit.

	caps: Repair collect numa information
	This patch repairs the memory issue about collect numa information
	on a non-numa support machine.
	If there is only one cell in the result of libvirt's getCapabilities
	api, we consider it as non-numa support machine. In this situation,
	it will be issue an error when call libvirt's getMemoryStats api.
	Instead, we get the memory stats through /proc/meminfo.

	Bug-Url: https://bugzilla.redhat.com/1069303

	caps: Modify memory units of numa node
	This patch modifies the reported memory units in numa node collection
	process. In order to avoid the limitation of xmlrpc, the memory values
	are modified to string format in MiB unit.

2014-05-07  Dima Kuznetsov  <dkuznets@redhat.com>

	caps: Add selinux enforcement reporting.
	Added selinux field to getVdsCaps() what currently contains the mode of
	enforcement of the host

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=894084

2014-05-07  Antoni S. Puimedon  <asegurap@redhat.com>

	sourcerouting: fix _getRoute not to include local routes
	_getRoute, a method used to find the routes of a vdsm-created table
	in Dynamic Source Routing was listing the routes of the table and
	matching by device. The problem is that such matching would wrongly
	include local scope routes. Having such route would generate an
	IPRoute2 exception when removing routes and rules would never be
	removed, thus leaving behind trash in the rule list.

	After adding source routing for a bridged-network, the ip rules
	would look like:

	    0:      from all lookup local
	    32764:  from all to 240.0.0.0/24 iif test-network lookup 4026531841
	    32765:  from 240.0.0.0/24 lookup 4026531841
	    32766:  from all lookup main
	    32767:  from all lookup default

	The ip routes (as they were selected with
	'ip route show table 4026531841) would look like:

	    toniel602 tests (db78758) # ip route show table 4026531841
	    240.0.0.0/24 dev test-network  proto kernel  scope link  src 240.0.0.1
	    10.34.60.0/22 dev eth1  proto kernel  scope link  src 10.34.60.31
	    169.254.0.0/16 dev eth1  scope link  metric 1002
	    default via 10.34.63.254 dev eth1
	    240.0.0.0/24 via 240.0.0.1 dev test-network
	    default via 240.0.0.254 dev test-network
	    broadcast 127.255.255.255 dev lo  proto kernel  scope link  src 127.0.0.1
	    broadcast 240.0.0.255 dev test-network  proto kernel  scope link  src 240.0.0.1
	    local 10.34.60.31 dev eth1  proto kernel  scope host  src 10.34.60.31
	    local 240.0.0.1 dev test-network  proto kernel  scope host  src 240.0.0.1
	    broadcast 240.0.0.0 dev test-network  proto kernel  scope link  src 240.0.0.1
	    broadcast 10.34.60.0 dev eth1  proto kernel  scope link  src 10.34.60.31
	    broadcast 10.34.63.255 dev eth1  proto kernel  scope link  src 10.34.60.31
	    broadcast 127.0.0.0 dev lo  proto kernel  scope link  src 127.0.0.1
	    local 127.0.0.1 dev lo  proto kernel  scope host  src 127.0.0.1
	    local 127.0.0.0/8 dev lo  proto kernel  scope host  src 127.0.0.1

	As you can see, there is a local entry for dev test-network. This
	entry is parsable with ip vdsm/network/sourcerouting.py:Route.fromText
	and will match the correct device. The issue is that attempting to
	remove such entry will fail on the iproute tool.

	The fix is to call instead:
	'ip route show table all' which makes the output of the iproute tool
	to include table information:

	    240.0.0.0/24 dev test-network  proto kernel  scope link  src 240.0.0.1
	    10.34.60.0/22 dev eth1  proto kernel  scope link  src 10.34.60.31
	    169.254.0.0/16 dev eth1  scope link  metric 1002
	    default via 10.34.63.254 dev eth1
	    240.0.0.0/24 via 240.0.0.1 dev test-network  table 4026531841
	    default via 240.0.0.254 dev test-network  table 4026531841
	    broadcast 127.255.255.255 dev lo  table local  proto kernel  scope link  src
	    127.0.0.1
	    broadcast 240.0.0.255 dev test-network  table local  proto kernel  scope link
	    src 240.0.0.1
	    local 10.34.60.31 dev eth1  table local  proto kernel  scope host  src
	    10.34.60.31
	    local 240.0.0.1 dev test-network  table local  proto kernel  scope host  src
	    240.0.0.1
	    broadcast 240.0.0.0 dev test-network  table local  proto kernel  scope link
	    src 240.0.0.1
	    broadcast 10.34.60.0 dev eth1  table local  proto kernel  scope link  src
	    10.34.60.31
	    broadcast 10.34.63.255 dev eth1  table local  proto kernel  scope link  src
	    10.34.60.31
	    broadcast 127.0.0.0 dev lo  table local  proto kernel  scope link  src
	    127.0.0.1
	    local 127.0.0.1 dev lo  table local  proto kernel  scope host  src 127.0.0.1
	    local 127.0.0.0/8 dev lo  table local  proto kernel  scope host  src 127.0.0.1
	    unreachable ::/96 dev lo  metric 1024  error -101 mtu 16436 advmss 16376
	    hoplimit 4294967295
	    unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 2002:a00::/24 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 2002:7f00::/24 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 2002:a9fe::/32 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 2002:ac10::/28 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 2002:c0a8::/32 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 2002:e000::/19 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    unreachable 3ffe:ffff::/32 dev lo  metric 1024  error -101 mtu 16436 advmss
	    16376 hoplimit 4294967295
	    fe80::/64 dev eth1  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit
	    4294967295
	    fe80::/64 dev dummy_45  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit
	    4294967295
	    fe80::/64 dev test-network  proto kernel  metric 256  mtu 1500 advmss 1440
	    hoplimit 4294967295
	    unreachable default dev lo  table unspec  proto kernel  metric -1  error -101
	    hoplimit 255
	    local ::1 via :: dev lo  table local  proto none  metric 0  mtu 16436 advmss
	    16376 hoplimit 4294967295
	    local fe80::201:a4ff:feac:8702 via :: dev lo  table local  proto none  metric
	    0  mtu 16436 advmss 16376 hoplimit 4294967295
	    local fe80::bcca:7fff:fe35:44ca via :: dev lo  table local  proto none  metric
	    0  mtu 16436 advmss 16376 hoplimit 4294967295
	    local fe80::bcca:7fff:fe35:44ca via :: dev lo  table local  proto none  metric
	    0  mtu 16436 advmss 16376 hoplimit 4294967295
	    ff02::1 via ff02::1 dev eth1  metric 0
	        cache  mtu 1500 advmss 1440 hoplimit 4294967295
	        ff00::/8 dev eth1  table local  metric 256  mtu 1500 advmss 1440 hoplimit
	        4294967295
	        ff00::/8 dev dummy_45  table local  metric 256  mtu 1500 advmss 1440
	        hoplimit 4294967295
	        ff00::/8 dev test-network  table local  metric 256  mtu 1500 advmss 1440
	        hoplimit 4294967295
	        unreachable default dev lo  table unspec  proto kernel  metric -1  error
	        -101 hoplimit 255

	Now we can just easily filter for those that have the vdsm-created table. The
	old way of asking iproute2 for a specific table suffers of the bug
	https://bugzilla.redhat.com/1094676 which makes querying from but dumping as
	above right.

2014-05-07  Francesco Romani  <fromani@redhat.com>

	vm: add a method to update the devices config
	As part of all creation flows except the recovery one,
	a Vm needs to amend the configuration of the devices
	and update its own configuration accordingly.

	This patch extracts the code which updates the
	Vm.conf devices data and puts it into a separate
	method to make the code a bit more clear.

2014-05-06  Federico Simoncelli  <fsimonce@redhat.com>

	image: remove unused storage_repository attribute

2014-05-06  Antoni S. Puimedon  <asegurap@redhat.com>

	iproute2: Add source routing support
	Up until now, only the ifcfg configurator had support for source
	routing, i.e., adding a routing table for networks that want to
	set a non default (system-wide) gateway.

	This patch implements the needed pieces for iproute2 keeping with
	the current infrastructure of vdsm/network/sourceroute.py, although
	I foresee future patches for simplifying the pieces of the puzzle.

	iproute2: Add static and autoconf ipv6 support
	This patch enables the users of the iproute2 configurator to set
	ipv6 static addresses or change the ipv6 autoconf status of the
	an interface.

2014-05-06  Federico Simoncelli  <fsimonce@redhat.com>

	misc: remove recoveryCallback from watchCmd
	Trying to kill an old process on recovery became obsolete since the
	introduction of deathSignal. Even more, considering that the recovery
	may happen on a different host, killProcRollback had a really little
	chance to succeed.

2014-05-06  Nir Soffer  <nsoffer@redhat.com>

	profile: Add couple of tests
	We plan to modify the profiler so it will be useable for the functional
	tests, where we like to have one profile per test, instead of the
	application wide profile.

	This patch adds couple of tests to make it easier to modify the profiler
	without breaking anything.

	The profile filename and format are now module private constants, so we
	can easily override them during the tests.

2014-05-06  bruce  <xiao-lei.shi@hp.com>

	spec: Add numactl dependency in spec file
	Add numactl package dependency in vdsm spec files. This package is
	needed by vdsm numa feature.

	Bug-Url: https://bugzilla.redhat.com/1069303

2014-05-05  Federico Simoncelli  <fsimonce@redhat.com>

	tasks: loadDumpedTasks shouldn't queue tasks
	loadDumpedTasks should just load the tasks in the unqueuedTasks list.
	It is a subsequent call to recoverDumpedTasks that is in charge to queue
	the recovery (queueRecovery and _queueTask).

2014-05-04  Nir Soffer  <nsoffer@redhat.com>

	profiling: Add an application wide profile
	The built in Python profilers are good for single thread profile but
	given the excessive multi-threaded nature of vdsm, they are useless for
	understing where we spend our time.

	This patch uses yappi <http://code.google.com/p/yappi> to create an
	application wide profile. New configuration options added to enable
	profiling and selecting profile file format.

	The default file format is PSTAT, which can be used with the builtin
	pstats module. Another interesting format is CALLGRIND, used by
	KCachegrind visualization tool.

	Relates-to: https://bugzilla.redhat.com/1074097

	config: Make it easy to create default config
	Previously a default config object was created by invoking a private
	function, modifying the global config, before reading the configuration
	from the config file. This design make it impossible to create a default
	config object for testing, or to reload the configuration while vdsm is
	running.

	This patch replace the private function with public function accepting
	a config object. Now you can create a default config object by creating
	a new config parser and setting the defaults:

	    fake_config = ConfigParser.ConfigParser()
	    config.set_defaults(fake_config)
	    fake_config.set('irs', 'repository', '/my/fake/repository')

2014-05-03  Francesco Romani  <fromani@redhat.com>

	tests: update libvirt fake object
	commit eb2ef555345a32a4f0153ac0341b4c422cdacf8c
	requires the 'close' method to be present.

	This patch updates the tests to let 'make check' run cleanly again.

2014-05-03  Dan Kenigsberg  <danken@redhat.com>

	tool.nwfilter: do not close a connection twice
	My commit eb2ef55534 caused all libvirtconnections to be closed when the
	calling process exists. As reported by Nir on
	http://gerrit.ovirt.org/27313 that commit has a bug and was sloppily
	verified. As of eb2ef55534, no one outside the libvirtconnection module
	should close a libvirt connection.

2014-05-02  Francesco Romani  <fromani@redhat.com>

	recovery: try to restore VMs from recovery files
	on recovery, VDSM tries to recover all the VMs reported
	as active by libvirt.
	If a VM disappears while VDSM is down or restarting, the
	VM silently disappears without VDSM noticing, and the recovery
	file is discarded.

	This patch adds a second recovery try for the VMs which have
	a recovery file but not yet restored using the standard recovry
	loop.

	Those VMs are most down on the recovering host, but VDSM has
	to notify the engine so it is can do proper cleanup and it can
	ensure the correct state is reported to users.

	This patch depends on
	I00ef12883c8035209de0f273925eb8603d6b6da8
	which make sure VMs are setup and reported correctly if
	the underlying QEMU process disappeared.

	Bug-Url: https://bugzilla.redhat.com/1045626

	vm: handle missing domains on recovery
	During recovery, VDSM asks libvirt for the list of existing
	VMs to reconnect to. This works fine on most cases but
	do not handle well the case of a VM vanished (e.g.
	put down or migrated manually) when VDSM is down.

	In order to deal with those cases, we need to consider
	more sources of data to rebuild the list of VM to be
	recovered. The first choice is the collection of recovery
	files. VDSM can iterate through orphan recovery files
	and rebuild empty VM objects for VM somehow disappearead,
	just to let engine collect them.
	This is implemented in
	Id495f6047ba658c2b04da19bd7bf76425b3b9659

	In this case, the attempt to acquire the underlying libvirt
	domain would fail, but we still want to create an hollow VM
	object, granted it is in status Down.

	This patch adds an explicit check in the recovery path to
	make sure that a VM is either created with a valid libvirt
	domain handle, or it is reported as Down so the engine
	can collect its state and explicitely destroy it.

	This patch is part series which collectively fix the bz1045626.

	Bug-Url: https://bugzilla.redhat.com/1045626

	tests: initial tests for vm libvirt callbacks
	This patch adds initial tests for the libvirt callbacks
	of vdsm.virt.Vm.

	The dispatching logic for the libvirt callbacks in clientIF
	is not covered by this patch.

2014-05-02  Liron Aravot  <laravot@redhat.com>

	core: fixing attribute error on fenceSpmStorage
	In change I75493d1db60e51cccd5231b516f963c970d24c99 the pool metadata
	operations were moved to the pool backend, while the call to
	invalidateMetadata in fenceSpmStorage was left as it was, leading to an
	attribute error.

	This patch fixes it by executing the operation on the pool backend object
	rather than on the pool, as the metadata operation are implemented only in
	StoragePoolDiskBackend - there's also a check for the backend type before
	executing it.
	Though it's not the nicest way for doing so, it's the pattern already used in
	hsm.py,therefore in the meanwhile it can be fixed the same way.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1082365

2014-05-01  Liron Aravot  <laravot@redhat.com>

	core: return lver/spm id from pool metadata
	Currently the lver/spm id are being returned as they appear in the
	cluster lock if supported.

	The fenceSpmStorage verb is currently used to manually confirm that
	there's no current spm on the responsibillity of the caller. This verb
	updates the lver/spm id in the pool metadata to indicate that the spm
	role is free.

	This won't help us currently as getSpmStatus will return the info from
	the cluster lock (if supported) which wasn't edited at all. As currently
	we can't edit the information return from cluster lock, we can return
	the same results as in case it wasn't supported by the cluster lock.

	Right now the solution is implemented in StoragePoolDiskBackend only as
	a bug fix, as StoragePoolMemoryBackend isn't being used at the moment.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1092631

2014-04-30  Dan Kenigsberg  <danken@redhat.com>

	Explicitly close libvirt connections at exist
	When a process (such as Vdsm, or `vdsm-tool dummybr`) exists while
	holding an open libvirt connection, libvirt logs an error

	    : error : virNetSocketReadWire:1184 : End of file while reading data: Input/output error

	This patch close all libvirt connections at process exit.

2014-04-30  Vinzenz Feenstra  <vfeenstr@redhat.com>

	schema: Update memory information reported by the agent
	Patch http://gerrit.ovirt.org/#/c/27156/ in the guest agent introduced
	two new variables to be reported. This needs to be reflected in the API

	Bug-Url: https://bugzilla.redhat.com/1024007

2014-04-30  Antoni S. Puimedon  <asegurap@redhat.com>

	ethtool_opts: Add hook for applying network custom property
	ethtool_options is a hook that takes as input a network 'custom'
	property named 'ethtool_opts' that has as its content the
	arguments for the ethtool command line utility.

	This hook detects whether those arguments are valid in the sense
	of applying to nics that belong to the network hierarchy for which
	the custom property has been set.

	As an example of the expected content:
	    '--offload em2 rx on --offload em1 tx on'
	which would apply for a bond that is set over em1 and em2.

2014-04-30  Douglas Schilling Landgraf  <dougsland@redhat.com>

	storage: fix pep issue with image.py
	This patch fix the if indentation that pep complains.
	Introduced by patch 7b4bd1b4.

2014-04-30  Vinzenz Feenstra  <vfeenstr@redhat.com>

	agent: Add new command setNumberOfCPUs(count)
	This adds the support for the new message 'set-number-of-cpus'
	and implements it as GuestAgent.setNumberOfCPUs(count) method in the
	guest agent.

	This shall be called when we hot(un)plug cpus to be able to potentially
	trigger behavior on the guest side to online CPU cores.

	Guest-Agent-API-Version: 1
	Bug-Url: https://bugzilla.redhat.com/1063281

2014-04-30  Dima Kuznetsov  <dkuznets@redhat.com>

	schema: Fix wrong type in GuestNetworkDeviceInfo
	Changed inet and inet6 in GuestNetworkDeviceInfo to be lists as they are
	actually reported by vdsm and received by the engine.

2014-04-30  Tal Nisan  <tnisan@redhat.com>

	Create destination image as preallocated only if format is RAW
	Create a destination image as preallocated only when the destination
	domain does not supports sparseness and the image format is RAW, otherwise
	create it as sparse

	Bug-Url: https://bugzilla.redhat.com/1091956

2014-04-29  Mooli Tayer  <mtayer@redhat.com>

	add all-local in tool Makefile.

2014-04-29  Yeela Kaplan  <ykaplan@redhat.com>

	fileUtils: remove unused method 'isStaleHandle'

2014-04-29  Liron Aravot  <laravot@redhat.com>

	sp: fix spm start when failing to produce domain
	During spmStart we attept to go over all the domains and set their role
	to be regular in case it's not to avoid situation in which there are two
	domains with the master role.
	If we fail to produce any of the domains (which might happen, the
	domains returned by getDomains(activeOnly=True) we shouldn't fail,
	as we attempt to produce all the domains that are marked as active in the
	metadata, but it doesn't mean that they are actually reachable and that
	calling produce() for the domain won't fail.

	In case the we fail to call produce() on domain with
	StorageDomainDoesNotExist exception, it doesn't mean that spmStart should
	fail - otherwise we might never succeed to start spm.

	I believe that we should ignore any exception to avoid the same case in
	different scenarios (for example - failure to alter the metadata), but
	as reviewers requested, let's start with StorageDomainDoesNotExist
	exception only.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1072900

2014-04-29  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vm: Fix guest channel symlink creation handling
	In case of a restart of VDSM the symlinks and sockets won't get cleaned up.
	Commit 4a7af02 partially fixed the issue, however it did not consider the
	case of a crashing VDSM. In case of a crashing or unclean stop (kill)
	of VDSM the symlinks are left behind and the recovery would fail.

	This patch handles these cases and adds a bit more of documentation to the
	code to improve the clarity of the cases it handles.

	Bug-Url: https://bugzilla.redhat.com/1082986

2014-04-29  Antoni S. Puimedon  <asegurap@redhat.com>

	iproute2: add stp setting
	Up unitl now, the iproute2 configurator ignore the bridge object stp
	setting. With this patch, if stp is True, the stp_state of the
	bridge will be set to 1 (no action for False as the default for
	bridge creation is 0).

	ifcfg: fix stp processing
	Some users rely on passing STP=on/off for setting a bridge's stp.
	This worked by passing the option through all the way to the ifcfg
	configurator and have it just copy the key-value to the ifcfg files.
	The problem is that STP was not being popped out of opts, so 'STP'
	would be written to the bridge port devices as well.

	This patch normalizes stp into the Bridge model and takes it out of
	the passthrough.

2014-04-28  Francesco Romani  <fromani@redhat.com>

	virt: migration: restore the usage of 'vmstatus'
	the usage of the 'vmstatus' constants was lost on
	destination in the split of the migration.py.

	virt: stats: move exited vm stats in a method
	this patch moves the ExitedVmStats handling in
	a separate method. No functional changes.

2014-04-27  Mooli Tayer  <mtayer@redhat.com>

	typo in function call should be 'skipontest'

2014-04-27  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-reg-setup: add import errno
	During vdsm-reg service start it can throw an error about errno.EEXIST
	doesn't exist. This patch adds the import errno.

2014-04-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: remove duplicate entry for BuildRequires
	BuildRequires: python-ethtool appears twice.

	spec: add BuildRequires: rpm-python
	During the make check, the tests modules can import
	caps.py which uses rpm python module and we should set
	BuildRequires for it. This patch adds the BuildRequires.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=837014

2014-04-25  Nir Soffer  <nsoffer@redhat.com>

	lvm: Disable usage of lv_metad daemon
	On current Fedora 19 and 20 lvm version, lvm uses the lvmetad daemon. In
	this configuration, lvm commands do not go any more to the storage to
	read meta data, but use meta data stored in the lvmetad daemon. This
	causes two issues with vdsm:

	- vg_mda_free return 0 when running lvs, causing a warning in vdsm.
	- when creating a new lv, the lv is not seen on other machines in the
	  cluster, failing running vms with the new disk.

	This patch fixes the issue by disabling usage of lvmmetad in vdsm's
	private lvm configuration. lvm commands run by vdsm read metadata from
	storage, while lvm commands running from the shell use lvmetad if
	configured.

	Note that there is a warning in lvm.conf:

	    If lvmetad has been running while use_lvmetad was 0, it MUST be
	    stopped before changing use_lvmetad to 1 and started again
	    afterwards.

	We believe that disabling lvmetad for all access to vdsm volumes is safe
	despite this warning, and lvm developer confirms that it is safe.

	Note: accessing vdsm volumes manually using lvm requires disabling of
	lvmmetad daemon. An admin may do this by modifying lvm.conf, or use the
	--config command line argument:

	    <lvm command> --config "global { use_lvmetad=0 }"

	We considered integrating with lvmetad instead of disabling it. We can
	update lvmetad cache using "pvscan --cache". Using lvmetad, accesing
	meta data is cheap, and maybe we can drop the lvm caching code. This may
	be the right long term solution when lvmmetad is used by default on all
	supported platforms.

	Relates-to: http://lists.ovirt.org/pipermail/users/2014-March/022044.html
	Bug-url: https://bugzilla.redhat.com/1073054

2014-04-25  Federico Simoncelli  <fsimonce@redhat.com>

	qemuimg: support relative backing file in create
	This patch adds the support for creating a qcow2 images with a relative
	backing path. In some cases qemu-img requires to access the backing
	image and being the path relative we need to execute qemu-img with the
	proper cwd.

2014-04-24  Antoni S. Puimedon  <asegurap@redhat.com>

	unified_persistence: Fix defaultRoute type in upgrade script
	Despite the fact defaultRoute is defined by vdsm API to be a boolean
	field, the upgrade to unified persistence script was retrieving it
	as a string. This had the effect that when the ifcfg configurator
	would convert from boolean to 'yes'/'no', both 'True' and 'False',
	being strings would evaluate as True.

2014-04-24  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: use _hsmSchedule for spmStart
	Method spmStart can now take advantage of _hsmSchedule to schedule its
	job (without persistency).
	The spmStart task never needed any persistency because its lifecycle
	is strictly tied to the vdsm process and it doesn't involve any storage
	modification that requires a rollback (or rollforward).

2014-04-22  Federico Simoncelli  <fsimonce@redhat.com>

	qemuimg: use deathSignal when using execCmd
	Adding the deathSignal parameter to the qemu-img commands ensures that
	we won't leave pending processes after vdsm death.

2014-04-22  Francesco Romani  <fromani@redhat.com>

	pep8: fix pep8 1.5.4/1.5.5
	pep8 1.5.4/1.5.5 is even more strict than pep8 1.5.1.
	This patch fixes all he warnings found by pep8 1.5.5.

2014-04-22  Federico Simoncelli  <fsimonce@redhat.com>

	task: support scheduleJob without persistency
	At the moment we are not using any hsm task (the only one is spmStart
	and it's not relying on _hsmSchedule).
	This patch adds the support in taskManager to scheduleJob without any
	persistency, removes the reload of dumped tasks from storageRefresh,
	and finally redefines _hsmSchedule to not use persistency.
	The unused method _hsmSchedule is not removed because it will be used
	by spmStart in a following patch.

2014-04-22  Francesco Romani  <fromani@redhat.com>

	virt: graphdev: add hasSpice helper
	add an helper property to display if a Vm has a SPICE display
	or not.

2014-04-22  Antoni S. Puimedon  <asegurap@redhat.com>

	netlink: User libnl-3 when available
	On new distibutions (Fedora, ubuntu, el7, etc) python-ethtool uses
	libnl3 while vdsm was using libnl1. The problem was that libnl1
	and libnl3 use the same algorithm for allocating netlink ports and
	collided. This patch fixes it by using libnl3 if ethtool uses it.

	Bug-Url: https://bugzilla.redhat.com/1078312

2014-04-22  Francesco Romani  <fromani@redhat.com>

	dmi: remove the printInfo function
	according to 'git grep' is never called.
	make check passes cleanly.

2014-04-22  Federico Simoncelli  <fsimonce@redhat.com>

	fileSD: enable mailbox on file domains
	Since we now support mixed-type storage pools (block and file) we
	must enable the mailbox on file domains in order to satisfy the
	extension requests needed by block domains.
	On file domains the inbox and outbox files were prepared empty so
	we also need to extend them to the proper size as soon as possible:

	* on SPM start
	* on master migration

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1083476

2014-04-22  Francesco Romani  <fromani@redhat.com>

	vm: fix _dom access when QEMU is dying
	commit 8fedf8bde3c28edb07add23c3e9b72681cb48e49 introduced a tiny
	window for races between libvirt notifications (vm._onQemuDeath)
	and polling for stats from engine.

	This is demonstrated by bz1073478, but it really boils down
	to how events are serialized.
	In this case, a stats request from engine is being answered
	while QEMU is being reported down and the _dom handle is being
	shut down, we end up with an uncaught exception.

	This patch address the reported race between polling and qemu death.
	The window of vulnerability is (supposed to be) tiny
	and the issue itself is hard to reproduce.

	Sampling thread is theorically vulnerable to the a race of the
	same type, but this problem will be addressed in a separate
	patch.

	Bug-Url: https://bugzilla.redhat.com/1073478

2014-04-22  Federico Simoncelli  <fsimonce@redhat.com>

	task: update the message when running jobs
	Before this patch the message reported by a task was left to "Task
	is initializing" for all the execution time.
	This patch updates the message reporting what job of the task is
	currently running.

2014-04-22  Dima Kuznetsov  <dkuznets@redhat.com>

	core: Add boot time to the getVdsStats API
	Read boot time from /proc/stat and report in host stats

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1070348

2014-04-22  Federico Simoncelli  <fsimonce@redhat.com>

	dispatcher: use a method wrapper instead of Protect
	This patch replaces the superfluous Protect class with a method wrapper.

	dispatcher: remove system.methodHelp support
	Since when we wrapped XML-RPC requests in BindingXMLRPC and API the
	methodHelp implementation became useless as it's never reached.

2014-04-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-reg-setup: fix logging call
	_createUpgradeDir() uses log.error() which log is not defined.
	This patch fix the call and moves the logging setup before
	the _createUpgradeDir() call.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1056981

2014-04-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	iscsi.py: cleanup - remove temp variable
	Don't need to assign new variable to use target.iqn

2014-04-17  Federico Simoncelli  <fsimonce@redhat.com>

	volume: improve volume clone logging
	This patch adds the traceback output in case of an exception,
	removes the superfluous "Volume.clone:" prefixes and uses the
	correct formatting.

	qemuimg: create size should be a string
	execCmd requires the command list items to be strings.

	lib: rename qemuImg to qemuimg for pep8 compliancy
	Modules should have short, all-lowercase names.

2014-04-17  bruce  <xiao-lei.shi@hp.com>

	tests: add numa feature test data file
	Commit 9d3311320 added a new data file for unit tests. This change
	adds it to build-related configuration files.

	Bug-Url: https://bugzilla.redhat.com/1069303

	caps: Collect numa information
	This patch modifies the caps module to add function of collect
	host numa information and report to ovirt engine.
	It will add three keys in the rpc response of getCapabilities
	whose value are the host's numa related information.

	Key numaNodes, the value is a map, each item follows this format:
	{'nodeIndex':{'cpus':['int'], 'totalMemory':int}}
	nodeIndex      - The index of numa node
	cpus           - The cpu ids(see the cpu id in libvirt api's
	                 capabilities function) which belong to this
	                 numa node
	totalMemory    - The total memory of this numa node in MB

	Key numaNodeDistance, the value is a map, each item follows this
	format:
	{'nodeIndex':[distanceList]}
	nodeIndex      - The index of numa node
	distanceList   - Distances from self to other nodes in sequence,
	                 including self to self

	Key autoNumaBalancing, the value is a int, represents the status
	of auto numa balancing function.

	Bug-Url: https://bugzilla.redhat.com/1069303

2014-04-16  Francesco Romani  <fromani@redhat.com>

	gluster: use the any() builtin
	use
	  any()
	instead of
	  'True' in collection.

	Tiny cleanup patch found while fixing the complains of pep8 1.5.5.

2014-04-16  Federico Simoncelli  <fsimonce@redhat.com>

	blockSD: rename mapMetaOffset to getVolumeMetadataSlot
	The name of the BlockStorageDomain method mapMetaOffset was not
	descriptive enough. The purpose of the method was to return the
	metadata slot of a volume, therefore it has been renamed.

2014-04-16  Vinzenz Feenstra  <vfeenstr@redhat.com>

	agent: number-of-cpus reporting support
	This patch implements handling of the new message 'number-of-cpus'

	The 'count' argument of the message sent by the guest agent is an integer
	and represents the number of CPU cores are visible on the guest OS side.
	If the value is -1, the reporting is not supported or implemented for the
	guest OS.

	The value is exposed to the engine via RunningVmStats structure as
	'guestCPUCount' value.

	Bug-URL: https://bugzilla.redhat.com/show_bug.cgi?id=1063281
	Guest-Agent-API-Version: 1

2014-04-16  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: add bridge option reporting
	This patch adds reporting of the bridge options that reside in
	/sys/class/net/<bridge_name>/bridge/<opt_name>

2014-04-16  Federico Simoncelli  <fsimonce@redhat.com>

	task: remove unused _addTask method

2014-04-16  Dan Kenigsberg  <danken@redhat.com>

	pep8: clean remaining E713

2014-04-16  Francesco Romani  <fromani@redhat.com>

	tests: virt: retry to connect to VDSM at startup
	This patch makes the functional tests retry to connect
	to the VDSM instance before to give up and raise an error.

	The purpose is let tests to actively wait for VDSM
	instance to be up instead of blindly wait some time and
	hope for the best.

	This will help us to drop the 10s sleep we currently
	have in our virt functional tests job.

2014-04-15  Federico Simoncelli  <fsimonce@redhat.com>

	fileSD: unify the metadata permissions definition
	This refactoring is unifying the metadata permissions definition in one
	constant.

	sd: improve metadata sizes definition
	This refactoring is moving the definition of the metadata sizes in a
	dictionary using integers instead of strings.

2014-04-14  Antoni S. Puimedon  <asegurap@redhat.com>

	schema: publish custom network properties
	This patch makes part of the formal api a network attribute named
	'custom' that allows the user to pass a free-form dictionary of
	attributes that may be used by vdsm or its hooks to perform actions.

2014-04-11  Amador Pahim  <apahim@redhat.com>

	hook: spiceoptions: To provide spice option attributes to vm
	This hook goes through VM definitions xml file and manipulate its
	graphics device if the protocol type is spice. This can be used to
	configure spice options. This hook script will be really useful to
	configure some of the spice optimization attributes and values
	like image, streaming, clipboard..etc

	For ex:

	  <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'>
	     ******
	    <image compression='auto_glz'/>
	    <streaming mode='filter'/>
	    <mouse mode='client'/>
	  </graphics>

2014-04-10  Antoni S. Puimedon  <asegurap@redhat.com>

	rpmspec: Drop Fedora <19 special cases

	netlink: Re-order 1.public, 2.private, 3.complex
	Reorder the module parts according with
	    1.public,
	    2.private,
	    3.complex

	This way it is much easier for onlookers to find what they look for
	and puts the complex guts of the module right at the end.

2014-04-10  Sandro Bonazzola  <sbonazzo@redhat.com>

	packaging: add qemu user to cdrom group
	Allow to boot VMs from host CD-ROM.

	Bug-Url: https://bugzilla.redhat.com/1082028

2014-04-10  Antoni S. Puimedon  <asegurap@redhat.com>

	custom_net_props: blacklist 'custom' for ifcfg configurator
	The ifcfg configurator has a pass network options through that makes
	those options that are not blacklisted reach the ifcfg files.
	However these options must be textual and valid to initscripts to
	be of any use. This patch blacklists custom as it is neither textual
	nor valid initscripts.

2014-04-10  Francesco Romani  <fromani@redhat.com>

	recovery: clean the VM recovery procedure
	This tiny patch cleans up and optimizes the VM recovery detection.
	While looping on the VMs returned by libvirt, we must check each one
	of them to know if it has to be handled by VDSM.
	This check, however, considers only the properties of the VM under exam,
	so we can do this in one go instead of using two loops
	(actually an explicit loop and one implicit in a list comprehension)

	This patch is not for performance but to to make the code a tiny bit
	cleaner and to fix this message:

	./vdsm/clientIF.py:493: list comprehension redefines 'vm' from line 483

	emitted by some versions of pyflakes.

2014-04-09  Dan Kenigsberg  <danken@redhat.com>

	pep8: silence several errors with no syntactical change

2014-04-09  Dima Kuznetsov  <dkuznets@redhat.com>

	hooking: Add convenience functions for JSON hooks
	Added read_json/write_json, similar in fashion to existing *_domxml
	functions

	hooking: Update file() to open()
	file() is getting deprecated.

2014-04-09  Arik Hadas  <ahadas@redhat.com>

	pad memory volume only when the storage domain is file based
	Memory volume should be padded only when the storage domain in which the
	memory volume resides is file-based device. We used to check the type of
	the storage pool, assuming that all the domains within the pool are from
	the same type. This assumption is not true anymore, as we can have
	different types of storage domains in the same storage pool, in case of
	shared storage. So from now on, we'll check the type of the storage
	domain in which the memory volume is in, and only if it is filed-based
	device we'll pad the volume.

	Bug-Url: https://bugzilla.redhat.com/1082941

2014-04-08  Sandro Bonazzola  <sbonazzo@redhat.com>

	nit: remove duplicate command

2014-04-06  Yeela Kaplan  <ykaplan@redhat.com>

	oop: remove unused attributes

2014-04-04  Francesco Romani  <fromani@redhat.com>

	pep8: lib cleanups for pep-1.5.x
	lib/* is now pep8 1.5.x clean.

	pep8: storage cleanups for pep-1.5.x
	storage/* is now pep8 1.5.x clean.

2014-04-04  Dan Kenigsberg  <danken@redhat.com>

	vm tests: avoid leaving /tmp/blechs.recovery behind
	There's code that expects P_VDSM_VAR_RUN to end with a slash.

2014-04-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm_reg: remove engine.py.in
	engine.py.in was stored in vdsm_reg as part of ovirt-node
	TUI registration stuff. Currently we have ovirt-node-plugin-vdsm
	project which contain engine_page.py replacing this old file.

2014-04-04  Tal Nisan  <tnisan@redhat.com>

	Allow moving of sparse images to a block domains
	When attempting to move a sparse image from a file domain to a block domain
	the destination image is created as sparse which is not supported on block
	domains.
	This patch allows to create the images preallocated on domains that do not
	support sparseness

	Bug-Url: https://bugzilla.redhat.com/1063996

2014-04-03  Francesco Romani  <fromani@redhat.com>

	pep8: hooks cleanups for pep-1.5.x
	hooks/* is now pep8 1.5.x clean.

	pep8: vdsm cleanups for pep-1.5.x
	vdsm/*.py is now pep8 1.5.x clean.

2014-04-03  Nir Soffer  <nsoffer@redhat.com>

	blockSD: Refactor matadataValidity
	The previous code was confusing, using positive conditions to set the
	falsy result; this patch make it clear.

2014-04-03  Francesco Romani  <fromani@redhat.com>

	vm: add boot menu support
	libvirt supports interactive boot menu at guest startup,
	depending on the support of the underlying hypervisor
	and/or BIOS.
	The boot menu can be used to select the boot device
	priority.

	This patch exposes the boot menu setting at VDSM level.

	Bug-Url: https://bugzilla.redhat.com/1047624

	virt: migration: rename migration threads
	drop the now redundant 'Migration' prefix.
	No functional or behavioural changes.

	virt: migration: move threads in a separate module
	This patch moves the migration control threads
	in a separate module.

	No functional/behavioural changes.

2014-04-02  Yeela Kaplan  <ykaplan@redhat.com>

	lvm: remove unused add/remove tags

2014-04-02  Antoni S. Puimedon  <asegurap@redhat.com>

	Do not allow empty network names (bridged nor bridgeless)
	It was possible to create empty network names that ended up in
	libvirt networks called 'vdsm-'. This patch solved it returning
	the appropriate error and not allowing empty bridge names in the
	internal representation either.

	Bug-Url: https://bugzilla.redhat.com/1078899

2014-04-02  Francesco Romani  <fromani@redhat.com>

	pep8: virt cleanups for pep8-1.5
	virt is now pep8-1.5 clean

2014-04-01  Donn Seeley  <donn.seeley@windriver.com>

	vds-tool: keep env on sysV service
	Update env when SYSTEMCTL_SKIP_REDIRECT is set instead of dropping
	it.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1081621

2014-04-01  Dan Kenigsberg  <danken@redhat.com>

	pep8: make pep8-1.5 happy with E241

	pep8: make pep8-1.5 happy with E265

2014-04-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Initial commit for vdsm-tool testing infrastructure
	Running in make check, flexible in modifying the configuration files as
	required for the specific test.

2014-04-01  Dima Kuznetsov  <dkuznets@redhat.com>

	util: fix execCmd to accept tuples
	There was an issue occasionally when flags were given along with a
	command in a tuple, there was an exception in execCmd, because +
	operator was used to append tuple with commands to a list.

2014-04-01  Antoni S. Puimedon  <asegurap@redhat.com>

	network: Introduce the network package
	This is the first patch of the topic branch that wants to end up with
	the vdsm directory having all networking code properly sorted into
	the network package and network scripts.

2014-04-01  Francesco Romani  <fromani@redhat.com>

	tests: make virtTests run on RHEL/CentOS
	This patch includes fixes to let the virt functional test run
	on RHEL/CentOS 6.x:

	* add /sbin to mkinitrd search path
	* fix usage of string formmatting, and to be python 2.6 friendly
	  along the way.

2014-04-01  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Remove all guest sockets on cleanup
	Previously vdsm was cleaning up the guest socket files, but when
	introducing the symlinks we started leaving behind the real sockets
	and just removed the symlinks.
	This patch fixes this by first removing the file the symlink points
	to and then removes the symlink.

	Bug-Url: https://bugzilla.redhat.com/1052097

2014-03-31  Dan Kenigsberg  <danken@redhat.com>

	VmStatsThread: make _getNicStats testable
	With this test, the shame of change Ie356d5f96c73b6 should not repeat.

2014-03-31  Nir Soffer  <nsoffer@redhat.com>

	clientIF: Clean up shutdown process
	clientIF.serve used to check if shutdown process has started once every
	3 seconds, leading to unwanted delay, that may cause vdsm to be killed
	before a profile was written.

	This patch changes clientIF.serve to start the bindings and return,
	allowing the upper layer to wait for a shutdown signal in a more
	efficiant way. This allows stopping a profile when shutdown signal is
	received, before starting the shutdown process, ensuring that a profile
	is written even if shutdown process got stuck and vdsm is killed.

	This way is also more safe, as prepareForShutdown is called from the
	main thread, instead of the signal handler context, where it is not safe
	to call any code. In particular, setting a threading.Event in this
	context cause a deadlock.

	init: Normalize shutdown timeout
	On sysvinit, vdsm was killed 2 seconds after receiving a SIGTERM.
	Currently clientIF check if shutdown is started only once every 3
	seconds. This make it impossible to write profile data when vdsm is
	terminated. On systemd, since no timeout was defined, the default 90
	seconds timeout was used. On upstart, the default 5 seconds was used.

	This patch normalizes the shutdown timeout to 10 seconds on all
	platforms. This seems to be enough for saving profile data and
	performing clean shutdown.

2014-03-31  Xavi Francisco  <xfrancis@redhat.com>

	Add logging to rules operations in supervdsmServer
	Previously when udev rules were created and removed, we had no logging,
	so trying to debug issues with udev rules was very hard. This patch log
	creation and removal of udev rules.

	Although the whole methods were logged using logDecorator the creation
	and removal of each rule was not logged independently

2014-03-31  Sergey Gotliv  <sgotliv@redhat.com>

	iscsi: Specify tpgt to impose creation of a new style node record
	There are 2 formats for an iSCSI node record.

	An old style format where the path is /var/lib/iscsi/nodes/{target}/{portal}
	and a new style format where the portal path is a directory containing a
	record file for each bounded iface. For example:

	/var/lib/iscsi/nodes/{target}/{portal}/eth0
	/var/lib/iscsi/nodes/{target}/{portal}/eth1

	Explicitly specifying tpgt(target portal group tag) on iSCSI login imposes
	creation of the new style node record which enables to access a portal
	through multiple ifaces for multipathing.

2014-03-30  Nir Soffer  <nsoffer@redhat.com>

	clientIF: Remove unused _memLock
	_memLock was used by memTestAndCommit(), which was removed in 6fcfb09456
	on May 2011.

2014-03-28  Francesco Romani  <fromani@redhat.com>

	performance: switch to cPickle
	profiling of the creation code path shows
	that the impact of pickle is not negligible.

	cPickle is a safe drop-in replacement, so this
	patch switch to it for the sake of performance.

	considering a 'monday morning' scenario (mass parallel
	start of many VMs) we see ~5% improvement in startup time

	before:
	mean: 27.984s stdev=1.074s
	best: 10.507s stdev=1.604s
	worst: 42.711s stdev=1.996s
	total: 895.479s stdev=34.375s

	after:
	mean: 26.423s stdev=1.413s
	best: 9.785s stdev=1.669s
	worst: 40.833s stdev=2.452s
	total: 845.523s stdev=45.218s

	pickle is used to save the VM params for checkpointing,
	so the benefits should affect, possibly with lower extent,
	to all VM operation flows.

	py3: introduce a compatibility helper
	introduce a module to host all the compatibility
	code we need to support python2 and python3 with
	the same codebase.

	clientIF: prepareVolumePath payload cleanup
	the prepareVolumePath code path for cdrom/floppy
	images is complicated due the fact the code has to
	deal with both regular and payload-created
	images (vmPayload, used by cloud-init).

	The code has been patched various times, and in the end the
	code became more complex than is needed.

	This patch refactors the existing code in order to simplify
	it, without changes of behaviour.

	Relates-To: http://gerrit.ovirt.org/22928/
	Relates-To: https://bugzilla.redhat.com/1047356

2014-03-28  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Rename guestIF{,Tests}.py to guestagent{,Tests}.py

2014-03-28  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configurator: use sanlock user constant
	Replace the static value with a constant.

2014-03-28  Vinzenz Feenstra  <vfeenstr@redhat.com>

	virt: Rename vmChannels.py to vmchannels.py

2014-03-28  Dan Kenigsberg  <danken@redhat.com>

	vdsm-reg: eliminate the VDSMBRIDGE macro
	VDSMBRIDGE is a historical macro holding the "management bridge" of
	Vdsm. Nowadays, this bridge may well not exist as management network are
	better kept bridge-less. The concept of "management bridge" is currently
	used only within vdsm-reg, and only when it needs to register to a legacy
	oVirt-Engine that expects the bridge to exist.

	This patch hides the unneeded macro within vdsm-reg, to be completely
	dropped when vdsm-reg is replaced by an ovirt-node-register utility.

2014-03-28  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Move virt things into vdsm/virt

2014-03-28  Dan Kenigsberg  <danken@redhat.com>

	vdsm-reg: collect vdsm-config.log
	vdsm-config's log file was dumped in the catch-all /var/log directory.
	Placing it under /var/log/vdsm-reg makes a nicer compartmentalization,
	and makes vdsm's sosreport plugin collect it.

2014-03-28  Nir Soffer  <nsoffer@redhat.com>

	utils: Optimize namedtuple definition in pidStat
	Profiling idle vdsm reveal that 60% of cpu time is spent in creating
	pointless namedtuples. In particular, 823 calls were made in 4.88
	seconds of cpu time, invoking collections.py genexpr function 296805
	times.

	This patch creates the one and only namedtuple needed by pidStat when
	the module is imported.

2014-03-28  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Convert vm status strings to constants
	This patch replaces all vmstatuses to constants.
	Additionally added not documented 'Powering up' status to schema.

2014-03-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	pre-start: touch/configure vdsm logs
	During pre-start of vdsm we must create vdsm logs files
	with proper perms/user/group/ if they doesn't exist.
	This situation happens currently because during
	ovirt node build it cleans /var/log dir so it will
	remove all vdsm logs created during rpm install.

	configurator: move usermod to spec
	vdsm-tool configure --force adds to /etc/group (qemu/kvm) sanlock
	but doesn't persist the file in ovirt node distro which will
	affect vdsm start on next reboot. This patch adds the usermod to
	spec file.

2014-03-25  Dan Kenigsberg  <danken@redhat.com>

	vm iface stats: fix arithmetic
	My commit 672ff43 has a serious arithmetic flaw: the modulu must be
	taken on the sample difference!

	Bug-Url: https://bugzilla.redhat.com/1062166

2014-03-25  Sergey Gotliv  <sgotliv@redhat.com>

	hsm: Rename _BCInitiatorNameResolve function
	Function _BCInitiatorNameResolve actually resolves the iface name not
	the initiator name so new name emphasizes that.

	hsm: Distinguish between iface and initiator when creating iSCSI iface
	VDSM mistakely assumed that iface name and iface initiator name are the
	same, so if admin configured specific initiator name in the host its
	value is mistakenly overwritten by ifaceName in the iface file. In such
	a case the host fails to establish the iSCSI connection with the target.

2014-03-24  Douglas Schilling Landgraf  <dougsland@redhat.com>

	libvirt_configure: move unpersist up
	On commit b4efa0036e065 we have fixed the failure on
	mv command to logrotate file but a few lines above vdsm
	executes a sed which also requires the file be unpersist before it.
	This patch move the unpersist command some lines above.

2014-03-24  Maor Lipchuk  <mlipchuk@redhat.com>

	bindingXMLRPC: Log unhandled exception for new Thread
	Adding a traceback log for unhandled exceptions when execute
	start in BindingXMLRPC class so it will not die silently.

2014-03-24  Vinzenz Feenstra  <vfeenstr@redhat.com>

	tests: Fix pep8 indention error introduced by numa tests

2014-03-24  Dan Kenigsberg  <danken@redhat.com>

	nit: sudoers: drop unused executable
	Should have been dropped by "Move prepare-vmchannel to supervdsm"
	http://gerrit.ovirt.org/4242

2014-03-24  bruce  <xiao-lei.shi@hp.com>

	vm: Set numatune and guest numa topology
	Modify vm module to provide the functions of set numatune and guest
	numa topology when create vm.
	Modify vdsClient to add the related options.
	The xml format of numatune is like:
	<domain>
	  ...
	  <numatune>
	    <memory mode="strict" nodeset="1-4,^3"/>
	  </numatune>
	  ...
	</domain>
	The format of guest numa topology is like:
	<cpu>
	    ...
	    <numa>
	      <cell cpus='0-3' memory='512000'/>
	      <cell cpus='4-7' memory='512000'/>
	    </numa>
	    ...
	</cpu>
	More detailed libvirt reference in:
	http://libvirt.org/formatdomain.html#elementsNUMATuning and
	http://libvirt.org/formatdomain.html#elementsCPU

	Bug-Url: https://bugzilla.redhat.com/1069303

2014-03-22  Douglas Schilling Landgraf  <dougsland@redhat.com>

	libvirt_configure: persist cmd qemu-sanlock.conf
	On a ovirt-node if executing vdsm-tool configure --force
	with libvirt sanlock enabled it will set /etc/libvirt/qemu-sanlock.conf
	but won't use persist command so next reboot the changes will be lost
	and vdsm-tool will complain about libvirt not configured during vdsm start.

2014-03-22  Francesco Romani  <fromani@redhat.com>

	vm: consider 'action' when handling I/O errors
	When VDSM receives an I/O error event from libvirt,
	it does not consider the value of the 'action' callback
	field, and thus considers the guest CPU stopped.

	This is true in the default configuration, which translates
	to the disk write error policy 'stop', but not necessarily
	true if the said policy is 'enospace'.

	In this case the reported state of the CPU goes out of sync.

	Since the error policy may be changed through an hook,
	the safest thing to do is actually check the 'action'
	value as reported by libvirt in the IOError callback.

	This patch adds this check, and additional logging in
	the case the guest CPU is reported running after I/O
	errors.

	Bug-Url: https://bugzilla.redhat.com/1064630

2014-03-21  Antoni S. Puimedon  <asegurap@redhat.com>

	setupNetworks: Fix incorrect mtu overriding when adding multiple networks
	When configuring several networks over a bond, if the iteration over
	the networks to be added made networks with lower MTUs to be added
	after those with higher ones, the last mtu, regardless of value would
	be set.

	This was because the _netinfo object is passed from addNetworks to
	addNetworks and the objectivize of the succeeding addNetworks would
	not see the higher MTUs set by the preceding addNetworks. This would
	only affect the bond MTU when some bond setting would be detected
	as changed and it would trigger bond reconfiguring (for a list of
	what is checked for changes, see netmodels.py:Bond.configure).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1072411

2014-03-21  pkliczewski  <piotr.kliczewski@gmail.com>

	test: ssl reactor not tested in jsonrpc tests
	The ssl flag was not passed to constructReactor so plain tcp reactors
	were only used.

2014-03-21  Martin Betak  <mbetak@redhat.com>

	vdsm: Add ACPI support for VM shutdown/reboot
	Refactored the existing shutdown/reboot code to utilize the
	utils.CallbackChain helper.

	Extracted existing code to new module vmCommands.py and split into
	following classes:

	VmPowerDown    - base class handling CallbackChain functionality
	|-- VmShutdown - shutdown specific callbacks
	`-- VmReboot   - reboot specific callbacks

	Both power-down commands now try first guestAgent (if available)
	and if given power-down action hasn't succeeded in given `timeout`
	ACPI variant will be tried (again if available).

2014-03-21  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: StoragePool connect missing default value
	DomainsMap argument is defined in schema as optional but it is missing
	default value.

2014-03-20  Antoni S. Puimedon  <asegurap@redhat.com>

	vnic QoS: Fix specParams to XML definition conversion
	VDSM API specifies specParams input and output data to have values
	specified as integers. In order to generate valid XML, those values
	should have been converted to strings (and the test should have been
	passing integers as per VDSM schema).

	This patch fixes the conversion code and the tests for it (fix one,
	add a new one for the update flow).

	Bug-Url: https://bugzilla.redhat.com/1067064

2014-03-20  Kiril Nesenko  <knesenko@redhat.com>

	Add contrib directory to the tarball
	- Added contrib directory to the tarball
	- Moved vdsm/ut/ivdsm.py to contrib
	- Removed vdsm/ut/

2014-03-20  Tal Nisan  <tnisan@redhat.com>

	Allow getFileStats for non NFS ISO domains
	getFileStats only allowed file stats to be gathered from NFS ISO domains.
	We currently support ISO domains on any file storage domain so the check
	was corrected.

	Bug-Url: https://bugzilla.redhat.com/1075172

2014-03-19  Dan Kenigsberg  <danken@redhat.com>

	openstack_net hook: search for ovs_vsctl only when needed
	Bug-Url: https://bugzilla.redhat.com/1077283

2014-03-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	Avoid to recompile namedtuple ATTR classes in lvm.
	Re-defining the ??_ATTR classes may be hurting the performance
	during the VM creation (preliminary). This patch avoids attribute
	class creation each time the lvm object is recreated.

	Should be noted that re-creating lvm cached objects during the VM
	creation is not required, therefore paths modified by the actual
	patch should not be called in such scenario.
	This abnormal situation will be corrected in a following patch.

	Dealing with variable attribute strings is not required for the
	actual development of oVirt and the lvm module, then
	_attr2NamedTuple() can be removed.

2014-03-17  Dan Kenigsberg  <danken@redhat.com>

	pep8: use multiline blacklist

2014-03-13  Douglas Schilling Landgraf  <dougsland@redhat.com>

	libvirt_configure: unpersist logrotate.d/libvirt
	On commit 247a76e7 we moved the libvirt settings to libvirt_configure.sh.in and now
	we see that vdsm cannot rename temp. file to /etc/logrotate.d/libvirtd on
	ovirt-node system at the stage we execute vdsm-tool configure --force.
	This patch will add the command unpersist before renaming the file,
	otherwise ovirt-node will complain with "Device or resource busy".

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1074257

2014-03-12  Francesco Romani  <fromani@redhat.com>

	vm: cleanup post-libvirt merge code
	after the libvirt.py merge a couple of methods remained
	dangling and with out-to-date comment.

	This tiny patch drop unused code, and improve the documentation
	of the still useful code with the current state and the feature
	gap still open with libvirt.

2014-03-10  Mooli Tayer  <mtayer@redhat.com>

	minor changes in passwd.py
	Replace Exception with RuntimeError.

2014-03-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	sos: Support SOS version 3
	This patch will add support to sos 3 API and keep compatible
	with old API.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060383

2014-03-07  Dan Kenigsberg  <danken@redhat.com>

	cleanup: make VmDevice.custom ever-present
	Device configuration may carry a "custom properties" dictionary that is
	copied into its respective VmDevice object. If no such dictionary exist,
	the VmDevice.custom is never set.

	This patch removes this duality. VmDevice.custom is always there, but it
	may be empty if the user has not set any device-specific custom
	property.

	interface xml: allow Engine to specify number of queues
	If a vNIC is used for in-host communication between VMs, its throughput
	would gain if it is allocated with multiple queues, numbering as the
	vCPUs of the VM. This comes with a price of pinning host memory for this
	purpose. Cf. http://www.linux-kvm.org/page/Multiqueue.

	This patch exposes the "queues" per-device custom property which can be
	set in a vNIC profile in Engine. Enable it there with

	    engine-config -s "CustomDeviceProperties={type=interface;prop={
	        other-nic-properties;queues=[0-9]*}}"

	Note that this property is currently supported only by libvirt >= 1.0.6.
	Older versions silently ignores it.

	interface xml: add <driver> subelement in an extendible way
	This patch makes no functional change. A <driver> subelement is added to
	an <interface> element iff requested by the "vhost" custom property.

2014-03-07  Francesco Romani  <fromani@redhat.com>

	stats: report detailed VM down status
	When a VM goes down it reports an exitCode and an
	exitMessage which is passed verbatim to the VM log.

	In order to have translatable messages, a more detailed
	exit reason code is needed.
	This patch is the first step towards an explicit, detailed
	exit reason value. It laids the ground for a full resolution.

	A new explicit exit reason code field is introduced in the
	response, to be filled with the detailed status code.
	The field is added separately for backward
	compatibility with the existing interface.

	Future work will split the GenericError code into detailed
	codes.

	Bug-Url: https://bugzilla.redhat.com/557125

2014-03-06  Dan Kenigsberg  <danken@redhat.com>

	pep8: whitelist everything
	.. except for four auto-generated *.py files

2014-03-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Install vdsm.conf.example during build
	The sample conf is installed by spec under vdsm docs. Docs files are not part
	of RHEV-H installation to keep rhev-h env small as possible.
	Although, the sample file was delivered only on Fedora which is the
	standard for package delivering (to publish sample conf with the
	package installation).
	The sample file was requested also in rhev-h by users for reference.
	This patch moves the file installation from spec to create it during
	make.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1023941

2014-03-05  Dima Kuznetsov  <dkuznets@redhat.com>

	logging: Enable all loggers
	Unless disable_existsing_loggers is passed as false, logging checks
	the pre-existing logs and disables any that are not mentioned in the
	configuration file, this causes various logs to be not visible.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060510

2014-03-04  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: bootproto4 is now 'dhcp'/'none' instead of a boolean
	testSetupNetworksAddDelDhcp verifies the new property.

	Legacy BOOTPROTO parameter is set in a network's or iface's
	['cfg'] dictionary to mimic information from ifcfg files
	which may be missing in current setups.

	Bug-Url: https://bugzilla.redhat.com/987813

	netinfo: Add shorthand NetInfo.bridges for consistency

2014-03-03  Antoni S. Puimedon  <asegurap@redhat.com>

	unified pers: fix restoration when moving from ifcfg pers
	Up until now we were only flushing the persistence of the
	configurator currently set up. This had the problem that when
	switching between configurators and persistence models, old
	persistence remainders could be left over.

	Bug-Url https://bugzilla.redhat.com/1064530

	netinfo: reduce netinfo instantiation to be closer to linear
	During each setupNetworks operation there were several points that
	could call for a full NetInfo instantiation. This patch reduces
	the amount of points that do so by replacing instantiation with
	very fast system polling of:

	- ifaceUsers: which will now check link objects and networks only if
	  necessary
	- vlansForIface: which will just use link objects.

	Bug-Url: https://bugzilla.redhat.com/1053114

	ifcfg: stop leaving leftover bridges when removing bonded networks
	When having a network bridged non-vlanned bonded network, removing
	the network while intending to remove the bond would remove the
	network bridge and then create it again.

	This patch fixes it by removing the 'BRIDGE' entry from the bond
	before ifuppin it up again.

	Bug-Url: https://bugzilla.redhat.com/1071398

2014-03-03  Nir Soffer  <nsoffer@redhat.com>

	tests: Add blockSD tests
	Add test for the metadataValidity before modiying its confusing
	implementation.

2014-03-03  Mark Wu  <wudxw@linux.vnet.ibm.com>

	net tests: more combinations mtu combinations
	The tests were splitted from the former functional fix in order to
	expedite the merge of the latter one.

2014-02-28  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: remove code duplication between nics, bridges, bonds and vlans

	netinfo: pass _netinfo to addNetwork
	Bug-Url: https://bugzilla.redhat.com/1053114

	netinfo: Fix wrong filtering of dummy devices
	Dummy (and veth) devices were being filtered for use by vdsm in the
	method isFakeNic, but in the method that is used to determine what
	is reported as nics, isNicLike, it was not being used, and instead
	isDUMMY and isVETH were being called.

	Before this patch, any veth and dummy device were reported in the
	nics() method of netinfo.
	After this patch only those that match the explicit fake setting
	will be reported.

2014-02-28  Yaniv Bronhaim  <ybronhei@redhat.com>

	Use same constants for configuring and check configure of sanlock
	Both DISKIMAGE_GROUP and QEMU_PROCESS_GROUP points to 'qemu'. It's
	confusing to use both one for configure and one for verification.
	The patch uses the same constants and check also if VDSM_GROUP is also
	set properly as required by sanlock process.

2014-02-28  Antoni S. Puimedon  <asegurap@redhat.com>

	ifcfg: Do not take bond/nic down when removing one of their multiple nets
	When taking removing one of the multiple networks that sit on top of
	a bond/nic, it is necessary to adjust the mtu of the devices to the
	new maximum required by the remaining networks that use the devices.
	Example
	    netA has mtu 2500 and is set over bond5.10
	    netB has mtu 2000 and is set over bond5.10

	    when both are set, bond5.10, bond5 and its link devices will
	    have mtu 2500. When netA is removed that should be adjusted
	    to 2000.

	For ifcfg to apply the adjustment, it was necessary to ifdown
	the nic/bond and up it again so it would read the new configuration.
	The problem is that the netB of the example would see a loss of
	connectivity which could affect the users. This patch addresses that
	by using the ipwrapper to make the mtu adjustment and only take
	down the device when no remaining networks use it.

	Bug-Url: https://bugzilla.redhat.com/1060781

2014-02-28  Francesco Romani  <fromani@redhat.com>

	vm: fix migration progress calculation
	We use libvirt.domain.jobInfo() to track the migration progress.
	Among the provided fields, libvirt provides total, elapsed
	and remaining values for `data', `file' and `mem'.

	Where `file' is the permanent storage (disk) to be migrated,
	while `mem' is the volatile storage (ram), and
	`data' = `file' + `mem'.

	We mistakenly consider `data' for permanent storage, so actually
	redo the calculations libvirt already did, and most importantly we
	count the memory twice.

	The documentation of libvirt
	http://libvirt.org/html/libvirt-libvirt.html#virDomainJobInfo
	may be misleading due to poor tipography (misaligned comments)
	and that is the most likely cause for the wrong usage.
	We discovered the correct meaning by investigating among
	libvirt devs and by looking at the libvirt code.

	We use shared storage, so the value of `file' field does
	not really matter to us, but as a cautionary move
	we still track progress using the `data' value, instead
	of the `mem'. Being `data' a superset of `mem', this is
	still correct.

	This patch fixes the progress calculation and simplify
	the migration monitoring code.

2014-02-27  Federico Simoncelli  <fsimonce@redhat.com>

	spec: add missing requirement for sanlock on el7
	In the el7 section we were missing the sanlock and sanlock-python
	requirements.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1064042

2014-02-27  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: report "speed" of underlying device as that of vlan device
	netinfo.py was reporting speed 0 for the vlan devices in the system
	This patch makes that vlan devices, just like nics and bonds, will
	have a speed reported, that one of their underlying device.

	Bug-Url: https://bugzilla.redhat.com/1062617

	net_scale: Don't instantiate NetInfo needlessly
	network validation used to instantiate full-blown NetInfo objects
	when it just needed bondings() and nics(). This patch fixes that
	by calling only for the information that it needs.

	Bug-Url: https://bugzilla.redhat.com/1053114

	net_scale: Allow NetInfo update just the devices
	When deleting networks there was a lot of NetInfo instantiation
	due to the need for checking the devices in each delNetwork
	operation. That need for updated information does not include
	network changes, so this change adds a method for just updating
	the device information and reusing the netinfo objects.

	Bug-Url: https://bugzilla.redhat.com/1053114

2014-02-27  Federico Simoncelli  <fsimonce@redhat.com>

	spec: require libvirt 0.10.2-29.el6_5.4
	A libvirt race condition caused the volume watermark to be reported as
	large as the physical size triggering an extension at the end of each
	live migration.

	This patch adds the requirement for the new libvirt package in order to
	fix the issue.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1038069

2014-02-26  Nir Soffer  <nsoffer@redhat.com>

	xmlrpc: Support HTTP 1.1
	Supporting HTTP 1.1 allow using keep-alive on the client side,
	decreasing the latency and load on the engine and increasing the number
	of host that engine can support.

	This patch override do_POST and report_404 methods that wrongly shutdown
	the connection at the end of the do_POST request. This is the
	responsibility of the server, and not the request handler.  The fixed
	methods are used only on Python 2.6. Python 2.7 already include these
	changes. Then the protocol_version is set to HTTP/1.1, enabling
	automatic keep-alive.

	A new configuration option "xmlrpc_http11" can be used to disbale this
	feature and use HTTP/1.0 as used before.

	We can see in the logs that only few threads are created now for service
	XMLRPC requests, and most requests are handled by the same thread.

	xmlrpc: Disable needless and slow dns lookup
	In Python 2.6, BaseHTTPServer.BaseRequestHandler is invoking
	socket.getfqdn() after each request, to log the client fully qualified
	hostname. If dns is not configured properly, this causes needless delay
	after each request. In Python 2.7, the address_string is not used.

	This patch overrides address_string to return client address, avoiding
	the dns lookup, when running in Python 2.6.

2014-02-26  Dan Kenigsberg  <danken@redhat.com>

	ifcfg.removeNic: ignore missing host interface
	There may be cases where the Ifcfg configurator is asked to remove a Nic
	that is no longer exist on the host. This can happen if the device was
	renamed by an administrator or if it was unplugged from the system.

	In this patch we do not try to ifup the missing device.

	Bug-Url: https://bugzilla.redhat.com/1059773

2014-02-26  Antoni S. Puimedon  <asegurap@redhat.com>

	Make getVlanDevice use the faster netlink information
	getVlanId was already using the newer and faster netlink information
	while getVlanDevice had remained creating a process and parsing the
	output. This patch makes it more consistent and faster.

2014-02-26  Ondřej Svoboda  <osvoboda@redhat.com>

	vm: Fix mistyped 'portMirroring'
	This is related to 8225ae9aeebe88a0f891b390e3c0177671515210
	(vmDevices: add __slots__ to devices) and was hiding
	the bug at https://bugzilla.redhat.com/1011887

2014-02-25  Francesco Romani  <fromani@redhat.com>

	vm: report migration progress in VmStats
	add migration progress information in the
	VM Statistics.

	This information is passed to engine, which can now
	in turn inform the user about the migration status.

	Bug-Url: https://bugzilla.redhat.com/967466

2014-02-25  Federico Simoncelli  <fsimonce@redhat.com>

	vm: snapshot transient disk check should be per disk
	Live snapshot is allowed if all the disks in the snapshot request are
	not transient.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1065886

	vm: pre-validate disks for snapshot
	This patch divides the snapshot disks validation from the path
	preparation in order to limit the rollback scenarios.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1065886

2014-02-24  Antoni S. Puimedon  <asegurap@redhat.com>

	netlink: Introduce socket pool
	If a lot of netlink requests happened _nl_connect would fail at
	the C level, more concretely when doing bind, which would return
	EADDRINUSE.

	This patch addresses that issue as well as reduces the the resource
	consumption of the module by reusing the netlink sockets. The reusing
	is done by a semaphore protected socket pool.

2014-02-24  Nir Soffer  <nsoffer@redhat.com>

	threadLocal: Cleanup thread local storage
	We keep some data in thread local storage, but never clean up. This can
	lead to using stale data when handling many requests in the same tread,
	or to temporary leak, when a long running thread holds a reference to a
	finished task, preventing garbage collection of anything referenced from
	the task.

	This patch ensures that anything we set thread local storage is cleaned
	up when not needed.

	utils: Ensure that XMLRPC threads do not delay shutdown
	The threads created by the XMLRPC server are not daemon threads, so they
	may delay vdsm shutdown if a long request happen to run during shutdown.
	This patch configure XMLRPC server to use daemon threads.

	The daemon_threads class attribute is used by
	SocketServer.ThreadingMixIn. When defined in base class, both the simple
	and secure servers get this configuration through inheritance.

	This change is required for adding HTTP/1.1 support, where XMLRPC server
	threads become long living threads.

2014-02-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Reload daemon file after each install
	Currently we load the daemon file only on first install. After upgrade
	we could fail with:
	"Warning: Unit file changed on disk, 'systemctl --system daemon-reload'
	recommended."

	This patch perform the reload after each installation of vdsm.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063772

	Fix in testLeakFd to avoid potential races during the check
	To avoid corrupted tests that leaves fds open, clean the fds before
	checking the first fds state.

2014-02-21  Dan Kenigsberg  <danken@redhat.com>

	vdscli: remove usage of VDSMBRIDGE
	When not given an address to connect, vdscli.connect() attempts to guess
	the address of a local Vdsm server. With ssl disabled, it used to fall
	back to looking up the address of the management bridge.

	However, Vdsm server no longer care about VDSMBRIDGE when deciding on
	which IP address it should listen, so the client side should loose it,
	too.

2014-02-20  Dan Kenigsberg  <danken@redhat.com>

	confNet: ifcfg's VLAN should be set only on vlan cfg
	If a misguided script calls addNetwork with explicit VLAN option, it
	should not be blindly copied to the top-most device.
	We set VLAN=yes on the ifcfg script for the vlan device, and that's
	that.

	This is a very limited hack of a wider problem: unrecognized network
	options are copied to the bridge's ifcfg file.

	Bug-Url: https://bugzilla.redhat.com/1051150

2014-02-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using grep -E when greping conf files
	The grep's \s notation, matching whitespace characters, is not
	available when using basic regular expressions syntax since grep 2.15
	(raised in f20), the default grep syntax. Although, It is available when using
	extended regular expression, activated by the -E flag.

2014-02-20  Federico Simoncelli  <fsimonce@redhat.com>

	client: add the domainsMap in connectStoragePool
	This patch adds the client side support for the pool metadata memory
	backend. The server side support was introduced in patch:

	 b98c448 sp: receive domains map in connectStoragePool

2014-02-20  Francesco Romani  <fromani@redhat.com>

	vm: recover must finish with libvirt connection
	bz106336 highlights an scenario on which a Vm can
	go Up without a proper libvirt connection established (_dom
	attribute initialized), and this can lead to a split-brain.

	If a running vm is reported as not running by vdsm, the
	engine may start another instance of the same vm on another
	host, which will likely cause data corruption when two
	vm are writing to the same shared storage.

	Description of the scenario:
	* while VM is running, storage becomes blocked or not responding.
	* the user restarts VDSM while the storage is still blocked.
	* VDSM does recovery after restart, but given the fact
	  that storage was still not responding,
	  _normalizeVdsmImg() inside buildConfDevices() fails.
	* due the way exception are handled, this leads to the
	  skip of the libvirt connection step, leaving the _dom
	  attribute at its default value (None), thus
	* the VM is disconnected from libvirt and out of sync.

	We cannot avoid this sequence of events, nor we can
	prohibit users from restarting VDSM, but we can
	take measures to avoid to go out of sync.

	When starting a new VM, storage failure/unavailability is fatal;
	when recovering, we should handle those kinds of error
	and ensure we do have a libvirt connection on every Vm object.

	This patch excplitely handle this storage not responsive
	condition and let the initialization process continue, in
	order to make sure we obtain a libvirt handle.

	Bug-Url: https://bugzilla.redhat.com/1063336

2014-02-20  Federico Simoncelli  <fsimonce@redhat.com>

	lvm: ignore skipped clustered vgs
	In VDSM we use lvm locking_type 1 (local flocks on files in locking_dir)
	because the clustered vg access is handled with the SPM-HSM logic.
	When locking_type is configured to 1 the clustered vgs are skipped for
	all the operations (as they need locking_type 2) and by default the exit
	code of the lvm command is 5 triggering errors in our module.
	Adding the --ignoreskippedcluster flag to lvm commands we avoid the exit
	code error in the event of any clustered vg being present in some of the
	attached LUNs.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=820982

2014-02-19  pkliczewski  <piotr.kliczewski@gmail.com>

	test: declare unstable test as broken
	Before making sure that provided fix [1] makes the test stable it will
	be marked as broken.

	[1] http://gerrit.ovirt.org/#/c/24624/

2014-02-19  jarod.w  <work.iec23801@gmail.com>

	vm: set self._dom to None after destroying vm
	When receiving 'vmDestroy' command, we deal with it using the following
	steps:
	* invoke VM::releaseVm() in VM::destroy
	* invoke _dom.destroyFlags()/_dom.destroy() to destroy vm in VM::releaseVm()
	* When libvirt is done for destroying vm, it emits VIR_DOMAIN_EVENT_STOPPED
	_SHUTDOWN/DESTROYED(due to different flows)
	* VDSM receives the signal, it invokes VM::_onQemuDeath().
	* invoke VM::releaseVm() in VM::_onQemuDeath().
	Unfortunately, it doesn't set self._dom to None after destroying vm in
	VM::releaseVm(). So, it cause the following libvirterror when invoking
	VM::releaseVm() in VM::_onQemuDeath():

	libvirtconnection::101::libvirtconnection::(wrapper) Unknown libvirterror: ecode:
	42 edom: 10 level: 2 message: Domain not found: no domain with matching uuid
	'1813cf7d-d62b-4cc2-86fc-de469e0e37eb' (xxx)

	To ignore the libvirterror, the patch will set self._dom to None when getting signals
	(VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN/DESTROYED).

2014-02-19  Francesco Romani  <fromani@redhat.com>

	tests: add initial tests for clientIF
	This patch adds the tests for prepareVolumePath,
	and prepares the infrastructure for more clientIF tests.

	Relates-To: http://gerrit.ovirt.org/22928/

2014-02-18  Dan Kenigsberg  <danken@redhat.com>

	sampling: avoid needless modulu
	Since Linux jiffies counters wrap at 32 bits, we take modulu 2 ** 32
	when we calculate the difference between two consecustive samples.
	Taking another modulu, after dividing by the time interval, is harmless
	but also needless and confusing.

2014-02-18  Shu Ming  <shuming@linux.vnet.ibm.com>

	Misc storage exception class name style
	All the misc storage exception class name should
	be prefixed with "Misc"

2014-02-18  Adam Litke  <alitke@redhat.com>

	avoid redundant domain produce() in createStoragePool
	As the domains in hsm.createStoragePool are going to
	be accessed much later, and may loose validity till then.
	Just produce from cache and check the validity when actully use it.

2014-02-18  Assaf Muller  <amuller@redhat.com>

	Fix defaultRoute handling
	defaultRoute wasn't being past correctly to objectivizeNetwork,
	so that defaultRoute was always None inside the function,
	no matter what was past to it.

	This meant that DEFROUTE=yes/no was never written to ifcfg files,
	and 'ip route add default...' never applied by the iproute2
	configurator.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015009

2014-02-17  Antoni S. Puimedon  <asegurap@redhat.com>

	netlink: fix pep8 for 1.4.5 (was fine for 1.4.6)

2014-02-17  Yaniv Bronhaim  <ybronhei@redhat.com>

	Passing "$*" to shell func with quotation marks passes all vars in one
	Instead of passing the variables as passed to test_conflicting_conf
	to the specific test func

2014-02-17  Liron Aravot  <laravot@redhat.com>

	introducing capability to stream data to image
	This patch introduces the a new capabaility to vdsm
	which allows to upload using streaming content to vdsm
	images.

	Previously we sent ovf data using XMLRPC (UpdateVM verb),
	which limits the size of the data, having to encode the
	payload into the xml, and make it hard and inefficient
	to upload lot of data and store it on some image.

	This patch adds the capabillity to stream data to image,
	allowing efficient upload of data in any size and format
	and storing it directly on an
	image. As the  XML-RPC spec doesn't support streaming and
	to avoid requiring another port by using dedicated http
	server, in this patch we use the existing xmlrpc server to
	handle upload requests.

	General upload information:
	-----------------------------------------------------------
	PUT requests arriving to the server with content type of
	application/octet-stream to default paths that we use
	today for request handling ('/', '/RPC2') will be treated
	as upload requests.
	The upload itself is being executed within a task, that's
	needed to indicate that there's an operation executed by
	the host.

2014-02-17  Antoni S. Puimedon  <asegurap@redhat.com>

	net_scale: avoid netinfo instantiation for removal check
	When removing networks, delNetwork used to generate a whole NetInfo
	instance, which is rather costly and in the case that there's a lot
	of delNetworks queued up (like in a lengthy setupNetworks operation)
	it can impact performance significantly.

	We should rely on:
	 - configurator.removeLibvirtNetwork
	 - configurator removal methods

	Bug-Url: https://bugzilla.redhat.com/1053114

	netinfo: optimize ipaddr retrieval
	We used to retrieve IP address information for each device when
	getting capabilities or in general doing netinfo.get. This in turn
	was calling python ethtool that was doing:
	One netlink roundtrip to get the etherinfo object. One round trip
	for ipv4 and one for ipv6.

	For 200 bridged, vlanned, bonded (with 2 nics) networks this meant:
	200bridges + 200vlans + 1 bond + 2 nics = 403 devices
	+
	200 networks
	= 603 calls to getIpInfo for 0.7867s

	This patch changes the implementation so that we use netlink to
	retrieve all the ipaddrs and then we match them to the devices
	we have, saving most of the work.

	= 603 calls to getIpInfo for 0.009371s + 0.03327s spent on
	vdsm.netlink (from netinfo.get)

	It's one of the patches destined to fix the bug below.

	Bug-Url: https://bugzilla.redhat.com/1053114

2014-02-17  Timothy Asir  <tjeyasin@redhat.com>

	vdsm-tool: handle an exception and return an error code
	As an independent cli, it is nicer for vdsm-tool to print an error and
	return an appropriate error code on any exception. Letting exception go
	unhandled make abrt report it as an application crash.

	Bug-Url: https://bugzilla.redhat.com/1054759

2014-02-17  Federico Simoncelli  <fsimonce@redhat.com>

	sp: stop all poolMonitoredDomains on disconnect
	When we attempt to stop the DomainMonitor threads in StoragePool
	we should use the poolMonitoredDomains list instead of using
	getDomains.
	Beside being more consistent and reliable it also fixes a race
	in destroyStoragePool where we detach the last domain and then
	we attempt to stop the remaining DomainMonitor.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1059757

2014-02-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Clean up test classes names
	Now when the securable tests have their own module, we don't need to use
	inner classes. Using top level classes makes the code shorter and easier
	to read.

	While modifying the names, the "My" prefix was removed, as it adds no
	value and annoy the author of this patch.

	Finally, a class method in a test class named its first argument "self"
	instead of "cls" (detected by pylint).

2014-02-15  Nir Soffer  <nsoffer@redhat.com>

	securable: Do not try to secure inner classes
	Previously the class decorator was not careful enough, "securing" any
	callable, which matches inner classes.

	This patch corrects the type check so only unbound methods are matched
	and add more tests, ensuring this will not break in future version.

	tests: Move securable tests to its own test module
	The tests were hidden in  tests/main.py making it harder to find the
	tests.

2014-02-15  Dan Kenigsberg  <danken@redhat.com>

	execCmd: no need to pass the default sudo=False value
	These are remnants from the days where we had a crazier default.
	Cleaned with
	     sed -i 's/execCmd\(.*\), sudo=False/execCmd\1/'
	and a couple of manual additions.

2014-02-14  Dan Kenigsberg  <danken@redhat.com>

	libvirt_configure.sh: fix commit cff03f968e
	This patch fixes two blatant errors, redering ssl=False unworkable.

2014-02-14  Francesco Romani  <fromani@redhat.com>

	client: update the help of `create` command
	This patch updates the help of the `create` command
	to keep up with last changes.

	schema: document the launchPaused parameter
	add documentation for the launchPaused param,
	which was missing from the API schema.

2014-02-14  Daniel Erez  <derez@redhat.com>

	hsm: encapsulate path in appropriateDevice
	As a continuation of Ie0d4d805ca333990ea1f612eb03a87f4a505f4a8,
	appropriateDevice method now returns 'path' as well.

2014-02-14  Martin Polednik  <mpoledni@redhat.com>

	vdsm: add support for TPM device passthrough
	Libvirt has basic support for TPM passthrough, which allows
	VM to be given access directly to host's TPM module.

	Engine constraints: vm with assigned TPM cannot be allowed to
	migrate, host cannot pass single TPM to multiple VMs using
	passthrough protocol (currently only supported protocol
	http://wiki.qemu.org/Features/TPM)

	tests: validate cdrom path sent to/received from vdsm
	related to http://gerrit.ovirt.org/#/c/20074/

	Tests prepareVolumePath for cdrom by verifying that path and
	specParams['path'] and vmPayload works as expected.

2014-02-13  Michal Skrivanek  <michal.skrivanek@redhat.com>

	typo in guest agent channel timeout handling

2014-02-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Validate conf in configure only if not forcing overriding
	When --force flag is sent to configure the conf might be overrided
	(depends on reconfigureOnForce return value).
	Therefore, checking validate conf before overriding can lead to a fail
	while the current configuration is not relevant.

	libvirt_configure.sh already manage to set the right configure in
	libvirtd.conf and qemu.conf according to the ssl verb in vdsm.conf.
	BUT, without this patch we validate the current config
	state before overriding the files even though the --force flag was
	stated, and this lead to fail the configure.

	With that patch, setting in vdsm.conf ssl=True and then running
	"vdsm-tool configure --force" will update libvirtd.conf and qemu.conf
	according to vdsm.conf state.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036883

	Fixing ssl config validation
	Currently we verify only the config of livbirtd.conf and qemu.conf
	when ssl=False in vdsm.conf. If ssl=True we assumed the validation
	passes. This patch add a check also to ssl=True.

	Except that, the validation function is not general and checks only ssl
	configuration. This patch splits to specific test_conflict functions and
	allow adding more test_conflict functions in the future.

2014-02-13  Dan Kenigsberg  <danken@redhat.com>

	pylint: fix format string

2014-02-13  Federico Simoncelli  <fsimonce@redhat.com>

	api: domainDict is optional in connectStoragePool
	This patch fixes a mismatch between the schema and the actual
	connectStoragePool implementation.

2014-02-13  Daniel Erez  <derez@redhat.com>

	vm: added missing GUID slot in Drive class
	Following commit I6e8dadabdd02d3b44606f215c4bc7b7e306a591a,
	added missing 'GUID' slot in VM -> Drive class
	(needed for the functionality introduced in commit
	Ia4988212f7f96078e774d2a4e7b5cd1681383cb0).

	In addition, verified 'GUID' key existence on _getDiskStats.

	Related-To-Bug-Url: https://bugzilla.redhat.com/1026868

2014-02-12  Martin Betak  <mbetak@redhat.com>

	vdsm: Enable config of VM serial number
	Added support for passing explicit serial number
	as a part of vmParams from the engine.

	This change will enable users to configure various "serial number
	policies" on the engine such as:
	- use VM's UUID
	- use Host's UUID
	- provide custom value
	enabling greater control over the resulting VM's serial number.

	Notes:
	In the first case, the engine will pass the VM's UUID also as a value of
	the 'serial' param.

	In case this new 'serial' param is not passed we fall back to the old
	behavior when we use the host UUID.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=918138

2014-02-12  Nir Soffer  <nsoffer@redhat.com>

	xmlrpc: Use correct base class for parsing request
	Previously we always used SecureXMLRPCServer.parse_request, even when
	using SimpleXMLRPCServer. That happened to work since both inherit
	parse_request from BaseHTTPServer. This patch use the correct base
	class, so if one of them will override parse_request, we use the correct
	method.

2014-02-11  Vitor de Lima  <vitor.lima@eldorado.org.br>

	vm.py: Fix unsupported HPET option in ppc64
	This patch does not allow disabling HPET in ppc64, since the -no-hpet
	option is missing in the ppc64 QEMU.

2014-02-11  Francesco Romani  <fromani@redhat.com>

	tests: add initial tests for timeOffset handling
	the handling of timeOffset has been a source of issues
	recently and deserves more testing.

2014-02-11  Greg Padgett  <gpadgett@redhat.com>

	API: setHaMaintenanceMode command
	New API for setting hosted engine maintenance mode.  This allows the
	engine to send commands to the hosted engine agent in order to ease any
	necessary maintenance tasks.  The following modes are supported:

	local - allow maintenance of the host by effectively stopping the ha
	  agent from performing any vm-related activity.  The engine vm is
	  moved to another host in the ha cluster, and the host score is set
	  to 0.  It is meant to correspond to vds maintenance operations
	  performed by the engine.

	global - allow maintenance of the ha system or engine vm.  All hosted
	  engine state changes are halted for all nodes in the ha cluster,
	  so that user-initiated changes to the vm or hosts are ignored.

	This API improves usability for the hosted engine subsystem by enabling
	changes in the engine ui that would otherwise require the command-line.

	For more information:
	http://www.ovirt.org/Features/Self_Hosted_Engine_Maintenance_Flows

	Bug-Url: https://bugzilla.redhat.com/1053040

	API: return additional Hosted Engine information from vdsStats
	Return additional hosted engine runtime information with vds statistics
	which allows for better interoperability between the engine and hosted
	engine agent.

	Bug-Url: https://bugzilla.redhat.com/1053040

2014-02-11  Martin Polednik  <mpoledni@redhat.com>

	vmDevices: add __slots__ to devices
	VDSM devices are created using setattr over **kwargs, making the
	initialization implicit. Implementing __slots__ does define which
	attributes does the device accept and also slightly improves memory footprint.

2014-02-11  Dan Kenigsberg  <danken@redhat.com>

	fencing: stop using a deprecated command
	Recently, fence-agents stopped supporting the "option" alias for its
	"action" STDIN command.

	https://lists.fedorahosted.org/pipermail/cluster-commits/2013-February/003090.html

	Let us conform to the new option name. The "action" name has been long
	supported by el6 and f19's fence-agents, so it can be safely used.

	Thanks to John Taylor for reporting the issue.

	Bug-Url: https://bugzilla.redhat.com/1063472

2014-02-11  pkliczewski  <piotr.kliczewski@gmail.com>

	jsonrpc: Vdsm changes
	Here are engine changes: http://gerrit.ovirt.org/#/c/20926/

	This changes include:
	- Fixing ssl
	- Gluster api support
	- Fixing number of issues around Bridge.py and json binding
	  - Bridge: Solved argument of type 'NoneType' is not iterable
	  - Bridge: Args where not filtered properly
	  - Binding: Missing mapping for getHardwareInfo command
	  - Binding: Missing mapping for getAllVMStats command
	  - Binding: Added getFullVMList command

2014-02-11  Federico Simoncelli  <fsimonce@redhat.com>

	vm: discover volume path from xml definition
	In a previous commit (c072945 One shot prepare) we involuntarily
	changed the path used for virtual machine images from:

	 /rhev/data-center/<spUUID>/<sdUUID>/images/<imgUUID>/<volUUID>

	to:

	 /rhev/data-center/mnt/blockSD/<sdUUID>/images/<imgUUID>/<volUUID>

	This generated an issue during live migration between different
	vdsm versions:

	 libvirtError: invalid argument: invalid path ... not assigned to
	 domain

	In this patch we inspect libvirt xml during live migration and vdsm
	restart to identify if it is necessary to update the path cached in
	the drive object (provided by prepareImage).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1059482

2014-02-11  Daniel Erez  <derez@redhat.com>

	vm: Update LUN size when starting a vm
	In order to handle resize of DirectLUN disks
	(i.e. when a LUN volume is extended by user),
	relevant data should be retrieved when invoking getVmStats.

	Hence, added the following information to disks stats for
	DirectLUN disks: truesize, apparentsize and lunGUID
	(the sizes values already exist but are zeroed).
	Using these values, the engine could keep the DB updated.

	The following changes are introduced:
	* hsm:
	  appropriateDevice method now fetches LUN's device size
	  using 'multipath -> getDeviceSize'.
	* clientIF:
	  For LUN devices, updated drive's truesize/apparentsize
	  using hsm's getVolumeSize method.
	* vm:
	  _getDiskStats -> in order to identify each LUN
	  (e.g. on engine side), added 'lunGUID' to dStats
	  when vmDrive.GUID exists (applicable for DirectLUN disks).

	Bug-Url: https://bugzilla.redhat.com/1026868

2014-02-11  Dan Kenigsberg  <danken@redhat.com>

	nettests: remove most of connectivity checks
	With its default connectivityCheck=True, setupNetworks wait for a ping
	before finishing successfully. This slows down the functional tests.
	It is important to keep testing connectivityCheck, but it does not have
	to happen so often.

	nettests: use a constant dict NOCHK
	The options {'connectivityCheck': False} are very common, lets make it
	easier to use them.

2014-02-11  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: use Requires %{name}
	We should use macros instead of static names in the spec.
	If in the future we decide to use different name for vdsm package
	it's a matter to put the new package name in Name session.

2014-02-10  Nir Soffer  <nsoffer@redhat.com>

	hsm: Fix missing MAX_DOMAINS constant
	Commit ab6014b394 moved MAX_DOMAINS from sp to spbackends without
	updating all users, breaking creation of a pool on block storage using
	old storage domain format. This patch fix the error by importing the
	name from its new module.

	Bug-Url: https://bugzilla.redhat.com/1059108

2014-02-10  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Make a test run under RHEL 6.5
	dhclient still resides in /sbin/dhclient.

	dnsmasq does not accept the --bind-dynamic option.
	For testing purposes, --bind-interfaces is enough
	although it generates a warning:

	LOUD WARNING: listening on 240.0.0.1 may accept requests via interfaces other than veth_23
	LOUD WARNING: use --bind-dynamic rather than --bind-interfaces to avoid DNS amplification attacks via these interface(s)

	Bug-Url: https://bugzilla.redhat.com/987813

	netinfo: Do not mix local time and UTC, improve tests
	dhclient is run in the background so the functional test can
	finish. Both date-time formats dhclient uses are now tested.

	In the non-functional test, leases are created dynamically.

	Bug-Url: https://bugzilla.redhat.com/987813

2014-02-08  Vinzenz Feenstra  <vfeenstr@redhat.com>

	guestIF: Adding guest agent API versioning support
	With the increasing complexity on different version of the guest agent
	and vdsm we're now introducing API versioning, so only supported messages
	are exchanged between guest agent and vdsm.

	VDSM:
	  - Adds a field to the 'refresh' message reporting the highest API version
	    supported by VDSM

	  - Upon receiving the 'heartbeat' message check for the `apiVersion` field
	    to know if the guest agent supports api versioning.
	    - If the fields is not present:
	      The guest agent won't support api versioning. And it needs to be
	      disabled on the VDSM side and the version 0 has to be assumed. That
	      simply means only messages can be sent which were supported before the
	      API versioning was introduced.
	    - If the field is present:
	      The value of the field is supposed to represent the maximum version
	      supported by the guest agent.

	      VDSM then makes a `min(vdsmMaxApiVersion, guestAgentMaxApiVersion)`
	      to determine the highest common value and uses this value as supported
	      API version.
	      When the value has changed since the last time a heartbeat was received.
	      VDSM will send a message 'api-version' to update the guest agent about
	      the determined value. And sets the internally stored effectiveApiVersion
	      value to this new value.

	Guest Agent:
	    - Adds the field `apiVersion` to the heartbeat containing the highest API
	    version supported by the guest agent

	  - Upon receiving the `refresh` message without a `apiVersion` field, the
	    guest agent immediately will revert immediately fall back to version 0
	    To avoid sending any messages which are not yet supported.

	  - Upon receiving the `api-version` message, the guest agent will verify the
	    value received and sets the value to min(received, maxAgentApiVersion)
	    which should, of course, result in setting the received value (this is
	    just an additional step to ensure it does not send more than supported by
	    VDSM.

2014-02-08  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	get max_tasks and thread_pool_size from config by getint()
	It is OK to get max_tasks and thread_pool_size by getfloat()

	The max_tasks will be passed to the Queue as maxsize and the
	thread_pool_size is the thread number of the task thread pool.

	So int is more reasonable than float

2014-02-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding configure sanlock on force
	If sanlock is down we cannot check sanlock process, so isconfigure return that
	sanlock process is already related to the supplementary group.
	Configure verb won't configure sanlock if isconfigure return True currently.
	Therefore, this patch change the ConfigureOnForce to True so
	'vdsm-tool configure --force' will perform the usermod action as the
	user expected.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057225

2014-02-06  Dan Kenigsberg  <danken@redhat.com>

	vm iface statistics: never report negative rates
	When Linux tx/rx couters overflow their 32 bit limit, they wrap back to
	zero. This causes our reported rxRate/txRate to become negative for one
	nample. 51073875161d9b932b7

2014-02-05  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: vdsm pkg for EL distro must include pkla
	vdsm on EL system should ship the .pkla file or libvirt will
	keep asking password and vdsm won't be able to start correctly.
	Originally the commit f824941b has added into %files session
	the polkit files but on a %else conditional for %0{?rhel} and
	this code contains %else for %if 0%{?fedora} >= 18 which won't be EL as expected.
	Additionaly, a new commit bae85d50 added %with_systemd macro and triggered
	this bug inserting new %if 0%{?rhel}/%else which contains %if 0%{?fedora} >= 18
	and %else but won't work too for EL.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060524

2014-02-05  Ondřej Svoboda  <osvoboda@redhat.com>

	netinfo: Determine bootproto from dhclient's lease files
	Lease files are never deleted, just replaced so they do not
	become too long. For DHCPv4 checking for an expiration time
	of a lease was added, DHCPv6 leases use different flags.

	Paths to lease files are predefined in lib/vdsm/netinfo.py
	in _DHCLIENT_LEASES_GLOBS, more common ones are welcome.

	Bug-Url: https://bugzilla.redhat.com/987813

	utils: Moved pgrep and getCmdArgs from storage/misc
	They are general enough and useful elsewhere.

	Bug-Url: https://bugzilla.redhat.com/987813

2014-02-05  Dan Kenigsberg  <danken@redhat.com>

	netconf.ifcfg: include CONFFILE_HEADER in route/rule files
	Include the
	    # Generated by VDSM version x.y.z
	header in all vdsm-written ifcfg files.

	fencing: use deathSignal to keep scripts at bay
	Before this patch, the fenceNode verb used a knowingly-raceful code to
	wait for pending fencing scripts, and kill them when Vdsm exited.
	This patch makes sure that deathSignal is sent to pending scripts if
	Vdsm exits or crashes.

	We require version 1.3 of python-cpopen that raises a proper exception
	when an executable is missing.

2014-02-05  Peter V. Saveliev  <peet@redhat.com>

	vdsm: fix RTC offset
	Upon RTC update (hwclock --systohc) on the guest side, libvirt sends the event
	with RTC offset from the qemu start -rtc value in seconds. The received offset
	should not replace the previous value, but should be added to it. Since the
	time update event is relative to the qemu start time, we should store the
	initial value and use it for the calculation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=956741

2014-02-05  Sergey Gotliv  <sgotliv@redhat.com>

	clientIF: Teardown volume path only for VDSM images
	Trying to tear down a cdrom or external lun throws an exception which
	creates a lot of log printings.

	Bug-Url: https://bugzilla.redhat.com/980054

2014-02-04  Vered Volansky  <vvolansk@redhat.com>

	stroageTests.py: Call detachStorageDomain on rollback
	vdsClient.deactivateStorageDomain() should be called as
	vdsClient.activateStorageDomain() 's rollback:

	This was missing from the original flow.
	activateSD created the mounts, while deactivateSD unmounts the
	directories used for the SDs. Not calling deactivate leaves the mounts
	lingering in /rhev/data-center. This patch removes these lingering
	mounts. The test passes either way.

2014-02-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding with_jsonrpc global to spec set default to 1
	When this global set to 0, vdsm won't build json related packages that
	currently in work in progress state.

	Changing sanlock not configured print
	Instead of asking for restart sanlock service, just prompt sanlock
	service is not configured. Restart the service might not be enough if
	sanlock configure didn't run before and set the supplementary groups.

2014-02-04  Federico Simoncelli  <fsimonce@redhat.com>

	vm: do not pause during refreshVolume
	There's no need to pause the VM during the logical volume refresh as LVM
	is taking care of freezing the IO during the dm table update.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=889097

2014-02-03  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix damage introduced in 0bc1e2

2014-02-03  Mooli Tayer  <mtayer@redhat.com>

	Text: add description for dstqemut in migration command
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1007686

2014-02-03  Francesco Romani  <fromani@redhat.com>

	vm: implement recommended clock settings
	A new set of recommended clock settings emerged as follows:

	  <clock ...>
	    <timer name="rtc" tickpolicy="catchup"/>
	    <timer name="pit" tickpolicy="delay"/>
	    <timer name="hpet" present="no"/>
	  </clock>

	THose settings are recommended by both libvirt and qemu developers,
	and they apply for all guest OSes.
	Some of them don't affect some OSes, but in those cases they are harmless.

	VDSM used to support just the first setting, tickpolicy 'catchup'
	for rtc, conditioned by the presence of the 'tdf' option.
	Now this setting is always enabled.

	This patch updates the XML generation according with
	the new recommendations, and drop all the references
	to the 'tdf' variable.

	API deprecation notice:
	the 'tdf' parameter is no longer honored;
	however, no supported engines seems to send it anymore.

	Bug-Url: https://bugzilla.redhat.com/1053846

2014-02-03  Martin Polednik  <mpoledni@redhat.com>

	tests: fix possible test failure due to reboot event
	Virt tests currently have a chance of failing even on successful run if
	qemu bios startup takes a bit longer than ussual. This leads to halting
	the VM right before initramfs services start, causing "reboot event"
	(leading to state "RebootInProgress") causing test for upstates to fail.

	This patch changes the default wait time to 30 seconds (through constant
	VM_MINIMAL_UPTIME), giving the test run enough time to finish currectly.

	In future, we would like to get rid of this time by adding a heartbeat
	module to initramfs that would indicate successful boot, allowing for
	faster test runs.

2014-02-03  Douglas Schilling Landgraf  <dougsland@redhat.com>

	spec: do not remove vdsm logs when pkg removed
	In the commits 4a07386 0b6035a we introduced the concept
	of creating of metadata.log, mom.log, supervdsm.log and vdsm.log
	logs during the rpm install and sets the proper
	user/group. However, now when removing vdsm the logs are removed too
	which is not the behaviour as before these commits. This patch will
	add ghost macro in the spec to keep logs available when vdsm is removed.

2014-01-31  Douglas Schilling Landgraf  <dougsland@redhat.com>

	sos: plugin should ignore /var/run/vdsm/storage
	In case sos plugin includes /var/run/vdsm/storage and it contains
	symlinks to block devices it can make the host fill the disk
	and eventually create a 0 sized sosreport.

2014-01-31  Dan Kenigsberg  <danken@redhat.com>

	volumeTests: avoid AttributeError during __del__
	Since sd.StorageDomain.__del__() uses its self.stat,
	FileDomainMockObject must expose it.

2014-01-30  Alon Bar-Lev  <alonbl@redhat.com>

	host-deploy: getChainFromSSL: acquire chain from session and not negotiation
	Although the negotiation seems to be the right place to acquire the
	chain, in some cases (such as the one reported in
	https://bugzilla.redhat.com/show_bug.cgi?id=1058016 ), it was missing
	the root certificate authority, while the chain out of the session is a
	complete one.

2014-01-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	vdsm-tool: handle error during module loading
	While vdsm-tool initiates it loads all python modules under tool folder.
	If one of them throws exception vdsm-tool fails to run. This patch
	handles such exception and reports it to syslog.

2014-01-30  Francesco Romani  <fromani@redhat.com>

	vm: drop unused exception
	The _MigrationError exception is defined and never used;
	The close relative MigrationError (without the leading underscore) is.

	This patch drops the unused _MigrationError.

2014-01-30  pkliczewski  <piotr.kliczewski@gmail.com>

	Moving response implementation of getAllVmStats to API.py
	This code was introduced as part of jsonrpc work.

	getAllVmStats command was implemented in xml binding whereas it should
	be in API. Xml binging uses API directly and json binding uses bridge to
	proxy calls to API. Having this logic in API instead of xml binging
	makes it available for both protocols.

2014-01-30  Francesco Romani  <fromani@redhat.com>

	vm: janitorial: introduce a recovering attribute
	So far, a recovering VM was identified by checking for the
	presence of a 'recover' attribute in the Vm.conf dict.
	Moreover, the attribute was accessed in a thread-unsafe way.
	This added unnecessary complication.

	This patch makes the code cleaner and simpler introducing
	an explicit attribute to identify recovering VMs.

	Full history in the discussion of this change:
	http://gerrit.ovirt.org/#/c/22556/

2014-01-30  Dan Kenigsberg  <danken@redhat.com>

	cleanup: move _updateTimestamp to API.py
	After Engine issues a setupNetworks or editNetwork API calls, it follows
	by repeated ping() calls. If networking has been configured correctly,
	the ping() is processed by Vdsm, and _updateTimestamp notifies helper
	tools that the network configuration should not be rolled back.

	This patch extends this behavior to all users of the API, not only XMLRPC.

	Engines of versions before 3.1 used to call getVdsCaps() instead of the
	lightweight ping() (Engine commit 47c61adeb133d95b has changed that).
	Even older Engines (before commit d87de762dbce2ba7) and modern Engines
	in editNetwork flows, do nothing special and depend on their periodic
	list() call. For backward compatibility, we add _updateTimestamp on
	these specific verbs, too.

2014-01-28  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: vdsm-python requires python-cpopen
	vdsm/utils.py requires python-cpopen

2014-01-28  Antoni S. Puimedon  <asegurap@redhat.com>

	Ethtool_opts: fix retrieval from configwriter.
	getEthtoolOpts was incorrectly defined at the configurator class
	level but used for ifcfg from the ConfigWriter class (accessing
	self). This patch moves it to be a module level function and
	imports it from both places it is used (ifcfg and iproute2
	configurators).

2014-01-27  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: own metadata supervdsm mom logs
	/var/log/vdsm/metadata.log /var/log/vdsm/supervdsm.log
	/var/log/vdsm/mom.log should be owned by VDSM.

	Additionaly, now are now creating with touch those files
	(and vdsm.log) during the vdsm rpm install.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055153

2014-01-27  Nir Soffer  <nsoffer@redhat.com>

	sysvinit: Ensure that iscsid is started
	vdsm is starting the iscsid daemon when it starts, but iscsid "start"
	command may silently *not* start the iscsid daemon, because vdsm is
	configuring it's nodes to login manually. When iscsid daemon is not
	running and vdsm is connecting to a storage server, iscsiadm starts
	iscsid daemon. This works when /etc/iscsi/iscsi.conf contains:

	    iscsid.startup = /etc/rc.d/init.d/iscsid force-start

	This is the default configuration on a fresh install of EL 6, and is
	common on developers machines. However when this option is missing,
	iscsiadm fails and iscsi storage is not available. According to the
	comments on the bug, the missing configuration is common in the field.

	This patch starts iscsid using "force-start" command, ensuring that
	iscsid daemon is started and removing the dependency on iscsi.startup
	configuration. This restores the behavior from commit 0233b5e952 in Nov
	2011 until commit 3c0adf791e in May 2013. The behavior was changed to
	make systemd-based deployment (which has no "force-start") start iscsid,
	but now that we have an independent systemd service, it can be safely
	avoided.

	This change does not effect the deployment for systemd or upstart.

	Relates-To: http://gerrit.ovirt.org/14630
	Bug-Url: https://bugzilla.redhat.com/1056948

2014-01-27  Timothy Asir  <tjeyasin@redhat.com>

	gluster: fix vdsmapi gluster json schema error
	Updates schema file for task info, task summary
	and fixes the schema error.

2014-01-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	execCmd with sudo=root raise require tty fault when running as root
	As default sudo request requires tty, although we define notty for user
	vdsm, if we'll try to call sudo command as another use (also root) we
	will be blocked by the "sorry you must have tty" to execute sudo
	command. To avoid that, this patch ignores sudo=True parameter in
	execCmd while running as root.

	Using execCmd to run dmidecode command instead of using subprocess.Popen
	This change is due to a bug while running 'vdsm-tool vdsm-id' as user
	root which calls this function and fails on "require tty" for user root.

	execCmd skip the sudo=True parameter while executing the command [1]

	[1] http://gerrit.ovirt.org/#/c/23721/

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1054759

2014-01-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: vdsm should own vdsm.log
	/var/log/vdsm/vdsm.log should be owned by VDSM.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055153

2014-01-25  Dan Kenigsberg  <danken@redhat.com>

	netconfig: set ETHTOOL_OPTS when a NIC goes up
	There's broken hardware out there where lro needs to to be turned off
	explicitly.
	This patch lets an admin of a local node set

	  ethtool_opts.eth0 = lro off

	to disable LRO on the interface named eth0.

2014-01-24  Dan Kenigsberg  <danken@redhat.com>

	Deprecate volume mtime
	In pre-historic 2.y days, Engine used volume's "mtime" attribute to
	deduces the ancestry of a volume. See for example BZ#513396.
	In case of an error reading the metadata, "0" or "" was returned.
	This was a bad heuristic that was fixed to using proper pointer to
	parents and children.

	Engine 3.y continues to use the mtime field only when importing ancient
	images that lack proper creation time in their OVF.

	Maintaining this attribure requires costly readings of volume metadata.

	This patch drops the mtime-related code. For backward compatibility with
	old Vdsms and Engines that may expect the existance of this attribute,
	we keep writing "0" to the metadata and reporting "0" to Engine.

2014-01-24  pkliczewski  <piotr.kliczewski@gmail.com>

	schema: Updates based on the current code base
	Following updates are part of this patch:
	VDSM related
	  - getAllVmStats was only available for xml so it was moved to API
	  - vm snapshot method had not optional argument
	  - added implementation for full vm list
	  - added gerHardwareInfo method missing from schema

	Gluster related
	  - Added GlusterVolume.status command and corresponding type which was
	    missing is schema
	  - Added GlusterVolume.profileInfo command and corresponding type
	    which was missing is schema
	  - Added GlusterVolume.setOptionsList command and corresponding type
	    which was missing is schema
	  - Added  GlusterVolume.replaceBrickStart command which was missing is
	    schema
	  - Few updates for command comments

	This patch contains as well fix for snapMemVolHandle which should be
	optional.

2014-01-23  Bala.FA  <barumuga@redhat.com>

	gluster: add host uuid in volume status
	This patch adopts newly added host uuid in gluster volume status cli
	output

2014-01-23  Francesco Romani  <fromani@redhat.com>

	caps: report malfunctioning libvirt
	the fix applied in commit 6c6da596336d6cc1ff121057877ac6ab1f00f147
	can be a source of confusion for users which expect
	a Fedora 19 node is able to join a 3.4 cluster.

	This patch adds log messages which briefly explain
	the reason of the incompatibility and suggest a fix.

	Bug-Url: https://bugzilla.redhat.com/1056918

2014-01-23  Antoni S. Puimedon  <asegurap@redhat.com>

	configNetwork: fix configurator class typo

	Add missing libnl buildrequires dependency

2014-01-22  Federico Simoncelli  <fsimonce@redhat.com>

	spec: bump sanlock version to 2.8
	The new SANLock inquireClusterLock method relies on two new API
	introduced in sanlock 2.8:

	  sanlock.read_resource(path, offset=0) -> dict
	  sanlock.read_resource_owners(lockspace, resource, disks) -> list

2014-01-22  Bala.FA  <barumuga@redhat.com>

	gluster: interpret and use correct xml elements
	xml output of rebalance and remove-brick status returns filesSkipped
	in <skipped> tag and value of <statusStr> tag cleaned up to use it as
	proper enum.

	gluster: adopt xml changes of rebalance and remove-brick status
	xml output of rebalance and remove-brick status add host uuid and task
	runtime (per host and summary).  This patch adopts these additional
	elements below verbs

	* glusterVolumeRebalanceStatus
	* glusterVolumeRemoveBrickStatus

	Below is the change in output which doesn't break backward
	compatibility

	        {'summary': {
	    ==>>    'runtime': FLOAT,
	            'filesScanned': INT,
	            'filesMoved': INT,
	            'filesFailed': INT,
	            'filesSkipped': INT,
	            'totalSizeMoved': INT,
	            'status': STRING
	        },
	        'hosts': [{
	            'name': STRING,
	    ==>>    'id': STRING,
	    ==>>    'runtime': FLOAT,
	            'filesScanned': INT,
	            'filesMoved': INT,
	            'filesFailed': INT,
	            'filesSkipped': INT,
	            'totalSizeMoved': INT,
	            'status': STRING
	        }]}

2014-01-22  Timothy Asir  <tjeyasin@redhat.com>

	gluster: enhance vdsmcli error handling
	Vdsmcli also treated as a functional testing tool. Checking
	the functional parameter could hide the state of depending
	function. Engine might call those functions without these
	parameters also. So the parameter null check should go inside
	the gluster function.

2014-01-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Add BuildRequires to python-argparse
	EL6 build is failing because configure.ac says argparse is fatal error
	in case we don't have it in build system. This patch includes python-argparse as
	BuildRequires. On the other hand, >= F19 contains python-2.7 which has
	python-argparse integrated into the stdlib and don't generate such error.

2014-01-20  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: use link objects for getting known information
	The link objects always contain certain information that used to be
	retrieved separately. This patch avoids this extra info fetching.

	MonkeyPatch: fix applying and reverting (static|class)methods.
	When applying a patch to a class we should cast the method we are
	patching with to be of the same kind (staticmethod, instancemethod
	or classmethod) as the original method that we are replacing. (Note
	that by default setattr sets those methods as instancemethods).

	In Python2, setattr(Class, name, func) automatically converts func
	into an instancemethod. To keep type(Class.func) as function,
	staticmethod(func) must be applied explicitly when reverting.

	Credit goes to Nir Soffer or the final version of the patch and tests.

2014-01-20  Francesco Romani  <fromani@redhat.com>

	packaging: update python-cpopen requirement to 1.3
	update both dependencies and build dependencies to
	python-cpopen 1.3.

	tests: add missing attribute in LibvirtMock object
	testLibvirtconnection.testCallSucceeded raises AttributeError since
	LibvirtMock.virEventRunDefaultImpl is missing.

	This patch adds the missing attribute.

2014-01-20  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: switch link polling to netlink
	Getting the links from iproute2 implied creating a process each time
	and then parsing the output. Due to the fact that this opearations
	happen periodically and sometimes several times per second, the cost
	was too high.

2014-01-20  Federico Simoncelli  <fsimonce@redhat.com>

	sp: fix pool membership check in attachSD
	A race between attachStorageDomain and connectStoragePool using
	StoragePoolMemoryBackend could lead to the new domain not being
	attached (on storage).

	The race happens in StoragePool.attachSD:

	        domains = self.getDomains()
	        if sdUUID in domains:
	            return True

	if the domain map has been already updated by connectStoragePool
	the domain is deemed attached and the remaining operations are
	skipped.

	In this patch:
	- use only validateAttachedDomain in detachSD (validatePoolSD is
	  redundant)
	- make attachSD symmetric to detachSD using validateAttachedDomain
	  to check if the domain is already attached

2014-01-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	To allow downgrade of vdsm we need to support vdsm-tool old API
	During upgrading or downgrading vdsm version we perform reconfigure
	process. This process has been changed between 3.3 to 3.4. This patch
	tries the current version implementation of reconfigure, and if it fails
	it will fallback to vdsmd reconfigure verb, which exists in all
	previous versions of vdsm.

	This workaround need to be removed in vdsm 3.5.

2014-01-20  ndarshan  <dnarayan@redhat.com>

	gluster: additional parsing of host UUID in verb glusterVolumesList
	This patch adds parsing of host UUID for all the bricks in the
	verb glusterVolumesList.
	This information is stored in bricksInfo which is list of dictionary
	where each dictionary has name and hostUUID.
	sample:
	---------------------------------------------------------------
	     'bricksInfo': [{
	                     'name': '192.168.122.2:/tmp/t_b1',
	                     'hostUuid': '04eb591b-2fd3-489e-a22c-5d342a3c713d'
	                     },
	                    {
	                     'name': '192.168.122.2:/tmp/t_b2',
	                     'hostUuid': '04eb591b-2fd3-489e-a22c-5d342a3c713d'
	                     }]
	---------------------------------------------------------------

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1038988

2014-01-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	Changing vdsm-tool and vdsmd pre-tasks outputs to be more meaningful to user
	Previously to this change the output was misleading. Users
	could not understand how to handle configuration issues properly.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1029812

2014-01-20  Federico Simoncelli  <fsimonce@redhat.com>

	sp: receive domains map in connectStoragePool
	This patch adds the support for the StoragePoolMemoryBackend and
	the required support in the HSM class to instantiate it and to
	live upgrade from older backends.

	The connectStroagePool API has been updated to receive the extra
	domainsMap dictionary that triggers the use of the new backend.

	sp: refactor out the metadata access from StoragePool
	All the storage pool metadata operations have been relocated to a
	specific backend: StoragePoolDiskBackend. It is now possible,
	implementing the required API, to use different backends for the
	pool metadata.

	A backend may require other attributes and methods in addition to
	the regular API used by StoragePool, these specific features should
	be handled outside of the StoragePool implementation, typically in
	the HSM class where the backward compatibility layer is maintained.

	sp: use setDomainsMap in reconstructMaster
	The metadata access executed in reconstructMaster should be replaced
	by the existing setDomainsMap. In order to do so we also need to set
	the master domain (used by setDomainsMap) and temporarily set the
	storage pool as secure (in the same way we do in create).

	sd: add inquireClusterLock method to StorageDomain
	The leader version and the spm id may be maintained by the cluster
	lock in some implementations (e.g. SANLock).
	This patch introduces the capability of inquiring the cluster lock
	for these values.

2014-01-20  Francesco Romani  <fromani@redhat.com>

	mkimage: do not create world-readable image
	mkimage generates world-readable images by default.
	mkimage spawns a genisoimage process through the cpopen package
	to do the actual work.
	It is of course possible to fix the permissions once the ISO image
	is created with a trivial os.chmod() call, but this will leave
	open a window opportunity to still exploit the bug.
	A more correct and secure way to fix the permissions of the newly
	generated image is to setup the umask just before to exec.

	The current python-cpopen package lacks a way to set the umask
	of the child before to run it, so this patch depends on an enhanced
	python-cpopen, temporarily located here:

	https://github.com/mojaves/python-cpopen

	With this enhanced cpopen, fixing the permissions is trivially made
	by passing the correct umask at the ISO image creation.

	PatchSet v2:
	the cpopen patch has been merged upstream:

	https://github.com/ficoos/cpopen/commits/master

	PatchSet v3:
	* updated vdsm.spec.in and debian.control to require an updated cpopen.

	PatchSet v4:
	* the minimum required cpopen version is 1.2.3-5

	PatchSet v5:
	* rebased against master
	* make iso image not group-writable
	* added explicit permission tests (umask tests alread committed
	  in the cpopen package)

	Bug-Url: https://bugzilla.redhat.com/1034172

2014-01-19  Assaf Muller  <amuller@redhat.com>

	Extend setupNetworks API to accept defaultRoute
	Previously defaultRoute was True for the management network,
	now it is received from the client. For backwards compatability,
	if defaultRoute is not received from the client, it is set
	if the network being configured is the management network.

	Bug-Url: https://bugzilla.redhat.com/1015009

2014-01-18  Miguel Angel Ajo  <miguelangel@ajo.es>

	vdsm: allow hooks to pass down dictionaries in json format
	This will allow to pass, and recover network settings in the
	*_network_setup hook as json dictionaries using the same
	method that is used for XML. In this case the environment
	variable _hook_json is used.

	before_network_setup hook exposes the requested network
	configuration that can be patched by the hook.
	after_network_setup exposes the final system network
	configuration.

2014-01-18  Assaf Muller  <amuller@redhat.com>

	Add netinfo.getDefaultGateway()
	Used in patch:
	https://bugzilla.redhat.com/1015009

	On a new VDSM installation, or an old one upgrading to
	3.4, we detect the current networking configuration and
	persist it to files of our own format. More on this at:
	http://www.ovirt.org/Feature/NetworkReloaded#Unified_persistence

	It is necessary to detect the host default gateway so
	the information could be persisted to files.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015009

	Change MANAGEMENT_NETWORK to MANAGEMENT_NETWORK*S*
	Before: MANAGEMENT_NETWORK was either 'ovirtmgmt' or 'rhevm',
	        and the value was gotten from automake
	After: MANAGEMENT_NETWORKS = ('ovirtmgmt', 'rhevm')

	This change allows the following patch to solve the bug.

	Bug-Url: https://bugzilla.redhat.com/1015009

2014-01-17  Francesco Romani  <fromani@redhat.com>

	caps: check availability abort on EIO in libvirt
	commit bbeb165e42673cddc87495c3d12c4a7f7572013c
	added support for VIR_MIGRATE_ABORT_ON_ERROR,
	but libvirt 1.0.5.8 shipped in Fedora 19
	do not support that, even if it should be supported
	starting from upstream version 1.0.1.

	This patch provides a workaround for this; if libvirt
	misses this flag, it forces the the cluster level at
	no more than version 3.3.

2014-01-16  Peter V. Saveliev  <peet@redhat.com>

	remove redundant libvirt call
	Checking UUIDString() adresses the bug #603494, which
	is closed ages ago. While it is nice to support really
	ancient libvirt versions, it costs us one extra
	libvirt call. Given global libvirt driver lock, it
	does matter in mass VM creation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=603494

2014-01-16  Dan Kenigsberg  <danken@redhat.com>

	netinfo: ifcfg: ignore 0 suffix
	'IPADDR0', 'GATEWAY0', 'PREFIX0' and 'NETMASK0' means to initscripts
	exactly as their unsuffixed siblings. With this patch, Vdsm reports them
	as 'IPADDR', so the do not confuse Engine.

	A proper change would be to make Engine/Vdsm API independent of
	ifcfg-specific details. This patch is required anway, for the sake of
	older Engines.

	Bug-Url: https://bugzilla.redhat.com/987832

2014-01-16  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: specify sysV commands for EL6 only
	To provide EL7 builds we must update the spec to not
	include sysV commands since it uses systemd.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1051860

2014-01-16  Vered Volansky  <vvolansk@redhat.com>

	storageTests: Configure via environment variables
	These are used as permutations for the test. We want to automate the
	test and call it with whatever storage type(s) and metadata
	version(s).

2014-01-16  Federico Simoncelli  <fsimonce@redhat.com>

	securable: refactor the securable implementation
	In order to remove the storage pool metadata we need more flexibility
	in defining the isSafe method.
	In fact the different backends (with/without metadata) will rely on the
	StoragePool SPMness to protect their methods.

	In this patch:
	- transform the Securable base class and MetaSecurable in a decorator

2014-01-16  Oved Ourfali  <oourfali@redhat.com>

	sp: changing un-shared treatment in the createVolume function
	Up until now, the only way to create a 'template' disk was by using the
	copyImage command.  This has 2 limitations:
	1. It forces the user to copy all the data instead of doing an in-place
	convert of an image to a template image
	2. Resulting image cannot be qcow which is wasteful in some cases

	This patch addresses that, and allows using an existing disk as a
	template disk, by allowing to "share" a disk that isn't marked as
	"shared", but can be shared as it doesn't have snapshots. This disk will
	be marked as "shared" upon first use.

2014-01-15  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: fix Link's fromText mtu and vlanid types
	Accross the codebase mtu and vlanid are specified to be integers.
	This patch makes sure that when we get the information from
	parsing iproute2 the types are correct.

2014-01-14  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Replaced all too generic except: handlers in vm.py

2014-01-14  Vered Volansky  <vvolansk@redhat.com>

	utils: cleanup - typos, grammar and comments refinement

2014-01-14  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	fix Exception message error in apiTests module

2014-01-14  Dan Kenigsberg  <danken@redhat.com>

	tests: use assertIn when applicable
	On failure, assertIn(x, y) provides more tangible information than the
	plain assertTrue(x in y).

2014-01-13  Federico Simoncelli  <fsimonce@redhat.com>

	sp: improve masterMigrate safety
	The goal of this patch is to clean, optimize and give robustness to
	the masterMigrate method.

	In this patch:
	- acquire the cluster lock before start using the new master filesystem
	- refactor out all the required metadata changes in switchMasterDomain
	- divide the method in two parts (operations required to switch to the
	  new master and previous master cleanup)
	- address the two parts exception handling (hard failure for the first,
	  logging only for the second)

	sp: move validatePoolSD in the StoragePool class
	It's the StoragePool duty to validate if an operation cannot be
	accomplished because the storage domain is not part of the pool.

	For consistency with the other pool Vms API the sdUUID argument
	in the getVmsList method is now mandatory (it is set by the HSM
	public method).

2014-01-13  Roy Golan  <rgolan@redhat.com>

	set the # of vcpus for a VM (hot plug/unplug)
	Introducing new API for setting the number of cpus of a running VM.

	setNumOfCpus(vmId, number)

	http://www.ovirt.org/Hot_plug_cpu

	Prerequisite
	Vm must be Running state.
	libvirt xml:
	* To add cpus a VM must have the max number configured.
	* Both topology and vcpu elements must exist.

	snip from a domxml:
	 <vcpu current='3'>160</vcpu>
	 <cpu mode='custom' match='exact'>
	   <topology sockets='160' cores='1' threads='1'/>
	 </cpu>

	this means there is a total of 160 cpus and the current num is 3

	The underlying API being used is libvirt's setVCpus.
	The result of hot plug/unplug a cpu to a RHEL, for instance, is a new
	device under: /sys/devices/system/cpu/cpuX

	Notes:
	* guest OS support and behavior may(and probably will) vary on trying to
	  to hot plug/unplug.

	* Upgrade: VMs that have been started on hosts before this patch can
	  not plug more CPU than the number of CPUs they started up with.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036492

2014-01-13  Assaf Muller  <amuller@redhat.com>

	Fix VDSM boot
	Fix regression introduced in Gerrit 22750, hash 114692f.

	The unified net persistence upgrade name was changed, changing
	the name exposed to vdsm-tool. However, the call to the upgrade
	was still using the old name.

2014-01-13  Sander  <bugzilla@grendelman.com>

	nestedvt hook: identify kvm_amd properly
	kvm_amd uses "1" for it's nested flag, kvm_intel uses "Y"

	Bug-Url: https://bugzilla.redhat.com/1035314

2014-01-13  Dan Kenigsberg  <danken@redhat.com>

	ifcfg: exclude HWADDR lines if requested
	In prehistoric days, our ifcfg files included HWADDR lines for
	persistent NIC names on EL5 hosts. Our currently-supported
	systems no longer require HWADDR for that, but rather use udev rules.
	HWADDRs are still required if NetworkManager is running and needs them
	to adhere to our NM_CONTROLLED=no directive.

	HWADDR lines in ifcfg files are frowned upon, since they essentially
	duplicate information that already exists in udev rules.  Users who
	would like to avoid them can now configure hwaddr_in_ifcfg to "never"
	instead of the default "always".

	Bug-Url: https://bugzilla.redhat.com/1044060

2014-01-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing unnecessary check-local from storage Makefile.am
	We used that to run storage_exception main [1] to verify the numeration of
	the error code numbers. This section was removed from storage_exception
	and is not needed anymore. Therefore this patch omits the redundant
	check-local scope.

	[1] http://gerrit.ovirt.org/#/c/2356/4/vdsm/storage/storage_exception.py

2014-01-13  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: vdsm-python requires zombiereaper
	vdsm/utils.py requires vdsm--python-zombiereaper

2014-01-12  Assaf Muller  <amuller@redhat.com>

	Add --run-again option to upgrades
	The --run-again option will ignore the existance of upgrade files
	in /var/lib/vdsm/upgrade/

	Each upgrade will still only run if it thinks it should run.

	The --run-again option has two use cases:
	1) It's easier to tell users to run an upgrade again with
	   --run-again, then it is to tell him/her to delete some random
	   file first, and then run the upgrade again. This will make
	   life slightly easier when tickets start popping up.
	2) During development of upgrades

2014-01-12  Vered Volansky  <vvolansk@redhat.com>

	utils: Moved RollbackContext from misc to utils
	The RollbackContext class was located in storage/misc, and is used by
	several non-storage tests. It was therefore moved to utils, where it
	belongs. Accordingly, RollbackContextTests class was moved to utilsTests
	from miscTests.

2014-01-12  Aravinda VK  <avishwan@redhat.com>

	gluster: Add force option to Volume Create command
	glusterfs cli will fail if system's root partition is used
	as brick dirs. If user wants to use system's root partition as
	bricks dir then "force" option can be used in gluster cli.

	Added the "force" parameter to vdsm verb
	glusterVolumeCreate

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1008942

2014-01-12  Assaf Muller  <amuller@redhat.com>

	BindingXMLRPC bugfix: Use getDeviceByIP() for lastClientIface
	Use the new function introduced in:
	http://gerrit.ovirt.org/#/c/22841/

	To report the 'management device' to the engine.

	BindingXMLRPC bugfix: Added netinfo:getDeviceByIP and a test
	In essence a revert for http://gerrit.ovirt.org/#/c/21470/
	I decided not to actually revert so that we keep the new getRouteTo
	and its test, as its covered by a test and may be useful in the
	future.

	Both 'getDeviceByIP' and 'getRouteTo' solve the same issue:
	How to report to the engine the device through which the last client
	communicated to VDSM. This is used only in installation, so the
	engine knows on what NIC to place the management bridge.

	The getDeviceByIP approach gets the IP addr
	of VDSM's side of the socket, and looks up the NIC which has that IP.
	That had issues with testing (The changes can be seen in this patch).
	getRouteTo's new (But flawed) approach was to route to the engine's
	side of the socket. This failed in all-in-ones as it returned the
	loopback device - It's not possible, nor does it make any sense
	to place the management bridge on the loopback device.

2014-01-11  Vitor de Lima  <vitor.lima@eldorado.org.br>

	utils.py: Add hostUUID retrieval support for KVM on PPC64

2014-01-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Add with_vhostmd
	The package vhostmd is only available on Fedora, the EL* version
	is not available in EPEL.

2014-01-10  Dan Kenigsberg  <danken@redhat.com>

	cleanup: fix inconsistent indentation

2014-01-09  Nir Soffer  <nsoffer@redhat.com>

	clientIF: Rescan devices if device not found after vmHotplugDisk
	According to the analysis in the bug, invoking vmHotplugDisk right after
	connectStorageServer may not leave enough time for multipathd to create
	the device, leading to unnecessary failure.

	As I understand, multipathd is receiving events from udev and creating
	devices. The race is probably related to the asynchronous nature of this
	mechanism. Invoking multipath.rescan() force synchronous update of the
	found devices.

	The original fix in commit 15c7f74365cb5d2c9258bc333c441941c6e42bdb
	tried to to invoke multipath.rescan() if the device was not found. Due
	to a unfortunate error, multipath.rescan() was never invoked.  Although
	the bug was never fixed, QE verified it and customers are using this
	code for the last 6 month.  We believe that the problem is a tiny race
	that is unlikely to happen, but it is possible and should be fixed.

	This patch implements the original fix in a different way, calling
	getDevicesVisibility(), which invokes multipath.rescan() if a device is
	missing.

	Relates-To: https://bugzilla.redhat.com/923773
	Bug-Url: https://bugzilla.redhat.com/1044068

2014-01-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix return parameter value and name of sanlockConfigModule is-configured
	1. Fixing the return value to the right expected boolean.
	2. Changing ret to configured for more readability of the code.

	Validate VDSM user's sudoer permissions
	On startup VDSM will try to run SUDO arbitrary command to validate that vdsm
	sudoer configuration (sudoers.d/50_vdsm file) is set and read properly.
	If not, will report to syslog and exit.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1024236

2014-01-09  Federico Simoncelli  <fsimonce@redhat.com>

	sp: split metadata transaction in createMaster
	This patch splits the createMaster metadata transactions in two parts:
	one part related to the pool metadata initialization (with safe default
	values) and the second one related to the domain metadata (including
	role, masterVersion and attached pool).

	The reason to split the two operations is to encapsulate the storage
	pool metadata into methods that later on can be moved out of the
	StoragePool class.

	Removing the previous transaction is not risky as the pool metadata
	values are safe defaults and the real commit phase is executed in the
	domain metadata transaction. The two side effects of this change are:

	- we always initialize the pool metadata even when the domain metadata
	  transaction fails
	- the createMaster operation takes now two storage operations instead
	  of one

2014-01-08  Nir Soffer  <nsoffer@redhat.com>

	hsm: Rescan multipath before loading lvm cache
	lvm cache was loaded before multipath rescan, loading possibly stale
	data, since existing devices may disappear and new devices may appear
	after multipath rescan.  After lvm cache was loaded, storage domain
	cache was refreshed, invoking multipath rescan and invalidating lvm
	cache.  Later lvm commands would trigger a second load of the lvm cache.

	This patch refreshes storage domain cache before loading lvm cache,
	ensuring a fresh cache and saving an unneeded lvm cache reload, which
	can be slow when having lot of lvs.

	bootstrap: Return recovery error until hsm is ready
	When constructing HSM, a background thread is started, invoking
	lvm.bootstrap and other initialization tasks.  Since lvm bootstrap is
	performed in a background thread, it may not be done when vdsm is asked
	to connect to storage pool or manipulate images.  This may lead to a
	race when lvm bootstrap thread is deactivating a logical volume after
	engine asked to activate it.

	I considered moving lvm bootstrap into the main thread; However this may
	delay startup by a minute or more when we have huge amount of lvs. While
	server is waiting for bootstrap to finish, engine does not get any
	response from vdsm, and if vdsm is currently the SPM, engine cannot
	switch SPM to another host.

	This patch uses the recovery mechanism to respond with a recovery error
	until hsm background thread is done. From the user point of view, the
	host is "Initializing" until hsm is ready. If initializing host is the
	SPM, engine can switch SPM to another host as soon as vdsm is up.

	If a task in hsm background thread has a fatal error, hsm will never
	become ready, and the host will be considered initializing. This patch
	ensures that we cannot use storage and cause data corruption of storage
	initialization failed. This change may require engine support, fencing a
	host in this state.

	vm: Unify checks for vdsm image
	When testing if dict or vm.Drive object are vdsm image, we have to do
	an ugly type check, and then invoke either vm.Drive.isVdsmImage, or
	vm.isVdsmImage, which use different logic.

	Having vm.Drive.isVdsmImage looks, at first glance, as an improvement,
	but since we handle both dicts and drive objects, this only complicates
	the code. The different logic creates confusion and leads to pointless
	discussions if some key is needed or not in certain context.

	This patch unifies these checks; both vm.Drive and dict have now similar
	interface so isVdsmImage can handle both, and we use the same logic.

2014-01-08  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Rename migration_timeout to migration_downtime_delay
	Previously the migration_timeout value was supposed to be used for
	multiple things. Now the only meaning left is the calculation for
	the delay between the downtime steps.
	To reflect this, the value has been renamed and the code updated to make
	this meaning more obvious.

	Now it is 75 seconds per GiB of RAM the minimum time still is 150 seconds.

	Avoid going into 'Paused' status during long lasting migrations
	If a migration is taking longer than 'migration_timeout' the VM
	moves into 'Paused' state on the destination host.
	This patch increases the timeout to 6 hours as an absolute maximum
	for the destination to wait for the migration to finish.
	This is now reflected as the migration_destination_timeout.

	If the VM after the timeout still has the state PAUSED and the
	reason is `migration` we're going to raise an MigrationError and
	will lead to the destruction of the VM on the destination.

	In all other cases we're keeping the previous behaviour and are
	continuing with normal VDSM tasks without touching the state of
	the VM. That means that if the VM is in PAUSED state due to other
	reasons than migration, it will stay PAUSED.

	Bug-Url: https://bugzilla.redhat.com/1028917

	Introduce a maximum time limit a migration may take
	There are cases where migrations can take too much time. To set a finite
	end to this we're now introducing a new configuration value
	migration_max_time_per_gib_mem which defined the maximum time
	the migration may take per GiB memory. The default value of 64 seconds
	is calculated by 50% of current default value for the maximum bandwidth.
	(1 GiB needs 32 seconds on the maximum bandwidth)

	When migration_max_time_per_gib_mem is set to `0` the functionality
	is disabled.

	This time tracking is now handled in the MigrationMonitorThread on the
	source host side of the migration.

	Bug-Url: https://bugzilla.redhat.com/970645

2014-01-08  Vered Volansky  <vvolansk@redhat.com>

	misc: Fix exception re-raising in RollbackContext
	Former code assumed that exc_value argument is always an Exception
	instance, and tried to re-raise it using the "raise value, None,
	traceback" syntax. It turns out that exc_value in not an Exception
	instance when a KeyError is raised inside the RollbackContext class.
	In this case, exc_type is KeyError, but exc_value is the tuple
	("missingkey",).  When raising this tuple using the
	"raise value, None, traceback" syntax, Python hides the original error
	and raises a new confusing error:

	    "TypeError: exceptions must be old-style classes or derived from
	    BaseException, not str"

	In this patch, if there's no exception in the finally clause, python
	automatically re-raises the original exception (returning True would
	have swallowed it). The first exception in the finally clause is
	saved and re-raised with the "raise expression, expression,
	expression" syntax if there was no exception in the with clause.

	Tests Added:
	1. Verify that the above scenario is handled correctly.
	2. Verify that when an exception is raised both from the with  statement
	   and from an undo statement, the one from the with statement is the
	   one raised from __exit__().

	Relates-To: http://docs.python.org/2.6/reference/simple_stmts.html#the-raise-statement
	Relates-To: http://docs.python.org/2.6/library/stdtypes.html#contextmanager.__exit__

2014-01-08  Federico Simoncelli  <fsimonce@redhat.com>

	sp: refresh metadata on hsm when listing domains
	Previously to get the most updated domains list we were issuing an
	invalidateMetadata request before getDomains (updateMonitoringThreads).

	Given that invalidateMetadata is ignored on SPM (as the cache of the
	single writer is always up to date) we can encapsulate the metadata
	read in getDomainsMap (useful to remove the pool metadata) and always
	call invalidateMetadata before reading PMDK_DOMAINS.
	This will also ensure that on HSM the domains list is always up to
	date.

	The @unsecured decorator is removed from validatePoolSD and
	validateAttachedDomain to make explicit that they should be used only
	on the SPM (as HSM should never use these validations), and therefore
	getDomains won't trigger a metadata invalidation from there.

2014-01-08  Assaf Muller  <amuller@redhat.com>

	Gluster API verbs will now be callable again
	Fix regression introduced in #22837.

	When wrapping GlusterAPI methods via wrapApiMethod,
	wrapApiMethod was accessing a GlusterAPI method's im_self,
	(If f is the wrapped method, then f.im_self), which
	is an alias to an GlusterAPI instance, but the glusterAPI class
	doesn't define updateTimestamp.

	This patch moves 'updateTimestamp' to be a module function,
	which will be available no matter what method wrapApiMethod
	is wrapping.

2014-01-07  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Reduce the migration progress timeout
	The progress of the migration should indicate a stuck migration
	way before the currently configured migration_timeout, which has
	by default 300 seconds.

	Half of the time should be more than enough for now.

	This commit introduces the migration_progress_timeout configuration
	value to be able adjusting this value.

2014-01-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	set reconfigureOnForce attribute to ModuleConfigurer
	When reconfigureOnForce set to True and --force flag set the configure
	verb will overwrite the configuration even if already set.
	For libvirt we do that to keep old semantic of --force flag.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1035847

2014-01-07  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Get rid of legacy status 'Running'
	The status 'Running' means 'Up' and Guest Agent is Responsive,
	however this state is not used by the engine at all even before
	version ovirt 3.0.
	Now we are completely removing it as this is not helpful having
	two states for Up.

2014-01-06  Maor Lipchuk  <mlipchuk@redhat.com>

	API: Replace try-except block with @traceback
	waitForPid thread was using an explicit try except block for
	reporting excpetions.
	The patch replaces it with the @traceback decorator,
	ensuring that exceptions are logged and simplifying the
	code.

2014-01-06  Nir Soffer  <nsoffer@redhat.com>

	clientIF: Decouple HSM and clientIF
	clientIF.irs is currently created in clientIF.__init__, coupling
	clientIF and HSM and creating confusion about irs availability during
	initialization.  There is a small window where irs is constructed but
	not set yet.  This state is invalid; we have only two states, irs
	enabled or not, and we don't support moving from one state to the other.

	This patch separates irs creation from clientIF creation. clientIF is
	created now with either a fully constructed irs object or None,
	eliminating the confusing unwanted state.

	This change also makes it easier to test clientIF, allowing creating of
	clientIF with fake irs instance.

	If we fail to create irs, we panic instead of running without irs.

2014-01-06  Mike Kolesnik  <mkolesni@redhat.com>

	hooks: Security groups support for OVS
	OpenStack Networking for OVS currently can't handle security groups on
	the OVS bridge itself, so a hybrid approach is used where the tap device
	is connected to a Linux bridge (on which the security groups can be
	implemented), and it is connected in turn to the OVS bridge using a
	"patch cable" made of a VETH pair.

	This commit implements the logic stated by:
	http://www.ovirt.org/Features/Detailed_OSN_Integration#Security_groups

	Note: Migration support for OVS + security groups will be added in a
	later patch.

	hooks: Extract devName function for openstacknet
	Extracted function to calculate the device name used for OpenStack
	Networking devices.

	hooks: Extract function for command execution
	This function will be used by the openstacknet hook to execute commands
	in a more convenient way, instead of repeating the logic to exit the
	hook everywhere.

2014-01-06  Dan Kenigsberg  <danken@redhat.com>

	spec: fix name of qemu-img for el7

2014-01-06  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vm: Bring back missing before_device_migrate_source hook call
	During the merge of libvirtvm.py and vm.py this section of the code
	somehow got removed, this patch brings it back.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1048763

2014-01-06  Vitor de Lima  <vitor.lima@eldorado.org.br>

	vdsm: Create VMs for the POWER architecture
	This includes changes necessary to create VMs in the POWER architecture
	 and run ppc64 guests in x86-64 hosts. These changes are:

	- Allow the architecture of a guest to be different from the host,
	  in order to allow x86-64 hosts to test ppc64 specific code
	- Execute x86 specific QEMU features only in x86-64 guests, like
	SMBIOS, guest cpu flags and processor models, ACPI
	- Create a virtual USB keyboard in ppc64 guests (this is not done
	  automatically like in the x86-64)
	- Create a virtual USB mouse in ppc64 guests
	- Use the Standard VGA device instead of the Cirrus Logic VGA in ppc64
	  guests
	- Change the default drive interface to SCSI in ppc64 guests
	- Increase the default memory size for fake ppc64 KVM guests
	- Tests covering the PPC64 specific code

2014-01-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Updating README with vdsm-tool new api

2014-01-05  Maor Lipchuk  <mlipchuk@redhat.com>

	libvirtconnection: Fix _EventLoop.run if thread exited abnormally.
	Previously if the event loop thread exited abnormally, the run variable
	was left in wrong value. Now the variable is set back to False in this case.

	libvirtconnection: Fix a race when starting the eventloop
	This patch fixes a race which occurs when setting self.run to True
	only after starting the thread.

	lbvirtconnection: use root logger
	Assign log variable the default logger which is the root logger.
	The log of libvirtconnection is not configured in the configuration file
	which cause the all the logs that using that not to be seen in the vdsm.log

	The use of the root logger will make the log be seen in the vdsm.log

2014-01-05  Assaf Muller  <amuller@redhat.com>

	BindingXMLRPC bugfix: Return lastClientIface for current connection
	The patch does two things:
	1) Fixes a bug where lastClientIface was for the previous
	   connection, and not the current one. The method to retrieve
	   the last client was through a log_request LoggingMixIn
	   which is invoked at the end of a response, not at the beginning.
	   The patch removes the usage of that MixIn, and instead uses
	   values that are updated at the beginning of the connection
	2) Simplifies the 'LoggingMixin' out of the picture as its no
	   longer needed

	BindingXMLRPC cleanup: Remove unused variables

	BindingXMLRPC cleanup: Inline getServerInfo
	Inlining getServerInfo because:
	1) It's used exactly once
	2) I'd like to avoid people using it at all. It only works
	   if there's exactly one client, and only for one command
	   at a time. It works for the purposes it's used, but if
	   (code) users expect it to work for all cases they'd be
	   in for a surprise

2014-01-05  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: remove master info from getStorageDomainInfo
	The pool metadata doesn't belong in the storage domain information
	and ovirt-engine never read those values.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1033942

2014-01-04  Nir Soffer  <nsoffer@redhat.com>

	supervdsmServer: Cleaner way to wait for signals
	supervdsmServer was using silly way to wait for termination, working
	around Python bug. This patch use the standard way to wait until
	termination signal is received, eliminating the workaround.

2014-01-04  Dan Kenigsberg  <danken@redhat.com>

	update NIC: having no custom properies is valid
	Older Engines, that preceded per-vNIC custom properties (Vdsm commit
	38b1f8fb) do not send the "custom" element at all. This has to be
	interpreted exactly as an empty custom element.

	Bug-Url: https://bugzilla.redhat.com/1047646

2014-01-03  Francesco Romani  <fromani@redhat.com>

	tests: do not check permissions on dos filesystem
	commit 0b147dc2e247e787ad760ba30a8b8815eb65daca
	introduced an extra step in unit tests, to check
	the permissions of the files in the created filesystem.

	This is fine for filesystems which support permissions,
	but DOSFS/FAT/VFAT does not, then the tests on this
	filesystem started to fail for no good reasons.

	This patch fixes this misbehaviour by disabling the
	permissions check in filesystem which do not support
	them.

	vdsm: prepareVolumePath payload misdetection fix
	The changeset http://gerrit.ovirt.org/#/c/22324/3
	used a condition too broad for its check, causing
	a device path misdetection when cloud-init is used.

	It is triggered in the following case:
	specParams vmPayload attribute has
	"file"(with content), path" non existent.
	Device's (drive's) "path" is set to ''.
	The code then consider the cdrom with vmPayload
	a case of empty CDROM and creating it as such.
	It did work before because the condition results
	false when there is no 'path' in drive['specParams']
	(which is the case here) and goes to the
	next condition section (the right one with payload handling)

	This patch provides a band-aid fix to the issue
	by tightening the prepareVolumePath check.

	Bug-Url: https://bugzilla.redhat.com/1047356

2014-01-03  Nir Soffer  <nsoffer@redhat.com>

	sourceRouteThread: Encapsulate inotify thread
	sourceRouteThread defined a main function for the inotify thread, but
	the thread was created and started from supervdsmServer main function.
	This couple these modules, expose module implementation details, and
	make both sourceRouteThread and supervdsmServer harder to understand and
	maintain.

	This patch move inotify thread creation boilerplate from supervdsmServer
	main function to a start function in sourceRouteThread module.  The
	inotify thread main function is private now, unlikely to be used from
	other modules by mistake.

	A nice side effect is shortening the too-big-and-growing try-block in
	supervdsmServer main.

	supervdsmServer: Run sourceRouteThread in a thread
	The current code was running the sourceRouteThread main function in the
	main thread instead of starting it in a thread. This probably leads to
	bogus message in the supervdsm log. Now the code is doing what it was
	trying to do.

2014-01-03  Antoni S. Puimedon  <asegurap@redhat.com>

	sourceRouteThread: log unhandled exceptions

2014-01-02  Maor Lipchuk  <mlipchuk@redhat.com>

	clientIF: Log unhandled exception for new Thread
	Adding a traceback log for unhandled exceptions, when openning a new thread, so
	it will not die silently.  Since the log in clientIF instance is inaccessible
	from the decorator, we use the default root logger.

2014-01-02  Mike Kolesnik  <mkolesni@redhat.com>

	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.

2013-12-31  Maor Lipchuk  <mlipchuk@redhat.com>

	libvirtconnection: Log unhandled exception for new Thread
	Adding a traceback log for unhandled exceptions when execute __run in EventLoop
	class so it will not die silently.

2013-12-30  Federico Simoncelli  <fsimonce@redhat.com>

	sp: remove a dangling _saveReconnectInformation
	A reordering of patches left a dangling _saveReconnectInformation in the
	StoragePool class. It should have been removed with:

	 6fd14dd sp: remove automatic storage pool reconnection

	sp: encapsulate spm status in StoragePool
	The scope of this patch is to group the spm status values and access
	them consistently in StoragePool and HSM.

2013-12-27  Federico Simoncelli  <fsimonce@redhat.com>

	sp: remove scsiKey from connectStoragePool

2013-12-27  Francesco Romani  <fromani@redhat.com>

	ksm: janitorial: with construct, file() to open()
	Summary: use open() and with wherever feasible.

	Details:
	- move from file() to open(), as the direct usage of file()
	  is deprecated:
	  http://docs.python.org/2/library/functions.html#file
	  http://docs.python.org/release/3.0/whatsnew/3.0.html#builtins
	- use the with construct wherever possible, with files and
	  threading.Locks
	  http://docs.python.org/2/library/threading.html#using-locks-conditions-and-semaphores-in-the-with-statement
	- factor the code which read the procfs entries in a couple
	  of helper functions, and a few tests for them.

	PatchSet V2:
	- moved tests into specific file ksmTests.py.
	- used more specific check assertGreater insted of generic assertTrue.

	PatchSet V3:
	- registered ksmTests.py in Makefiles
	- fix pep8 in ksmTests.py
	- in KsmMonitorThread.adjust there is no need to call running() with
	  lock held.

	PatchSet V4:
	- revert to assertTrue in tests, because more specific asserts require
	  python 2.7; EL6 is python 2.6.

	PatchSet V5:
	- keep the tests ordered.

2013-12-26  Assaf Muller  <amuller@redhat.com>

	Improved macspoof hook README following user request

	Unified net persistence upgrade: Change 'bridged' from str to bool
	'bridged' is defined as a bool in the VDSM API, although both
	a string and a bool seem to work.

2013-12-26  Dan Kenigsberg  <danken@redhat.com>

	setupNetworks: support networks with no underlying NIC
	The old addNetwork API supported the ability to create a bridged network
	that has no leg to the outer world. This capability was lost in the
	not-so-very-new setupNetworks API.

	If a user had a nicless network defined by addNetwork, and tried to
	upgrade to unified persistence, the upgrade script (which uses
	setupNetworks) would have failed.

2013-12-26  Nir Soffer  <nsoffer@redhat.com>

	hsm: Do not hide errors when checking device visibility
	When checking devices visibility, all errors from os.stat() are treated
	as "device does not exists", hiding fatal error and making it harder to
	debug and fix them.

	This patch handle only ENOENT for checking visibility and raise other
	errors we cannot handle.

	Relates-To: https://bugzilla.redhat.com/923773
	Bug-Url: https://bugzilla.redhat.com/1044068

	hsm: Check all devices visibility after multipath rescan
	After invoking multipath rescan, existing devices may disapper, and
	non-existing devices may appear. The orignal code was checking again
	only one device after a rescan, possibly returning bogus results.

	This patch check now all devices after invoking multipath.rescan().

	Relates-To: https://bugzilla.redhat.com/923773
	Bug-Url: https://bugzilla.redhat.com/1044068

	Revert "clientIF: rescan devices on failed hotplugDisk"
	Commit 15c7f74365cb5d2c9258bc333c441941c6e42bdb tried fix a case where
	device is not visible after hotplug. The solution included a call to
	multipath.rescan() if the device does not exists, and checking again if
	the device exists. However, due to sneaky bug in the fix, the code was
	never invoking multipath.rescan(), and was actually a Placebo.

	The original commit added an undocumented public method for scanning
	devices visibility. The method did not perform readability check, like
	getDevicesVisiblity; there is no documentation or other evidence why
	this solution was chosen.

	The original commit tried to improve the way devices are checked for
	visibility, checking if all devices exists after multipath.rescan().
	However this improvement was canceled because multipath.resacn() was
	never running.

	The original code was calling os.stat() once per device.  After the
	commit, we call os.path.exists() for all devices, and os.stat() for
	existing devices.  This additional calls are pointless and introduces a
	race, when a devices exist in the first call, and disappear in the
	second.  Since the commit remove the exception handling while calling
	os.stat(), getDevicesVisibility may fail now with OSError in this case.

	One successful change was improving logging in clientIF, but this should
	have never be committed with the rest of the changes.

	This is the first patch in series of patches fixing the regressions
	introduced by the original commit and adding the good changes.

	This reverts commit 15c7f74365cb5d2c9258bc333c441941c6e42bdb.

	Relates-To: https://bugzilla.redhat.com/923773
	Bug-Url: https://bugzilla.redhat.com/1044068

2013-12-25  Dan Kenigsberg  <danken@redhat.com>

	link monitor: do not leave stray `ip monitor` behind
	ipwrapper.Monitor.start() spawns an `ip monitor link` process that may
	run forever. If Vdsm crashes, we should take care to kill it, or it
	would leak.

	Due to this patch, ipwrapper.Monitor.start() should be called from an
	ever-lasting thread.

2013-12-25  Federico Simoncelli  <fsimonce@redhat.com>

	sp: remove unused recoveryMode from spmStart

	sp: remove unused scsiFencing parameter

2013-12-25  Francesco Romani  <fromani@redhat.com>

	tests: janitorial: cleanup temporary directories
	A few tests don't cleanup the temporary directories they created to run.
	A the end of the day, you can easily end up with tons of
	entries in /tmp.

	This patch ensures each testcase does its own cleanup, by using
	a new contextmanager to handle and clean automatically a
	temporary directory.

	Also, move away the test data handling from ifcfgConfigWriterTests's
	__init__/__del__ and move it into setUp and tearDown, to make the
	process more predicatable and robust.

2013-12-24  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix assert bug in testBrokenBridgelessNetReplacement
	If the underlying device is missing, vdsm will not report
	the network, but its config in vdsm is still there before
	the broken network is removed.

2013-12-24  Dan Kenigsberg  <danken@redhat.com>

	config: rename net_persistence
	'persistence' is a too-generic name for a configurable controlling the
	persistence method of network definitions. 'net_persistence' would be a
	more appropriate name. Let us rename this one quickly before anyone
	starts to use the current name.

2013-12-24  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netconf: Add dhcp support for iproute2 configurator
	This patch enables iproute2 configure ip address via dhcp.

	netconf: Add config option for network configurator
	After adding iproute2 configurator, we need a config option
	to indicate which configurator should be used to perform
	network configuration.

	Note that net_configurator=iproute2 is not yet fully functional. It
	lacks:
	- source routing
	- ipv6
	- Persisting and reporting the BOOTPROTO option

2013-12-23  Antoni S. Puimedon  <asegurap@redhat.com>

	link monitor: replace events() with optionally continuous iteration
	The way to use the monitor now is:
	- Iteration on a stopped monitor:

	    mon = Monitor()
	    mon.start()
	    mon.stop()
	    for event in mon:
	        do things with the event

	- Iteration on a running monitor:

	    mon = Monitor()
	    mon.start()
	    for event in mon:
	        do things with the event

	This is the first step towards having a thread that keeps netinfo
	updated by events.

2013-12-23  Federico Simoncelli  <fsimonce@redhat.com>

	sp: remove automatic storage pool reconnection
	On startup the storage pool directory (/rhev/data-center/<spUUID>)
	is removed by __cleanStorageRepository preventing the automatic
	reconnection (_connectStoragePool) from actually taking place.
	Since vdsm has been running for quite some time (years) without the
	automatic reconnection we can safely remove it.

2013-12-23  Martin Polednik  <mpoledni@redhat.com>

	vdsm: add logging to _getUnderlyingDriveInfo
	_getUnderlyingDriveInfo() currently logs nothing - due
	to unfrequent calls to this function, it might be good idea
	to add verbose logging that displays how the devices are
	matched in _devices and conf['devices']

2013-12-23  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: fix excessive process creation
	_detectType is a very very often used operation and it was relying
	executing the ethtool binary for its operation. That was so costly
	that we were forced to use memoization to minimize the impact.
	Unfortunately, that came with its own risks, as the memoization
	was name based and could eventually give wrong names or even more
	common, fail to detect that a device is no longer present in the
	system.

	python-ethtool has a method for getting this information but
	reports the IOErrors incorrectly (missing errnos). A patch has
	been submitted for it and when it is released across the OS
	versions we support we could drop this code.

2013-12-23  Federico Simoncelli  <fsimonce@redhat.com>

	sp: _refreshDomainLinks must not change the metadata
	Method _refreshDomainLinks is used on HSM hosts and it shouldn't change
	the pool metadata. In order to make sure that the domains are properly
	marked as regular we fix their role during startSpm and activateSD.

	In this patch:
	- add _updateDomainsRole to make sure that all the regular domains are
	  marked as regular (used at startSpm time)
	- mark domain as regular during activation

2013-12-23  Vitor de Lima  <vitor.lima@eldorado.org.br>

	vdsm: Handling topology for ppc64
	This change adds a method to extract the CPU topology information
	thourght the lscpu command. The current method for x86_64 hasn't
	been changed.

	This is done due to libvirt showing wrong information about ppc64
	topology (issues BZ 621546 and 751205), the lscpu command is being
	used to obtain it.

	The topology tests were changed to be executed in a mock
	architecture and new test cases were added to handle ppc64 methods.

2013-12-23  Federico Simoncelli  <fsimonce@redhat.com>

	sp: add setMasterDomain to StoragePool
	It turns out that getMasterDomain is used mostly as a setter for
	the masterDomain attribute. This patch makes it explicit renaming
	the method to setMasterDomain.

2013-12-23  Francesco Romani  <fromani@redhat.com>

	mkimage: create files with explicit permissions
	The files in the ISO image created with mkimage.mkIsoFs,
	most notably `user_data` and `meta_data.json`, will
	have world readable permissions.
	They contain sensitive data, so it is unsafe to do so.

	This patch addresses the issue by adding the capability to set
	per-file permissions at creation time in
	mkimage._decodeFilesIntoDir
	the current default is 0o640, so we just avoid to create any
	world-readable file at all.

	Another approach to obtain the same result could be to use
	the -file-mode option of the `genisoimage` program.

	Fixing the permissions directly into the python code has the following
	advantages:

	* we use the correct permissions right from the start, effectively
	  closing the vulnerability window; if we let genisoimage fix things,
	  there still is a (very short) time window on which the newly
	  created files are still world-readable.

	* this paves the road to fine-grained, per-file permissions
	  with negligibile extra cost (in short, this is more forward-compatible).

	However, we still need to change to behaviour of `genisoimage` because
	it now uses the `-r` option to smartly fix permissions and POSIX
	attributes in a meaningful way. Now we need to preserve verbatim the
	attributes. The biggest (only?) effect is that genisoimage
	no longer automatically fixes uid/gid of the content of the ISO image
	to 0/0, and preserves the creator process values.

	PatchSet V2:
	- removed defaults in _openFile: not needed.
	- more complete permissions test: check user and group permissions.

	Bug-Url: https://bugzilla.redhat.com/1034247

2013-12-20  Peter V. Saveliev  <peet@redhat.com>

	vdsm: migration progress: count memRemaining also
	Take into account that not only dataRemaining can grow, but memRemaining
	can it too. So, we should check both of them.

	+ make code slightly more readable.

2013-12-20  Martin Betak  <mbetak@redhat.com>

	vdsm: Add support for Guest Reboot
	Added optional parameter reboot to shutdown in vdsm and vdsClient.
	This parameter represents whether the user wants to reboot the VM
	(reboot=True) or just a regular shutdown (reboot=False). To keep
	backwards compatibility, the default is False.

	Current implementation only utilizes the guest agent for reboot and does
	nothing in its absence. The semantics of existing shutdown should be
	unchanged by this patch.

	Note that older versions of GA don't support the reboot flag and
	consqeuently will issue a shutdown instead of reboot.

2013-12-20  Antoni S. Puimedon  <asegurap@redhat.com>

	sriov: stop virtual functions from being reported as nics
	Previously we were reporting SR-IOV Virtual functions a regular nics.
	This was misleading and was counter productive when wanting to use
	a hook for attaching (or passing through) a VF as a vNIC to a VM.

	This patch implements the first part, "Filter out unused virtual functions from
	being reported as nics." of:
	http://www.ovirt.org/Features/UCS_Integration

	link monitor: Reuse Link parsing
	'ip -d -o link show' and 'ip monitor link' lines share most of the
	format. The main difference is that the latter has the special
	deleted lines.

	This patch makes the monitor parser worry only about the specific
	monitor bits ('deleted') and reuse the logic iproute2 link entry
	parsing.

	linkmonitor: fix reported device name of vlans and macvlans
	Previously, vlans and macvlans would get the event name reported as:
	- 'foo@bar', where bar is the device the foo macvlan sits on.
	- 'bond777.555@bond777', where bond777 is the device the 555 vlan
	  sits on.

	After this fix, both devices would be properly reported as:
	- foo
	- bond777.555

	Since we use the ifindex, we'll add it to the event.

2013-12-20  Francesco Romani  <fromani@redhat.com>

	tests: janitorial: factor named temp file creation
	A common pattern in the testsuite is to create a named
	temporary entry in the filesystem, optionally filled
	with test data and, less commonly,  with adjusted permissions.

	This patch refactor this behaviour in an handy context manager,
	named temporaryPath, which also ensures entries are deleted when
	no longer needed.

	It is worth to point out that the usage of this context manager
	can be at least partially replaced with tempfile.NamedTemporyPath;
	If it's the case, this will be addressed in a future patch.

	PatchSet V2:
	- fix rebasing

	PatchSet V3:
	- always cleanup the temporary path, even in presence of exceptions.

2013-12-19  Antoni S. Puimedon  <asegurap@redhat.com>

	vmfex: fix vdsm.spec.in error
	I was fixing http://gerrit.ovirt.org/#/c/22529/10 on a host and
	verifying there. I decided that for one word ammend I could copy
	it by hand and I managed to "fat-finger" it. May the typo machines
	that are my hands get urticaria.

	vmfex: Add vmfex device custom properties hook
	The current vmfex hook works at the VM level which creates some
	usability issues. This new hook makes it easier for the
	administrator to map a vNIC to a VM-FEX port by just making him
	specify a custom device property called 'vmfex' that has the
	Port Profile as content.

	This is half of the implementation of level IV of:
	http://www.ovirt.org/Features/UCS_Integration

	The other half to follow up in another patch is to filter out the
	Virtual Functions from the nics report in netinfo.nics()

	ipwrapper: workaround for ip -o link bug with intel sriov
	There is currently an iproute bug ( https://bugzilla.redhat.com/1045032 )
	when reporting intel SR-IOV capable devices that makes the report be:

	    [root@dell-r210ii-07 ~]# ip -o l
	    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN \    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
	    2: p1p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000\    link/ether 90:e2:ba:04:29:88 brd ff:ff:ff:ff:ff:ff
	        vf 0 MAC d2:e9:dd:53:3d:a5
	        vf 1 MAC aa:f7:de:38:1c:f9
	        vf 2 MAC 22:44:45:db:ff:8a
	        vf 3 MAC a2:59:8d:b9:17:30
	        vf 4 MAC 4a:d8:39:86:38:d5
	        vf 5 MAC 6e:4e:cc:21:74:7f
	        vf 6 MAC d6:75:14:15:1d:8b
	    3: p1p2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000\    link/ether 90:e2:ba:04:29:89 brd ff:ff:ff:ff:ff:ff
	        vf 0 MAC 66:0c:f8:af:e4:bb
	        vf 1 MAC 2e:4e:a5:99:c1:33
	        vf 2 MAC 46:ff:0f:cc:8e:a5
	        vf 3 MAC e6:b6:67:e6:54:7d
	        vf 4 MAC 16:fb:b0:a2:c7:55
	        vf 5 MAC 16:58:73:bd:15:8f
	        vf 6 MAC ce:d1:fe:b9:5d:cb
	    4: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000\    link/ether d0:67:e5:f0:82:44 brd ff:ff:ff:ff:ff:ff

	As seen above, instead of showing the vf extra information in the same line
	escaping with '\', it prints extra lines.

2013-12-19  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: refresh pool connection on connectStoragePool
	This patch ensures that connectStoragePool would trigger a refresh
	when the host is already connected to the same pool.
	Using connectStoragePool instead of refreshStoragePool is at the base
	of the storage pool metadata removal but it also solves an existing
	problem in the non-operational recovery flow where the engine sends
	a connectStoragePool request.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1026697

2013-12-19  huntxu  <mhuntxu@gmail.com>

	fileSD: Fix image deletion on gluster domain
	getImagePath() does not work for glusterSD. The problem is caused by
	that domaindir's base paths of glusterSD and other file-based SD are not
	the same. For glusterSD, it's sd.storage_repository/mnt/glusterSD,
	while it's sd.storage_repository/mnt/ for other file-based storage
	domains. This makes the deletion fail on gluster domain.

	With this patch we use the storage domain's domaindir to get the image's
	directory correctly.

	Reference:
	  * http://lists.ovirt.org/pipermail/users/2013-December/018653.html

2013-12-19  Yeela Kaplan  <ykaplan@redhat.com>

	vm: Update domains list for disks attached to vm after LSM
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036680

2013-12-19  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Add iproute2 configurator
	This patch adds a new host network configurator based on iproute2.
	We could just reuse the ifcfg's configurator totally and add a new
	ConfigWriter based on iproute2. But it turns out this approach is
	not very suitable to the iprtoute2 model. The ifcfg configurator
	depends on the behavior of ifup/ifdown, so it imposes some
	unnecessary restriction on the new ConfigWriter.  So this patch
	chooses to add a new configurator and reuse some code of ifcfg
	configurator. In future, we could move those common code to a base
	class after refactoring ifcfg configurator.

	This patch dosen't include the support for dhcp and ipv6, which
	will be added in following patches.

2013-12-18  Dan Kenigsberg  <danken@redhat.com>

	netinfo.getRouteDeviceTo: return a device name
	As of commit 1a825c79, netinfo.getRouteTo() returned a Route object if
	it had found one, and the empty string on various error conditions.
	That's a bad practice, and makes BindingXMLRPC code explode with an
	AttributeError when it tries to compute route.device.

	This patch renames the function to getRouteDeviceTo() and makes it
	return routing device name (or empty string) as needed by
	BindingXMLRPC.getServerInfo.

2013-12-18  Saggi Mizrahi  <smizrahi@redhat.com>

	threadpool: Move iteration logic to it's own method
	By moving it to a method you use python's natural scoping rules and
	enforce that even in the future iteration local variables don't leak
	out.

2013-12-18  Assaf Muller  <amuller@redhat.com>

	upgrade.log now owned by vdsm:kvm
	Bug:
	If the admin installs VDSM, but before VDSM's first run
	manually calls vdsm-tool (As root) then /var/log/vdsm/upgrade.log
	is created with root:root file privileges. However, if vdsm-tool
	is not manually used before VDSM's first run then upgrades
	will be ran under the vdsm user, so /var/log/vdsm/upgrade.log
	will be created with vdsm:kvm privileges.

	Fix:
	* Create upgrade.log in only one place by separating it out to
	  a new logging conf file
	* Make sure that upgrade.log is owned by vdsm:kvm when it is created

2013-12-18  Federico Simoncelli  <fsimonce@redhat.com>

	sp: specific method to validate the master version
	The validation of the master domain version must be abstracted as
	it relies on directly accessing the pool metadata.

	In this patch:
	- remove (the barely unused) validatePoolMVerHigher
	- add a specific method in charge to validate the master version on
	  a specific domain (validateMasterDomainVersion)

2013-12-17  Vitor de Lima  <vitor.lima@eldorado.org.br>

	vdsm: Report fake capabilities
	This patch introduces a 'fake KVM on PPC64' mode, adding
	a configuration parameter indicating to VDSM if it must report fake
	capabilities, so a x86_64 host could be used to validate PPC64-specific
	code.

2013-12-17  Federico Simoncelli  <fsimonce@redhat.com>

	sp: avoid masking uuid in StoragePool methods
	For some unknown reason during an unrelated refactoring these methods
	began to trigger pep8 errors related to the uuid variable masking the
	module with the same name.

2013-12-15  Dan Kenigsberg  <danken@redhat.com>

	hook: extnet: attach a vNIC to a libvirt network defined outside oVirt
	This patch adds a hook which allows to connect a vNIC to a libvirt
	network that is managed outside of oVirt. To use this hook, you should
	first define and activate such a network, as documented in
	http://libvirt.org/formatnetwork.html, on each host where the hook is
	deployed.

	For example, to use an openvswitch bridge, first virsh net-define
	    <network>
	      <name>ovs-net</name>
	      <forward mode='bridge'/>
	      <bridge name='ovsbr0'/>
	      <virtualport type='openvswitch'/>
	    </network>

	This preperation was not required in a previous version for the hook
	(named forcebridge). However, this version allows to benefit of
	non-bridged libvirt networks, too.

2013-12-15  Jiri Moskovcak  <jmoskovc@redhat.com>

	Changed BrokerLink log level to prevent log flooding
	- vdsm imports the BrokerLink lib with ovirt_hosted_engine_ha,
	  unfortunatelly it's logger generates a lot of debug output
	  in the default configuration, so this patch sets the level
	  of the whole ovirt_hosted_engine_ha package to ERROR
	  to limit the amount of the logs

	- NOTE: this patch needs some changes in the ovirt_hosted_engine_ha
	  logging, without these changes it does not have any
	  effect

	Depends-On: I40fb7aca813800dd445e858406034736817cac9c
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1040884

2013-12-13  Antoni S. Puimedon  <asegurap@redhat.com>

	configNetwork: Fix bridgeless broken network deletion
	When trying to delete a broken bridgeless vdsm network, if the iface
	referenced by the network definition was missing, delNetwork would
	not get any device on its call for vlan, nic and bonds, but
	objectivize would be called nonetheless, failing with a:

	ERR_BAD_PARAMS: 'Network defined without devices.'

	The fix consists on just removing the network from libvirt when the
	backing device is missing.

	Bug-Url: https://bugzilla.redhat.com/1020356

2013-12-13  Nir Soffer  <nsoffer@redhat.com>

	libvirtconnection: Do not start event loop on import
	Starting a thread on import is very bad idea. This patch fix that by
	adding start_event_loop() function and makes the event loop class
	private and more robust.

2013-12-12  Antoni S. Puimedon  <asegurap@redhat.com>

	sourcerouting: make thread daemonic
	The Python interpreter waits for non daemonic threads. The
	sourceRouteThread shouldn't keep the process waiting.

2013-12-12  Dan Kenigsberg  <danken@redhat.com>

	janitorial: drop stray refs to storage.misc.execCmd
	storage.misc.execCmd was moved to vdsm.utils quite long ago. Drop
	references from outside the storage subdir to the old location.
	Further references (from within storage) should be dropped in a future
	patch.

	janitorial: drop remaining betterPopen references
	betterPopen has been named cpopen long ago, and was spun off to an
	independent package. This patch clears the remaining references to the
	old vague name.

2013-12-12  Francesco Romani  <fromani@redhat.com>

	utils: janitorial: refactor utils.readMemInfo
	minor cleanup in readMemInfo:
	- split the actual parsing logic in a separate function;
	- modernized readMemInfo, switching from file() to with/open().
	- added a couple of unit tests to be sure everything still works.

	PatchSet V2:
	address the comments about V1:
	- parseMemInfo is now _parseMemInfo, as it is not expected to be
	  used outside the utils.py (and its tests)
	- use os.path.dirname() to find the test data

	PatchSet V3:
	- registered mem_info.out as test data.

	PatchSet V4:
	- register mem_info.out in vdsm.spec.in and in the debian install file.

	PatchSet V5:
	- drop stray blank line.

2013-12-11  Saggi Mizrahi  <smizrahi@redhat.com>

	syncproc: Add blocking mode.
	By setting `proc.blocking = True` it will make reading and writing move
	to blocking mode.

	This is useful when you don't want read operations to return when no
	data is available but instead wait for it.

	asyncproc: Return None when no data could be read
	According to http://docs.python.org/2/library/io.html#io.RawIOBase
	we need to return None when a non-blocking call couldn't produce any
	data and not an empty strings.

	Originally we returned an empty string and that confuses other IO
	subsystems in python which assume this behaviour is correct.

	asyncproc: Removed the close count.
	When I originally wrote the class I assumed that since the process side
	FD is closed I should mark it closed on VDSMs side as well.

	This appeared to be problematic as stuff in the python infrastructure
	don't like it when I autoclose the FD for them.

	I partially solved it by adding the close counter so that things don't
	crash because they don't expect the FD to get closed while they are
	reading even if they got EOF.

	But since closing the FD doesn't really need to be reflected in the
	stream I now decided it's better to just leave it marked as open in the
	stream wrapper. The real FD is managed by AsyncProc so there is no worry
	about an FD leak.

	I just remove the close count buffer and never mark the FD as closed an
	leave it up to the user. We loose the ability to detect a stream closing
	without waiting for an empty string but that is how python wants you to
	do it and this is how we will.

2013-12-11  Martin Polednik  <mpoledni@redhat.com>

	vdsm: prepareVolumePath correct path handling for cdrom
	prepareVolumePath looked for 'path' key in specParams
	without looking at path in device itself, causing empty
	path in specParams to override device path. This patch
	adds device.path to checking mechanism to avoid overriding
	valid path

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1009469

2013-12-11  Antoni S. Puimedon  <asegurap@redhat.com>

	netconf: provide a default rollback for configurators
	This patch adds a default rollback method that configurators are
	free to override as long as they keep the contract in the docstring
	of the vdsm/netconf/__init__.py:rollback method, i.e., return None
	(even implicitly, not returning anything) when there is no need for
	rollback at tha API.py level. If there is something to rollback,
	return it in a Config object.

	The Ifcfg configurator, being on its way to deprecation is supposed
	to keep its current memory rollback, so we can keep its overriding
	method. The iproute2 configurator won't need to declare it.

	netconfpersistence: add diffing method to Config
	This patch makes it easy to diff two network configurations
	in a way that gives you a resulting Config object that can
	be used for a setupNetworks operation.

	If the current configuration is B and we want to put the
	system in state A, we'd do:

	    diff = A.diffFrom(B)
	    setupNetwork(diff.networks, diff.bonds, {})

	netconf: define rollback contract at internal API
	This patch defines the contract Configurator rollback methods must
	implement to be compliant:

	1. Rollback what they deem necessary by themselves.
	2. Return whatever networks and bonds they did not roll back (a diff
	   between the current state and the last known runningconfig) as
	   a netconfpersistence.Config object. If they rolled back everything
	   return None (for non unified persistence configurators) or and
	   empty config object.

	The configurator context manager will raise a RollbackIncomplete
	exception if there are nets and/or bonds remaining to be rolled
	back. That will be bubbled up to the API module that will invoke
	an inRollback setupNetworks to finish the roll back.

2013-12-11  ndarshan  <dnarayan@redhat.com>

	gluster: raise suitable exception based on errno for peerDetach
	Raising suitable exception based on the errno given by gluster
	cli output for verb peerDetach.

2013-12-10  Dan Kenigsberg  <danken@redhat.com>

	sampling: take storageDomains directly from storage subsys
	HostStatsThread does not poll storageDomains statistics, but still it is
	used to relay them from the storage subsystem to the getVdsStats api.
	This is cumbersome and confusing. This patch eliminates the need to pass
	a clientIF reference to the HostStatsThread, and keeps the knowledge of
	which statistic elements are provided (code, delay, lastCheck, etc)
	with the storage subsystem.

2013-12-10  Antoni S. Puimedon  <asegurap@redhat.com>

	specfile: Add dosfstools and psmisc as build required dep
	Running a new F20 minimal install I installed all build reqs and saw
	that the 'make rpm' step failed due to missing psmisc's fuser and
	dosfstools mkfs.msdos.

2013-12-10  Vitor de Lima  <vitor.lima@eldorado.org.br>

	Adding ppc64 handling to getVdsCaps
	This introduces a parser capable of interpreting the /proc/cpuinfo
	present in IBM POWER hosts. It also retrieves the possible emulated
	machines for QEMU guests. The POWER 7 processors are not compatible
	between themselves so only the host CPU is reported as compatible
	in the _getCompatibleCpuModels() function.

	vdsm: Hardware information about POWER hosts
	This introduces information about the hardware of IBM POWER hosts.
	In these machines the dmidecode cannot be used.

	This patch also creates a module used by functions that need to
	retrieve information about PPC64 hosts. It includes a function to
	get hardware platform information about the host.

2013-12-10  Antoni S. Puimedon  <asegurap@redhat.com>

	QoS: make report only when present and say so in the schema
	Libvirt XML format specifies that bandwidth elements (inbound and
	outbound) are only optionally present. When present they should
	have an average and optionally have the fields 'burst' and 'peak'.

	While this was correctly defined in the vdsm api schema for input
	(setupNetworks for instance), it was not defined for the capabilities
	reporting. That left a not well defined situation where no QoS was
	defined and it was being included in the report without following
	the specification in the paragraph above.

	This patch fixes this inconsistency by reporting the bandwidth
	elements only when present in the network definition, and only
	containing those fields that are defined for them.

2013-12-10  Saggi Mizrahi  <smizrahi@redhat.com>

	sampling: make HostStatsThread a daemon thread
	It can cause VDSM to hang when being improperly shut down.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022036

2013-12-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	sanlock isconfigured raises an exception instead of returning result
	isconfigured calls expect boolean as return value. Exception should be
	raised only on critical failures such as sanlock service isn't installed,
	or sanlock group does not exist.

2013-12-09  Dan Kenigsberg  <danken@redhat.com>

	Introduce caps.isOvirtNode()

2013-12-09  Antoni S. Puimedon  <asegurap@redhat.com>

	rpm_spec: Add ethtool as a requirement
	The new ipwrapper link type detection depends on the ethtool binary
	that is commonly installed by default but not on minimal
	installations. This patch ensures that it is not missing.

2013-12-09  Dan Kenigsberg  <danken@redhat.com>

	lvm.env: move to /usr/share/vdsm/storage
	lvm.env is a tiny helper script, intended to make it a bit easier to
	debug Vdsm-controlled lvm state. It is being created whenever the lvm
	module is loaded, which generates an annoying warning message in unit
	test.

	This patch makes lvm.env ship statically with vdsm. It can be used by

	    . /usr/share/vdsm/storage/lvm.env

2013-12-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing hack for stopping libvirt-guests as conflict service
	Due to recent fix in libvirt, libvirt-guests daemon now returns right
	error code when checking its status. Thanks to that we can treat
	libvirt-guests as all other daemons.

2013-12-09  Alexey Shabalin  <a.shabalin@gmail.com>

	use defined options from configure

2013-12-09  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Rename confusing lastCheck variable
	In repoStats we use the "lastCheck" value as the time since domain
	status was checked. In DomainMonitorStatus we use "lastCheck" value as
	the time were domain was checked.  This patch eliminates the confusion
	by using "checkTime" for the time where status was checked.

	domainMonitor: Separate change detection from lastCheck value
	Since commit 45f3037ca1e, lastCheck value is initialized to special
	NOT_CHECKED_YET value, and used for detecting the first monitor status change.
	This change caused repoStats to return high lastCheck value until the first
	monitor check is done, causing host activation to fail, and host becoming
	non-operational.

	Previously, lastCheck value was initialized to monitor thread creation time,
	and repoStats was returning valid lastCheck value even before the first domain
	check was finished. While somewhat incorrect, this behavior is required for
	engine monitoring logic.

	This patch restore the previous lastCheck semantics and use a new
	firstChange flag for detecting the first status change.

	Relates-To: https://bugzilla.redhat.com/1003588

	threadPool: Do not keep reference to tasks
	Worker thread was taking a task from the threadpool queue, run it, and
	then hold it until the next task is run. This causes the task and all
	objects referenced from it to keep living until the next task is run by
	this thread.

	This patch ensure that worker thread does not keep referece to tasks
	after they were run.

	Relates-To: https://bugzilla.redhat.com/1032925

2013-12-08  Nir Soffer  <nsoffer@redhat.com>

	vm: Refix vm unpausing during recovery
	Commit 45f3037ca1 should have fixed vm unpausing during recovery, but it
	did not because of unfortunate cherry-pick.  The original patch was
	initializing vm sdIds list when running a vm in recovery mode. This code
	path was removed in commit 93d09f6567 which was merged on the same day.

	This patch adds back the missing code path and remove leftover comment
	about recovery mode.

	Relates-To: http://gerrit.ovirt.org/21649/
	Bug-Url: https://bugzilla.redhat.com/1036358

2013-12-07  Nir Soffer  <nsoffer@redhat.com>

	sp: Fix stopping domain monitors
	Commit 2671777c69 fixed stopping of domain monitors by stopping monitors from
	StoragePool.__del__. This was a dangerous fix because a stray reference to the
	pool may delay invocation of __del__ until the referring object is deleted,
	delaying stopping of domain monitors for unlimited time. In case of a memory
	leak, the pool may never be deleted and domain monitors would never stop.

	Fortunately, this fix did seem to work for couple of years, until commit
	7b1cc6a20f made the domain monitor pool independent. Instead of one domain
	monitor object per pool, there is now a single shared domain monitor object
	used by all pool objects. Having a shared domain monitor, the pool __del__
	method became deadly.

	Shortly after commit 7b1cc6a20f was merged, a new random error appeared in CI
	jobs, where there is no storage space left, while storage has plenty of space.
	The root cause of the error was anonymous thread running at unexpected times
	and stopping silently all domain monitors.  Adding some logging revealed that
	this thread was started from StoragePool.__del__ method. This thread was
	running 14 minutes after the original pool was disconnected, stopping domain
	monitors used by the current pool object. It seems that a task was holding a
	reference to the old pool, and when the task was finished, the old pool was
	finally destroyed.

	We seem to stop monitoring when we should, and stopping monitoring in
	the __del__ method is redundant.  This patch removes the deadly method.

	Relates-To: https://bugzilla.redhat.com/705058
	Relates-To: http://gerrit.ovirt.org/19762
	Bug-Url: https://bugzilla.redhat.com/1032925

2013-12-06  Amador Pahim  <apahim@redhat.com>

	vdsm hooks: Add missing "snapshot=no" attribute to "disk" elements.
	Missing snapshot="no" attribute is leading live snapshot to fail.
	This patch adds snapshot="no" attribute to vdsm hooks adding disks.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1036111

2013-12-06  Antoni S. Puimedon  <asegurap@redhat.com>

	ip monitor: replace pairwise with grouper
	pairwise takes an iterator or elements '123456789' and generates an
	iterator that gives: ('1', '2'), ('2', '3'), ('3', '4'), ('4', '5')...

	grouper takes an iterator or elements '123456789' and generates an
	iterator that gives: [('1', '2'), ('3', '4'), ('5', '6'), ('7', '8'), ('9',
	None)]

	Since the data to parse from iproute2 commands is structured closer
	to grouper, change to that.

2013-12-06  Francesco Romani  <fromani@redhat.com>

	vm: janitorial: replace file() with open()
	As per docs, open() is preferred to file():
	http://docs.python.org/2/library/functions.html#file

	moreover, file() was removed in python3:
	http://docs.python.org/release/3.0/whatsnew/3.0.html#builtins

2013-12-05  Antoni S. Puimedon  <asegurap@redhat.com>

	netconf: privatize inRollback
	inRollback is not part of the external setupNetworks api. Thus, it
	is wise to be coherent and prefix it with '_'.

	netconf: Make vdsm-restore-net-config use _inRollback
	The setup networks operations performed by vdsm-restore-net-config
	are by nature rollback operations. They are split into two steps,
	- removal of the nets.
	- configuration of the persisted network config.

	Each of the preceding actions has a different rollback context,
	making a possible memory rollback (if _inRollback was not used)
	rather fruitless, specially when booting up when there is nothing
	to roll back to. It is better that the operations are set as
	not elegible for rollback.

2013-12-05  Greg Padgett  <gpadgett@redhat.com>

	vm: Fix exception when shutdown() called on vm in 'Down' state
	Attempting to call the shutdown() method on a VM which is in 'Down'
	state resulted in an exception if called through xmlrpclib.  Instead,
	adopt the convention used by similar APIs such as migrate() and return
	errCode['noVM'].

	Bug-Url: https://bugzilla.redhat.com/1027297

2013-12-03  Vladimir Tananko  <bs@artcon.ru>

	deployUtil: expect integer vlan id from new netinfo
	Commit 8b2bbe6e5 changed netinfo.getVlanID() to return the vlan id as an
	integer, istead of a string. This makes a lot of sense, but breaks
	compatibility with ancient deployUtil code.

	Bug-Url: https://bugzilla.redhat.com/1037277

2013-12-03  Dan Kenigsberg  <danken@redhat.com>

	tests: declate alignmentScanTests as broken
	More often then not,

	    alignmentScanTests.AlignmentScanTests.test_aligned_image
	    alignmentScanTests.AlignmentScanTests.test_unaligned_image

	fail on our Jenkins slaves with the message

	    libguestfs: error: could not connect to libvirt (URI = NULL): Failed to connect socket to '/run/user/1001/libvirt/libvirt-sock': Permission denied [code=38 domain=7]

	Mark them as broken until we understand the issue better.

	Quarantine ovirt-3.0.0 network upgrade
	Since ovirt-3.0.z, Vdsm uses libvirt networks (with names vdsm-*) to store
	its own networks. Older Vdsms did not have those defined, and used only
	Linux bridges. _syncLibvirtNetworks created a vdsm-bla network for every
	bridge named bla, even if that bridge had nothing to do with ovirt.

	This patch replaces _syncLibvirtNetworks with an upgrade that does
	this conversion on the rare occasion that upgrade is needed. It
	identifies this occasion by the existence of ovirtmgmt bridge
	and nonexistence of a vdsm-ovirtmgmt network.

	Moving the code to a separate upgrade would make it easier to get rid of
	it once ovirt-3.0.0 hosts are no longer supported.

2013-12-03  Mooli Tayer  <mtayer@redhat.com>

	Remove verbosity from restorecon hack for /var/log/core.
	vebosity spams consoel during installation.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031109

2013-12-03  Martin Polednik  <mpoledni@redhat.com>

	vdsm: add support for virtio-rng devices
	This patch adds support for virtio-rng device, allowing
	passthrough of /dev/random and /dev/hwrng. getVdsCapabilities
	additionally returns rngSources, a list of host's available
	entropy sources.

2013-12-03  Assaf Muller  <amuller@redhat.com>

	Unified network persistence [4.2/4.*] - Upgrade updates running conf
	Adds a pre-start task that calls:
	vdsm-tool upgrade-to-unified-persistence

	The upgrade gathers networking information and updates the running
	config of the unified network persistence. Networking persistence
	currently uses ifcfg files and after the upgrade will use the
	new model. An explanation of how the new persistence model works can
	be found at:
	http://www.ovirt.org/Feature/NetworkReloaded#Unified_persistence

	Unified network persistence [4.1/4.*] - Upgrade mechanism
	Unified network persistence feature:
	http://www.ovirt.org/Feature/NetworkReloaded#Unified_persistence

	This patch is the first of two patches that implement an upgrade
	that is run the first time VDSM that uses unified network
	persistence is started. The goal is to look at the current
	host networking configuration and populate the running
	and persistent configurations.

2013-12-02  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Improve logging
	We have logs in domain monitor thread, and we can see when a monitor
	starts or stops, but we don't have any info which thread triggered the
	operation.  This patch adds info level log messages when starting and
	stopping domain monitoring, revealing the caller thread.

	Relates-To: https://bugzilla.redhat.com/1032925

2013-12-02  Assaf Muller  <amuller@redhat.com>

	Added netinfoTests:testGetEmpty
	The new test should prevent the regression introduced in:
	http://gerrit.ovirt.org/#/c/21652/

	And fixed in:
	http://gerrit.ovirt.org/#/c/21850/

2013-12-02  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: Fix use of getConfDevices
	getConfDevices was merged into buildConfDevices in
	commit Ifd3a209967f97a55fe861c4446e8f93e1a1da08e

2013-12-02  Petr Sebek  <psebek@redhat.com>

	bugfix: UpdateVmDevice QoS
	QoS was not handled in method Vm._updateInterfaceDevice.

	Inbound/outbound is kept in current state if related parameter is missing in
	specParams. It is deleted if it is in specParams but empty ({'inbound':{}}).

	Bug-Url: https://bugzilla.redhat.com/1002300

2013-11-30  Antoni S. Puimedon  <asegurap@redhat.com>

	netconf: drop rollback to last persisted if mem rollback fails
	When memory rollback fails it is likely to be due to a malfunction
	or a state that we probably can't handle. The previous behavior was
	to let that on the hands of the oVirt fencing. This patch restores
	the known and expected behavior.

2013-11-29  Nir Soffer  <nsoffer@redhat.com>

	domainMonitor: Log unhandled exceptions in domain monitor thread
	DomainMonitorThread does not handle exceptions in the thread main
	function, making it harder to modify the code or understanding
	unexpected failures in the field.

	The patch log unhandled exceptions so it will never die silently.

	Relates-To: https://bugzilla.redhat.com/1034741

	hsm: Log unhandled exceptions in storage refresh thread
	hsm's storage refresh background thread does not handle exceptions,
	making it harder then it should to debug stupid errors in underlying
	calls or debug real errors in the field.

	This patch log a traceback for unhandled exceptions so it will never die
	silently again.

	utils: Add unhandled exceptions logging decorator
	We have at least two places where exceptions in thread main function are
	not handled, making debugging such threads impossible. This patch adds a
	new decorator that make it easy to log tracebacks for unhandled
	exceptions.

	The recommended use case is to decorate a thread main function. This
	ensure that we get a traceback for any error in the thread, including
	errors in error handling code. This should be used on all in threads in
	the system.

	Note that the decorator only adds logging - it does not change the
	program flow.  The unhandled exception is raise again so you can safely
	use it on script main function, without changing the exit code. Do not
	try to use this for ignoring exceptions.

	See utilsTests for example usage.

	Relates-To: https://bugzilla.redhat.com/1034741

2013-11-29  Dan Kenigsberg  <danken@redhat.com>

	tests/functional/virt: drop testInitramfsReadable
	testInitramfsReadable fails when the test framework creates its own
	initramfs image, instead of using the host's. Such condition is
	unfavorable, since it wastes time and may cause failures to boot the
	guest, but it is not a failure per se.

	storage: drop an unused configurable sd_validate_timeout

	vm: drop unused MigrationSourceThreadClass abstraction
	Since the libvirtvm.py merger into vm.py (commit ee082b87), we have only
	one MigrationSourceThreadClass. Thus, there is no need for this
	abstraction.

2013-11-28  Dan Kenigsberg  <danken@redhat.com>

	fix selinux dependency
	Fix a typo in the release field, introduced by commit 68d44c613.

2013-11-28  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: fix defaultdict regression
	netinfo.get is supposed to retun a map containing the keys:
	- bondings
	- bridges
	- networks
	- nics
	- vlans

	The change http://gerrit.ovirt.org/#/c/21652/5/lib/vdsm/netinfo.py
	replaced the dictionary initialization to 'networks': {} (and
	assignment of the other keys to a dict that could be empty) with a
	defaultdict.

	Unfortunately since not always are there gonna be elements for each
	of the keys that get() is supposed to return, get() could end up
	reporting only 'nics', creating all sorts of havoc in caps.py and
	any get() consumer. (It failed the unit tests on machines without
	vdsm networks defined).

2013-11-28  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: conditional for hostname require
	Fedora rawhide (F21) build is failing because cannot locate /bin/hostname.
	It has changed to /usr/bin/hostname as changelog from hostname 3.14-2.

	Koji info:
	http://koji.fedoraproject.org/koji/buildinfo?buildID=471302

	vdsm.spec: conditional to execute semanage
	To avoid load policy when selinux is disabled, only
	execute semanage when selinux is enabled.

2013-11-28  Assaf Muller  <amuller@redhat.com>

	Report device to engine in a new fashion
	Previously we were using the source IP of the socket to the engine
	and trying to extract the device out of that.

	The new approach is to simulate routing to the engine and get
	the device used to forward packets to the engine.

2013-11-28  Timothy Asir  <tjeyasin@redhat.com>

	gluster: Add force option to add brick command
	Allows option to glusterfs to create brick directries
	under root partition.

2013-11-28  Antoni S. Puimedon  <asegurap@redhat.com>

	netconf: Add limit to rollback for recursive configurator
	This is the first patch of a series that is intended to provide
	a default configurator memory rollback implementation and define
	the contracts of the rollback operation. To do that, first it is
	necessary to define a difference between a regular setupNetworks
	operation and one performed with the purpose of rolling back.

	If a configurator implemented the rollback operation via calling
	setupNetworks, we would potentially end up recursing until it
	succeeded (and we have no guarantee for success).

	This patch adds a parameter to the configurator constructor and
	the setupNetworks options that allows the configurator to pass
	to setupNetworks inRollback=True when it uses it for rollback
	purposes.

2013-11-28  Martin Betak  <mbetak@redhat.com>

	utils: Introduce CallbackChain
	Added new utility class encapsulating the pattern
	of invoking multiple alternative methods to achieve
	given task.

2013-11-28  Assaf Muller  <amuller@redhat.com>

	Made ipwrapper.py:Route class more robust
	Route can now parse routes of the form:
	'local 127.0.0.1 dev lo  src 127.0.0.1'

	Added lib/vdsm/utils.py:touchFile

2013-11-27  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding debian folder makefile

2013-11-26  Nir Soffer  <nsoffer@redhat.com>

	vm: Fix vm unpausing during recovery
	Domain monitor thread was not reporting when going from unknown state to
	known state. The thread would start with a bogus valid state, before
	checking the domain. If the first domain check found the domain as
	valid, no notification was emitted. If there were paused vms while
	connecting to the pool, they were not unpaused as they should.

	This patch fix various modules:

	- Domain monitor status lastCheck is initialized now to special
	  NOT_CHECKED_YET value. The monitor thread use this value to detect the
	  first sample, and emit the missing notification.

	- To get the new event when monitor thread starts, domain state change
	  are registered now *before* the monitor threads are started.

	- To get the vm unpause code to work in recovery mode, the Vm.sdIds is
	  initialized in Vm._run. This probably fixes other issues with
	  recovered vms.

	Bug-Url: https://bugzilla.redhat.com/1003588

2013-11-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Disable exception on after hooks failures
	Adding to all after hooks - raiseError=False

2013-11-26  Martin Sivak  <msivak@redhat.com>

	Reorder limit checks in grow quest
	balloon_min is a computed value that can (and will) go over
	balloon_max. When the controller tries to use it VDSM reports
	exception.

	Reorder the checks so the balloon_max constant check is the latest
	one to limit the value.

2013-11-26  Assaf Muller  <amuller@redhat.com>

	Prettify/simplify netinfo.py:get()
	get() now iterates over the links once instead of 4 times.

2013-11-26  Martin Polednik  <mpoledni@redhat.com>

	vdsm: refactor buildConfDevices and getConfDevices into single function
	Removes code duplication while flow should remain the same
	- also removes getConfSmartcard call in buildConfDevices as this
	call is obsolete (smartcard was introduced later and is therefore not
	needed for backwards compatibility)

2013-11-25  Vinzenz Feenstra  <vfeenstr@gmail.com>

	vdsm: pre-defined range for spice/vnc ports
	Libvirt's default port range 5900-65535 which is out of VDSM's
	documented range 5634 to 6166. But since the medieval time we
	already use libvirt's default. We'll define the new range as
	5900-6923 (1024 ports) So:

	1. Set some limited port range, that can be used in FW conf
	2. Use start port 5900 as it is already used by customers
	3. Use the endport as 6923
	4. Change VDSM documentation according to new port range

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=983088

2013-11-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	Catch gluster import error in glusterVolume
	glusterSD is imported by hsm and imports glusterVolume. with_gluster=0
	variable leaves gluster files but omit gluster directory. This leads to
	import error that must be treated.

2013-11-25  Federico Simoncelli  <fsimonce@redhat.com>

	api: remove the uploadVolume command
	The uploadVolume command was never used by the engine and has been
	obsoleted with the introduction of the imageSharing module.

2013-11-24  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix PEP 8 issue.

2013-11-23  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfoTests: fix link info consistency and docstrings

	netinfo: Make get() use getLinks
	By making get() use getLinks we avoid getLinks being called by nics
	and by vlans, so it is all in all one less process creation and
	less work to retrieve vlans and bridges as well.

	For that to be possible we add the isBridge and isBond to ipwrapper.

	ipwrapper: add convenient Link.isNICLike
	The addition of Link.isNICLike() allows us to centralize the logic
	for which devices are to be treated as nics.

	ipwrapper: Move hidden bonds' nic logic from netinfo
	This patch moves the remaining logic of what could hide a nic to
	ipwrapper so that it is all well enclosed in a single digestible
	method.

	Since the nic master is retrieved from the ip links, that needs
	a couple of tweaks in netinfoTests, namely:
	- Adding the master information to the link line for the nics to
	  be hidden. Which means that the tmpdir fixture is not necessary
	  anymore.
	- Monkeypatch the new Link info about existing bonds and the
	  hidden config.

2013-11-22  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo/sampling: split speed into nic and bond specific methods
	Speed is calculated very differently for nics and bonds. This patch
	splits the logic into two different methods and makes netinfo and
	sampling use them.

	bondOpts: Fix reporting [] instead of [''] for empty opts
	Touched also speed so that it would not try to access the first
	element of what is not an empty list instead of a list with an
	empty element.

2013-11-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Keeping gluster modules when with_gluster set to 0
	Currently the code imports and uses gluster modules. Setting
	with_gluster=0 brakes the code. With this patch with_gluster=0 will
	only drop the vdsm-gluster rpm creation.

2013-11-22  Dan Kenigsberg  <danken@redhat.com>

	Revert "gluster prepareImage: return gluster-specific information"
	This reverts commit 51081b81de8cda48e0060e which is universally known to
	be quite ugly, and is also unhelpful since we do not support
	gluster-based VM with snapshots.

2013-11-22  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper Monitor: fix for deleted links
	The previous parsing would not work when a link was deleted. This
	patch fixes it and sets the state as DELETED on those cases.

	ipwrapper Monitor: Move to using detailed oneline
	Change the ip monitor command to use the more machine readable
	"ip -d -o monitor link" (one line per link event).

2013-11-22  ndarshan  <dnarayan@redhat.com>

	Add 3.4. to clusterLevels and supportedENGINEs.
	Add version 3.4. to clusterLevels and supportedENGINEs, returned
	by VDSM as part of engine calling getCapabilities. This allows
	to test 3.4 specific features from engine.

2013-11-22  Martin Polednik  <mpoledni@redhat.com>

	Ensure cancellation of migrations gets handled correctly
	If the migration is cancelled before the source calls libvirt.migrateToURI2
	we have to raise an libvirtError with the VIR_ERROR_OPERATION_ABORTED error
	code to ensure that _finishSuccessfully() does not get called and we're
	correctly reporting that the migration has been cancelled and that we're
	destroying the VM on the destination in the process, since we're bailing
	out.

	Additionally we'll do the check if the migration has been cancelled
	right after the semaphore has been accquired, to avoid doing things
	like calling the before_vm_migration_source hook and calling the
	destination vdsm to create the VM instance.

	Bug-Url: https://bugzilla.redhat.com/1023131

2013-11-22  Antoni S. Puimedon  <asegurap@redhat.com>

	Make ip link wrapper hidden config be at class lvl
	Before this patch we got the config for each device that needed it.
	This allowed each device to pick up changes in the config that
	could have happened between each device object creation, at the
	cost of speed and simplicity. Since config is supposed to be
	stable during the life of a vdsm process, this was moved to the class
	level.

2013-11-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	sos/vdsm.py: Collect /etc/vdsm permission
	An user complained that vdsm failed to start on his
	machine. It was finally tracked down to his /etc/vdsm missing read
	permissions for vdsm. Let us collect /etc/vdsm permission so it is
	easier to pinpoint for the next user.

2013-11-21  pkliczewski  <piotr.kliczewski@gmail.com>

	xmlrpc: Parsing error logging enhancement - vdsClient
	Logging enhancement which helps understand the issues during
	parsing xml response obtained from vdsm. Parsing
	issues can occur when bad characters are in xml etc.

	In order to get raw response we need to wrap one of transport
	classes (plain or provided class for ssl) and present it to
	the user when ExpatError is raised.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982065

2013-11-21  Sergey Gotliv  <sgotliv@redhat.com>

	Fix calculation of file volume allocated size
	Allocated size was computed using st_blksize as block size. st_blksize
	is the "preferred" buffer size for efficient file system I/O on the file
	system where the block is. This patch use block size of 512 bytes as
	specified in stat(2) manual.

2013-11-21  Martin Betak  <mbetak@redhat.com>

	vdsm: Accents in the vm name break the migration
	Added utf-8 encoding of the configuration xml on the destination to
	handle non-ascii characters.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1002246

2013-11-21  Petr Benas  <pbenas@redhat.com>

	tests: Add NetworkTest.testSetupNetworksAddDelkDhcp
	Tests adding and deletion of network with dynamically
	assigned address.

	Patch version 11. Cosmetic refractoring in firewall.py.

2013-11-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Requires python-cpopen >= 1.2.3-4
	Previous version of python-cpopen conflicts with vdsm-python-cpopen.
	This patch requires a new version of python-cpopen which fix it.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1020321

2013-11-21  Nir Soffer  <nsoffer@redhat.com>

	lvm: deactivate lvs during bootstrap
	When using FC storage, physical volumes are connected during boot, and vdsm
	logical volumes are auto-activated by both /etc/rc.sysinit and
	/etc/init.d/netfs startup scripts. These logical volumes do not pick changes
	done by the SPM on the storage, which may lead to data corruption sooner or
	later, when a vm is trying to write to logical volume with stale meta data.

	This patch check all vdsm logical volumes during lvm bootstrap and
	deactivate them if possible. Special logical volumes are refreshed,
	since they are accessed early when connecting to storage pool, possibly
	before lvm bootstrap is done. Open logical volumes are skipped because
	we assume that they use correct meta data when opened.

	To fix the auto-activation during boot, we could perform this only on
	the first start of the service and limit the operation to FC storage.
	However, we decided to use this on all block storage types, and on every
	start of the service, as additional layer of protection from logical
	volumes left active after unclean shutdown of the service, or other
	failures to deactivate logical volumes.

	Deactivation adds up to two lvchange calls for each volume group with
	active logical volumes. After the first service start, logical volumes
	are typically inactive and this change adds minimal additional cost,
	refreshing active special logical volumes.

	Depends on http://gerrit.ovirt.org/#/c/19871 for refreshing multiple
	logical volumes in one call.

	Bug-Url: https://bugzilla.redhat.com/1009812

2013-11-21  Dan Kenigsberg  <danken@redhat.com>

	Revert "xmlrpc: Parsing error logging enhancement - vdsClient"
	This reverts commit d7a6bd9c3d5593263692616fa0d92f047 which broke
	vdsClient. While cannot continue to deliberate about the proper solution
	while vdsClient is still broken.

	Bug-Url: https://bugzilla.redhat.com/1032419

2013-11-20  Assaf Muller  <amuller@redhat.com>

	Mark netinfoTests.testGetIfaceByIP as a broken test
	The test has been failing since python-ethtool-0.6-5.

	The goal is to get rid of the function and its test, and
	use a different approach to solve the problem that the function
	was originally solving.

2013-11-20  Lee Yarwood  <lyarwood@redhat.com>

	lvm: Allow multiple LVs to be refreshed at once.
	This change refactors the refreshLV method to allow multiple
	volumes to be refreshed at once as possible with the activate
	and deactive methods.

	This is patch 1 in a series of 3 that aim to resolve BZ#1009812.

	This patch is required by the changes listed below :

	lvm: Make the isLVActive() method public.
	http://gerrit.ovirt.org/#/c/21386/

	blockSD: Ensure active volumes are refreshed before use.
	http://gerrit.ovirt.org/#/c/21387

	bug-url: https://bugzilla.redhat.com/1009812

2013-11-19  Martin Sivak  <msivak@redhat.com>

	Allow setting just a single value in MoM policy
	This patch prevents a policy coruption that could have happened
	when the 01-parameters policy was updated with just a single
	value. If there were more values defined, the variables were lost
	and the policy ended up broken.

	This patch defines the variables in a file that is not touched
	by the setMOMPolicyParameters and uses (set name value) syntax
	in the generated policy part.

	It also remembers the old setting and puts all the values to
	the policy part when it is autogenerated.

2013-11-19  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Migration cancellation replies wrong message format
	The message currently returns:

	{'status': {'message': 'Migration canceled',
	            'code': { 'status': { 'message': 'Migration not in progress',
	                      'code': 47}}},
	            'progress': 1}

	The content of code is wrong. This commit fixes it so the message will
	look like this:

	{'status': {'message': 'Migration canceled', 'code': 47}, 'progress': 1}

	Bug-Url: https://bugzilla.redhat.com/1015887

2013-11-19  Assaf Muller  <amuller@redhat.com>

	Add unit tests for unified network persistence

2013-11-19  pkliczewski  <piotr.kliczewski@gmail.com>

	xmlrpc: Parsing error logging enhancement - vdsClient
	Logging enhancement which helps understand the issues during
	parsing xml response obtained from vdsm. Parsing
	issues can occur when bad characters are in xml etc.

	In order to get raw response we need to wrap one of transport
	classes (plain or provided class for ssl) and present it to
	the user when ExpatError is raised.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982065

2013-11-18  Petr Benas  <pbenas@redhat.com>

	ipwrapper: add support for veth NICs
	Update ipwrapper to consider veth NICs as FakeNICs in the same
	way it does with dummy NICs. This change is required for the
	testSetupNetworksAddDelDhcp functional test.

2013-11-18  Saggi Mizrahi  <smizrahi@redhat.com>

	spec: Don't depend on unreleased RPMs.
	The requested package is not yet available in RHEL and will only be
	available in 6.5.

2013-11-18  Federico Simoncelli  <fsimonce@redhat.com>

	vm: prevent faulty volume extensions
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998443

2013-11-18  ndarshan  <dnarayan@redhat.com>

	gluster: new verb to remove host using host UUID
	This patch adds a new verb glusterHostRemoveByUuid which
	retrives the host name based on uuid passed and uses it to
	remove the host.

	new verb: GlusterHostRemoveByUuid
	return type: bool (success or failure)
	possible Exception: GlusterHostNotFoundException /
	                    GlusterHostRemoveFailedException.

2013-11-18  Antoni S. Puimedon  <asegurap@redhat.com>

	vdsm.spec: Add python-inotify as buildrequires dep
	This is needed because now the configure step checks for the
	packages necessary for running vdsm.

	Get rid of mutables(lists) as default parameters
	In Python having a mutable as a default method parameter is
	dangerous due to the fact that the mutables are created on
	module creation rather than on method invokation. Thus, a
	call to a method could pollute the environment for the next
	call.

	This patch cleans most instances of that happening.

2013-11-18  Federico Simoncelli  <fsimonce@redhat.com>

	domainMonitor: tag pool monitored domains
	As part of the monitoring implementation:

	 7b1cc6a Adding [start|stop]MonitoringDomain()

	updateMonitoringThreads has been modified to assume that the list of
	the monitored domains is the same as the list of the attached domains:

	+        poolDoms = self.getDomains()
	...
	-        for sdUUID in monitoredDomains:
	+        for sdUUID in poolDoms:
	             if sdUUID not in activeDomains:
	                 try:
	                     self.domainMonitor.stopMonitoring(sdUUID)

	This assumption is not valid when we are detaching a storage domain
	(as it won't be listed by getDomains anymore). The resulting issue is
	that the monitor domain thread is not stopped and the host id is left
	acquired (ids file/device kept open by sanlock).

	This patch reverts the updateMonitoringThreads changes and adds a tag
	mechanism for the pool monitored domains.

2013-11-17  Antoni S. Puimedon  <asegurap@redhat.com>

	Added missing python modules to the configure.ac checks

2013-11-17  Dan Kenigsberg  <danken@redhat.com>

	sampling.ImagePathStatus: drop unused code, and only it
	The ImagePathStatus is never started, but one of its methods is used by
	HostStatsThread.get(). This patch moves the still-used bits of
	ImagePathStatus code into HostStatsThread, and drops the unused
	ImagePathStatus thread.

2013-11-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Ubuntu: Sync with vdsm.spec.in
	Recently we split zombiereaper and made some changes in libvirt
	configuring. This patch update Ubuntu packaging scripts to keep up with
	vdsm.spec.in.

	Ubuntu: make hard coded group names configurable in configurator.py
	In the sanlock part of our configurator, it uses qemu,kvm as the group
	names. In Ubuntu the group names may be different. This patch makes the
	two group names configurable.

2013-11-17  Vered Volansky  <vvolansk@redhat.com>

	Improve error when multipath can't access a pv
	InvalidPhysDev gave a cryptic error message - Invalid physical device.
	The message was amended to "Multipath cannot access physical device(s)" along
	with the device(s) name(s). The exception name was changed according to the new
	message content. Note: The only thing needed here by the oVirt engine is the
	error code, which was not changed in this patch, so there are no
	compatibility issues with older oVirt engines.

	Bug-url: https://bugzilla.redhat.com/852003

2013-11-17  Antoni S. Puimedon  <asegurap@redhat.com>

	ipwrapper: Add ovs, libteam and vlan.device reporting support
	This patch enables proper classification of ovs bridges and
	teamd "bonds" as well as adds one extra attribute to vlans and
	macvlans, device, that reports upon which device they are created.

	Additionally, it adds memoization to detectType so successive
	calls don't need to go all the way down to cpopen for ethtool. This
	is okay since it is very rare, unadvisable and probably unsupported
	to change device names on the fly and use those vacant names for
	other device types.

	iproute2 ip link wrapper
	Provide a wrapper for iproute2's "ip -d -o link show" (detailed ip
	show without line jumps).
	This is done by parsing the standard output from executing the above
	command and constructing link objects holding all exposed information
	(be it generic such as mtu or link kind specific link vlanid)

	Apart from fixing the specified bug, it also future proofs netinfo
	(and vdsm networking in general) for newer distributions like F20,
	which include more input that we were previously not parsing or
	parsing badly. As a key addition, it includes link type detection
	depending on iproute detailed output when available and falls back
	to ethtool output.

	Bug-Url: https://bugzilla.redhat.com/1026236

2013-11-16  Dan Kenigsberg  <danken@redhat.com>

	Report qemu-kvm-rhev if installed
	Bug-Url: https://bugzilla.redhat.com/1029792

2013-11-14  Assaf Muller  <amuller@redhat.com>

	Enhanced netinfo.getBootProtocol, added unit tests
	netinfo.getBootProtocol assumed we were using ifcfg files.
	It now checks for the persistence model and implements an
	ifcfg-less getBootProtocol. Added a unit test both for
	the ifcfg version and unified persistence version.

	Remove onboot, delay, forward_delay from setupNetworks API
	The engine never sends onboot and delay so they are safe to remove.
	forward_delay is an undocumented API key that was deemed
	harmful and unneeded and is removed as well. All three
	keys are now blacklisted and will not be written to ifcfg
	files if sent via the API. Instead, onboot will always be
	yes and delay will always be 0.

2013-11-14  Martin Polednik  <mpoledni@redhat.com>

	vdsm: change network sampling interval to 15 seconds
	As discussed on engine-devel, there is no reason to poll libvirt more
	often than engine polls vdsm. This patch will make polling in sync with
	cpu (vm_sample_cpu_interval) polling.

2013-11-14  Federico Simoncelli  <fsimonce@redhat.com>

	vm: refresh raw disk before live extension
	As part of the online disk extension (raw format on block domains) flow
	the leaf logical volume is extended by the SPM to the new size.
	On the HSM host (where the VM is running) we need to refresh the volume
	in order to update the volume segments and make the new size visible to
	the qemu process.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1029501

2013-11-13  Federico Simoncelli  <fsimonce@redhat.com>

	vm: unify _highWrite and _onAbnormalStop
	Both _highWrite and _onAbnormalStop should share the same logic about
	the volume extension.

2013-11-13  Ryan Harper  <ryanh@us.ibm.com>

	Add build-dep packages so yum-builddep is effective
	yum-builddep doesn't get all of the required packages
	needed to build vdsm and vdsm rpms.  Update the specfile
	Build-Requires to include the needed packages.

2013-11-13  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove vdsm directories on uninstallation

2013-11-13  Sandro Bonazzola  <sbonazzo@redhat.com>

	Renaming /etc/sysctl.d/vdsm to /etc/sysctl.d/vdsm.conf
	Fixing Bug #740887 it has been added the file /etc/sysctl.d/vdsm which
	works fine on RHEL and CentOS but it's not read on Fedora because
	it should be /etc/sysctl.d/vdsm.conf ( see sysctl --system output )

	Bug-Url: https://bugzilla.redhat.com/1029368

2013-11-12  Pavel Zhukov  <pzhukov@redhat.com>

	Invalidate filters  on HSMs before rescanning extended VG
	domainMonitor thread might use stale lvm filters while running vgs
	command after extending of the VG (added PV is missed in the filter
	set). Since LvmCache doesn't invalidate filters, the volume
	group  is marked as partial and domainMonitor selftest fails
	(host goes to non-operational status). By design filter should be
	invalidated if cmd returns nonzero code but vgs returns zero even if
	devices are filtered . The patch introduces public  method for
	filter invalidation and calls it from the getDevicesVisibility
	because getDevicesVisibility is called on all DC hosts after
	adding new device but before extendSD.

	Bugzilla-Url: https://bugzilla.redhat.com/1022976

2013-11-12  Federico Simoncelli  <fsimonce@redhat.com>

	lvm: fix pv_count and pv_names check

2013-11-12  Antoni S. Puimedon  <asegurap@redhat.com>

	Make netinfo's _match_name a vdsm lib utility.
	move the functionality to lib/vdsm/utils.py and drop the non
	pythonic map in favor of a generator.

2013-11-11  Dan Kenigsberg  <danken@redhat.com>

	gluster prepareImage: return gluster-specific information
	Since the introduction of gLuster storage domains (1d90895cdda8,
	committed 9 months ago), prepareImage returns an additional element
	beyond the path to the leaf: a dictionary keyed by "info", carrying
	gluster-specific information.

	This dictionary has been dropped by a recent refactoring of prepareImage
	since the computation of its contents assumes that the leaf volume is
	part of a storage pool, and this is harmful to the "Hosted Engine"
	effort.

	This patch re-introduces the lost functionality, in the price of a
	redundant production of a volume. To make this a little less expensive
	and harmful to HE, we limit the production to gluster volumes.

	This patch is not the child we've prayed for, but it works.

	Special thanks to Samuli Heinonen <samppah@neutraali.net> for reporting
	the bug and testing this patch.

	Bug-Url: https://bugzilla.redhat.com/1022961

2013-11-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Introducing configurator package in vdsm-tool
	This package union libvirt and sanlock configuration operations for now.
	The package defines ModuleConfigure interface and API for modules configuration
	tool. The format for the configure command is modified to:

	vdsm-tool configure --module libvirt --force

	This module also provides is-configured and validate-config verbs with
	the same syntax.

	--force flag means the configure flow will stop all related services if
	needed. Without force, if one of the related services is running, the
	configure will fail.

	For reuse and easier additional configurers for other services, all the
	developer needs to add is an object that inherit ModuleConfigure and
	implements the interface for test, dry and configure, then adding the
	class to configurers.

2013-11-09  ndarshan  <dnarayan@redhat.com>

	gluster: correct parameter for creating hookpath in verb hookAdd.
	parameter hookLevel must be in lower case for creating correct
	path for hook. so that parameter is changed to lower case.

	bug url: https://bugzilla.redhat.com/show_bug.cgi?id=1024263

2013-11-08  Antoni S. Puimedon  <asegurap@redhat.com>

	fuserTests fix for f20 and arch
	In newer distributions, fuser doesn't report a process as accessing
	it's own executable file, making this test fail. We don't know why
	this has changed (tried with newer kernels and newer fuser and the
	issue persists) but we do not care enough about fuser reporting all
	the pids from the processes created and alive of an executable file.
	We fix this test for the fuser use case that we have.

2013-11-08  Assaf Muller  <amuller@redhat.com>

	Add lib/tool/restore_nets.py to debian/vdsm-python-install

2013-11-07  Nir Soffer  <nsoffer@redhat.com>

	pep8: Fix indentation to comply with pep8 1.3.3
	Commit 2c9f0d66db7795 introduced a pep8 indentation regression, breaking
	the build on RHEL using vdsm provided pep8. This patch fixes the
	indentation by breaking long statement to multiple lines.

	Relates-To: https://bugzilla.redhat.com/1022975

2013-11-07  Assaf Muller  <amuller@redhat.com>

	Transmogrify netinfo gateway default value from 0.0.0.0 to ''
	Antecedently, if a device lacked IP addressing information,
	netinfo proclaimed the ipaddr as '', netmask as ''
	and gateway as '0.0.0.0'.

	The transpose from '0.0.0.0' to '' is momentous both for congruity
	and for input corroboration during setupNetworks. setupNetwrosk would
	fail for an (ip: '', netmask: '', gateway: '0.0.0.0'). This
	can bechance if the unified network persistence upgrade was
	perpetrated on a network with no ip configuration.

	The next time I get a -1 on a commit message I promise to
	reword it to Biblical English (Present work excluded).

2013-11-07  Sergey Gotliv  <sgotliv@redhat.com>

	Revert "vm: Pause vm in case volume allocation is greater than lv size"
	This reverts commit ca1539b7c96bd1dacb1b583fcfe6cae3c2a514c3.
	This patch has to be refactored.

2013-11-07  Mooli Tayer  <mtayer@redhat.com>

	configuring selinux allowing qemu-kvm to generate coredumps.
	this is a hack until we replce coredumping with abrt.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1005031

2013-11-07  Federico Simoncelli  <fsimonce@redhat.com>

	Revert "sampling.ImagePathStatus: drop unused code"
	This reverts commit 8086bf15e11d7e7cec26ba33cfccc95448214e01.

2013-11-07  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Update of the guest memory stats schema
	Newer guest agent versions are now additionally reporting swap stats. This
	needs to be reflected in the schema.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1025845

2013-11-06  Saggi Mizrahi  <smizrahi@redhat.com>

	iscsi: Iscsi rescan cleanup
	* Remove forceIscsiScan(): iscsiadm already does that when refreshing
	  sessions
	* Cleanup iscsi.rescan(): Replace complex logic with a simpler
	  implementation since new iscsiadm takes care of all of this itself
	* Make iscsi.rescan() more testable
	* Test confusing timeout semantics of iscsi.rescan()

	Bug-Url: https://bugzilla.redhat.com/964595

2013-11-06  Antoni S. Puimedon  <asegurap@redhat.com>

	cleanup: Improve lib/vdsm imports (PEP328)
	PEP328 ( http://www.python.org/dev/peps/pep-0328/ ) does away with
	the ambiguity of where the modules that are being imported reside
	making the codebase much more browsable.

	With a codebase of:
	    package/
	        __init__.py
	        subpackage1/
	            __init__.py
	            moduleX.py
	            moduleY.py
	        subpackage2/
	            __init__.py
	            moduleZ.py
	        moduleA.py

	this (moduleY.py):
	    import moduleX
	    import moduleZ
	becomes
	    from . import moduleX
	    from ..subpackage2 import moduleZ

	Which makes it much more evident where things are and avoids possible
	shadowing of packages in site-packages.

2013-11-05  Dan Kenigsberg  <danken@redhat.com>

	Avoid M2Crypto races
	As documented in
	http://www.heikkitoivonen.net/m2crypto/api/M2Crypto.threading-module.html
	and painfully recognized long ago in https://bugzilla.redhat.com/482420,
	using M2Crypto in a multi-threaded server such as Vdsm requires explicit
	initialization.

	Bug-Url: https://bugzilla.redhat.com/1026556

2013-11-05  Yeela Kaplan  <ykaplan@redhat.com>

	vm: Pause vm in case volume allocation is greater than lv size
	Qemu bug is causing qcow to allocate extents beyond the volume's
	physical size. In this case we want to avoid extending the volume in
	infinite loop and pause the vm, to avoid data corruption.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998443

2013-11-05  Miguel Angel Ajo  <miguelangel@ajo.es>

	tests: prevent hook validation decorator from leaving scripts installed
	It fixes a bug in the hook validation decorator, that left tests
	scripts installed into the system. Now they're properly removed
	right after the tests.

	Adds rmTree function to vdsm.utils.

2013-11-05  Martin Sivak  <msivak@redhat.com>

	Fix ballooning rules for computing the minimum available memory
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1025845

2013-11-05  mpolednik  <mpoledni@redhat.com>

	vdsm: centralize device limit checking
	Device limits are currently checked on case by case bases,
	this patch implements call that centralizes the checking

2013-11-05  Nir Soffer  <nsoffer@redhat.com>

	lvm: Do not use udev cache for obtaining device list
	lvm is obtaining the device list from udev. When using concurrently,
	udev sometimes returns incomplete list, which cause lvm to think that a
	vg is missing, and the command may fail with "Volume group not found"
	error, or "Cannot change VG test while PVs are missing".

	lvm fixed this issue in version 2.02.100-7.el6 by disabling udev cache,
	setting obtain_device_list_from_udev to 0. Unfortunatlly, lvm fix is not
	enough for vdsm, as the fix is applied only if no lvm.conf file exists.
	When upgrading existing lvm installation, lvm creates a lvm.conf.rpmnew
	file, and the system administrator is responsible for updating lvm
	configuration.

	This patch disable udev cache using the --config option, used to
	override many other lvm options, ensuring proper configuration on both
	new and upgraded systems.

	Disabling udev cache may have minimal performance effect according to
	lvm developers.

	Bug-Url: https://bugzilla.redhat.com/1014942

2013-11-04  Amador Pahim  <apahim@redhat.com>

	Allow disable MOM KSM control.
	This patch add ksmEnabled var to enable/disable mom ksm control.
	Now users can use vdsClient to runtime disable/enable
	(default enabled) ksm control:

	 $ vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False

	Bug-Url: http://bugzilla.redhat.com/1025780

2013-11-04  Saggi Mizrahi  <smizrahi@redhat.com>

	utils: Create AsyncProcessOperation
	This is an object to wrap a process so it can be treated as an
	AsyncOperation.

	Features:
	* Takes care of pid collection
	* Has pluggable output parsing
	* Process appropriate implementation of wait() and stop()

	Related-Bug-Url: http://bugzilla.redhat.com/964595

2013-11-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Don't fail hotplugNic operation when after hook fails
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015171

2013-11-04  Federico Simoncelli  <fsimonce@redhat.com>

	upgrade: fix v3ResetMetaVolSize argument
	In commit c072945 (one shot prepare) the v3ResetMetaVolSize argument
	was changed from volume object to volume uuid (string) triggering
	attribute errors during the execution (e.g. getMetaParam, etc.).
	This patch fixes the issue reintroducing the volume objects and the
	relevant exception handling.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022975

2013-11-04  Dan Kenigsberg  <danken@redhat.com>

	libvirt is happy with redefinition of an existing nwfilter

2013-11-04  Assaf Muller  <amuller@redhat.com>

	Fix minor network functional tests issues
	Some tests were asserting that networks existed based on out
	of date statuses.

2013-11-04  Dan Kenigsberg  <danken@redhat.com>

	sampling.ImagePathStatus: drop unused code
	In pre-historic rhev-2.1 days, ImagePathStatus thread was used to
	collect and cache information about the image repository accessibility.
	However, this code was never used by ovirt-3.y.

	By default, images_check_times is set to 0, meaning that the
	sampling.ImagePathStatus thread is never started. It is highly unlikely
	that there's a secret vdsm client out there that explicitly turns on
	this monitoring thread and read the 'storageDomains' element out of
	getVdsStats.

2013-11-04  Petr Sebek  <psebek@redhat.com>

	Monitor bridges using vdsStats
	Changes in vdsm/sampling.py are neccessary because previously no new
	interfaces would be added to vdsStats. It would happen only after
	restart vdsmd and therefore reinitializaton of HostStatsThread. Now
	there is update of ifids and ifrates everytime sample is taken.

	To give HostStatsThread time to collect data for statistics we skips
	hotplugged interfaces what does not have all samples. In current setting
	with AVERAGING_WINDOW==5 and SAMPLE_INTERVAL_SEC==2 it takes 10 seconds
	to start giving information about hotplugged interface.

	Bug-Url: https://bugzilla.redhat.com/675560
	Bug-Url: https://bugzilla.redhat.com/988469

	Removal of needless base class StatsThread
	From this base class inherit only class HostStatsThread, therefore can
	be content of class StatsThread moved to class HostStatsThread without
	changing of functionality and with higher clarity.

2013-11-04  Martin Polednik  <mpoledni@redhat.com>

	vdsm: move balloon logic out of buildConfDevices
	Encapsulates empty balloon creation logic outside of
	buildConfDevices to improve code readability

	vdsm: move watchdog default params to WatchdogDevice
	Watchdog device creation is currently handled in
	buildConfDevices, creating unnecessary code pollution.
	This patch moves the creation to WatchdogDevice class,
	cleaning up buildConfDevices code. Side effect is that
	we lose access to specParams if they are not passed from
	engine.

2013-11-02  Sergey Gotliv  <sgotliv@redhat.com>

	Replace unused getFileList() with more flexible getFileStats()
	1. Rename to getFileStats().

	New name getFileStats() better describes the essence of that API.
	This is safe to rename it because this API is not in use.

	2. Add caseSensitive option.

	Currently Engine is using getIsoList() and getFloppyList() APIs to
	retrieve the list of iso and floppy files respectively. Both these APIs
	are working in case-insensitive manner but don't provide file
	statistics. getFileStats() returns file statistics. Adding
	caseSensitive option allows using getFileStats() instead of
	getIsoList() and getFloppyList().

	Bug-Url: https://bugzilla.redhat.com/1005889

2013-11-01  Dan Kenigsberg  <danken@redhat.com>

	vdsm.utils: drop unused ImagePathStatus and getPidNiceness

	drop unused checkPathStat
	We actually have two copies of this junk DNA. Trim it.

	sampling: StatsThread: dropped unused methods
	This is only a first step twards removal of the useless base class
	StatsThread.

2013-11-01  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix fix getDomUuidFromVolumePath()
	Bug-Url: http://bugzilla.redhat.com/1017735

2013-10-31  Antoni S. Puimedon  <asegurap@redhat.com>

	Make vdsm-tool dynamic module loading take the package name into account
	According to the imp.load_module API documentation:
	    http://docs.python.org/2/library/imp.html#imp.load_module
	the name that is passed as a first parameter should be the full
	module name, i.e., including the package name. Without the package
	name, relative imports and future proofing of the module are not
	possible.

2013-10-31  Saggi Mizrahi  <smizrahi@redhat.com>

	storage: fix getDomUuidFromVolumePath()
	getDomUuidFromVolumePath returned the imgUUID instead of the sdUUID.

	Since this is used as the parameter for getProcessPool() a process pool
	was created per image id instead of per domain id.

	Since imgUUIDs are much more abundant this can cause the creation of an
	obscene number of process pools and in turn a lot of processes.

	Bug-Url:http://bugzilla.redhat.com/017735

2013-10-31  Antoni S. Puimedon  <asegurap@redhat.com>

	Network functional tests assertion improvements
	This change allows for more fine grained assertion errors. It allows
	, among other things, to differentiate if what failed is making a
	net or putting it into the running configuration.

2013-10-31  Aravinda VK  <avishwan@redhat.com>

	gluster: Return status after remove brick/rebalance stop
	Initially glusterVolumeRebalanceStop and glusterVolumeRemoveBrickStop
	returns true/false.

	Since rebalance and remove brick operations are async operations, if
	rebalance/remove-brick STOP is triggered after these async tasks completed
	then vdsm returns success when executing stop command. But since task is
	completed engine has to show that task is completed(Now showing STOPPED)

	This patch returns status after successful execution of stop command.
	engine will check the summary[status] to see the status of task and
	display in UI accordingly.

	This patch will not affect the backward compatibility since "status"
	is not changed in output dict.
	'status': {'code': 0, 'message': 'Done'}

	Output:
	{'hosts': [{'filesFailed': LONG as STR,
	            'filesMoved': LONG as STR,
	            'filesScanned': LONG as STR,
	            'filesSkipped': LONG as STR,
	            'name': STRING,
	            'status': STRING,
	            'totalSizeMoved': LONG as STR},..],
	 'status': {'code': 0, 'message': 'Done'},
	 'summary': {'filesFailed': LONG as STR,
	             'filesMoved': LONG as STR,
	             'filesScanned': LONG as STR,
	             'filesSkipped': LONG as STR,
	             'status': STRING,
	             'totalSizeMoved': LONG as STR}}

	Possible exceptions with these verbs:
	No new exceptions introduced, XmlErrorException was raised when status parsing fails.

	GlusterVolumeRebalanceStopFailedException
	    code = 4137
	    message = "Volume rebalance stop failed"

	GlusterVolumeRemoveBrickStopFailedException
	    code = 4150
	    message = "Volume remove brick stop failed"

	GlusterXmlErrorException
	    code = 4106
	    message = "XML error"

2013-10-29  Greg Padgett  <gpadgett@redhat.com>

	stats: return HA agent score when applicable
	For Hosted Engine, the engine needs to know the HA score assigned to
	each host by the HA agent--if it's installed.  This patch returns the
	score via the statistics interface.

2013-10-29  Dan Kenigsberg  <danken@redhat.com>

	qos hook: fix spelling
	Former code did not allow netting QoS peak value. Thanks Sven Kieske for
	reporting this.

2013-10-28  Saggi Mizrahi  <smizrahi@redhat.com>

	Move zombieReaper to its own package
	It is not vdsm specific so it's a prime candidate for extraction.

2013-10-25  Antoni S. Puimedon  <asegurap@redhat.com>

	More explicit octal values (pep-3127)
	Change 0XXX to 0oXXX so that that these values are more visibly octal
	and forwards compatible with Python 3.3+.

	This change follows the spirit of:
	http://www.python.org/dev/peps/pep-3127/

	"The default octal representation of integers is silently confusing to people
	unfamiliar with C-like languages. It is extremely easy to inadvertently create
	an integer object with the wrong value, because '013' means 'decimal 11', not
	'decimal 13', to the Python language itself, which is not the meaning that most
	humans would assign to this literal."

2013-10-24  Assaf Muller  <amuller@redhat.com>

	Unified persistence [3/4] - Restore network config
	Add vdsm-restore-net-config support for unified persistence.
	It relies on flushing of configurator-specific persistence, i.e.,
	each configurator should remove its persisted conf, leaving
	only unified persistence as source of persistence.

	After the configurator persistence is flushed, the unified
	persisted nets and bonds are passed to a setupNetworks call.

	Since we want vdsm-restore-net-config to be run at boot after
	libvirtd but before vdsmd listens, the service was removed
	and it was integrated as one of the start tasks. However, we
	must run vdsm-restore-net-config only during boot time, and
	not on every vdsmd restart.

	If the restoration is run via vdsmd_init_common.sh we touch
	/var/run/vdsm/nets_restored that, if present, marks to future
	vdsmd restarts that service boot-time network restoration is
	no longer expected nor in order.

	The user can explicitly restore the nets by calling
	/usr/share/vdsm/vdsm-restore-net-config or via vdsm-tool:
	vdsm-tool restore-nets

2013-10-24  Mooli Tayer  <mtayer@redhat.com>

	makedirs should precede configure_coredump and other init tasks.

	codestyle: one task per line

2013-10-24  Antoni S. Puimedon  <asegurap@redhat.com>

	fix bash ineffective timestamp
	If we were to perform more than a setSafeNetworkConfig in a second
	the timestamp would be the same and we'd explode by putting
	    /var/run/vdsm/netconf inside the old
	    /var/lib/vdsm/persistence/netconf.931247
	like so
	    /var/lib/vdsm/persistence/netconf.931247/netconf
	instead of replacing it atomically.

	Adding the nanoseconds to the timestamp makes collisions go away.

	Fix monitor state change for newer kernels/iproute
	On el6 kernels adding a vlan over a link doesn't create an entry for
	the link under the vlan. On f19+ kernels it does happen, so we need
	to check that the state change instead of just checking if there is
	some state reported.

2013-10-24  Petr Sebek  <psebek@redhat.com>

	Add IPv6 support to configNetwork
	This patch add IPv6 functionality to network configuration. We want to
	run every device as dual stack device so IPConfig now uses IPv4 AND
	IPv6(or one of them).

	This patch was built on Hunt Xu's patch 11741.

2013-10-24  Timothy Asir  <tjeyasin@redhat.com>

	gluster: fix hook list error if magic.MIME_TYPE not supported.
	Enhance _getMimeType function to
	fix hook list error if any lower version of python-magic
	does not support magic.MIME_TYPE

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1018076

2013-10-23  Dan Kenigsberg  <danken@redhat.com>

	ipwrapperTest: fix another sloppy error by danken

2013-10-23  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix link Monitor unpack error and device retrieval

2013-10-23  Dan Kenigsberg  <danken@redhat.com>

	ipwrapper: wrap `ip monitor link`

	drop a non-variable variable

2013-10-22  Dan Kenigsberg  <danken@redhat.com>

	nestedvt hook: document the need of a nested-enabled kernel

2013-10-22  Aravinda VK  <avishwan@redhat.com>

	vdsmapi: gluster: vdsmapi schema definitions for existing gluster verbs
	vdsmapi schema definitions for existing gluster vdsm verbs

2013-10-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding reconfigure libvirt to vdsm upgrade flow
	After upgrade vdsm and supervdsm should restart if ran (due to code upgrade).
	libvirt configure should run if needed, and if reconfigure occurred we
	should restart libvirt service as well if it was up.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1019200

2013-10-22  Eduardo Warszawski  <ewarszaw@redhat.com>

	Making getVSize and getVTrueSize SD methods.
	* Units sanitized. The two methods return now size in bytes,
	  like st_size.
	* getVTrueSize() renamed to getAllocSize().

	TODO:
	These two method should be unified in a future patch since the
	two values are returned in the same call for file volumes and
	the two values are identical for block volumes.

	Required to reduce the volume size functions proliferation.

2013-10-22  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: Update Ubuntu packaging scripts
	Recently upstream VDSM added some files and dirs, as well as some
	dependencies. Unfortunately depndency upgrade for linux kernel and
	selinux-policy-targeted are not available on Ubuntu.

	This patch adds files and dirs, update glusterfs dependency
	declaration, and update vdsm release version.

2013-10-21  Eduardo Warszawski  <ewarszaw@redhat.com>

	Don't re-produce the same SD again.

2013-10-21  Amador Pahim  <apahim@redhat.com>

	Report bond speed as function of slaved nics speed and bond mode
	Currently bond interfaces are always assumed to have 1GB of speed,
	reflecting in inaccurate network usage calculations.

	This patch add bond speed probe to netinfo.speed(), considering bond
	mode and slaved nics speed:

	 Failover modes: 1 and 3
	  Bond speed = active slaved nic speed.

	 Load Balance modes: 0, 2, 4, 5 and 6
	  Bond speed = all slaved nics speed summed up.

	Bug-Url: https://bugzilla.redhat.com/1007860

2013-10-21  Eduardo Warszawski  <ewarszaw@redhat.com>

	Rename Image.copy() to Image.copyCollapsed().
	Renaming this method in order to clarify it's result and
	differentiate it from dict.copy()

2013-10-20  Mooli Tayer  <mtayer@redhat.com>

	minor changes in libvirt connection
	change logging levels and use functools.wraps

2013-10-20  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: Fix vdsm.prerm of Ubuntu packaging scripts
	On Ubuntu, qemu-sanlock.conf is not used, so there is no need to
	restore it during the packaging removal.

2013-10-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	New getChildrenList implementation.
	This implementation returns children of any image on the SD.
	Avoids to produce each volume in the domain.

	Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=960952

2013-10-20  Nir Soffer  <nsoffer@redhat.com>

	tests: Minor cleanup in monkeypatch module and tests

2013-10-20  Dan Kenigsberg  <danken@redhat.com>

	testValidateBondingOptions: declare root requirement
	Our Bond.validateOptions() and and its test require root permissions.

2013-10-18  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: fix isoprefix KeyError for inactive domains
	In a recent change f9cf58b (Make getRepoStats() a hsm method) a
	new regression was introduced that causes a KeyError on isoprefix
	for inactive domains.

	In this patch:
	* fix the isoprefix KeyError for inactive domains
	* fix indentation for a related block of code

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1020543

2013-10-18  Russ Herrold  <herrold@owlriver.com>

	tests: typo fix
	typo fix of package name

	Bug-Url: https://bugzilla.redhat.com/1020484

2013-10-17  Antoni S. Puimedon  <asegurap@redhat.com>

	Make link state change monitoring use an async proc

2013-10-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: libvirt configuration detection should skip /dev/null
	We disabled libvirt-sanlock in Ubuntu, so QLCONF is set to /dev/null,
	and later we need to grep "${BY_VDSM_VERS}" from QLCONF to confirm
	libvirt is configured. grep returns 1 for /dev/null but actually libvirt
	is configured. This patch skip /dev/null when grep libvirt .conf files.

	Packaging: fix ./configure option for libvirt environment file
	The help string "=FILE" is incorrectly added to the name of the
	configure option --with-libvirt-service-default. So This patch moves
	"=FILE" to help string.

2013-10-16  Allon Mureinik  <amureini@redhat.com>

	sd.py: Remove sds from sdCache when connecting
	When connecting to a storage server, pre-existing domains should be
	removed, since we have no way of knowing what happened to these
	domains in the meanwhile.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=950055

2013-10-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding dependency on cpopen formal package
	Removing cpopen code from vdsm and using formal package instead

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=903246

2013-10-16  Nir Soffer  <nsoffer@redhat.com>

	tests: Add monkey patching class decorator
	Using the new MonkeyClass decorator, you can do monkey patching during
	all test methods in a test case class, without implementing setUp() or
	tearDown().

2013-10-15  Antoni S. Puimedon  <asegurap@redhat.com>

	Drop evil exception swallowing form removeNic

2013-10-15  Dan Kenigsberg  <danken@redhat.com>

	fix [start|stop]MonitoringDomain introduction version
	vdsm-4.13.0 was released without this new verb, which should be
	available only in vdsm-4.14.

2013-10-14  Federico Simoncelli  <fsimonce@redhat.com>

	stats: return domain lockspace status

2013-10-14  Nir Soffer  <nsoffer@redhat.com>

	tests: Add Patch class for fixture monkey patching
	MonkeyPatch decorator is useful when you want to monkey patch some
	modules during one test and use different or no monkey patcing during
	other tests.  However, when monkey patching all methods in a test case
	class, using a decorator is tedious, leads to duplicate code and hamper
	readability.

	This patch adds a Patch object for monkey patching during all tests in a
	test fixture. New tests cover both MonkeyPatch decorator and new Patch
	object and serve as example code.

2013-10-14  Martin Betak  <mbetak@redhat.com>

	vdsm: Remove dead code in MigrationSourceThread.run
	Removed the mstate variable and the corresponding if as the
	variable was not used otherwise and the condition always true.

2013-10-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	Adding [start|stop]MonitoringDomain().
	startMonitoringDomain() is added for monitoring a storage domain
	without being connected to the pool and geting and ID for such
	SD lockspace.

	stopMonitoringDomain() stops the monitoring and releases the ID.

	Monitoring results are gathered with repoStats().

	Caveat Emptor:
	SDs added to the monitor using startMonitoringDomain() should not
	be part of the pool! i.e. the pool domain set and the added SDs set
	should be disjoint.

	Making repoStats pool independent.

	Make getRepoStats() a hsm method.
	Making repoStats pool independent.

2013-10-14  Dan Kenigsberg  <danken@redhat.com>

	fix premature selinux dependency
	Vdsm v4.13.0 places its storage repository under /var/run/vdsm/storage
	instead of the non-standard trademarked /rhev/data-center. This change
	requires a compatible change to selinux which would be available only
	when selinux-policy-3.7.19-195.el6.13 is released.

	Until then, to try out vdsm on EL6, one should set selinux to permissive mode or manually

	    sudo semanage fcontext -a -s system_u -t virt_var_run_t -r s0 '/var/run/vdsm(/.*)?'

2013-10-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving coredump configuration to common script

2013-10-12  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Refactoring the device dict creation
	The device dictionaries are created on multiple different locations and
	explicitly.
	To avoid this duplication we're now moving it to one location where we
	define an immutable tuple of tuples and generate the dictionaries from
	there.

2013-10-11  Eduardo Warszawski  <ewarszaw@redhat.com>

	Read pool metadata once in StoragePool.getInfo()
	The behavioural change of spm_id should be safe since
	StoragePool.getInfo() call in  hsm.getStoragePoolInfo() is under
	the (shared) pool lock making startSpm block in this host when
	the info is retrieved.

	Making repoStats pool independent.

2013-10-11  Miguel Angel Ajo  <miguelangel@ajo.es>

	vdsm hooks: this patch provides after/before_network_setup hooks.
	This enables the capability to interact with physical network
	management interfaces, setting up extra parameters, or
	interacting with switches, etc.

	It also introduces a standard testing decorator for hook
	testcases.

2013-10-11  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Bump kernel requires version to pass testSetupNetworksMtus on F19
	It's found that testSetupNetworksMtus fails on F19 because of the
	broken promiscuity reference counting issue in kernel. It has been
	fixed in kernel-3.11.3-201.fc19. With the updated kernel, the test
	testSetupNetworksMtus can pass. For detailed information, please see:
	https://bugzilla.redhat.com/show_bug.cgi?id=1005567

	This problem doesn't exist in RHEL6 because it's triggered by a new
	kernel change. So we don't need any fix for rhel kernel.

2013-10-11  Aravinda VK  <avishwan@redhat.com>

	gluster: Fix output format compatibility of removeBrickStatus
	Rebalance status and Remove brick status have common output structure,
	engine uses common code to parse the vdsm output of both verbs.

	This patch fixes the incompatibility in remove brick status output.
	(As this verb is not consumed by engine/RHS-C yet, its OK to differ
	in compatibility now)

	Output:
	    {'summary': {
	        'filesScanned': INT,
	        'filesMoved': INT,
	        'filesFailed': INT,
	        'filesSkipped': INT,
	        'totalSizeMoved': INT,
	        'status': STRING
	    },
	    'hosts': [{
	        'name': STRING,
	        'filesScanned': INT,
	        'filesMoved': INT,
	        'filesFailed': INT,
	        'filesSkipped': INT,
	        'totalSizeMoved': INT,
	        'status': STRING
	    }..]}

2013-10-11  Nir Soffer  <nsoffer@redhat.com>

	tests: refactor remoteFileHandler truncateFile tests
	The old test was too big, causing one test to fail if the other failed.
	Now there are 2 separated tests, sharing setup, teardown and check
	methods.

	Additionally, creation of the test file is more correct, and the code is
	hopefully more readable.

2013-10-11  Federico Simoncelli  <fsimonce@redhat.com>

	test: add ddWatchCopy append tests

2013-10-11  Antoni S. Puimedon  <asegurap@redhat.com>

	Remove redundant file closing

2013-10-10  Antoni S. Puimedon  <asegurap@redhat.com>

	Properly cleanup after using bond in test

2013-10-10  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	vm: add the transient disk support
	A transient disk is a temporary qcow layer based on a (usually
	internal) volume that is attached to a VM in read-write mode.
	All changes stored in the transient disk will be lost as soon
	as the disk is hot-unplugged or when the VM exits.
	Its primary use is to access in read-write mode a snapshot
	(read-only volume).
	Libvirt doesn't support transient disks yet, hence this patch
	includes also all the required parts to fill that gap.

2013-10-10  Martin Polednik  <mpoledni@redhat.com>

	virtTests: fix initramfs permission detection
	Initramfs and kernel permission was being detected using os.access
	which caused running tests as root or user with permissions
	to read initramfs and kernel when vdsm did not have these permissions
	to fail the tests without creation if temporary initramfs
	as os.access would see it as readable while it in fact was not.

	This patch replaces os.access call with os.stat call,
	which checks for permissions of >004 to make sure that
	vdsm user can or can't read initramfs

2013-10-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing unnecessary subshell call

2013-10-10  Antoni S. Puimedon  <asegurap@redhat.com>

	Ifcfg: Fix file writing races
	On a fast enough computer, it could very well happen that we'd do:
	    open('foo', 'w').write('moo')
	    execCmd(['cat', 'foo'])

	And that the content that 'cat' would show for foo would not be 'moo'
	but whatever was there before the write, due to the file closing
	happening at a non deterministic point of time.

	How was this horribly edgy case unearthed? Good question!

	Let's say we have a bond0 with slaves em2 and em1. We are in the
	process of removing the bond completely.

	removeNic basically stripes the nic ifcfg file of everything except
	the hwaddr, device type, etc. So, if there was previously for nic em1
	MASTER=bond0

	after removeNic, there is an ifup of em1 (to leave the link state up)
	that would still see bond0 as master. That in turn would make
	initscripts trigger ifup of bond0, but that ifcfg file no longer
	exists, ifup fails, raises an exception, and the whole removal is
	rolled back.

	Needless to say, this was unfindable with the debugger, as the file
	close would be fast enough due to the debugger slowing down operation.

2013-10-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing libvirt_configure from pre-start and ask for manual run
	Before starting vdsmd we need to add vdsm configuration to
	libvirtd.conf. This part is performed by vdsm-tool libvirt_configure
	verb. Currently we call it as part of init script pre-start function,
	but doing that must follow restart of depended services as libvirtd. We
	don't want to restart services as part of vdsmd init script, so this
	patch detach the auto reconfigure and report to user to perform it
	manually if attempt to start vdsmd without having libvirtd.conf
	configured.
	Performing start\stop actions on external services during service start
	is invalid and can lead to bugs in different service managers.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1013371

2013-10-10  Federico Simoncelli  <fsimonce@redhat.com>

	oop: improve safety for truncateFile
	In order to make truncateFile safer and to avoid any confusion on its
	behavior:

	* a new comment has been added mentioning O_TRUNC and "w" to avoid any
	  future mistake in this area
	* a new test has been added to check the expected outcomes
	* the "w" mode has been removed from truncateFile (used in os.fdopen)
	  to prevent any future reconversion to open(path, "w")
	* the risk of a file descriptor leak (for a failing os.fdopen call)
	  has been removed using the relevant posix calls

2013-10-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Changing return method from vdsmd start function

2013-10-10  Antoni S. Puimedon  <asegurap@redhat.com>

	testrunner P_VDSM path fix
	when running run_tests_local.sh the tests that want to find modules
	that would usually be installed to /usr/share/vdsm should look in
	$repo_root/vdsm instead of $repo_root.

2013-10-09  Saggi Mizrahi  <smizrahi@redhat.com>

	Tests: Fixed resource manager stress test
	It now should perform more reliably and reduce side effects. Can be now
	be run even on weaker hosts though the test will be less effective.

2013-10-09  Eduardo Warszawski  <ewarszaw@redhat.com>

	More precise catch in block volume create.
	Narrow the exception when failed to deactivate a new created
	volume.

2013-10-09  Antoni S. Puimedon  <asegurap@redhat.com>

	configNetwork Missing space in error string

2013-10-08  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netconf: Sort bond's slave when objectivizing
	To make iproute2 configurator pass testBondHwAddress, we need keep
	the bond's slaves sorted. Otherwise bond's hwaddr will vary with the
	order of enslaving. This work is done by initscript for ifcfg
	configurator. The patch restores the nicSort function to get the
	same order of initscript does.

2013-10-08  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: protect deleteImage with the spm lock

2013-10-08  Eduardo Warszawski  <ewarszaw@redhat.com>

	Make hsm.getVolumesList() pool independent.
	Related to BZ#960952.

2013-10-08  Yeela Kaplan  <ykaplan@redhat.com>

	image: Calculation of chain to remove is inaccurate
	The if condition will always return false,
	therefore list 'rmChain' will always be composed of only one volume.

2013-10-08  Dan Kenigsberg  <danken@redhat.com>

	caps: coarse-grain libvirt.rpm may be missing
	As of http://gerrit.ovirt.org/15761 we no longer require the legacy
	libvirt.rpm to be installed on Fedora, so getCaps should not look for
	it. Instead, it should report the information of the installed
	libvirt-daemon-kvm.rpm.

	Without this patch we get an annoying
	    (_getKeyPackages) rpm package libvirt not found
	log message, and do not report libvirt's version.

2013-10-08  Federico Simoncelli  <fsimonce@redhat.com>

	fileVolume: fix volume type check in _extendSizeRaw
	This patch fixes the volume type check in _extendSizeRaw and improves
	the size checks.

2013-10-08  Eduardo Warszawski  <ewarszaw@redhat.com>

	Avoid redundant check for volume create rollback.
	The same check will be called during volume delete.
	In addition removing createVolumeRollbackError, code 228.

	Related-to: BZ#960952

2013-10-08  Yeela Kaplan  <ykaplan@redhat.com>

	image: produce volume in order to shrink after merge
	Create of new volume in case of raw base volume,
	causes us to work on a stale object when shrinking
	the merged volume.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015071

2013-10-08  Bala.FA  <barumuga@redhat.com>

	gluster: remove unwanted error codes
	This patch fixes to remove unwanted error codes which are no longer
	needed.

2013-10-07  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix getStorageDomainInfo() logic.
	Domains with 'role' == MASTER_DOMAIN should always be attached
	to a pool.
	Detect 'stale' master domains.
	Not hiding errors anymore.
	Catching specific errors.

	BC: If the domain is a Master but it is not connected to the actual
	(host) pool, master_ver, host_id and lver are not returned.

	Required for making repoStats pool independent.

2013-10-07  Dan Kenigsberg  <danken@redhat.com>

	vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
	_getUnderlyingDriveInfo() is broken by design. It has no reliable means
	to match Engine-requested devices with libvirt-produced ones. As a
	heuristic, it uses the device's as matching key. However, before this
	patch, it failed to extract the path from the xml definition of gluster
	disks.

	Bug-Url: https://bugzilla.redhat.com/1007980

2013-10-05  Antoni S. Puimedon  <asegurap@redhat.com>

	Drop single use inheritance
	There is only one class inheriting from Device, VmDevice. Device
	has no instances, so it is better to drop it altogether in favor
	or VmDevice, which is inherited from a sizeable amount of times.

2013-10-04  Timothy Asir  <tjeyasin@redhat.com>

	gluster: fix integer overflow error in rebalance status
	Provides rebalance status values as strings to avoid overflow error
	when a rebalance status values exceeds the XML-RPC limits

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1012393

2013-10-04  Assaf Muller  <amuller@redhat.com>

	Unified network persistence [2/4] Respond to setSafeNetworkConfig
	This patch adds setSafeNetwork capabilities to the unified
	persistence model. At this stage, it is able to store the running
	configuration to /var/lib/vdsm/persistence/netconf/{nets,bonds}
	in an atomic way so that it will be available after reboot.

	In the following patches there should be added a service that
	calls a configurator flushing system that deletes the configurator
	persistence bits before networking goes up and instead uses the
	unified persistence to restore the network configuration.

	Unified network persistence [1/4] - Save running config
	This patch introduces the new persistence model for vdsm networking.
	It is meant to provide a single reliable way abstracting persistence
	out of the netconf configurators as much as possible.

	To achieve its purpose, it stores the network actions as setupNetwork
	parameters serialized in json which are then used for rollback and
	initialization.

	The first patch in the series saves the current state of networks,
	nics and bonds to a folder.
	The second patch copies the contents of the running config folder
	to a startup config folder
	The third patch uses the startup config folder to restore network
	configuration to the host upon host boot up.

2013-10-04  Bala.FA  <barumuga@redhat.com>

	gluster: add task support
	gluster volume operations like rebalance, replace-brick, remove-brick
	are async operations which needs to be tracked as async tasks in
	oVirt. This is done by introducing below new verbs.

	New verb:
	* glusterTasksList
	    - return value structure:
	        {TASKID: {
	                  "volume": VOLUMENAME,
	                  "status": TaskStatus,
	                  "type": TaskType,
		          "bricks": [BRICK1,..],
			  "data": SUMMARY
	                  }, ...}

2013-10-04  Peter V. Saveliev  <peet@redhat.com>

	vdsm: support VIR_MIGRATE_ABORT_ON_ERROR
	Abort VM migration on EIO by default. The flag is supported
	since libvirt 1.0.1 upstream, so use it only in appropriate
	cluster versions.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=961154

2013-10-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix vdsClient.repoStats() bad path.
	(Or why using your list as a dict is bad.)

	vdsClient: is list a dict?
	Short answer: NO!

	Enable VM migration to old vdsm's.
	Old vdsm's can't run VM from /var/run/vdsm/storage and rely on
	/rhev/data-center hierarchy.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1011608

2013-10-04  Dan Kenigsberg  <danken@redhat.com>

	Reintroduce afterMigrationStatus
	In http://gerrit.ovirt.org/19306 I was fooled to believe that we can
	drop the unused afterMigrationStatus parameter. However vdsm version
	prior to that change (e.g. that of ovirt-3.3.0) expect to delete it.

2013-10-02  Antoni S. Puimedon  <asegurap@redhat.com>

	Manage and fix test dummies handling -> module level
	We can handle the dummies at the global level so that less work needs
	to be done per test and the cleanupNetwork decorator doesn't miss
	the dummies that were previously already destroyed at that stage.

	The reutilization of the dummy interfaces exposed two bugs in the
	current tests in their cleaning up phase that this patch addresses
	as well.

2013-10-02  Mooli Tayer  <mtayer@redhat.com>

	Text: add 'dstqemu' to vds client migration command description
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1007686

2013-10-02  Nir Soffer  <nsoffer@redhat.com>

	readme: how to configure libvirt after manual installation
	When vdsm is installed automatically, libvirt is configured during the
	bootstap flow. However, when installing vdsm manually the user must
	configure and restart libvirt using vdsm-tool.

2013-10-01  Nir Soffer  <nsoffer@redhat.com>

	Fix tokenizing of unsupported data in vdsmapi-schema.json
	vdsmapi tokenizer got into an endless loop when unsupported token was
	found. Example input trigering this are invalid tokens such as unquoted
	string, or valid JSON tokens like null, true and false, which are not
	supported by the parser.

	Now the tokenizer raise ValueError with the offending data. This should
	be good enough for developers usage.

	New unittests cover tokenizing valid, invalid and unspported tokens.

2013-10-01  Mooli Tayer  <mtayer@redhat.com>

	Alphabetize test modules list that has gone out of order.

	libvirtconnection: ping libvirt upon disconnection
	Upon recieving an error from libvirt we should ping it
	(using getLibVersion) and only upon failure treat it as down.

	Libvirt error codes do not distinguish recoverable from non-recoverable
	libvirt errors.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982634

2013-10-01  Martin Polednik  <mpoledni@redhat.com>

	vdsClient: hibernate now sends required hiberVolHandle
	- vdsClient did not pass hiberVolHandle, causing it to fail any attempt
	to hibernate
	- BindigsXMLRPC defaulted required parameter to None

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=802446

2013-09-30  Shahar Havivi  <shaharh@redhat.com>

	vdsm: add support for ram/vram on QXL device
	setting support for qxl device with proper ram/vram attributes:

	1 Monitor, Single PCI checked     64MB   32MB
	2 Monitors, Single PCI checked    128MB  32MB
	4 Monitors, Single PCI checked    256MB  32MB

	Bug-Url: https://bugzilla.redhat.com/787578

2013-09-30  Federico Simoncelli  <fsimonce@redhat.com>

	vm: shared attribute backward compatibility
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1011608

2013-09-29  Eduardo Warszawski  <ewarszaw@redhat.com>

	Convert guids into mapper devs for extend blockSD
	After I1ec54147205992ac130684d01e73cd7aceccad48, which changed
	multipath.getMPDevNamesIter() to return full paths,
	HSM.extendStorageDomain() guids param should be converted accordingly.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1012944

2013-09-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	Workaround to avoid password request when starting vdsmd service
	During start of vdsmd we shutdown conflicting services. As part of this
	we try to stop libvirt-guests. `service libvirt-guests stop` tries to
	access libvirtd which requires sasl authentication.
	This patch removes libvirt-guests lockfile instead of stopping the service.

	The patch should be reverted after a fix for:
	https://bugzilla.redhat.com/show_bug.cgi?id=1011981 will be available
	(Comment was added above the change to keep tracking the issue)

	The workaround was part of vdsmd init script already in the past and was
	removed by mistake.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1010693

2013-09-28  Martin Polednik  <mpoledni@redhat.com>

	vdsProxy pass calls to undefined methods to API and return msg/status
	Currently, every API call to be made has to be appended to utils.py in
	order to be accessible by vdsProxy instance, this patch removes this
	need for calls where only status and msg return values are relevant and
	therefore reducing code (and api) duplication

2013-09-27  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm: Load softdog if hardware watchdog is not available
	On Ubuntu softdog is not loaded automatically. When there is not
	hardware watchdog available, we have to load softdog to make wdmd and
	sanlock work properly.

	This patch detects /dev/watchdog during vdsmd startup and load softdog
	if /dev/watchdog does not exist.

2013-09-26  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Ubuntu: packaging: keep up with vdsm.spec.in
	In vdsm.spec.in we add new files and folders, so add those files and
	folders to Ubuntu packaging scripts as well.

2013-09-26  Mark Wu  <wudxw@linux.vnet.ibm.com>

	tests: Fix testBondHwAddress for fedora kernel
	In relatively new kernel, the hwaddr of bonding will be set to a
	random address when the last slave is released. You can find it in:
	https://github.com/torvalds/linux/blob/master/drivers/net/bonding/bond_main.c#L1824

	So to make the testBondHwAddress pass on fedora, we need backup the
	hwaddr before destroy it.

2013-09-26  Dan Kenigsberg  <danken@redhat.com>

	net tests: setupNetworks over exiting USED bond
	Currently testSetupNetworksAddOverExistingBond fails, but only because
	it is too strict: it does not allow the bonding device to change its
	state even when it has no users. However, if the bond is not used, we
	actually WANT it to be reconfigured (e.g. if its MTU is to be set to a
	lower value).

	Thus the tests is amended so that it would fail only if bond0 changes
	its operstate while it is being used by a birdgeless network.

2013-09-25  Federico Simoncelli  <fsimonce@redhat.com>

	sd: use the correct default for LEASE_TIME_SEC
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1011505

2013-09-25  Sandro Bonazzola  <sbonazzo@redhat.com>

	systemd: vdsmd: fixed sanlock requirement
	Added missing .service.

2013-09-25  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix duplicate port mirrorring when reattaching vm
	When there is a VM running with port mirrorring defined, the fact
	that a vdsm restart re-attaches by "recreating" the vdsm vm object
	makes it run setPortMirroring again. This caused every vdsm restart
	to add a mirrorring duplication.

	Bug-Url: https://bugzilla.redhat.com/1001704

2013-09-25  Timothy Asir  <tjeyasin@redhat.com>

	gluster: bug fix for listing and adding hook
	Earlier, with regard to gluster hooks there would be definitely a pre and post
	directory for each and every gluster command. But presently, if either pre
	or post script is not present there will be no pre or post directories also.
	Therefore, if there is no such directories available the gluster hook list
	will simply omit it.
	When a gluster hook is added if pre or post directories are absent, they
	will be created accordingly, then the hook will be added.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=999795

2013-09-25  Yeela Kaplan  <ykaplan@redhat.com>

	iscsiadm: Filter out IPv6 addresses when discovering targets
	This patch is not diminishing any capabilities we have, since we
	currently don't support ipV6 targets in vdsm.

	When discovering targets on Netapp storage we get a return value that
	includes both IPv4 and IPv6 addresses.

	The only thing I've changed is preventing vdsm from failing discovery
	because of getting an unexpected response from iscsiadm (our parser is
	very hardcoded).

	If we decide to support ipV6 addresses for discovery, login and managing
	the connection then it needs to be addressed separately.

2013-09-24  Vitor de Lima  <vitor.lima@eldorado.org.br>

	deployUtil: Remove null character from the id on IBM POWER
	The hardware id for IBM POWER machines had a trailing null character that
	caused errors in the oVirt engine. (This patch was also submitted to the
	oVirt host deploy project).

2013-09-23  Sandro Bonazzola  <sbonazzo@redhat.com>

	packaging: spec: selinux-policy-targeted requirements
	fixed selinux policy-targeted requirements for fedora.

2013-09-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	supervdsmServer was not passing kwargs to fuser
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1006203

	respawn script fix: Adding -- after logger arguments and using $*
	Without using -- the usage of $@ in the string can count as more arguments to
	logger call instead of part of the string. This crashes the respawn process.

	The replacement of $@ to $* is to avoid spaces during the print.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=986635

2013-09-21  Greg Padgett  <gpadgett@redhat.com>

	vdsm-tool: update wording of libvirt/supervdsm restart message
	Update wording of message telling the user what to run in order to
	restart libvirt and supervdsmd.

2013-09-20  Petr Sebek  <psebek@redhat.com>

	Fix missing bootproto line
	Bootproto of new network was overwritten by value in ifcfg file. That
	file lacked BOOTPROTO value and therefore it was stated as None value
	(not str).

	Bootproto was deleted by function _removeConfigValues because deleted
	vlan called function vlan.device.remove() -> Nic.remove().

	Patchset 4 fixes usecase tested by testAddVlanedBridgeless_oneCommand.

	Patchset 6  log ifcfg files that are written
	            fixes usecase tested by testAddVlanedBridgeless
	            added function isBond() to NetDevice

	Patchset 7  removed needless functions removeIfaceCleanup and
	            _removeConfigValues
	            in _getIfaceConfValues is given priority to network setup
	            over current configuration in cfg file

	Bug-Url: https://bugzilla.redhat.com/980174

2013-09-20  Juan Hernandez  <juan.hernandez@redhat.com>

	Fix pep8 issue in SecureXMLRPCServer
	Commit 35c571 introduced a pep8 issue (an extra blank line) that
	produces failures in continuous integration jobs.

2013-09-20  Bala.FA  <barumuga@redhat.com>

	gluster: Using XML output for rebalance/remove-brick status verbs
	Modified rebalance/remove-brick status output to consume XML
	output provided by gluster cli command.

	Modified verbs(As below verbs are not consumed by engine/RHS-C yet,
	its OK to differ in compatibility issue now)
	glusterVolumeRebalanceStatus
	glusterVolumeRemoveBrickStatus

	Output:
	    {'summary': {
	        'filesScanned': INT,
	        'filesMoved': INT,
	        'filesFailed': INT,
	        'filesSkipped': INT,
	        'totalSizeMoved': INT,
	        'status': STRING
	    },
	    'hosts': [{
	        'name': STRING,
	        'filesScanned': INT,
	        'filesMoved': INT,
	        'filesFailed': INT,
	        'filesSkipped': INT,
	        'totalSizeMoved': INT,
	        'status': STRING
	    }]}

2013-09-19  Juan Hernandez  <juan.hernandez@redhat.com>

	Log client address on SSL errors
	We used to write to the log the IP address of the client when an SSL
	error occurred. With the introduction of cached SSL sessions this
	stopped working. This patch modifies the SSLServerSocket class that was
	introduced in order to implement cached SSL sessiosn so that when an SSL
	error is detected while accepting a connection the IP address of the
	client will be added to the message of the exception, and thus written
	to the log as part of the traceback, for example:

	  BindingXMLRPC::ERROR::2013-09-17
	  20:34:25,901::BindingXMLRPC::72::vds::(threaded_start) xml-rpc handler exception
	  Traceback (most recent call last):
	    File "/usr/share/vdsm/BindingXMLRPC.py", line 68, in threaded_start
	      self.server.handle_request()
	    File "/usr/lib64/python2.7/SocketServer.py", line 280, in handle_request
	      self._handle_request_noblock()
	    File "/usr/lib64/python2.7/SocketServer.py", line 290, in _handle_request_noblock
	      request, client_address = self.get_request()
	    File "/usr/lib64/python2.7/SocketServer.py", line 463, in get_request
	      return self.socket.accept()
	    File "/usr/lib64/python2.7/site-packages/vdsm/SecureXMLRPCServer.py", line 128, in accept
	      raise SSL.SSLError("%s, client %s" % (e, address[0]))
	  SSLError: sslv3 alert certificate unknown, client 192.168.122.1

	Note the text "client 192.168.122.1" added to the last line of the
	traceback.

	Bug-Url: https://bugzilla.redhat.com/983630

2013-09-19  Federico Simoncelli  <fsimonce@redhat.com>

	blockVolume: round up volume size for createVolume
	The logical volume size granularity used in lvm(.py) is 1Mb, therefore
	the size in sectors should be aligned. When the size is particularly
	small this also prevents failing lvcreate calls with size 0m.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1009086

2013-09-19  Martin Polednik  <mpoledni@redhat.com>

	vdsm: remove afterMigrationStatus
	The expectation for afterMigrationStatus was dropped before ovirt-3.0,
	as part of https://bugzilla.redhat.com/609417. Versions prior to
	ovirt-3.0 are no longer supported, thus we may finally remove this.

2013-09-19  Sergey Gotliv  <sgotliv@redhat.com>

	Fix parent volume rollback after failure to create snapshot
	1. Calling teardown() without prepare() throws an exception
	2. Narrowing try/except block
	3. Moving call to teardown() to finally block
	4. Remove redundant internal "if"

	Bug-Url: https://bugzilla.redhat.com/982004

2013-09-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	multipath.getMPDevNamesIter() return /dev/mapper.
	multipath names return the /dev/mapper part of the path for
	consistency with lvm module.

	Normalize lvm._buildFilter().

	Introduce lvm short filters.
	lvm commands that operate in a known VG can use the known pvs for
	filter.

2013-09-18  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: VDSM v4.12.0 packaged on Ubuntu
	Add files for building VDSM .deb packages on Ubuntu. The package is
	split into vdsm-python, vdsm-client, vdsm, vdsm-tests ,various vdsm
	hooks, vdsm-python-cpopen vdsm-yajsonrpc and vdsm-gluster.

	How does it work.
	The deb packaging scripts are written according to Debian New
	Maintainers' Guide [1]. We use dh_make, quilt and -buildpackage to do
	the packaging. All files unde the sub-dir debian are related to
	packaging. The most important ones are as follow.

	debian/changelog
	This file declares the deb package version.

	debian/control
	This file declares the dependency packages and other basic informations

	debian/rules
	This file is an executable Makefile. During the packaging process, it
	calls dh_XXX helpers to do the things. We can override some of the stages to
	provide custom actions. In this rule file, the following build options
	are used.
	1 Do not configure libvirt to use sanlock, since it's not supported on
	Ubuntu.
	2 Do not configure libvirt to use selinux and apparmor. Becuase apparmor
	is conflicting with VDSM, and libvirt on Ubuntu does not compiled with
	selinux support, so just do not use the security driver of libvirt.
	3 Hooks are enabled and built into respetive packages.

	debian/package-name.install
	Describe files go to the respective sub .deb packages. The directory
	containing the file is created automatically.

	debian/package-name.dirs
	Any dir that is not created automatically by the .intall file.

	debian/vdsm.postinst
	debian/vdsm.postrm
	debian/vdsm.preinst
	debian/vdsm.prerm
	These four files are maintainer scripts. They are like %pre %post %preun
	and %postun in a RPM .spec file. They are run before VDSM package is
	intalled, upgraded, and removed. The Debian upgrading process is not
	like RPM.
	Script execution order when updating a RPM [2]
	     %pre of new package
	     (package install)
	     %post of new package
	     %preun of old package
	     (removal of old package)
	     %postun of old package
	Script execution order when updating DEB [3]
	    old->prerm upgrade new_ver
	    new->preinst upgrade old_ver
	    (new files are unpackad)
	    old->postrm upgrade new_ver
	    (old files are deleted)
	    new->postinst configure old_ver
	So you will see the contents of these file is very different with
	vdsm.spec.in. Another difference is Debian do not generate .pyc files
	when packaging, instead, it just ship .py files and after install,
	compile the .py to .pyc according to /etc/python/debian_config [4]. The
	postinst and prerm scripts do this automatically if we include the
	string "#DEBHELPER#". This means actions calling the .pyc files should
	happen after the .pyc files are generated.

	Other files are just boilerplates to fill.

	There are some dependencies that are too old or not available on Ubuntu.

	python-ethtool
	Too old. The official maintainer does not work on it any longer. So we
	have to download the source package and repackage it using the latest
	upstream.

	python-pthreading
	Not available on Ubuntu, need to create .deb packages.

	python-rtslib
	Ubuntu provide the official version, but in functional tests we use the
	Fedora forked version. The two versions are not compatible. Now we do
	not add python-rtslib dependency to vdsm-tests. The user can install the
	Fedora forked version by "pip install rtslib-fb", if they want to run
	functional tests.

	sanlock
	Too old. The official maintainer does not work on it any longer, but he
	helps me and provide new version of sanlock packages. These new packages
	are not in Debian official repository unless they are well tested. For
	now we can host these packages together with VDSM .deb package. The
	packages are for Debian, thus I made a little change to fit into Ubuntu.

	libvirt-sanlock
	libvirt-sanlock is not available on Ubuntu, but it's in Debian "sid",
	the next Debian release. Not sure Ubuntu will take lbvirt-sanlock in
	next release. So now just drop libvirt disk locking.

	I re-packaged python-ethtool, and packaged python-pthreading from sratch.
	sanlock pakcages are provided by the original maintainer, and I modified
	it to suit into Ubuntu. The packages are put on launchpad.net [5]. To test
	the package, firstly setup a Ubuntu 1304 server, then run the following
	command.

	add-apt-repository ppa:zhshzhou/vdsm-ubuntu
	add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.4
	aptitude update
	aptitude install python-pip vdsm vdsm-gluster vdsm-tests vdsm-client
	pip install rtslib-fb
	chmod a+r /boot/vmlinuz* /boot/initrd.img*
	cd /usr/share/vdsm/tests
	./run_tests.sh functional/virtTests.py functional/storageTests.py

	[1] http://www.debian.org/doc/manuals/maint-guide/index.en.html
	[2] http://fedoraproject.org/wiki/Packaging:ScriptletSnippets
	[3] https://wiki.debian.org/MaintainerScripts
	[4] http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html#s-byte_compilation
	[5] https://launchpad.net/~zhshzhou/+archive/vdsm-ubuntu

2013-09-18  Petr Sebek  <psebek@redhat.com>

	Change of ConfigWriter._createConfFile parameters
	ifcfg.ConfigWriter._createConfFile now accepts _ipConfig object instead
	of number of arguments. It helps to reduce number of arguments passed

2013-09-17  Alon Bar-Lev  <alonbl@redhat.com>

	packaging: spec: own /etc/pki/vdsm/libvirt-spice

2013-09-17  Federico Simoncelli  <fsimonce@redhat.com>

	sp: update lease parameters on masterMigrate
	Given the current API the lease parameters should be considered pool
	metadata (since they're passed to vdsm in createStoragePool and in
	reconstructMaster). On the contrary the implementation is (rightfully,
	you might argue) storing these values in the domain metadata.

	On master migrate we should copy the lease parameters from the old
	master to the new one in order to maintain the appropriate values.

	In this patch:
	- update lease parameters on masterMigrate
	- relax the default parameters

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=999343

2013-09-17  Yeela Kaplan  <ykaplan@redhat.com>

	hsm: deleteImage fails because of wrong dictionary use
	also, get fake template params before deleting the template.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=964649

2013-09-16  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: fix updateVolumeSize for raw volumes

2013-09-16  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing automatic restart of services in libvirt-reconfigure
	libvirt-reconfigure also restarted libvirtd as post reconfigure operation. The
	restart is required but there is no reason and its not expected to perform it
	automatically as part of the reconfigure operation.

	Restart also required to supervdsmd service (as described in the
	Bug-Url). Instead of restarting both, this patch prints message to user to
	preform the restart manually.
	To make it easier and centralized the patch also adds
	libvirt-configure-services-restart command that restart related services
	after reconfigure.

	For backward compatibility with systemd, this also update
	systemd-vdsmd script to restart libvirtd and supervdsmd services in
	previous versions.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=999853

2013-09-16  Federico Simoncelli  <fsimonce@redhat.com>

	imageSharing: return proper size in httpGetSize
	When importing images from OpenStack Glance the Content-Length is 0
	so we need to override the value with the content of the custom header
	X-Image-Meta-Size.

2013-09-16  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netconf: Fix the mtu of bond/nic not being set for new network
	The configuring should not be skipped if the new vlaned network
	over the bond or nic has a bigger mtu than current.

	This patch fixes the testSetupNetworksMtus functional test, broken by
	http://gerrit.ovirt.org/17491.

	Bug-Url: https://bugzilla.redhat.com/1004196

2013-09-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Handling errors in daemonAdapter
	This patch adds --syslog arguments to daemonAdapter, this option is
	needed in order to catch and log possible failures when vdsm is run via sysv,
	which does not capture stderr of the service script (which is used by
	default).

	This patch also introduces daemonAdapter class to simplify the implementation.

	Modification in lockfile usage mechanism as part of sysv init script
	The problem:
	Start can run if lock is free and respawn pid is not exist. Currently we keep
	holding the lock until the service is stopped. It means, that if the
	process that was initiated (the respawn prcoess) was crashed, we still hold
	the lock (as we didn't stop it by service stop) and this blocks us from
	initiating new instance. We acquire lock when start, and release it only after
	stop.

	The solution:
	Using flock to avoid multi instances of the init script. Vdsm execution
	is performed in subprocess and it releases the locked fd before starting
	the respawn process.

2013-09-15  Amador Pahim  <apahim@redhat.com>

	vdsClient: Fix str/unicode concatenation issue.
	"vdsClient -s 0 getVmsInfo <spUUID>" command fails with error:
	Error using command: 'ascii' codec can't encode characters in position
	2001-2004: ordinal not in range(128)

	Here the snip from guest info xml causing the issue:
	...
	<app_list>Windows XP ¸üÐÂ (KB898461),Microsoft Kernel-Mode Driver Framework
	Feature Pack 1.9,RHEV-Tools 3.2.8,WebFldrs XP,RHEV-Serial 3.2.4,RHEV-Spice-Agent
	3.2.5,RHEV-Agent 3.2.5,RHEV-SSO 3.2.4,RHEV-USB 3.2.3,RHEV-Balloon 3.2.4,
	RHEV-Spice 3.2.3,RHEV-Block 3.2.4,RHEV-Network 3.2.4</app_list>
	...

	Positions 2001-2004 point for characters "¸üÐÂ".

	infos['vmlist'][entry] can be type str or unicode. When it happens to
	be unicode with characters out of ASC-II range, converted to str and
	concatenated with the given strings, the issue is triggered:

	To reproduce with python interpreter:

	>>> var = u'¸üÐÂ'
	>>> type(var)
	<type 'unicode'>
	>>> test = 'string' + str(var)
	Traceback (most recent call last):
	  File "<stdin>", line 1, in <module>
	UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal
	not in range(128)

	This patch is removing the str() conversion for infos['vmlist'][entry]. The result
	is 'message' variable as type unicode when infos['vmlist'][entry] is unicode.

	Also, to avoid stdout redir encode error, the messages print is encoded as UTF-8.

2013-09-14  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: Fix help string and usage for --disable-libvirt-sanlock
	Help strings in configure.ac for --disable-libvirt-sanlock and
	--disable-libvirt-selinux are as follow.

	  --disable-libvirt-sanlock
	                          disable libvirt sanlock plugin [default=yes]
	  --disable-libvirt-selinux
	                          disable libvirt selinux plugin [default=yes]

	From simplicity and disambiguation, we remove "[default=yes]". This
	patch changes the help string to as follow

	  --disable-libvirt-sanlock
	                          disable libvirt sanlock plugin
	  --disable-libvirt-selinux
	                          disable libvirt selinux plugin

	So there is no ambiguity of whether the feature is disbale or enabled
	by default. We also avoid suggesting user to use
	"--disable-libvirt-sanlock=yes|no" which is a bit confusing (at least to
	me). The user can just use "--disable-libvirt-sanlock" to disable it.

	This patch also fix the code logic related to ENABLE_LIBVIRT_SELINUX in
	libvirt_configure.sh.in to make it agree with the help string.

2013-09-13  Assaf Muller  <amuller@redhat.com>

	Functional Tests [3/3]: Added static source routing functional test

	Functional Tests [2/3]: Added ipwrapper.ruleExists+routeExists
	Added functional tests for both functions as well.

	We can now parse rules that contain '[detached]' - If you add
	rules for devices that don't exist (Or add rules for devices
	that do exist and then delete the device) then 'ip rule' outputs
	the rule with '[detached]'. We couldn't parse such rules.
	This is important because when cleaning up rules that the test
	added we first get rid of the dummy nic and only then get
	rid of rules.

2013-09-13  Federico Simoncelli  <fsimonce@redhat.com>

	lib: add create function to the qemuImg module

2013-09-12  Shu Ming  <shuming@linux.vnet.ibm.com>

	Nits: clean the magic number for seek()

2013-09-11  Federico Simoncelli  <fsimonce@redhat.com>

	vdsm-tool: handle missing sanlock pid file

2013-09-11  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: make libvirtd env file path and qemu process user group configurable
	In Ubuntu, qemu user is libvirt-qemu, qemu group is kvm. libvirt daemon
	environment file is /etc/default/libvirt-bin. This patch make these
	configurable by adding the following options.

	--with-libvirt-service-default=/etc/default/libvirt-bin
	--with-qemu-user=libvirt-qemu
	--with-qemu-group=kvm

	The default value are based on RH family so Fedora and RHEL can safely
	ignore these options.

2013-09-10  Federico Simoncelli  <fsimonce@redhat.com>

	vdsm-tool: fix qemu-sanlock configuration
	Fixing the logic about qemu-sanlock configuration: if sanlock is
	enabled then qemu-sanlock.conf needs to be updated.

2013-09-10  Ayal Baron  <abaron@redhat.com>

	Removing validate sd from spm verbs which calls ckvg and refreshes the domain metadata on the spm even though the spm already controls the changes (i.e. a lot of redundant time is wasted)
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193

2013-09-10  Yeela Kaplan  <ykaplan@redhat.com>

	Remove redundant check that causes lvm cache to refresh every volume creation
	We try to create a volume without validating if it exists first.
	If the volume exists we need to make sure we don't it delete in
	rollback.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193

2013-09-10  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: Remove hard coded 12- prefix of vdsm-lvm.rules from upstream
	vdsm-lvm.rules.in is to fix lvm block device permissions, it should be
	applied after the system default lvm rules. On RH family distributions,
	12 is correct because system default is 11-dm-lvm.rules. On Ubuntu, 12 is
	incorrect and we use 61-vdsm.lvm.rules. This patch removes the 12-prefix
	from the upstream file name, and leaves the downstream packaging script
	to decide the correct installed name.

2013-09-10  Alon Bar-Lev  <alonbl@redhat.com>

	build: cleanup: reformat AC_ARG_ENABLE
	consistent use of tabs/non-tabs.

	consistent use of formatting method for all statements.

	consistent indent, single tab, not "drawing" code.

	shorter lines as requested.

2013-09-10  Yeela Kaplan  <ykaplan@redhat.com>

	remoteFileHandler: Add create exclusive option for truncateFile
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193

2013-09-10  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: fix sloppy rebase of one shot prepare
	A sloppy rebase of c072945 "One shot prepare" removed the changes
	introduced by cef2d5b "vm: extend shared property to support locking".

2013-09-10  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: bondHwAddress, safeNetworkConfig, volatileConfig
	Added three functional tests:

	* testBondHwAddress
	* testSafeNetworkConfig
	* testVolatileConfig

2013-09-09  Yeela Kaplan  <ykaplan@redhat.com>

	lvm: add logs to indicate finshing reload lvs op
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=979193

2013-09-09  Eduardo Warszawski  <ewarszaw@redhat.com>

	One shot prepare.
	The number of storage accesses is reduced to 1 or none instead of
	the recursive volume images produces.
	Requires a new selinux policy.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=960952
	Related to BZ#769502, BZ#990509.

2013-09-08  Sergey Gotliv  <sgotliv@redhat.com>

	Making setStorageDomainDescription the SPM command

2013-09-07  Dan Kenigsberg  <danken@redhat.com>

	Require libvirt that allows vmUpdateDevice
	Bug-Url: https://bugzilla.redhat.com/1001001

2013-09-07  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packaging: libvirt plugin of selinux and sanlock usage is configurable at build time
	VDSM makes use of these two plugins. However on platform such as Ubuntu,
	libvirt is compiled without selinux and sanlock plugin. In this patch we
	make these plugins configurable at build time by

	--enable-libvirt-selinux
	--enable-libvirt-sanlock

	By default they are both enabled.

	Because of non standard use of substitution (not using AC_OUTPUT) the
	scripts that are effected will not be regenerated unless make clean is
	called, out of the scope of this patch.

2013-09-06  Alon Bar-Lev  <alonbl@redhat.com>

	build: cleanup: reformat use of AC_ARG_ENABLE
	1. Use AS_HELP_STRING to format help.

	2. Use autoconf variable for statement.

2013-09-04  Federico Simoncelli  <fsimonce@redhat.com>

	spec: remove shared glusterfs requirements
	Since we now require glusterfs in the main package we can now remove the
	same dependencies from the gluster rpm.

2013-09-03  Federico Simoncelli  <fsimonce@redhat.com>

	storage: kill ongoing operations on exit
	Some storage operations must be forcibly interrupted when the vdsm
	(parent) process exits.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=713434

2013-09-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fixing start return the return value of vdsm execution

	Adding requires to python-argparse

	Removing has_systemd from sysv script
	After separating sysv and systemd common code, we forgot cleaning all
	systemd dedicated code from sysv init script. This patch removes has_systemd
	calls and definition from sysv init script, as this script doesn't in use by
	systemd anymore.

2013-09-03  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests : setupNetworks resizeBond, remove param validation.
	Added a couple of tests:

	* testSetupNetworksResizeBond (functional test).
	* testValidateNetSetupRemoveParamValidation (unit test).

	Adding further coverage of setupNetworks and functions
	on which it depends.

2013-09-03  Federico Simoncelli  <fsimonce@redhat.com>

	vm: extend shared property to support locking
	The drives "shared" property has been extended (from True/False) to
	support sanlock locking.

	The new values are:

	 - "none":      no infomation (locking disabled)
	 - "exclusive": the disk is used by the VM in exclusive mode
	 - "shared":    the disk might be used by multiple VMs

	For backward compatibility the old values are mapped as follows:

	 - True: "shared"
	 - False: "none" (or "exclusive" if use_volume_leases is True)

2013-09-02  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Add vdsm upstart jobs
	Add Upstart jobs for vdsmd, supervdsmd, vdsm-restore-net-config,
	vdsm-tmpfiles.

	vdsmd, supervdsmd, vdsm-restore-net-config jobs are Upstart counterpart
	of vdsmd.service, supervdsmd.service and vdsm-restore-net-config.service
	in systemd.

	vdsm-tmpfiles is to create directories under /var/run/ for vdsm and
	supervdsm. In Upstart there is no systemd-tmpfiles.sercice equivalent,
	so we implement simple script in vdsm-tmpfiles to do the necessary job.

2013-09-01  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: return doneCode in getDiskAlignment
	Engine expects a dictionary instead of an integer(0)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998411

2013-08-31  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: setupNetworks convertVlanNetBridgeness, Mtus
	Added a couple of functional tests:

	* testSetupNetworksConvertVlanNetBridgeness
	  covering behavior of converstion of a network
	  from bridged to bridgeless and viceversa.

	* testSetupNetworksMtus covering behaviour of
	  setupNetworks when used with different mtus.

	test : delNetwork with bond accumulation.
	Added functional test covering behaviour of delNetwork
	when creating and deleting a bond.

2013-08-30  Assaf Muller  <amuller@redhat.com>

	Functional Tests [1/3]: Added module for dummy nics
	Added setLinkUpDummy, setLinkDownDummy, setIPDummy
	These methods will be used in an upcoming test

	Added required ipwrapper functions for iproute2 configurator
	These ipwrapper functions are required by more than one patch
	so for efficiency's sake I've moved them to a separate patch.

2013-08-30  Dan Kenigsberg  <danken@redhat.com>

	fix testDelNetworkWithMTU
	If a network with an MTU lesser than the default is created on top of an
	existing nic or bond, the new MTU is not set on the underlying device.
	This makes sense if the high MTU of the device is being used by
	something else, but not if there are no users to the device.

	There is a caveat to this fix, though. If someone outside of Vdsm has
	been using the underlying device for other purposes (such as another
	vlan with a higher MTU), Vdsm would now change the MTU while it takes
	ownership on the device. This should be of no surprise, since when Vdsm
	owns a device, it truly owns it, and may control all of its attributes.

2013-08-30  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Packageing: Move SystemD and SysVInit files to respective sub-dirs
	A new dir /init is created to place vdsm init files.
	/init for common init files.
	/init/systemd for SystemD related files.
	/init/sysvinit for SysV init related files.
	/init/upstart will be created in future for Upstart related files.

2013-08-29  Allon Mureinik  <amureini@redhat.com>

	vm.py: Fix comment regarding MOM and KSM
	Fixed the comment's typo and grammar mistake.

2013-08-29  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	packaging: rename supervdsmServer.py to supervdsmServer and add environment file
	supervdsm process is started by "python supervdsmServer.pyc". This is a
	bit verbose when it is put in the SysV init script and SystemD service
	unit. This patch renames supervdsmServer.py to supervdsmServer to enable
	the init script start supervdsmServer directly.

	In this patch, an environment file is also add for supervdsmd service.

	vdsmd and supervdsmd: extract common init tasks and add init adapter
	Move common init tasks from vdsmd.init.in to a separated file,
	vdsmd_init_common.sh. This enables SysV init script, SystemD and other
	init systems re-use vdsm pre-start/post-stop scripts.

	Add vdsm/init/daemonAdapter for various init systems. daemonAdapter can
	start vdsm optionally with respawn and console redirection. On powerful
	init systems, we call daemonAdapter with no/few options, on SysV init
	system, we call it with respawn, console redirection and pid creation
	option. In this way we can remedy the gap of powerful init systems and
	less powerful ones.

	This patch uses daemonAdapter in vdsmd.init.in, vdsmd.service,
	supervdsmd.init.in and supervdsmd.service.in.
	vdsmd systemd service does not relies on SysV init scripts to run init
	tasks any more, it calls vdsmd_init_common.sh to run init tasks.

2013-08-27  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: setupNetworks with invalid params.
	Added three tests:

	* testIsNicValid
	* testBuildBondOptionsBadParams
	* testSetupNetworksAddBadParams

	covering the behaviour of configNetwork._buildBondOptions,
	nic entity creation and setup networks when providing
	invalid parameters.

	tests: adding missing cleanup decoration
	Some tests need to cleanup the env in case of failure.
	This patch adds the missed cleanupNet decoration to
	some tests.

2013-08-27  Antoni S. Puimedon  <asegurap@redhat.com>

	Allow configurators to be used as context managers
	Since configurators have commit and rollback, they are the perfect
	candidate for being used as context managers.

	Before:
	    configurator = Ifcfg()
	    try:
	        b = Bond(bonding, configurator, options, nics,
	                 mtu, NetInfo(), implicitBond).configure()
	    except:
	        configurator.rollback
	        raise

	After:
	    with Ifcfg() as configurator:
	        Bond(bonding, configurator, options, nics,
	             mtu, NetInfo(), implicitBond).configure()

2013-08-27  Alon Bar-Lev  <alonbl@redhat.com>

	vdsmd: remove reconfigure sanlock on 'reconfigure' verb
	reconfigure sanlock is perform at every restart, so there is no need for
	performing that on reconfigure target.

	if it is required, we need vdsm-tool configure or similar verb, as
	systemd does not support custom targets.

2013-08-26  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	xmlrpcTests: Mount configfs automatically
	In some systems such as Ubuntu, configfs is not mounted by default.

	In this patch, configfs is mounted automatically for iscsi tests.

	xmlrpcTests: Detect Ubuntu initramfs when booting VM
	Ubuntu initramfs file name is different from that in Fedora and RHEL.
	This patch tries to detect possible initramfs file names.

2013-08-26  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: setupNetworks compatibility bond and nic.
	Added four functional tests, testing setupNetworks
	compatibility for nics and bonds bridged and bridgeless:

	* testSetupNetworksNetCompatibilityBondSingleBridge
	* testSetupNetworksNetCompatibilityBondSingleBridgeless
	* testSetupNetworksNetCompatibilityNicSingleBridge
	* testSetupNetworksNetCompatibilityNicSingleBridgeless

2013-08-26  Antoni S. Puimedon  <asegurap@redhat.com>

	Remove bonds before editing and adding
	The current implementation of handleBondings relies on the
	non-deterministic ordering of the bondings dictionary for choosing
	which bonds should be handled first.

	The correct ordering is to first delete all the bonds to remove,
	then edit and finally add new bonds. This ensures that slaves
	of bonds to remove are properly freed before being added to existing
	or new bonds.

	Bug-Url: https://bugzilla.redhat.com/987525

2013-08-24  Martin Polednik  <mpoledni@redhat.com>

	xmlrpcTests: refactoring
	- split xmlrpcTests into storageTests and virtTests to reduce complexity
	- use vdsProxy approach for virtTests part

2013-08-23  Antoni S. Puimedon  <asegurap@redhat.com>

	fix getVlanID returning an int issues
	The fact that getVlanId now returns an int causes issues across
	the networking codebase due to the fact that there was a lot of
	concatenation of the kind:

	    vlanDev = ifacename + '.' + vlanId

	which of course causes a TypeError due to trying to concatenate
	string and int.

	Additionally, there was code like:

	if (not) vlan:

	which now that vlan is int, will be evaluated as False when we
	use vlan with id 0.

	Finally, this patch makes all internal dealings with vlan ids
	to be converted to integer on reception.

2013-08-22  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	vdsm.spec: BZ 988299: Fix GlusterFS RPM dep to support GlusterFS SD
	This patch fixes the GlusterFS RPM dependency needed by VDSM to
	support Gluster Storage Domain feature. Recent GlusterFS RPM
	re-packaging effort to better separate the client and server side
	bits and availability of qemu with libgfapi support mark the
	pre-req for this patch. These pre-req are now available in
	F18/F19/RHEL6/Centos6 and above in the appropriate distro specific
	repos. Also removing F17 dep as its End of life now.

	BZ 988299 has more details, with pointers to the community
	discussions around these.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988299

2013-08-22  Antoni S. Puimedon  <asegurap@redhat.com>

	Don't down bonds and nics when adding vlan or resizing
	When adding vlans on top of devices, a configure of the underlying
	device incurs in ifdown and ifup, which in case of that device
	backing other vlans, will cause a network interruption.

	This patch makes that nics are only reconfigured (if a vlan is being
	put on top of them) when the interface was already down. This works
	because any extra config that would need to be applied for the new
	action needs only application on the vlan device itself.

	For Bonds, we only need to reconfigure in case the bonding options
	differ or the slaves don't match, in any other case, it's the same
	as with nics.

	Bug-Url: https://bugzilla.redhat.com/982632

2013-08-22  Amador Pahim  <apahim@redhat.com>

	[3/3] Use fixed getVlanDevice() and getVlanID().
	Change many functions to use getVlanDevice() and getVlanID() as a
	split('.') replacement.

	[2/3] Add "vlanid" to VLAN information
	Currently vdsm does not report vlan id as an idependent field. ovirt-engine
	is deducting vlan id by parsing vlan name, not reasonable as vlans can be
	made with any name.
	This patch adds the 'vlanid' information for vlans to be consumed by
	ovirt-engine:

	...
	        vlans = {'eth0.10': {'addr': '',
	                             'cfg': {},
	                             'iface': 'eth0',
	                             'ipv6addrs': [],
	                             'mtu': '1500',
	                             'netmask': '',
	                             'vlanid': 10},
	                 'eth0.myvlan': {'addr': '',
	                                 'cfg': {},
	                                 'iface': 'eth0',
	                                 'ipv6addrs': [],
	                                 'mtu': '1500',
	                                 'netmask': '',
	                                 'vlanid': 20}}

	...

2013-08-22  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix the 'MTU' option in networkTests
	The 'mtu' option should be in lower case. It doesn't fail with ifcfg
	configurator, because the 'MTU=1234' passes through to the ifcfg file
	as an extra option.

2013-08-21  Martin Polednik  <mpoledni@redhat.com>

	vdsmapi-schema: optional/required params fix
	- VideoDevice specParams field 'vram' is required according to
	current dom getXML
	- Smartcard device was previously missing required parameters
	mode and type
	- Type is actually required only for passthrough mode, fixed in code and
	  definition

2013-08-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	After exception on _recoverExistingVms thread we should try again
	Currently we fail the process on exception and gets stuck on recovery.
	This might be because libvirt exception during first connect. Anyhow, we
	should continue try to recover to start serving vdsm requests.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=991091

2013-08-21  Giuseppe Vallarelli  <gvallare@redhat.com>

	macspoof hooks: new hook script to enable macspoof filtering per vnic.
	Puropose of this patch is to add a new hook script which is
	almost equal to the existing one except that is applied on
	a per vnic basis. This hook script uses a different custom
	property ifacemacspoof to avoid conflicts with the macspoof
	one which operates for all VM's interfaces.

	* Patchset-1 first implmentation.
	* Patchset-2 Removing for loop cycling through ifaces,
	             the xml is only related to a specific iface.
	* Patchset-3 Cherrypicked on top of fix broken storage test.
	* Patchset-4 Changed custom property name from macspoofperdevice
	             to ifacemacspoof, small fixes to README.
	* Patchset-5 Updated implementation, fixed small issue
	             related to the parsing code.
	* Patchset-6 Updated README key is now part of CustomDeviceProperties.
	* Patchset-7 Added before_nic_hotplug hook script.
	* Patchset-8 Changed script name to macspoof_vnic and used it
	             for 2 events instead of having two equal scripts.
	             Updated Makefile and added docstring on top of the script.
	* Patchset-9 Inlined removeFilter function, changed assignment 'style'.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=908704

2013-08-21  MeiLiu  <liumbj@linux.vnet.ibm.com>

	modify mom functional test to use VdsProxy
	This patch puts vdscli APIs in VdsProxy in utils. It modifies mom functional
	test to use it instead of direct calling. It resembles the way network
	functional test uses.

2013-08-19  Amador Pahim  <apahim@redhat.com>

	Introducing hidden_vlans configurable.

2013-08-19  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: setupNetworks add net bond breaking and resizing.
	Added 3 functional tests to cover cases of new networks
	on top of a bond after resizing/breaking and behaviour
	of setup networks which should keep a network when
	resizing a bond.

	List of added functional tests:

	* testSetupNetworksAddNetworkToNicAfterBondResizing
	* testSetupNetworksAddNetworkToNicAfterBondBreaking
	* testSetupNetworksKeepNetworkOnBondAfterBondResizing

2013-08-19  Allon Mureinik  <amureini@redhat.com>

	define.py: remove %s from imageErr
	imageErr untypically has an %s in the error message.
	To make things worse, most flows do not fill it, producing messages
	which are difficult to understand.

	This patch removes the aforementioned %s.

	Bug-Url: https://bugzilla.redhat.com/960635

2013-08-17  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: adding missing cleanupNet and refined testQosNetwork.
	Some additional cleanupNet were necessary on some tests
	which might, on possible failure, make the env dirty.
	Added the deletion of network created in the testQosNetwork.

2013-08-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	libvirt configure: use "ed" instead of "sed --copy -i"
	"sed -i" generates a temp file for output, then renames the temp file to
	the targeted file. Renaming a file means just changing the content of
	the directory entry, and the edited file has different inode index from
	the original version. So the sed edited file is a different file though
	with the same file name as the original version. To use sed on
	ovirt-node on bind-mounted files, we need "--copy" to copy the temp file
	into targeted file instead of renaming. Unfortunately, "--copy" is
	provided by a patch that is specific to the RPM packaged sed on Red Hat
	family distros. The "--copy" option is neither in GNU sed [1] nor in
	Single Unix Specification sed [2].

	In this patch we use "ed" instead of "sed -i --copy". "ed" edits the
	file in-place, by buffering the edited contents in memory and flushing
	to the file at last.

	[1] http://www.gnu.org/software/sed/manual/sed.html
	[2] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html

2013-08-16  Amador Pahim  <apahim@redhat.com>

	[1/3] Fix getVlanID() and getVlanDevice().
	Previous implementations work only under root privileges.
	This patch reimplements both functions to use "ip" tool.

2013-08-16  MeiLiu  <liumbj@linux.vnet.ibm.com>

	mom: add mom balloon functional tests for running vms
	The balloon functional test includes the grow and shrink tests.
	It uses diverse policies to triger grow and shrink operation.

2013-08-16  Giuseppe Vallarelli  <gvallare@redhat.com>

	refactoring: replacing ifcfg dependency to storage with one from lib.
	Ifcfg is using execCmd from storage.misc module, this patch replaces it
	with its equivalent from utils module.

2013-08-15  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netconf: Simplify addSourceRoute arguments

	netmodels: Improve getIpConfig using namedtuple

2013-08-13  Federico Simoncelli  <fsimonce@redhat.com>

	image: use successor volume size when merging
	Volumes in the same image chain might have different capacity since the
	introduction of the disk resize feature. This means that when we merge
	volumes the ancestor should get the new size from the successor in order
	to be able to contain the additional data that we are collapsing.

2013-08-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Handling signals interrupts, using pidofproc and prevent lock over systemd
	Under start lock, if signal is received, we should clean the lock file and
	stop the instance. During stop we should not stop the process until
	respawn and vdsm instances are cleared.

	Instead of checking the existence of respawn.pid and vdsmd.pid files, using
	pidofproc checks if the processes are actually run. The deletion of the
	respawn.pid file is redundant and leads to conflicts.

	Over systemd we don't require to use locking at all. Systemd takes care of
	that.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994912

2013-08-13  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: setupNetworks add one or more vlans.
	Added a couple of functional tests:

	* testSetupNetworksAddVlan
	* testSetupNetworksAddManyVlans

	covering the behaviour of setupNetworks when adding
	one or more vlans.

2013-08-12  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix stale call to deactivateVolumes().
	Calling deactivateImage() is correct due to the one volume (no
	template limitation of Image._activateVolumeForImportExport().

	This calls were introduced by a conflict in changes:
	Ib208bb20d88633167b5c66b42febe912439a022d
	I4b6a4e99cf3a657affb4f5e96aa1ac1978a297da

2013-08-12  Assaf Muller  <amuller@redhat.com>

	Only remove dhcp source routing if the removal reason is "STOP"
	If the reason is FAIL then the IP configuration is not lost
	and source routing should not be removed. Only STOP actually
	removes the ip configuration from the device.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=995142

2013-08-11  Assaf Muller  <amuller@redhat.com>

	Management network is now kept in main routing table
	Only the management network should add its default route
	to the main routing table. Each NetDevice holds an IpConfig
	instance who now holds defaultRoute='yes', 'no' or None.
	Only the top level device will have a defaultRoute value.
	When writing ifcfg files we check if we got a defaultRoute
	value, if so we write it.

	Patch Set 7 changed the implementation so that only the top
	level device has DEFROUTE=yes/no in its ifcfg file.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=984028

2013-08-11  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	SecureXMLRPCServer: Work with Official M2Crypto Release
	VDSM uses the "settimeout" method of M2Crypto.SSL.Connection. This
	method is defined by a patch shipped in Fedora and RHEL m2crypto RPM.
	The "settimeout" patch is not available in official code, so other
	distro such as Ubuntu does not provide "settimeout".

	We can detect if the "Connection" class provides "settimeout" and work
	with both RPM and official release of M2Crypto. If it provides
	"settimeout", use it, otherwise falls back to use "settimeout" from the
	socket object.

2013-08-10  Giuseppe Vallarelli  <gvallare@redhat.com>

	lint: providing a default pylintrc
	We can use pylint to enable some further checks on the codebase.
	This can help up to have a cleaner codebase. The proposed pylintrc
	is adapted from the one used by the Python language to let us
	use java-like coding conventions for functions, methods and such.

2013-08-09  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: addNetwork bond with one or many vlans.
	Added a couple of functional tests:

	* testAddNetworkBondWithManyVlans
	* testAddNetworkVlanBond

	covering the behaviour related to addNetwork using bond
	and vlans.

	refactoring: rename variable in getVlanID function
	In the function getVlanID we're using id as a variable
	name, proposed refactoring changes this variable name,
	so we don't redefine the built-in function 'id'.

2013-08-08  Ohad Basan  <obasan@redhat.com>

	Fixing return value of function 'start' in init script
	During fixing lock mechanism (http://gerrit.ovirt.org/#/c/17662) we
	change to use locked_start function, this set to return "start ||
	release_lock && return 1". Without surrender the second part with brackets,
	this function returns always 1. This 1 returns as exit code and fail external
	operations as hostDeploy.

2013-08-07  Assaf Muller  <amuller@redhat.com>

	Source Route script now checks that the DHCP response is whole
	Previously we assumed that every DHCP response contains a
	gateway. Clearly that's wrong :(

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994600

2013-08-07  Dan Kenigsberg  <danken@redhat.com>

	supervdsm: some log beautification
	- log return value, not only function call
	- keep try-block cleaner

	Patchset-1 Initial implementation.
	Patchset-2 Used @wraps decoration from functools.

2013-08-07  Yaniv Bronhaim  <ybronhei@redhat.com>

	Lock init script when vdsmd starts up until the service is stopped
	As described in:
	http://fedoraproject.org/wiki/Packaging:SysVInitScript#Why_do_SysV_initscripts_with_resident_daemons_require_lock_files.3F
	This patch adds lock mechanism between stop and start operations.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=984616

2013-08-07  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo getIfaceCfg cleanup, naked except removal
	getIfaceCfg was using shlex but not taking advantage that it
	can handle comments better than we were doing (inline comments
	and such). This patch makes heavier use of it as well as removes
	the naked exceptions that were catching BaseExceptions (which
	is usually evil).

	vdsm_reg: fix ovirt_node without default bridge
	This patch reflects the fact that nowadays ovirt-node usually
	doesn't have a br* interface by default, thus the standing
	assumption that it did lead to exceptions.

	Bug-Url: https://bugzilla.redhat.com/988990

2013-08-07  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Bump requires version of selinux-policy-targeted
	Current SElinux policy prevent the dhcp hook for source routing
	from running. It has been fixed in latest selinux policy, so we
	we need bump the requires version. More information, please see:
	https://bugzilla.redhat.com/show_bug.cgi?id=977856

2013-08-07  Yeela Kaplan  <ykaplan@redhat.com>

	vm: Fix broken hotunplugDisk
	hotunplugDisk was broken by commit:
	I4a19380c26ff4b6b697455e060dab4c651ff3f7c

	vm: Remove redundant if statements in hotUnplugDisk

2013-08-07  Assaf Muller  <amuller@redhat.com>

	VDSM now writes its version number in VDSM-generated ifcfg files
	Take 2!
	This is a fix so that the code is identical in master and ovirt-3.3
	branch.

2013-08-06  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: maintain list of vm's domains inside the vm object
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=990985

2013-08-06  Saggi Mizrahi  <smizrahi@redhat.com>

	infra: Rearrange PYTHONPATH for remoteFileHandler
	When running tests P_VDSM is set to $GIT_ROOT which makes "import vdsm"
	conflict. This makes sure we only take from the root dir in case there
	is no other alternative.

	infra: Add logging in case PoolHandler crashes
	This helps for debugging cases where the helper crashes because of bugs
	rather than an IO error

	We only do it if the process closes in a timely fashion as it might be
	in D state for a long time.

	schema: Fix schema error

2013-08-06  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: addNetwork with one or more vlans.
	Added a couple of functional tests:

	* testAddNetworkManyVlans
	* testAddNetworkVlan

	covering the behaviour related to addNetwork using vlans.

	tests: miscellanous tests with/without addNetwork.
	Added three functional tests:

	* testTwiceAdd
	* testDelWithoutAdd
	* testEditWithoutAdd

	covering the behaviour of addNetwork when bridge is already in use,
	editNetwork and delNetwork in case of missing network.

2013-08-06  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix break in FileVolumeGetVSizeTest
	The implementation of FileVolume.getVSize was improved in
	http://gerrit.ovirt.org/17510. The test case of it should be updated
	accordingly.

2013-08-05  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Fix regression introduced by refactoring libvirtvm
	Rebasing the changeset of refactoring libvirtvm.py and vm.py into vm.py [1]
	caused an accidental removal of changes made in commit 30a4b50 [2].

	This commit fixes the mess up of this rebase mess up.

	[1]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=ee082b8
	[2]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=30a4b50

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=985735

	vdsm: Always retrieve alias for Balloon and Console devices
	We haven't been retrieving the alias value for console devices which
	now starts to bite us due to the assumption that all VmDevice objects,
	have to have an alias attribute during the migration.

	Due to a bug in the handling for Balloon devices this also happened.

	This commit fixes the problem for the future by retrieving the aliases.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065

2013-08-05  Assaf Muller  <amuller@redhat.com>

	Crash fix for migrations that involve devices with no aliases
	The destination host updates the device XML cache for every
	device by scanning the VM's XML that was received from
	the source host, breaking it apart and placing each device's
	XML into its Device class instance. The identification
	of devices is done via the alias pulled from the VM conf. Some
	devices don't have aliases pulled from libvirt. In any case,
	migrations should succeed (instead of crashing VDSM) and
	devices with no aliases should be dealt with in a separate patch.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065

2013-08-05  Eduardo Warszawski  <ewarszaw@redhat.com>

	Make lvm.listPVNames() be based on vgs information.
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=955993

	Avoid Img and Vol produces in fileVolume.getV*Size
	No need for produce Images and Volumes for get the volume path
	when calculating the size.

	Related to BZ#960952, BZ#769502.

	Too many True sizes for a False Volume class.
	Since an (abstract) volume never will be instantiated alone, get
	the size of the typed object instead.

	Removes Volume.getVSize(), Volume.getVTrueSize() and
	Volume.getVolumeTrueSize().

	Reduce the number of SD produces.

	Related to BZ#960952, BZ#769502.

	Remove unused lvm._vgmknodes().

	Remove broken getDeviceInfo().
	This function is unused by the Engine.
	It was broken a long time ago, Jun 19 of 2012, without complains,
	by commit f4304e25.

2013-08-04  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: delNetwork with specified mtu.
	Added one functional test:

	* testDelNetworkWithMTU

	covering the behaviour related to delNetwork when
	when setting an mtu.

	refactoring: fix imports stmts, replaced glob with iglob for uniformity.

	QoS host networks: caps now reports QoS for networks.
	In the context of applying QoS to host networks it's important
	to report the current networks' QoS. Example follows below:

	 'awesome': {'addr': '',
	             'bridged': True,
	             'cfg': {'DELAY': '0',
	                     'DEVICE': 'franta',
	                     'NM_CONTROLLED': 'no',
	                     'ONBOOT': 'yes',
	                     'TYPE': 'Bridge'},
	             'gateway': '0.0.0.0',
	             'iface': 'awesome',
	             'ipv6addrs': ['fe80::210:18ff:fee1:6d2e/64'],
	             'ipv6gateway': '::',
	             'mtu': '1500',
	             'netmask': '',
	             'ports': ['p1p4'],
	             'qosInbound': {'average': '1024', 'burst': '2048', 'peak': ''},
	             'qosOutbound': {'average': '2400', 'burst': '', 'peak': ''},
	             'stp': 'off'}

	Same information is available when calling networks() function, after adding
	a network named pluto this is the expected result:

	{'ovirtmgmt': {'bridge': u'ovirtmgmt',
	               'bridged': True,
	               'qosInbound': '',
	               'qosOutbound': ''},
	 'pluto': {'bridge': u'pluto',
	           'bridged': True,
	           'qosInbound': {'average': u'1024', 'burst': '', 'peak': ''},
	           'qosOutbound': {'average': u'2400', 'burst': '', 'peak': ''}}}

	In case a QoS is not defined in for incoming/inbound or outgoing/outbond
	traffic an empty string is placed instead to mark as undefined.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=987586

2013-08-04  Yeela Kaplan  <ykaplan@redhat.com>

	multipath: Use reload option on multipath rescan
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=964768

2013-08-02  huntxu  <mhuntxu@gmail.com>

	jsonrpc: make TCPReactor IPv6 capable

2013-08-01  Dan Kenigsberg  <danken@redhat.com>

	spec: vdsm-hook-sriov on el6 should not require non-existing rpm
	As reported by a dead horse, el6 does not carry
	libvirt-daemon-driver-nodedev so the said hook should not require this
	subrpm. Since it the rpm hook is meaningful only when vdsm is installed,
	and el6's vdsm requires al libvirt, we need no special requirement
	there.

2013-08-01  Assaf Muller  <amuller@redhat.com>

	VDSM now writes its version number in VDSM-generated ifcfg files

2013-08-01  Martin Sivak  <msivak@redhat.com>

	Add support for direct setting of cpu_shares when creating a VM
	This adds new API field to the Vm structures. The new field
	'cpuShares' will override the old 'nice' when used.

2013-07-31  Eduardo Warszawski  <ewarszaw@redhat.com>

	One shot teardown.
	Unique or none lvm command issued instead of recursive image
	volumes produces.

	Changing volumes that are active in multiple hosts can lead to DC.

	Related to BZ#960952, BZ#769502.

2013-07-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	Changing libvirt configure print

2013-07-31  Sergey Gotliv  <sgotliv@redhat.com>

	Removing update of 'node.startup' setting in 'addIscsiPortal'
	I removed not working code in 'addIscsiPortal' method. It supposed
	to update 'node.startup' setting to 'manual', but used 'discoverydb'
	operational mode instead of 'node' what caused to exception.

	Bug-Url: https://bugzilla.redhat.com/851050

2013-07-31  Martin Sivak  <msivak@redhat.com>

	Mark ksmtuned as conflicting service in the init file
	MoM and ksmtuned fight over control of ksm when running at the
	same time. MoM is the prefered manager now so ksmtuned should
	be stopped during VDSM startup. VDSM can start ksmtuned again
	when needed (in case MoM is not available or fails).

	Resolves: rhbz#987926

2013-07-31  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: automatically unpause vms in EIO when SD becomes active

2013-07-31  Shahar Havivi  <shaharh@redhat.com>

	Support for multiple heads for Qxl display device
	Bug-Url: https://bugzilla.redhat.com/787578

2013-07-31  Doron Fediuck  <dfediuck@redhat.com>

	mom: Require latest mom
	Latest mom build uses strings for the balloon info,
	needed for proper ballooning integration.

	This patch will make vdsm depending on the latest mom
	supporting the strings api.

2013-07-30  Giuseppe Vallarelli  <gvallare@redhat.com>

	refactoring: Configurator base class making attributes explicit.
	Currently the base class contains references to internal attributes
	in some methods that are instantiated in the subclass Ifcfg.
	Proposed refactoring let the baseclass instantiate the configApplier
	and the _libvirtAdded set.

	Refactoring: changing nic_devices visilibity, now private.
	nic_devices is used in the as helper function of the
	public one nics(), having both as public might be
	misleading for the user of this module.

2013-07-30  huntxu  <mhuntxu@gmail.com>

	vdscli: update cannonize helper function for IPv6 environment
	The original approach considers any string contains a colon to have
	a port information which is not true in IPv6 environment.

	The new approach assumes the input string follows the format
	'host [ ":" port ]' in rfc3986 as it would be then used in a URI, gives
	a default port if the input doesn't supply one. This means IPv6
	addresses should be enclosed within square brackets ("[" and "]").

	How to test:
	* The following commands should all work correctly in a default setup
	  1) for IPv4 environment:
	    * vdsClient -s 127.0.0.1 getVdsCaps
	    * vdsClient -s 127.0.0.1:54321 getVdsCaps
	    * vdsClient -s localhost getVdsCaps
	    * vdsClient -s localhost:54321 getVdsCaps
	  2) for IPv6 environment:
	    * vdsClient -s [::1] getVdsCaps
	    * vdsClient -s [::1]:54321 getVdsCaps
	    * vdsClient -s localhost6 getVdsCaps
	    * vdsClient -s localhost6:54321 getVdsCaps
	    * vdsClient -s ['IPv6 link-local addr'%ovirtmgmt] getVdsCaps
	    * vdsClient -s ['IPv6 link-local addr'%ovirtmgmt]:54321 getVdsCaps

2013-07-30  Yeela Kaplan  <ykaplan@redhat.com>

	multipath: Reload multipathd instead of restart on setup
	Multipathd is required by vdsmd.
	We should not take care of starting it, but only reloading
	new configuration.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988995

2013-07-30  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Do not fail releasing a VM due to agent stopping errors
	If the guest agent socket couldn't get created for whatever reason
	VDSM will no longer be able to stop release the VM without killing
	it manually and restarting the VDSM service.
	This patch is fixing this problem and also logs the occurrences.

	Bug-Url: https://bugzilla.redhat.com/985770

2013-07-30  Ohad Basan  <obasan@redhat.com>

	fileSD: remove reference to the removed safeUnlink
	the method safeUnlink was replaced by rmFile
	changed the file to use the new method

2013-07-30  Assaf Muller  <amuller@redhat.com>

	Improved ip rule and route robustness + improved logging
	* SuperVDSM should no longer crash when failing to parse routing
	  rules.
	* Improved logging - Routes / rules that cannot be parsed are
	  logged.
	* (Improved logging)^2 - Failing to configure or remove source
	  routing no longer displays a scary stack trace, just the error
	  message.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=987335

2013-07-26  Martin Sivak  <msivak@redhat.com>

	Use strings when reporting VM's memory stats
	This patch changes the API to use strings when reporting memory and
	balloon stats for a VM. This fixes an issue with xml-rpc that
	can only transfer 32 bit signed numbers.

	The maximum memory value when using KiB is about 2TB and we
	already hit that.

	Resolves: rhbz#974917

2013-07-26  Dan Kenigsberg  <danken@redhat.com>

	follow modern naming of wifi devices
	Fedora has forsaken wlan* names, but sampling wifi device still spams
	the logs with

	  File "/usr/lib64/python2.7/site-packages/vdsm/netinfo.py", line 235, in speed
	    s = int(file('/sys/class/net/%s/speed' % dev).read())
	IOError: [Errno 22] Invalid argument

2013-07-26  Mark Wu  <wudxw@linux.vnet.ibm.com>

	spec: fix that vdsmd.service is not enabled after installation
	For fedora18+, we use the helper macro to replace the manual systemd
	scriptlets. But for post installation, %systemd_post is expanded as
	below:
		/usr/bin/systemctl preset vdsmd.service >/dev/null 2>&1 || :
	So vdsm service will be disabled after installation because the default
	systemd preset setting disable all services which are not explictly
	enabled in the configuration files.

	We can ship a preset configuration file to enable vdsmd service, but
	reverting to manual systemd scriptlets is simpler and doesn't lose any
	benefit.

2013-07-25  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Make guest agent FQDN information available
	The FQDN value is the fully qualified domain name of the guest OS.
	This might be on not properly configured systems only 'localhost.localdomain',
	however for properly configured systems this is a very useful information.

2013-07-25  Arik Hadas  <ahadas@redhat.com>

	do not rely on default values on restoreFlags invocation
	The signature of libvirt's verb 'restoreFlags' changed - in previous
	versions it didn't set default values for its optional arguments. this
	patch changes how we invoke this verb to set the 'flags' argument to 0
	explicitly in order to be backward compatible with libvirt versions that
	don't set default values for 'restoreFlags' arguments.

	Bug-Url: https://bugzilla.redhat.com/988229

2013-07-25  Petr Sebek  <psebek@redhat.com>

	Deleted ovirt check from vdsm-restore-net-config
	Check if the machine is ovirt node prevented from proper network
	restoration. Deleted condition is no longer needed.

	Bug-Url: https://bugzilla.redhat.com/979081

2013-07-25  Yeela Kaplan  <ykaplan@redhat.com>

	image: shrink the new volume When merging block cow volumes
	On merge, size of the new volume is currently the sum of virtual
	sizes of the original volumes that were merged. With qcow
	volumes on block devices we don't use the whole size of the new volume,
	so we want to allocate only the actual size needed by the new volume
	with some additions to match the vdsm conventions.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=887909

2013-07-25  Lee Yarwood  <lyarwood@redhat.com>

	dumpStorageTable: Avoid an unnecessary traceback if vdsmd is down.
	When vdsmd is down the first getConnectedStoragePoolsList call
	results in a 'Connection Refused' trace being shown. To avoid
	this trace being picked up by abrt and thus worrying users we
	should test the connection, catching any errors before continuing.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=987833

2013-07-25  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netconf: Skip source routing cfg files when restoring devices
	_sortModifiedIfcfgs() uses the cfg files under '/etc/sysconfig/network-scripts'
	to get the devices which should be stopped and started during rollback. But the
	backed up files could also include source routing cfg files after the source routing
	feature was added. So this patch skips those files when it gets the devices list.

2013-07-23  Antoni S. Puimedon  <asegurap@redhat.com>

	fix setupNets 'remove' of non-existent net
	setupNetworks was assuming that if a net was not in vdsm nets nor in
	libvirt nets it was a net that we were trying to add when, in fact,
	it could very well be a non-existent network that was incorrectly
	marked for removal.

	The fix checks the case specified above and raises the same
	configNetworkError that delNetwork does on similar circumstances.

	Bug-url: https://bugzilla.redhat.com/977843

2013-07-23  Federico Simoncelli  <fsimonce@redhat.com>

	build: use pythondir for vdsmapi

2013-07-23  Giuseppe Vallarelli  <gvallare@redhat.com>

	bugfix: regression network qos
	Inbound and Outbound parameters are no longer dispatched
	through the configurator when adding a network, this means
	that configured network will not present the desired
	QoS. See previously merged implementation
	http://gerrit.ovirt.org/#/c/15724/17/vdsm/configNetwork.py

	* Patchset 1 - Improving a previously defined functional test
	               and verified that the current implementation make
	               the updated test fail.

	* Patchset 2 - Adding missing qos parameters to configureLibvirtNetwork
	               verified the code behaviour.

2013-07-23  Assaf Muller  <amuller@redhat.com>

	Improve logging for misformed ip routes and rules

2013-07-23  Federico Simoncelli  <fsimonce@redhat.com>

	build: do not distribute precompiled cpopen.so

	build: use pythondir for yajsonrpc

2013-07-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Catching remoteError while communicate with supervdsm
	When remoteError is raised due to broken communication with supervdsm,
	try to reconnect to supervdsm socket and raise runtime exception.
	If fails to reconnect, vdsm calls panic and restarts itself.

	Initialize supervdsm log before importing other modules
	1. When importing configNetwork, it imports libvirtconnection that
	initializes it own logger. The setconfig should occurred before the import.
	2. Adding log print before each call to supervdsm.

2013-07-22  Martin Sivak  <msivak@redhat.com>

	Fix missing symbol errors in the MoM policy for ballooning

2013-07-22  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding libvirtd dependency when supervdsm starts up with systemd
	libvirt service needs to be up and serving before supervdsm starts up.

2013-07-22  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Add folders required by sourceRoute to vdsm-tmpfiles.d.conf
	sourceRouteThread needs '/var/run/vdsm/sourceRoutes' , so let systemd's
	tmpfiles service create it after reboot. Without this patch,  sourceRouteThread
	will fail and therefore supervdsmd will fail to start too.

	trackedInterfaces is also required by sourceRoute, so add it together.

	change v1>v2: add trackedInterfaces

2013-07-21  Eduardo Warszawski  <ewarszaw@redhat.com>

	Symmetrize *StorageDomain.*activateVolumes().
	Related to BZ#960952, BZ#769502.

2013-07-21  Assaf Muller  <amuller@redhat.com>

	Fixed functional test SetupNetworksAddBondWithManyVlans

	Source routes files now deleted on non-VDSM interfaces
	Files in /var/run/vdsm/sourceRoutes are created by a VDSM DHCP
	hook for all interfaces that release or get a DHCP configuration.
	sourceRouteThread.py configures source routing on those interfaces.
	However, first it checks that the interface in question is known
	to VDSM. Previously the files weren't deleted in such a case.

2013-07-21  Dan Kenigsberg  <danken@redhat.com>

	functional network tests: revert config on failure
	With systemd, `systemctl vdsm-restore-net-config start` does nothing, as
	that service is marked as already-started since boot time. Using
	`restart` instead makes the tests revert config remnants upon test
	failure.

2013-07-19  Martin Sivak  <msivak@redhat.com>

	Use the current balloon size from libvirt info
	This patch changes our current data source for balloon information
	from internal vdsm balloon target to the real live data provided
	by libvirt.

	The old target value is now reported as balloon_target.

2013-07-18  Doron Fediuck  <dfediuck@redhat.com>

	mom: require latest mom version
	Latest mom will support balloon_min needed for minimum guaranteed
	memory. This patch makes vdsm dependant of the relevant version.

2013-07-18  Dan Kenigsberg  <danken@redhat.com>

	Bugfix: xml network definition.
	In case of a bridgeless network, interface xml element should be
	contained within the forward element, it should not be a direct
	child of the network element like in the case of a bridged network.

2013-07-18  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove '/run/vdsm' from vdsm-tmpfiles.d.conf
	'/var/run' is symlink of '/run', so the dir '/run/vdsm' also be
	created when the tempfiles service create '/var/run/vdsm'. And
	we don't use '/run/vdsm' directly, so we don't need care about it.

2013-07-18  Humble Chirammal  <hchiramm@redhat.com>

	dumpStorageTable: Fix typos in serverConnection string
	Current version of dumpStorageTable has typo on 'serverConnection'
	string. This corrects it.

2013-07-17  MeiLiu  <liumbj@linux.vnet.ibm.com>

	Fix required mom version
	mom-0.3.2 contains changes to the policy language, balloon guest
	collector and reset mom policy API. Without changes on balloon
	collector, balloon will not work. The new version also provides
	reset mom policy API for vdsm related interface to support multi-policy.
	These are what we need in vdsm, and thus the version is updated.

2013-07-17  Humble Chirammal  <hchiramm@redhat.com>

	sos: Patch to add sanlock.log in sos.
	Currently the sanlock.log is missing from vdsm plugin of sos.
	This adds missing sanlock log to troubleshoot sanlock issues.

	Bug-Url:https://bugzilla.redhat.com/attachment.cgi?id=774659

2013-07-17  Federico Simoncelli  <fsimonce@redhat.com>

	vm: catch getVolumeSize failures in _normalizeVdsmImg
	When getVolumeSize fails during the VM startup (e.g. volume is missing
	or corrupted) a descriptive error should be returned (instead of the
	previous KeyError: 'truesize'). An example of this behavior can be found
	in BZ#883858.

2013-07-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsmd.init.in: fix some style problems
	Add quotes to variable references. Use configurable variable instead of
	hard coded utility path. Uniform the block statement style.

2013-07-17  Giuseppe Vallarelli  <gvallare@redhat.com>

	Hidden bonds[2/2]: Refactored and updated nics implementation.
	nics implementation now allows to hide bonds marked as hidden
	in the config file.

2013-07-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: adding {?with_tmpfiles_macro}
	The macro %{_tmpfilesdir} was introduced by Fedora 18.
	This patch will add a Fedora validation before using it.

2013-07-16  Federico Simoncelli  <fsimonce@redhat.com>

	image: add support to upload/download images
	This patch adds the support for uploading and downloading images using
	different methods. Added API:

	 uploadImage(methodArgs, spUUID, sdUUID, imgUUID, volUUID=None)

	 downloadImage(methodArgs, spUUID, sdUUID, imgUUID, volUUID=None)

	Argument methodArgs elects the method used for uploading or downloading
	the image and provides the required additional information needed to
	reach the receiving/sending endpoint.
	Arguments spUUID, sdUUID, imgUUID identify an image and the optional
	volUUID option could identify a specific volume in the chain (the leaf
	is used by default).

	This patch also adds the implementation of the 'http' method used to
	download/upload images from/to web servers or any other http service
	(e.g. openstack glance).

	 info = {
	   'method': 'http',
	   'url': 'http://source-or-destination/path/to/image',
	   'headers': {'X-My-Header', 'MyHeaderValue'},
	 }

2013-07-16  David Gibson  <david@gibson.dropbear.id.au>

	guestIF: Rework XML character filtering
	Data from the guest agent is essentially untrusted, and may contain
	characters which cannot be included in XML such as vdsm's XML-RPC
	responses.

	Commits b5db7c60b61ef6143d3be27c58658ac94c858626 (guestIF: Additional
	object strings filtering) and aef1a7d288d0e5f82ebc4fea3e5f0155e9a7f541
	(agent: XML Character filtering improvement) are attempts to correct this
	filtering, but they are conceptually incorrect and can both fail to
	filter characters which need to be filtered, and filter characters which
	do not need to be filtered.

	aef1a7d288d0e5f82ebc4fea3e5f0155e9a7f541 added code to run the XML
	filtering before UTF8 decoding the message from the guest.  This is
	incorrect, since the characters permitted in XML files are defined
	in terms of Unicode code points, not individual byte values.  This means
	that we currently filter out perfectly valid characters such as \u2122
	(trademark symbol) because its UTF8 encoding (\xe2\x84\xa2) contains a byte
	(0x84) with the same value as the ordinal of one of the XML restricted
	characters.  Worse, filtering that byte gives a bytestring which is
	no longer valid UTF8, and so will lead to a UnicodeError exception on
	decode.

	Since that filtering also takes place before UTF8 and JSON decoding, those
	steps may still result in the construction of invalid XML characters.

	b5db7c60b61ef6143d3be27c58658ac94c858626 partially corrects this by
	(re-)adding XML filtering after the UTF8 and JSON decode as well.  This
	is conceptually correct, but the filter is not thorough enough.  Currently
	the code only filters out characters in set XML defines as
	"RestrictedChar".  In XML valid characters are those in the set "Char"
	which are not in "RestrictedChar", and the filtering currently leaves in
	characters which are neither in "Char" nor "RestrictedChar" - this includes
	the surrogate pair code points, \ufffe and \uffff.  \uffff at least will
	cause the XML parser in ovirt to choke.

	This patch addresses all the above problems.  Additionally it now replaces
	bad characters with the official Unicode replacement character '\ufffd',
	instead of '?'.  It also adds the 'replace' error handling on the UTF8
	decode, so that invalidly encoded UTF8 strings from the guest will not
	cause an exception in VDSM.

2013-07-16  Martin Sivak  <msivak@redhat.com>

	Enable balloon and use the MoM multiple policies feature
	This moves mom policy configuration to /etc/vdsm/mom.d and
	splits the policy files to:

	00-python.policy
	01-parameters.policy
	02-balloon.policy
	03-ksm.policy

	It also uses the 01 file as the destination for updates
	received using the setMOMPolicyParameters API call.

	Add setMOMPolicyParameters
	This adds setMOMPolicyParameters to the API and a configuration
	option mom/tuning_policy to the configuration file.

	It is intended to be used for fine tuning a MoM policy.

2013-07-16  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	destroyStoragePool: release host id lease correctly
	In hsm.py destroyStoragePool, it calls pool.domainMonitor.close() before
	pool.detachAllDomains(). domainMonitor.close() assumes SPM is stopped
	and releases the host id lease for all domains, however this is not true,
	because the master storage domain is not detached and the cluster lock
	is still ative. This causes domainMonitor fail to release host id lease
	of the master domain but the monitor thread is stopped. In log file we
	can see this exception traceback. When we call formatStorageDomain,
	sanlock is still active on the id lease file so the domain can not be
	cleaned, and it raises an exception
	"MiscDirCleanupFailure: Directory cleanup failure" for fileSD,
	"VolumeGroupRemoveError: Volume Group remove error" for blockSD.

	Since pool.detachAllDomains() detaches master storage domain and
	releases cluster lock, pool.domainMonitor.close() should be called after
	pool.detachAllDomains(). Actually self._disconnectPool() indirectly
	calls pool.domainMonitor.close() at last, so there is no need to call it
	directly in destroyStoragePool().

	This patch deletes the line calling pool.domainMonitor.close() in
	destroyStoragePool(), so that the cluster lock and host id lease of
	master storage domain are released in the correct order, and
	formatStorageDomain would succeed in cleaning the domain.

2013-07-16  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove mac address from host interface statistics
	It's unnecessary to report mac address in host interface statistics
	since it's unchanged. And it's not used by engine side. So it's safe
	to remove it.

2013-07-16  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm: /usr/lib/tmpfiles.d/vdsm.conf
	tmpfiles.d is a service in Fedora 15 and later for managing temporary files and
	runtime directories for daemons. Directories /var/run and /var/lock are symlinks
	into the /run tmpfs filesystem. As such, they are created empty on every reboot.
	For files intended to be placed into those directories, this should normally
	not pose any problems. For directories, however, we often need to create the
	directories ahead of time. This is best done using the tmpfiles.d mechanism.

	vdsm.spec: glusterfs 3.4
	Glusterfs 3.4 package now available at Koji, updating the spec.

2013-07-15  Federico Simoncelli  <fsimonce@redhat.com>

	vm: add the live diskSizeExtend method
	This patch adds the diskSizeExtend HSM method to implement the live disk
	extension.

	 returnCode = diskSizeExtend(vmUUID, driveSpecs, newSize)

	 driveSpecs =  {
	   'poolID':   '<spUUID>',
	   'domainID': '<sdUUID>',
	   'imageID':  '<imgUUID>',
	   'volumeID': '<volUUID>',
	 }

	 returnCode = {
	   'status': {'code': 0, 'message': 'Done'},
	   'size': '<newSize>',
	 }

	The driveSpecs (usually poolID, domainID, imageID, volumeID) indentify
	the disk to extend. The driveSpecs as GUID is not supported.
	The returnCode also returns the newSize of the disk seen by the guest
	(might be different from the requested one, e.g. rounded by QEMU).

	The returnCode might also return the following specific errors:

	- noVM(1): Virtual machine does not exist
	- resizeErr(58): Wrong resize disk parameter
	- updateDevice(56): Failed to update device

	deploy: add rpcbind to the needed services
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=977940

	init: restart sanlock groups are missing
	If sanlock was started before the *first* installation of vdsm
	then it is probably missing the supplementary groups and it needs
	to be restarted.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=977926

	volume: add the extendVolumeSize method
	This patch adds the extendVolumeSize SPM method to implement the volume
	size extension (disk resize).

	 extendVolumeSize(spUUID, sdUUID, imgUUID, volUUID, newSize)

	The argument spUUID, sdUUID, imgUUID, volUUID indentify the volume to
	extend, newSize is the new size of the volume in bytes.

2013-07-15  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	trival change for skip mom test logic
	    using wrapper of runtime vdsm caps to judge mom module existence
	instead of trying to load, make it usable for other testcases outside
	this module.

2013-07-15  Mark Wu  <wudxw@linux.vnet.ibm.com>

	spec: restart systemd-modules-load.service on post installation
	It's observed that the needed modules are not loaded after vdsm is
	installed without rebooting system. That's because we reply on
	systemd-modules-load.service to load the modules required by vdsm,
	but systemd-modules-load.service can't detect the new config
	file added by vdsm. It should not be a problem if the vdsm host
	is added to ovirt engine. So this change only make it more friendly
	for people who run vdsm in standalone mode.

2013-07-15  Assaf Muller  <amuller@redhat.com>

	Multiple Gateways[6/2]: Swapped libvirt network & netEnt creation
	During source routing configuraton for DHCP interfaces we wanted
	to know if we're dealing with an interface that's 'owned' by
	VDSM. Because of that we swapped the order in which we ifup
	or ifdown an interface and create its libvirt network,
	so that first we create the libvirt network and then the
	top level device, that way when we ifupifdown and get a DHCP
	response we can check if the interface is known to libvirt.
	That introduced a bug when deleting a network that was on top
	of a bridgeless-bond. Additionally, because of patches 3+4
	in the Multiple Gateways series the original swap created a
	race condition.

	This patch reverses the libvirt network creation / deletion
	and net entitiy creation / deletion to the original order,
	and uses an alternative / additional method to check if an
	interface is owned by VDSM.

	Patch Set 3:
	* Added /var/run/vdsm/trackedInterfaces to spec/make files

	Patch Set 4:
	* Added comment so that future generations know why we must
	  first remove the libvirt network and then the network entity
	  during delNetwork
	* Moved interface tracking files add/delete to
	  DynamicSourceRoute. Moved libvirt/vdsm interface checks
	  from static to dynamic as well
	* Added a helper method to get a tracking file path, using
	  os.path.join

	Patch Set 5:
	* Fixed pep8 issue

	Patch Set 6:
	* Removed debugging log output

	Patch Set 7:
	* Use util.rmFile to remove tracking files
	* Open and then close files instead of using the touch binary
	  for creating tracking files

2013-07-15  Yeela Kaplan  <ykaplan@redhat.com>

	lvm: Enhance lvm performance by altering filter
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=981055

2013-07-15  Assaf Muller  <amuller@redhat.com>

	Multiple Gateways[5/2]: sourceRoute handles exceptions
	sourceRoute.configure and remove now handle IPRoute2Error
	exceptions that can be thrown if using DynamicSourceRoute
	and the Iproute2 configurator. The Iproute2 configurator
	calls 'ip rule add/remove, ip route add/remove' that can
	throw exceptions if the configuration fails.

	For example:
	  1) If we try to add routes if the interface is down
	     (Which might happen during host bootup)
	  2) If we try to configure routes that already exist
	  3) If we try to remove rules that don't exist

	Patch Sets 2-4:
	* Rebases

	Patch Set 5:
	* Moved exception handling to sourceRoute.py

	Patch Set 6:
	* Removed unused imports

	Patch Set 7:
	* Updated commit message

2013-07-15  Yeela Kaplan  <ykaplan@redhat.com>

	fileSD: fix set update for getAllImages
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982617

2013-07-13  Assaf Muller  <amuller@redhat.com>

	Multiple Gateways[4/2]: Fixed ifdown bug for DHCP interfaces
	If the admin manually ifdown'd an interface of ours following
	patch 3 in the series, we failed to remove the routes and rules
	we created during ifup. The reason is that since patch 3 we
	are working with files. The dhclient hook created a file during
	ifdown and finished the ifdown operation before VDSM got the
	notification that the file was created. By the time VDSM got
	the notification the interface was already down and thus could
	not find any information about the interface.

	This patch fixes that bug by adding the device to the rule
	while adding the rule, so that we may use the device name
	to look up all rules created for that device.

	Patch Set 2:
	* Renamed Rule.inDevice to Rule.srcDevice
	* Removed sourceRoute.py:_getNetwork

	Multiple Gateways[3/2]: Re-did comms between dhclient and vdsm
	SElinux disallows dhclient to change routing table information directly,
	and so we needed a different way for dhclient to communicate with vdsm.
	We did it via files and inotify.
	dhclient writes to /var/run/vdsm/sourceRoutes with all of the info
	of the DHCP response. supervdsm checks that folder upon startup
	(in case dhclient operated while supervdsm was down) and registers
	an inotify event handler on that folder on a separate thread.

	Patch Set 3:
	* Re-added libvirt check when configuring a network
	* Added sourceRouteThread.py, /var/run/vdsm/sourceRoutes dir to
	  spec and make files
	* Capitalized DHClientEventHandler, removed os.path.join usage
	* Files created in /var/run/vdsm/sourceRoutes are now named $timeStamp
	  and we now read the folder in alphabetical order during vdsm start up
	  so that we handle dhcp responses by their received order

	Patch Set 4:
	* Removed argparse from spec file
	* Changed from file created to file closed to fix possible race
	* Answered Giuseppe's and Dan's reviews

	Patch Set 5:
	* Fixed pep8 issue
	* Fixed bug with signature of the event handler. It needed two
	  versions: One I call manually, and one inotify calls

2013-07-13  Aravinda VK  <avishwan@redhat.com>

	gluster: verbs for managing services
	Verbs to manage or get status of gluster/system services.

	glusterServicesGet: To get the status of given system services
	Output structure:
	{'services': [{'name': SERVICE_NAME,
	               'status': STATUS,
	               'message': MESSAGE},..]}

	glusterServicesAction: To start/stop/restart system services like
	glusterd, memcached, gluster-swift-account, smb, gluster-swift-container..
	Output structure:
	{'services': [{'name': SERVICE_NAME,
	               'status': STATUS,
	               'message': MESSAGE},..]}

2013-07-13  Mark Wu  <wudxw@linux.vnet.ibm.com>

	vdsm-tool: remove 'vdsm/tool/*.pyc' files on uninstallation
	It's found that 'vdsm/tool/*.pyc' files are not removed on uninstallation.
	It could cause a break after installing a different version vdsm. That's
	because vdsm-tool tries to load all python modules under vdsm.tool. If the
	requirements of these old modules can't be sytisfied by the new installed
	packages, vdsm-tool will abort.

	This problem is caused by a wrong target type for python files in
	lib/vdsm/tool. They're not compiled during 'make install' and therefore
	complied python files are not tracked by rpm.

	This patch also fixes a wrong target name in CLEANFILES.

2013-07-11  Assaf Muller  <amuller@redhat.com>

	Add bootproto during delNetwork
	bootproto isn't sent from the engine for the delNetwork command.
	However, the multiple gateways feature code needs to behave
	differently during delNetwork as a function of the bootproto.

	This patch gets the bootproto from the cfg file. When we
	add other configurators we'll have to deal with this.

	Patch Set 2:
	* Moved getBootProto from configNetwork to netinfo

2013-07-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Extend vdsm-tool: moving configure libvirt to external shell script
	Using vdsm-tool to configure libvirt

	Rewrite isOvirt function

2013-07-10  Antoni S. Puimedon  <asegurap@redhat.com>

	net_functional_tests: bondWithManyVlans.
	This patch adds a tests for adding several vlanned networks over
	a bond.

	netinfo updating infra for functional tests
	This patch adds a way to implicitly have current network information
	in the functional tests when performing operations that alter the
	networking state.

2013-07-10  Mooli Tayer  <mtayer@redhat.com>

	Decoupling libvirtconnection.py from clientIF.py
	1.) Decoupling libvirtconnection.py from clientIF.py
	adding libvirt cb handlers for vm events belongs in vm.py
	2.) bugfix: not all libviryconnecition.get() invocations
	from vdsm are wrapped with error handling code
	(with an important implication in the bug description:
	 causes vdsm to shutdown on libvirt connection error)

	These two come in the same patch because removing
	the cif dependency (clientIF instance) from libvirtconnection
	must handle errors in a new way - sendind SIGTERM to the current
	process which solves the bug.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=958367

2013-07-10  Giuseppe Vallarelli  <gvallare@redhat.com>

	Bugfix update device hooks: after_update_device failure.
	In case of failure during before update device, after_update_device
	should use the backup object, having vnicXML not in a valid state.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893576#c11

2013-07-10  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Cleanup the usages of configWriter in configNetwork
	We should keep the interaction with configWriter inside configurator.
	So this patch changes to construct new configWriter instantance in
	ifcfg's __init__() and use configurator to implement the transaction
	management of configuration.

2013-07-10  Arik Hadas  <ahadas@redhat.com>

	RAM snapshots feature
	This patch adds the ability to take live snapshot of a VM that includes
	its memory state, and to restore memory state that is saved as part of a
	snapshot when reverting back to it.

	There is a detailed description of the design at the feature page:
	http://wiki.ovirt.org/Features/RAM_Snapshots

2013-07-10  Ofri Masad  <omasad@redhat.com>

	API: Add free memory to stats
	currently, only memAvailable is exposed by API. But this api is a
	calculated value and so it may return negative value in case ksm
	is up and pages are shred among VMs.

	The new "memFree" returns the true free memory on the host.
	i.e. 'MemFree' + 'Cached' + 'Buffers' (from meminfo)

	Bug-Url: https://bugzilla.redhat.com/977758

2013-07-10  Assaf Muller  <amuller@redhat.com>

	before/after_update_device hook now receives custom properties
	Patch Set 2:
	Patch set 1 took the custom properties from the device. But
	that means that the custom properties past in the command
	are ignored. Patch set 2 fixes this: The custom properties
	are now always taken from the verb's arguments, and the
	device's custom properties are updated.

	Patch Set 3:
	Moved the update to the in-memory cache of the device's
	custom properties to a more sensible location.

2013-07-10  Dan Kenigsberg  <danken@redhat.com>

	spec: finer-grained libvirt requirement

2013-07-09  Martin Sivak  <msivak@redhat.com>

	Add balloon_min to VM.getVmBalloonInfo
	The balloon_min key will take its value from memGuaranteedSize
	attribute. It's default value will be 0, but can be overriden by
	whoever is creating the VM instance or setting the attributes.

	This functionality is needed for basic memory QoS.

2013-07-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	vdsm-tool usage: Adding path variable to init script

2013-07-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.init: do not use previous libvirt logrotate
	In the past VDSM have been creating /var/log/libvirtd.log to track libvirt
	calls and also add rule for such file into /etc/logrotate.d/libvirtd.
	However, now VDSM uses /var/log/libvirt/libvirtd.log (commit fe01963f)
	and should replace any previous conf on /etc/logrotate.d/libvirtd
	with VDSM suggestions.

2013-07-09  Giuseppe Vallarelli  <gvallare@redhat.com>

	Qos feature: Adds bandwidth definition at configuration level.
	Network definition when configuring libvirt network is enriched with
	the optional bandwidth parameters for traffic shaping. Patch includes
	a refactoring of the xml generation and some tests.

2013-07-08  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netconf: Add a base configurator class
	This patch add a base configurator class to make the code not related
	to specific configurator implementation shared by configurator ifcfg
	and iproute2.

	It renames ifcfg's member configWriter to configApplier, a more generic
	name and also applicable to iproute2.

2013-07-08  Antoni S. Puimedon  <asegurap@redhat.com>

	Simplify configWriter to use netmodels
	configwriter add methods were using tons of parameters. It would be
	simpler if they were to use netmodels info.

	Patch Set 2: clean up the netmodels configurator interaction.

	Patch Set 4: Changed bond and bridge properties to use isinstance.

2013-07-08  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm-tool: speedup loading seboolsetup.py
	On RHEL6 "import seobject" takes a very long time. This patch moves the
	seobject import statement in seboolsetup.py from module top level to
	function level. This small modification reduces the total startup time
	of VDSM, since VDSM moves most of the management utilities into
	vdsm-tool.

2013-07-08  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix pep8 issue with net functional tests cleanup
	The previous patch lacked a blank line and due to jenkins
	giving false positives I missed the problem.

2013-07-08  Dan Kenigsberg  <danken@redhat.com>

	/me is tired of pep8 flavors

2013-07-08  Mike Kolesnik  <mkolesni@redhat.com>

	hooks: Fix openstacknet hook
	The hook should be built with default VDSM build since we want to supply
	it to users.

	Additionally, the consts file should be packaged with it's "binaries" in
	the RPM.

2013-07-08  Antoni S. Puimedon  <asegurap@redhat.com>

	Cleanup networking functional tests dummy conf
	Due to the fact that the dummies used for the functional tests are
	treated just like nics, ifcfg files for them remain after the
	functional tests are completed. This patch adds a module teardown
	action that restores the networking configuration file status
	previous to running the tests.

	Patch Set 2:
	- Moved the teardown to module level for symmetry.

2013-07-07  Mike Kolesnik  <mkolesni@redhat.com>

	hooks: README for OpenStack Network vNIC hook
	Added a readme file outlining the general behaviour of the hook.

	hooks: Support OpenStack Network in hot plug NIC
	Adding hook support for hot plugging a vNIC to the VM.
	The hook should behave exactly as the before_device_create hook, so
	reusing the same hook code for hot plugging.

	hooks: Support OVS in OpenStack Network vNIC hook
	The hook will now support connecting a vNIC both to a standard linux
	bridge, and an OVS bridge.

	The hook should work in tandem with the corresponding OpenStack Network
	plugin: Linux Bridge or OVS plugin.

	hooks: Add OpenStack Network vNIC hook
	This hook is used to enable OS-network agent to connect a vNIC as it
	wants, instead of trying to connect to the bridge that is sent by engine
	(which doesn't exist, as the vNIC should be managed by the agent).

	Upon migration, the updated XML is being sent, so no further hook
	besides this one is required.

2013-07-07  Martin Sivak  <msivak@redhat.com>

	Clean the imports a bit

2013-07-07  Mooli Tayer  <mtayer@redhat.com>

	Adding intellij project files to .gitignore
	Patch Set 2:
	Re-ordered new files to keep .gitignore sorted

2013-07-06  huntxu  <mhuntxu@gmail.com>

	BindingJsonRpc: correctly stop reactors
	vdsm raises an exception saying "AttributeError: 'str' object has no
	attribute 'stop'". This commit fixes this problem.

2013-07-05  huntxu  <mhuntxu@gmail.com>

	tests: Use uppercase label for floppy in mkimageTests
	Commit 10c1c41fd8e in dosfstools: "Write uppercase letters in label."
	That commit has been in dosfstools since version 3.0.16, and Fedora 19
	uses version 3.0.20.

	For quick reference(copied from dosfstools commit message):
	  * https://bugzilla.novell.com/show_bug.cgi?id=657011#c4
	  * http://support.microsoft.com/kb/71715/en-us

2013-07-05  Peter V. Saveliev  <peet@redhat.com>

	vdsm: fix config comment for migration_timeout
	The migration_timeout variable means not overall migration timeout,
	but the timeout since migration is stalled. Each time when migration
	does some progress, this timeout counter is reset. Thus, overall
	migration time can be longer than migration_timeout, and this is
	by design.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=970645

2013-07-05  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm-tool: service management work with previous systemd release
	The service management assumes systemctl automatically adds ".service"
	suffix to the service name. This is true for the latest SystemD, but
	before systemd-44-20.fc17 [1], this feature is not available.

	This patch adds ".service" suffix before sending the service name to
	systemctl, so it does not depend on the auto-suffixing feature any more.

	[1] https://lists.fedoraproject.org/pipermail/package-announce/2012-October/090358.html

	Reported-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>

2013-07-04  Greg Padgett  <gpadgett@redhat.com>

	vm payload: custom volume labels
	Change required for cloud-init integration: support custom volume labels
	for vm payload.

	Bug-Url: https://bugzilla.redhat.com/619761

	vm payload: creation of full pathnames in payload
	Change required for cloud-init integration: support the creation of
	payloads with files residing in subdirectories of the payload image.

	Bug-Url: https://bugzilla.redhat.com/619761

2013-07-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove unused hsm._hsmSchedule()
	Related to: BZ#960952.

2013-07-04  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	PEP8: fix variours errors
	pep8 1.4.6 gives the following error
	tests/hooksTests.py:140:23: E127 continuation line over-indented for
	visual indent
	tests/hooksTests.py:141:18: E124 closing bracket does not match visual
	indentation

	And pep8 1.4.5 on RHEL6 gives the following error
	vdsm/guestIF.py:30:5: E122 continuation line missing indentation or
	outdented

	This patch fixes the errors while makes pep8 1.4.5 and 1.4.6 both agree
	with the fix.

2013-07-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding to make a print of pep8 and pyflakes versions

2013-07-03  Martin Sivak  <msivak@redhat.com>

	Fix the charset conversion logic in hooks.py
	The proper way to convert text from byte oriented string to unicode
	is to call str.decode(encoding). This patch fixes this and makes
	Jenkins tests work for people with diacritics in their names.

	The issue was caused by my name (with czech accents) being present
	in an environment variable which was processed in hooks.py
	using the following code:

	scriptenv = os.environ.copy()
	for k, v in scriptenv.iteritems():
	    scriptenv[k] = unicode(v).encode('utf-8')

	This unicode call expects the data to be in ascii, but my name was
	encoded as utf-8 in this case.

2013-07-03  Eduardo Warszawski  <ewarszaw@redhat.com>

	Improve StoragePool.detachAllDomains() monitoring.

2013-07-03  Assaf Muller  <amuller@redhat.com>

	Fixed rollback of port-mirroring enabled nic during hotplugNic
	During vm.py:hotplugNic, if the nic had port mirroring enabled
	and setPortMirroring failed, then previously the rollback
	tried to use self.hotunplugNic with a 2nd parameter but the method
	only accepts one parameter, as it should.

	Patch Set 2:
	Fixed merge issues

2013-07-03  Peter V. Saveliev  <peet@redhat.com>

	vdsClient: check getFileList arguments
	A simple check of getFileList arguments on the function call.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=958878

2013-07-03  Ohad Basan  <obasan@redhat.com>

	Fix pep8 compliance after updating to latest pep8

2013-07-03  Mike Kolesnik  <mkolesni@redhat.com>

	vm: Fix custom device properties on hot operation
	On hot plug & unplug of a vNIC/vDisk the custom device parameters should
	be taken from the device itself, as is done in the run VM operation,
	thus keeping a consistent API.

2013-07-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fixing pep8 and pyflake errors after updating to new pep8 version

2013-07-02  Yeela Kaplan  <ykaplan@redhat.com>

	tests: Mark JsonRpcServerTests as broken

2013-07-02  Dan Kenigsberg  <danken@redhat.com>

	functional tests: allow ssl too

2013-07-02  Giuseppe Vallarelli  <gvallare@redhat.com>

	Hidden bonds[1/2]: Adding a test to cover the current implementation of nics().

2013-07-01  Federico Simoncelli  <fsimonce@redhat.com>

	volume: add the BLOCK_SIZE constant

2013-07-01  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Storage Domain V3 Functional Tests
	The functional tests are for storage domain v1, change them to test
	both storage domain v1 and v3. Getting host id lease from sanlock takes
	more time in storage domain v3 so the patch increases the waiting time
	before timeout.

	Add NFS storage domain functional tests
	Test creating NFS storage domain, pool, image, volume.
	Test creating VM with the NFS storage.

	How to verify:
	1. build and install VDSM rpms, including vdsm-tests
	2. start VDSM service
	3. cd /usr/share/vdsm/tests
	4. ./run_tests.sh -m 'nfs' functional/xmlrpcTests.py

2013-06-30  Aravinda VK  <avishwan@redhat.com>

	gluster: new vdsm verb glusterHostUUIDGet
	New gluster vdsm verb to get glusterd UUID of the host, which uses
	gluster cli command "gluster system:: uuid get"

	Gluster CLI sample output:
	UUID: f2023224-2ae2-4893-92ab-b078defd2991

	new verb: glusterHostUUIDGet
	Output structure: {'uuid': UUID}

2013-06-30  Antoni S. Puimedon  <asegurap@redhat.com>

	Make networking API endpoints match schema
	There used to be non-optional parameters with default values. And
	not only that, the default values were mutable which is bad.

	Patch Set 2:
	- Rebased.

2013-06-29  Aravinda VK  <avishwan@redhat.com>

	dumpStorageTable: fixed a unhandled exception when poollist is empty
	when poollist is empty then dumpStorageTable was failing with
	'IndexError: list index out of range', Also crash dump was reported
	in /var/log/messages

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=961816

2013-06-29  Dan Kenigsberg  <danken@redhat.com>

	vdscli: make __getLocalVdsName more robust
	vdscli attempts to guess the name of the local host by reading the
	"subject" of its openssl certificate.

	On Fedora 19, the order of the subject fields has changed. This patch
	makes __getLocalVdsName a bit more robust, and adds a unit test for it.

2013-06-27  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	nit fix for _cleanOldFiles
	svdsm.sock will not be in filterd fileType

2013-06-27  huntxu  <mhuntxu@gmail.com>

	XMLRPCServer: make XMLRPCServer able to listen on IPv6 addresses
	SimpleXMLRPCServer is derived from SocketServer.TCPServer of which the
	default address_family is socket.AF_INET, that makes it could only
	listen on IPv4 connections. This patch wraps it and extends its
	ability on IPv6 networks.

	How to test:

	  1. Build and install VDSM RPMs
	  2. Edit /etc/vdsm/vdsm.conf, change "addresses/management_ip = ::",
	and "vars/jsonrpc_enable = false"(as known to break JSONRPC)
	  3. Restart VDSM daemon
	  4. "netstat -nlp6t" or "ss -nlp6t" should indicate vdsm XMLRPC server
	is listening on "::"
	  5. "vdsClient -s '[::1]:54321' getVdsCaps" succeeds

2013-06-27  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: Check disk alignment using virt-alignment-scan

2013-06-27  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix potential race of getting caps during addNet
	getmtu can return IOError when a libvirt network underlying device
	does not exist. This can happen when we get a getVdsCapabilities
	request after the libvirt network entry has been added but before
	the device has been ifupped.

2013-06-26  Yeela Kaplan  <ykaplan@redhat.com>

	alignmentScanTests: Remove text output validation of help
	'virt-alignment-scan --help' output has changed in fedora 19.
	No need to check the actual output text, but only that we
	can run 'help'.

2013-06-26  Greg Padgett  <gpadgett@redhat.com>

	vm payload: clarify intent of supporting multiple files
	With cloud-init integration now using payloads with multiple files,
	clarify that this is supported in the payload code.

	Bug-Url: https://bugzilla.redhat.com/619761

2013-06-26  Eduardo Warszawski  <ewarszaw@redhat.com>

	Ignore partially deleted images in getAllImages().
	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=905038

	Remove StoragePool.getImageDomainsList().
	Avoid code duplication.

	Related to BZ#905038.

	Interface changes for getImageDomainsList internal changes.
	Complement to I25fe2714e4c4e832230653cebc87d8da0e81028b.

2013-06-26  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix multiple default gateways reporting
	Up until now there was just a default gateway per host, defining
	default as going towards 0.0.0.0/0. If more than one device
	received a default gateway setting, only the latest to be
	configured kept its configuration as host default configuration.

	Now, thanks to multiple gateways, we have a routing table for each
	network, which allows us to have multiple default gateways to
	report. The only issue is that /proc/net/route only reports
	information for table 254, while we are using several. For this
	reason, we change the implementation to use ipwrapper to get the
	information from all the tables.

	PatchSet 2:
	- Fix calling to ipwrapper and added it to lib/vdsm/Makefile.am

	PatchSet 3:
	- Rebase on top of the fixes of multiple gateways.
	- Split Routes fromText into parser and fromText.
	- Made source use the new placement and parse method of ipwrapper.

	Patch Set 4:
	- Rebase the patch.

2013-06-26  Assaf Muller  <amuller@redhat.com>

	Multiple Gateways[2/2]: configNetwork integration
	This patch provides the integration of sourceRoute with the
	configurator flow.

	For static routes, multiple gateways uses the ifcfg configurator
	and its configWriter to write:
	    /etc/sysconfig/network-scripts/{route,rule}-netname
	Those files are taken care of by ifup/ifdown.

	For dynamic routes (DHCP) it has a hook in
	/etc/dhcp/dhclient.d/sourceRoute.sh that is automatically executed
	by dhcpd when it obtains a lease for a device. The hook will call
	directly the sourceRoute.py command line UI that will delegate
	the actions to the iproute2 configurator. For this hook to work,
	selinux needs a few policy updates that have been requested in:

	https://bugzilla.redhat.com/show_bug.cgi?id=977856

	The selinux-policy changes are needed due to the fact that the python
	code in sourceRoute.py is being executed from the dhcp_t context
	and not from the usual service, reason for which currently there was
	no policy to allow such context to access several parts of the system
	via python.

	The integration is done at the configureDevice level because it is
	the only sensible choice considering that the static file removal
	must be done between ifdown and ifup (so that ifdown takes down the
	rules and ifup doesn't have them anymore so it does not apply them)
	and the fact that configureDevice for nics and bonds must leave the
	device up, i.e., they do ifdown and ifup inside the method.

	Patch Set 2:
	- delNetwork now checks that the bootproto is not dhcp
	- In sourceRoute.py: Removed check if the interface has
	  a libvirt network on top of it because it was preventing
	  DHCP interfaces from going up properly. Will need to think
	  of a different fix.

	Patch Set 4:
	- Fixed the Makefile and spec for dhcp hook installation.

	Patch Set 5:
	- Fixed the network deletion. It was trying to remove routes for an
	  already unexistant network device.

	Patch Set 7:
	- Fixed dhcp flow by changing when we do libvirt network addition
	  and deletion.

	Patch Set 8:
	- Addressed review comments. Fixed the ifup ifdown flow when using
	  the ifcfg configurator (and the iproute2 for dhcp).

	Patch Set 9:
	- Addressed review comments and squashed:
	      http://gerrit.ovirt.org/#/c/16087/1
	      I09aec8fa9a2ef2d61609a0a807f4e7130978fbfb
	  into this patch.

	Multiple Gateways[1/2]: add sourceRouting module
	http://www.ovirt.org/Features/Multiple_Gateways

	Patch Set 3:
	* Trivial fixes after comments from initial review

	Patch Set 4:
	* Use newly implemented iproute2 binary wrapper

	Patch Set 5 - 8:
	* Rebased changes from ipwrapper.py
	* Structural changes to allow introducing a configurator

	Patch Set 9:
	* Configure now checks if the gateway received
	  is 0.0.0.0. If so, nothing has to be done.

	Patch Set 11:
	* Squashed with next patch in series
	* Added a configurator to SourceRoute
	* Moved SourceRoute add/del routes/rules to Ifcfg configurator
	  and Iproute2 configurator.
	* configure and remove now check that the requested interface
	  is 'tracked' by VDSM. That is, it was created by us
	  and not an interface configured manually by the admin.
	* SourceRoute no longer needs or knows if it's Static or not.

	Patch Set 12:
	* Added sourceRoute.py and netconf/iproute2.py to make
	  and spec files

	Patch Set 13:
	* Use a argparse to deal with command line arguments

	Patch Set 14:
	* Dropped WIP tag and changed name to reflect that it is a partial
	  state of the feature.

	Patch Set 15:
	* Rebase

	Patch Set 16:
	* Reflect the changes of method names in the previous patch.

	Patch Set 18:
	* Fix deleting network without routes and rules.

	Patch Set 19:
	* Fix ipaddr -> ip.

	Patch Set 21:
	* Fix 'static' -> 'none'.

	Patch Set 22:
	- Fix bug when taking down interfaces. The previous version failed to
	  remove rules due to the fact that on el6:
	      ip route show table xxxxxxxxx
	  gives the routes of the xxxxxxxxx table but also of the main table,
	  so for example the ovirtmgmt route on a different device and
	  different table was being marked for removal from table xxxxxxxxx.
	  Since the route wasn't really on the table, netlink returned an
	  exception and we never reached the rule removal stage.

	Patch Set 23:
	- Make the code cleared in the except ValueError.

	Patch Set 24:
	- Sort import sections alphabetically. Make staticmethods out of
	  instance methods without state nor class dependencies.

	Patch Set 25:
	- Fixed the bootup issues for DHCP and refactored sourceRoute into
	  static and dynamic for easier integration in the following patch.

	Patch Set 26:
	- Addressed review comments about logging and documenting.

2013-06-26  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix bridgeless net regression
	The commit:
	Ie8bb5fd9fc6ad69cf120d62264d73490b65b82d7
	http://gerrit.ovirt.org/#/c/11356/4/

	That commit introduced a bug that prevents the user from configuring
	a bridgeless network with dhcp. That is so because after the change,
	if ipaddr is None, which is the most usual case when configuring a
	network for dhcp, bootproto will be overriden by what was on the
	original config file (quite probably None).

2013-06-24  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	functional test: boot VM with network interface device

2013-06-24  huntxu  <mhuntxu@gmail.com>

	netinfo: get an interface using one of IP addresses assigned to it
	We record the server's IP address for each XMLRPC request, preventing
	manually parsing the routes files.
	This patch also fix an error that when connected from localhost(using
	tools like vdsClient) through the loopback interface, vdsm would report
	the interface associated with the default gateway as the used interface,
	instead of the expected result 'lo', because the routing table doesn't
	contain any information for the device 'lo'.

2013-06-24  Antoni S. Puimedon  <asegurap@redhat.com>

	configNetwork: fix handleBondings regression
	during the rebase destroy was not updated to its new name of
	destroyOnRemoval. This patch fixes that.

	Patch Set 2:
	- Added a functional test to catch this sort of problem in the
	  future.
	Patch Set 3:
	- Fixed arguments.

	Patch Set 4:
	- Added extra tests.

	Patch Set 5:
	- Improvement on the tests.

	Patch Set 6:
	- Fixed pep8.

	Patch Set 7:
	- simplified pinger.

	Patch Set 8:
	- Cleaned the pinger implementation.

2013-06-23  Mike Kolesnik  <mkolesni@redhat.com>

	Don't depend on storage module
	There is no real need for hooking module to depend on the storage
	module, except for the execCmd which is being delegated to
	utils.execCmd, so importing the execCmd directly from utils instead.

2013-06-23  Antoni S. Puimedon  <asegurap@redhat.com>

	netinfo: fix getMaxMtu generator handling
	getMaxMtu was changed to use iterables instead of just lists.
	The check for if and a generator is always True regardless of
	it generating any elements. Thus, max could fail.

	This fixes a regression introduced by:
	http://gerrit.ovirt.org/15355

2013-06-22  Dan Kenigsberg  <danken@redhat.com>

	vmTests: split data to another module
	As suggested by Maciej and promised to Vinzenz in
	http://gerrit.ovirt.org/14111
	Also, bury the turm "libvirtvm".

2013-06-21  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove unused hsm members.
	_statslock, _domstats, _cachedStats.

2013-06-20  Giuseppe Vallarelli  <gvallare@redhat.com>

	tests: Adding functional tests for networking
	Functional tests for creation and deletion of virtual networks:
	This patch includes tests related to the addNetwork verb in
	particular validation of input params. Tests added are the
	following ones:

	* test_add_delete_network
	* test_fail_with_invalid_bonding_name
	* test_fail_with_invalid_bridge_name
	* test_fail_with_invalid_ip_config
	* test_fail_with_invalid_nic
	* test_fail_with_invalid_params

2013-06-19  Assaf Muller  <amuller@redhat.com>

	iproute2 binary wrapper
	Initially to be used by the upcoming multiple gateways
	feature. Only the needed commands were implemented.

	Patch Set 5:
	  * Changed Route and Rule parsing to Toni's more
	    robust method
	  * Route class: Previously there was a distinction
	    between a default route and a normal route. I removed
	    that distinction and the word 'default' in a route
	    is interpreted as '0.0.0.0/0'

	Patch Sets 6-9:
	  * Empty

	Patch Set 10:
	  * Added ipwrapper.py to spec and make files

	PatchSet 11:
	  * Made changes proposed in earlier reviews.

	PatchSet 12:
	  * Parsing unit tests.

	PatchSet 13:
	  * Added forgotten parsing unit tests.

	PatchSet 15:
	  * Changed name of routeForDevice to reflect that it only returns the single
	    route for the link network of the device.

	PatchSet 16:
	  * Removed unnecessary output from action performing methods.

	PatchSet 17:
	  * Added python-netaddr to the build requirements.

	PatchSet 18:
	  * Rebased to get the benefits from markin jsonrpc tests as broken.

	PatchSet 19:
	  * Provided more descriptive docstrings for fromText.

2013-06-19  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove unused onlyDataDomains parameter from getImageDomainsList.
	This patch is required for unify hsm.getImage* functions logic.
	onlyDataDomains parameter never was false. In addition it was
	erroneously used by the CLI.

2013-06-18  Dan Kenigsberg  <danken@redhat.com>

	Declare a broken test as such
	jsonRpcTests.JsonRpcServerTests.testMethodCallArgList tends to fail when
	run on Jenkins, such as in
	http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2864

2013-06-18  Antoni S. Puimedon  <asegurap@redhat.com>

	netmodels code cleanup
	Removes unused parameters and variables.

2013-06-18  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Separate libvirt network configuration from ifcfg
	The libvirt network configuration code could be reused by non persistent
	configurator, so this patch separates it from the ifcfg configurator.

	NetReload: netmodels for editBonding/removeBonding
	Re-implement the logic of editBonding and removeBonding using
	netmodels.

	PatchSet 11: Rebase.

2013-06-18  Lukas Bednar  <lbednar@redhat.com>

	Add code coverage support
	This commit adds option to enable vdsm code coverage by setting

	    COVERAGE_PROCESS_START=/path/to/config/file/for/python-coverage/module

	in /etc/sysconfig/vdsm.

2013-06-17  Giuseppe Vallarelli  <gvallare@redhat.com>

	Fix param name in vdsmapi-schema: naming issue.
	Data type for inbound and outbound params should be
	VmInterfaceDeviceBandwidthParams instead of
	VmInterfaceBandwidthParams.

2013-06-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm-tool: extend service module to cover alternative service names
	Service names are different on various systems, instead of hard-coded
	service names for each supported system, we can extend vdsm.tool.service
	to detect the right service name given some hints (possible alternative
	names). This makes the service management more flexible and helps to
	port us to new systems easily.

	This patch iterates over the alternative service names list for each
	management operation.

2013-06-16  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#836161 - Remove code obsoleted by deleteImage() rewrite.
	This is a separate patch for improved readability.

	Related to BZ#910013, BZ#905938, BZ#875708, BZ#864073

2013-06-13  Daniel Erez  <derez@redhat.com>

	introducing virtio-scsi support
	Drive class:
	* makeName - map 'scsi' to 'sd'
	* getXML:
	- added 'sgio' flag [1]
	- device='lun' is used instead of device='disk' for supporting
	  LUN passthrough (which can be used with virtio-scsi).
	  Hence, adding 'driver' tag similarly to 'disk' device.

	LibvirtVm class:
	* getUnderlyingDriveInfo - get/set 'sgio' attribute.

	TestLibvirtvm class:
	* testControllerXML - test 'virtio-scsi' controller
	* testDriveXML:
	- test virtio-scsi image disk
	- test virtio-scsi LUN passthrough

	API Schema:
	* Updated:
	- VmDiskDeviceInterface
	- VmDiskDeviceType
	- VmControllerDevice

	[1] 'sgio': SCSI Generic IO - filtered/unfiltered
	(indicates whether the kernel will filter unprivileged
	SG_IO commands for the disk).

2013-06-13  Amador Pahim  <apahim@redhat.com>

	Added 3.3 to SupportedENGINES in dsaversion

2013-06-13  Assaf Muller  <amuller@redhat.com>

	Added 3.2 to SupportedENGINES in dsaversion

2013-06-13  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.init: ajust libvirt log file
	Nowadays VDSM configure libvirt daemon to log into /var/log/libvirtd.log.
	This patch will make vdsm set the log file into the current default
	location for libvirt logs /var/log/libvirt/libvirtd.conf.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=755548

2013-06-13  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm-tool: extend "service" module to check existence of a service
	Add a service-is-managed command to check if a service is managed by
	either of the supported init systems. With the decorator _XXXNative in
	previous commit, the implementation of service-is-managed command is
	straight forward: just add _XXXNative tag to a action function that
	always succeeds.

	vdsm-tool: avoid service action redirections
	Some smart init system will redirect actions to other init system when
	the service is not managed natively. This behaviour interferes the
	parsing of the service action output.

	Add a decorator _XXXNative to check if a service is managed by a certain
	init system. _XXXNative tag is then added to every action function to
	avoid execution of an action on a service that is not managed by that
	particular init system, so as to avoid redirections.

	An environment variable is also added for SysV actions to prevent
	redirection to SystemD, this is specific for those systems with
	co-existence of SystemD and SysV, and is no harm to those systems with
	only SysV or with co-existence of Upstart and SysV.

2013-06-13  Giuseppe Vallarelli  <gvallare@redhat.com>

	QoS feature: Adds bandwitdh elem to a network interface definition.
	NetworkInterfaceDevice can now generate xml definition for shaping
	incoming and outgoing traffic supported attributes are the following
	ones: average, burst and peak.

2013-06-13  Arik Hadas  <ahadas@redhat.com>

	fix for after_vm_dehibernate hook not being called
	Due to what seems to be a copy-paste or typo problem, the
	after_vm_hibernate hook was called instead of after_vm_dehibernate
	hook after the vm is being dehibernated. This patch correct that call.

2013-06-12  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Simplify setNewMtu()
	It will update the interface's MTU only if its user being removed has
	the maximum MTU.

2013-06-11  Timothy Asir  <tjeyasin@redhat.com>

	gluster: fix remove disabled hook exception handling error
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=971775

2013-06-11  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Move removing libvirt network to configurator
	This patch adds a wrapper for the configWriter.removeLibvirtNetwork()
	in configurator and call it in delNetwork because we should try to
	avoid using ConfigWriter directly in configNetwork.py

2013-06-11  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: vmChannels: Do not use epoll unregister
	We don't use epoll.unregister for the deregistration from epoll anymore.
	According to the epoll documentation, epoll will remove the fd when the
	fd was closed.
	Since we're always closing the sockets where this is used and we
	otherwise might run into race conditions we're no longer calling
	epoll.unregister to avoid attempts to unregister fds which might no
	longer belong to us.

	The problem on this race condition is that we're handling file descriptors
	by numbers. When we're ending the GuestAgent by calling stop() it will send
	the fd to the listener thread by inserting it into a queue so the listener
	can handle it the next time. However we're immediately closing the socket and
	the OS is free to reuse the fd. By the time we're going to unregister the fd
	from epoll the fd might have been already reused for our process by the OS
	because it reassigns the lowest available fileno.

	To solve this issue we're using the capability of epoll to detect closed
	fds and rely on it's mechanism to unregister them. By that we're not running
	into the issue of unregistering the fd from fd which might have been already
	already assigned to a different object.

2013-06-11  Mark Wu  <wudxw@linux.vnet.ibm.com>

	NetReload: netmodels for delNetwork
	This patch re-implements the delNetwork logic using the network
	entities defined in netmodels.

2013-06-11  Federico Simoncelli  <fsimonce@redhat.com>

	iscsi: report hba sessions as fiber channel
	At the moment the engine doesn't support static (unmanaged) iscsi
	connections therefore it's safer to maintain the old behavior and
	report the HBA iscsi sessions as if they were fiber channel devices.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=967605

2013-06-10  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	multipath.py: use vdsm.tool.service to restart multipathd
	multipath.py restart and reload multipathd using service command
	directly. This patch uses vdsm-tool service module to manage the system
	service improves portability. It covers SysV, SystemD and Upstart as
	well as possible daemon names in various systems (multipathd is named
	multipath-tools in Ubuntu).

	Add "service-reload" command to vdsm-tool service module
	"vdsm-tool service-reload XXXd" will notify the system service to reload
	its configurations

2013-06-10  Dan Kenigsberg  <danken@redhat.com>

	fix testBuildCmdLine not to be upstream-specific
	A certain downstream product would like to change SMBIOS_PRODUCT without
	failing the unit test.

2013-06-10  Eduardo Warszawski  <ewarszaw@redhat.com>

	Improve __prefetch logging.
	Related-To: https://bugzilla.redhat.com/show_bug.cgi?id=967296

2013-06-09  Federico Simoncelli  <fsimonce@redhat.com>

	misc: handle scientific notation in readspeed
	When the amount of bytes is low and the speed is high the elapsed time
	is expressed using the scientific notation.

	In this patch:
	* handle dd errors
	* minor fix to make _readfile prettier

	Bug-Url: http://bugzilla.redhat.com/show_bug.cgi?id=948232

2013-06-07  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netinfo: Simplify the check if an interface still has any other users.
	In current oVirt network models, a nic device has four kinds
	of usages:
	    * bonding's slave
		* vlan's slave
		* bridge's port
		* bridgeless network's interface
	A bond device has the same usages as nic except the first one.

	And an interface(nic or bonding) could be multiplexed by different usages.
	But bonding and bridge need use the interface exclusively. So only two
	combinations are valid:
		* multiple vlan users
		* multiple vlan users with one bridgeless network user

	When we remove one user of an interface, we need check if the interface
	still has by other users except the user being removed currently. According
	to that, we decide if restore the interface to initial state or destroy it
	(for bonding).

	The original code can work fine both with the netinfo instantiated before
	or after the user is removed. In the new code, it needs an updated netinfo
	instance, which doesn't include the user is already removed. And it doesn't
	require any information about the user removed.

	In the original implementation, the checks for nic and bonding are handled differently
	because it also checks the bond users if a nic is a slave of bond. Actually,
	it's not neccessary either. If the bond has other users, we will not remove its
	slave. That means the check will not be invoked. So for the check of nic, it
	doesn't need care about the usage of its bond master, because it's done in bond
	level.

2013-06-07  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: update python-pthreading
	F19 and EL7 should require python-pthreading >= 1.0.2

2013-06-07  Giuseppe Vallarelli  <gvallare@redhat.com>

	Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param.
	A TypeError is raised when using configNetwork.addNetwork by providing
	bootproto as a keyword argument, this patch solve this issue without
	altering addNetwork and objectivizeNetwork interfaces.

2013-06-06  Antoni S. Puimedon  <asegurap@redhat.com>

	Unify mtu internal representations as integers
	In netmodels, configNetwork and netinfo.getMaxMtu we always handle
	MTUs as being of integer type. There were only two exceptions to
	this rule, in netinfo reporting code. This code makes getMtu
	to return an integer just like getMaxMtu and makes the exceptions
	be exceptional cases that will use str.

2013-06-05  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netmodels: add a backward reference to NetDevice's master device
	The netmodels keeps reference to slave device for a master device, but
	the slave device doesn't have a backward reference. This patch adds
	the reference on configuring, which can make it easier to get its usage
	on removing an interface. In the coming delNetwork implementation based
	on netmodels, we just call netdevice.remove() to delete a network entity.
	So the NetDevice object should contain all the information needed by
	the remove operation. We have different handling on removal when an
	interface is attached to different types of masters. For example, if the
	master of an inferface is Bond, Vlan, or Bridge, then we don't need
	consider removing IP configuration on it because it could not be the top
	object of the network hierarchy.

2013-06-05  Timothy Asir  <tjeyasin@redhat.com>

	gluster: Fix vdsm gluster api schema error
	fixed typo and renamed 'boolean' into 'bool' in json schema file
	and renamed 'type' into 'mimetype'.

2013-06-05  Giuseppe Vallarelli  <gvallare@redhat.com>

	fix: Adding missing hooks folder to vdsm.spec.in
	Missing folders in vdsm.spec.in for the update device hooks are
	the following ones: before_update_device and after_update_device.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893576

2013-06-05  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Extract helper functions for updating nic and bonding's mtu

	Reduce the redundant parameters for addVlan()

	Separate adding libvirt network from configuring host network.
	It makes it simpler to test the network configure functions, and
	also make the code a little bit cleaner.

2013-06-05  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm-toolize dummybr and nwfilter
	Move dummybr and nwfilter to vdsm-tool, so that all the init wrappers in
	the supported or to-be-supported systems can call them uniformly.

2013-06-05  Maciej Lichon  <maciej.lichon.wroclaw@gmail.com>

	Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmdLine

2013-06-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Making getAllTasks[List and Statuses] an SPM command
	Currently VDSM does not manage HSM tasks. This verb is used only to poll
	SPM tasks. If the host is not SPM, an exception will be raised. Backwards
	compatibility is not required as the verb API is not changed and the
	behaviour stays as expected in older clusters (Instead of returning empty
	list for non-spm hosts, vdsm will raise exception as expected).

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=880547

2013-06-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Support teardownVolumePath(None)
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=962549

2013-06-04  Antoni S. Puimedon  <asegurap@redhat.com>

	NetReload: netmodels for addNetwork
	This patch defines the netwok entities that we use in oVirt:

	- NetDevice,
	- Bridge,
	- Vlan,
	- Bond,
	- Nic

	These entities are now responsible for their underlying devices for
	the addNetwork step.

	The interaction is as follows:

	1. addNetwork -(generates netmodels via)-> objectivizeNetwork
	2. "configure(logical_net)" is called on the top network device,
	3. The top network device calls configure for its device type on the
	   configurator, that in turn calls configure in any underlying device.

	In a following patch, they shall take
	responsibility as well for network deleting.

2013-06-03  Timothy Asir  <tjeyasin@redhat.com>

	gluster: Added verbs for read, update, add and remove hooks
	Below new verbs are added to perform read, update, add and remove hooks

	* hookRead
	  Output Structure:
	       {'content': HOOK_CONTENT,
	        'type': MIME_TYPE,
	        'md5sum': MD5SUM}
	* hookUpdate
	* hookAdd
	* hookRemove

2013-06-03  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm.tool.service: fix _systemctlNative
	_systemctlNative lists systemd units and check if the given service is
	managed by systemd. There is a bug in the checking code. When
	splitting words, it does not fetch the word from the resulting array.
	The first word is the name of the unit/service. This patch fix the
	problem.

	Another small problem is it does not format the error message correctly,
	this patch fix the formatting.

	At last it fixes a bad doc string.

2013-06-03  Saggi Mizrahi  <smizrahi@redhat.com>

	cpopen: Fix signal handling in sync points

2013-06-03  Federico Simoncelli  <fsimonce@redhat.com>

	domain: use the dd statistics for the domain delay
	The previous implementation of getReadDelay was calculating the reading
	time (for the domain statistics) checking the execution time of dd.
	This patch introduces a low level readspeed command to parse the more
	accurate statistics provided by dd in the stderr.

	Bug-Url: http://bugzilla.redhat.com/show_bug.cgi?id=948232

2013-06-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	Supervdsm didn't create pid file when starting up
	This cause errors over sysV when trying to perform service operations

	closing file after writing

2013-05-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	Returning namedtuple from util.pidStat for simpler usage

2013-05-30  Saggi Mizrahi  <smizrahi@redhat.com>

	cpopen: Fix tests
	Now they run on make check

2013-05-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Creating /var/run/vdsm directory as part of rpm installation
	Supervdsm service cannot start without the existence of this directory,
	it creates its pid file and socket there. Instead of only set the
	directory attributes (%ghost flag) also include the directory as part of the
	package.

2013-05-29  Yaniv Bronhaim  <ybronhei@redhat.com>

	Supervdsm as external service
	Creating supervdsmd and set dependencies between vdsm and supervdsm
	services

2013-05-29  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm-tool: service probing do not trigger abrt warning on RHEL6
	When an service management operation fails, the service module raises a
	RuntimeError, this triggers abrt warning of un-caught Python exceptions.
	This is good for reporting error when fail to start a service, but
	probing command such as "service-status" should not raise un-caught
	exception if the service is down. It should report the error code and
	leave the caller to decide what to do (probably start that service).

	In this patch we define a specific exception for service operations,
	then for service probing operation, it swallows the exception, prints
	error message and returns 1. For other management operations, the
	exception is still raised.

2013-05-29  MeiLiu  <liumbj@linux.vnet.ibm.com>

	vdsm: Add ioTune support at vm creation
	The code parses the 'ioTune' descrption for block devices at vm creation
	time and adds the tag accordingly.

	e.g.
	Adding 'ioTune':{'read_bytes_sec': 6120000, 'total_iops_sec': 800} in specParams for a
	block device will add the following in dom xml for that device.

	<iotune>
	    <read_bytes_sec>6120000</read_bytes_sec>
	    <total_iops_sec>800</total_iops_sec>
	</iotune>

	These parameters constrains the I/O bandwith for the device.

2013-05-28  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix py_modules in setup.py, and duplicate declaration of cpopen.so in spec
	After modifying cpopen.py to __init__.py we should also update setup.py
	parameters.

	Both only omit warnings during build.

2013-05-28  Yeela Kaplan  <ykaplan@redhat.com>

	devicemapper: remove unused _parseDevFile and getDevUuid

	multipath: remove unused device attribute 'devnum'

2013-05-28  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: [REFACTORING] libvirtvm.py bye bye
	In order to start with the refactoring as a first step we'll get rid of
	libvirtvm.py and merge vm.py into libvirtvm.py and named this whole thing
	vm.py

	Additionally Vm and LibvirtVm have been merged into one and there's now
	only a class Vm.
	Also devices have been renamed from LibvirtVmDevice to VmDevice
	for simplicity.

2013-05-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Extend vdsm-tool commands - retrieving host uuid by utils.getHostUUID
	Deploying an host requires to verify if an host has vdsm installed.
	The command 'vdsm-tool vdsm-id' returns vdsm uuid if vdsm is installed.
	It doesn't require running vdsm instance.
	This patch also adds 'legacy' parameter to getHostUUID for backward
	compatibility, if set to false the mac address won't be added to the
	uuid.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=964967

2013-05-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using pidStat to get pid creation time
	In proc/pid/stat field 21(starttime) defined the time when the process
	started. Before we used ctime (time of last status change) that might change
	during process run.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=966133

2013-05-22  Assaf Muller  <amuller@redhat.com>

	Allow modification of disk xml by before_disk_hotplug
	The return value of hooks.before_disk_hotplug wasn't being used
	like it is in hooks.before_nic_hotplug. Meaning that if a hook
	changed the disk XML it wasn't actually updated in the VM's
	domxml.

2013-05-22  Federico Simoncelli  <fsimonce@redhat.com>

	version: upstream dirty is nightly
	Previously the upstream dirty builds were released using a pre-release
	versioning (prefixing a 0). This doesn't fit the release process in
	which the upstream builds are nightly.

	More information on pre-releases at:

	http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Pre-Release_packages

	In this patch:

	* remove the leading 0 used for pre-releases (instead of nightly)
	* remove vdsm.spec on make clean
	* use any tag (not just the annotated ones) to identify the release

2013-05-22  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Use UUID as unique identifier for socket names
	To avoid issues with limitation on the length of paths to UNIX Domain sockets
	we're changing the behavior to use the UUID of the VM.

	Additionally for backwards compatiblity we're making a symlink of the old name
	if it not already exists.

	Bug-Url: https://bugzilla.redhat.com/918536

2013-05-22  Antoni S. Puimedon  <asegurap@redhat.com>

	Move getMaxMtu to netinfo
	For a while now, getMaxMtu has not used any part of configWriter,
	but just netinfo information. Thus, it is only right that it should
	be moved to its rightful module, i.e., netinfo.py.

2013-05-21  Federico Simoncelli  <fsimonce@redhat.com>

	oop: rename createSparseFile to truncateFile

2013-05-21  Eduardo Warszawski  <ewarszaw@redhat.com>

	Deactivate libvirtVM.Drives()
	Change I8d310f216987b7 has introduced teardownVolumePath() calls with a
	Drive object instead of a drive dictionary from self.conf.
	In its previous form, teardownVolumePath() has silently ignored such
	input, keeping the volume active.

	This patch makes teardownVolumePath() handle such inputs properly. This
	is one baby step in the process of getting rid of self.conf: we would
	like to use the objects everywhere within vdsm.

	Note that this patch introduces an ugly log line when pointlessly trying
	to tear down a cdrom device. This would be fixed in a subsequent patch.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=962549

2013-05-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Fix bashisms in vdsmd.init.in and ovirt_functions.sh
	Fix vdsmd.init.in bashisms to make it run in dash, the default scripting
	shell on Ubuntu. Use checkbashisms in Ubuntu devscripts package to check
	it then fix one by one.

	Some bashisms that are not going to be fixed in this patch:
	1. "local" is not in POSIX but dash supports it, however old dash does
	not support "local x y", so we have to "local x; local y".
	2. gettext related bashisms, they do not harm in Ubuntu.

	[1] https://launchpad.net/ubuntu/+source/devscripts
	[2] https://wiki.ubuntu.com/DashAsBinSh#I_am_a_developer._How_can_I_avoid_this_problem_in_future.3F
	[3] http://mywiki.wooledge.org/Bashism

2013-05-17  Antoni S. Puimedon  <asegurap@redhat.com>

	Raise ValueError when passed invalid prefix
	We should give meaningful Python errors to assist with user-input
	checking. This patch is one step in this direction.

2013-05-17  Giuseppe Vallarelli  <gvallare@redhat.com>

	Test: regression test to catch cross imports.
	This test is useful to catch non legal imports in lib/vdsm.
	Lib modules cannot use/depend upon regular (non python package
	vdsm) modules: for example lib/vdscli.py can't depend on
	vdsm/guestIF.py module. This test updates the PYTHONPATH by
	removing the regular vdsm modules, later it tries
	to import lib modules, if there are non legal imports
	an ImportError is raised. The error message reports
	the traceback showing the non legal import.

2013-05-17  Saggi Mizrahi  <smizrahi@redhat.com>

	service: make iscsid a systemd dependency
	Also remove starting iscsid with force-start as it is no longer
	supported

2013-05-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Adding cpopen as external python package to vdsm
	vdsm-python-cpopen is an external package for betterPopen code. This
	provides as part of vdsm rpms until this package will be part of
	fedora's official packages.

2013-05-16  Giuseppe Vallarelli  <gvallare@redhat.com>

	Refactoring storage.misc: moving watchCmd and its deps to vdsm.utils.
	This refactoring is needed to break the depedency of lib/vdsm/qemuImg
	from vdsm/storage/misc. Modules inside lib/vdsm should not use
	anything that is not present in the python std lib or in a dependency
	of the vdsm-python package.

2013-05-16  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: python-2.4 compatibility
	minor changes to support python-2.4.

2013-05-15  Giuseppe Vallarelli  <gvallare@redhat.com>

	refactoring: getMaxMtu updated implementation using max builtin.
	Improvement to getMaxMtu implementation which now is more
	succint by using max builtin function.

2013-05-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing mocking of _start function and add extraCmd variable to proxy
	Instead of adding monkeyPatch only for adding PYTHONPATH before running
	the command, setting self.extraCmd will append extra field to the
	execution.

2013-05-15  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	storage: Fix the case when VDSM host is not a gluster peer
	Currently when using glusterSD, VDSM has the need to know the
	transport type of gluster volume for which it uses gluster cli
	which assumes that VDSM host is part of gluster cluster (peer).
	This may not be true always and imposes a constraint that VDSM
	host must be a gluster peer.

	This patch fixes the above by doing 2 things...

	Adds support for --remote-host gluster cli option to volumeInfo
	API. This helps retrieve gluster volume info from a host that
	is not a gluster peer (Eg. VDSM host)

	Adds support to use the ability of gluster cli (--remote-host) to
	retrieve the gluster volume info even when VDSM host is not a
	gluster peer.

2013-05-14  Petr Sebek  <psebek@redhat.com>

	Added setupNetworks command to vdsClient
	To have ability to setup networks and bondings configuration from vdsClient.

2013-05-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Issuing a real pvs cmd when there are no PVs belonging to a VG.
	Assumed the vgName is an existent reacheable VG, must be PVs
	belonging to it.
	The pvs dict may be staled if this is a FC setup and/or
	connectStorageServer was not issued and therefore the storage view
	was not refreshed.

	This patch is an alternative to other fixes for the same bug.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=955993

2013-05-13  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove in-function import of netinfo
	Since the circular module dependency had been solved in
	http://gerrit.ovirt.org/13838, we could remove the in-function
	import.

2013-05-13  Giuseppe Vallarelli  <gvallare@redhat.com>

	refactoring: Changing constant name in NICENESS enum in storage.misc module.
	Within the storage.misc module there's an enum representing NICENESS
	for processes, NICENESS.LOW becomes NICENESS.HIGH which represents
	the lowest priority.

2013-05-09  Dan Kenigsberg  <danken@redhat.com>

	drop a few unused external scripts

2013-05-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	netconf/ifcfg: remove only backup files
	clearBackups() removes the entire directory /var/lib/vdsm/netconfback/.
	Because of that, TPS test (rpm -V vdsm) has failed.

	This patch, will remove all files/directoies inside /var/lib/vdsm/netconfback/
	and keep this directory.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=958009

2013-05-09  Dan Kenigsberg  <danken@redhat.com>

	jsonRpcTests.ReactorTests.test is broken
	And I'm tired of its in-gerrit errors
	http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1355/console

2013-05-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving panic function to utils and set panic mock for tests
	The patch moves panic function to vdsm utils for general use.
	During tests panic call will raise assertionError.

	Check supervdsm execution return code

2013-05-08  Yeela Kaplan  <ykaplan@redhat.com>

	clientIF: rescan devices on failed hotplugDisk
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=923773

2013-05-07  Federico Simoncelli  <fsimonce@redhat.com>

	domain: unify the createVolume method

2013-05-06  Assaf Muller  <amuller@redhat.com>

	vdsm now prints when a SIGTERM or SIGUSR1 is handled.

2013-05-06  Federico Simoncelli  <fsimonce@redhat.com>

	libvirtvm: avoid concurrent VM changes during saveState
	When multiple changes of the VM configuration are applied at the
	same time there's an high chance of saveState failing during a
	deepcopy for a RuntimeError exception (e.g. dictionary changed size
	during iteration). To avoid this problem the configuration changes
	and the saveState requests are now serialized.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=948940

2013-05-06  Timothy Asir  <tjeyasin@redhat.com>

	gluster: Added gluster hooks support
	Gluster hooks enable users to run scripts on pre or post level of
	gluster command execution. Pre scripts are executed before gluster
	command execution and post scripts are executed after gluster
	command execution.

	Below new verbs are added to perform to list, enable and disable hooks.

	New verbs:
	* glusterHookEnable
	* glusterHookDisable
	* glusterHooksList
	    Output structure:
	        [{'name': HOOK-NAME,
	          'status': STATUS,
	          'type': MIME_TYPE,
	          'command': GLUSTERCOMMAND,
	          'level': HOOK-LEVEL,
	          'md5sum': MD5SUM}]

2013-05-06  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Don't log irrelevant errors with level ERROR
	libvirtconnection.get() wrapMethod logs unhandled libvirtErrors
	as ERROR. However it's irrelevant at that point, therefore it
	should log it only as DEBUG message.

	Bug-Url: https://bugzilla.redhat.com/955593

2013-05-06  Assaf Muller  <amuller@redhat.com>

	vdsm now reports pid when starting up.
	When vdsm starts it now outputs to the vdsm log:
	"MainThread::INFO::2013-05-05 11:57:38,609::vdsm::89::vds::(run)
	(PID: 14576) I am the actual vdsm..."

	Bug-Url: https://bugzilla.redhat.com/952089

2013-05-05  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-reg: move OK message to caller.
	Due bz#890572 engine.py now calls setVdsConf() to write into vdsm_reg.conf.
	However, setVdsConf() prints an 'OK' message used in the old bootstrap and
	it's showing in oVirt TUI. This patch will move this OK message to the
	caller.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=925967

2013-05-04  Timothy Asir  <tjeyasin@redhat.com>

	gluster: move exportToSupervdsm at module level as makePublic
	The scope of exportToSuperVdsm decorator is limited to cli.py.
	It's moved to module level which enables the usage widely.
	And the function name exportToSupervdsm changed into makePublic.

2013-05-03  Mark Wu  <wudxw@linux.vnet.ibm.com>

	trivial: Improve the ways to get bonding devices and their slaves
	Compared with using glob, it could make the code simple and clean.
	And it could be a little faster in the case of finding bonding device.

2013-05-03  Aravinda VK  <avishwan@redhat.com>

	vdsmapi: vdsmapi support for gluster vdsm verbs
	Reads vdsmapi-gluster-schema.json from gluster directory if
	vdsm-gluster is installed.

2013-05-03  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec.in: update raw_version_revision
	The raw_version_revision from dsaversion.py should be updated with the
	version/release of RPM removing the git stuff.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893193

2013-05-02  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsmd.init.in: simplify system services management by using vdsm-tool
	In vdsm-tool there is a module implemented the service management
	utilities that covers systemd, upstart and sysv.

	vdsm-tool: add service management utilities

	vdsm-tool: unify ad-hoc execCmd implementations
	There are various ad-hoc execCmd implementations in the modules of
	vdsm-tool. Before the parent of this patch, execCmd is in storage.misc,
	we can not import storage.misc.execCmd without modifying PYTHONPATH. The
	parent of this patch moved execCmd to vdsm.utils, so this patch makes
	use of the 'official' execCmd implementation in vdsm.utils for all the
	modules of vdsm-tool.

	storage.misc: Move execCmd and its dependencies to vdsm.utils
	The original vdsm.utils.execCmd actually imports and invokes
	storage.misc.execCmd, which means if a process does not have
	/usr/share/vdsm in its PYTHONPATH and want to use vdsm.utils.execCmd, it
	will fail. Furthermore, lib/vdsm/utils.py should not use anything that
	is not present in the python standard library or in a dependency of the
	vdsm-python package.

	execCmd is very useful for modules in vdsm-tool, currently these modules
	use ad-hoc execCmd implementation. This patch moves storage.misc.execCmd
	and its dependencies to vdsm.utils, so that other modules can import the
	'official' execCmd implementation without adding /usr/share/vdsm to
	PYTHONPATH.

2013-05-02  Giuseppe Vallarelli  <gvallare@redhat.com>

	Update device hooks: Added before and after update device hooks.
	Bug-Url:https://bugzilla.redhat.com/show_bug.cgi?id=893576

2013-05-01  Federico Simoncelli  <fsimonce@redhat.com>

	vm: update volume apparentsize after snapshot
	After a live snapshot succeeded we need to force the update of the
	volume apparentsize to avoid races in the extension requests.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=923964

2013-04-30  Federico Simoncelli  <fsimonce@redhat.com>

	stats: report the domain version
	Given that some features are available only since a specific domain
	version (e.g. live snapshots require at least V3) and the upgrade
	is asynchronous for the non-master domains (see upgradeStoragePool)
	VDSM should provide to the engine a way to determine if a domain
	(other than the master) has been upgraded or not.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=951057

2013-04-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding utils package to outOfProcess and remoteFileHandler
	As part of http://gerrit.ovirt.org/11423 we added utils package to
	outOfProcess modules. oop uses remoteFileHandler to run external
	processes, each external process expose modules and functions. To allow
	running function from utils package with outOfProcess, we need to
	register utils module to crabRPCServer that handles the requests.

	The utils.py module name is vdsm.utils (as its under vdsm package).
	To avoid register all vdsm module to the crabRPCServer we use custom
	name and it allows an access by oop.utils.func

	fix pep8 err

2013-04-30  Dan Kenigsberg  <danken@redhat.com>

	cleanup: inline STRG_*SCSI_* macros
	They are used only once; their name is less clear than their content.

2013-04-28  Assaf Muller  <amuller@redhat.com>

	Added four new hook points for device migrations
	Continued effort on device custom properties. Added four new
	hook points: before/after_device_migrate_source, and
	before/after_device_migrate_destination. The new hooks are called
	for every device that has custom properties.

	Patch Set 2:
	* Added destination hooks, but they aren't called yet
	* Modified installation files, man page to reflect new hook points.

	Patch Set 3:
	* We now call the before/after_device_migrate_destination hooks.
	* Since the device._deviceXML cache is not sent when migrating
	  a VM, I had to re-populate that cache at the destination host,
	  via a search by device alias.

	Patch Set 4:
	* Fixed wording in man page
	* Added more verbose error reporting in _updateDevicesCache
	* Updated copyright for libvirtvm.py file

	Patch Set 5:
	* We now crash horribly if an alias was not found for a device
	  when updating devices domxml cache after migrating
	* _updateDevicesCache has been changed from O(n^2) to O(n)

	Patch Set 6:
	* Removed orphaned function
	* Semantic changes

2013-04-27  Eduardo Warszawski  <ewarszaw@redhat.com>

	Mark getImageDomainsList() as deprecated.
	getImageDomainsList needs to be connected to the pool and ignores
	every non responding domain. Therefore the result can be wrong and
	misleading.
	This function should be replaced by getImagesList call.

2013-04-27  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	misc.py: fix logskip
	The intention of logskip is to change the caller information appeared in
	log messages. It goes back and skip the stack frames that we do want to
	ignore, then find the nearest caller frame that is not tagged as "should
	skip", and use its filename, line number and function name information
	as the caller information in the log message. It's useful to skip stack
	frame of some utility function and log caller of the utility function.

	The original logskip mechanism has two bugs. It overrides the standard
	logger's findCaller method in function enableLogSkip(), however
	enableLogSkip() itself will appear in the stack because the overriding
	function refers a local variable "skipFunc" in the enableLogSkip(), thus
	the Python interpreter has to keep the stack frame for a closure. We can
	not avoid the closure so the soluion is adding function enableLogSkip()
	itself to the "should skip" list.

	This patch adds function enableLogSkip() itself to the "should skip"
	list by prepending the "logskip" decorator to it.

	Another bug is when deciding if we should skip the current frame, the
	first condition branch in function _shouldLogSkip() does not properly
	handle the following case. When the "logSkipName" is assigned and the
	current frame's function body is not registered as skip,
	_shouldLogSkip() thinks we should not skip. Howerver it's possible that
	the whole source file is registered in this case, so we should skip this
	frame as well. This patch fixes this problem.

	remoteFileHandler: update the stale comments of import statements
	When new child process of remoteFileHandler is started in unit test,
	there is no vdsm package installed, so we can not import modules under
	vdsm. There is an "if __name__ != 'main'" to conditionally not import
	modules from vdsm package in the child process.

	After commit d8778ad, which is reviewed at http://gerrit.ovirt.org/9217 ,
	'../' is added to PYTHONPATH of the child process in unit test. The
	working dir of the child is ./tests, so "from vdsm import X" will get
	the module at ./tests/../vdsm/X.py . It can safely import modules under
	the vdsm package now. There is no need to protect the import statements.
	Then old comment explaining this becomes stale.

	This patch drops the old comment, while keeps the import statements in
	the "if", because the imported modules are not used in child process.

2013-04-27  Mark Wu  <wudxw@linux.vnet.ibm.com>

	NetReload: Move removeBondings and editBondings implementation to ifcfg.py

2013-04-27  Daniel Erez  <derez@redhat.com>

	readlines - remove redundant pathExists check
	fileSD -> readlines:
	* The verification of path existence is redundant.
	* Try to read the metadata file and handle an exception:
	- If no such file: return an empty list.
	- Else, raise the exception.

	Bug-Url: https://bugzilla.redhat.com/882667

2013-04-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.init: replace libvirt logs filter
	Currently VDSM adds to libvirtd.conf a filter to include debug
	messages from libvirt daemon. However, the log size is increasing quickly
	with useless information about libvirt objects when the system is
	running out of problem.

	This patch will improve the logs for libvirt sources and remove
	OBJECT_* messages to reduce the size of libvirtd.log.

	Thanks to Pavel Zhukov for suggestion.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=920614

2013-04-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	Retry MD reads when validating pool-domain membership.
	Assumed that engine has a reason to test a particular SD, a
	a failure may be consequence of stale metadata.
	Retrying once to read the metadata again in order to overcome
	missing storagePoolrefresh'es.

	Remove redundant domStatuses parameter from validateAttachedDomain()
	The only possible status of a SD belonging to a pool are active or
	attached.
	Then the domain status is irrelevant when checking membership to
	the pool.

2013-04-25  Yaniv Bronhaim  <ybronhei@redhat.com>

	Modify max_outgoing_migrations default value to 3
	With default 5 and migration_max_bandwidth 32MiBps, over 1Gbps link the
	host's link become saturated.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=956683

2013-04-23  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding comment before getting libvirt connection
	If libvirt-sock does not exist, and vdsm is restarted - vdsm tried 10
	seconds to communicate with libvirt. In the log we see a gap for 10
	seconds after the "I am .." print and before the libvirt error exception.
	This delay, without knowing the specific location of vdsm process, can hide
	the actual reason for the delay. If the service stopped before the
	exception we'll see only the "I am.. " print without knowing where vdsm
	got stuck.

2013-04-23  Greg Padgett  <gpadgett@redhat.com>

	vdsmd.init: disable libvirt connection keepalives
	Libvirt now has keepalives enabledby default (see bug 832081), but
	they should be disabled until vdsm can make use of them (bug 949192).

	The main problem remaining is that certain libvirt versions (notably
	0.10.2-18.el6.x86_64) don't behave well when using keepalives: the
	connection can be closed if the system is under load, causing spurious
	vdsm problems that wouldn't be present if keepalives weren't in use.

	The libvirt bug has been subsequently fixed, but until a newer libvirt
	can be required, we shouldn't rely on the corrected behavior.

	Bug-Url: https://bugzilla.redhat.com/834041

2013-04-23  Vinzenz Feenstra  <vfeenstr@redhat.com>

	guestIF: Additional object strings filtering
	Filtering the plain UTF-8 data is not enough. The filter has
	to be applied also on the object parsed from json to be really
	effective.

	Example why this is required:

	o = json.loads('{ "x": "\\u0000" }')

	Now the 'o' python object looks like this:
	{ "x": "\x00" }

	Therefore we need to filter even the parsed object

2013-04-23  Laszlo Hornyak  <lhornyak@redhat.com>

	fix access to watchdog event actions
	The data structure 'actionEnum' is a a list, but it was accessed as
	function.

2013-04-23  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Revert "Use 'ip link' to get different kinds of interfaces"
	This reverts commit 8febe0e40650983d809abaa10be983bc1953ef1e.

	The netlink support for bridge is only available on kernel 3.0+.
	Please see the following commit for details.
	http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bb900b27a2f49b37bc38c08e656ea13048fee13b

	Add netlink support for bond is also added after kernel 2.6.32.
	So this solution doesn't work on RHEL6 system. We have to revert
	it.

2013-04-23  Eduardo Warszawski  <ewarszaw@redhat.com>

	Prefetch domains when connecting a storage server.
	When a storage server is connected is searched for domains.
	A uuid:findDomain method dictionary is saved for accelerate
	further produces.

	Related to BZ#891074

2013-04-22  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix getPools comment.

2013-04-22  Michal Skrivanek  <michal.skrivanek@redhat.com>

	spec: bump libvirt version for el6
	resolves libvirt stability issues (e.g. BZ #922063)

2013-04-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	engine.py.in: adding note about setting password
	Users should be warn that if they set password to be able to add
	oVirt Node from oVirt Engine it will enable SSH daemon.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=746582

2013-04-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	Initializing libvirt connectivity in external thread to clientIF
	Getting libvirt connection as part of startup can take long under high
	load. Until clientIF is ready to serve API requests, the host state is
	non-responsive. To avoid that, we make the connection in external
	thread, and until all recover process is ready the host reports the its
	on initialization state.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=949192

2013-04-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix StorageDomainDoesNotExist raise messages.

2013-04-18  Vinzenz Feenstra  <vfeenstr@redhat.com>

	agent: XML Character filtering improvement
	The filtering of invalid characters for XML documents must not be
	performed on unicode strings but on the encoded utf-8 string.
	If we do not do this we'll be missing out on filtering everything
	what would destroy the XML documents.
	If there has been found an invalid character in the UTF-8 string
	it _may_ cause the message to be discarded due to UTF-8 decoding
	errors. However we don't want invalid strings to come through any
	way.

	Updated the unit tests for reflecting the changes.

2013-04-17  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Fix check for connection issues with libvirt
	There has been a made a mistake by mixing domain codes
	with error codes of libvirt.
	Additionally libvirt is reporting VIR_ERR_INTERNAL_ERROR
	if libvirtd gets restarted or stopped somehow (e.g. after a crash)
	This fix takes care to cleanup the mixup and adds the missing
	error code.

	Bug-Url: https://bugzilla.redhat.com/852956

	vdsm: Try to reconnect on vmchannel after errors
	Currently the vm channel listener is not handling any errors. If an error
	occurred we would not try to reconnect and the connection to the guest is lost
	for the lifetime of the guest or until VDSM gets restarted.

	To handle this situation this patch introduces a mechanism to reconnect to the
	channel. Once an error occurred the setup callback is called, which gives the
	handled client the chance to recreate the socket and prepare it for a connect.
	After that callback was called, the errornous connection will be moved into the
	unconnected items dict where it will be handled by the event loop.

	If there have been 5 or more unsuccessful attempts made the reconnect rate will
	be slowed down to the same time as specified for the 'read timeout'.
	The items which are slowed down are moved into the 'reconnect_cooldown' dict.

	Bug-Url: https://bugzilla.redhat.com/871616

	vdsm: Delay desktop lock until we are sure it was a disconnect
	This is a hack to mitigate the issue of spice-gtk not respecting the
	configured secure channels [1]. Spice-gtk is always connecting first to
	a non-secure channel and the server tells the client then to connect
	to a secure channel. However as a result of this we're getting events
	of false positive disconnects and we need to ensure that we're really
	having a disconnected client
	This timer is supposed to delay the call to lock the desktop of the
	guest. And only lock it, if it there was no new connect.
	This is detected by the clientIp being set or not.

	[1]: https://bugzilla.redhat.com/show_bug.cgi?id=879352

	Bug-Url: https://bugzilla.redhat.com/905930

2013-04-17  Eduardo Warszawski  <ewarszaw@redhat.com>

	Add forceLink() which replaces a link if it already exists.
	Reduce the number of fileUtils.safeUnlink() callers.
	safeUnlink() will be removed, using rmFiles() instead.

2013-04-17  Federico Simoncelli  <fsimonce@redhat.com>

	image: update the volume permissions when needed
	Volumes leaves created in 2.2 did not have the group writeable bit
	set. In order to be able to start VMs from old NFS volumes we need
	to check (and eventually fix) the group permissions during the volume
	preparation.

	The code to address this issue was already present but commit 5a0b2c9
	reintroduced the problem substituting the prepareVolume calls with
	prepareImage.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=911417

2013-04-17  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove fileUtils.cleanupfiles().
	Racy, redundant, named out of convention, ...

	Remove fileUtils.safeUnlink().
	safeUnlink() usage replaced by utils.rmFile() calls.

2013-04-17  Petr Sebek  <psebek@redhat.com>

	Bond destroying
	If there is deleted network with bond other than bond[0-4] and no
	other network is using that bond, the bond is destroyed. bond[0-4]
	must be kept for backward compatibility, but we don't want to accumulate
	any other bond.

	Because we need same set of bondings in load_needed_modules.py.in, set of
	bondings was added to netinfo and imported from there. The path to
	bonding masters now also comes from netinfo.BONDING_MASTERS.

	Bug-Url: https://bugzilla.redhat.com/928442

2013-04-17  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Use 'ip link' to get different kinds of interfaces
	It's a little faster than listing the dir '/sys/class/net'

2013-04-16  Dan Kenigsberg  <danken@redhat.com>

	vdsmd: do not swallow libvirt error
	Recently I've seen multiple cases of vdsm not starting up with a vague
	error "Failed to define network filters on libvirt", when the underlying
	issue was that libvirt has crashed.

	It's better to have a line or two of log noise, in order to see that
	libvirt could not have been reached.

2013-04-15  Dan Kenigsberg  <danken@redhat.com>

	sampling: a quick fix to make vdsm run again
	commit c506391442bc was merged too quickly, leaving a process that fails
	to start due to
	    AttributeError: 'HostStatsThread' object has no a ttribute 'nics'

2013-04-14  Antoni S. Puimedon  <asegurap@redhat.com>

	NetReload: Moved addNetwork logic to the configurator
	This change starts moving the logic of configNetwork API endpoints
	towards the configurators.

	configureBridge, configureVlan, configureBond and configureNic
	after this patch have to take care of the underlying devices
	explicitly in the configurator modules. However, the underlying
	device handling will be abstracted to the network models in a
	future patch. Thus, the code of configureBond for any configurator
	such as Ifcfg is gonna be something like:

	self.configWriter.addBonding(params)
	for slave in bond.slaves:
	    slave.configure(params)

2013-04-14  Vered Volansky  <vvolansk@redhat.com>

	Catch appropriate KeyError instead of any exception
	resourceManager.registerNamespace() raises a KeyError exception.
	Calling methods were catching any exception, treating all as
	KeyError, which means non-KeyError exceptions were swallowed. Now only
	KeyErrors are caught and logged as info (instead of warn), and other
	potential exceptions are not caught at all, i.e., not swallowed
	anymore.

2013-04-14  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: increase policycoreutils version for RHEL
	Due bz#893065 if selinux is disable vdsm package can not
	be installed on RHEL systems.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=903309

2013-04-12  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Separate sampling code from vdsm.utils
	vdsm.utils should only include helper functions which could be shared
	different modules. Sampling is a separate function, so it should be
	moved out of utils. It could resolve the problem of circular import.

2013-04-11  Assaf Muller  <amuller@redhat.com>

	Device custom properties: Cache device XML after hotplug
	We now cache new device XML after diskHotplug and nicHotplug,
	just like we cache device XML when they are created during
	vmCreate.

2013-04-11  Federico Simoncelli  <fsimonce@redhat.com>

	spec: enable gluster upstream and on fedora 19
	The gluster package should be always enabled upstream or since fedora 19
	in koji builds.

	spec: use the fedora systemd macros
	Add the support for the fedora systemd macros introduced in fedora 18.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=850412

	svdsm: fix fuser import in supervdsmServer

2013-04-11  Vered Volansky  <vvolansk@redhat.com>

	Remove storage messages from syslog
	Storage messages are irrelevant to the syslog and still appear in the
	vdsm log.
	vdsm/storage/fileUtils.py is now logging to Storage.fileUtils.

2013-04-10  Peter V. Saveliev  <peet@redhat.com>

	vdsm: change default migration bandwidth in conf
	Libvirt changed the default behaviour in migration bandwith
	definition. Prior to versions 0.10.x it used "0" to define
	default 32MBps limit, now it uses "0" to define unlimited
	speed.

	This patch preserves the former way, when the default was
	32MBps. It needed in enterprise environments, where mass
	migration with unlimited bandwith can have a serious impact
	on the network infrastructure.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=925981

2013-04-10  Saggi Mizrahi  <smizrahi@redhat.com>

	Don't user sudo in fuser

2013-04-10  Yeela Kaplan  <ykaplan@redhat.com>

	Remove redundant parameter that breaks resourceManager test

2013-04-10  Antoni S. Puimedon  <asegurap@redhat.com>

	NetReload: ConfigWriter, ifup/down to configurator
	NetworkReloaded mandates that the configuration done by
	configNetworks shall be done using configurators that do the
	step of modifying the state of the networking stack.

	This patch moves ConfigWriter ifup and ifdown to the
	ifcfg configurator module (in netconfg) while keeping everything
	working. Next in the series there shall be patches that wrap
	the methods that were moved into actions done to the Ifcfg
	Configurator object.

2013-04-10  Federico Simoncelli  <fsimonce@redhat.com>

	vm: rename _updateDrive to updateDriveParameters
	As preparation for change I472c2931 the method _updateDrive is renamed
	to updateDriveParameters to avoid confusion with updateDriveVolume.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=923964

2013-04-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	Checking syslog availability before starting vdsm
	If logger is not able to open /dev/log, it throws exception and vdsm
	does not start. This path verifies that this file exist and fail vdsm
	start if not.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=928861

2013-04-09  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Ignore after_vm_cont hook if _dom was not yet created
	There's a race condition happening which results in an exception because the
	domain has not yet being assigned/created.

	This is a workaround to fix the exception from happening, however this is not
	a long term solution.

2013-04-09  Peter V. Saveliev  <peet@redhat.com>

	vdsm: fix Vm cleanup routine
	The issue was that on Vm disk hot unplug the general clean up routine
	was called, that wiped out also qemu and ovirt guest agent's sockets.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=927143

2013-04-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.init.in: removing /var/log/vdsm/libvirt.log
	We added it quite long ago to track libvirt lost event issues.
	These days we are much stable and libvirtd.log already contains
	libvirt informations.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=928217

	vdsm.spec.in: with_gluster
	Option to manage Gluster sub-package.

2013-04-08  Saggi Mizrahi  <smizrahi@redhat.com>

	testrunner: Add NOSE_COLOR env var
	Allows forcing output of color to non terminal.

	Useful for case where the errors are longer then the scrollback:

	    NOSE_COLOR=1 ./run_tests_local.sh jsonRpcTests | less -R

2013-04-07  Eduardo Warszawski  <ewarszaw@redhat.com>

	shareVolumeRollback() should raise when recovery failed.
	Engine does not care whether an exception is thrown during
	rollback, as such exception is caught by task.Task._run() when
	it is calls the rollback function.
	Removed try blocks in order to raise exceptions caused by failed
	volume link removal in other than an inexistent link.

	Make getAllVolumes() not fail on broken images.
	getAllVolumesImages differentiates between legal and remnants.
	Added getAllRemnants for garbage detection.

	Related to: BZ#905938, BZ#910013, BZ#875708

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=917363

	Marking del/zero volumes in blockSD class.
	Previous delete was not atomic since lvremove of multiple LVs can
	partially fail (e.g. since volume is open) leaving some volumes
	intact and others deleted.
	Marking before delete will enable garbage collection in such cases.
	The old rename convention is not atomic since the rename should be
	done sequentially.

	Related to: BZ#905038, BZ#910013, BZ#875708

2013-04-07  Federico Simoncelli  <fsimonce@redhat.com>

	sp: refreshDomainLinks before convertDomain
	Domain conversion requires the links to be present.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=948346

2013-04-07  Muller  <amuller@redhat.com>

	Device custom properties: Keep non-custom devices in domxml
	Bug fix for device custom properties feature: Previously only
	devices with custom properties were added to the VM's domxml
	because of stupidity. Now all devices are added and device
	creation hooks are called only for devices with custom
	properties.

	Patch Sets 2-5:
	Styling, naming.

2013-04-06  Yeela Kaplan  <ykaplan@redhat.com>

	sp: invalidate lvm cache if attachSD fails
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=883390

2013-04-06  Antoni S. Puimedon  <asegurap@redhat.com>

	sriov: Make the hook safe for concurrency
	The current model uses a cache that is not locked and could
	be overwritten by a second VM creation effectively preventing
	the return of the chown to root:root.

	This patch solves that by creating with exclusivity a file for
	each virtual function that is attached (thus avoiding locking)
	but having concurrency safety due to the OS guarantee that the
	not more than a single processes can perform an open when the
	flags O_CREAT | O_EXCL are set.

2013-04-05  Antoni S. Puimedon  <asegurap@redhat.com>

	Make sr-iov hook use interface instead of hostdev
	According to libvirt documentation, for the sr-iov virtual function
	"nics" to have permanent and unique MAC addresses, the passthrough
	should be done using <interface type='hostdev'> instead of
	<hostdev>.

	This change modifies the hook to take advantage of this libvirt
	definition for stable sr-iovs.

	The chown step is necessary to attach the virtual function to the VM
	Otherwise, it is not possible to detach the virtual function from the
	OS and attach it to the VM due to dynamic_ownership=0 (which is
	necessary for network storage because dynamic ownership, ATM, always
	sets ownership to root:root on VM destroy/hotunplug).

2013-04-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding rsyslog requierment to spec
	Without rsyslog service, vdsm logger throws exception and does not
	start.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=928861

2013-04-04  Federico Simoncelli  <fsimonce@redhat.com>

	sp: remove duplicated code for repoPath

2013-04-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	Increasing the amount of open file descriptor for vdsm user
	As part of fixing fds leak we increase the amount of available open fds
	to allow stability in large scale of simultaneously operations.
	Currently lv operations can't run simultaneously and
	wait for pior operation to end. Simultaneously attach sd requests open
	fds and close them only after end, when operation waits on lv operation
	vdsm keeps the fds open for long time.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=920532

2013-04-04  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix crash on vm start with netdevs w/out some info
	Some devices, like sr-iov do not have information in the domxml to
	represent name and model.

	This patch fixes the issue by detecting when we are dealing with a
	passed through device and setting special values for name and model.

2013-04-04  Assaf Muller  <amuller@redhat.com>

	Per device custom properties for before/after vm destroy.
	Patch Set 2:
	Run before/after device destroy hooks only on devices that
	have custom properties. after_device_create,
	before_device_destroy and after_device_destroy hook calls
	now share code (Removed code duplication).

	Patch Set 3+:
	Code styling and prettifying.

2013-04-04  Muller  <amuller@redhat.com>

	Added support for before and after device create.
	before_device_create is called for each device,
	that has custom properties, right before
	before_vm_create. Each such hook is supplied the device's
	dom xml and any custom properties. after_device_create is
	called for each device that has custom properties
	right after after_vm_start.

	Patch Set 2:
	Changed it so only devices that have custom properties
	call such per-device hooks. Styled up code.

	Patch Set 3+
	Styling / fixing comments.

2013-04-04  Assaf Muller  <amuller@redhat.com>

	Custom properties per device.
	This is the first commit in a series of patches that
	will implement custom properties per device.
	The first commit deals with hot plugging and unplugging
	devices and enabling custom properties for those hook
	points.

	Patch Set 1:
	1) All methods related to nic and disk hot plug and unplug
	in hooks.py and libvirtvm.py now pass the params dictionary
	onwards.

	2) Added unit test 'deviceCustomProperties' under hooksTests.py,
	that verifies that a custom property sent to a hook is indeed
	available in that hook.

	Patch Set 2:
	Updated the man page to reflect the fact that custom properties
	are now exposed as environment variables to device hooks

	Patch Set 3:
	Broke down long line in man page.

2013-04-03  Alon Bar-Lev  <alonbl@redhat.com>

	vdsm-reg: avoid issuing errors to console
	Using logging.error() during the ovirt-node dialog results in writing
	messages to console. This is undesired in dialog mode.

	Change the error to debug to avoid.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=947905

2013-04-03  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Fix iSCSI functional tests in Fedora 18
	There are two fix.

	1. modprobe iscsi_target_mod before running tests in Fedora 18

	In Fedora 18, iscsi_target_mod is not loaded by default. If the module
	is not loaded, the rtslib will fail to configure iSCSI targets for the
	storage backend and the test will fail. This patch load the module
	explicitly before running the tests.

	2. Wait for some time for VDSM to refreshing the device list

	If two iSCSI tests are arranged back to back, we should wait for VDSM to
	refresh the iSCSI session info. Otherwise the _getIqnDevs method fails.

2013-04-03  Yeela Kaplan  <ykaplan@redhat.com>

	Relink template hard links to meta and lease files
	In file based domains every image that is based on a
	template contains a hard link to the template volumes.

	Since an export domain may contain images without the
	backing template, when copying the template to the export
	domain we need to relink the derived images to it to be able
	to later on collapse the chain on import
	(without qemu-img crashing).
	In addition, in case we're importing a template to override a
	corrupted template we also need to relink.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=864073

2013-04-03  Mark Wu  <wudxw@linux.vnet.ibm.com>

	netinfo: there may be up to one network attached directly to an Iface
	Since one nic could be only used for one non-VLANed bridge or one non-VLANed
	bridgeless network, it needn't continue to check other networks after
	found one.

2013-04-03  Federico Simoncelli  <fsimonce@redhat.com>

	image: placeholder optimization on preallocation
	When the destination of a copy or move command is an NFS domain
	we should try to optimize the placeholders creation avoiding
	unnecessary prezeroing (only relevant case: RAW PREALLOCATED).
	In such case in the past we were using a TEMPORARY_VOLUME_SIZE
	to create a placeholder with a temporary size of 10Mb.
	This is interfering with live storage migration as the following
	volumes in the chain are inheriting the temporary size inside the
	qcow header (virtual disk size).
	With this patch we are instead forcing the creation of the volume
	as SPARSE as this won't have any side effect on the qcow header.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=910445

2013-04-02  Mark Wu  <wudxw@linux.vnet.ibm.com>

	trivial: Use os.uname to get kernel version insteaf of reading proc files

2013-04-02  Douglas Schilling Landgraf  <dougsland@redhat.com>

	dsaversion: Adding raw_version_revision
	Due commit 23a0c7199371a8f6b767b8f49c87da11b466d7da, currently
	we cannot change the way we show version and release or it
	will affect old oVirt Engine versions. To keep compatible,
	this patch will add raw_version_revision which can be used
	to show the version and revision during VDSM initialization.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893193

2013-03-31  Federico Simoncelli  <fsimonce@redhat.com>

	vdsm: move vdsm_cli to the new location in the repository
	Additionally the file lists (e.g. gitignore, Makefile.am, etc.) that
	contained the vdsm_cli path have been reordered alphabetically.

2013-03-29  Timothy Asir  <tjeyasin@redhat.com>

	gluster: fix nasty 'glusterfs not installed' vdsm.log warnings

2013-03-28  Amador Pahim  <apahim@redhat.com>

	Probe cpu count from new libvirt capabilities.
	vdsm is using libvirt to get cpu count information. Libvirt was not
	reporting the right information on AMD Bulldozer 62XX processors
	or unusual cpu architectures. To fix it , libvirt people introduced[1]
	the expanded capabilities topology output:

	<capabilities>
	  <host>
	    <topology>
	      <cells num='3'>
	        <cell id='0'>
	          <cpus num='4'> <!-- this is node with Hyperthreading -->
	            <cpu id='0' socket_id='0' core_id='0' siblings='0-1'/>
	            <cpu id='1' socket_id='0' core_id='0' siblings='0-1'/>
	            <cpu id='2' socket_id='0' core_id='1' siblings='2-3'/>
	            <cpu id='3' socket_id='0' core_id='1' siblings='2-3'/>
	          </cpus>
	        </cell>
	        <cell id='1'>
	          <cpus num='4'> <!-- this is node with modules (Bulldozer) -->
	            <cpu id='4' socket_id='0' core_id='2' siblings='4-5'/>
	            <cpu id='5' socket_id='0' core_id='3' siblings='4-5'/>
	            <cpu id='6' socket_id='0' core_id='4' siblings='6-7'/>
	            <cpu id='7' socket_id='0' core_id='5' siblings='6-7'/>
	          </cpus>
	         </cell>
	        <cell id='2'>
	          <cpus num='4'> <!-- this is a normal multi-core node -->
	            <cpu id='8' socket_id='1' core_id='0' siblings='8'/>
	            <cpu id='9' socket_id='1' core_id='1' siblings='9'/>
	            <cpu id='10' socket_id='1' core_id='2' siblings='10'/>
	            <cpu id='11' socket_id='1' core_id='3' siblings='11'/>
	          </cpus>
	         </cell>
	      </cells>
	    </topology>
	  </host>
	</capabilities>

	As libvirt use a fallback fake topology when probing unusual cpu
	architectures (for example, AMD 6200 series), new capabilities is
	the only reasonable source of information for any cpu architecture[2].

	vdsm must be changed to read cpu information from this new source.

	- cpuThreads: To gather the number of threads, take the total number of
	processors by counting the "<cpu ...>" lines in the NUMA topology
	section.

	- cpuCores : Count the siblings information. The number of distinct
	siblings info determines the number of cores. On a bulldozer machine
	all cores have separate core_ID but they share the siblings, as they're
	threads.

	- cpuSockets: Count the number of distinct "socket_id".

	[1] - http://libvirt.org/git/?p=libvirt.git;a=commit;h=79a003f9b0042ef4d2cf
	[2] - https://www.redhat.com/archives/libvir-list/2013-January/msg01140.html

2013-03-28  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	make user and group names in vdsm udev rules configurable
	In Ubuntu, the group name of qemu is not "qemu" but "kvm". This patch
	makes the user and group names in the rule file configurable.

	The patch is on going work of porting VDSM to Ubuntu
	http://www.ovirt.org/VDSM_on_Ubuntu

2013-03-28  Yeela Kaplan  <ykaplan@redhat.com>

	image: Set legality of volume to LEGAL after copy
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=864073

2013-03-27  Yeela Kaplan  <ykaplan@redhat.com>

	Remove hbtl attribute of non-scsi devices
	hbtl addressing has no meaning when it comes to cciss
	(and also non-scsi) devices since hbtl is scsi addressing
	and cciss is not a scsi device.
	multipath actually "makes up" hbtl values for cciss devices
	in its implementation, and gives the lun in the hbtl quartet
	the default value '0'.

2013-03-27  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix _getNetworkIp for non-bridged networks.
	Since this method servers for any kind of network, not just
	bridged ones, we shouldn't convert network to the backing
	device before calling getaddr.

	Bug-Url: https://bugzilla.redhat.com/921595

	Reduce calling to ethtool.
	Currently we do separate ethtool device object retrieval for getaddr,
	getnetmask and getipv6addrs. This patch unifies it into a single
	getIpInfo while leaving the api for the separatemethods available.

	Furthermore, it simplifies the get method by moving the device
	specific methods to their own methods.

	As a bonus, this has about 25% perf when creating a netinfo.NetInfo
	instance.

2013-03-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	Encode '=' when persisting the Task.
	"For a reason unknown (to me), task.py does not use pickle to
	persist its data to file. We cannot fix that without breaking
	backward-compatibility."
	Danken, circa 2012.

	Caveat Emptor:
	This patch expands the string space that can be encoded when
	a task is dumped and not tries to solve all task serialization
	issues.
	Since the old code ignored fields that can't be encoded,
	we continue to assume that doing this no harms the system.
	Based on this assumption we are disregarding the case of a task
	load in a host with this code when the dump contains real '_eq_'.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=915068

2013-03-25  Yeela Kaplan  <ykaplan@redhat.com>

	storageServer: fix connect to detect mount errors
	Raise the appropriate exceptions in case of mount error or
	permissions error to mount point.
	Also, exit connect in case of mount failure to avoid using
	uncreated mount.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=883877

2013-03-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: fence-agents-all
	fence-agents package in version 4 replaced the package name
	to fence-agents-all. This patch will adapt vdsm spec to this change.

2013-03-24  Antoni S. Puimedon  <asegurap@redhat.com>

	Optimize netinfo.networks.
	Currently netinfo.networks is doing three trips to libvirt:
	 - libvirtmod.virNetworkLookupByName
	 - libvirtmod.virConnectListNetworks
	 - libvirtmod.virNetworkGetXMLDesc

	With this change, we reduce it to:
	 - libvirtmod.virNetworkGetXMLDesc
	 - libvirtmod.virConnectListAllNetworks

	Testing
	========

	In [185]: %timeit foo()
	100 loops, best of 3: 4.45 ms per loop

	%timeit netinfo.networks()
	%100 loops, best of 3: 7.55 ms per loop

2013-03-24  Dan Kenigsberg  <danken@redhat.com>

	fix storage.fuser
	Bug-Url: https://bugzilla.redhat.com/922515

2013-03-24  Federico Simoncelli  <fsimonce@redhat.com>

	spec: bump libvirt version for el6
	The new libvirt version includes several bugfixes and enhancements to
	increase the reliability and the stability.

	Highlights:

	- BZ#915347 cannot resume a suspended vm
	- BZ#915354 cannot run a vm with several snapshots
	- BZ#922095 libvirtd memory leak

2013-03-21  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix IndexError when ifup does not give error msg
	There are some rare, but existing cases in which ifup does not print
	any error messages.

	configNetworks: network info gathering to netinfo
	These three methods are dealing with netinfo information and
	use netinfo instances (speciall ifaceUsers). This patch proposes
	moving them to netinfo.

	The other two methods could be left in configNetwork, but I would
	do it with a leading underscore.

	This is the first of a series of patches that build gradually
	towards network reloaded.

2013-03-21  Lee Yarwood  <lyarwood@redhat.com>

	vdsm: Add additional exception handling within vmChannels.py
	At present any exception thrown by _epoll.poll(1) is not caught. This patch adds
	additional exception handling to catch and log any exceptions thrown by the
	thread.

	Bug-Url: https://bugzilla.redhat.com/918541

2013-03-21  Antoni S. Puimedon  <asegurap@redhat.com>

	SetupNetworks: remove redundant logging.
	Most of setupNetworks was wrapped in a try catch the sole purpose
	of which was to log any error that could happen. This is not
	necessary anymore due to the fact that supervdsm.py (caller of
	setupNetworks) has its setupNetworks call under logDecorator
	which achieves the original purpose in a more generic way.

2013-03-21  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Add 3.3. to clusterLevels
	Add version 3.3. to clusterLevels, returned by VDSM as part
	of engine calling getCapabilities. This allows to test 3.3
	specific features from engine.

2013-03-20  Amador Pahim  <apahim@redhat.com>

	Migration warning due to high guest memory changes
	Migration process consists in copy guest RAM to new Host. After the
	copy, migration code loops back to the beginning and re-copies all pages
	modified after the copy. The hope is that the list of pages which must
	be copied shrinks with each pass over the memory range.
	Guests with large number of memory writes can delay migration process
	and even stuck it, if memory writes are faster than memory copy.
	This patch add a message to expose this situation, improving the
	supportability.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=919201

2013-03-20  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Fix installation location of betterPopen

2013-03-20  Igor Lvovsky  <ilvovsky@redhat.com>

	Add migration network support.
	Add additional parameter to vmMigrate to support dedicated migration network
	http://www.ovirt.org/Features/Migration_Network

2013-03-19  Bala.FA  <barumuga@redhat.com>

	gluster: use remove brick cli xml output
	glusterVolumeRemoveBrickStart, glusterVolumeRemoveBrickStop,
	glusterVolumeRemoveBrickCommit and glusterVolumeRemoveBrickForce use
	gluster cli xml output than stdout parsing.

	glusterVolumeRemoveBrickStart is not consumed by engine/RHS-C yet,
	its OK to differ in compatibility issue now.

2013-03-19  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Move all files for the VDSM module to a separate folder

2013-03-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing ownership option for logrotate.conf
	After separting supervdsm log to external file, and that supervdsm uses
	the same logrotate configuration, we need to omit this option to keep
	supervdsm.log rotated without changing the ownership of the file.

	Seperating supervdsm log to supervdsm.log file
	Supervdsm as root process can change the logfile ownership to root when
	creating the file. Manual deletion of vdsm.log can cause this scenario.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=912308

2013-03-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	task: Fix spelling.

2013-03-18  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Storage connection reference: move persistent dir to /var/lib/vdsm
	The current persistent dir for connection reference is
	/var/run/vdsm/connections, however /var/run is tmpfs so it's not truely
	persistent enough. According to the WIKI page [1], the connection
	reference is meant to survive reboots. This patch moves the persistent
	dir to /var/lib/vdsm/connections to achieve this.

	[1] http://www.ovirt.org/Features/ConnectionReferences#Description

2013-03-17  Dan Kenigsberg  <danken@redhat.com>

	Require newer initscript
	Avoid initscript/udev bug https://bugzilla.redhat.com/907365 that cause
	network device renaming to "renameXX".

2013-03-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm: create /etc/modules-load.d/vdsm.conf
	systemd-modules-load.service(8) reads from
	/etc/modules-load.d/<program>.conf the kernel modules
	required to be loaded during the boot.

	This patch creates /etc/modules-load.d/vdsm.conf
	which will hold all kernel modules required by VDSM.

2013-03-16  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	multipath.py: add Ubuntu scsi_id path when searching for scsi_id
	The patch is on going work of porting VDSM to Ubuntu
	http://www.ovirt.org/VDSM_on_Ubuntu

2013-03-16  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Makefile.am: EXTRA_DIST ordered by LC_ALL=C
	Setting order.

2013-03-15  Bala.FA  <barumuga@redhat.com>

	gluster: use replace brick cli xml output
	glusterVolumeReplaceBrickStart, glusterVolumeReplaceBrickAbort,
	glusterVolumeReplaceBrickPause and glusterVolumeReplaceBrickCommit use
	gluster cli xml output than stdout parsing.

	glusterVolumeReplaceBrickStart is not consumed by engine/RHS-C yet,
	its OK to differ in compatibility issue now.

	gluster: use rebalance cli xml output
	glusterVolumeRebalanceStart and glusterVolumeRebalanceStop use gluster
	cli xml output than stdout parsing.

	glusterVolumeRebalanceStart is not consumed by engine/RHS-C yet, its
	OK to differ in compatibility issue now.

2013-03-15  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	hook-macspoof: fix packaging
	The macspoof is an optional package. When we configure without hook
	option, is not installed to rpmbuild/BUILDROOT. However in the
	vdsm.spec.in, it is not an optional package, so rpmbuild fails to
	locate the related file in this case.

	This patch moves the hook-macspoof file section to the optional hooks
	part in vdsm.spec.in .

2013-03-14  jarod.w  <work.iec23801@gmail.com>

	Delete useless withRelaunch argument of onReboot in vm.py
	If we set the withRelaunch argument to True, it can't work normally
	because function relaunch() on clientIF class isn't defined.Here, we
	delete the useless argument directly to avoid potential error.

2013-03-14  Assaf Muller  <amuller@redhat.com>

	New hook that disables mac spoof filtering
	'macspoof' is a new hook that disables mac spoof filtering on a
	VM basis.

2013-03-14  Jan Lieskovsky  <jlieskov@redhat.com>

	vdsm_hooks: Add support for checkimages VDSM hook
	Introduce the checkimages VDSM hook - perform consistency
	check on a qcow2 format disk image using the QEMU disk
	image utility.

	v2: remove whitespace noise
	    add support for block images

	v3: remove more tab noise

	VDSM hook alternative to the validateImage SPM command.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=611183

2013-03-14  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix validateBonding tests without bonding
	There were remnants of the old validateBonding test
	that were made obsolete by:
	    Change-Id: I023a5bb8a52719559bb9d4716f25e0cba8b3530b
	That monkeypatching is not needed anymore. Now we just skip
	the test if bonding is not loaded, i.e., BONDING_MASTERS
	sysfs does not exist.

2013-03-14  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	HostStatsThread: change way of counting CPUs
	There is no /sys/class/cpuid in Ubuntu Server 12.10 64 bit.
	Use max(os.sysconf('SC_NPROCESSORS_ONLN'), 1) instead.

	The patch is on going work of porting VDSM to Ubuntu
	http://www.ovirt.org/VDSM_on_Ubuntu

2013-03-13  Vered Volansky  <vvolansk@redhat.com>

	tests: testMethodBadParameters decorated as broken
	testMethodBadParameters Sometime fails the build, and sometimes doesn't.
	It's now decorated as broken until it's fixed.

2013-03-13  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-upgrade: fix xml format
	Fixed illegal XML that affects upgrade from Engine.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=920671

2013-03-13  Keith Robertson  <kroberts@redhat.com>

	sos: Follow symbolic links with tree command
	The VDSM SoS plug-in uses the tree command to get
	a view into storage domains.  SDs can
	contain symbolic links; however, tree does not
	follow symbolic links by default.  This patch sets
	an option on tree to follow symlinks so that the
	entire SD may be assessed.

2013-03-13  Bala.FA  <barumuga@redhat.com>

	gluster: set glusterfs dependency version
	Now vdsm-gluster depends on glusterfs version 3.4.0 or higher.

2013-03-13  Timothy Asir  <tjeyasin@redhat.com>

	Caps: Include glusterfs packages
	Updated getVdsCaps verb to provide glusterfs package info along with
	other key package details.

2013-03-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix mailbox Exception type.
	Making mailbox raised exception more precise.
	May be the 1st of an improved mailbox logging patches.

2013-03-12  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix races in sd.createMasterDir()

2013-03-12  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	define qemu process user and group in configure.ac for Ubuntu
	Ubuntu qemu process started by libvirt is libvirt-qemu:kvm, and there
	is no group named qemu, only group kvm. This patch sets the correct
	value of the variable in configure.ac .

	The patch is on going work of porting VDSM to Ubuntu
	http://www.ovirt.org/VDSM_on_Ubuntu

2013-03-12  Bala.FA  <barumuga@redhat.com>

	bootstrap: remove glusterfs packages
	As glusterfs packages are dependencies for vdsm-gluster package,
	having these in bootstrap is redundant

2013-03-12  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix checking bonding options for missing bonds.
	Right up until now, we were checking the options for a bond A
	that would have to be potentially created by checking for the
	existance of /sys/class/net/A/bonding/<opt>. Obviously, if the
	bond had not been created at that point, the option validation
	would fail.

	This patch makes the option validation be done on whichever bond
	is present on the system and, if none are, it creates the bond
	to check the options.

	Bug-Url: https://bugzilla.redhat.com/918666

2013-03-11  Yeela Kaplan  <ykaplan@redhat.com>

	storageServer: fix spelling

2013-03-11  Dan Kenigsberg  <danken@redhat.com>

	Do not attempt to run hook with an unknown vnic
	If hotunplugNic() is called with a badly-specified vnic, we should not
	run the after_nic_hotunplug_fail() hook, as we cannot supply its
	required param: nicXml is unassigned at this stage.

	Bug-Url: https://bugzilla.redhat.com/919356

2013-03-10  Mark Huth  <mhuth@redhat.com>

	dumpStorageTable to handle images with multiple leaf volumes
	dumpStorageTable encounters a KeyError exception if an image has
	multiple volume chains (and thus multiple leaf volumes) which occurs
	when previewing a snapshot.

	This patch allows dumpStorageTable to work with images that have
	multiple chains / leaf volumes.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=890983

2013-03-09  Mark Wu  <wudxw@linux.vnet.ibm.com>

	configNetwork: Improve the validation of netmask

2013-03-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Makefile.am: ignore false positive pyflakes lvm.py
	Temporary workaround.

2013-03-08  Mark Wu  <wudxw@linux.vnet.ibm.com>

	configNetwork: Fix bootproto preservation for bridgeless network
	bootproto should be also preserved for bridgeless network as what
	the commit 948057 fixed for static ip address.

2013-03-08  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	spmstop: add "--" to /usr/bin/kill invocation parameters
	In Ubuntu kill, invocation like "kill -9 -xxx" is not parsed correctly.
	We should use "kill -9 -- -xxx" instead.

	The patch is on going work of porting VDSM to Ubuntu
	http://www.ovirt.org/VDSM_on_Ubuntu

2013-03-07  Douglas Schilling Landgraf  <dougsland@redhat.com>

	AUTHORS: adding dougsland
	Adding myself.

2013-03-07  MeiLiu  <liumbj@linux.vnet.ibm.com>

	Fix mom and ksmtuned conflict
	Mom integrated in vdsm performs ksm adjusting according to the policies.
	If ksmtuned has been started before vdsmd, ksmtuned will afect the action
	performed by the ksm controller in mom. Therefor, ksmtuned is added as a
	conflict of vdsm which starts mom.

2013-03-07  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Fix localfs functional tests in Fedora 18
	localfs storage backend is placed in /tmp, however /tmp is tmpfs in
	Fedora 18 and it does not support direct IO, so we can not use it for
	storing the backend data and the tests fail.

	This patch create localfs storage backend in /var/tmp.

2013-03-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Adding with_systemd macro
	This patch adds the macro with_systemd which can be used
	to validate if the system uses Systemd.

2013-03-06  Aravinda VK  <avishwan@redhat.com>

	gluster: Handling Attribute error in Python 2.6
	xml.etree.cElementTree in Python 2.6 doesn't have the attribute
	ParseError(Introduced in Python 2.7). VDSM gluster/cli.py tries
	to capture etree.ParseError when gluster cli returns incompatible
	xml output.

2013-03-06  Vered Volansky  <vvolansk@redhat.com>

	hooks: Add disk hot plug/unplug hooks
	Added four hook points named:
	1. before_disk_hotplug
	2. after_disk_hotplug
	3. before_disk_hotunplug
	4. after_disk_hotunplug

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=908656

2013-03-06  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	fix a PEP 8 issue in vdsm/configNetwork.py

2013-03-05  Douglas Schilling Landgraf  <dougsland@redhat.com>

	engine.py: return False on cert error screen
	If we cannot download the engine certificate we should
	only show the error screen and return.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=895912

	engine.py: replace sed to setVdsConf
	Use the standard way to write into vdsm-reg.conf.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=890572

2013-03-05  Antoni S. Puimedon  <asegurap@redhat.com>

	Don't crash on libvirt network re-definition.
	This patch is aimed to solve the libvirt syncing bug described in
	bugurl. In short, the vdsmd restart scenario is solved by the
	previous patch (30c63c5).

	This one solves the case when the interface backing a bridge/network
	has disappeared (and thus is not reported by netinfo to the engine)
	and then the engine sends a new setupnetwork that attempts to
	recreate the partially defined network. Up until now, libvirt would
	report an exception. Now we make a best-effort to remove the network
	before trying to add it again, by adding a control case in the
	setupNetworks logic where networks to be removed are usually removed.

	Bug-Url: https://bugzilla.redhat.com/861701

2013-03-05  Roy Golan  <rgolan@redhat.com>

	Catch libvirt timeout and return an error on setVmTicket
	Return an errCode instead of an exception libvirt timeout in setVmTicket
	verb and setting the 'message' to be the exception string representation
	so upper layers would have more info about what went wrong.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=878064

2013-03-04  Shu Ming  <shuming@linux.vnet.ibm.com>

	Fix the broken PYTHONPATH
	@builddir@/vdsm is a non-exsiting path

2013-03-04  Federico Simoncelli  <fsimonce@redhat.com>

	build: add load_needed_modules.py.in to EXTRA_DIST

2013-03-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Ignore postZero flag when deleting an image on a fileSD.
	Ignoring parameters is very bad but we will continue to do that
	because fixing the engine is very hard.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=911209

2013-03-03  Federico Simoncelli  <fsimonce@redhat.com>

	hsm: always check validateNotSPM when disconnecting from a pool
	At the moment of this writing vdsm doesn't have a valid flow to
	disconnect from a pool if the host is the SPM; the side effect
	of calling _disconnectPool (e.g. a failed refreshStoragePool) is
	that the SPM resource will remain locked.

	If we want to introduce a change to allow the disconnection from
	the pool even if the host is the SPM we should do it explicitly
	with a specific patch that stops the SPM.

2013-03-03  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Override getLocalPathBase in GlusterFSConnection
	Override getLocalPathBase in GlusterFSConnection as a better
	way to specify mount point for GlusterSD

2013-03-01  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Introduce getLocalPathBase for MountConnection
	Introduce getLocalPathBase in MountConnection so that
	class re-using it can override it to present their own
	path base.

2013-03-01  huntxu  <mhuntxu@gmail.com>

	configNetwork: improve assertBridgeClean

	network: reuse netinfo.ports()

2013-02-28  MeiLiu  <liumbj@linux.vnet.ibm.com>

	Fix sslTests import bug
	ImportError for SecureXMLRPCServer is triggered when the test runns in
	installed directory.
	It should be imported from vdsm folder in python library.

2013-02-28  Antoni S. Puimedon  <asegurap@redhat.com>

	Improve the readability of define.py
	Maintain pep8 compatibility but improve the readability by
	recovering some space (reducing indentation).

2013-02-28  Yeela Kaplan  <ykaplan@redhat.com>

	If attachSD fails - rescan for new vgs not visible from spm
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=883390

2013-02-27  Federico Simoncelli  <fsimonce@redhat.com>

	pool: ignore refreshStoragePool calls on the SPM
	The refreshStoragePool command is an HSM command and should not be
	issued (and executed) on the SPM. At the moment we just ignore it
	for legacy reasons but in the future vdsm could raise an exception.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=882958

2013-02-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding sudo rules to multipath and removing unused rules
	When vdsm tries to cp multipath.conf file as part of setupMultipath that
	tries to keep the last multipath.conf file into multipath.conf.1, we get an
	error that sudo command requires a password.

	This patch add rules to allow operations on absolute path of multipath.conf
	file.

	Removing old code that related to directories that vdsm doesn't use anymore.

	Bud-Id: https://bugzilla.redhat.com/show_bug.cgi?id=907389

2013-02-26  Dan Kenigsberg  <danken@redhat.com>

	caps: allow rpm name to be different from reported package name
	This patch makes it easier to ship a package which is implemented by a
	differently-named rpm. It mimics what we have for Debian, even though
	currently this patch keeps the exact mapping.

2013-02-26  Federico Simoncelli  <fsimonce@redhat.com>

	stats: compute the iso prefix asynchronously
	The iso prefix must be computed asynchronously because in any other
	synchronous operation (e.g.: connectStoragePool, getInfo) vdsm cannot
	risk to stop and wait for the iso domain to report its prefix (since
	it might be unreachable).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=880098

2013-02-26  Dan Kenigsberg  <danken@redhat.com>

	tool: _enable_bond_dev: reopen bonding_masters per bond
	Writing multiple +bondnames into /sys/class/net/bonding_masters is not
	enough to add new bonding devices. One has to reopen that file for each
	added bond.

2013-02-26  Federico Simoncelli  <fsimonce@redhat.com>

	pool: refactor getInfo and getRepoStats
	Both getInfo and getRepoStats (in StoragePool) grown some
	inconsistencies over time. It's time to do some cleanup in
	this area before proceeding with any additional change.

2013-02-25  huntxu  <mhuntxu@gmail.com>

	tc: set/unset promisc when it's really needed
	When setPortMirroring is called multiple times for the same network (in
	case that more than one vms on the same host would monitor the same
	logical network), we don't need to set the device's promisc flag to on
	more than once.

2013-02-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	Add to logrotate conf file that new created logs will be owned by vdsm
	Using create options that set each new log file to mode 644 owned by
	user vdsm and vdsm group

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=912308

2013-02-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	Uniform LocalDirectoryConnection.checkTarget() errors.
	Hard to believe: there are uglier things the the True or Exception
	pattern.

2013-02-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	removing the use of zombie reaper from supervdsm
	This may solve validateAccess errors, but can cause defuct subprocesses.
	This patch is signed as WIP until we'll find better solution, until then
	this patch helps to verify if the previous errors that was caused thanks
	to zombie reaper handling don't occur.

2013-02-19  Adam Litke  <agl@us.ibm.com>

	api: Convert process_schema.py to use vdsmapi.get_api()

	api: Convert schemaTests to use vdsmapi.get_api

	api: Move DynamicBridge to vdsmapi schema processing

2013-02-19  Eduardo Warszawski  <ewarszaw@redhat.com>

	Do not delete the template when zeroing a dependant image.
	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=910013

2013-02-19  Dan Kenigsberg  <danken@redhat.com>

	Drop remnant CMD_LOWPRIO
	Commit aba12f81be549 attempted to drop all CMD_LOWPRIO, but due to a sloppy
	rebase, one reference remains.

2013-02-19  Adam Litke  <agl@us.ibm.com>

	tests: Skip stress tests that behave badly when run in parallel
	A particular test: resourceManagerTests.testStressTest works by spawning lots of
	threads to test the resource manager.  Unfortunately, when run in parallel with
	other tests (as happens on Jenkins), it can cause spurious errors in comletely
	unrelated tests by causing the user to exceed its thread limit.  There is no
	real way around this problem other than to skip this test when tests can be
	running in parallel.

	To achieve this, introduce a new nose plugin (similar to SlowTestsPlugin) that
	can be activated by a command line parameter or environment variable.  When
	active, tests marked as @stresstest will be skipped.

	The environment variable NOSE_SKIP_STRESS_TESTS should be added to the Jenkins
	unit test job.

2013-02-19  Peter V. Saveliev  <peet@redhat.com>

	hook_faqemu: using libvirt instead of hacking it
	Passing -no-kvm / -enable-kvm directly to qemu is a rather bad idea,
	if you do not change domain type. These options should be set by
	libvirt upon the domain type: domain type='kvm' will engage kvm
	and domain type='qemu' will use faqemu correctly in all libvirt
	versions on any host type.

	Since vdsm-faqemu do not provide nothing but this option hack,
	it can be safely removed, libvirt will do all the work. Beside of
	that, there is no need for /dev/kvm creation hack, since domain
	type='qemu' does not check it on the startup.

2013-02-19  Adam Litke  <agl@us.ibm.com>

	api: Organize schema symbols by type
	Currently the vdsmapi module returns the parsed schema as a large list of
	symbols.  Consumers of this list have all resorted to reorganizing the symbols
	by type (commands, types, enums, maps, etc).  Rather than forcing each user to
	rewrite this code, just do it correctly at the source.  This reduces code
	duplication and makes at easier to add new symbol types (such as events and
	errors).

2013-02-19  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: Make jsonrpc an independent package
	The json-rpc core is needed by the client and by the server.

	I changed the package name to yajonrpc (yet another json-rpc) to avoid
	collisions with existing jsonrpc implementations.

	jsonrpc: Use the AsyncoreClient implementation in tests too
	No need to have two implementation for the same thing

	jsonrpc: Check for credit before popping a message from the queue

	jsonrpc: Use asyncore instead of custom solution
	Use the built in asynchronous loop infrastructure instead of a custom
	one. This is much less code to maintain.

	I purposefully changed dumped the tcpReactor name for the class and
	module because I will do some more work to add unix sockets in the
	future.

	If only someone would have told me this existed beforehand. I wouldn't
	have spent so much time on the original reactor. Anyway, no use crying
	over spilt milk.

	jsonrpc: Make reactor clients 1st class objects
	Also add support for batch requests, tests to come soon

	jsonrpc: Remove unecessary check

2013-02-18  Giuseppe Vallarelli  <giuseppevallarelli@gmail.com>

	doc: Solved sphinx-build import errors.
	Added _static folder to remove a sphinx-build warning,
	removed obsolete SPM.rst, updated doc Makefile it now
	exports the PYTHONPATH, before doc generation create_sl
	is invoked and adds a symbolic link to vdscli.py in the
	vdsm python package if it's missing. Reduced warnings
	with :noindex: directive.

	doc: Added make file target, treating warnings as errors.
	Added htmlstrict make file target, warnings are treated
	as errors making sphinx-build stop doc creation.

	doc: updated conf.py and different *.rst files with new references.
	Updated conf.py (sys.path, copyright's year), Removed empty
	storage/overview file. Updated references in the different
	*.rst files by using fully qualified package names.

	Doc generation now works except for clientIf and vm modules,
	but a little step is necessary: adding to the PYTHONPATH
	the vdsm python package.

	doc: Reorganized doc structure in root project folder
	Moved the sphinx doc at project root folder, got rid
	of source folder inside doc, updated Sphinx Makefile
	and .gitignore to not track doc/build folder.

2013-02-18  Adam Litke  <agl@us.ibm.com>

	api: Remove some unneeded functions from vdsmapi.py

	api: Separate api schema into its own package
	The vdsm schema definition is needed by the vdsm server but also by clients.
	Split the shema into its own package so it can be installed by clients without
	pulling in server-side dependencies.

2013-02-14  Muller  <amuller@redhat.com>

	Issue when running make rpm in Fedora 18 without root access.
	The ConfigWriterTests:testPersistantBackup fails, because it uses libvirt's
	createNetwork and removeNetwork functions, but libvirt requires root access.
	The current solution is to use monkey patch, and simply nullify the create
	and remove network functions. The test now passes, but this might
	not be the ideal solution to the problem.

2013-02-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	Adding VM based locks to ovf modify functions.
	Caveat Emptor:
	Avoids concurrent runs, but not serializes.
	Simultaneous updates or removes of ovf files (like removing many
	disks from the same VM) may result in inconsistent ovf's.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=878894

	Move hsm.validatePoolSD() -> pool.validatePoolSD().
	Since StorageDomainNotMemberOfPool and StorageDomainNotInPool
	are handled the same in the Engine is better to raise the
	proper Exception in spite that before
	StoragePool.validateAttachedDomain() raised the 2nd one only.

	Related to BZ#878894.

2013-02-13  Antoni S. Puimedon  <asegurap@redhat.com>

	Simplify removeVlan by removing duplicated code.

2013-02-13  Adam Litke  <agl@us.ibm.com>

	tests: Make getFreePort work in a multithreaded environment
	getFreePort does not currently work reliably if multiple copies are running
	concurrently.  Since each copy starts at the same port, the chance of choosing
	the same port number at the same time is great.  Switch to letting the OS find
	an available port.

	This should fix the intermittent failures of jsonRpcTests and apiTests.

2013-02-13  Antoni S. Puimedon  <asegurap@redhat.com>

	Make vdsClient prettyprint dictionaries.
	This helps a lot reading getVdsCaps.

	This change makes that something like this:

	networks = {'ovirtmgmt': {'iface': 'ovirtmgmt', 'addr': '10.34.60.86', 'cfg': {'IPV6INIT': 'yes', 'MTU': '1500', 'DELAY': '0', 'NM_CONTROLLED': 'no', 'BOOTPROTO': 'dhcp', 'DEVICE': 'ovirtmgmt', 'TYPE': 'Bridge', 'ONBOOT': 'yes'}, 'ipv6addrs': ['fe80::5054:ff:fe68:2557/64'], 'mtu': '1500', 'netmask': '255.255.252.0', 'stp': 'off', 'bridged': True, 'ipv6gateway': '::', 'gateway': '10.34.63.254', 'ports': ['eth0']}}

	Becomes this:

	networks = {'ovirtmgmt': {'addr': '10.34.60.86',
	                          'bridged': True,
	                          'cfg': {'BOOTPROTO': 'dhcp',
	                                  'DELAY': '0',
	                                  'DEVICE': 'ovirtmgmt',
	                                  'IPV6INIT': 'yes',
	                                  'MTU': '1500',
	                                  'NM_CONTROLLED': 'no',
	                                  'ONBOOT': 'yes',
	                                  'TYPE': 'Bridge'},
	                          'gateway': '10.34.63.254',
	                          'iface': 'ovirtmgmt',
	                          'ipv6addrs': ['fe80::5054:ff:fe68:2557/64'],
	                          'ipv6gateway': '::',
	                          'mtu': '1500',
	                          'netmask': '255.255.252.0',
	                          'ports': ['eth0'],
	                          'stp': 'off'}}

2013-02-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix bad  image tagging when postzeroing.
	The postzero code fails to remove the image tag from the volume
	and adds an extra tag without the right prefix.

2013-02-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	After fail to connect to supervdsm more than 3 time vdsm gets into panic
	Due to race between old supervdsm instance to the new instance after
	prepareForShutdown, sometimes the socket is removed after
	new supervdsm started to listen on it.
	_pokeParent thread unlink the socket when distinguish that vdsm is dead.
	This can take more time than the time that takes to vdsm to startup and
	start the new instance of supervdsm. The unlink removes the socket file
	and vdsm cannot communicate with supervdsm.
	When the communication fails, vdsm calls panic and restart itself, this
	will start supervdsm again as needed.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=910005

2013-02-12  Peter V. Saveliev  <peet@redhat.com>

	vdsm: migration status structure refactoring

2013-02-12  Gal Hammer  <ghammer@redhat.com>

	BZ#841555 A migration failure with an "AttributeError" exception.
	Libvirt sometimes send the SUSPENDED/SUSPENDED_PAUSED event
	after RESUMED/RESUMED_MIGRATED (when VM status is PAUSED
	when migration completes, see qemuMigrationFinish function).
	In this case self._dom is None because the function
	_waitForIncomingMigrationFinish didn't update it yet.

2013-02-12  Yeela Kaplan  <ykaplan@redhat.com>

	Change lvm filter use of regular expression to 'replace \x'
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=908776

2013-02-11  Peter V. Saveliev  <peet@redhat.com>

	vdsm: migration log messages spelling

2013-02-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	Removing vdsm configuration when removing vdsm service
	Before we removed that section only over rhel and we looked for the
	wrong string. This patch adds sed command for both dist with the current
	string that is written by vdsmd init script.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=902346

2013-02-10  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#840407 - Create a fake template when moving to backup SD.
	This code is repeated twice because the copy in deprecated
	moveMultipleImages() will be removed when this image will be
	removed in the next version.
	All the related fake template code should be removed.

2013-02-09  Federico Simoncelli  <fsimonce@redhat.com>

	misc: handle properly timeout=-1 in NoIntrPoll
	The parameter timeout=-1 (no timeout) of NoIntrPoll wasn't properly
	handled by the previous implementation; it was in fact returning an
	empty set of file descriptors if the process was interrupted by a
	signal. This patch ensures that the parameter is taken in account
	(do not return until there is an event) even when the process is
	interrupted.

2013-02-08  Saggi Mizrahi  <smizrahi@redhat.com>

	tests: (OCD) Add space at the end of the sample string
	When the strings are concatenated there needs to be a space or there is
	a punctuation sign without a space after it.

	jsonrpc: Change start_listening to createListener

2013-02-08  huntxu  <mhuntxu@gmail.com>

	netinfo: report IPv6 information

2013-02-08  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: Add support for multiple listeners
	Make is so that a reactor can have more then one listeners running

2013-02-07  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: Change cxtr to connector to make the code a bit more understandable

	jsonrpc: Federate context and request-response objects
	This is the ground work needed to allow batch requests and bidirectional
	jsonrpc.

	jsonrpc: Add multi-threading option to JsonRpcServer

	jsonrpc: Fix race in ProtonReactor and add better delivery semantics

2013-02-07  Peter V. Saveliev  <peet@redhat.com>

	migrateStatus() progress report
	The percentage is based on libvirt dataTotal and dataRemaining
	fields of the virDomainJobInfo struct

	vdsm: fix tunneled migration regression

2013-02-07  Eduardo Warszawski  <ewarszaw@redhat.com>

	Rename parent volume in blockSD.getAllVolumes.
	Renaming variable names for better readability.

2013-02-06  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix broken NFS.
	self.sdUUID does not exist when self.validateFileSystemFeatures
	is called.

	Broken by Icf14d1c4737.

2013-02-06  Gal Hammer  <ghammer@redhat.com>

	BZ#829110 Remove a "Domain not found" error from stats thread.
	Removed redundant code which changed VM status if error occured on
	the stats thead.

2013-02-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm: Move sysctl
	sysctl should be called at boot time.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=907086

2013-02-06  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#836161 - Remove preDeleteRename().

2013-02-05  huntxu  <mhuntxu@gmail.com>

	netinfo: implement functions gathering IPv6 information

2013-02-05  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Requires policycoreutils-2.1.13-55 to avoid another break on selinux disabled.
	When selinux is disabled on f18, it fails to import module sepolicy
	with an exception. It causes the the vdsm-tool unavailable, and therefore
	the bonding module can't be loaded when vdsm starts up. For details,
	please see https://bugzilla.redhat.com/show_bug.cgi?id=889698

2013-02-05  Dan Kenigsberg  <danken@redhat.com>

	split restore-net-conf away of vdsmd.init service
	There is no need to revert network configuration when vdsmd is
	restarted, only when the host is rebooted after being fenced.

	This becomes painfully visisble if vdsm is restarted due to spm
	failover, and while at it - rolls back an unrelated network
	configuration.

2013-02-05  Adam Litke  <agl@us.ibm.com>

	schema: Update VmDefinition to match current behavior
	The schema for VmDefinition was incorrect in that it had some fields marked as
	mandatory even though they may be omitted.  Also, exitCode and exitMessage were
	not included in the original definition.

	schema: Eliminate 'class' from StorageDomainInfo
	'class' is usually a reserved word and makes a bad name for a type field.
	Change it to domainClass and add the required type fixup to the Bridge.

2013-02-04  Saggi Mizrahi  <smizrahi@redhat.com>

	Storage: Check that underlying file system supports direct IO
	- Check when creating a domain
	- Check when creating a domain object

	This is done so that we don't allow posixfs domains on top of targets
	that don't support direct IO.

	Direct IO is needed in order to read the metadata reliably in a
	clustered environment. It is also a required feature for Sanlock.

2013-02-04  Dan Kenigsberg  <danken@redhat.com>

	configNet: allow delete/update of devices with no ifcfg
	In Fedora 18, ifcfg files are missing by default. This patch assumes
	that there are no custom MTU setting for a device with no ifcfg file.

	This version of the patch owes a lot to Mark Wu's
	http://gerrit.ovirt.org/11357 and to Toni who convinced me that it is
	better to read the MTU directly from kernel.

	Bug-Url: https://bugzilla.redhat.com/906383

2013-02-03  Eduardo Warszawski  <ewarszaw@redhat.com>

	Do not fail when getVSize is called on an inactive LV.
	Bug-uri: https://bugzilla.redhat.com/show_bug.cgi?id=878955

2013-02-01  Douglas Schilling Landgraf  <dougsland@redhat.com>

	load_needed_modules: adding bridge module
	if bridge module is not loaded
	net.bridge.bridge-nf-call-* is ignored by sysctl.

2013-01-31  Adam Litke  <agl@us.ibm.com>

	jsonrpc: Rearrange test classes for reusability

2013-01-31  Yeela Kaplan  <ykaplan@redhat.com>

	Handle spaces in device names using lvm filter
	any character that is not on udev whitelist (0-9, A-Z, a-z, #*-.:= _)
	will get translated into an encoded form \xNN where NN is the
	hex value of the character.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=876575

2013-01-30  Saggi Mizrahi  <smizrahi@redhat.com>

	tests: Fix race in misc:DdWatchCopy.testStop
	Use a named pipe instead of an actual source file so we know no data
	will ever be read.

2013-01-30  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Require openssl
	deployUtil uses openssl command, we should Require it.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=905728

2013-01-30  Dan Kenigsberg  <danken@redhat.com>

	Fedora 18: require a newer udev
	Due to https://bugzilla.redhat.com/903716 `udev: device node permissions
	not applied with "change" event' we could not use block storage in
	Fedora. Let us explicitly require a newerer systemd that fixes this
	issue, to avoid users' dismay.

2013-01-29  Lee Yarwood  <lyarwood@redhat.com>

	upgrade: catch MetaDataKeyNotFoundError when preparing images
	Ensure that we catch and continue past any MetaDataKeyNotFoundError
	exception when preparing images that may contain partially removed
	volumes. For example where the LV is still present but the metadata
	block has been blanked out.

2013-01-29  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Improve dom xml gereration
	This patch adds a new class XMLElem, which allows to create a XML element
	and set its attributes and text node with one call. Also it can add
	a child element with the attibutes of child. Then dom xml generation
	code can just focus on getting attributes from vm's defintion. It also
	make it easier to replace minidom with elementtree if neccessary in future.

2013-01-28  Adam Litke  <agl@us.ibm.com>

	schema: Strengthen schema verification
	Add additional checking to process-schema.py to detect the following errors:
	 - Symbol comment documents a field which is not defined in the symbol
	 - Symbol references an undefined type

	schema: bridges was added to VdsmCapabilities
	In 1fa30a, Dan added a new field 'bridges' to VdsmCapabilities but did not
	update the schema to reflect it.  At the moment we are not checking for
	extraneous fields in our types so I just caught it now by chance.

2013-01-28  Dan Kenigsberg  <danken@redhat.com>

	Expose a new argument for tunneled migration of a VM
	Tunneled migration (notice the US spelling!) provides better
	authentication and encryption for migration data, in the price of higher
	CPU consumption and libvirtd latency. Let Engine choose if this is
	wanted per migration command.

2013-01-28  Antoni S. Puimedon  <asegurap@redhat.com>

	Remove redundant exception assignations.
	Remove some obvious assignations from the except clauses that do
	not make any use of them.

2013-01-28  Federico Simoncelli  <fsimonce@redhat.com>

	clusterlock: add the local locking implementation
	In order to have a faster and more lightweight locking mechanism on
	local storage domains a new cluster lock (based on flock) has been
	introduced.

2013-01-27  Saggi Mizrahi  <smizrahi@redhat.com>

	jsonrpc: Make jsonrpc test timeout constant

	jsonrpc: Add timeout to JsonRpcTests:JsonRpcServerTests
	Without it tasks linger forever if server fails to respond

	jsonrpc: Add some more tests to JsonRpcTests

	jsonrpc: Allow JsonRpcBindings to initialize an AMQP transport

	jsonrpc: Run JsonRpcServer requests in their own thread
	Currently it uses the transport thread.
	This change creates a clear separation of control flow.

	This makes sure there is a single sync point for all json-rpc requests
	and that handling a request never blocks the transport for processing
	messages.

	jsonrpc: Add more logging to JsonRpcTests to ease debugging

	jsonrpc: Don't call server.shutdown since it doesn't exist

	jsonrpc: Basic AMQP 1.0 transport support
	I don't set the port on purpose, the configuration scheme will have to
	be changed to more appropriately support multiple transports. This will
	be done in another patch.

	Since qpid-proton is in package review for fedora I don't add it as a
	requirement in the RPM or for testing. It will be used if present in the
	system.

	If you know how to review packages for fedora you are welcome to visit
	the BZ[1].

	We are planning on moving the binding files away from vdsm_api to vdsm
	code so that only client side and API code is in the vdsm_api dir.
	When that is done we will need to create an RPM for each transport so
	that users don't have to install dependencies for all transports.

	[1] https://bugzilla.redhat.com/874105

	tests: Make python version configurable
	This is good if you want to run a debugger shell (like winpdb) instead
	of just running vanilla python.

2013-01-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	adding myself as an author

2013-01-25  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix test errors on el6
	Include full new-style implementation of assertRaises so that even old
	versions of python can run all tests

2013-01-25  Federico Simoncelli  <fsimonce@redhat.com>

	domain: remove race condition in extend
	During a domain extension the metadata mappings are checked against
	MAX_PVS, in doing so the self._extendlock should be acquired to prevent
	multiple concurrent extensions that would surpass the MAX_PVS number.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=876663

2013-01-25  Dan Kenigsberg  <danken@redhat.com>

	logUtils.funcName: work on partial methods
	misc.Event.emit() fails when its callback is a partial(method, args) as
	it is neither a method, nor has func_name.

	Thread-645::WARNING::2013-01-24 01:29:11,212::misc::1236::Event.Storage.DomainMonitor.onDomainConnectivityStateChange::(_emit) Could not run registered method because of an exception
	Traceback (most recent call last):
	  File "/usr/share/vdsm/storage/misc.py", line 1228, in _emit
	    logUtils.funcName(func))
	  File "/usr/share/vdsm/logUtils.py", line 31, in funcName
	    return func.func_name
	AttributeError: 'functools.partial' object has no attribute 'func_name'

2013-01-25  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	tests/functional: Add GlusterSD functional test
	Add functional testcase for glusterSD. This requires a gluster
	volume named 'testvol' running on the same system as this test
	runs as a pre-req.

	tests/functional: Use deleteVolume instead of deleteImage
	Since we are creating a volume, the undo/rollback should
	do deleteVolume instead of deleteImage. deleteImage does
	not work well for derived filedomains (eg. glusterSD) as
	it does not honor the volumeClass associated with the
	derived domain, so its not possible to write a test using
	deleteImage for glusterSD. Technically too, deleteVolume
	fits the current flow of testcase better than deleteImage
	as there isn't a chain of volumes being created to be
	really justified to use deleteImage

2013-01-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BindingXMLRPC: flowID for Irs calls
	Adding flowID to vdsm log for Irs calls

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=800355

2013-01-24  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: use alternate method for verify certificate
	M2Crypto at python-2.6 issues deprecation warning for current method of
	acquiring certificate chain. Use an alternate method.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=901470

2013-01-24  Vered Volansky  <vvolansk@redhat.com>

	vdsm: Fix diskReplicateFinish call description
	vdsClient diskReplicateFinish had the same description as Start.
	Changed "Start" to "Finish".

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=901606

2013-01-24  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Support for GLUSTERFS_DOMAIN
	This patch introduces a new storage domain of type
	GLUSTERFS_DOMAIN, which uses gluster as the storage backend.

	In GLUSTERFS_DOMAIN, vdsm creates the storage domain by mounting
	the gluster volume (akin to nfs mounting export path). VMs
	created using this domain exploit the QEMU's gluster block
	backend. Instead of accessing the vmdisk as a file path, it
	accesses the vmdisk as a network disk device, served by gluster
	server/volume.

	This patch attempts to re-use nfsSD core logic (to an extent)
	to support domain of type GLUSTERFS_DOMAIN.

2013-01-24  Yeela Kaplan  <ykaplan@redhat.com>

	Change scsi_id command path to be configured at runtime
	On fedora 18 scsi_id path is no longer under /sbin/scsi_id,
	we configure vdsm to look for the path at runtime
	and thus remove it from constants.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886087

2013-01-24  Andrey Gordeev  <dreyou@gmail.com>

	Explicitly shutdown  m2crypto socket
	Aparently some versions of the m2crypto library don't shutdown correctly
	underlying sockets when a SSL connection is closed.

	In Python 2.6.6 (the version in RHEL6 and in CentOS6) when the XML RPC
	server closes a connection it calls the shutdown method on that
	connection with sock.SHUT_WR as the parameter. This works fine for plain
	sockets, and works well also for SSL sockets using the builtin ssl
	module as it translates the call to shutdown to a complete shutdown of
	the SSL connection. But m2crypto does an different translation and the
	net result is that the underlying SSL connection is not completely
	closed.

	In Python 2.7.3 (the version in Fedora 18) when the XML RPC server
	closes a connection it calls the shutdown method on that connection with
	sock.SHUT_RDWR, so no matter what SSL implementation is used the
	underlying SSL connection is completely closed.

	This patch changes the SSLSocket class so that it explicitly shuts down
	and closes the underlying socket when  when the connection is closed.

2013-01-24  Federico Simoncelli  <fsimonce@redhat.com>

	domain: select the cluster lock using makeClusterLock
	In order to support different locking mechanisms (not only per-domain
	format but also per-domain type) a new makeClusterLock method has been
	introduced to select the appropriate cluster lock.

2013-01-24  Dan Kenigsberg  <danken@redhat.com>

	vdsmd.service: require either ntpd or chronyd
	Fedora 18 ships with chronyd by default, which conflicts with ntpd. We
	do not really care which one of the two is running, as long as the host
	clock is synchronized. That's what requiring time-sync.target means.

2013-01-24  Mark Wu  <wudxw@linux.vnet.ibm.com>

	spec: requires selinux-policy to avoid selinux failure on access tls cert
	selinux-policy tightened up the security on svirt_t on fedora18. It causes
	that svirt_t is disallowed to access cert_t file. And therefore it will block
	qemu run spice server with tls. For more details, please see:
	https://bugzilla.redhat.com/show_bug.cgi?id=890345

2013-01-24  Antoni S. Puimedon  <asegurap@redhat.com>

	Simplify ip address validation leveraging socket.
	Currently we have a ad-hoc validation of the validity of ip
	addresses. Since the standard socket module has a built-in
	validator inside inet_pton, we could leverage it.

2013-01-23  Federico Simoncelli  <fsimonce@redhat.com>

	misc: rename safelease to clusterlock
	The safelease module is now contaning also the sanlock implementation
	and soon it might contain other (e.g.: a special lock for local storage
	domains), for this reason it has been renamed with a more general name
	clusterlock. The safelease implementation also required some cleanup in
	order to achieve more uniformity between the locking mechanisms.

2013-01-23  Adam Litke  <agl@us.ibm.com>

	Bridge: Fix the specification of the getAllTasks return value

2013-01-23  Juan Hernandez  <juan.hernandez@redhat.com>

	Copy truncate vdsm-reg.log
	When the vdsm-reg program doesn't stop (if it fails to contact the
	engine, for example) it will continuously generate messages that can
	flood the log. Moving the log file is not enough because the program
	keeps it open, so the space is not freed. As the program opens the file
	for appending it is safe to copy and truncate the file.

2013-01-23  Dan Kenigsberg  <danken@redhat.com>

	test CommandPath

2013-01-23  jarod.w  <work.iec23801@gmail.com>

	vdsm: free loop device when umounting floppy in mkimage.py
	After umounting floppy successfully, it doesn't free automatically
	the loop device. Here, we add the support to free the loop device
	in the umount function of Mount class and free it to prevent it
	using up all loop devices.

	The issue only happened in the special case that node is built using
	livecd-tools(version: 16.8-1) and rpms from centos63. Because:
	1. Centos63 disables auto-destruction feature and still depends on
	   /etc/mtab to free the loop device.
	2. Livecd-tools links /etc/mtab to /proc/self/mounts, so umount can't
	   get suggestion to free the loop device from /etc/mtab.

2013-01-23  Dan Kenigsberg  <danken@redhat.com>

	net: drop nicSort
	nicSort was introduced so that vdsm calls ifup on bonded nics in the
	same order that initscripts does it, in order to obtain the same master
	mac address.

	A simpler and safer solution is to delegate ifup of bonded nics to
	initscripts, which does that when we ifup the bond device.

	In this commit we drop nicSort together with its remaining usage.

2013-01-21  Federico Simoncelli  <fsimonce@redhat.com>

	domain: use shared lock for extendStorageDomain
	The extendStorageDomain command shouldn't hold an exclusive lock on
	the storage domain since it can be executed also during other long
	tasks (e.g.: moveImage).

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=876663

2013-01-21  Antoni S. Puimedon  <asegurap@redhat.com>

	Simplify netinfo get.
	This patch refactors netinfo to have the network data fetching on
	a separate function. This reduces the get() complexity and will
	allow the possibility of reusing the new method (via a future patch
	wrapping of it) for more fine-grained information retrieval, e.g.,
	update just a network info of a Netinfo instance.

2013-01-20  Yeela Kaplan  <ykaplan@redhat.com>

	use qemu-img convert to copy sparse volumes when moving a vm
	Previously all volumes were copied with dd, with sparse files this
	would result in the destination volume being fully allocated.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=748386

2013-01-20  Antoni S. Puimedon  <asegurap@redhat.com>

	Remove old-style exception raising (pep3109)
	The only exception is when raising with a traceback, for which
	there is not a new-style equivalent both Python 2.x.

2013-01-20  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Extract bonding options building into a separate function.
	To make setupNetworks shorter, move the bonding options building code
	into a separate function.

2013-01-19  Mark Wu  <wudxw@linux.vnet.ibm.com>

	tests: Fix parted_utils_tests break on fedora 18
	parted 3.1 improves its support for loopback devices. The 'model' string
	returned by libparted is updated to 'Loopback device'. For more information,
	please see:
	http://anonscm.debian.org/gitweb/?p=parted/parted.git;a=commit;h=3e35b6

	Because another bug of parted.version() on rhel6
	(https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=700383),
	we can't use parted.version() to differentiate the parted version.
	We could restort to rpm db, but loop device is only used in test code,
	so it should be safe to ignore the test of model string.

	Revert "tests: Fix parted_utils_tests break on fedora 18"
	The commit 51d76e caused a break on rhel6 host because of a bug
	in parted.version(). Please see:
	https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=700383
	It's fixed in Fedora 14, but not backported to RHEL6. So we have to
	find a workaround for the break on Fedora18.

	This reverts commit 51d76e04727c2d41371eb207f02a0f84de74a140.

2013-01-19  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix inefficiency in getBridgelessNetworks
	This commit makes getBridgelessNetworks use the Netinfo instance
	networks instead of generating its own. Additionally, it is put in
	the style and vicinity of the most semantically similar method of
	the class, to improve the module's readability.

2013-01-17  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Add a flag to libvirtvm's status to report watchdog event
	This flag will be set once watchdog event is triggered.
	The client can get watchdog event by checking the 'watchdogEvent'
	key in the return value of getVmStats or getAllVmStats API.
	This flag will be overwriting if watchdog fires more than once for
	the same VM before it was polled.
	And the flag will be not cleanup after it is set unless the client
	restart or shutdown VM.
	So add a timestamp in the message of this flag.

	The timestamp is the time in seconds since the Epoch.

	When the client poll this flag, it should record and check the
	timestamp to make sure that the event is already triggered.

	fix the optional parameters error of api schema file
	some discrptions of optional parameters miss #optional
	some definitions of optional parameters miss *

	fix two parameters of VmParameters in vdsmapi schema
	from the comments of VmParameters, the two parameters are #optional

2013-01-16  Andrey Gordeev  <dreyou@gmail.com>

	Add usbutils req to usbhook

2013-01-15  Saggi Mizrahi  <smizrahi@redhat.com>

	Refactor communication infra
	This is one phase in many, there is still a lot to do but it's a good
	step in the right direction.

	As I said, this is far from complete but it's enough code for a commit
	IMO.

	- Properly layer code to allow multiple transports
	- Isolate json-rpc logic to the actual json-rpc layer
	- Someone more conferment but still incomplete json-rpc 2.0 implementation
	- Make sure tcp handling uses one thread
	- Write some more tests

2013-01-15  Yaniv Bronhaim  <ybronhei@redhat.com>

	Moving pidStat function to utils
	As in general it doesn't serve only the storage part

2013-01-15  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix code style for API.
	Apply the code style suggestions in:
	    http://gerrit.ovirt.org/#/c/9993/1/vdsm/API.py

2013-01-15  Mark Wu  <wudxw@linux.vnet.ibm.com>

	tests: Fix parted_utils_tests break on fedora 18
	parted 3.1 improves its support for loopback devices. The 'model' string
	returned by libparted is updated to 'Loopback device'. For more information,
	please see:
	http://anonscm.debian.org/gitweb/?p=parted/parted.git;a=commit;h=3e35b6

2013-01-15  Antoni S. Puimedon  <asegurap@redhat.com>

	Update except syntax according to pep3110.
	The old except BlahException, e: is ambiguous and discouraged going
	forward. The new syntax for python 3.x is supported since Python 2.6
	and already present in our codebase, so it makes sense to
	homogeinize our syntax. For more information:

	http://www.python.org/dev/peps/pep-3110/

2013-01-14  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	tests: add iscsi storage functional test
	Create iSCSO storage backend and create vdsm storage layout on it.
	Use LIO as iSCSI target and skip the test if LIO is not available.

	functional tests: Wait till backend server of storage connection reference is connected
	Storage connection reference performs the actual connecting in
	asynchronous manner, so add a retryAssert on the storage connection
	status to wait it gets connected. Otherwise the creation of storage
	domain will fail if the backend connection in VDSM is not ready.

	Extract a super class for backend servers in functional test, the
	waiting for the ready of the connection is put in the super class,
	because this waiting can be useful to iscsi and glusterfs testing.

	storage connection monitor: don't recover an unmanaged connection
	A connection can be deleted (unmanage) when the storage connection
	monitor thread is in in Event.wait(). When the monitor thread continues
	to execute, it thinks the connection is lost and try to recover it, but
	the fact is it is unmanaged. This bug prevent iscsi connections from
	releasing cleanly.

	This patch checks if the connection is still managed by the monitor
	before recovering it.

2013-01-13  Federico Simoncelli  <fsimonce@redhat.com>

	udev: Race fix- load and trigger dev rule
	The rule file is generated, yet not synch-loaded in memory, so a VM with
	a direct lun fails to start.
	This patch reloads the rules before triggering using the new private
	udev functions - udevReloadRules() in supervdsmServer.py .
	Also added a check in appropriateDevice() (hsm.py) to make sure the
	mapping is indeed there.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891300

	upgrade: force upgrade to v2 before upgrading to v3
	During the upgrade of a domain to version 3 vdsm reallocates the
	metadata slots that are higher than 1947 (given a leases LV of 2Gb)
	in order to use the same offsets for the volume leases (BZ#882276
	and git commit hash 2ba76e3).
	This has no effect when the domain is version 0 since the metadata
	slots offsets are fixed (the first physical extent of the LV) and
	they can't be reallocated. In such case the domain must be upgraded
	to version 2 first.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=893184

2013-01-13  Dan Kenigsberg  <danken@redhat.com>

	use CommandPath.name
	At the moment, CommandPath.name is initialized, but its only use as a
	third string argument to OSError() is ignored.

2013-01-13  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Unify produceVolume
	Unify produceVolume function and make it use getVolumeClass
	so that subclasses can override getVolumeClass to specify
	their own Volume and ensure that produceVolume works
	properly with subclass supplying their own volumeclass.

	Introduce getMountPoint for NfsStorageDomain
	Move the code to generate the mount point into a seperate
	function, so that classes reusing NfsStorageDomain can
	override the function to present their own mount point path.

2013-01-12  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix vdsm_hooks pep8.

	pep8 fix of contrib vds_bootstrap and vdsm_reg.

	Fix the rest of vdsm storage pep8 issues.

2013-01-10  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Move gluster/{cli,exception,hostname,__init__}.py to vdsm rpm
	This move is being done so that vdsm code using gluster cli
	doesn't have the need to depend on vdsm-gluster rpm

2013-01-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: BuildRequires: python-pthreading
	Moving python-pthreading to be a generic BuildRequirement

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891542

2013-01-10  Yaniv Bronhaim  <ybronhei@redhat.com>

	Searching for both py and pyc file to start super vdsm
	In oVirt Node we don't keep py files.

2013-01-09  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove duplicate implementation of tobool
	This patch removes the duplicate tobool function from hooking.py,
	and replace it with utils.tobool.

2013-01-08  Mark Wu  <wudxw@linux.vnet.ibm.com>

	vdsm.spec: Don't require python-ordereddict on fedora
	It is a regression introduced by commit bb0620f. The condition "0%{?rhel} < 7"
	also holds true on fedora, so it causes to require python-ordereddict on fedora

2013-01-05  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	PEP 8: fix ignored errors E12{6,7,8}

2013-01-04  Saggi Mizrahi  <smizrahi@redhat.com>

	Increase timeout in remoteFileHandlerTests:PoolHandlerTests.testStop
	On congested hosts (like the oVirt Jenkins host) the test might fail
	even though nothing is broken it is just taking longer then expected.

2013-01-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: increase selinux-policy for rhel distro
	Adding missing booleans:
	- sanlock_use_nfs added in selinux-policy 3.7.19-131
	- sanlock_use_fusefs added selinux-policy 3.7.19-155.5

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=889122

2013-01-04  Adam Litke  <agl@us.ibm.com>

	tests: Test schema validity
	Add a simple test case to check schema validity.  For now, we just call the
	schema parser and make sure it doesn't raise any exceptions.

2013-01-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: python-ordereddict only for rhel < 7
	rhel7 contains python 2.7 which already includes ordereddict module,
	no need extra python package.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891542

2013-01-03  Dan Kenigsberg  <danken@redhat.com>

	mount.py: handle (deleted) mount points
	If an NFS mount is removed from the server, client side kernel appends
	" (deleted)" to it specification. It comes from fs/dcache.c's d_path()
	function:

	  Convert a dentry into an ASCII path name. If the entry has been deleted
	  the string " (deleted)" is appended. Note that this is ambiguous.

	In this patch we assume that every mount specification ending with this
	string is indeed a deleted one, and not a funky nfs server provided by
	an evil admin that hates Linux.

	Bug-Url: http://bugzilla.redhat.com/807351

	net: drop redundant ifdown/up of bond's nics.
	Commit 5cabaaa130 has introduced a logic that we are trying to
	eliminate: we should not ifdown a bonded nic directly, initscripts do it
	for us.

	netConf: fix a sloppy rebase
	Commit 5cabaaa1 is refering to ConfigWriter.NET_CONF_PREF which was
	dropped by a parallel commit 1ebff6e5b.

2013-01-03  Saggi Mizrahi  <smizrahi@redhat.com>

	Add callback to the plethora of retry halting possibilities

2013-01-02  Federico Simoncelli  <fsimonce@redhat.com>

	spec: fix typo in the numa hook summary

2013-01-01  Maor Lipchuk  <mlipchuk@redhat.com>

	VDSM: Fix VDSM error message.
	Rephrase VDSM error message.

2013-01-01  Tomas Jelinek  <tjelinek@redhat.com>

	Integrate Smartcard support
	This patch is a VDSM part of the integrating
	the smartcard support to the ovirt:

	This VDSM part integrates the smartcard  in
	a supported way, not just as an unsupported custom hook.

	It also removes the smartcard hook itself.

2013-01-01  Yeela Kaplan  <ykaplan@redhat.com>

	Rename lease files on v3 file SDs when renaming data and meta files
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886842

2012-12-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	isRunning didn't check local variable before reading saved data
	All internal svdsm files contained last svdsm instance info,
	after restart we didn't verify local manager instance before processing
	the operation and got AttributeError exception when calling svdsm
	manager.

	This returns false when _svdsm instance is None or in firstLaunch.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=890365

2012-12-26  Yaniv Bronhaim  <ybronhei@redhat.com>

	adding getHardwareInfo API to vdsm
	Super vdsm retrieves system info about host hardware
	parameters. This info will be shown as part of getHardwareInfo
	API call in a structure called HardwareInformation.

	This feature currently available only for x86 cpu platfroms, for other
	platfroms the api call returns empty dictionary.

	Feature-Description:
	http://wiki.ovirt.org/wiki/Features/Design/HostHardwareInfo

2012-12-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: bump python-ethtool version
	python-ethtool 0.6-2 shows None for ipv4_address request.
	This patch requires python-ethtool version 0.6-3 or higher.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=879148

2012-12-25  Michal Skrivanek  <michal.skrivanek@redhat.com>

	prepareForShutdown is not called when connection to libvirt is broken.
	add few more error codes taken from libvirt's virsh code. In future we should
	replace all this with a callback function they are adding in (not in RHEL 6.3).
	And perhaps avoid restarting vdsm and re-populate object from the new libvirt
	instance instead.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=852956

2012-12-25  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Fix of the unit tests from commit 09f850f

2012-12-24  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Improvement of the GuestAgent class memory usage
	Change in the implementation of reading and handling messages from
	the guest agent. Every 64KiB the newly arrived content is checked for
	a newline character and all messages are handled immediately before
	it continues to read. If the received data do not contain a new line
	character the data is appended to the buffer list and the
	_buffer_size variable increased by the size of all stored buffers in
	the list. If _buffer_size exceeds the defined threshold, currently set to 1MiB,
	the buffer list will be discarded and _buffer_size will be reset to 0.
	Additionally the _message_state variable will be set to 'MessageState.TOO_BIG'
	which indicates that the message must not be parsed once the next new-line
	character will arrive. Messages which are too big will never be parsed.

	Once a new-line character after a too big message arrives, the _message_state
	variable will be reset to MessageState.NORMAL.

	This change has been done to improve and control the amount of memory consumed
	by instances of the GuestAgent class.

	Scenarios covered by the test:
	* Multiple messages sent at once with various sizes
	  (handled in TestGuestIFHandleData.testBigChunk)
	* Messages sent in chunks one by one with oversized messages and normal
	  sized messages. (handled in TuestGuestIFHandleData.testMixed)

2012-12-24  Igor Lvovsky  <ilvovsky@redhat.com>

	Allow to remove NIC if it not in use
	In additional reset MTU to 1500 for bond device if existed
	and not in use

2012-12-24  Eduardo Warszawski  <ewarszaw@redhat.com>

	fix prepareVolumePath: BZ#843387, BZ#872961
	 * fix the case with empty cdrom or floppy drives
	 * fix the case with vmPayload for cdrom or floppy
	 * raise proper exception, if the drive is not supported

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=843387
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=872961

2012-12-23  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	improve the readability of prefix2netmask

2012-12-23  Antoni S. Puimedon  <asegurap@redhat.com>

	Don't fail silently when ifup fails.
	Up until now we discarded ifup return codes and ignored the possible
	errors present in ifup stdout. Use this information to perform better
	error reporting.

	The tests change is due to the fact that now that we treat ifup
	errors as excepcional occurences, for unit testing the persistent
	backups (thing which can be done by a regular user) we do not need
	to test ifup and ifdown of the current config as it is not a thing
	that the unprivileged user is normally allowed to do.

	Bug-Url: https://bugzilla.redhat.com/856737

2012-12-23  Pradipta Kr. Banerjee  <bpradip@in.ibm.com>

	test_getIfaceByIP changes for IBM POWER(ppc64) architecture
	/proc/net/route o/p is dependent on endianness and existing
	test case only handles x86 arch. This patchset adds support for
	ppc64 architecture

2012-12-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix typo in negative flow log in blockSD.rmDCImgDir().
	Related to BZ#885489.

2012-12-20  Greg Padgett  <gpadgett@redhat.com>

	api: Report CPU thread info in getVdsCapabilities
	Report CPU thread info in getVdsCapabilities

2012-12-20  Dan Kenigsberg  <danken@redhat.com>

	storageMailboxTests: fix for f18
	storageMailboxTests fails on F18 because it creates the mailbox files on
	/tmp, which is tmpfs on F18, and does not support O_DIRECT flags.

	This patch makes it use /var/tmp instead, which is usually storage-based
	and has O_DIRECT.

2012-12-20  Yaniv Bronhaim  <ybronhei@redhat.com>

	restarting libvirtd didn't work over allinone setup
	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=888258

2012-12-20  Yeela Kaplan  <ykaplan@redhat.com>

	Override compellent device defaults in multipath.conf
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=865673

2012-12-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	Distinguish between local and mounted SD's.
	Remote SD's were identified like locals due to mismatched name
	mangling.
	This patch is a minimal emergency fix.
	The /rhev/datacenter hierarchy should be revised.
	The need for localFsSD's should be revised too.

	Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=886533

2012-12-19  Adam Litke  <agl@us.ibm.com>

	api: Remove object instancing
	After further discussions on the mailing list, we decided to use object
	namespacing instead of object instances.  Doing this involves several changes to
	the schema and the DynamicBridge:

	 - Remove construction parameters from 'class' definitions in the schema
	 - Add the former construction parameters to each command
	 - Change the DynamicBridge to handle API.py object instantiation
	 - Fix spUUID handling in the API.py StorageDomain class
	 - Update the xmlrpc binding to reflect changes to API.py

2012-12-19  Moti Asayag  <masayag@redhat.com>

	Add results.log to .gitignore

	Support guest agent selective ip reporting
	The guest agent might not report inet element,
	therefore processing its input should support it and
	return an emply ips list instead.

	vdsm: pep8 cleanups

2012-12-19  Eduardo Warszawski  <ewarszaw@redhat.com>

	Handling removing file Exceptions.

2012-12-19  Pradipta Kr. Banerjee  <bpradip@in.ibm.com>

	Add correct TUNSETIFF ioctl value for IBM Power (ppc64) in tcTests.py
	The existing _TUNSETIFF value is specific for x86 arch. This patch
	adds the value for ppc64 arch

2012-12-18  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix blockSD pep8.

2012-12-18  Saggi Mizrahi  <smizrahi@redhat.com>

	caps nits

	Fix miscTests:ExecCmd.testNice failing due to race

2012-12-18  Antoni S. Puimedon  <asegurap@redhat.com>

	drop configNetworkTests.ConfigWriter.NET_CONF_PREF dup
	NET_CONF_PREF should be defined only once, in netinfo.py.
	Since the tests are using a non-real location for ifcfg files, that
	single definiion should be monkey-patched, or we would stumble upon
	null-named devices.

2012-12-18  Yaniv Bronhaim  <ybronhei@redhat.com>

	Check if log file exist on startup and log directory is accessible
	If file isn't exist we need to continue. Otherwise, os.access returns
	false and we report permission error.
	When continue we need to verify that vdsm has the right permissions to  create
	the log file in the log directory.

2012-12-18  Saggi Mizrahi  <smizrahi@redhat.com>

	Make advanced process invocations part of execCmd
	There are a bunch of places in the code where priority is set using ad
	hoc command concatenation. This is hard to understand and error prone.
	This patch adds this as a feature of execCmd so proper use is always
	enforced.

	- niceness can be set with the nice parameter
	- ionice class and class data can also be set with the appropriate
	  parameters
	- setsid can be set as a boolean with setsid=True

2012-12-18  Federico Simoncelli  <fsimonce@redhat.com>

	spec: require policycoreutils and skip sebool errors
	In order to avoid a policycoreutils bug (rhbz 883355) when selinux is
	disabled we now require the version 2.1.13-44 (or newer) of Fedora.
	Additionally we now skip any error in the rpm scriptlets for the sebool
	configuration (sebool-config) since they could interfere with the rpm
	installation potentially leaving multiple packages installed.

2012-12-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	caps.py: osversion() validate OVIRT
	Currently we are only validating RHEV-H node.
	This patch will validate oVirt node as well in osversion().

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=873917

2012-12-17  Antoni S. Puimedon  <asegurap@redhat.com>

	Remove redundant ifupping of bonded ifaces.
	ifup-eth of initscripts, when ifupping a bond checks which are
	its slaves and ifups them. Thus, removing this two ifup places
	we avoid a big source of FAILED messages in our logs while
	keeping all the functionality and correctness.

2012-12-17  Yeela Kaplan  <ykaplan@redhat.com>

	Take care of 'No devices found' when calling dmsetup status
	When there are no devices dmsetup status
	will return only: 'No devices found'

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=881947

2012-12-17  Antoni S. Puimedon  <asegurap@redhat.com>

	Remove redundant vlan device deletion.
	ifdown-eth has a clause that on ifdown of a vlan interface, said
	interface is deleted using ip link delete xxx type vlan. That
	happens synchronously and just one line before we do the deletion
	ourselves and generates a lot of FAILED messages in vdsm.log.

2012-12-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	vdsm/vdsm: fix vdsm start failure
	vdsm checks the log file permissions before start. However the log file
	path in the code is not correct, so it checks a non-existing file and
	always fails. This patch fix the problem.

2012-12-15  Antoni S. Puimedon  <asegurap@redhat.com>

	Yet another bunch of completely pep8 fixed files.

	Multiple pep8 fixes
	Several complete pep8 fixes in the road to complete pep8 compliance.

2012-12-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding check of os.access to vdsm log file during startup
	If log file isn't accessible we'll report to syslog and exit

2012-12-13  Antoni S. Puimedon  <asegurap@redhat.com>

	PEP8 completely fix caps and its tests.
	This is not only nice but necessary because as of the previous
	commit, the build didn't work.

2012-12-13  Dan Kenigsberg  <danken@redhat.com>

	spec: two minor beautifications

2012-12-13  Adam Litke  <agl@us.ibm.com>

	schema: Missing comment for new VmDeviceType
	When adding a new 'console' VmDeviceType, the submitter forgot to include
	documentation in the comment block.  This caused process-schema.py to fail.

	schema: Fix schema for VM.updateDevice
	Another recent update broke the schema file.  I'll take the blame for this one
	since I approved the change :)  Some missing and/or malformed data in comments
	was causing the process-schema script to fail.  Another reason for validating
	the schema during the build.

	schema: Missing schema information for 'syncType'
	Commit <> added a new API Image.syncData but did not fully spec the arguments.
	The referenced enum type 'syncData' has no definition.  Adding the missing bit
	based on my examination of the code.

	This is why we need something like http://gerrit.ovirt.org/#/c/9433/ to validate
	the schema at build time.

2012-12-13  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix duplicate emulated machines returned
	On Fedora, libvirt call getCapabilities() also append the list of emulated
	machines to the 'domain' node whose type is 'kvm'. The list is identical to
	what's listed in the default info of that arch. So it would cause
	getElementsByTagName('machine') matches all of machine tags and return a list
	of duplidate emuated machines.

	This patch changes to only collect information from the direct children of
	tag 'arch' and adds a test case for it.

2012-12-12  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	add a Makefile command to generate vdsm-api.html
	This command is used to generate vdsm-api.html from vdsmapi-schema.json
	Also it is easy to check the schema syntax errors, when new APIs are
	added in vdsmapi-schema.json.

2012-12-12  Federico Simoncelli  <fsimonce@redhat.com>

	spec: add python-pthreading build require

2012-12-12  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix pep8 completely for API.py

	Fix vdsClient.py pep8 completely.

	Fix flake8 warnings for network code.
	This patch fixes flake8 complaints on the code related to
	networking and libvirtvm.

2012-12-11  Saggi Mizrahi  <smizrahi@redhat.com>

	Refactor mom init error flow
	Splitting a log to to log invocation is bad because it could potentially
	separate the 2 log lines. Further more, it usually points out to a bad
	flow if you only sometimes need to log in the same flow so you resort to
	such tricks.

	- Add proper exception when MomThread fails to initialize
	- Make the two error flows clear and have each logged properly

2012-12-11  Dan Kenigsberg  <danken@redhat.com>

	a more delicate rollback
	If things go wrong during setupNetwork, we try to revert the networking
	state to what it used to be. Until this patch, we stopped the network
	service, reverted all ifcfg-* files, and restarted networking.

	This procedure disruppted all connection, even those unrelated to the
	ones being set up.

	With this change, we are taking down only affected devices, and revert
	them to their pre-setupNetwork state.

2012-12-11  Bala.FA  <barumuga@redhat.com>

	set libvirt dependency version to 0.9.10-21.el6_3.6 in RHEL
	When vdsm runs on RHEL based VMs, in some environment it fails to
	start due to missing cpu topology information from libvirt.  This
	issue is tracked at https://bugzilla.redhat.com/show_bug.cgi?id=868972
	and fixed in libvirt version 0.9.10-21.el6_3.6.

2012-12-11  Yaniv Bronhaim  <ybronhei@redhat.com>

	adding log print before svdsm dies

2012-12-11  Vinzenz Feenstra  <vfeenstr@redhat.com>

	vdsm: Attaching a console should be controllable
	Added a new console device which enables the engine to
	define that the virtual machine shall have a virtio console

	VDSM will upon creation insert a console with pty type and
	a 'virtio' target device on port 0

	Updated libvirtvm test to correspond with the changes

2012-12-11  Amador Pahim  <apahim@redhat.com>

	Online check ksmState and ksmPages.
	Currently ksmState and ksmPages is updated only when adjust()
	is called (vm._startUnderlyingVm() and libvirt.releaseVm()).
	Since ksmtuned can turn on/off ksm any time, vdsm will report
	inaccurate information until adjust() be called.
	This patch changes ksmState and ksmPages update to every API
	call, reflecting always the accurate information.

2012-12-11  Antoni S. Puimedon  <asegurap@redhat.com>

	netwiring: [4/4] Add API definitions.
	Fourth and final of the Network Wiring feature patches. It adds the
	implementation for using the new vmUpdateDevice feature and add
	linkActivate support for createVm and hotplugNic.

2012-12-11  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vmfex hook: generating rpm
	Generate vmfex rpm with others hooks.

2012-12-10  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix E241

	vdsm_reg/define.py: drop unused file

	style: drop trailing backslash per Zhou's request

2012-12-10  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	integrate zombie reaper in supervdsmServer
	    Integrate zombie reaper in supervdsmServer
	to reclaim the zombie produced by validateAccess.
	    As python has a bug to block signal
	when calling thread.join():
	    http://bugs.python.org/issue1167930.
	    Change it to a timeout join.

	Nit fixes of supervdsmServer
	use utils.rmFile instead of unlink
	Raise err in supervdsmServer final exit is useless,
	remove it.

2012-12-10  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix E125

	pep8: fix E124

2012-12-09  Yaniv Bronhaim  <ybronhei@redhat.com>

	pep8 fixes for vdsm file

2012-12-09  Dan Kenigsberg  <danken@redhat.com>

	vdsm startup: fix assert statement
	SyntaxWarning: assertion is always true, perhaps remove parentheses?

2012-12-09  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	iscsi.py: fix log message format
	The logging methods accept the first argument as message, and rest
	arguments as format values and options. The original code wrongly splits
	a message into several arguments, so only the first part is recognized as
	message and the rest are recognized as values.
	Since there are no format specifiers in the actually recognized message,
	it will raise error when it finds there are format values.

	This patch utilizes the implicit string concat feature and fix this bug.

2012-12-08  Igor Lvovsky  <ilvovsky@redhat.com>

	Add default MTU=1500 to NIC's ifcfg files.
	When we add bridge with custom MTU on top of nic, this MTU will be set properly
	on interface. But if we'll remove this bridge (including removing of MTU
	keyword from NIC's ifcfg file) and add instead the bridge with default MTU
	(without MTU keyword at all in ifcfg file) the actual MTU on the interface
	will stay as before.
	The only way to change the actual MTU is add MTU keyword explicitly to ifcfg file.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=873745

2012-12-07  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove duplicate implementation of prefix2netmask

2012-12-07  Laszlo Hornyak  <lhornyak@redhat.com>

	cpu mode support for vdsm
	This patch adds special hostPassthrough and hostModel as cpuType values.
	If the cpuType is one of these values, the <model> tag will not be
	created for libvirt, instead, a mode attribute will be created in the
	<cpu> tag with value 'host-passthrough' or 'host-model'.

2012-12-07  Antoni S. Puimedon  <asegurap@redhat.com>

	netwiring: [3/4] Add cli entry point.
	Third of the Network Wiring feature patches. It adds the cli support
	for using the new vmUpdateDevice feature.

	netwiring: [2/4] Add API definitions.
	Adds the schema definitions as for vmUpdateDevice described in:
	    http://wiki.ovirt.org/wiki/Feature/DetailedNetworkWiring#New_API

2012-12-07  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	xmlrpcTests: change skipNoKVM into a decorator
	After using skipNoKVM as decorator, the code looks cleaner.

	class XMLRPCTest(TestCaseBase):
		@skipNoKVM
		def testMethod(self):
			...

2012-12-06  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	remove redundant import misc
	there is already "import storage.misc as misc"

2012-12-06  Antoni S. Puimedon  <asegurap@redhat.com>

	netwiring: [1/4] Extend vmInterfaceDevice API def
	This patch extends the definitions of vmInterfaceDevice in
	order to allow vmHotplugNic and vmCreate to set a vnic link
	status as well as set portMirroring for it.

2012-12-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Move mom requirement
	There is no EPEL repo for RHEL7 and since oVirt 3.2 will require
	mom, let's move the mom requirement to not include RHEL7.

2012-12-06  Federico Simoncelli  <fsimonce@redhat.com>

	upgrade: reallocate the metadata slots when needed
	Few vdsm releases (4.9 prior 496c0c3, BZ#732980) generated metadata
	offsets higher than 1947 (LEASES_SIZE - RESERVED_LEASES - 1).
	This patch reallocates such slots to free ones in order to use the
	same offsets for the volume resource leases.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=882276

	sdcache: add refresh to connectStoragePool
	When connecting to a storage pool we should clear the domain cache to
	pick up all the changes that might have been introduced by other hosts.
	Additionally since StoragePool.refresh has a similar behavior to
	connectStoragePool it should also contain the invalidateStorage call to
	force an iscsi rescan.

	In this patch:
	* reinstate the sdCache.refresh call in connectStoragePool
	* add invalidateStorage to StoragePool.refresh

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=879253

2012-12-06  Dan Kenigsberg  <danken@redhat.com>

	pep8: comply with E122 and E123

2012-12-05  Saggi Mizrahi  <smizrahi@redhat.com>

	Sometimes the test host is overloaded and that might cause a false positive with such a low timeout

2012-12-05  Dan Kenigsberg  <danken@redhat.com>

	dd: use iflag=direct only when supported by the os
	Much like as vdsm's use of fileUtils.DirectFile that was fixed in
	http://gerrit.ovirt.org/9595, we should not pass the "direct" flag to
	/bin/dd when the underlying filesystem does not support it.

2012-12-05  Federico Simoncelli  <fsimonce@redhat.com>

	vm: increase the volume extension on storage migration
	During live migration VDSM needs to subsequently extend two volumes
	instead of one; doubling the size of the chunk to extend the watermark
	limit is doubled and VDSM has more time to accomplish the operations.

2012-12-05  Dan Kenigsberg  <danken@redhat.com>

	pep8: comply with E121 (indentation must be multiple of 4)

2012-12-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove Pool.isMember() function.
	Related to BZ#878894.

2012-12-04  Federico Simoncelli  <fsimonce@redhat.com>

	thread: daemonize HSM_MailMonitor and storageRefresh
	In order to successfully complete the prepareForShutdown command
	some additional threads have been switched to daemon.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=880961

2012-12-04  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix return value of shutdown() on failure

2012-12-04  Antoni S. Puimedon  <asegurap@redhat.com>

	concurrency: Vdscli uses a new HTTP conn per req.
	Python-2.7 changed xmlrpclib's implementation detail of spawining
	a new http/https connection per each request to add support for
	Keepalive. Unfortunately, this implementation detail was also what
	made the xmlrpclib's Transport be thread-safe.

	This change reverts the change in Transport, thus mantaining the
	thread-safety of our python client code for unencrypted
	communications.

2012-12-04  lvroyce  <lvroyce@linux.vnet.ibm.com>

	vdsm: use default libvirt event handler impl
	Removed libvirtev in favour of the native libvirt event loop
	implementation.

	Moved eventToString from libvirtev.py to libvirtvm.
	Additionally adjusted the event type strings to reflect
	http://libvirt.org/html/libvirt-libvirt.html#virDomainEventType

2012-12-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix block volume atomicity creation issue.
	BlockVolume creation is a 2 step process where first an LV is
	created and then tags are added to it. If another host refreshes
	it's cache between the 2 commands it will have an LV with partial
	data on it. To solve this issue, we add an initial tag to the
	lvcreate command so that any other host would be able to identify
	this volume as incomplete and ignore it.
	Special LVs still have not MD tags.

	Bug-uri: https://bugzilla.redhat.com/show_bug.cgi?id=876558

2012-12-03  Federico Simoncelli  <fsimonce@redhat.com>

	vdsm-tool: add the sebool configuration module
	This patch moves the sebool configuration from a shell scriptlet in the
	rpm package to the vdsm-tool command.

2012-12-03  Yaniv Bronhaim  <ybronhei@redhat.com>

	fixing pep8 issues in supervdsm

2012-12-03  Saggi Mizrahi  <smizrahi@redhat.com>

	Skip mountTests:MountTests.testLoopMount test if mkfs.ext2 is not installed

	Properly raise OSError in betterPopen

2012-12-03  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	fix error handling for misc.NoIntrPoll
	When recieving signal, poll raises select.error, and epoll raises OSError.
	Former exception wasn't caught by NoIntrPoll, which defies the purpose of that
	wrapper (see backtrace).

	Tested poll/epoll, pipe/file, closed pipe/pipe buffer overflow
	pipe write/read end error will not raise poll error.

	Storage.CrabRPCProxy: ERROR: Problem with handler, treating as timeout
	Traceback (most recent call last):
	  File "/home/jenkins/workspace/vdsm_unit_tests/vdsm/storage/remoteFileHandler.py", line 180, in callCrabRPCFunction
	    rawLength = self._recvAll(LENGTH_STRUCT_LENGTH, timeout)
	  File "/home/jenkins/workspace/vdsm_unit_tests/vdsm/storage/remoteFileHandler.py", line 149, in _recvAll
	    timeLeft):
	  File "/usr/lib64/python2.7/contextlib.py", line 84, in helper
	    return GeneratorContextManager(func(*args, **kwds))
	  File "/home/jenkins/workspace/vdsm_unit_tests/vdsm/storage/remoteFileHandler.py", line 133, in _poll
	    res = misc.NoIntrPoll(self._poller.poll, timeout)
	  File "/home/jenkins/workspace/vdsm_unit_tests/vdsm/storage/misc.py", line 1348, in NoIntrPoll
	    return pollfun(timeout)
	error: (4, 'Interrupted system call')

	Exclude generated python files from pep8 list
	Generated files will raise pep8 error because of path substitution:
	E501 line too long (86 characters)
	Check the py.in for PEP8 is enough for these files.

2012-12-03  Timothy Asir  <tjeyasin@redhat.com>

	added glusterVolumeProfileInfo verb
	Following is the output structure

	when nfs is true:
	{'volumeName': VOLUME-NAME,
	 'nfsServers': [
	     {'nfs': SERVER-NAME,
	      'cumulativeStats': {'blockStats': [{'size': int,
	                                          'read': int,
	                                          'write': int}, ...],
	                          'fopStats': [{'name': FOP-NAME,
	                                        'hits': int,
	                                        'latencyAvg': float,
	                                        'latencyMin': float,
	                                        'latencyMax': float}, ...],
	                          'duration': int,
	                          'totalRead': int,
	                          'totalWrite': int},
	      'intervalStats': {'blockStats': [{'size': int,
	                                        'read': int,
	                                        'write': int}, ...],
	                        'fopStats': [{'name': FOP-NAME,
	                                      'hits': int,
	                                      'latencyAvg': float,
	                                      'latencyMin': float,
	                                      'latencyMax': float}, ...],
	                        'duration': int,
	                        'totalRead': int,
	                        'totalWrite': int}}, ...]}

	When nfs is false:
	{'volumeName': VOLUME-NAME,
	 'bricks': [
	     {'brick': BRICK-NAME,
	      'cumulativeStats': {'blockStats': [{'size': int,
	                                          'read': int,
	                                          'write': int}, ...],
	                          'fopStats': [{'name': FOP-NAME,
	                                        'hits': int,
	                                        'latencyAvg': float,
	                                        'latencyMin': float,
	                                        'latencyMax': float}, ...],
	                          'duration': int,
	                          'totalRead': int,
	                          'totalWrite': int},
	      'intervalStats': {'blockStats': [{'size': int,
	                                        'read': int,
	                                        'write': int}, ...],
	                        'fopStats': [{'name': FOP-NAME,
	                                      'hits': int,
	                                      'latencyAvg': float,
	                                      'latencyMin': float,
	                                      'latencyMax': float}, ...],
	                        'duration': int,
	                        'totalRead': int,
	                        'totalWrite': int}}, ...]}

2012-12-03  Adam Litke  <agl@us.ibm.com>

	tests: Cleanup apiTests exception handling
	As Dan reported in http://gerrit.ovirt.org/#/c/9442/ the behavior of
	SocketServer differs between versions of python which causes the
	exception raised by sendMessage() to change.  Rather than key the
	expected exception based on the Python version, clean up the flow so it
	will behave the same across Python versions.

2012-12-03  Dan Kenigsberg  <danken@redhat.com>

	vdsmd.init: drop check_port_taken
	net-tools is not installed on F18 by default, and was obsoleted by
	iproute a decade ago. This is a good opportunity to drop the whole
	check_port_taken attempt from the daemon startup. This check is
	inherently raceful, it was applied only to the the xmlrpc port (even if
	jsonrpc is used), and is utterly unhelpful if we're using systemd (that
	reports error to system log, just like vdsm.log).

	pep8: more semi-automatic fixes

2012-12-02  Saggi Mizrahi  <smizrahi@redhat.com>

	Have direct file not use the O_DIRECT flag on tmpfs and ramfs
	tmpfs and ramfs don't support the O_DIRECT flags. This is intentional as
	O_DIRECT tells the kernel to bypass the page-cache and those file
	systems live solely on the page cache. Since the effect desired by
	direct IO is accomplished on these file systems without the flag there
	is no reason for the use to test the FS every time before opening a file
	for direct access.

	The reason we keep the same class instead of falling back to the regular
	file object is so we keep the semantics of the DirectFile() class and
	the user doesn't have to care that the underlying FS doesn't really
	support direct IO.

2012-12-02  Igor Lvovsky  <ilvovsky@redhat.com>

	Remove network.service dependencies from vdsmd.service
	In current vdsm behaviour during network rollback vdsm need to stop network service,
	rollback latest network changes and start network service again,
	but in host with systemd network service can't be stoped.
	According to systemd concept if service required by another service it will be immediately
	started again. In such situation vdsm can't revert network changes if needed.

	In this patch we remove network.service dependencies from vdsmd.service and add it
	as NEEDED_SERVICES in vdsmd.init

2012-12-02  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding monkeyPatch that replaces _start function of superVdsmProxy for tests
	This because changes in svdsm internal parameters can cause unexcpected
	behaviour and we can avoid it, at least when adding python path. This
	implementation is only useful for tests and revert changes that cause
	svdsm to crash.
	Apparently when adding empty PYTHONPATH in front of sude in normal run
	svdsm can't initialize itself and die, instead of explaining the reason
	I'm trying to avoid changing vdsm implementation and modify only the
	tests.

2012-12-02  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: start messagebus as it is libvirtd dependency

2012-12-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	The return of super vdsm tests
	We couldn't run svdsm tests because imports didn't exist under vdsm
	installation directory when running the tests. We want to be able to run
	those tests without having to install vdsm rpm.

	Here we add extraPythonPath that included the current directory. It is
	useful only for tests, if we run it normally we want vdsm to be
	installed in its default directories and we don't need this additional
	python path list.

2012-12-01  Saggi Mizrahi  <smizrahi@redhat.com>

	More PEP8 fixes

2012-11-30  Dan Kenigsberg  <danken@redhat.com>

	spec: our tests requires 'import selinux'
	configNetwork imports selinux during its unittest, thus we need it when
	we build the rpm.

	spec: hack around el6 logrotate dependency issue
	We currently require logrotate >= 3.8.0 which is not part of el6,
	because we use the 'su' directive. This patch drops 'su' from el6
	builds, and requires logrotate version that does not need it.

2012-11-30  Amador Pahim  <apahim@redhat.com>

	libvirtvm: Avoiding snapshot metadata creation
	After creating a new snapshot, it is not possible to live-migrate:

	  libvirtError: Requested operation is not valid: cannot migrate domain
	with 1 snapshots

	Issue is also affecting storage live migration due to use of the same vm
	snapshot function during the live storage migration process.

	This patch introduces the libvirt flag needed to avoid snapshot metadata
	creation.

	Bug-Url: http://bugzilla.redhat.com/872277

2012-11-30  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix remaining vdsm/*.py

2012-11-29  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Extract a method _getCapsXMLStr() to get capabilities from libvirt
	The new function  _getCapsXMLStr() could be shared by _getCpuTopology()
	and _getEmulatedMachines(). And it also saves a libvirt call by memorizing
	the result.

2012-11-29  Dan Kenigsberg  <danken@redhat.com>

	libvirtvm: prepare for <interface type='network'>
	In the near future (actually, in the following patch), I would like to
	define virtual interfaces with <source network>. If such a VM is
	migrated to a host expecting <source bridge>, bad thing would happen.

	This patch extracts <interface>'s network for bridge- and network-based
	interfaces alike. It should be applied to all the hosts in the cluster
	before generating the first network-based interface.

2012-11-29  Saggi Mizrahi  <smizrahi@redhat.com>

	tests: Drop abberant AttributeError
	PoolHandler.__del__ may be called by Python after the reference to
	zombieReaper module has been reset to None. This leads to an annoying
	    AttributeError: 'NoneType' object has no attribute 'autoReapPID'
	when tests finish.

	This commit swallows this error.

2012-11-28  Bala.FA  <barumuga@redhat.com>

	Adopt the change in xml output format
	'gluster volume status --xml' output added values under
	<volumes/volume> levels.  This change is taken up in the parsing.

2012-11-28  Dan Yasny  <dyasny@gmail.com>

	Cisco VM-FEX support vdsm hooks
	Moved the lock to handleDirectPool

	Author: Dan Yasny <dyasny@gmail.com>

2012-11-27  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	miscTests: using MACRO instead of string

	remoteFileHandler.py: nit fix for poll mask
	poll() should use POLLERR/POLLHUP instead of EPOLLERR/EPOLLHUP

2012-11-27  Haim Ateya  <hateya@redhat.com>

	upgrade: make sure that the lease files have correct permission
	Fix a bug where we tried to initialize sanlock lock before calling
	the function to set proper permissions.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=870024

2012-11-27  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Add packages versions for rhel7
	Add condition for RHEL7 packages.

2012-11-26  Federico Simoncelli  <fsimonce@redhat.com>

	hooks: add the nested virtualization hook
	If the nested virtualization is enabled in your kvm module this hook
	will expose it to the guests.

2012-11-26  Dan Kenigsberg  <danken@redhat.com>

	libvirtev.py: move to site_packages/vdsm
	Until we drop this little module, it has to sit within the vdsm package,
	or else `from vdsm import libvirtconnection` would fail.

	Bug-Url: https://bugzilla.redhat.com/870985

2012-11-26  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove REST bindings
	No one uses them and no one should. We are going in a different
	direction for a supported API and keeping the rest bindings alive is
	confusing and cumbersome.

2012-11-26  Adam Litke  <agl@us.ibm.com>

	mom: Report the status of the mom threads
	It will be useful to check on the status of the MOM threads.  Add a new field to
	the HostStats structure to provide this information.

	spec: Add MOM as a package dependency
	For oVirt 3.2, we are switching to MOM for KSM tuning.  One of the goals of this
	release is to ensure that MOM is running in all deployed oVirt hosts (ovirt-node
	and standalone).  A recent enough version of MOM is now available upstream for
	Fedora and RHEL and we build nightly RPMs on ovirt.org.  I think we are ready to
	add this packaging dependency now.

2012-11-26  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix libvirtconnection.py

	pep8: have a space after all operators, not before colon

	nwfilter, vmChannels: pep8 fixes

2012-11-22  Igor Lvovsky  <ilvovsky@redhat.com>

	Allow break bond with attached network while VM is running.
	The problem was that we counted tap device on the bridge as part of bond
	because of wrong behaviour of getNicsVlanAndBondingForNetwork.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=875487

2012-11-21  Saggi Mizrahi  <smizrahi@redhat.com>

	remoteFileHandler pep8 fixes

2012-11-21  Dan Kenigsberg  <danken@redhat.com>

	configNet: support PREFIX option
	PREFIX=16 means NETMASK=255.255.0.0.

	Bug-Url: https://bugzilla.redhat.com/866540

	vdsmd.init: retire ifconfig
	Replace ifconfig with iproute2's /sbin/ip also in our init script.
	Drop an old irrelevant comment that mentions ifconfig.

2012-11-21  Laszlo Hornyak  <lhornyak@redhat.com>

	pep8 fixes
	fixes in the code to make vdsm build on rhel 6.3

2012-11-21  Dan Kenigsberg  <danken@redhat.com>

	tc: retire ifconfig
	ifconfig was deprecated quite a few years ago, and some
	modern distribution do not ship it by default.

	In this patch, we dump its only use, by setting promisc flag directly.
	We implement set_flags() in hope to see ethtool add it.

2012-11-20  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Add an option to create a watchdog device.
	A support for a watchdog device was added to the "devices"
	configuration.

	Also add the watchdog event callback to log the watchdog action
	of VM.

	model of watchdog:
	    'i6300esb' default model, emulating a PCI Intel 6300ESB
	    'ib700'    emulating an ISA iBase IB700
	Only one watchdog device is supported for each VM.

	action of watchdog timeout:
	    'reset'     forcefully reset the guest
	    'shutdown'  gracefully shutdown the guest (not recommended)
	    'poweroff'  forcefully power off the guest
	    'pause'     pause the guest
	    'none'      default, do nothing
	    'dump'      automatically dump the guest

	the parameter of 'watchdog' device as follow:
	{'device': 'watchdog', 'type': 'watchdog',
	 'specParams': {'model': 'i6300esb', 'action': 'none'}}

	The watchdog device can be used to detect guest crash or hang, and
	if 'dump' is chosen for the action of watchdog timeout, libvirt will
	dump guest's memory on timeout automatically.

	The directory to save dump files can be configured by auto_dump_path
	in file /etc/libvirt/qemu.conf.

	The watchdog device requires an additional driver and management
	daemon in the guest. Just enabling the watchdog in the vdsm
	"devices" configuration does not do anything useful on its own.

2012-11-20  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	avoid creating hangover in storage domain cache after formatting
	HSM._recycle(self, dom) tries to delete the storage domain from cache by
	calling "sdCache.manuallyRemoveDomain(dom.sdUUID)". This is OK, but when
	it invokes "dom.format(dom.sdUUID)" to format storage domain, the "dom"
	is a proxy object and have to look for the true storage domain object by
	calling 'StorageDomainCache._realProduce()', thus cause the storage
	domain added to the cache again. This bug will prevent us re-using the
	storage domain UUID even though we format it.

	This patch invokes the format method of the proxy object first, then
	delete the storage domain from cache, and can avoid creating hangovers.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=806774

2012-11-20  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix a flaw introduced by commit 2c0fd0796

2012-11-20  Itzik Brown  <itzikb@mellanox.com>

	Adding hooks support for NIC hotplug
	Adding the ability to write hooks for events
	of NIC hotplug and hotunplug.
	Hooks are: before_nic_hotplug, after_nic_hotplug,
	before_nic_hotunplug,after_nic_hotunplug,
	after_nic_hotplug_fail and after_nic_hotunplug_fail

2012-11-19  Adam Litke  <agl@us.ibm.com>

	tests: Support parallel testing in apiTests
	The apiTests module tests the JSON-RPC server by creating a server instance on a
	specific port and then connecting clients to that port.  Unfortunately, this
	means that only one instance of the test can be running on a host at any given
	time.  Our Jenkins infrastructure would like to run parallel tests.  To enable
	this, we allow the test to find an open port to use.

2012-11-19  Bala.FA  <barumuga@redhat.com>

	used gluster cli xml output
	Below verbs are using gluster cli xml output
	glusterVolumesList
	glusterVolumeCreate
	glusterVolumeStop
	glusterVolumeDelete
	glusterVolumeSet
	glusterVolumeReset
	glusterVolumeBrickAdd
	glusterVolumeRemoveBrickForce
	glusterHostAdd
	glusterHostRemove

2012-11-19  Dan Kenigsberg  <danken@redhat.com>

	lvm: make len(LV_ATTR_BITS) == number of lv attr bits
	Bug-Url: https://bugzilla.redhat.com/876958

	drop type() calls
	Python method resolution knows to find class methods as it is.

2012-11-19  Mark Wu  <wudxw@linux.vnet.ibm.com>

	trivial: Fix a typo of mom package name on Debian

2012-11-19  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	add VM creation test over localfs storage layout
	It can be easily extended to use nfs or iscsi storage layout.

	extract a method for booting a test VM through kernel boot
	Hide the kernel boot and initramfs details into a method and provide a
	template configuration, then just call the method with custom VM
	configurations

2012-11-19  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	storage functional test with multiple storage domains and images
	add xmlrpc functional test for local storage,
	it can be extend to nfs and iscsi backends

2012-11-19  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	DeferableContext: Change to RollbackContext for easy undoing
	We often need to perform a series of operations:
	    op[0], op[1], ... op[N]
	These operations may allocate files, locks, connections, and op[K] may
	depend on op[K-1] 's result

	Sometimes it's not feasible to create context manager for each resource,
	because the number of the resource involved in a transaction can be a
	variable, for example, reading from a configuration file, but there is no
	way to use a variable number of the "with" statement, and
	contextlib.nested is being deprecated. So we need a concise framework
	to do rollback.

	This patch subclass DeferableContext and proposes an idiom to do this
	kind of rollback. DeferableContext re-raises the last exception, while
	this patch re-raises the first exception, for the earliest exception
	may be the root cause and most helpful when investigate the problem.

2012-11-18  Federico Simoncelli  <fsimonce@redhat.com>

	pool: refresh multipath on connectStoragePool
	On connectStoragePool we should rescan the iscsi connections to
	reactivate them in case they were previously interrupted.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=870768

2012-11-18  Adam Litke  <agl@us.ibm.com>

	mom: Add mom package version to vdsCapabilities

2012-11-16  Daniel Erez  <derez@redhat.com>

	Adding support for force extend block domains
	Passing 'force' flag through extendStorageDomain
	to enable block storage domain force extend [1]
	(_initipvs already accepts the 'force' flag).

	[1] Force is used to extend a storage domain with a LUN even if
	it is already a part of a VG / has partitions on it / etc
	(i.e. the user doesn't have to manually cleanup before using the LUN).

2012-11-16  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	schema: nit schema fix

2012-11-15  Adam Litke  <agl@us.ibm.com>

	mom: Redirect mom init stacktrace to debug log
	When MOM initialization fails we are currently falling back to the old
	KsmMonitor.  When this happens we print a warning which is appropriate.  Since
	the error is handled, we should not print the stack trace at warning level.
	This information is useful in debug mode however.

	Split the stack trace printout into a separate debug logging message.

2012-11-15  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	sslTests: fix parallel build in Jenkins
	sslTests uses a fixed port for binding socket. When it is run in
	parallel Jenkins builds, it will fail with port conflicts.

	This patch tries to find new available port if the default port is
	occupied.

2012-11-15  Adam Litke  <agl@us.ibm.com>

	build: Add BuildDepends for m2crypto
	During the build, I get the following traceback:

	Traceback (most recent call last):
	  File "../tests/testrunner.py", line 274, in <module>
	    hackVdsmModule()
	  File "../tests/testrunner.py", line 252, in hackVdsmModule
	    sub = __import__(name, globals(), locals(), [], -1)
	  File "/home/aglitke/rpmbuild/BUILD/vdsm-4.10.2/vdsm/SecureXMLRPCServer.py",
	line 39, in <module>
	    from M2Crypto import SSL, X509
	ImportError: No module named M2Crypto

	We need the m2crypto package at build time now as well (in order to run tests).

2012-11-14  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	fix several errors when run process-schema.py to parser schema file.
	1. two command names do not match the their comments
	2. fix "Interrupted comment block" error. The comment of each entity
	should start with double pound

2012-11-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	Not remove volumeless or inexistent images.
	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=876115

2012-11-13  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	xmlrpcTests: narrow the expected exception when using retry
	Change the expected exception from the default Exception to
	AssertionError

2012-11-13  Juan Hernandez  <juan.hernandez@redhat.com>

	Implement SSL session cache
	We are currently implementing SSL for the XML-RPC communications with
	the standard Python "ssl" module. Unfortunately this module uses OpenSSL
	in such a way that a new OpenSSL context object is created for each
	client connection. This means that OpenSSL can't reuse the session
	cache that is stored in the context object, so the heavy part of the SSL
	handshake (asymmetric encryption) is performed for each connection.  In
	addition, as we use HTTP 1.0, this also means that we use one connection
	per request, and thus one handshake per request. This is a potential
	performance problem in the VDSM side and a huge performance problem in
	the engine side: when the number of hosts managed by the engine grows
	the use of CPU can grow to a point where almost all the CPU is used for
	SSL handshakes.

	This patch uses the Python M2Crypto.SSL module and creates an OpenSSL
	context object associated to the server socket. This context object is
	where OpenSSL stores the cached sessions information. Instead of
	creating a context object for each client socket the context object
	already created for the server socket is reused. This means that the
	cached sessions are also reused. This session reusing greatly reduces
	the amount of CPU used for handshakes.

	Bug-Url: https://bugzilla.redhat.com/857035

2012-11-13  Dan Kenigsberg  <danken@redhat.com>

	skip supervdsmTests until they work in-tree

2012-11-13  Federico Simoncelli  <fsimonce@redhat.com>

	tests: sort the tests and remove duplicates

	tests: add FileVolumeGetVSizeTest
	This patch adds a test for the getVSize method for file domains.

	tests: drop the sanlock-python dependency
	Testing vdsm shouldn't require sanlock to be installed and running.

2012-11-13  Dan Kenigsberg  <danken@redhat.com>

	build on el6: import OrderedDict from elsewhere
	Commit 1db772c71e has introduced usage of collections.OrderedDict which
	is not part of el6's Python 2.6. This patch imports Raymond Hettinger's
	implementation if OrderedDict is missing in the default location.

2012-11-13  Federico Simoncelli  <fsimonce@redhat.com>

	tests: override the P_VDSM definition in local tests
	The P_VDSM constant is used to configure the PYTHONPATH variable for
	the out of process handlers and it should be overridden during the
	local tests (vdsm is not installed).

2012-11-13  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix hsm.py
	Errors introduced by commit b83a0c157d5c and overlooked by my rebase of
	commit af99446a7cd35.

2012-11-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	svdsm import error
	By mistake I added 'import utils'. This patch fixes svdsm running
	errors and svdsm uts flow

2012-11-13  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	make vdsm/storage/hsm.py PEP8 clean
	clean hsm.py code style problems, and add it to PEP 8 whitelist in
	Makefile.am

2012-11-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#836161 - Changed code obsoleted by deleteImage() rewrite.
	Change image.move and image.multipleMove to call the new
	deleteImage implementation instead of image.delete

	BZ#836161 - Rewrite of deleteImage() complement.
	Volume operations should be done at the SD level to avoid
	retrieving static data multiple times from disk.
	Added lvm.lvDmDev() returning the dm-X for active LVs.
	Use this to get active LV size without issue a lvm command.

	Complements: I304ff5cd70186ffc9789cd1ac9337efa6c5ff695

2012-11-13  Federico Simoncelli  <fsimonce@redhat.com>

	remoteFileHandler: improve PYTHONPATH definition
	The recently added import for logUtils in misc.py broke the out of
	process (remoteFileHandler) subsystem (ImportError: No module named
	logUtils).
	Defining PYTHONPATH with relative paths is both unreliable and
	insecure.

	In this patch:
	* Remove an old sys.path modification in misc.py
	* Improve the PYTHONPATH definition in remoteFileHandler removing the
	  relative path

2012-11-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Adding supervdsm unit tests
	Adding svdsm uts file. Main tests produce initialization, crashes and
	calling of svdsm. We verify svdsm reaction in those cases.
	To manage that we turn filenames to variables, and change them during
	the tests. This lets us more flexability to use temporary files to run
	svdsm instance.

2012-11-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configure.ac: check python-pthreading module
	Adding AX_PYTHON_MODULE macro to check if python-pthreading module
	is installed.

2012-11-12  Federico Simoncelli  <fsimonce@redhat.com>

	logging: report the node hostname when vdsm starts
	It is convinient to correlate a log report to a specific host.

2012-11-12  Saggi Mizrahi  <smizrahi@redhat.com>

	Handle a race where it takes some time fot the cmdline to disappear after killing a process

	Fix problem where a 0 error code will cause remoteFileHandler to become a zombie

	Integrate zombie reaper in test framework
	Some parts of VDSM count on the zombie reaper being set up.

	Implement a zombie reaper
	This is meant to solve the issues where one starts a process but doesn't
	care about the return value.

	By using zombieReaper.autoReapPID(pid) you can register the reaper to
	automatically reap your process when it dies.

2012-11-12  Dan Kenigsberg  <danken@redhat.com>

	vdsmapi: fix a pep8 glitch
	I've forgot to include it into Adam's former patch.

2012-11-12  Adam Litke  <agl@us.ibm.com>

	jsonrpc: Implement the JsonRPC server for the next-gen API
	This patch implements a new Binding plugin to serve the next generation vdsm API
	over a JsonRPC wire protocol.  The basic format of a message is:

	    <size><json-data>

	<size> is an unsigned 64 bit integer in big endian format that indicates the
	length of <json-data> in bytes.  <json-data> is either a request or a response
	in Javascript object notation (JSON).

	A request object has the following fields:
	    id:  An integer which will be repeated in the matching response
	    methodName:  The name of the API method to be called
	    args (optional): A JSON object containing arguments to the method

	A response object has the following fields:
	    id:  An integer which will be the same as the matching request
	    result:  The return value of the method (defined in the API schema)
	    error:  A JSON object containing error information
	            code:  An integer error code
	            message:  Error context information

	Method calls are dispatched to vdsm using a MethodBridge.  The DynamicBridge
	dispatches calls based on an API schema document and a set of schema exceptions.
	In this way, the API can be expanded without the need to add more code to this
	server infrastructure.  When a request is made, the DynamicBridge attempts to
	resolve 'methodName' to a schema defined method.  If found, the necessary
	arguments are collected from the request and the function call is dispatched to
	the internal vdsm API.

	Schema exceptions:
	Currently, vdsm does not completely conform to its own API schema.  It is not
	possible to correct all of the discrepencies due to the need to maintain
	backwards compatibility with current API users.  To facilitate migration to this
	API, the DynamicBridge implements a set of overrides to translate between the
	schema-defined API and what is implemented in vdsm today.  There are three types
	of method overrides and one type of argument override:

	Method overrides:
	1. Custom call function:  If a new API does not map directly to an existing vdsm
	   API (or multiple functions must be called to get the result), a custom 'call'
	   function can be defined for the API.  This function will be called instead of
	   trying to find a vdsm API to call.

	2. Return field name:  Many vdsm functions' return values are nested in a
	   dictionary.  This override specifies the key to use when accessing the result
	   so that it can be returned un-nested to the caller.

	3. Custom result post-processing function:  Some vdsm APIs return results in a
	   non-standard format and a special function must be used to reformat the data
	   to comply with the schema.

	Type override:
	Some data types have a different representation internally to vdsm than we have
	defined in the schema.  A type override can be used to convert between the two
	formats.  Currently, the only kind of translation we do is to rename fields
	within a given type.

2012-11-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Add vdsm-xmlrpc as Requirement
	In last released version "vdsm" has provided xmlrpc functionality,
	and now it does not.

2012-11-10  Hercinger Viktor  <hercinger.viktor@gmail.com>

	netinfo: added configuration to show dummy NIC's too
	With the vars.fake_nics configuration a list of comma-separated
	interfaces can be specified. If a dummy interface matches the
	fnmatch pattern, it will be included in the NIC list.

2012-11-09  Dan Kenigsberg  <danken@redhat.com>

	storage/threadPool: fix copyright notice

2012-11-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	clienteIF: replace MOM self.log.error to warn
	If mom package is not installed, at this point vdsm should
	throw warning message instead of error.

2012-11-08  Federico Simoncelli  <fsimonce@redhat.com>

	libvirtvm: set volume the format in live snapshots
	When we update the drive objects (and configurations) at the end of
	a live snapshot we should also update the format to be "cow" in order
	to start requesting the drive extensions on block devices.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=874481

2012-11-08  Yaniv Bronhaim  <ybronhei@redhat.com>

	Using only globalPool allow only 10 processes
	For each domain we want to have process pool with limit slots of
	processes, this way we optimize glob over mounted links.
	This fix uses different pool for each domain, instead of the global one.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=853011

2012-11-07  Peter V. Saveliev  <peet@redhat.com>

	BZ#855924 -- fix 3.1 -> 3.0 migration again
	The issue was that fixing self._vm.conf is not enough -- we should
	fix self._machineParams, that will work in all the cases.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=855924

2012-11-07  Adam Litke  <agl@us.ibm.com>

	schema: Return objects rather than UUIDs
	Rather than returning UUIDs and forcing the API user to instantiate their own
	objects using those UUIDs, just return initialized objects.  This patch just
	changes the API schema.  The specific implementation of this idea appears in the
	patch that implements the code generator.

	This is not exhaustive, but an example of the idea.  The rest can be converted
	over time.

	schema: Remove VmFullStatus
	The VmFullStatus alias is a meaningless indirection that simply causes confusion
	to API users.  In all cases, its use just means VmDefinition so use that type
	instead.

	schema: New type VmParameters
	Although the format of the data passed via VM.create is very similar to a
	VmDefinition, some of the parameters don't make sense to pass in the context of
	creating a new VM.  Solve this by creating a new type for VM parameters.

2012-11-07  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	fix REMOVED_IMAGE_PREFIX not defined error
	Recently http://gerrit.ovirt.org/#/c/8506 is merged, it moves
	REMOVED_IMAGE_PREFIX = "_remove_me_" from vdsm/storage/image.py to
	vdsm/storage/sd.py. So all occurrence of REMOVED_IMAGE_PREFIX in
	image.py must be changed to sd.REMOVED_IMAGE_PREFIX, otherwise
	pyflakes will say REMOVED_IMAGE_PREFIX not defined.

2012-11-07  Saggi Mizrahi  <smizrahi@redhat.com>

	Make utils pep8 compliant

2012-11-07  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#836161 - Rewrite of deleteImage().
	Volume operations should be done at the SD level to avoid
	retrieving static data multiple times from disk.
	Added lvm.lvDmDev() returning the dm-X for active LVs.
	Use this to get active LV size without issue a lvm command.

2012-11-06  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Remove redundant plus between two strings in parenthesis
	Python will join them automatically without plus

2012-11-06  Saggi Mizrahi  <smizrahi@redhat.com>

	Don't forget to close thread pool when stopping the SPM mailer
	This causes thread leak anytime we call startSpm and an error is raised

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=872935

2012-11-06  Bala.FA  <barumuga@redhat.com>

	Change in error message format
	out, err or rc is added to error message only if its non-empty.

2012-11-06  Yaniv Bronhaim  <ybronhei@redhat.com>

	Cleanup unlinked mounts should be sync to hsm initialization
	Using external thread to cleanStorageRepositories that are not linked can
	cause a race if connectPool starts on same link simultaneously.
	Clearing broken links should be done before enabling connect pool.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=872270

2012-11-05  Saggi Mizrahi  <smizrahi@redhat.com>

	Change None equasion in storageServer

	Set up better threading in tests to make sure it happens correctly
	Some object in VDSM count on better threading being set up. They might
	break if it isn't set up or even worse set it up in the middle of a test
	run cause weird and unexpected errors in the test run.

	Also there might be bugs related to our use of pthreading and they will
	not be detected by the tests if it is not set up.

	This make sure pthreading is imported and set up before any tests are
	run.

	Fix getCmdArgs() on some hosts
	for some hosts cmdline might take some time to get actual content. This
	means to fix it by retrying if the content is missing.

	pep8 now also check visual aligment

2012-11-04  Yaniv Bronhaim  <ybronhei@redhat.com>

	itmap unit tests

2012-11-04  Federico Simoncelli  <fsimonce@redhat.com>

	fileVolume: make getVSize a real classmethod
	Formerly fileVolume even if declared as classmethod it was actually
	relying on producing the object to obtain the required information.
	This patch makes it a real classmethod (symmetric with block domains)
	which is particularly useful in case of half-baked volumes.

	Bug-Url: https://bugzilla.redhat.com/871811

2012-11-03  Saggi Mizrahi  <smizrahi@redhat.com>

	Make sure during upgrade that lease files have correct permission
	Bug-Id: https//bugzilla.redhat.com/show_bug.cgi?id=870024

2012-11-03  Vinzenz Feenstra  <vfeenstr@redhat.com>

	Applied PEP-8 guideline on code

2012-11-02  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: pyflakes/python-pep8 BuildRequirement
	pyflakes and python-pep8 are not default RHEL packages.
	This patch will move it for non rhel system requirements.

	configure.ac: pyflakes/python-pep8 reduce to warn
	Replace error message for warning message if build
	system doesn't contain pyflakes and python-pep8
	packages installed.

2012-11-01  Dan Kenigsberg  <danken@redhat.com>

	doh! fix the former commit
	I've decorated the class instead of the test method :-(

	Declare GetCmdArgsTests.test as broken
	Commit 86a259a804fbe6eb exposed a bug which we do not know to explain or
	to properly reproduce. This patch marks the broken test as such.

	FAIL: test (miscTests.GetCmdArgsTests)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	  File "/home/jenkins/workspace/vdsm_unit_tests/tests/miscTests.py", line 77, in test
	    self.assertEquals(misc.getCmdArgs(sproc.pid), args)
	AssertionError: Tuples differ: () != ('sleep', '4')

	Second tuple contains 2 additional elements.
	First extra element 0:
	sleep

	- ()
	+ ('sleep', '4')

2012-11-01  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix getCmdArgs() failing on some hosts

2012-11-01  Greg Padgett  <gpadgett@redhat.com>

	storage: Don't ignore nfs_mount_options in vdsm.conf
	The nfs_mount_options configuration setting in vdsm.conf was ignored.

	If the engine doesn't pass any mount options, and nfs_mount_options are
	present (and not the defaults), then use the options from the config
	file, as options to 'posixfs' connection. Otherwise, use whatever the
	engine passes and/or defaults as was done previously.

	Bug-Url: https://bugzilla.redhat.com/826921

2012-10-31  Yeela Kaplan  <ykaplan@redhat.com>

	Catch exception thrown by forceIScsiScan causing disconnect to fail
	Sending disconnectStorageServer twice triggers two calls to
	forceIScsiRescan. The first rescan closes the fd of the dd process for
	the disconnected hba. The second rescan tries to write to the same hba
	but doesn't find it anymore and dd exits and raises exception.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=868681

	Add rescan to formatStorageDomain to solve multipath race
	disconnectStorageServer and connectStorageServer are performed
	sequentially before formatStorageDomain, causing a race with multipath.
	The minimal timeout in forceIScsiScan gives multipath time for
	stabilization before trying to format the storage domain.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=844180

2012-10-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Reporting error instead of warn when timeout is raised in oop operation

2012-10-30  Gal Hammer  <ghammer@redhat.com>

	BZ#867439 VM unexpectedly was shutdown after migration.
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=867439

2012-10-30  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix version handling for NFS
	- The version parameter is now string. This is done to support NFS 4.1 and
	4.2.
	- Also moving of code around so that backward compatibility hacks are
	  limited to the old storage management API.

2012-10-29  Saggi Mizrahi  <smizrahi@redhat.com>

	Save a few seconds while running misc tests

	Make sure teardown() is called in case of errors
	This also adds scopedPrepare. It should be use unless there is absolutely
	no other choice!

	Bug-Url: https://bugzilla.redhat.com/815359

2012-10-29  Federico Simoncelli  <fsimonce@redhat.com>

	volume: save the correct size during creation
	As the comment in the patch states: when the volume format is raw what
	the guest sees is the apparent size of the file/device therefore if the
	requested size doesn't match the apparent size (eg: extends granularity
	in LVM) we need to update the size value so that the metadata reflects
	the correct state.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=868272

2012-10-29  Eduardo Warszawski  <ewarszaw@redhat.com>

	Log if timed out during fileSD.scanDomains().
	git gr -i -E  'sd.*?\.produce\('

	Fix race in fileUtils.createdir().
	Checking dir inexistence and creating it afterwards is racy.

	This version creates the target dir, and if it already existed
	check if has the requested permissions.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=838547

2012-10-28  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix exception string in lvm.changeVGTags().

2012-10-27  jarod.w  <work.iec23801@gmail.com>

	vdsm: delete undefined varable in mk_sysprep_floppy

2012-10-27  Federico Simoncelli  <fsimonce@redhat.com>

	pool: live storage migration implementation
	This patch introduces the support for the live storage migration in
	VDSM. The following new VM verbs are exposed:

	 result = diskReplicateStart(vmId, srcDisk, dstDisk)
	 result = diskReplicateFinish(vmId, srcDisk, dstDisk)

	The srcDisk and dstDisk are in the DriveSpecVolume format, e.g.:

	 driveSpecVolume = {
	     'device': 'disk',
	     'domainID': <sdUUID>,
	     'poolID': <spUUID>,
	     'imageID': <imgUUID>,
	     'volumeID': <volUUID>,
	 }

	The srcDisk describes the current image used by the VM and dstDisk
	describes the final image destination after the migration is completed.
	In diskReplicateStart srcDisk and dstDisk must be different, on
	diskReplicateFinish if srcDisk is different from the dstDisk then the
	live storage migration is completed, otherwise if srcDisk is equal to
	the dstDisk then the live storage migration is aborted and the VM falls
	back on the srcDisk (this can also be exploited for live cloning a VM).

	The possible returned errors are:

	- noVM(1): the VM is not present
	- imageErr(13): the image is not present
	- replicaErr(55): the replication request failed (e.g.: there is another
	  replication ongoing, there is no ongoing replication to stop, etc.)
	- unavail(40): the replication is not ready to switch to the destination
	  (the streaming process is ongoing), retry later. In the future this
	  information will be monitored with an HSM task.
	- changeDisk(41): the final operation to switch to the destination
	  failed and the VM falls back to the source.

	To copy the volume chain the following SPM verbs are now exposed:

	 taskId = cloneImageStructure(spUUID, sdUUID, imgUUID, dstSdUUID)
	 taskId = syncImageData(spUUID, sdUUID, imgUUID, dstSdUUID, syncType)

	The general purpose of these verbs is to expose advanced options to
	perform the copy of an image from a source storage domain (sdUUID) to
	a destination storage domain (dstSdUUID).
	The cloneImageStructure operation is preparing a new identical volume
	chain on the destination (dstSdUUID). The syncImageData operation is
	performing the real copy (copying the data) from the source volume chain
	to the destination.

	The 'syncType' parameter supports the following options:

	 SYNC_VOLUMES_ALL  # All the volumes are synchronized
	 SYNC_VOLUMES_INTERNAL  # Only the internal volumes are synchronized
	 SYNC_VOLUMES_LEAF  # Only the leaf volume is synchronized

	The returned errors are the regular storage domain errors with a special
	emphasis for the ones already returned by copyImage and moveImage.

	An example of a full live storage migration flow is:

	 ... live snapshot on srcDisk ...

	 SPM: cloneImageStructure(spUUID, sdUUID, imgUUID, dstSdUUID)
	 ... wait for the imageSync task to finish ...

	 VMHOST: diskReplicateStart(srcDisk, dstDisk)

	 SPM: syncImageData(spUUID, sdUUID, imgUUID, dstSdUUID,
	                    SYNC_VOLUMES_INTERNAL)
	 ... wait for the imageSync task to finish ...

	 VMHOST: diskReplicateFinish(srcDisk, dstDisk)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=865384

2012-10-26  Dan Kenigsberg  <danken@redhat.com>

	pep8: fix 2 errors and ignore plenty of others
	We need to either ignore or fix upstream pep8 errors so that vdsm can
	build in Fedora 18.

2012-10-26  Saggi Mizrahi  <smizrahi@redhat.com>

	Refresh storage in getDevicesVisibility() using multipath.rescan() instead of forceIScsiRescan()
	Using forceIScsiRescan() just refreshes the iSCSI targets, you need a new
	multipath run for devices to actually register in the device mapper.

2012-10-26  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Fix string format in storage exception

2012-10-26  Eduardo Warszawski  <ewarszaw@redhat.com>

	Require lvm with  ignored_mdas fix
	PVs blonging to a VG are reported as free if the PV is listed
	before reading the VG metadata, which is in another PV.
	This may cause false getVGInfo() reports.
	The present lvm version fixes it.

	Note that the Fedora required version is not updated as lvm2
	package is not updated there.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=798635
	Related to: https://bugzilla.redhat.com/show_bug.cgi?id=836663

	BZ#836161 - Pluralize lvm.changelv().
	Allow changing multiple attributes at once.

	Related to BZ#836161 - Add image to task name to improve log.
	The name will be used in the future for garbage collection.

2012-10-26  Mark Wu  <wudxw@linux.vnet.ibm.com>

	trivial: Clean handling of missing parameter in hotplugNic/hotunlugNic
	We can't construct a NetworkInterfaceDevice using an empty dict. So
	it doesn't make sense to assign an empty dict to nicParams and let
	it go further. And the parameter 'nic' is already validated in API level,
	so it should be safe to use it directly.

2012-10-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm_reg: generate deployUtil.py and config.py
	Adding nodist_vdsmreg_PYTHON to all-local target. Otherwise, deployUtil.py and config.py won't be generated.
	Thanks to Ravi Nori for the report!

	Introduced by commits:
	9459af3fa7f823d04d6e3ac5c5439ec6b2b6e961 (deployUtil)
	04efb9572326aa08bcc4af8e35c77433ee4146b0 (config)

2012-10-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	libvirt_password: remove new line char
	Do not generate different passwords.
	In the past we created the libvirt_password inside spec file without the newline char (echo -n).
	These days, we have a file that contain the password but uses the newline char. This scenario make
	the rpm upgrade completes with a warning message sharing that the password has changed.
	This patch will remove the newline char from the libvirt_password file.

	Introduced by commit: 1e5b390943a9c35e666bae06184fd8ea9cfdf289

	Example:
	 Updating   : vdsm-<snip>
	5/11
	warning: /etc/pki/vdsm/keys/libvirt_password created as /etc/pki/vdsm/keys/libvirt_password.rpmnew

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=866533

2012-10-25  Dan Kenigsberg  <danken@redhat.com>

	pep8: drop redundant trailing backslash
	Upstream pep8.py tool cries about it, and it was easy to fix
	automatically.

	While at it, fixed badly-broken long lines.

2012-10-25  Antoni S. Puimedon  <asegurap@redhat.com>

	Replace 'has_key' with 'in'
	Replace the dictionary method 'has_key' for the more
	pythonic and forwards compatible 'in' operator.

2012-10-25  Dan Kenigsberg  <danken@redhat.com>

	pep8: clean few small files

2012-10-24  jarod.w  <work.iec23801@gmail.com>

	add -d parameter when umouning in mk_sysprep_floppy
	After umounting mntpoint successfully, it doesn't free automatically
	the loop device. Here, we add '-d' parameter to free the device to
	prevent it using up all loop devices.

	The issue only happened in the special case that node is built using
	livecd-tools(version: >= 16.8-1) and rpms from centos63. Because:
	1. Centos63 disables auto-destruction feature and still depends on
	  /etc/mtab to free the loop device.
	2. Livecd-tools links /etc/mtab to /proc/self/mounts, so umount can't
	  get suggestion to free the loop device from /etc/mtab.

2012-10-24  Juan Hernandez  <juan.hernandez@redhat.com>

	Don't require fingerprint
	Currently, during automated installation of the node, we require the
	user to provide the fingerprint of the CA certificate in the
	"management_server_fingerprint" kernel option. This should be optinal,
	so if it is not provided then nothing is checked.

	Bug-Url: https://bugzilla.redhat.com/856167

2012-10-24  Yaniv Bronhaim  <ybronhei@redhat.com>

	itmap starts threads for each argument causes too many oop operations
	This patch starts the threads until we reach to maxthreads, than we
	wait for one thread to end and move on until we loaded all threads.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=523011

2012-10-24  Amador Pahim  <apahim@redhat.com>

	Validating number of required args in spmStart()
	Bug-Url: http://bugzilla.redhat.com/868619

	Currently vdsClient spmStart() returns
	"(Unexpected exception )" error if we provide
	less arguments than required. spmStart()
	expects 7 arguments, with 5 of them being
	required.
	This patch changes validateArgTypes() to allow
	number of required args specification instead
	of requireAllArgs "true" or "false" - wasn't
	enough when not all arguments, but some
	are required - and specifies the number of
	required args to spmStart().

2012-10-24  Federico Simoncelli  <fsimonce@redhat.com>

	upgrade: handle the templates lease files
	On file domains multiple lease files were generated for the
	same template volume. This patch addresses the issue upgrading
	the domain by volume and taking advantage of a new specific
	volume method (_shareLease) to share the lease with the other
	images.

	In this patch:
	* Fix the multiple leases for the same template volume issue
	* Improve the domain V3 conversion upgrading by volume (instead
	  of by image)

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=855425

2012-10-24  Alon Bar-Lev  <alonbl@redhat.com>

	packaging: add a method to reconfigure without init.d parameter
	systemd does not support additional service commands[1], while there can
	be argue if this is good or bad this is the fact.

	CURRENT IMPLEMENTATION

	Current bootstrap implementation uses hybrid approach while trying to
	pass "reconfigure" to init.d, and when fails, access the init.d script
	directly.

	This is highly none expected behavior.

	NEW IMPLEMENTATION

	Add /var/lib/vdsm/reconfigure file, if exists perform reconfiguration.

	This will work with any init.d system without issues.

	The service will be reconfigure at next start.

	** We cannot remove the code from the current vdsm-bootstrap, so it able
	   to reconfigure previous versions of vdsm.

	[1] http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities

2012-10-24  Igor Lvovsky  <ilvovsky@redhat.com>

	NIC hotplug should fail if setPortMirroring failed
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=867806

2012-10-24  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix vdsClient relative import woes.
	This patch enables the users to execute vdsClient
	without problems even from the source build tree.
	In general it makes the execution more resilient
	to naming conflicts in the local directory.

2012-10-24  Shu Ming  <shuming@linux.vnet.ibm.com>

	Text: fix the syntax error in the comment of createVolume()

2012-10-24  Douglas Schilling Landgraf  <dougsland@redhat.com>

	sos/vdsm.py: Add vdsm-reg dir
	Collect file(s) from /etc/vdsm-reg

2012-10-23  Antoni S. Puimedon  <asegurap@redhat.com>

	Make netinfoTests follow closely python guidelines.
	Change 'file' by 'open' and use a with block not to wait for gc.
	Prefer list comprehensions to map and filter.

2012-10-23  Peter V. Saveliev  <peet@redhat.com>

	BZ#867413 VDSM should return supportedENGINEs
	There is no references for supportedRHEVMs in the code of the
	ovirt-engine, but we have a reference for supportedENGINEs.
	According to it, the variable should be reported in the same
	format as supportedRHEVMs and has the same meaning.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=867413

2012-10-23  Federico Simoncelli  <fsimonce@redhat.com>

	stats: move the lastCheck computation to getRepoStats
	Since getVdsStats relies on repoStats for the storage domain statistics
	it makes sense to move the lastCheck computation into the latter one.
	Moreover the repoStats call before this patch was returning the unix
	timestamp for the lastCheck (wrong) instead of the elapsed time.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=868721

2012-10-22  Peter V. Saveliev  <peet@redhat.com>

	BZ#855924 fix VM config dictionary
	Fix vm.conf dictionary for compatibility with targets < 3.1.
	The issue was that 3.0 defines cdrom and floppy as dedicated
	dictionary keys, while 3.1 places them among other drives.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=855924

2012-10-22  Igor Lvovsky  <ilvovsky@redhat.com>

	Add 'name' attribute to VM conf during _getUnderlyingNetworkInterfaceInfo.
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=867813

2012-10-22  Yaniv Bronhaim  <bronhaim@gmail.com>

	SuperVdsm validation of recovery after crash
	When calling svdsm we verify if svdsm is up by reading its pid create
	time and compare it to timestamp that is written every svdsm
	initialization.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=846307

2012-10-22  Yeela Kaplan  <ykaplan@redhat.com>

	Update scsi_id options format and add devices to multipath.conf
	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=819745

	Clean /rhev/data-center/mnt/ after failed mount command
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=853040

2012-10-22  Dan Kenigsberg  <danken@redhat.com>

	Factor betterThreading out of Vdsm
	Recently, I've spun-off betterThreading as
	http://pypi.python.org/pypi/pthreading and have placed it in Fedora
	https://admin.fedoraproject.org/pkgdb/acls/name/python-pthreading .

	I believe that other complex multi-threading Python2 applications running
	on Linux would benefit from python-threading. Let us use it instead of
	containing it.

	Python3's implementation of threading already uses pthread, making
	pthreading useless if Python 3 is used.

2012-10-21  Saggi Mizrahi  <smizrahi@redhat.com>

	Properly propagate pool timeout in file handler

2012-10-21  Federico Simoncelli  <fsimonce@redhat.com>

	Revert "Initial live block migration API"
	This reverts commit 9e83bef71e6e02bf1264498d5f7297e377b32ca5.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=865384

2012-10-19  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix some pep8 errors in storageServer.py
	This doesn't make it 100% compliant because it's just irrelevant changes
	extracted from a bigger patch rebase.

	The job is finished in the next patch.

2012-10-19  Adam Litke  <agl@us.ibm.com>

	pep8: Make vdsm_api pep8 clean
	Since the vdsm_api directory does not yet have a Makefile.am, the files cannot
	be checked because vdsm_api isn't included in the distribution.  The next patch
	in this series will remedy that by establishing an automake presense in
	vdsm_api/ .

2012-10-19  Federico Simoncelli  <fsimonce@redhat.com>

	domain: fix onDomainConnectivityStateChange attribute
	The onDomainConnectivityStateChange event is not a DomainMonitorThread
	attribute.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=853703

2012-10-19  Saggi Mizrahi  <smizrahi@redhat.com>

	Clean up findCaller and add tests

2012-10-19  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	make vdsm/kaxmlrpclib.py PEP 8 clean

2012-10-19  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	add path instead of file items in PEP8_WHITELIST
	In some of directories, the pep8 of all the python source files are
	cleaned up, Just leave the path in pep8 list, remove the file items

	If a new python file is added in these pathes, the audobuild will
	check pep8 of this file automatically without adding it in pep8 list.

2012-10-18  Greg Padgett  <gpadgett@redhat.com>

	storage: can't create gpfs domain
	Validation for ':' in the path during creation of posix storage domains
	causes failure when creating gpfs domains; instead, check this only for
	nfs domains.

2012-10-18  Federico Simoncelli  <fsimonce@redhat.com>

	image: avoid prezeroing optimization in some cases
	The prezeroing optimization should be used only when it is actually
	stricly required. Using such optimization with COW is dangerous since
	the qcow2 header would contain the temporary volume size (10Mb).

	Until now this wasn't a problem because the content of the volume
	(qcow2 header included) would have been replaced by the original
	content (during a copy), with the introduction of live storage
	migration this might become a problem because the leaf is actually
	used for mirroing.

	volume: remove domain shared lock from getVolumeSize
	During long operations involving an exclusive lock on a storage
	domain (e.g.: domain upgrade) the getVolumeSize calls coming from
	the VmStatsThread are queued and the statsAge grows until the VMs
	are moved to not-responding.

	Also the extendVolume requests are queued (with requests coming
	from other hosts in the cluster) and the (redundant) refreshVolume
	issued by the VMs on the SPM.

	Removing the getSharedLock call from such methods is the safest
	way to fix the issue since we don't use more granular locks during
	the upgrade (image/volume locks) and these calls can either succeed
	or fail without undesirable side effects.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=865386

2012-10-17  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	fix comments in vm.getStats

2012-10-17  Laszlo Hornyak  <lhornyak@redhat.com>

	start ksm and ksmtuned when vdsm starts
	Bug-Url: https://bugzilla.redhat.com/854027

2012-10-17  Federico Simoncelli  <fsimonce@redhat.com>

	setup: move the certificate generation
	Generating the certificate at the service startup (instead of during the
	rpm installation) has a better chance to succeed (and a better recovery
	process). Moreover this allows appliances (like ovirt-node) to postpone
	the certificate generation when the service is actually used for the
	first time.

	In this patch:
	* Move the certificate generation from the spec file to the init file

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=860067

	vm: remove unused reqsize and needExtend
	It is some time that reqsize and needExtend have been dismissed, in
	preparation of some more extensive rework in the watermark handling
	(for the live storage migration support) we should explicitly remove
	the superfluous parts that we don't need to maintain.

	Rel-Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=865384

2012-10-16  Greg Padgett  <gpadgett@redhat.com>

	storage: failure to reconnect to authenticated iSCSI LUNs
	Fix failure to reconnect to iSCSI storage domains on LUNs requiring
	authentication due to missing CHAP credentials.

	The credentials were sent to VDSM when connecting sessions on the host,
	but VDSM was not sending them back to the engine when the engine queried
	for connection properties.  Without this, the engine couldn't store them
	in the database, and thus couldn't send them back out to any host trying
	to connect (or reconnect) the storage.

2012-10-16  Dan Kenigsberg  <danken@redhat.com>

	port mirroring requires a newer kernel
	It may be unsafe to use port mirroring due to kernel bug
	https://bugzilla.redhat.com/846585 and its el-6.3.z
	clone https://bugzilla.redhat.com/851444 .

2012-10-16  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	schema: add explanation string for the ballonInfo field
	Recently http://gerrit.ovirt.org/#/c/3669/ is merged. It adds a new
	member named balloonInfo to the type RunningVmStats, but forgets to add
	the corresponding information string in the comments. This will cause
	process-schema.py raise a KeyError when looking for info_data of
	balloonInfo and fail to generate the html documentation.

	This patch adds the corresponding information string.

2012-10-16  Mark Wu  <wudxw@linux.vnet.ibm.com>

	test: Add test cases for domxml generation

2012-10-15  Greg Padgett  <gpadgett@redhat.com>

	storage: Change low-priority tasks to idle priority
	Some tasks run as best-effort priority level 7, which is not low enough
	to prevent starvation of higher-priority tasks on the host.  This can
	hurt response time and even cause timeouts under heavy load.

	Instead, use idle priority so that the operations are done without
	interrupting other system operations.

	Note that idle priority behavior changed in kernel 2.6.25; there is now
	a guarantee of forward progress for processes at this level, making it
	usable for tasks such as these.

	Bug-Url: https://bugzilla.redhat.com/854242

2012-10-15  Adam Litke  <agl@us.ibm.com>

	schema: getStorageRepoStats returns StorageDomainVitalsMap
	The schema incorrectly had getStorageRepoStats returning StorageDomainStatsMap.
	In fact it returns a StorageDomainVitalsMap.  Fix the error and remove the
	unused mapping type StorageDomainStatsMap.

	schema: Change the format for specifying unions
	Unions are regular types but with methods to 'cast' the internal object to one
	of the member types.  We need to do it this way to support languages that lack
	the concept of type casting (ie. Python).  Change the schema to accomodate this
	new way of representing unions:
	 - 'data': contains fields that are common to all sub-types in the union.
	   Useful for identifying what the generic type should be casted to (eg.
	   VmDevice.deviceType).
	 - 'union': A list of types to which this object may be cast.  Causes the proper
	   casting methods to be generated.

	schema: Fix up VmDefinition Types

2012-10-15  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix some pep8 errors

2012-10-15  Laszlo Hornyak  <lhornyak@redhat.com>

	report cpuUser and cpuSys separately (#800367)
	Bug-Url: https://bugzilla.redhat.com/800367

	Uses virDomainGetCPUStats to get the CPU information instead of info()
	The content of the exported 'cpuSys' and 'cpuUser' changes:
	 - cpuSys is the sum of system_time and user_time reported by libvirt
	   since none of these include the guest time
	 - cpuUser is the time consumed only by the guest VM without the
	   system_time and the user_time

2012-10-15  Alon Bar-Lev  <alonbl@redhat.com>

	vdsm-reg: use M2Crypto instead of pyOpenSSL
	M2Crypto is much more supported and has superior coverage.

2012-10-15  Igor Lvovsky  <ilvovsky@redhat.com>

	Bump libvirt version to libvirt-0.9.10-21.el6_3.5
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=866163

2012-10-14  Antoni S. Puimedon  <asegurap@redhat.com>

	Keep nics up after network ops.
	All the network operations leave the nics up
	after this patch.

	Bug-Url: https://bugzilla.redhat.com/691484

2012-10-10  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	remove unassigned nice in vm
	_nice in vm is never assigned so should not reported in vm stats

2012-10-10  Saggi Mizrahi  <smizrahi@redhat.com>

	Added test to verify that miscExec throws exception when invoking a command that doesn't exist

2012-10-10  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix a bug in the naming convertion of cpu feature 'sse4_x'
	The list slice opertion missed the last character. It caused
	the feature name couldn't get chance to be converted into
	libvirt's naming.

2012-10-10  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: allow customize bridge name for standard sequence
	For gluster integration, we need bootstrap to be able to accept
	management bridge name within bootstrap and not relay on vdsm build time
	settings.

	As gluster only performs standard host bootstrap (as opposed to
	registration), the customization will be available only for this
	sequence.

	In future the registration sequence will be altered to match the standard
	sequence.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=863717

2012-10-10  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Add exit code for vdsm-tool commands
	The exit code is useful for user that calls vdsm-tool commands,
	So return the exit code of vdsm-tool commands as shell commands do.

2012-10-09  Antoni S. Puimedon  <asegurap@redhat.com>

	Make nics, vlan and bonding dhcp ifup to be asynchronous.
	Extends the asynchronous dhcp ifup beyond bridges.

2012-10-09  Dan Kenigsberg  <danken@redhat.com>

	libvirtconnection: retry opening a libvirt connection
	When we try to open a connection to libvirt too early after libvirtd has
	been started, we fail. This was first noticed in vdsmd after reboot, and
	was hacked there. However, the same bug appears when vdsm-reg-setup is
	run after reboot, and may appear during bootstrap.

	This patch polls for 10 seconds when a new connection to libvirt is
	requested.

	Bug-Url: https://bugzilla.redhat.com/862002

	tests: drop a partial reimplementation of util.retry

	move storage.misc.retry to vdsm.utils
	retry() is not storage-related. It is used only once, by supervdsm. I'm
	moving it outside so it is more easily usable.

2012-10-08  Dan Kenigsberg  <danken@redhat.com>

	vdsm-reg does not use traceroute for quite some time
	traceroute should have been dropped from the spec file when
	https://bugzilla.redhat.com/689726 was solved.

2012-10-08  Alon Bar-Lev  <alonbl@redhat.com>

	vdsm-reg: use web server CA extracted from SSL handshake
	CURRENT IMPLEMENTATION

	During registration, the CA certificate of the web server is downloaded
	from ENGINE_URL/ca.crt

	PROBLEM IN CURRENT IMPLEMENTATION

	There is no way to separate between the CA of the engine that issues
	certificates for vdsm and the web interface certificate.

	JUSTIFICATION

	Having 3rd party CA for web server certificate is required to meet
	organization policy. The 3rd party CA may already be trusted so issuing
	web server certificate using 3rd party CA makes deployment easier.

	NEW IMPLEMENTATION

	Acquire CA certificate from the TLS/SSL handshake.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=863292

2012-10-08  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	fix tests package dependency
	vdsm-tests depend on python-nose, it was only required for build env
	add this to runtime env to make tests available for users.

2012-10-08  Federico Simoncelli  <fsimonce@redhat.com>

	specfile: require selinux-policy 3.10.0-149
	Update to the newest selinux-policy package in fedora, among other
	general fixes it contains:

	- sanlock needs to send Kill Signals to non root process
	- update sanlock policy to solve all AVC's

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=863980

2012-10-08  Antoni S. Puimedon  <asegurap@redhat.com>

	Generalize asynchronous ifupping of network interfaces.
	Make the already used asynchronous ifupping of network
	interfaces (added for BZ#498940) to be an option of the
	general ifup function.

2012-10-08  Federico Simoncelli  <fsimonce@redhat.com>

	sdcache: remove the domain weakref cache
	This patch removes the (now) redundant weakref cache (replaced by the
	DomainProxy) and also parallelize the _findDomain calls for different
	storage domains.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=851146

2012-10-06  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove unused image.preDeleteHandler().
	Dead code remove.

2012-10-06  Amador Pahim  <apahim@redhat.com>

	Change source of CPU sockets/cores to libvirt capabilities
	Bug-Url: http://bugzilla.redhat.com/833425

	/proc/cpuinfo is not enough to provide full CPU
	sockets/cores/threads information in some systems,
	e.g. multi NUMA AMD Magny-Cours processors. To bypass
	different/unusual architectures and avoid duplication
	of code between vdsm and libvirt, this patch changes
	the source of CPU topology from /proc/cpuinfo to
	libvirt API.

	Since libvirt ignores funky topologies [1] with
	assimetric number of sockets per numa node and
	cores per socket, this patch assumes that all
	numa nodes has the same number of sockets and
	all sockets has the same number of cores.

	Merged with Laszlo's changes in http://gerrit.ovirt.org/8302

	[1] - http://libvirt.org/git/?p=libvirt.git;a=commit;h=ac9dd4a676f21b5e3ca6dbe0526f2a6709072beb

2012-10-05  Pradipta Kr. Banerjee  <bpradip@in.ibm.com>

	Add support for KVM on IBM POWER processor (ppc64)
	This patchset adds ppc64 arch support to the bootstrap code.
	Changes have been made to enable detection of CPU vendor,
	virtualization capability of the POWER platform and getting
	system UUID for KVM on POWER

2012-10-05  Greg Padgett  <gpadgett@redhat.com>

	storage: Default to NFSv3 if version not specified
	Unexpectedly switching to NFSv4 during e.g. upgrades from 3.0 to 3.1
	can cause permissions issues.  Unless explicitly set, use v3 as the
	default.  (By default, engine doesn't pass a version for SPs with
	compatibility version 2.2 or 3.0.)

	Bug-Url: https://bugzilla.redhat.com/855729

2012-10-04  Saggi Mizrahi  <smizrahi@redhat.com>

	Use buffer size in multiplies of the recommended transfer size
	Using the recommended transfer size fixes the memory corruption for NFS.

	Bug-Id: http://bugzilla.redhat.com/845660

2012-10-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	setNetworking(): set bridge status
	Currently, if the bridge for some reason is not created, users are informed
	with a warning message and bootstrap continues, the host is rebooted and
	Engine will report the node as Non Responsive.

	This patch will stop bootstrap as soon as any error occurs adding brigde
	and will show to users the an error message like:

	"Failed to install Host X.Y.Z. Step: SetNetworking:
	  Details: addNetwork error trying to add mangament bridge."

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=840300

2012-10-02  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Introduce a new verb setBalloonTarget
	We need this API to achieve memory overcommitment on guest level. Here's
	the definition of the new API:

	setBalloonTarget:
	    Dynamically change the target amount of physical memory allocated
	    to a guest.

	    Input parameter:
	        vmId   - VM UUID
	        target - target physical memory size in kibibytes
	    Return value:
	        success: return doneCode
	        failure: return errCode including underlying libvirt error message.

	And the ballooning information is added into the response of
	getVmStats(). It can be collected on vdsm client by this way:

	   balloon_info = s.getVmStats(vmId)['statsList'][0]['balloonInfo']

	Please note that setBalloonTarget can work only when a virtio balloon
	device is available for the guest. So to test it with vdsm API, you need
	put the following python dictionary into the 'devices' list in VM's conf
	to enable balloon device:

	{'device': 'memballoon', 'type': 'balloon', 'specParams':
	 {'model': 'virtio'}}

	On ovirt-engine, there's checkbox 'Memory Balloon Enabled' in the
	'New/Edit VM' UI. You can enable it in cluster 3.1.

2012-10-02  Timothy Asir  <tjeyasin@redhat.com>

	Added glusterVolumeProfileStop verb

	Added glusterVolumeProfileStart verb

2012-10-02  Bala.FA  <barumuga@redhat.com>

	Added glusterVolumeStatus verb
	Following is output structure depending on statusOption passed

	No option or default output:
	{'name': NAME,
	 'bricks': [{'brick': BRICK,
	             'port': PORT,
	             'status': STATUS,
	             'pid': PID}, ...],
	 'nfs': [{'hostname': HOST,
	          'port': PORT,
	          'status': STATUS,
	          'pid': PID}, ...],
	 'shd: [{'hostname': HOST,
	         'status': STATUS,
	         'pid': PID}, ...]}

	detail option output:
	{'name': NAME,
	 'bricks': [{'brick': BRICK,
	             'sizeTotal': SIZE,
	             'sizeFree': FREESIZE,
	             'device': DEVICE,
	             'blockSize': BLOCKSIZE,
	             'mntOptions': MOUNTOPTIONS,
	             'fsName': FSTYPE}, ...]}

	clients option output:
	{'name': NAME,
	 'bricks': [{'brick': BRICK,
	             'clientsStatus': [{'hostname': HOST,
	                                'bytesRead': BYTESREAD,
	                                'bytesWrite': BYTESWRITE}, ...]},
	           ...]}

	mem option output:
	{'name': NAME,
	 'bricks': [{'brick': BRICK,
	             'mallinfo': {'arena': int,
	                          'fordblks': int,
	                          'fsmblks': int,
	                          'hblkhd': int,
	                          'hblks': int,
	                          'keepcost': int,
	                          'ordblks': int,
	                          'smblks': int,
	                          'uordblks': int,
	                          'usmblks': int},
	             'mempool': [{'allocCount': int,
	                          'coldCount': int,
	                          'hotCount': int,
	                          'maxAlloc': int,
	                          'maxStdAlloc': int,
	                          'name': NAME,
	                          'padddedSizeOf': int,
	                          'poolMisses': int},...]}, ...]}

2012-10-02  Juan Hernandez  <juan.hernandez@redhat.com>

	Store engine web CA cert in engine_web_ca.pem
	Currently we store the CA certificate downloaded from the engine for
	registration purposes in the /etc/pki/vdsm/cacert.pem file.  This file
	is then replaced by VDSM by its default one during reboot, making a
	backup before. This means that after the reboot vdsm-reg can't use it to
	download the SSH key, and this means that registration fails.

	This patch changes deployUtil.py so that it downloadto s the certificate
	of the CA that signs the certificate of the engine web server to a new
	file: /etc/pki/vdsm/enginecacert.pem. This file is not touched by the
	VDSM start script, so that vdsm-reg can use it later to download the SSH
	key correctly.

	Bug-Url: https://bugzilla.redhat.com/856167

2012-10-02  Ryan Harper  <ryanh@us.ibm.com>

	Fix check-local build error
	Commit a062a1ae5124b6bce0beb73433fe0bf5822e6ebd changed
	vm.py removing a call to the caps module, but didn't remove
	the module import from source file and now pyflakes complains.

	(hungerforce) vdsm % make check-local
	find . -path './.git' -prune -type f -o \
	        -name '*.py' -o -name '*.py.in'  | xargs /bin/pyflakes
	./vdsm/vm.py:36: 'caps' imported but unused
	make: *** [check-local] Error 123

	This patch just removes the import.

2012-10-02  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix disconnect iscsi connections.
	iscsi disconnect failed to find the session to be disconnected,
	Resulting in a void operation.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=854151

2012-10-02  Igor Lvovsky  <ilvovsky@redhat.com>

	Read 'source'/'bridge' of NIC interface only if exists

2012-10-02  Peter V. Saveliev  <peet@redhat.com>

	BZ#781975 VM creation concurrency limit
	Since libvirt now does not support concurrent VM creation,
	simultaneous requests lead to the situation when a user
	should wait all VMs to be created before he sees any progress
	in the UI. Tho just for now it is more reasonable to limit
	parallel creation (4 threads does the stuff slightly faster
	than 1, and a user will see the progress in UI). As libvirt
	will support more fine-grained lock in its driver, we can
	return to caps.CpuInfo().cores() usage.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=781975

2012-10-02  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: remove MAC address from vds unique id
	CURRENT IMPLEMENTATION

	vds unique id is at format: @BIOS UUID@_@Low(MAC)@

	If BIOS UUID was not available either empty or "Not" were used.

	PROBLEMS IN CURRENT IMPLEMENTATION

	BIOS UUID may be missing or duplicate.

	MAC may change either because of bonding (resolved) or
	because of physical adapter change.

	ASSUMPTION

	Hosts with no BIOS UUID or with duplicate UUID are less than 0.05% of
	the hosts we manage.

	CONCLUSION

	No need to add great complexity malformed UUID hosts 0.05%.
	But remove the MAC issues from the solution.

	METHOD

	Remove the MAC address from vds unique id.
	Allow to bypass BIOS UUID with configuration.

	DETAILS

	If /etc/vdsm/vdsm.id exists at host, content is the vds unique id.

	If running on RHEV-H persist /etc/vdsm/vdsm.id during bootstrap or
	vdsm-reg.

	/etc/vdsm/vdsm.id is created by first engine vds unique id lookup
	or manually by administrator.

	SIDE EFFECTS

	If RHEV-H is reinstalled on malformed host (one with no BIOS UUID)
	it will be treated as a new host.

	RHEV-H without the complimentary vdsm fix will not be able to
	register if installed on BIOS that does not support UUID, as it will
	not generate logical UUID before registration.

	If BIOS contains duplicate UUID, manual intervention should apply,
	creating /etc/vdsm/vdsm.id manually.

2012-09-30  Yeela Kaplan  <ykaplan@redhat.com>

	Refresh storage in getDevicesVisibility using forceIScsiRescan
	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=766281

2012-09-30  Federico Simoncelli  <fsimonce@redhat.com>

	domain: releaseHostId only when the domain is present
	In this patch:
	* do not release releaseHostId if the domain is missing
	* improve the checks for produce() and isIsoDomain()

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=854953

	setup: configure selinux for sanlock on nfs

2012-09-29  Peter V. Saveliev  <peet@redhat.com>

	BZ#855922, fix attribute error during migration
	VM migration rhev-3.0 -> rhev-3.1 raises AttributeError
	because of setting read-only attribute blockDev on Device
	object. So, here we skip read-only properties.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=855922

2012-09-29  Moti Asayag  <masayag@redhat.com>

	vdsm: Use virsh to check if libvirt is up
	The patch replaces libvirt socket file existence check with a check
	using virsh, so there is no need to depend on internal libvirt
	implementation details.

	Bug-Url: https://bugzilla.redhat.com/859483

2012-09-29  Federico Simoncelli  <fsimonce@redhat.com>

	build: improve the gitignore Makefile check

2012-09-28  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: use yum API
	PREVIOUS IMPLEMENTATION

	Use of yum command-line to automate package installation.

	Install package almost one by once, so valid status can be reported to
	master.

	PROBLEMS IN PREVIOUS IMPLEMENTATION

	 - As each package was installed separately, conflicts could not be
	   resolved.

	 - Dependency list should have been maintained, to match dependencies'
	   changes over time.

	 - Alternate packages, or any alternate dependency trees should have
	   been maintained separately.

	 - Each execution of yum recalculate the cache, mirrors and
	   dependencies, this took time.

	 - If another instance is running, yum waits for ever.

	NEW IMPLEMENTATION

	Use the yum python API, use single transaction, only top-level
	components, proper logging.

	This implementation resolves all the issue of previous implementation.

	Also removing the architecture specific package naming.

	PROBLEMS IN NEW IMPLEMENTATION

	As it turns out, the yum API is not exactly pure API, it needs a lot
	more work especially at log interface, as its lazy use of logs and
	direct print of messages to stdout/stderr is not something that is
	expected from an API.

	The new implementation applies workarounds to these issues, for now we
	are good.

	CLEANUP

	As the vdsm-bootstrap package is to be installed on older engines,
	legacy code could not have been removed. The usage of yum from
	deployUtils, and the installation functions from the vds_bootstrap.py
	could have been removed, ~340 lines of code.

2012-09-28  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Apply memoized to getos()
	getos() is called by _getKeyPackages() every time the capabilies
	are queried. For the case of RHEL system, it has to call
	os.path.exists() four times to get the OS name.  So it's worth to
	memory it by the decorator memoized. And it will not change while
	vdsm is running, so it's safe to be cached.

2012-09-27  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Enable balloon controller for MOM by default.
	Since vdsm can support memory balloon tunning now, we should enable
	the balloon controller for MOM by default.

	Use 'yum clean expire-cache' instead of 'yum clean all'
	It's observed that cleaning all yum caches could cause a ssh timeout
	during host installation. 'yum clean expire-cache' is much more light
	weight and 'yum clean all'. If the cache is still valid, nothing
	significant will be deleted.

	This idea is taken from Greg Padgett.

2012-09-27  Federico Simoncelli  <fsimonce@redhat.com>

	Support for the new polkit rules
	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=829884

2012-09-27  Bala.FA  <barumuga@redhat.com>

	glusterHostsList verb returns local hostname as IP address or FQDN
	The verb glusterHostsList executes the 'gluster peer status' command
	to fetch list of servers of the gluster cluster.  However the output
	of this command doesn't include the server on which the command is
	being executed.  For completeness the verb appends current server
	detail to the list given by gluster

	When hostname of the current server is used in the detail, the problem
	with hostname is that what's saved in engine db in the host_name field
	is not necessarily the actual hostname of the host, but whatever user
	entered while adding the host, which could be ip address also.  So
	engine can't rely on the hostname, particularly on compare the list
	returned by the glusterHostsList verb with the list of hosts present
	in engine DB to identify if something has changed because of direct
	cli operations from the gluster cli.

	So this patch enables sending an ip address instead of hostname of the
	current server.  Engine db contains all ip addresses of the server,
	and hence ip address can be used for comparisons.

2012-09-27  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	schema: Fixup command return values
	There still one is not fixuped, so fix it.

2012-09-26  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	generate initramfs on demand in VM creation test
	Fedora is shipped with initramfs, so use it directly. Some other distros
	are shipped with initrd, so generate initramfs on demand.

2012-09-26  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Add vdsm-tool/load_needed_modules.py to .gitignore
	When we're adding a new file (*.py.in) using the macro of autobuild,
	we need put the auto generated file (*.py) to gitignore list. So add
	a task to the 'check-local' target. Both the idea and code are taken
	from Dan Kenigsberg's comments.

2012-09-26  Fernando Granha Jeronimo  <fgranha@linux.vnet.ibm.com>

	Fix vdsm-reg service name
	Due to a problem with the vdsm-reg service name (vdsmd-reg instead of vdsm-reg),
	the service is not enabled after rpm installation.

2012-09-26  Federico Simoncelli  <fsimonce@redhat.com>

	General json schema fixes
	In this patch:
	* add the 'class' typeKind
	* fix the info_return behaviour (now a string)
	* misc fixes in vdsmapi-schema.json

2012-09-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.init: verify if libvirt socket file exists
	Currently, VDSM init script checks if libvirt daemon is up with pgrep command.
	However, libvirt daemon shows up before the socket file be ready.

	This patch will add a new validation (check if the socket file exists) to be used
	with pgrep command.

	Bug-Url: https://bugzilla.redhat.com/859483

2012-09-26  Dan Kenigsberg  <danken@redhat.com>

	vdsmd: await for libvirt with systemd, too.
	Commit bdb9c443b5 added a call to await_libvirt_start_workaround if
	libvirt is restarted by upstart. The same reasoning applies to the case
	where libvirt is start by systemd.

	Bug-Url: https://bugzilla.redhat.com/859483

2012-09-25  Michal Skrivanek  <michal.skrivanek@redhat.com>

	converting some more RH strings to oVirt

2012-09-24  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix BZ#846323 fix.

2012-09-24  Changming Bai  <baichm@linux.vnet.ibm.com>

	make vdsm/storage/storage_exception.py PEP 8 clean

2012-09-24  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	fix dataProgress of migration
	so the dataRemaining is more reasonable to calculate dataProgress
	than dataProcessed.
	Also, we can see that libvirt also use dataRemaining to calculate
	dataProgress in print_job_progress function of virsh-domain.c.

2012-09-24  Juan Hernandez  <juan.hernandez@redhat.com>

	Validate downloaded SSH public key
	During registration the SSH public key of the engine is downloaded,
	but it is not verified in any way. In some situations we can be
	getting garbage from the server, for example when we connect to an
	HTTPS server using the HTTP protocol. That garbage can end up in the
	uthorized_keys file.  This patch changes deployUtils.py so that it
	verifies that what we get looks like a valid SSH public key before
	saving it to the file.

	Bug-Id: https://bugzilla.redhat.com/856167

	Validate downloaded CA certificate
	During installation the CA certificate of the engine is downloaded,
	but it is not verified in any way. In some situations we can be
	getting garbage from the engine, for example when we connect to an
	HTTPS server using the HTTP protocol. That garbage can corrupt a
	previously downloaded CA certificate. This patch changes
	deployUtils.py so that it verifies that what we get is a valid X.509
	certificate before saving it to the file.

	Bug-Id: https://bugzilla.redhat.com/856167

2012-09-24  Saggi Mizrahi  <smizrahi@redhat.com>

	Use the recommended alignment instead of using pagesize
	Page size is the usual recommended alignment but when it isn't using it
	can cause memory corruption.

2012-09-24  Juan Hernandez  <juan.hernandez@redhat.com>

	Add input parameter to _logExec
	This allows the use of _logExec when some text has to be provided in the
	standard input of the executed command.

2012-09-24  Saggi Mizrahi  <smizrahi@redhat.com>

	Add permutation feature to testing framework
	This allows creation of a single test case template that is mutated into
	several actual test cases. This makes testing methods with several
	options that don't change the output much easier.

	For an example check out tests/permutationTests.py.

2012-09-23  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix data passing to process when doing async execution
	There is a mistake in the current file where the stream data is being
	sent to when using `sync=False` is stdout instead of stdin. This makes
	the feature not work.

	Further more, I added flush so that the data is sent before the function
	returns because it's a bit more intuitive.

	Also, add a test to check that this feature works so in the future this
	kind of thing wouldn't occur.

2012-09-23  Doron Fediuck  <dfediuck@redhat.com>

	vdsm: Unifying engine and vdsm commit templates
	As agreed in ovirt's arch mailing-list[1], we'd like the engine's
	commit template and vdsm conventions to agree on BZ referencing.

	This change adds a sample commit message template with a 'Bug-Url:',
	which matches the mentioned agreement. The way to use this sample
	is with: 'git commit -s -F vdsm-commit-template.txt -e'. Usage of
	the template is optional, and meant for convenience only.

	[1] http://lists.ovirt.org/pipermail/arch/2012-September/000838.html

2012-09-23  Igor Lvovsky  <ilvovsky@redhat.com>

	Require a new initscripts-9.03.31-2.el6_3.1
	A new initscript supports VLAN tag on descriptively-named interfaces:
	https://bugzilla.redhat.com/show_bug.cgi?id=854852

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=859109

2012-09-23  Yeela Kaplan  <ykaplan@redhat.com>

	BZ#844180: Change scsi scan to asynchronous
	Defined a minimal time to wait after a scsi rescan in order to
	minimize races between dm being updated and vdsm looking for
	available devices

2012-09-21  Federico Simoncelli  <fsimonce@redhat.com>

	Remove superfluous macros in the specfile
	In this patch:
	* remove the redundant %attr macros for the vdsm hooks
	* set the %defattr ownership to root:root

2012-09-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-upgrade: stop vdsm when complete upgrade
	We should stop vdsm daemon to avoid any additional
	communication with Engine before the upgrade/reboot happens.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=854766

2012-09-20  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec.in: use locale LC_ALL=C
	During VDSM instalation, we verify if SELinux booleans are
	enabled with return of semanage command, output like: "on" or "off".
	These are English words and if the system contains a different
	locale, example pt_BR the validation will fail.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=857556

	This patch will change the locale for English (C) while
	installation VDSM.

2012-09-20  Antoni S. Puimedon  <asegurap@redhat.com>

	Do not propagate top layer interfaces bootproto to the underlying devices.
	When adding an interface to a composed network interface,
	bootproto was incorrectly applied also to the underlying
	network interfaces. This patch corrects it by unsetting the
	slave interfaces bootproto.

	Bug-Id: https://bugzilla.redhat.com/857112

2012-09-19  Yaniv Bronhaim  <ybronhei@redhat.com>

	stressCheckTest fails because it passes the rlimit
	We tried to use 75 precent of rlimit, but most of the time the os is
	already uses more then 25 precent and the test creates more threads than
	the os can.
	This patch changes it to 50% of rlimit.

2012-09-19  Federico Simoncelli  <fsimonce@redhat.com>

	Fix the prepareForShutdown XML-RPC call

2012-09-18  Dan Kenigsberg  <danken@redhat.com>

	caps.osversion: use @memoized instead of reimplementing it

2012-09-18  Juan Hernandez  <juan.hernandez@redhat.com>

	BZ#856167 - Parse correctly the management_server parameter
	When doing automatic installations we parse the management_server
	parameter to find the engine address and port number, but we don't
	parse it correctly if the port number is missing, in this case we end
	up using the address as both address and port number. This patch fixes
	that so when the port number is missing the default 443 will be used.

2012-09-18  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	faqemu: remove the fake /dev/kvm after vdsmd stops
	/usr/libexec/vdsm/vdsm-faqemu, the fake emulator, will create a fake
	/dev/kvm before it starts a real emulator. This fake device is for
	cheating libvirtd. This fake /dev/kvm is not deleted automatically after
	vdsmd stops. If we want to switch to real KVM support then, the fake
	device will prevent the system creating the real device, thus makes the
	user very confused about the error. This patch detects and deletes the
	fake /dev/kvm after vdsmd stops whenever faqemu is enabled or not in the
	vdsmd.conf.

2012-09-18  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	pep8 clean for vdsm/vdsm

2012-09-18  Dan Kenigsberg  <danken@redhat.com>

	pep8ize vdsm/vdsm entry point

2012-09-17  Antoni S. Puimedon  <asegurap@redhat.com>

	Fix crash when libvirt refers to non-existing non-bridged interfaces.
	This fix catches the crash resulting of checking information in sysfs of a
	non-existing network reported by libvirt.

	Bug-Id: https://bugzilla.redhat.com/856163

2012-09-17  Laszlo Hornyak  <lhornyak@redhat.com>

	removing cpuIdle
	cpuIdle is not used by the engine, and it is wrong anyway

2012-09-15  Amador Pahim  <apahim@redhat.com>

	vdsm.spec.in: Requires: python-libguestfs
	Solving vdsm_hooks/fileinject/before_vm_start.py
	"import guestfs" dependency.

2012-09-14  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Make netinfo.py PEP8 clean

2012-09-14  Douglas Schilling Landgraf  <dougsland@redhat.com>

	setNetworking(): return bridge status
	if the bridge for some reason is not created we should warn users
	in the oVirt Engine. Otherwise, it will continue and complete the bootstrap,
	reboot the Host and oVirt Engine willreport the Node as Non Responsive
	without any additional info.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=840300

2012-09-13  Pradipta Kr. Banerjee  <bpradip@in.ibm.com>

	Modify getOSVersion to use python 'platform' module
	Modify getOSVersion function to use the python 'platform'
	module instead of custom file parsing logic

2012-09-13  Federico Simoncelli  <fsimonce@redhat.com>

	Add the autotools support in the spec file
	This change makes easier for rpm-based distributions to backport patches
	that touch the autotools files.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=847535

	Fix the rpm package discovery process in vdsm caps
	If the rpm package isn't found it shouldn't be added to the packages
	dictionary.

2012-09-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#846323 - Adding deprecated to removeVG().
	removeVG() interface will be removed.
	Use formatStorageDomain() instead.

	BZ#846323 - Search PV's belonging to the VG in removeVG.
	Use only one lvm operation when removing a VG.
	Using more than one is racy.
	In addition avoid the use of getAllPvs() which will be removed
	in the future.
	Only one getAllPvs() call remains!

2012-09-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	engine.py: fail if Password doesn't match
	Currently, if users in the Node TUI add the password to include the
	node through Engine and passwords doesn't match, no failure
	message will show and it will continue.

	This patch will show to users a failure message if the passwords
	doesn't match.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=854457

	Test:

	  * Install Node
	  * Select oVirt Engine Tab
	  * Add passwords that doesn't match and click 'Apply'

	vdsm-reg-setup: get hostname with gethostname()
	Previously we relied upon the fallback behavior of socket.getfqdn()[1] which returned
	the hostname only in the case that it could not find an entry or alias with a dot.
	In ovirt-node if the user sets a new hostname, this adds an alias to /etc/hosts
	that maps to localhost.local domain and leads to engine not listing the
	user-requested hostname. The fix is to not use getfqdn(), but gethostname().

	Test
	=====
	* Install oVirt Node 2.5.1-1.0
	* Set Network (default it will be localhost.localdomain)
	* Select Network again, and change Hostname (supernode.linux.com)
	* Register the Node into Engine
	- At this moment, Engine will show localhost.localdomain instead of supernode.linux.com

	The manual workaround is remove the new hostname from /etc/hosts in 127.0.0.1 entry.

	[1] http://docs.python.org/dev/library/socket.html

2012-09-12  Ryan Harper  <ryanh@us.ibm.com>

	Chown /var/log/vdsm during startup to prevent vdsmd crash
	Bug-Id: https://bugzilla.redhat.com/729348

	vdsmd startup routine will handle re-creating /var/log/vdsm
	but doesn't chown it with vdsm.kvm which prevents vdsmd from
	operating.

	Fix this by chowning the parent dir during startup.

2012-09-12  Shu Ming  <shuming@linux.vnet.ibm.com>

	Make connections path depend on path definitions
	The connections path should be relative to the path definition
	in constants.py

2012-09-12  Ryan Harper  <ryanh@us.ibm.com>

	Replace 'ovirt Engine' string with @ENGINENAME@
	Commit fd1c00c6fdbd8207a631001eab106e6f78c0cca2 introduced some new
	messages but didn't use the @ENGINENAME@ eyecatcher.

2012-09-12  Federico Simoncelli  <fsimonce@redhat.com>

	Fix the check to convert block domains V0 to tag metadata
	In this patch:
	* fix the check to decide if we should upgrade to tag metadata
	* make __convertDomainMetadataToTags safer
	* add logging messages to __convertDomainMetadataToTags

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=853910

2012-09-11  Federico Simoncelli  <fsimonce@redhat.com>

	Bump sanlock required version for EL6
	The new sanlock version (2.3-4) resolves: rhbz#849181 rhbz#849183
	rhbz#849184 rhbz#849186.

	Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=854748

2012-09-11  jarod.w  <work.iec23801@gmail.com>

	vdsm: replace rpm commandline with rpm-python api in caps.py
	In rpm-python library, it provides the way to get rpm information by
	rpm name and specified files. I think it's better and more effective
	to use the library than our Popen.

2012-09-11  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	add simple VM creation functional test
	Create a VM using existing host kernel and initramfs, then destroy it.

	Patch set 6:
	rebase the test on Dan's http://gerrit.ovirt.org/#/c/5788/ and add
	some utility functions

	Patch set 9:
	check if user is root
	check if kvm is enabled

2012-09-11  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ829710 Get VMList with oop if necessary

2012-09-11  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Trigger reboot automatically after upgrade
	Depends on related change http://gerrit.ovirt.org/7777
	This patch will trigger an reboot after the upgrade steps are complete

	Original Author: Mike Burns <mburns@redhat.com>

2012-09-10  Bala.FA  <barumuga@redhat.com>

	glusterHostsList verb uses gluster cli xml output.
	This eliminates standard output text parsing.

2012-09-10  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	remove the broken support for delivering video to local display
	In vdsClient help message and sample VM configurations, it is said when
	display is set to local, the VM video will go to local host. In fact
	vdsm do not implement this. If the user use this feature, vdsm will
	raise an exception in function getConfVideo() in vdsm/vm.py.

	To implement this feature, we have to
	1. deal with 'local' properly in getConfVideo() in vdsm/vm.py, add a
	suitable video device when 'local' is set.
	2. generate graphic discription XML node properly in vdsm libvirtvm.py,
	like <graphics type="sdl" display=":0" xauth="blah">. Now we always
	generate some attributes not related to SDL, and libvirt will complain.
	We have to suppress generating those attributes when using local
	display.
	3. If we allocate a host display for the user qemu, then qemu can use sdl
	to show the display in its own host display.
	4. If we do not want to allocate a display for qemu, we have to use an
	existing one, then we have to deal with the $DISPLAY(:0 ?) and
	$XAUTHORITY. These two attributes can be set in the libvirt XML in the
	graphics section
	5. We often setup hosts without X support, it is not possible to
	deliver the guest video to host display. In this situation, detect the
	host X support and raises an exception properly to the user to describe
	what's wrong.

	If we are not going to do the work as written above, we'd better remove
	the broken support for local display.

2012-09-09  Antoni S. Puimedon  <asegurap@redhat.com>

	Add network logs for VDSM network commands and file operations.
	The aim is expanding the logging done in configNetwork. In order to do so, it
	uses vdsm.storage.misc.execCmd.

	Bug-Id: https://bugzilla.redhat.com/851839

2012-09-09  Dan Kenigsberg  <danken@redhat.com>

	vdsm-tool/load_needed_modules: fix creation of legacy bonds
	Fix commit 816238891be which has failed to open MASTER_FILE for writing
	before wrting to it.

2012-09-09  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: perform reboot asynchronously
	The use of /sbin/reboot may cause reboot to be performed at the middle
	of script execution.

	Reboot should be delayed in background so that script will have a fair
	chance to terminate properly.

2012-09-09  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#815359 - Improve log on qemu-convert error.

2012-09-09  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Make vdsm/configNetwork.py PEP8 clean

2012-09-09  Igor Lvovsky  <ilvovsky@redhat.com>

	Set right MTU when removing bridgeless networks
	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=854919

	Continue support nicless bridge.
	In general we can define bridge without connect it to any interface (nic/bond).
	This behaviour was broken mistakenly in previous commits, fixed now.

	Change getVlansForNic to more general getVlansForIface

	Update MTU when removing one of networks with custom MTU from NIC/bond.
	We need to restart the interface to set proper MTU on it.
	The whole point of this patch to get 'iface' defined for both VLANed and
	non-VLANed networks. In such case we will be able to restart the interface
	for both above cases

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=853968

2012-09-08  Bala.FA  <barumuga@redhat.com>

	Added _execGlusterXml()
	This function helps to run gluster command which outputs in xml.

2012-09-06  Adam Litke  <agl@us.ibm.com>

	build: Use correct equality operator for /bin/test
	According to the man page for 'test', the correct token to use for string
	equality is '=', not '=='.  '==' works for the bash builtin version but we
	should not depend on it (especially since the pkg-version shebang calls for
	/bin/sh).  This fixes the build on my Ubuntu system.

2012-09-06  Dan Kenigsberg  <danken@redhat.com>

	make pep8 happy with config.py.in

	vdsmd: set nwfilter on ovirt-node
	ovirt-node is shipped with .pyc only. Do not try running a missing
	executable.

2012-09-06  Adam Litke  <agl@us.ibm.com>

	schema: Fixup command return values
	Commands return a single unnamed typed item.  Fix the schema to reflect this.
	Some vdsm commands return multiple keys in the result dictionary and those keys
	need to be combined into a new type representing the complete return value.

	schema: Add StorageDomainStatsMap map type
	API.getStorageRepoStats refers to an undefined mapping type.  Add it.

	schema: Add class constructors to the schema
	All classes will accept parameters when they are instantiated.  Record the
	parameters in the schema.

	schema: Rename Global class to Host
	The Host class is the root of the API.  It will have functions to connect and
	disconnect from the server.  It will also have all of the commands that used to
	be defined as 'Global' since it doesn't make sense to sub-class them.

2012-09-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec: Adding hostname as Require
	vdsm-gencerts.sh requires hostname

2012-09-06  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Move load_needed_modules to vdsm-tool
	Move load_needed_modules to vdsm-tool from vdsmd.init

2012-09-05  Dan Kenigsberg  <danken@redhat.com>

	Drop stale import
	Issue introduced by my former patch. Life is harder without Robert's
	per-patch autobuilding... Sorry for the noise.

	fileSD.getDomUuidFromMetafilePath: return correct sdUUID
	Since commit 7ce1a3d53, getDomUuidFromMetafilePath() returns a constant
	string "dom_md", regardless of the storage domain metafile it receives.

	This has serious effects, since it leads to all NFS domains using a
	single process pool.

	It would probably be better to solve the problem by avoiding
	getDomUuidFromMetafilePath altogether. The callers high up the stack
	know the sdUUID they are working on. This solution is left as an
	excersice to the readers.

	A simpler, localized, solution is to take the correct element out of
	metafile path. In this patch I suggest to do it without worrying about
	trailing slashes in the [irs]repository configurable.

	Thanks to Shu Ming for reporting this bug and suggesting another fix for
	it.

2012-09-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	Correct pep8 error- too long line

2012-09-05  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	Remove imageID in diskstats collect
	imageID is only available for vdsm created images, direct lun and iso
	stats can't be collected because of lack of this imageID.
	so remove it when collecting.

2012-09-05  Yaniv Bronhaim  <ybronhei@redhat.com>

	changed upstart_libvirt function name

2012-09-05  Zhu Bo  <bozhu@linux.vnet.ibm.com>

	Correct vdsClient's help for the verb getVmsInfo
	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=727791

	replace the help with the following:
	getVmsInfo <spUUID> [<sdUUID> [vmList](vmId1,vmId2,...)]

2012-09-04  Federico Simoncelli  <fsimonce@redhat.com>

	Update the lvm rules permissions with sanlock
	The MODE keyword in the lvm rules wasn't used by udev. However a newer
	version shipped with Fedora 17 is considering its value.
	The MODE and the GROUP values should be updated to allow sanlock to
	access the ids and the leases LVs.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=850440

2012-09-04  Shu Ming  <shuming@linux.vnet.ibm.com>

	Make svdsm files depend on path definitions
	The files created by super vdsm process should
	be put into a path relative to the path definition
	in constants.py

2012-09-04  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	Remove vdsm-restore-net-config from ignore list
	As commit 49999d16 remove vdsm-restore-net-config.in and add the python file,
	remove from ignore list to track it.

2012-09-04  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: eliminate extra new line at ~/.ssh/authorized_keys
	In the past engine created ssh public keys without the terminating
	newline. Now it was fixed.

	Make sure result file contains newline for all keys.

2012-09-03  Eduardo Warszawski  <ewarszaw@redhat.com>

	Produce the domain in the domain monitor thread
	This should reduce the number of vgs in connectStoragePool thread.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=846376

2012-09-03  Federico Simoncelli  <fsimonce@redhat.com>

	Asynchronous LVM bootstrap on vdsm start
	The lvm bootstrap might take a long time if one or more block device is
	unreachable. Moving the bootstrap in the storageRefresh thread speeds up
	the vdsm initialization and its responsiveness.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=752470

2012-09-03  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	tests: Honour PYTHONPATH if set on the host
	run_tests_local.sh doesn't honour PYTHONPATH if it was set.
	This causes issues with the tests (sometimes) if user was using
	a custom path for say libvirt ( running from a git src, rather
	than installed rpm path). This path add $PYTHONPATH to the
	script to fix the issue.

2012-09-03  Moti Asayag  <masayag@redhat.com>

	Define network filter on libvirt
	The patch defines custom network filter on libvirt in order to control
	the VM traffic. The custom filter is being set when VDSM service is
	being started.

2012-09-03  Federico Simoncelli  <fsimonce@redhat.com>

	Upgrade a data domain on attachSD when required
	It is now possible to attach a storage domain with a version that is
	older than the pool master domain. The upgrade will be started as soon
	as the domain will be activated.

	Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=851518
	Change-ID: I65dfd6dd339569fbaf276f3942a001c174423b1a

2012-09-03  lvroyce  <lvroyce@linux.vnet.ibm.com>

	using blockStatsFlags to collect disk latency instead of qemu cmd
	in libvirtvm.py using blockStatsFlags to collect disk latency
	instead of qemu cmd to avoid keyError and parse results our own

2012-09-03  Dan Kenigsberg  <danken@redhat.com>

	tests rpm: make non-local tests run
	We should ship vdsm-tests.rpm with all its required files.

	spec: declare mkimageTests' requirement of genisoimage

2012-09-02  Dan Kenigsberg  <danken@redhat.com>

	libvirtvm: (un)setPortMirroring when hot(un)plugging
	Bug-Id: https://bugzilla.redhat.com/848101

2012-09-02  Igor Lvovsky  <ilvovsky@redhat.com>

	Remove BRIDGE line from nic/bond cofig file when removing bridge
	Bug-Id: https://bugzilla.redhat.com/845193

2012-09-02  Dan Kenigsberg  <danken@redhat.com>

	tc: _delTarget: fix an evil type error
	In a former commit 9adf78d9 I thought that returning _delTarget()
	returning a set() would be a good idea. It was swiftly converted to
	list() in commit 61f1ff45, forgetting this line behind.

2012-09-02  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: sync utils.getHostUUID() with deployUtil.getHostID()
	Apparently, the host id is gotten in three different places:
	1. Engine VdsInstaller::ConfigValues.BootstrapNodeIDCommand
	2. deployUtil.getHostID()
	3. utils.getHostUUID()

	Change-Id Iae0713f95 did not handle (3).

2012-09-02  Dan Kenigsberg  <danken@redhat.com>

	tc: avoid adding non-existing devices to filter
	When a mirroring target dies, its tap device are removed. On `tc filter
	show`, the tap device name is replaced with a string like `if17`, which
	is not a name of an existing device.

	This patch is somewhat racy, as another qemu may die just before the new
	filter is set.

	tc: unsetPortMirroring: deleting a target twice is fine
	We should not explode if a mirroring target is already gone when
	unsetPortMirroring is called.

2012-08-31  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove redundant indirection for getting vm status

2012-08-31  Yaniv Bronhaim  <ybronhei@redhat.com>

	vdsmd always restarts libvirtd upon start-up
	Bug-Id: https://bugzilla.redhat.com/734847

	When starting vdsm we need to verify that libvirt is running by
	upstart and not by SysV. When processing start() we stop libvirtd
	service only if upstart exists and not configured.

2012-08-31  Dan Kenigsberg  <danken@redhat.com>

	momTest: improve test's error reports
	The test is skipped if MOM is not installed on host.
	Also, the returned value of the setMOMPolicy call is checked.

	MOMTest.testKSM still fails on my host, but at least I can tell when in
	the test process it has happened.

	Add a basic xmlrpc functional test

2012-08-30  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	fix TypeError of _eqSplit in vdsClient.py
	if the arg is string 'xyz', the _eqSplit will into the 'else'
	branch. and then k = ['xyz']. but list type can not be a hash key.
	TypeError will come up.

	throw a Exception to report this case, it is more clear what has
	happended.

2012-08-30  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: survive missing ntpq
	Minimal fedora installation does not have ntpq.

	bootstrap: node id: consider bonding MAC addresses as well
	The node id is constructed using the lowest MAC address.

	If bonding is applied after initial node id was taken, it may shade the
	minimal address.

	This change adds to the MAC addresses of bonding interfaces to the MAC
	address addresses to consider.

	Sync with engine command used for same purpose.

2012-08-30  Federico Simoncelli  <fsimonce@redhat.com>

	Check if libvirtd.upstart is present before copying
	If the (libvirt) packaged upstart script is present in the rpm list
	of files but is absent from the filesystem the initscript was failing
	because the cp command couldn't copy it. This is mostly interesting
	in stripped down installations as the ovirt-node.

	RHBZ: 849984

2012-08-29  Dan Kenigsberg  <danken@redhat.com>

	configNet: grant proper selinux context to ifcfg-*
	Currently, Vdsm-created ifcfg files receive the context
	unconfined_u:object_r:net_conf_t:s0 instead of the one mandated by
	selinux policy.

	 # restorecon -vF /etc/sysconfig/network-scripts/ifcfg-eth3.160
	 restorecon reset /etc/sysconfig/network-scripts/ifcfg-eth3.160 context unconfined_u:object_r:net_conf_t:s0->system_u:object_r:net_conf_t:s0

	This may lead to unpleasant EPERMs down the road.

	Bug-Id: https://bugzilla.redhat.com/838347

	libvirtvm: allow acpi again
	Commit c3e2272f has mistakenly changed

	        <features>
	                <acpi/>
	        </features>

	into

	        <features>
	                acpi
	        </features>

	which caused VMs to start up silently with no acpi support. This patch
	reverts the offending part of the above commit.

	Bug initially reported by Itzik Brown.

2012-08-29  Federico Simoncelli  <fsimonce@redhat.com>

	Bump libvirt required version for EL6
	The version bump is required to avoid the libvirt error "Shareable
	leases are not supported" when starting a VM (rhbz838819).

2012-08-29  Dan Kenigsberg  <danken@redhat.com>

	tc: Give a clearer name to qdisc_get_devid
	While at it, extend the function to return all associated qdiscs per
	device.

	tcTests: test port-mirroring while another device is watching

	tc: add to PEP8_WHITELIST

	tc: refine unsetPortMirroring
	unsetPortMirroring should not remove all reference of the mirrored
	bridge device. Instead, remove only the relevant mirred actions on each
	call to unsetPortMirroring. Promiscuous mode should be unset only when
	the last action is removed.

2012-08-28  Moti Asayag  <masayag@redhat.com>

	Libvirt service engagement workaround
	The patch intended to bypass a false report of libvirt service as
	started (when started with initctl). Instead of relying on initctl,
	vdsm awaits few seconds till the service is reported with its allocated
	process id (by 'pgrep').

2012-08-28  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	Make vdsm/storage/fileSD.py pep8 clean

2012-08-28  Gal Hammer  <ghammer@redhat.com>

	Change waitForMigrationDestinationPrepare function waiting.
	The change is to avoid timeouts during migration of several
	VMs at once. The new implementation doesn't start the timer
	until the VM starts it creation (e.g. acquired the
	_ongoingCreations lock).

2012-08-27  Oved Ourfali  <oourfali@redhat.com>

	improve message when trying to attach import domain with wrong permissions
	When a storage domain is attached, and there is something wrong with the
	directory permissions, then the operation fails with "Cannot obtain
	lock" error. This patch improves the error in this case, by performing
	validations when doing the server connection. If the permission
	validation fails, we disconnect.

	The user will get an event specifying the permissions error.
	And, he will get a UI error saying:
	"There is no storage domain under the specified path. Please check
	path."

	This fix also applies to posix and local storage.

	Bug-Id: BZ#842146

2012-08-27  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	add server_once for CrabRPCServer
	server_once is convenient for integrating CrabRPCServer into
	the event loop of other program.

	example: I want to use CrabRPC in consoleServer, but console have
	loop in its code. It can join read side of pipe into select(). After
	select() return, we can call server_once() for processing rpc
	message.

2012-08-27  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#846312 - Keep max MTU when adding non-VLANed bridgeless network

2012-08-26  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#846312 - Keep MTU on ehtX after bond editing, when ethX part of this bond

2012-08-26  Dan Kenigsberg  <danken@redhat.com>

	configNet: introduce ConfigWriter.restorePersistentBackup()
	restorePersistentBackup is to be called before vdsm starts, via
	vdsm-restore-net-config, to load persistent backup into memory, make
	them effective again, and remove the backup.

	This patch makes a single function out of this in order to fix the
	currently-broken testPersistentBackup test case.

2012-08-24  Adam Litke  <agl@us.ibm.com>

	API: Provide a working getAllTasks API
	Changes since last iteration:
	- Dropped 'tags' filtering from the API.  Users can do client-side filtering as
	  they see fit.

	The current APIs for retrieving all task information do not actually return all
	task information.  I would like to introduce a new API that corrects this and
	other issues with the current API while preserving backwards compatibility with
	ovirt-engine for as long as is necessary.

	The current APIs:

	getAllTasksInfo(spUUID=None, options = None):
	 - Returns a dictionary that maps a task UUID to a task verb.
	 - Despite having 'all' in the name, this API only returns tasks that have an
	   'spm' tag.
	 - This call returns only one piece of information for each task.
	 - The spUUID parameter is deprecated and ignored.

	getAllTasksStatuses(spUUID=None, options = None):
	 - Returns a dictionary of task status information.
	 - Despite having 'all' in the name, this API only returns tasks that have an
	   'spm' tag.
	 - The spUUID parameter is deprecated and ignored.

	I propose the following new API:

	getAllTasks(options=None):
	 - Returns a dictionary of task information.  The info from both of the above
	   functions would be merged into a single result set.
	 - The spUUID parameter is dropped.  options is for future extension and is
	   currently not used.

	This new API includes all functionality that is available in the old calls.  In
	the future, ovirt-engine could switch to this API and preserve the current
	semantics by ignoring tasks where task['tag'] != 'spm'.  Meanwhile, API users
	that really want all tasks (gluster and the REST API) can get what they need.

2012-08-24  Federico Simoncelli  <fsimonce@redhat.com>

	Ship the version file with the tarballs
	Shipping the VERSION file allows running the autoreconf tool also from a
	tarball package (no need of the entire git repository).

	In this patch:
	* generate and ship the VERSION file
	* move, unify (and ship) version.sh and release.sh in pkg-version
	* use the VERSION file when the git repository is not available
	  (eg: tarball)

2012-08-24  Mark Wu  <wudxw@linux.vnet.ibm.com>

	make vdsm/libvirtvm.py PEP 8 clean

2012-08-23  Saggi Mizrahi  <smizrahi@redhat.com>

	Sort the pep8 whitelist list

2012-08-23  Dan Kenigsberg  <danken@redhat.com>

	tc: rename qdisc_replace_prio()
	This funciton replaces a PRIO qdisc. Let us call it accordingly

	tc: silently ignore ingress qdisc re-creation
	We should allow starting up two VMs monitoring a single bridge.

2012-08-23  Antoni S. Puimedon  <asegurap@redhat.com>

	tc: Fix make rpm for filter tests.

2012-08-23  Dan Kenigsberg  <danken@redhat.com>

	tc: make TCException more accessible programmatically

	tc: list some information about filters
	`tc filter show dev <dev> parent <parent>` lists all information about
	currently-defined tc filters for <dev> and <parent>.

	This patch extracts very little information about each filter that we
	recognize.

2012-08-23  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-upgrade: use python scripts from ovirtnode
	Replace /usr/libexec/ovirt-config-boot call from deployUtil._logExec
	to the newer python scripts from ovirtnode.

	Tested:

	* Installed ovirt-node 2.5.0-2.0 (upgrading to: 2.5.1-1.0)
	* mkdir /data/updates
	* Copied 2.5 image to /data/updates/ovirt-node-image.iso
	* mount -o loop /data/updates/ovirt-node-image.iso /live
	* Update in /etc/vdsm-reg/vdsm-reg.conf upgrade_mount_point=/live
	* service vdsm-reg restart
	* /usr/share/vdsm-reg/vdsm-upgrade
	* reboot

2012-08-23  Federico Simoncelli  <fsimonce@redhat.com>

	Use quiesce only if qgaEnable is enabled
	Do not attempt to use the quiesce live snapshot flag if the guest agent
	channel is not present.

2012-08-23  Igor Lvovsky  <ilvovsky@redhat.com>

	configNetwork: use MTU as int in setNewMtu

	Restore previous MTU on bond when VLAN with bigger MTU removed

	BZ#846004 - IP on nic/bond should be preserved when VLAN added

2012-08-22  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#833084 Set StoragePool.id to SPM_ID_FREE by default
	Setting the storage pool id to SPM_ID_FREE (-1) would prevent mistakes
	that could lead None to appear in the metadata.
	In this patch:
	* replace the storage pool id value None with SPM_ID_FREE
	* replace the storage pool lver value None with LVER_INVALID
	* validate the hostId in reconstructMaster

2012-08-22  Mark Wu  <wudxw@linux.vnet.ibm.com>

	test: Add tests for _validateInterNetworkCompatibility()

2012-08-22  Moti Asayag  <masayag@redhat.com>

	BZ#811807 Enable network filtering
	The VM network interface might receive a rule/filter to control the
	VM traffic by using libvirt network filtering.

	A vnic might get a single filter. In order to provide a filter which
	isn't delivered by libvirt, a custom filter should be defined. Once the
	filter is defined, its name could be used by the vnic to control its
	traffic.

2012-08-22  Dan Kenigsberg  <danken@redhat.com>

	netConfig: translate to "new" option names from cmdline, too
	At some point in prehistoric past a former Vdsm developer decided to change the names of
	various networking options. IPADDR had become ipaddr; BONDING_OPTS had
	become bondingOptions; etc. We continued to support older-style names -
	which are used up to this very day by ovirt-engine. Translation is done
	by API.Global._translateOptionsToNew for each network API call.

	However, we forgot to perform this translation when the network
	configuration functions are called via the /usr/share/vdsm/addNetwork
	script during bootstrap/registration.

	This lacuna leads to IPADDR being written to configuration file
	uncontrolably. This patch fixes the issue in the simplest quickest form
	I could think of.

	Bug-Id: BZ#847733 failure to create rhevm network over pre-configured VLAN

2012-08-21  Alon Bar-Lev  <alonbl@redhat.com>

	BZ#849542 bootstrap: set system time as soon as possible
	CURRENT BEHAVIOR

	Set system time after installation.

	NEW BEHAVIOR

	Set system time at first stage. This makes the time difference between
	engine and host set to minimum.

2012-08-21  shu ming  <shuming@linux.vnet.ibm.com>

	Use setattr instead of __dict__
	It is bad to access the __dict__ directly

2012-08-21  Ryan Harper  <ryanh@us.ibm.com>

	Fix vdsm-faqemu VM launch failure on hosts with newer libvirt
	Since January 2012, libvirt now checks[1] for the presence of /dev/kvm before
	starting a VM to generate better error messages when a VM doesn't start.
	This breaks faqemu running in a VM (non-nested) or a host which doesn't have KVM
	modules loaded.  Work around this by touching the device node.

	v1->v2
	    - replace exec of touch with open+write+close

	1. libvirt commit hash 32f63e912d3bef42a7fa70a0f2d5b04b98afe936

2012-08-21  Yaniv Bronhaim  <ybronhei@redhat.com>

	BZ#842115 - Generating uuid for libvirt configuration
	During migration we found that if both hosts as the same uuid
	libvirt fails the migration. Sometimes hosts are shipped with
	non-unique uuid burned into their bios.
	This fix generate uniqe uuid for libvirt only during vdsm reconfiguration.
	This uuid is saved in libvirtd.conf file and is used after
	libvirt service is restarted.

2012-08-21  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove 'skipLibvirt' from NetworkOptions
	The option 'skipLibvirt' was removed in commit ccb07ae. So it should
	be removed from schema too.

2012-08-20  Moti Asayag  <masayag@redhat.com>

	Add eclipse and PyDev project files to .gitignore
	PyDev as eclipse plugin is commonly used for developing python under
	eclipse IDE. It produces several files that could be ignored:
	.project - produced by eclipse to describe the project
	.pydevproject - produced vy PyDev plugin.

2012-08-20  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#848299 - Fix delete VLANed network with custom MTU

2012-08-19  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix a race existing in the singleton interface of clientIF
	There's a race in getInstance() between clientIF initialization and MOM thread.
	If for some reason the initialization of clientIF is slowed down and not finished
	before MOM calls vdsm API, an exception will happen in MOM thread due to that
	the parameter 'log' is missing. The fix is just moving the parameter check into
	the protection of the singleton lock. Then MOM thread will be blocked if it tries
	to access vdsm API when the initialization of clientIF is ongoing.

2012-08-19  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: return proper exit code from bootstrap scripts
	This is quick and dirty solution to return valid exit code from
	bootstrap scripts, until now exit code of vds_bootstrap* was wrong,
	however the vds_bootstrap.py did not check for exit code at all, and...
	engine did not as well.

	Now engine checks return code so proper code is requried.

	bootstrap: send complete bootstrap from engine
	CURRENT BEHAVIOR

	vds_installer.py is part of ovirt-engine, upon bootstrap, the script is
	sent to the node using ssh.

	Then vds_installer.py pulls vds-bootstrap* files using HTTP from
	engine.

	The vds_installer.py and vds_bootstrap pulls ssh public key from engine
	using HTTP.

	NEW BEHAVIOR

	vds_installer.py was moved into the vdsm-bootstrap and renamed to setup.

	vdsm-bootstrap repository was updated to create directory per bootstrap
	interface with 'setup' script.

	ovirt-engine copies public key to node in similar way of firewall rules.

	At bootstrap time, engine create tar archive from the bootstrap
	directory, cache it and pipe the archive into node in order to extract
	it and run the setup script.

	No HTTP communication is needed.

	No conflict with existing files.

	BACKWARD COMPATIBILITY

	Leave vds_bootstrap.py, vds_bootstrap_complete.py, deployUtil.py to be
	used by older engines. This should be removed in future.

	SCRIPTS MODIFICATIONS

	Set umask 0077 so only running user can access files.

	bootstrap: remove temporary files even if some missing
	Current code simply skip the whole process if one temporary file is
	missing.

	We need to remove as much temporary files as possible, so ignore single
	file exception.

	BZ#849315 vdsm-reg: return proper exit code from upgrade script
	main returns boolean, while exit code of "True" is actually program
	status of failure.

2012-08-19  Antoni S. Puimedon  <asegurap@redhat.com>

	BZ#840594 Fix netinfo when libvirt bridge does not exist.
	In the case where a bridge that is configured in libvirt is manually removed or
	renamed, netinfo throws an exception when trying to discover which ports are
	assigned to the bridge.

	This patch catches the OSError exception of trying to list the ports of a non-
	existing bridge interface, effectively filtering the non-existing interface
	from the network capabilities.

	Also adds a unittest for getting network information of non-existing bridges.

2012-08-19  Saggi Mizrahi  <smizrahi@redhat.com>

	Skip broken tests feature
	We can't have broken tests upstream, it confuses people who write
	patches and makes them think they broke the functionality.

	Add this to tests you know are broken to help others

2012-08-19  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#832765 - Rewrite vdsm-restore-net-config as python module

2012-08-18  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: introduce bootstrap interface version
	Bootstrap interface version is a method of supporting multiple engine
	versions within bootstrap code.

	The vdsm-bootstrap code is separate package which can be upgraded
	without engine upgrade. Engine is also upgrade protected, so force
	update upon vdsm-bootstrap upgrade is difficult.

	As the vdsm-bootstrap is separate package from engine, but depends
	heavily on engine interaction, and since it may be updated, it should
	support backward compatibility with different versions of engines.

	If changes are relatively small, a bootstrap interface version may come
	in handy so no script duplication is required.

2012-08-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#840294: Add sanlock packages to REQ_PACK list
	Adding sanlock and sanlock-python to vds_bootstrap required packages list.
	In case these packages are not available to install do not
	show long error message in Engine.

2012-08-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Add genisoimage to rpm dependencies
	vdsm/mkimage.py is using mkisofs, this command is provided by
	genisoimage.

2012-08-16  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: always use /tmp for output files
	Engine sends and collects files from /tmp. /tmp is *ALWAYS* used from
	node or from none-node installations.

	While bootstrap code uses the following directory:
	 tempfile.gettempdir()

	This is invalid as there is no sync between engine and bootstrap code,
	because if TMPDIR environment variable is defined at computer where
	bootstrap is running on, files will go to whatever value in TMPDIR
	and not /tmp, hence failing the bootstrap process.

	This is a BUG in current code, it is not a feature.

	This change remove this in favor of plain /tmp usage for files, it
	does not imply that the bootstrap scripts are executed at /tmp, only
	that the input and output files are stored where engine collects them.

	This change is NOT a regression as it work in more scenarios than
	current implementation using current engine implementation.

	/tmp is mandatory in FHS[1] and in POSIX,p2 systems, all Linux
	distributions comply with this.

	 ---
	 The /tmp directory must be made available for programs that require
	 temporary files.
	 Programs must not assume that any files or directories in /tmp are

	 preserved between invocations of the
	 program.
	 ---

	FUTURE

	If the need manifests, engine can ask destination where to place bootstrap
	script wither by using environment (TMPDIR, OVIRT_TMPDIR), or by looking
	at /etc/ file. Bootstrap script may produce certificate request or any
	other output at stdout to allow collection via the ssh session, it also
	may get input via stdin during execution, so no file transfer is required
	during bootstrap except of bootstrap scripts nor several iterations.

	[1] http://www.pathname.com/fhs/

2012-08-16  Dan Kenigsberg  <danken@redhat.com>

	Report host hyperthreads as real cores
	(Only if the customer really wants that)

	Vdsm used to report CPU hyperthreads as if they were real CPU cores.
	This was fixed in 6df2456b2a1. However, there are people out their who
	rely on Vdsm's former behaviour. Let us let them revert to it.

2012-08-15  Mark Wu  <wudxw@linux.vnet.ibm.com>

	schema: Add doc for setMOMPolicy
	The schema defintion for setMOMPolicy was missing from the patch
	which introduced that verb. So add it by this patch.

2012-08-15  Bala.FA  <barumuga@redhat.com>

	glusterHostsList returns host info as list of dictionaries
	Return value looks like
	{'status': {'code': CODE, 'message': MESSAGE},
	'hosts' : [{'hostname': HOSTNAME, 'uuid': UUID,
	            'status': STATE}, ...]}

	As this API is not consumed by engine/RHS-C yet, its OK to differ in
	compatibility issue now.

2012-08-15  Gal Hammer  <ghammer@redhat.com>

	BZ#845994 VM failed to start after file injection.
	The "before_vm_start" hook created a file inside the guest's
	image file using the GuestFS library. The image was not unmounted
	explicitly and this caused libvirt to fail when it tried to read
	the image file.

2012-08-15  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: cleanup file cleanup function
	Use for instead of repeating code.

	bootstrap: sync logging between two phases
	1. Create logs on environ["OVIRT_LOGDIR"] or python tempdir.

	2. Create logs by timestamp and not random.

	3. Sync file name and content format.

2012-08-14  Amador Pahim  <apahim@redhat.com>

	BZ#846604 bootstrap: skip clock sync if ntpd is synced
	During boostrap, host clock is synchronised with
	engine time. If on host ntpd is synced and on engine
	time is not synced, time in host will jump to engine
	time then jump back to ntp time few moments later.
	This patch checks if ntpd is synced in order to
	skip host clock sync with engine time when true.

2012-08-14  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: search own ssh key without base64 suffix
	The '==' is base64 suffix, it may or may not exist based on the key
	size, searching by ' ' and suffix should be sufficient.

	Line end should be part of suffix, as each key is placed within its own
	line.

	configNetworkTests: use context to manage monkey patches
	Easier to manage setup and cleanup at on place, then
	trying to cleanup after a block of code, and catching
	all exceptions.

	Example of use:
	 ---
	from monkeypatch import MonkeyPatch

	@MonkeyPatch(subprocess, 'Popen', lambda x: None)
	@MonkeyPatch(os, 'chown', lambda *x: 0)
	def test():
	    logic

	def test():
	    with MonkeyPatchScope([
	        (subprocess, 'Popen', lambda x: None),
	        (os, 'chown', lambda *x: 0)
	    ]):
	        logic
	 ---

2012-08-14  Igor Lvovsky  <ilvovsky@redhat.com>

	configNetwork: Ignore libvirt exception for network removing
	We need to ignore libvirt exception for removing non-exists network
	during restoreAtomicNetworkBackup

	Restart network service during restore backups

	clientIF:  avoid network backups during _syncLibvirtNetworks
	The target of _syncLibvirtNetworks is synchronize between host networks
	and libvirt's view of it.
	So, there is no reason for backups at this point.

2012-08-14  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	rename xml.dom.minidom.parseString to _domParseStr in libvirtvm
	The old name is too long and is copied everywhere. Using a shorter
	name helps shorten the line length.

2012-08-14  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Add a MOM functional test case for KSM

	Add a VDSM verb to change MOM policy

2012-08-14  Federico Simoncelli  <fsimonce@redhat.com>

	Check the metadata on domain validation
	When VDSM is validating a storage domain is not checking the presence of
	the metadata (eg: a domain could result valid even with a missing or
	empty metadata). This patch introduces an additional check to make sure
	that the metadata is not empty.

2012-08-13  Adam Litke  <agl@us.ibm.com>

	schema: Remove invalid names
	The identifier "type" causes conflicts with the GObject type system.  Type is
	not a great name anyway so choose better names where it occurs.

	The name "StorageDomainClass" conflicts with the GObject class structure for the
	StorageDomain class.  Rename it to StorageDomainImageClass since it identifies
	the class of images stored on the storage domain.

2012-08-13  Dan Kenigsberg  <danken@redhat.com>

	configNet: updateConfigValue: record to backup, do not restore
	restoreAtomicBackup is to be called only by a higher level. There is no
	point in calling it once per down-level failure.

2012-08-13  Royce Lv  <lvroyce@linux.vnet.ibm.com>

	check disk shared flag exist before use it
	The cdrom shared flag is just added by current engine(e548c72ee1d92)
	but not included in release 3.1, making test latest vdsm vm create
	always fail.This patch makes vdsm compatible with the earlier engine version.

2012-08-13  Adam Litke  <agl@us.ibm.com>

	Remove orphaned API: getStorageConnections
	Commit a1cdccdff54af7aea8de49c06d8535079cd78bff which introduced the Storage
	Connections Management API removed an unimplemented API from the HSM but did not
	remove references to that API from API.py and BindingXMLRPC.py.  Finish cleaning
	it up.

2012-08-13  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	Support for QEMU cmdline hook
	This patch adds support for injecting QEMU cmdline via
	VDSM hook. It exploits libvirt's qemu:commandline facility
	available in the qemu xml namespace.

	v2:
	    code refactoring as per dan's comments
	    moved from eval to json.loads
	v3:
	    moved from json dict to json list

2012-08-13  Alon Bar-Lev  <alonbl@redhat.com>

	bootstrap: remove dh key generation
	Before VDSM used libvirt, it configured qemu with spice TLS with
	DH key. Using DH key for TLS/SSL is encouraged, as it detach between
	the encryption and authentication layers.

	qemu supports x509-dh-key-file parameter, libvirt does not use this
	parameter.

	qemu supports x509-dir parameter, within it expects to find pre-defined
	structure of certificate and key material. libvirt does use this
	parameter. However, qemu only looks for ca, crl, cert, key, so even if
	we have DH key, it won't be used.

	Removing DH key generation.

2012-08-13  Federico Simoncelli  <fsimonce@redhat.com>

	Specify the ACPI flag when shutting down VMs
	In commit e460308 has been introduced the qemu guest agent support.
	When such agent channel is present the default shutdown method uses the
	guest agent (which might be missing).
	For consistency and to maintain the old behavior we should specify to
	use ACPI to shutdown the guest.

	Support the quiesce flag during a live snapshot

	BZ#844656 Respawn the domain monitor when needed
	In the domain monitor there are few lines that are not covered by a
	try/except clause but that might be enough for the thread to die without
	leaving any valuable information in the logs. This patch adds logging
	for the possible exceptions and respawn the domain monitor if it exits
	unexpectedly.

	Initialize the pthread RLock attribute

	Add missing log object to CrabRPCServer
	In this patch:
	* add missing log object to CrabRPCServer
	* rename _log to log for consistency with CrabRPCProxy and with the
	  majority of the VDSM classes

2012-08-13  Roy Golan  <rgolan@redhat.com>

	fenceNode API is missing the options argument

2012-08-13  Gal Hammer  <ghammer@redhat.com>

	BZ#842771 Fix for exception "TypeError: cannot marshal None"
	The VM's "mirror" and "mirrorPath" properties had a value of None
	rather than an empty string.

2012-08-13  Yaniv Bronhaim  <ybronhei@redhat.com>

	Fix wrong warning when disabling ssl config is found
	This change add to vdsmd.service init script a comment how to configure
	also qemu.conf to work without ssl as in libvirtd.conf.

2012-08-12  Alon Bar-Lev  <alonbl@redhat.com>

	configNetworkTests: handle modinfo correctly
	1. Use /sbin/modinfo as /sbin is absent from non root users.

	2. If bonding module was not found, skip test.

2012-08-12  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	rhevh --> ovirt changes
	Changing the libvirt sasl username from vdsm@rhevh
	to vdsm@ovirt

2012-08-11  Alon Bar-Lev  <alonbl@redhat.com>

	legal: bootstrap: update copyright years

2012-08-10  Adam Litke  <agl@us.ibm.com>

	schema: ConnectionError should be an object not a tuple
	We don't want to try and support a tuple type in the API just to accomodate this
	use case which would be much more usable as a regular type with 'code' and
	'message' members.  Convert it.

	schema: Fix up VmDefinition types
	There is no such thing as a VmShort definition so we do not need the union type
	for VmDefinition.  Also, VmDefinition is the same as VmStatus so just define the
	definition as an alias of VmFullStatus.

	schema: Fix some typos
	Just fix a few outstanding typos in the schema.  This should be pretty
	uncontroversial.

2012-08-10  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	extract a method for appending a child node with a text node to self.dom in libvirtvm.py
	In vdsm/libvirtvm.py, there are some duplicated code. It creates an
	xml element node, then creates a text node and appends it to the element,
	at last appends the element to self.dom. This can be done in a function.

2012-08-09  Adam Litke  <agl@us.ibm.com>

	schema: Remove remaining instance of IntStr
	Oops, we missed one IntStr type.  Remove it.

2012-08-09  Alon Bar-Lev  <alonbl@redhat.com>

	cleanup: use iproute instead of vconfig for vlan management
	iproute utility is much better maintained and supported, it
	supersedes the vconfig in most setups.

	As VDSM uses vconfig only to delete vlans, it even simpler
	to replace it with iproute at this point.

2012-08-09  Igor Lvovsky  <ilvovsky@redhat.com>

	Add restoreBackups and clearBackups

	BZ#832765 - Load backups from backup files to memory

2012-08-09  Alon Bar-Lev  <alonbl@redhat.com>

	cleanup: add vdsm-tool/validate_ovirt_certs.py to .gitignore

2012-08-09  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Move option 'save_image_format' to qemu.conf
	'save_image_format' is an option for qemu.conf, not libvirtd.conf,
	so move it to qemu.conf.

2012-08-09  Laszlo Hornyak  <lhornyak@redhat.com>

	fix logging
	_log is an object, not a method

2012-08-08  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#843387 - prepareVolumePath() should set volPath or raise on any input.

	BZ#846014 - Fix virtio hotplug disk fail to a VM with IDE disks.

2012-08-08  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#832765 - configNetwork: add restoreAtomicNetworkBackup

	configNetwork: Don't swallow exception during removeLibvirtNetwork
	In this patch:
	  - No need to swallow libvirt exceptions during removeLibvirtNetwork
	  - No need to run forcibly removeLibvirtNetwork(network) before
	    createLibvirtNetwork(network)

	Add atomic/persist backup capabilities for logical networks

	Move createLibvirtNetwork and removeLibvirtNetwork to the ConfigWriter

2012-08-07  Laszlo Hornyak  <lhornyak@redhat.com>

	core: typo fix (Copys -> Copies)
	Copys is misspelled.

2012-08-07  Alon Bar-Lev  <alonbl@redhat.com>

	cleanup: do not use external program ipcalc for ip validation
	IPv4 addresses are simple to parse and validate. No need to execute
	external process for the task.

	Especially if process is not supported by all platforms, and it has no
	added value.

	$ ipcalc -c -4 0.0.0.0 && echo ok
	ok
	$ ipcalc -c -4 255.255.255.255 && echo ok
	ok
	$ ipcalc -c -m -4 1.1.1.1 && echo ok
	ok

2012-08-07  Saggi Mizrahi  <smizrahi@redhat.com>

	(Schema) 'init' is an internal state and is never exposed

	(Schema) Replace FloatStr with float

	(Schema) Replace IntStr with proper integer types

	(Schema) Remove HexStr alias
	Most languages have their own way of representing hexadecimal literals.
	This will make sure we don't have to define how we parse hex values and
	making users implement formatters.

	(Schema) Remove varius bool versions, final API will just use boolean values

2012-08-07  huntxu  <mhuntxu@gmail.com>

	fix typo "doesn't exists"
	replace "doesn't exists" with "doesn't exist".

2012-08-07  shu ming  <shuming@linux.vnet.ibm.com>

	Fix the parameter descriptions in create() method
	Fix the parameter descriptions in create() method of
	storage domain class.

2012-08-07  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#845830 confNet: Remove most of_validateNetworkSetup
	All the dropped validations already exist in _addNetworkValidation.
	Having them written twice is begging for bugs.

2012-08-07  Dan Kenigsberg  <danken@redhat.com>

	confNet: no need to validate deleted network name
	If the net is in our database, we should be able to delete it, no matter
	what was its name.

2012-08-07  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Move validate_libvirt_certs to vdsm-tool
	Move validate_libvirt_certs in vdsdm.init to vdsm-tool
	and rename validate_ovirt_certs since it is not related
	to libvirt.

2012-08-06  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	miscTests test failed, fix it
	Saggi changes the raise exception of cleanupdir in 70ceb370 commit.
	So fix the miscTests to assert the new exception.

2012-08-06  Federico Simoncelli  <fsimonce@redhat.com>

	Implement RLock in betterThreading
	To use a recursive lock in a betterThreading.Condition we must implement
	the RLock object with pthread.

2012-08-06  Mark Wu  <wudxw@linux.vnet.ibm.com>

	MOM Integration
	This patch integrates MOM into vdsm. For the descprition of
	how it works, please see Adam's mail:
	https://fedorahosted.org/pipermail/vdsm-devel/2012-February/000628.html

2012-08-05  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	Add a channel in vdsm for introducing qemu-ga
	As previously what we agreed, the agent-assisted shutdown and fsfreeze would be handled
	by the qemu guest agent while oVirt-specific functionality such as
	Single-Sign-On would continue to be managed by the ovirt guest agent.

	http://www.ovirt.org/wiki/Guest_agent_proposals

	This patch enables the qemu guest agent channel in the libvirt domain XML and
	changes the shutdown verb to pass the VIR_DOMAIN_SHUTDOWN_GUEST_AGENT flag to
	the libvirt shutdown API.

	There is no reliable method/API to tell if guest agent is available/running in libvirt.
	But libvirt will do some basic check(using 'guest-sync' command)
	to determine whether the qemu-ga is running before every useful command delivered to agent.

	http://wiki.libvirt.org/page/Qemu_guest_agent

2012-08-05  Mark Wu  <wudxw@linux.vnet.ibm.com>

	vdsmd: Don't keep the temporary file generated by configuring libvirt
	It turns out that this problem is caused by a sed bug. And it has been
	fixed in https://bugzilla.redhat.com/show_bug.cgi?id=832855. This patch
	bumps the required version of sed to 4.2.1-10 to include the fix. The
	sed bug doesn't exist on rhel6, so we don't need to change it.

2012-08-04  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#841863 Change exception thrown by the fileUtils module
	Serializing obejcts that aren't canonical might cause issue with
	pickling. In anycase, the gobal exceptions should not be used so low in
	the stack.

2012-08-02  Dan Kenigsberg  <danken@redhat.com>

	configNetworkTests: test new "iface" API
	commit 1cb43db326c8 has incurred a change in the reported attributes per
	network. This needs to be translated to a compatible change in the test.

	This issue has not been noticed due to a human race condition: the test
	was verified before the API change was made, but committed after it.

2012-08-02  jarod.w  <work.iec23801@gmail.com>

	deployUtil: avoid garbage character in auth key file
	If we fail to get file '/engine.ssh.key.txt', it will get the
	content of url 'http://your_engine_ip:your_port/' which is not
	what we want.

2012-08-02  Sandro Bonazzola  <sandro.bonazzola@gmail.com>

	tests: add testcases for mkimage
	Added testcases for functions _decodeFilesIntoDir, mkFloppyFs,
	mkIsoFs and removeFs in mkimage.

	Fixed a missing \ in tests/Makefile.am

	Modified after review:
	Fixed test failure creating _P_PAYLOAD_IMAGES directory, monkey-patching mkimage._P_PAYLOAD_IMAGES.
	Fixed restoring mkimage constants original values on teardown.
	Fixed pep8 style requests.
	Fixed sorting of tests.

2012-08-01  Josef Pacula  <josef.pacula@gmail.com>

	with exceptions some variables could be uninitialised - now initialised to None

2012-08-01  Antoni S. Puimedon  <asegurap@redhat.com>

	Added tests for _addNetworkValidation and helpers.
	Helpers are: validateVlanId, validateBondingName and validateBondingOptions.

	The test for validateBondingOptions monkey patches os.path.exists to allow to
	test just the logic of the method, which uses sysfs to determine if the option
	is valid.

	The test of _addNetworkValidation goes over the logic branches to test that
	the proper exceptions are thrown. It monkey patches the network detection
	method of the netinfo module to avoid real network detection at test time.

2012-08-01  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#844347 - Prepare conf files for all interfaces before ifup

	Don't set BRIDGE in nic's conf files if it part of the bond

	Related to BZ#844347 - Keep bond mode after change network on top of it
	Assume we have a bond with mode X and network on it. Now we want to remove this network
	and add another one.
	In this case setupNetwork will get a new network but not a bond info.
	We need to take bond info from the host and keep it during network addition

2012-08-01  Dan Kenigsberg  <danken@redhat.com>

	report network's underlying device as "iface"
	ovirt-engine-3.1 expects to see "interface" for bridgeless networks, and
	only for them. A recent patch http://gerrit.ovirt.org/6644 started
	reporting "interface" for bridged networks, too. Which broke Engine.

	I consider this an Engine bug (it should have relied on the "bridged"
	attribute to decide if a network is bridged or not), but this cannot be
	changed on the Engine side so near to the ovirt-3.1 release.

	This patch reports "iface" for all networks, keeping "interface" only
	for bridgeless networks, for ovirt-3.1 backward compatibility.

	With this new API nit, we report a new cluster level 3.2.

2012-08-01  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#844294 Add requiresMailbox to StorageDomain
	Since commit 942c2dc the storage domain objects are all DomainProxy
	instances, but the method StoragePool.__createMailboxMonitor was still
	relying on identifying the object type to activate the HSM mailbox.

2012-08-01  Yaniv Bronhaim  <ybronhei@redhat.com>

	remove vds_qualifier - we don't use it

2012-08-01  Douglas Schilling Landgraf  <dougsland@redhat.com>

	engine.py: remove ping from write_vdsm_config
	def action() already uses http request to verify if oVirt Engine
	is available, we don't need a new 'ping' for write_vdsm_config().

2012-07-31  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#842948: deployUtil - safely remove bridge
	deployUtil calls /usr/share/vdsm/delNetwork to remove previously created bridge.
	This patch will add ovirtfunctions.ovirt_safe_delete_config() to safely remove
	bridge config files in oVirt Node.

2012-07-30  Dan Kenigsberg  <danken@redhat.com>

	BZ#843498 getCaps: differentiate between bridges and nets
	Since we have bridgeless networks, bridges are no longer equivalent to
	networks, and should be reported separately.

2012-07-30  Federico Simoncelli  <fsimonce@redhat.com>

	Fix assertVdsmUser group check
	The assertVdsmUser group check wasn't taking in account that VDSM_GROUP
	could be the primary group for VDSM_USER and therefore not appear in the
	gr_mem list.

	In this patch:
	* additional check for VDSM_GROUP being the primary group for VDSM_USER
	* use the constants for VDSM_USER and VDSM_GROUP

2012-07-30  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#834205 - Add BOOTPROTO/IPADDR/NETMASK options for bridgeless interface

2012-07-30  Yaniv Bronhaim  <ybronhei@redhat.com>

	Added user verification before running VDSM.
	If user isn't called 'VDSM' or isn't related to group KVM, the service won't startup.
	Normal run of VDSM should be only by user VDSM.
	Otherwise, another user creates vdsm internal files and it's wrong, espcially if its root.

2012-07-30  Eli Mesika  <emesika@redhat.com>

	BZ#840386: vms with shared disk will pause...
	https://bugzilla.redhat.com/show_bug.cgi?id=840386

	The problem was that vdsm does not add the libvirt 'sharable' flag when
	getting a Disk with the shared flag set from core.

	Solution is to set the shareable flag in libvirtvm.py and for backward
	compatibility set it to false in vm.py

2012-07-29  Igor Lvovsky  <ilvovsky@redhat.com>

	Rename getNetworksForNic as getNetworksForIface
	This function handles both bond and nic interfaces

	configNetwork: handle VLAN before bond and nic in addNetwork
	We want to create config files (ifcfg-*) in top-down order
	(bridge->vlan->bond->nic) to be able to handle IP/NETMASK
	correctly for bridgeless networks

2012-07-29  Antoni S. Puimedon  <asegurap@redhat.com>

	Refactored configWriter add methods for code reuse.
	Moved the backup and write part into a separate method and added tests
	for these add methods. The tests work by doing some monkey patching of the
	open and the writeConfing method.

2012-07-26  Bala.FA  <barumuga@redhat.com>

	gluster.cli: report failures as error dict to Engine
	Gluster cli functions throw error as exception, but python
	multiprocess has a bug http://bugs.python.org/issue15440 which fails
	to re-raise in supervdsm side.  This is workaround fix to set optional
	arguments to constructor of VdsmException and GlusterException

2012-07-26  Yeela Kaplan  <ykaplan@redhat.com>

	BZ#837836 Change tpgt variable to identically None
	Conversion of iscsi portal parameter, which is actually tpgt,
	to int is removed because this parameter is not used in vdsm
	and to avoid regressions.
	Engine sends identically 0 in new version and can send anything through REST API in older versions.

2012-07-26  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	fix 'qemuImg' import error in unit test
	restTest indirectly import qemuImg.py. qemuImg.py is installed to
	vdsm site-packages dir, so it is imported as "from vdsm import qemuImg"
	in other files.
	There is a hack in testrunner.py to import modules under vdsm
	site-packages dir for unit test, but qemuImg is not hacked, so causes the
	problem.

	This patch add qemuImg to the import hack list in testrunner.py and fix
	the problem.

2012-07-25  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#842631 Use domain proxies instead of actual domain references
	Because of issues where we had 2 instances of the same domain causing
	trouble we changed the invalidation scheme to only invalidate when no
	one is holding a reference to the domain object. This causes a lot of
	correctnes errors, espescially on not manager hosts. Having a proxy in
	the middle will allow us to invalidate the domain object and have all
	reference owners access the correct object.

2012-07-25  Federico Simoncelli  <fsimonce@redhat.com>

	Add the hostId parameter to reconstructMaster
	During reconstructMaster a new storage domain of the pool is elected
	to become the master to hold the cluster lock and the metadata.
	With the introduction of SANLock each host maintains its own host id
	on all the storage domains of the pool and therefore VDSM can't use a
	temporary id to reconstruct the master domain.

	Add missing import config in domainMonitor

2012-07-25  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Check if core is a directory before cleaning
	On some systems /var/log/core might not exist, so they will get an email
	every hour that /var/log/core could not be found. This is avoided by
	checking if the directory exists before cleaning it.

2012-07-25  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#838802 Config option to enable/disable volume leases
	At the moment we don't completely support the volume leases. As default
	they are disabled but they can be enabled (testing purpose) with a
	specific configuration option. In the future when the feature will be
	stable enough such option won't be considered anymore (always enabled).

	Add the formatConverter for Storage Domain V3

2012-07-25  Saggi Mizrahi  <smizrahi@redhat.com>

	Orthogonal storage repository conversion
	Currently domain format conversion is considered an "upgrade". This is
	not correct as in the future we may allow conversion from one domain
	type to another without a definite supercedence value.

	For instance, one domain format might be better suited for quick
	image manipulation while another will be better suited for space saving
	image manipulations.

	Also in the future we will introduce the new image repositories that
	will replace the current domain scheme. As these are completely
	different objects there needs to bee a 3rd party to convert to\from
	them.

	This also separates the conversion process from the domain logic
	allowing simpler more concise handling of the conversion process.

2012-07-24  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#839330 Bump sanlock required version
	The new sanlock version adds:

	* support for several NFS implementations
	* WAIT flag for sanlock_inq_lockspace
	* graceful pid handling

2012-07-24  Mark Wu  <wudxw@linux.vnet.ibm.com>

	configNetwork: fix bonding mode issue
	Currently, we configure nics before bonding when create/edit bonding
	device. That could cause the bonding mode can't be updated as specified.
	Because, when we use ifup to activate the bonding slaves, it implicitly
	creates the bonding device with the default mode 0, and adds the salve
	nics to it. So you will see the following kernel message in system log:

	bonding: unable to update mode of bondX because it has slaves

	The fix is just to make bonding configured before nics. Then it can
	update its mode because no slave attatches to it at that time.

2012-07-24  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	make vdsm_hooks/vhostmd/before_vm_start.py PEP 8 clean

	make vdsm_hooks/vhostmd/after_vm_destroy.py PEP 8 clean

	make vdsm_hooks/scratchpad/before_vm_start.py PEP 8 clean

	make vdsm_hooks/scratchpad/before_vm_migrate_source.py PEP 8 clean

	make vdsm_hooks/scratchpad/after_vm_destroy.py PEP 8 clean

2012-07-24  Federico Simoncelli  <fsimonce@redhat.com>

	Unify the volume creation code in volume.create
	This patch lays out the principles of the create volume flow (unified
	both for block and file storage domains).

	Uniform the block and file volume methods
	In this patch:
	* Consistent use of metaId to identify the volume metadata
	* Use the same arguments for halfbakedVolumeRollback in file and block
	  domains (backward compatible with the previous format)
	* Few changes and cleanup to comply to PEP8

	Remove the unused nocache option
	The nocache option to get and set the volume metadata is never used.

	Separate the Volume.share implementation
	The current Volume.share method is exposing the hardlink/symlink option
	which is an implementation detail of the domain type (hardlink for file
	domains and symlinks for block domains). This makes any external (or
	generic) use of such call domain-type dependant.
	This patch separates part of the Volume.share implementation to use the
	correct link type transparently.

	In this patch:
	* Separate the Volume.share implementation for block and file domains
	* Separate the shareVolumeRollback implementation
	* Link also the lease file on file domains (when required)

2012-07-24  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	skip testPersistentBackup test, if 'vdsm' account is not created
	In configNetwork moudle, _persistentBackup needs to get the uid of
	'vdsm' account. If the 'vdsm' account is not created and when the
	vdsm is builded, it will report test "ERROR".
	This is not resonable, the test should be skiped.

2012-07-24  Roman Fenkhuber  <roman@fenkhuber.at>

	Basic tests for the tc module

2012-07-23  Saggi Mizrahi  <smizrahi@redhat.com>

	Add stdin tests to betterPopen

2012-07-23  Dan Kenigsberg  <danken@redhat.com>

	bootstrap: avoid rpmUtils.miscutils.compareVerOnly
	el6's rpmUtils.miscutils does not have this function, so we shall mimick
	its sematics with rpmUtils.miscutils.compareEVR

	Originally reported by Andrey Gordeev <dreyou@gmail.com>.

2012-07-22  Igor Lvovsky  <ilvovsky@redhat.com>

	configNetwork: _addNetworkValidation: validate bridgeless net existence.

	BZ#831528, BZ#834008, BZ#829037 - Fix validation for inter-networks compatibility
	Only following networks combinations are allowed:
	 - single non-VLANed bridged network
	 - multiple VLANed networks (bridged/bridgeless) with only one
	   non-VLANed bridgeless network

2012-07-22  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#833099 - spmRole is a StoragePool attribute.
	Remove this misleading accessor.

	Related to BZ#833099 - Removing unused exceptions.

	BZ#833099 - Induce MSD reconstruct when getSpmStatus fail.
	Really engine should deduce the reconstruct necesity, but this
	would not happen.

2012-07-21  Alon Bar-Lev  <alonbl@redhat.com>

	test: remove redundant resourceManagerTests.py
	The resourceManagerTests.py test is executed twice, while
	should be executed once.

2012-07-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#832227: vdsm-reg.conf: change vdc_host_port
	The default ports to ovirt-engine 3.1 changed to 80/443.
	Replace vdc_host_port value from 8443 to 443. Also, added to engine.py
	schema of compatible port, if users try to connect using old ports and
	doesn't work it will try the new one.

	Thanks to Itamar/Mburns to handle the compatible port issue.

2012-07-21  lvroyce  <lvroyce@linux.vnet.ibm.com>

	adding handling EINTR to poll to make it more robust
	some system call and signal will interrupt poll,
	making event loop stops and fails to react events and keepalive message
	from libvirt.
	adding handling EINTR to poll to make it more robust

2012-07-19  Igor Lvovsky  <ilvovsky@redhat.com>

	Split getNetworksAndVlansForBonding to handle bridge and bridgeless networks

	Refactoring and optimization of _addNetworkValidation

2012-07-19  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#784931 - Fixing race condition in deactivateSD().

	BZ#784931 - Restore SD.validate() semantics.
	dom.validate() should check the domain without any aging
	mechanism.
	Decoupling validate from SD.selftest(), used in domainMonitor mod.

	Related to BZ#784931 - Removing the unused useCache parameter.
	Intentionally (A.B.) ignoring when the SD.validate(useCache=True)
	usages were removed.

2012-07-19  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	Fix the KeyError exception if no 'acpiEnable' key in vm.conf.
	When creating a VM,if the params do not contain the key 'acpiEnable',the self.conf has no key 'acpiEnable'.
	If use conf.[key] it will raise an exception.

	So change to use dict.get() method to avoid KeyError.

2012-07-19  Bing Bu Cao  <mars@linux.vnet.ibm.com>

	Fix typo (change socekt to socket) in libvirtvm.py and vm.py

2012-07-19  Federico Simoncelli  <fsimonce@redhat.com>

	Fix detachStorageDomain for the ISO domains
	When detaching an ISO domain we should acquire the host id before
	trying to acquire the cluster lock.
	Additionally since an ISO domain can be used by multiple pools we
	should avoid to acquire the host id in the domain monitor.

	In this patch:
	* acquire the host id in detachSD for the ISO domains
	* do not acquire the host id in the domain monitor for the ISO domains

2012-07-19  Douglas Schilling Landgraf  <dougsland@redhat.com>

	engine.py: Rename the remaning rhevm vars
	Rename rhevm vars to engine

	engine.py: rename callbacks
	Renamed the following callbacks:

	- valid_rhevm_server_callback to validEngineServerCallback
	- valid_rhevm_server_port_callback to validEngineServerPortCallback

	engine.py: rename write_vdsm_config params
	Renamed the following parameters and references:

	- rhevm_host to engineHost
	- rhevm_port to enginePort

	engine.py: rename get_rhevm_config() function
	Rename get_rhevm_config() to getEngineConfig()

2012-07-18  Adam Litke  <agl@us.ibm.com>

	vdsm_api: Add schema and html doc generator
	This patch adds a schema file to a new directory 'vdsm_api'.  The schema is
	intended to be a machine-readable specification of the current vdsm API.  From
	this schema we should be able generate API documentation and a client library
	(libvdsm) that other projects can use to write against the defined API.

	At this point, the schema file probably contains some errors and needs a solid
	review from this community.  Please send patches to gerrit that correct
	documentation and data errors in the schema.  Meanwhile, I will begin to write
	a gObject code generator.

2012-07-18  Laszlo Hornyak  <lhornyak@redhat.com>

	typo fix in help text
	replaces "givven" with "given"

2012-07-17  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	make vdsm/storage/task.py PEP 8 clean

2012-07-17  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix pep8 issue in configNetworkTests.py

2012-07-17  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	skip gluster test if gluster module is not find
	if vdsm-gluster rpm is not installed, will skip the test related to
	gluster

2012-07-16  Eli Mesika  <emesika@redhat.com>

	BZ#838591:vdsm is not looking for libvirt-daem
	https://bugzilla.redhat.com/838591

	vdsm is not looking for new libvirt-daemon package on vdsmd startup.
	libvirt has changed package name from libvirt to libvirt-daemon.
	As a result, vdsm fails in start_libvirtd while trying to find
	libvirt instead of libvirt-daemon
	Adding libvirt-daemon to the package list defined in
	vdsmd.init.in:start_libvirtd

2012-07-16  Alon Bar-Lev  <alonbl@redhat.com>

	build: use consistent python path
	Current behavior:

	1. aclocal.m4::AM_PATH_PYTHON detects python using PYTHON variable.
	2. configure.ac: detects python again using PYTHON_PATH.
	3. Makefile.am: uses python using hardcoded "python".

	Problem:

	Python cannot be overriden in consistent way.

	Change:

	1. Remove python redetection from configure.ac, use only PYTHON
	   variable.
	2. Use PYTHON in Makefile.am instead of hardcode.
	3. Use PYTHON in substituted files.

	Usage:

	./configure PYTHON=/usr/bin/python2

2012-07-15  Dan Kenigsberg  <danken@redhat.com>

	configNetTest: don't skip second test
	Formerly, after self._files have been read for the first time during one
	test, they would never have been read in a second test of the same nose
	run.

2012-07-14  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	fix the "netinfo" module import problem
	some files just do "import netinfo", but it should be
	"from vdsm import netinfo".

	This problem cause the latest vdsm services can not start completely.
	And related tests will fail in the installed vdsm tree.

	The problem can not be discovered by 'make check' because "netinfo.py"
	is under the sub-dir "vdsm", so just "import netinfo" is OK.
	However the problem will appear in the installed tree, because
	"netinfo.py" is installed to
	"/usr/lib64/python2.7/site-packages/vdsm/"

2012-07-14  Saggi Mizrahi  <smizrahi@redhat.com>

	Add copyright information to betterPopenTests.py

2012-07-14  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Update error code of migrateToURI2() on abortJob()
	Before migrateToURI2() just returned a generl error code(VIR_ERR_OPERATION_FAILED)
	if the mirgration job was cancelled by client. We have to search the error message
	to distinguish abort from other failures. It has been fixed in libvirt-0.9.9-1.el6
	by introducing a new error code VIR_ERR_OPERATION_ABORTED. Please see
	https://bugzilla.redhat.com/show_bug.cgi?id=760149 for more details.

	I also found the error message 'canceled by client' could be returned only on
	migrateToURI2(). It shouldn't happen on abortJob(), so remove it.

2012-07-12  Laszlo Hornyak  <lhornyak@redhat.com>

	send POSIXFS instead of SHAREDFS
	https://bugzilla.redhat.com/835920

	VDSM should send POSIXFS insterad of SHAREDFS.

2012-07-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Use only one NETPREFIX constant
	Currently, there are two definitions with the same value related to
	VDSM network prefix.

	NETPREFIX = 'vdsm-' (from configNetwork)
	LIBVIRT_NET_PREFIX = 'vdsm-' (from netinfo)

	This patch will remove NETPREFIX definition and update libvirtvm to
	use LIBVIRT_NET_PREFIX.

2012-07-12  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Suppress generating .py{c,o} files when 'make check'
	Set PYTHONDONTWRITEBYTECODE=1 to suppress generating bytecode. Sometimes
	a .py file is missing but the corresponding bytecode file exists, so
	unit test can still successfully run, giving false negatives.

2012-07-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#837443: remove bridge before add VDSM bridge
	Related to BZ#837443: ovirt-node fails to register with ovirt-engine

	oVirt Node when installed manually creates a bridge to be consumed.
	VDSM should remove any bridge (listed or not listed in libvirt)
	to create it's own bridge.

	BZ#837443: removeVlan() drop/remove interface
	Move ifdown() and vconfig rm to removeVlan(). We need a generic
	function to be called multiple times. For example, removing a vlan listed
	or not listed in libvirt database.

2012-07-11  Dan Kenigsberg  <danken@redhat.com>

	pthread.py: avoid stdout noise on process shutdown
	For some reason, on process shutdown, pthread.PthreadMutex.__del__() is
	sometimes called after the reference _libpthread to libpthread is reset
	to None. This resutls in annoying message like
	    AttributeError: 'NoneType' object has no attribute 'pthread_mutex_destory' (Ignored)

	Current code catches this error and replaces it with a `print`
	statement, which is just as annoying.

	This patch intentionally swallows the ignored error (and only it)

2012-07-11  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix bridgeless networks report

2012-07-11  Dan Kenigsberg  <danken@redhat.com>

	configNetTests: do not call a non-existing TestCaseBase.__del__
	This gives an ominous error when running the unit test.

	configNetTests: fix another netinfo-rebase issue
	configNetTests have been stubbing the variable
	configNetwork.NET_CONF_BACK_DIR which has been deleted by the
	beatification commit 9be0497ba773. Too bad that git's rebase did not
	catch what I have missed.

2012-07-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configNetwork: fix NetInfo call
	Commit 9be0497ba77333577e3f5e8738c9efd8794e7a36 changed the import of
	netinfo. This patch fix a NetInfo call missed from the previous patch.

2012-07-10  Federico Simoncelli  <fsimonce@redhat.com>

	Monitor the host id in domainMonitor

	Add the async kwarg to acquireHostId

	Do not acquire leases on shared volumes
	At the moment (exclusive leases) if a VM acquires the leases on a shared
	volume (template) it will prevent all the other VMs based on such
	template to start.

2012-07-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#837443: replace the netinfo import
	We will use functions like netinfo.bridges() to
	verify if there is any bridge listed in the system
	but not in the libvirt database.

2012-07-10  Dan Kenigsberg  <danken@redhat.com>

	bootstrap: m2crypto is no longer used
	We use Python's native ssl support for quite some time. No need to
	install m2crypto on every node.

	configNetTests: add testPersistentBackup
	The tested configNetwork.ConfigWriter._pesrsistentBackup is restored by
	the vdsm-restore-net-config script. This patch changes the script to
	make it more easily testable: environment variables
	NET_CONF_DIR and NET_CONF_BACK_DIR are honored if passed to the script.
	--skip-net-restart avoids attempting to change the network configuration
	on the tested host.

2012-07-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#837443: removeBridge() drop/remove interface
	Move ifdown() and brctl delbr to removeBridge(). We need a generic
	function to be called multiple times. For example, removing a bridge listed
	or not listed in libvirt database.

2012-07-09  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fixing broken compilation.
	Compilation was broken by:
	Change oop to be a new process instead of a fork
	I65e58030e31fe54b0e79c2f2a415d081f890d41f

2012-07-09  Saggi Mizrahi  <smizrahi@redhat.com>

	Change oop to be a new process instead of a fork
	This has better memory overhead as forking copies redundant memory from
	the parent. This allows opening and closing of oop helpers without fear
	of memory bloat.

2012-07-09  Dan Kenigsberg  <danken@redhat.com>

	BZ#834205-related: report ipaddr of bridgeless networks
	No one in Vdsm sets the ipaddr of bridgeless networks (which is what the
	bug is all about), but we should at least report it if it was manually
	edited into ifcfg-eth*.

	BZ#834205-related: ethtool cannot handle unicode device names
	Device names such as u'eth0' make ethtool choke. Let us convert them to
	simple 'eth0' strings.

	restTests: skip until we find python-cherrypy for el6

	restTests: temporarily drop reference to vms
	Currently two unit tests are failing since we test a
	yet-to-be-implemented feature.

	We should test vms item only when http://gerrit.ovirt.org/3756 is
	accepted and VMs are modeled by the REST API.

	configNetTests: refactor testAtomicRestore

2012-07-08  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#837054 - Do not detach network from the bond during bond resize
	Let's say you have bond and bridged non-VLANed network on it.
	This patch will fix detaching such network from the bond during bond resizing.

2012-07-07  Douglas Schilling Landgraf  <dougsland@redhat.com>

	ovirt_functions: fix elif statement
	Identify correctly the ovirt Node and fix the error message from vdsm-reg logs:

	[: /etc/ovirt-node-image-release: binary operator expected

2012-07-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#832199: move selinux from init to spec
	To reduce the time during the init, transferring all the selinux
	set to spec instead use it during the vdsm init.

2012-07-06  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	remove INSTALL from git and add it to .gitignore
	After running autogen.sh, I found the file "INSTALL" was modified.
	'git diff' reports the following change:

	-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
	-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
	+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
	+Inc.

	...

	+   HP-UX `make' updates targets which have the same time stamps as
	+their prerequisites, which makes it generally unusable when shipped
	+generated files such as `configure' are involved.  Use GNU `make'
	+instead.

	It's caused by the update in autoconf. Just adding it to gitigore
	does't help because it's already tracked. In my understanding, we
	needn't maintain 'INSTALL' in git repository, so remove it.

2012-07-06  Adam Litke  <agl@us.ibm.com>

	rest-api: Add unit tests
	Add a framework and unit tests for the REST API.  These tests override the vdsm
	API bridge so that the REST code can be tested in isolation.  A functional test
	suite that verifies the operation of both the xmlrpc and rest bindings against a
	running vdsmd is still needed.

	This test module uses some tricky magic to dynamically-generate a fake API.py
	that will return pre-programmed return values to the REST API.  Using this
	technique, a cherrypy server can be tested with an unmodified Controller.

	The following files are created/modified:
	 restData.py   - Contains expected data for:
	                 Faked API calls, REST requests, REST responses
	 restTests.py  - Contains the actual test cases
	 testrunner.py - Modified to import some additional needed modules

2012-07-06  Dan Kenigsberg  <danken@redhat.com>

	rest-api: srop clientIF refs from API c'tors
	just the bare minimum that is needed to return sanity to the code.

2012-07-05  Bala.FA  <barumuga@redhat.com>

	glusterVolumesList list all volumes or specified volume.
	glusterVolumesList accepts volume name optionally to list specified
	volume only else lists all volumes.

2012-07-05  Dan Kenigsberg  <danken@redhat.com>

	configNetTests: re-grow the stub
	I've created stubs to limit my unittest, but forgot to restore the
	changed function and variables. This patch fixes this regression.

	configNetTests: test atomicBackup
	The sematics of this function were far from clear to me before I've
	written this unit test. While writing this test, I've found the issues
	that are fixed in the preceding patches.

	I hope this test makes the function of _atomicBackup() clearer not only
	to me.

	configNet: atomicBackup: remove new files upon restore
	Files that are created by ConfigWriter._atomicBackup() should be removed
	by restoreAtomicBackup, not forgotten on disk.

	configNet: clear up atomicBackup arg
	Apparently, os.path.join('/a/b/', '/a/b/c') == '/a/b/c'.
	In my opinion, it is a Python bug.

	In any case, let us not trust this peculiarity, and have atomicBackup
	expect a full path to the config file.

2012-07-05  Mark Wu  <wudxw@linux.vnet.ibm.com>

	make vdsm/storage/lvm.py PEP8 clean

	make vdsm/constants.py.in PEP8 clean

2012-07-05  Igor Lvovsky  <ilvovsky@redhat.com>

	Split getNetworksForNic to  getBridgedNetworksForNic and getBridgelessNetworksForNic

	Related to BZ#836954 - Allow to detach interface from the bond and create a new network on it in single action.
	Assume we have a bond0 on (eth1, eth2, eth3) with defined network brNet on it.
	This patch will allow to detach ethX from bond0 and create a new network brNet2 on it
	with single setupNetworks operation

2012-07-05  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	remove vdsm python lib path from PYTHONPATH in run_tests.sh.in
	60b0de8ece24ef6644472aeecd2cf48946919b80 add arguments --local-modules,
	we won't execute hack code in run_tests.sh.in, so we can remove
	python lib path from PYTHONPATH.

2012-07-04  shu ming  <shuming@linux.vnet.ibm.com>

	no spUUID parameter in copyImage()

2012-07-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#788640 - Fix template image parameter.
	Look for the template volume in the template image since the
	dependant image was already removed.

2012-07-04  lvroyce  <lvroyce@linux.vnet.ibm.com>

	avoid searching .git directory when build
	search .git directory may lead to error when branch name is "xx.py"
	avoid search .git to fix this problem

2012-07-04  Dan Kenigsberg  <danken@redhat.com>

	Do not set max_cstate on host with constant_tsc

2012-07-04  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	fix logging method format

2012-07-03  Dan Kenigsberg  <danken@redhat.com>

	BZ#833119 _addNetworkValidation: do not explode if STP option passed
	http://gerrit.ovirt.org/5456 has started passing all optional parameters
	to _addNetworkValidation, but no one is expecting them there.

2012-07-02  Dan Kenigsberg  <danken@redhat.com>

	faqemu: add a bit of documentation

2012-07-02  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#836954 - Allow to break bond and create a new network on its interface in single action.
	Assume we have a bond0 on (eth1, eth2) with defined network brNet on it.
	This patch will allow to break the bond0 and create a new network brNet2 on one
	of its interfaces (e.g. eth2) with single setupNetworks operation

	Remove redundant 'explicitBonding' parameter from setupNetworks

2012-07-02  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Add a test case for _handleMessage()

2012-07-02  Eduardo Warszawski  <ewarszaw@redhat.com>

	Adding the status field to getDeviceList info.
	This status tries to predict the result of pvcreate on the lun.

	By now the reported statuses are:
	free: pvcreate --test on this lun succeeded.
	used: pvcreate --test on this lun failed.

	Caveat emptor: pvcreate on the device can fail even if "force"
	flag is passed to createVG in case for example there is a mounted
	file system on this lun.

2012-07-02  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Collect more guest memory stats
	More detailed guest memory stats has been to ovirt-guest-agent in
	http://gerrit.ovirt.org/#change,2272. So add the corresponding code to
	vdsm to collect the memory stats.

2012-07-02  Dan Kenigsberg  <danken@redhat.com>

	pep8: make gpl boiler plate narrower
	Better do it in one sed blow.

2012-07-02  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Replace configure_sysctl with /etc/sysctl.d/vdsm
	To be simple, replace configure_sysctl in vdsmd.init with
	/etc/sysctl.d/vdsm

2012-07-01  Adam Litke  <agl@us.ibm.com>

	rest-api: Model StoragePools
	API Implemented:
	----------------
	/api/storagepools
	 * Create/connect new storage pool and manipulate connected pools
	 Actions:
	   /api/storagepools/create
	    - Create a new storage pool
	   /api/storagepools/connect
	    - Connect a storage pool
	    * The vdsm API does not maintain information about disconnected storage
	      pools so our API must deviate from REST norms by placing the connect verb
	      at the collection level instead of the resource level.
	   /api/storagepools/<id>/destroy
	    - Destroy a connected storage pool
	   /api/storagepools/<id>/disconnect
	    - Disconnect a storage pool
	   /api/storagepools/<id>/spmstart
	    - Start the SPM role on this host
	   /api/storagepools/<id>/spmstop
	    - Stop the SPM role on this host

	rest-api: Model Tasks
	API Implemented:
	----------------
	/api/tasks : Asynchronous tasks
	 * View and manage information about ongoing and completed operations
	 Actions:
	   /api/tasks/<id>/clear
	    - Clear the information about a completed task
	   /api/tasks/<id>/stop
	    - Stop a running task
	   /api/tasks/<id>/revert
	    - Rollback a running operation

	rest-api: Model volumes
	API Implemented:
	----------------
	/api/storagedomains/<sdUUID>/volumes
	 * Manipulate all volumes associated with a storage domain
	/api/storagedomains/<sdUUID>/images/<imgUUID/volumes
	 * Manipulate all volumes associated with an image

	 Actions:
	   .../volumes/create
	    - Create a new volume
	   .../volumes/<id>/delete
	    - Delete a volume

	Not all available functionality is implemented yet (eg. creating child volumes.)
	Remaining functionality can be added in subsequent patches.

	rest-api: Model images
	API Implemented:
	----------------
	/api/storagedomains/<sdUUID>/images
	 * Provide information about images associated with a storage domain
	 Actions:
	   /api/storagedomains/<sdUUID>/images/<imgUUID>/delete
	    - Delete an image and all of its volumes
	   * Note: Images are implicitly created during volume creation process

	Not all available operations are currently supported in the API.  Work continues
	to complete the API and that can be submitted as follow-up patches.

	rest-api: Model StorageDomains
	API Implemented:
	----------------
	/api/storagedomains : Manipulate Storage Domains
	 * Provide comprehensive information about known domains
	 Actions:
	   /api/storagedomains/create
	    - Create a new storage domain
	   /api/storagedomains/<id>/format
	    - Remove and erase a storage domain
	   /api/storagedomains/<id>/attach
	    - Attach a storage domain to a storage pool
	   /api/storagedomains/<id>/detach
	    - Detach a storage domain from a storage pool
	   /api/storagedomains/<id>/activate
	    - Activate an inactive, attached storage domain
	   /api/storagedomains/<id>/deactivate
	    - Deactivate an active storage domain

	rest-api: Model storage connection references
	API Implemented:
	----------------
	/api/storageconnectionrefs
	 * list, acquire, and release storage connection references
	 Actions:
	   /api/storageconnectionrefs/acquire
	    - Add a new connection reference
	   /api/storageconnectionrefs/<id>/release
	    - Remove a connection reference

	rest-api: Allow optional data in DELETE request bodies
	By default, cherrypy does not allow data in DELETE HTTP requests.  In our
	API, we would like to pass parameters to some DELETE requests.  We
	accomplish this by configuring two things:

	1) Set request.methods_with_bodies to include DELETE.  This tells cherrypy
	that we should process the body of DELETE requests too.

	2) Create a hook to enable body processing only for DELETE requests with an
	appropriate decorator.  This makes a request body optional for the
	indicated functions.

	rest-api: Add basic create and delete support
	Update the Resource class so that it can dispatch both GET and DELETE methods
	from a resource uri.  Update the Collection class so that it can dispatch GET
	and POST (create resource) methods from a collection uri.

2012-07-01  Derrick Ornelas  <dornelas@redhat.com>

	dumpStorageTable: fix path to ovf files
	Use os.path.join() instead of string concatanation, as DC does not have
	a trailing slash.

2012-07-01  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	Fixing typo in the source files besides vdsm.git/vdsm.
	Applied this patch set,the typo in vdsm.git beside vdsm directory will be fixed.
	Rebased on 27 June

2012-06-29  Federico Simoncelli  <fsimonce@redhat.com>

	Support fake_kvm in vds_bootstrap
	The bootstrap should be able to identify if the host is configured to
	use the fake_kvm hook.

2012-06-29  Dan Kenigsberg  <danken@redhat.com>

	Avoid hacking around kernel lro bug
	We no longer need to disable lro in modules were it was enabled by
	default, as lro was replaced by gro, and the original kernel bug about
	bond/lro compatibility has been solved.

	check-local: check *.py,*.py.in files in all subdirs

2012-06-29  lvroyce  <lvroyce@linux.vnet.ibm.com>

	bump libvirt version to fix readonly lease unsupported issue

2012-06-28  Dan Kenigsberg  <danken@redhat.com>

	BZ#806555 having /etc/ovirt-node-* means it is a node
	Not vice versa.

	This patch fixes http://gerrit.ovirt.org/3055 .

2012-06-28  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	fix "make check" failing on "vdscli.py" missing
	"make all" will not generate "vdscli.py" from "vdscli.py.in".
	Only "make install" will generate it. By running "make check",
	firstly "make all" will be run, but not "make install".
	So "vdscli.py" is not generated and the check fails.

	Generating "vdscli.py" in "make all" can fix the problem.

2012-06-27  Igor Lvovsky  <ilvovsky@redhat.com>

	Handle bond properly if connectivity check fail.
	We need to be able remove  a new added network if connectivity check fail.
	If a new network needs to be created on top of existing bond,
	we will need to keep the bond on rollback flow,
	else we will break the new created bond

2012-06-27  Dan Kenigsberg  <danken@redhat.com>

	deployUtil: slightly saner kernel version comparison

2012-06-27  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#833803 - Avoid bond breaking after network detach
	The (relatively) new setupNetwork verb allows to remove a network
	defined on top of an bonding device without break the bond itself.

2012-06-27  Dan Kenigsberg  <danken@redhat.com>

	BZ#833119 - Allow to create VLANed network on top of existing bond
	The (relatively) new setupNetwork verb allows to specify a network on
	top of an existing bonding device. The nics of this bonds are taken
	implictly from current host configuration.

2012-06-27  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#835784 - Allow to create a network on top of existing bond in additional to create a new bond and network
	If we already have a bond0 with (eth1, eth2) and now we want to create
	network "bridge_woVlan" on top of it and in additional we want to create
	a new bond1 with (eth3, eth4) and create a network "bridge_woVlan_2" on
	top of bond 1.
	This patch will allow us to do it in the same setupNetwork command.

2012-06-27  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Properly parse configurations in function "do_create" in vdsClient
	Before the patch:
	1. The function "do_create" accepts a config file and a set of arguments.
	For nested values, it only parses them from arguments but not from config
	file. So all nested values in the config file will not be passed to vdsm,
	causing some components and configs missing in the created VM.
	2. When parsing nested values in arguments, it add the both the raw value
	and parsed value into the result dictionary.

	After the patch:
	1. Properly parse nested values from both config file and arguments.
	2. Do not add useless raw value into the result dictionary.

	Patch Set 4:
	Add unit test for function "do_create" to verify config file is parsed
	the same way as command line parameters.

	Patch Set 5:
	Add hacks for importing vdscli.py and vdsClient.py in unit test.

	Patch Set 6:
	More readable name for contexManager function.

2012-06-27  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	make vdsm/storage/multipath.py PEP8 clean

	make vdsm/storage/persistentDict.py PEP8 clean

	make vdsm/storage/resourceFactories.py PEP8 clean

2012-06-27  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	make vdsm/storage/outOfProcess.py PEP8 clean

	make vdsm_hooks/promisc/after_vm_start.py PEP8 clean

	make vdsm/storage/taskManager.py PEP8 clean

	make vdsm_reg/define.py PEP8 clean

2012-06-26  Dan Kenigsberg  <danken@redhat.com>

	Revert "add configure variable vdsmcoredumpdir for /var/log/core"
	This reverts commit 6106db0db4832fd0e9a9f08c288d524d99fb0799 as it broke rpm building on el6.

2012-06-26  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	make vdsm/storage/fileUtils.py PEP8 clean

2012-06-26  jarod.w  <work.iec23801@gmail.com>

	Fix broken pyflakes check

2012-06-26  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	add comment for hard coded version string in vdsmd.init
	The version string is for looking up and generating configuration
	sections. It's hard coded on purpose for compatibility. Add a comment
	for other programmers.

2012-06-26  wenchao xia  <xiawenc@linux.vnet.ibm.com>

	add arguments to testrunner
	    Make testrunner accept more parameters and have help output.
	Now it accept one more parameter than original testrunner,
	--local-modules, which tells if the vdsm modules should be
	hacked. For eg:
	python testrunner.py --local-modules main.py miscTests.py
	python testrunner.py --help

	v2: change case parameter to accept more than one input.
	v3: parameter format was changed due to comments.
	v4: config was stored in local variable, parameter name changed
	to indicate better.
	v5: hack tips removed, use dash instead of underscore in
	parameter.
	v6: do not use argparser, pop key args from argv directly.
	v7: --help will also print nose help info.
	v8: typo and print fix.

2012-06-26  Lei Li  <lilei@linux.vnet.ibm.com>

	tests: add netinfo test for intToAddress() function
	Add testcase for intToAddress() function.

	tests: add testcases for configNetwork
	Add testcases for functions nicSort() and
	isBridgeNameValid() in configNetwork.

2012-06-25  Dan Kenigsberg  <danken@redhat.com>

	deployUtil: use os.uname instead of /bin/uname
	simpler, quicker, and less error-prone.

2012-06-25  Juan Hernandez  <juan.hernandez@redhat.com>

	Change default key size to 2048 bits

2012-06-25  Shahar Havivi  <shaharh@redhat.com>

	hooking.py: expose execCmd
	vdsm.utils.execCmd is used by multiple hook scripts to execute external
	commands. However, hooks (or anybody else) should not depend on internal
	vdsm functions. Let us expose execCmd and use it in the scripts

	v2: avoid an unrequired function call, have a more detailed commit
	message.

2012-06-25  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	add configure variable vdsmcoredumpdir for /var/log/core

2012-06-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#833752 - Fix chlist as a volume object list in Image.merge().
	Merging a base raw volume fails due to a TypeError.
	Avoids producing the children volumes again and fixing types.

2012-06-25  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	make storage/fileVolume.py PEP8 clean

	make storage/iscsiadm.py PEP8 clean

2012-06-25  wenchao xia  <xiawenc@linux.vnet.ibm.com>

	make storage/securable.py PEP8 clean

2012-06-24  Dan Kenigsberg  <danken@redhat.com>

	tests: do not dd into /dev/null
	Few of our tests run /bin/dd with of=/dev/null. Occasionally, dd calls
	fsync(2) on its destination file, which is (for some reason) unsupported
	by /dev/null.

	We are left with false-negative test results such as
	http://jenkins.ovirt.org/job/vdsm_unit_tests/215/testReport/junit/miscTests/DdWatchCopy/testStop/
	which tarnishes our reputation.

	Let's dd into a temporary file instead.

2012-06-24  Ryan Harper  <ryanh@us.ibm.com>

	Add VolumeType storage exception to clarify createVolume error
	When attempting to use createVolume API call, supplying an incorrect
	Volume Type (known as preallocate parameter) the exception message
	references Volume Format misleading the user that she has selected
	an incorrect Format.

	Add a new exception class, VolumeType and raise the correct error
	when passed an invalid VolumeType in the preallocate parameter.

2012-06-24  Dan Kenigsberg  <danken@redhat.com>

	BZ#824298 fix typo in keyword argument exc_info

2012-06-24  Federico Simoncelli  <fsimonce@redhat.com>

	Add sanlock-python to the BuildRequires

2012-06-23  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	make vdsm_reg/createDaemon.py PEP8 clean

2012-06-23  Federico Simoncelli  <fsimonce@redhat.com>

	Use sparse images for alignmentScanTests
	It shouldn't be really needed to (slowly) allocate 4Gb of space for
	these tests.

2012-06-22  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Add vdsm_reg/config.py to .gitignore

2012-06-21  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Remove the parameter of clientIF instance from API
	Currently, the API clients(like the xmlrpc binding and rest binding)
	need hold the vdsm internal clientIF instance to call API. To make the
	code more modular, we create a single API instance intialized with
	clientIF instance. And then the API clients can interact with vdsm
	without having the vdsm internal clientIF instance.

	Move actual VM creation function to clientIF.py
	To avoid using API in clientIF.py, we move the VM creation function
	to clientIF.py. It should be safe to skip the VM parameters validation
	in the VM.create() API for recovering exsiting VMs.

	If this patch is accepted, we can add a singleton interface for
	clientIF which can be used for API.py. Otherwise, it will cause circular
	importing.

2012-06-21  Federico Simoncelli  <fsimonce@redhat.com>

	Fix attachSD and masterMigrate for domain version 3

	Remove the traceback from the getVSize warning
	The check used in getVSize to skip the log warnings (when the LV is not
	enabled), was using the wrong exception type.

	Add the hasHostId method to the cluster locks

	Move the SANLock SDM lease to a different offset

	Internal volumes must be RW in domain version 3

2012-06-20  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#832577: node can't be approved
	Because of ovirt-node's readonly filesystem, directory creation at runtime has to be handled carefully.
	/rhev/data-center used to be created by the vdsm rpm when it is installed.
	It's now listed in vdsm.spec as %ghost which means it is *not* laid down by default.
	At runtime, it fails to be created because of the read-only filesystem.

	Regression introduced by commit ee1e68d3416d8fd728df75c0a41dd3db48f9138d
	Patch provided by: Mike Burns <mburns@redhat.com>

2012-06-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	getAllVolumes() unit test.

2012-06-20  Dan Kenigsberg  <danken@redhat.com>

	deployUtil.yumSearchVersion: compare versions sanely

	drop deployUtil.yumSearch
	It was just a complex way of calculating bool(yumFind()).

	deployUtil.yumFind: rename and simplify semantics
	deployUtil.yumListPackages is a convenience wrapper around
	yum.YumBase.pkgSack.searchNevra()

2012-06-19  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#826873 - Allow to create bond without network

	BZ#826467 - Allow to remove bond and attach network to NIC

	BZ#830486 - Allow to change network according the diffs from previous state
	We may not receive any information about the bonding device if it is unchanged.
	In this case vdsm shouldn't check the bond information of this network.

	BZ#826873 - Allow to change bond without network attached to it

2012-06-19  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	make libvirtev.py PEP8 clean

2012-06-19  Federico Simoncelli  <fsimonce@redhat.com>

	Make domainMonitor compliant to PEP8

2012-06-19  lvroyce  <lvroyce@linux.vnet.ibm.com>

	Make storage/sd.py PEP8 clean

2012-06-18  lvroyce  <lvroyce@linux.vnet.ibm.com>

	make storage/fuser.py PEP8 clean

	Make pthread.py PEP8 clean

2012-06-18  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Make vdsm/clientIF.py PEP8 clean

	Make vdsm/caps.py PEP8 clean

2012-06-18  Adam Litke  <agl@us.ibm.com>

	rest-api: Handle resource links
	Change the method for resolving links in a REST Resource.  Instead of each class
	defining a _handle_links() function, they can now define a _links dictionary.
	The keys are the link names and the values are a function which returns the next
	Resource or Collection in the call sequence.

	VM.create: Normalize propagateErrors semantics
	Changes since V1:
	 - Use utils.tobool() as suggested by danken

	Regretably, someone chose to use the strings 'on' and 'off' instead of the
	more correct True and False boolean values.  ovirt-engine compatibility
	requires us to continue supporting this bad form, but we should also accept
	True and False.

	VM.create: Make readonly optional for disk devices
	When processing disk devices to create a libvirt xml file, the current code
	assumes that the 'readonly' attribute is always present.  If it's missing,
	VM.create will fail with an AttributeError.  When describing disks, 'readonly'
	is typically an optional parameter that defaults to False if not specified.  In
	fact, this is what getConfDrives already does for legacy drives.  Right now,
	there is only one place that assumes readonly is present.  Change it to check
	for the attribute first.

2012-06-18  Laszlo Hornyak  <lhornyak@redhat.com>

	Better documentation for cpuPinning
	Replaces the documentation text with something more helpful with a link
	to the full documentation to the expected libvirt format.

2012-06-18  shu ming  <shuming@linux.vnet.ibm.com>

	Avoid racing condition of vmContainer's lenth

2012-06-18  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Sort PEP 8 white list in Makefile.am

2012-06-18  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#808874 Skip master validation on repoStat
	The current master validation code is affected by two different race
	conditions triggered by both startSpm and stopSpm.

	The first and clearer race condition is triggered by the master status
	(fetched asynchronously by the domainMonitor thread) that could be
	several seconds old. Comparing such status with the current SPM role
	(SPM/HSM) during a transition (startSpm, stopSpm) is wrong.

	The second race condition (more difficult to expose) happens again
	during the startSpm/stopSpm methods since the mount/unmount of the
	master domain is not atomic with the switch of the SPM role.

	There are two correct ways to solve this issue:

	1. Maintain the SPM role in the domainMonitor thread so that it can be
	atomically paired with the mount status. To do so we would need to
	introduce two new methods to signal to the domainMonitor the beginning
	and the end of a transition (startSpm, stopSpm) and its final outcome
	(role = SPM/HSM).

	2. Keep track of the latest SPM/HSM transition (eg: sp.lastRoleChange)
	and verify that the statistics are recent enough before validating the
	master mount (eg: st.lastCheck > sp.lastRoleChange).

	The code involved in this issue was introduced in 8d400ac (BZ#518840)
	to add an automatic recovery system for those pools that were missing
	the master mount/directory (preventing the SPM to start).
	Eventually that error could be reported during startSpm but it's not
	related to repoStats (which is anychronous to startSpm and therefore
	race prone).

	At the moment the engine handles the StorageDomainMasterError error code
	issuing a reconstructMaster command.

	Implementing one of the two fixes proposed above just to maintain this
	validation is an overdesign given that the two problematic situations
	(SMP-master-not-valid and HSM-master-mounted) should be addressed in a
	different way by VDSM and not reported to the engine.

	Consequences for the engine:
	* The error code StorageDomainMasterError will never be received
	* The engine won't issue the automatic reconstructMaster command (in
	  this particular case)

2012-06-17  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	add functional test for vdsm sos plugin
	a functional test for checking vdsm plugin didn't raise any
	exception and sosreport executed successful.

2012-06-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	remove flag skipLibvirt
	Currently, VDSM manage networks by it's own and uses libvirt to store the net definitions, not requiring any additional
	flag as skipLibvirt. This patch will remove completely skipLibvirt flag.

2012-06-17  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	fix can't get ssl opt in vdsm sos plugin
	when execute sosreport will get exception as below:

	Traceback (most recent call last):
	  File "/usr/lib/python2.7/site-packages/sos/sosreport.py",
	line 693, in sosreport
	    plug.setup()
	  File "/usr/lib/python2.7/site-packages/sos/plugins/vdsm.py",
	line 82, in setup
	    sslopt = ['', '-s '][config.getboolean('vars', 'ssl')]
	NoOptionError: No option 'ssl' in section: 'vars'
	  Running plugins. Please wait ...

	* import vdsm.config to plugin for using default value.
	* because can not import vdsm module when the plugin's name same with it.
	so add hack function for import vdsm python lib.

2012-06-16  Lee Yarwood  <lyarwood@redhat.com>

	Correct spmprotect.sh to log the sdUUID to spm-lock.log.
	saferelease.acquire() actually calls spmprotect.sh with the
	sdUUID and not the spUUID.

2012-06-16  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Make vdsm/guestIF.py PEP8 clean

2012-06-16  Adam Litke  <agl@us.ibm.com>

	rest: Change error to warning when binding not installed
	When the REST bindings are enabled but the vdsm-rest package is not installed,
	we report a message in the log file.  Downgrade the severity of the message to
	WARNING since vdsm can continue to run.

	tests: Fix installed version of run_tests.sh
	Commit 4399aa56b38415d27b037efef9d86b93e9a29f42 broke the installed copy of
	run_tests.sh because the location of some python files changed without updating
	PYTHON_PATH for the tests.  Set PYTHON_PATH using the new autoconf variable.

2012-06-13  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	Make vdsm/define.py PEP8 clean

2012-06-13  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Make before_vm_start.py PEP8 clean

	Make BindingXMLRPC.py PEP8 clean

	Make devicemapper.py PEP8 clean

2012-06-13  wenchao xia  <xiawenc@linux.vnet.ibm.com>

	Make vdsm/storage/hba.py PEP8 clean

2012-06-13  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Make volume.py for PEP8 clean

2012-06-13  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	Make vdsm/hooks.py PEP8 clean

2012-06-13  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Make SecureXMLRPCServer.py PEP8 clean

	Make before_vm_start.py PEP8 clean

2012-06-13  Adam Litke  <agl@us.ibm.com>

	API: Add formal definition for disk types
	Expose the enum representing disk types in the public API.  Along the way,
	correct some docstrings that suggest the diskType parameter is a string when it
	is an integer.

2012-06-13  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#830485 - Add netConfigDirty bit to getVdsCaps report

	Add bridge on top of VLAN if exists
	In VLAN case we should attach bridge only to the VLAN
	rather than to underlying NICs or bond

	Use proper MTU on bonding when add network

	Use already known iface in addNetwork

2012-06-13  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Raise a proper error message in vdsClient.py if no permission to read key files
	Currently, there is no permission check to read key files when ssl is
	enabled, which maybe cause puzzling error. For example, when a
	non-privileged user runs "vdsClient -s 0 getVdsCaps", there will be
	as following error:

	$ vdsClient -s 0 getVdsCaps
	Traceback (most recent call last):
	  File "/usr/share/vdsm/vdsClient.py", line 2275, in <module>
	    code, message = commands[command][0](commandArgs)

	  ...

	  File "/usr/lib/python2.7/site-packages/vdsm/SecureXMLRPCServer.py", line 98, in connect
	    cert_reqs=self.cert_reqs)
	  File "/usr/lib64/python2.7/ssl.py", line 381, in wrap_socket
	    ciphers=ciphers)
	  File "/usr/lib64/python2.7/ssl.py", line 141, in __init__
	    ciphers)
	SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

	When ssl is enabled, this patch will first check the permission to read
	key files, and then raise a proper error message if there is no read access
	to them.

2012-06-12  Dan Kenigsberg  <danken@redhat.com>

	fix a sloppy rebase
	note to self: avoid late-evening hasty rebases

	vdsm-tool: look for .pyc modules, too.
	Systems (such as ovirt-node) may keep only .pyc (or .pyo) files on disk,
	and their vdsm-tool should work unharmed.

	rename vdsm_tool_expose: prefix is obvious from context

2012-06-12  Lei Li  <lilei@linux.vnet.ibm.com>

	Add passwd command to vdsm-tool
	Change since v3
	    - Automate this process by calling vdsm-tool
	      accordingly.

	Change since v2
	    - Processes problem fixs and report the error
	      for missing file suggested by Saggi.

	Change since v1
	    - Small fix suggested by Mark.

	Move and encapsulate set-saslpasswd from post
	section into vdsm-tool function.

	Replace username and file location for SASL by constants
	Change since v1:
	    - Define another constant P_VDSM_LIBVIRT_PASSWD for
	      the password file location suggested by Dan.

	As Dan suggested, replace the uername and password file
	location for SASL authenticating with constant SASL_USERNAME
	and P_VDSM_LIBVIRT_PASSWD.

2012-06-12  Federico Simoncelli  <fsimonce@redhat.com>

	Move the vdsm package to sitearch
	In this patch:
	* move the vdsm package to the sitearch directory
	* improve the build process for the betterPopen module

2012-06-12  Gal Hammer  <ghammer@redhat.com>

	BZ#737104 Disallow cross-vendor virtualization.
	Find vendor for all cpu models, including those based on another
	cpu module.

2012-06-12  Igor Lvovsky  <ilvovsky@redhat.com>

	Minor optimization for addNetwork

	Don't ignore bridgeless networks in ifaceUsers

	Minor optimization for delNetwork

2012-06-11  Igor Lvovsky  <ilvovsky@redhat.com>

	'options' translation in setupNetworks is not relevant

	Iterates over delete candidates networks only once

2012-06-08  Amador Pahim  <apahim@redhat.com>

	Changing origin of memShared stats to /sys/kernel/mm/ksm/pages_sharing
	Currently, _memShared() is calculated adding the shared pages value
	(3rd field) from /proc/<VM_PID>/statm file from all running VMs and
	converting to bytes through PAGE_SIZE value. The KSM module shipped
	in RHEL5 is a different version from the KSM module found on the latest
	upstream kernel versions. Newer features, such as exporting statistics
	on the /sys filesystem, that are implemented upstream are not in the
	version shipped in this release. Starting from kernel 2.6.10, statm
	shared field was changed, making _memShared() imprecise about KSM
	shared pages.
	This patch take advantage of /sys statistics of KSM in current
	releases to correct _memShared() results.

2012-06-07  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	pep8 fixes for storage/blockVolume.py
	An attempt to clean blockVolume.py from pep8 errors.
	v2: Added blockVolume.py to the pep8 whitelist.

2012-06-07  Douglas Schilling Landgraf  <dougsland@redhat.com>

	deployUtil: Do not use static home for root user
	Fix for systems which do not use /root as home for root user.

2012-06-07  y kaplan  <ykaplan@redhat.com>

	additional capsTests

2012-06-07  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Close and remove the temporary file before raising a exception

2012-06-07  Yair Zaslavsky  <yzaslavs@redhat.com>

	Change storageServer to handle numeric connection values
	engine is sending the connection information as a map of
	string keys and string values. VDSM tries to parse version,retrans and
	timeout as numbers, but due to the nature of the passed map
	it receives a string containing numerical values for these arguments, and
	fails.
	This patch performs cast to int of the numercial values, and in case of
	failure, throws an exception indicating which value raised the exception

2012-06-05  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix "unknown device" issue for balloon device
	The balloon device's 'alias' property should be updated in function
	_getUnderlyingBalloonDeviceInfo(), otherwise it will be recognized as a
	unknown device in _getUnderlyingUnknownDeviceInfo().

	For the 'model' property, it must be included in the balloon device
	parameter and libvirt will not change it, so we needn't get back from
	libvirt.

2012-06-05  Ryan Harper  <ryanh@us.ibm.com>

	PEP8 fixes for localFsSD
	% pep8 vdsm/storage/localFsSD.py
	vdsm/storage/localFsSD.py:16:80: E501 line too long (80 characters)
	vdsm/storage/localFsSD.py:49:80: E501 line too long (84 characters)
	vdsm/storage/localFsSD.py:102:1: E302 expected 2 blank lines, found 1

2012-06-04  Adam Litke  <agl@us.ibm.com>

	rest-api: Delete unneeded directory
	Hmm, I thought this orphaned directory had ben cleaned from the REST
	infrastructure patch series.  Let's squash it for good this time.

2012-06-04  Dan Kenigsberg  <danken@redhat.com>

	configuNetworks: no need to create set repeatedly
	Yes, this is a very minor performance improvement, but I still like it.

	configNetworks: reject bridge names starting w/ dash
	Evil users may attempt to create bridges with silly names that confuse
	initscripts. We should try to block them.

2012-06-01  Douglas Schilling Landgraf  <dougsland@redhat.com>

	restTests: use short release/version
	oVirt Engine cannot handle release/version with more then 2 digits.
	To workaround, we add a sed command into vdsm.spec to make version/release
	a short string in dsaversion.py. However, restTests is failing now because
	the version provided by dsaversion are not releated to the
	version string provided by REST API. This patch will add a workaround
	also in restTests.py

	BZ#822158: fail to join host to cluster
	Currently dsavesion.py will expand the macros @PACKAGE_VERSION@ and
	@PACKAGE_RELEASE@ to the full version/release of vdsm
	However, oVirt Engine cannot handle version/release with more
	then 3 digits, example: 4.9.6, only 4.9.

2012-06-01  Laszlo Hornyak  <lhornyak@redhat.com>

	CpuPinning for vdsClient
	Adds support for CpuPinning arguments in vdsClient.
	example:
	 cpuPinning="{0:'1'}"

	CpuPinning
	Adds support code to the "Vm.create()" (in backendcreateDomain) functionality in the
	method _DomXML.appendCpu. This code will create a <cputune> tag and
	append fill with <vcpupin> tags.

	http://libvirt.org/formatdomain.html#elementsCPUTuning
	http://www.ovirt.org/wiki/Features/Design/cpu-pinning

2012-05-31  Igor Lvovsky  <ilvovsky@redhat.com>

	Move balloon's 'model' parameter to specParams for BC case

2012-05-31  Eli Mesika  <emesika@redhat.com>

	vdsm: set ballooon device model properly
	The model of the balloon device is in the sepcParams map of the device.
	Changing code to search this attribute inside the spec params map rather
	than a free attribute of the device.

2012-05-30  Nigel Jones  <nigjones@redhat.com>

	BZ#824729 - Use doubler param in  _loadCorrectedTimeout
	Vm._loadCorrectedTimeout does not use the doubler parameter as defined in the
	function documentation which causes issues when a large number of migrations
	are used and a doubler value of 5 is expected to be used, instead of the
	hard-coded value of 20.

2012-05-30  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Fix multiple commands with same name in different vdsm-tool modules

2012-05-29  Cao,Bing Bu  <mars@linux.vnet.ibm.com>

	Fixing typo in all the python files in vdsm.git/vdsm.

2012-05-29  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#788640 - Remove subChainSizeCalc() and getSubChain(). Remove getAllChildrenList().
	getAllChildrenList() should be removed since it is intrinsically
	race prone.
	*subChain* functions were called only once.

	BZ#788640 - Template relink refactored.
	getAllChildrenList() should be removed since it is intrinsically
	race prone.

2012-05-28  Federico Simoncelli  <fsimonce@redhat.com>

	Add the BuildRequires needed by the tests

2012-05-28  Ryan Harper  <ryanh@us.ibm.com>

	storage: Move nfsSD.getFileUtils() to FileStorageDomain class
	If I create an iso-domain out of a LOCALFS storage type, when I
	call getIsoList on the storage pool which includes the iso-domain
	vdsm complains that LocalFS does not have getFileList method.

	The nfsSD class has the exact method for finding files that is
	needed.  By moving the implementation to the base class for both
	nfs and localfs types, they can share the implementation.

2012-05-27  Ryan Harper  <ryanh@us.ibm.com>

	tests: fix gluster storage exception test
	make check fails after gluster merge:

	FAIL: test_collisions (main.TestGlusterExceptions)
	----------------------------------------------------------------------
	Traceback (most recent call last):
	 File "/root/rpmbuild/BUILD/vdsm-4.9.6/tests/main.py", line 71, in
	  test_collisions
	   self.assertTrue(obj.code >= 5000)
	AssertionError: False is not true

	Looking at vdsm/gluster/exception.py line 29 of 350 we can
	see that the gluster defined range for exceptions is
	4100-4800.  Update the test case to match reserved range.

2012-05-27  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#821867: Do not append comments to config values
	In Fedora 17, libvirt is reading the entire line from configuration
	file, ignoring comments.

	Starting libvirt as:

		root       907  0.0  0.3 459996 13556 ?        Ssl  09:05   0:00
		/usr/sbin/libvirtd --listen # by vdsm

	This patch will mark the configuration section created by vdsm, example:

		## beginning of configuration section by vdsm-4.9.6
		listen_addr="0.0.0.0"
	        ## end of configuration section by vdsm-4.9.6

2012-05-27  Federico Simoncelli  <fsimonce@redhat.com>

	Configure libvirt to use sanlock

2012-05-25  Ryan Harper  <ryanh@us.ibm.com>

	PEP8 fixes for nfsSD
	pep8 complaints:

	vdsm/storage/nfsSD.py:16:80: E501 line too long (80 characters)
	vdsm/storage/nfsSD.py:33:1: E302 expected 2 blank lines, found 1
	vdsm/storage/nfsSD.py:54:80: E501 line too long (84 characters)
	vdsm/storage/nfsSD.py:97:80: E501 line too long (82 characters)
	vdsm/storage/nfsSD.py:111:37: E225 missing whitespace around operator
	vdsm/storage/nfsSD.py:114:28: E231 missing whitespace after ':'
	vdsm/storage/nfsSD.py:115:80: E501 line too long (87 characters)
	vdsm/storage/nfsSD.py:137:5: E303 too many blank lines (2)
	vdsm/storage/nfsSD.py:153:1: W391 blank line at end of file

2012-05-25  Adam Litke  <agl@us.ibm.com>

	StorageConnection: Fix error message

2012-05-25  Bala.FA  <barumuga@redhat.com>

	Added Gluster file system management support.
	Verbs added into vdsm are
	  glusterVolumesList,
	  glusterVolumeCreate,
	  glusterVolumeStart,
	  glusterVolumeStop,
	  glusterVolumeDelete,
	  glusterVolumeSet,
	  glusterVolumeBrickAdd,
	  glusterVolumeRebalanceStart,
	  glusterVolumeRebalanceStop,
	  glusterVolumeRebalanceStatus,
	  glusterVolumeReplaceBrickStart,
	  glusterVolumeReplaceBrickAbort,
	  glusterVolumeReplaceBrickPause,
	  glusterVolumeReplaceBrickStatus,
	  glusterVolumeReplaceBrickCommit,
	  glusterVolumeRemoveBrickStart,
	  glusterVolumeRemoveBrickStop,
	  glusterVolumeRemoveBrickStatus,
	  glusterVolumeRemoveBrickCommit,
	  glusterVolumeRemoveBrickForce,
	  glusterHostAdd,
	  glusterHostRemove,
	  glusterHostsList

	Added gluster cli support in supervdsm.
	Now supervdsm has following functions which enable gluster supported
	operations.
	   glusterVolumeInfo
	   glusterVolumeCreate
	   glusterVolumeStart
	   glusterVolumeStop
	   glusterVolumeDelete
	   glusterVolumeSet
	   glusterVolumeSetHelpXml
	   glusterVolumeReset
	   glusterVolumeAddBrick
	   glusterVolumeRebalanceStart
	   glusterVolumeRebalanceStop
	   glusterVolumeRebalanceStatus
	   glusterVolumeReplaceBrickStart
	   glusterVolumeReplaceBrickAbort
	   glusterVolumeReplaceBrickPause
	   glusterVolumeReplaceBrickStatus
	   glusterVolumeReplaceBrickCommit
	   glusterVolumeRemoveBrickStart
	   glusterVolumeRemoveBrickStop
	   glusterVolumeRemoveBrickStatus
	   glusterVolumeRemoveBrickCommit
	   glusterVolumeRemoveBrickForce
	   glusterPeerProbe
	   glusterPeerDetach
	   glusterPeerStatus

	These functions are exposed conditionally based on vdsm-gluster plugin
	availablity

2012-05-25  wenchao xia  <xiawenc@linux.vnet.ibm.com>

	small fix for import in test cases
	  when the test case import modules lies in vdsm, it should
	specify "from vdsm". Otherwise the import will fail if
	"site-packages/vdsm" was not set as PYTHONPATH after installation.
	This should not happen because the system have already recognized
	that "site-packages/vdsm" exist.

	add run_test_local.sh to .gitignore

2012-05-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#783383: engine.py - space cleaned up
	Serial is alot more picky about the last line it will display which is
	one less than visual console.

	Patch provided by:
	Joey Boggs <jboggs@redhat.com>

2012-05-24  Adam Litke  <agl@us.ibm.com>

	tests: Verify REST version information
	Add a new test to verify the vdsm version information that is returned by
	the REST API against the info in dsaversion.py

2012-05-23  Lei Li  <lilei@linux.vnet.ibm.com>

	Get network address for showNetwork
	Change since v2
	- Variables fixing suggested by Igor.

	Change since v1
	- Add the support for bridgeless network too.

	The current function showNetwork lack the ability to display
	the information of giving network address like ipaddr, netmask
	and gateway. So get these info to make it complete.

2012-05-23  Federico Simoncelli  <fsimonce@redhat.com>

	Set the syslog level to WARNING
	Currenly all the log messages using the syslog handler are displayed on
	the console. This patch raises the level to display only warnings and
	higer level messages.

2012-05-23  Shahar Havivi  <shaharh@redhat.com>

	promisc: bug fixes, change name to port-mirroring
	1. change promisc name to port-mirroring
	2. check if device exists in qdisc before deleting it

2012-05-22  Douglas Schilling Landgraf  <dougsland@redhat.com>

	bootstrapping: avoid usage of tmp folder
	This patch changes hard-coded tmp path elements, so the scripts
	may be used from a different location. Once invoked by the engine-core
	from an ad-hoc folder, the bootstrapping scripts should support
	working on that folder. This is mainly referring to imports,
	certificate files and log files.

2012-05-22  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#788640 - Check move image conditions from SD data.
	getAllChildrenList() should be removed since it is intrinsically
	race prone.
	Removing uses of getAllChilfrenList and validating conditions
	near the input instead of waste process.

	BZ#788640 - Refactor Pool.deleteImage()
	getAllChildrenList() should be removed since it is intrinsically
	race prone.

	BZ#788640 - Add [block|file]SD.getAllVolumes
	This function can be used to retrieve all the relevant image
	information based only on SD properties, without reading
	volumes metadata.
	In this way we circumvent the races product of working with many
	images simultaneously.
	In addition the number of storage accesses is greatly reduced.

2012-05-22  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Modify scripts in vdsm_cli/ for PEP8 compliance
	Edit vdsClient.py and vdscli.py.in in vdsm_cli/ for PEP8 compliance.
	And add these two files to the pep8 whiltelist in Makefile.am.

	Rebase to the latest master and clean new style problems introduced
	by the latest modification to vdsClient.py.

2012-05-22  Saggi Mizrahi  <smizrahi@redhat.com>

	Handle EINTR on close in betterPopen

	Support unicode args in betterPopen

	Tunnel errors from child to parent in betterPopen

2012-05-21  Nigel Jones  <nigjones@redhat.com>

	BZ#822782 - use mkstemp() on older systems
	Registering RHEL5 systems with iptables selected will fail as
	NamedTemporaryFile() in python 2.4 does not include the delete argument.

	We have to switch back to the mkstemp() function to work around this.

2012-05-21  Adam Litke  <agl@us.ibm.com>

	tests: Add functional tests
	Currently we only have unit tests that isolate individual components for
	testing.  It is also useful to write tests that verify a running instance of
	vdsm on a target machine.  This patch adds the infrastructure for such a test
	suite and provides some initial tests of the REST API.

	tests: Package up tests
	This patch packages up the test suite so that it can be installed on a target
	machine to test the installed vdsm.  The check-local target still runs the tests
	against the files in the source directory.  When installed, the tests will use
	the system installed version.  This paves the way for adding some functional
	tests that will run against the running vdsm instance.

2012-05-21  Oved Ourfali  <oourfali@redhat.com>

	vdsm: require updated libvirt for USB support
	This patch adds a requirement in an updated version of libvirt, to
	enable native USB support in VDSM.
	There is an important fix regarding that in this build, regarding the
	address allocation done by libvirt.

2012-05-21  Dan Kenigsberg  <danken@redhat.com>

	BZ#820525 lvm: ignore future additions to attr bits
	lvm2-2.02.95 has added few more bits to LV_ATTR_BITS, and that broke
	vdsm. In this patch we try to be more future-compatible, and ignore bits
	that are added on top of the ones we know about.

	This patch assumes that lvm2 would never delete existing bits, reorder
	them, or add new ones at the beginning. It is sent per the request of
	Alasdair Kergon of lvm2 fame
	https://bugzilla.redhat.com/show_bug.cgi?id=820525#c4

2012-05-20  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Move prepare-vmchannel to supervdsm

2012-05-20  Federico Simoncelli  <fsimonce@redhat.com>

	Set the correct gid for libvirt-spice

2012-05-20  Dan Kenigsberg  <danken@redhat.com>

	Report that Engine 3.1 is supported by this Vdsm.

2012-05-20  Douglas Schilling Landgraf  <dougsland@redhat.com>

	delNetwork: improve removeLibvirtNetwork call
	If oVirt Node is installed with autoinstall flags, example:

	storage_init=/dev/sda BOOTIF=eth0 adminpw=RHhwCLrQXB8zE

	The installation will be automatically and when the setup is
	complete, the vdsm-bridge will be created in libvirt database.

	Can be verified by: virsh net-list --all

	However, registering oVirt Node into oVirt Engine deployUtils.py
	will be triggered to remove the current bridge (skipping libvirt
	database) to add ovirtmgnt:

	deployUtils:
	----------------
	SCRIPT_NAME_DEL = "delNetwork"
	<snip>
	_logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan,
	bonding, nic] + ['skipLibvirt=True'])

	From delNetwork, the current logic is to remove the bridge from libvirt
	database *only* if skipLibvirt=True.
	In that scenario, removeBridge() will be called to remove all bridge
	references but
	the libvirt database will be kept and next the NetInfo module
	call will find the bridge into libvirt database but no reference into
	the system, leading to crash.

	netinfo.py:
	----------------
	def get():
	<snip>
	nets = networks()
	for netname in nets.iterkeys():
	        d['networks'][netname] = {}
	        if nets[netname]['bridged']:
	            d['networks'][netname] = { 'ports': ports(netname),
	                    'stp': bridge_stp_state(netname),
	                    'addr': ifaces[netname]['addr'],
	                    'netmask': ifaces[netname]['netmask'],
	                    'gateway': routes.get(netname, '0.0.0.0'),
	                    'mtu': getMtu(netname), 'cfg': getIfaceCfg(netname)
	}

	On the other hand, if user just install manually the node and setup the
	network vdsm-breth0 won't be created into libvirt database
	automatically and skipLibvirt flag will fly correctly.

	Also verified by: virsh net-list --all

	To fix this report, we can call removeLibvirtNetwork() independently of
	skipLibvirt and fix the order of checking if the network still exists.

2012-05-20  Dan Kenigsberg  <danken@redhat.com>

	BZ#755937 configNet: do not call ifup twice for same bridge

2012-05-18  Adam Litke  <agl@us.ibm.com>

	tests: Clean up sample text in fileUtilTests.py
	I understand the value of humor and I am certain no harm was intended but I
	must take issue with some of the sample text being used in the fileUtilTests
	module.  I know the quotes were intended as jokes on their original
	programs, but I find them offensive, subjugative to women, and totally
	inappropriate for source code.  I know our project wishes to be welcoming to
	all developers and therefore I request that this text be removed in favor of
	something neutral such as Lorem ipsum.  Thank you for your understanding.

2012-05-18  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Change to use WatchedFileHandler instead of FileHandler in logger.conf
	We find that no new log message appears in log file after manually changing
	the vdsm log when vdsm is running. We have to restart vdsm to get logging
	work again. It could happen when people try to add some markers to pinpoint
	the related messages during toubleshooting. It's caused by the log file gets
	associated with a new inode after the manual change. To make logging survive
	the change, use WatchedFileHandler instead of FileHandler.

	In addition, WatchedFileHandler was provided specially for the external
	log rotate tools. It can notice that the log file change performed by
	logrotate, so we don't need to have the option 'copytruncate' in
	vdsm-logrotate.conf any more.

	Reported-by: Changming Bai <baichm@linux.vnet.ibm.com>

2012-05-17  Oved Ourfali  <oourfali@redhat.com>

	vdsm: using model and index for controller address
	This patch uses the index and model of controllers when saving the alias
	and address fields. In some cases, like the USB controllers, there is
	more than one controller, and the address is important as different USB
	controllers should have different addresses. So, using the
	device+index+model is a unique ID for the USB controllers.

2012-05-17  Saggi Mizrahi  <smizrahi@redhat.com>

	Reraise errors from underlying c code in betterPopen

2012-05-17  Ryan Harper  <ryanh@us.ibm.com>

	tests: add netinfo test for speed() function
	Test that speed() returns either 0 or a valid value.
	Currently using ethtool headers to provide a list of
	valid speeds (10, 100, 1000, 2500, 10000).

	v2->v3
	    - moved constant to top and applied caps
	    - switched to python2.6 syntax for set()
	      initialization
	v1->v2
	    -switch from list to set

	tests: add netinfo test for invalid nic name
	Test that we return 0 for invalid nics

	v1->v2
	    - switch to assertEqual() instead of assertTrue()

	netinfo: Don't attempt to read a virtio nic speed
	When running VDSM within a guest, when netinfo attempts
	to read the speed of the nic it throws this exception:

	ERROR:root:cannot read eth0 speed
	Traceback (most recent call last):
	    File "/usr/lib/python2.7/site-packages/vdsm/netinfo.py", line 113, in speed
	    s = int(file('/sys/class/net/%s/speed' % dev).read())

	We can detect that the device is a virtio device by reading
	the sysfs device link target and skipping if it's virtio.

	netinfo: simplify speed() function
	Various network devices cannot report on speed, these include
	bonds, bridges, vlans, and down/disabled devices.

	Simplfy the code by only reading speed value from devices that support
	it and returning 0 otherwise.

	v1->v2
	    - Cover the case where we race with device being disabled/downed
	      by checking the speed reported

2012-05-17  Eduardo Warszawski  <ewarszaw@redhat.com>

	Revert "Make sure that internally we always use pvs from /dev/mapper/"
	This reverts commit aa282ef46394be52480597ab6f15291f6cc4b369.

	This patch breaks the direct lun feature and is not necesary
	because the lvm  bug was fixed.

2012-05-17  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	correct usage help string in vdsClient
	Program options must be placed before other parameters. If server
	address goes first, getopt function will treat all options as
	parameters and the program will miss those options.

2012-05-16  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	sort config.py.in alphabetically and cleanup

2012-05-16  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#797526 Lazy evaluation for Drive.blockDev

2012-05-16  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	remove /rhel/data-center after vdsm uninstalled

	move default value to config.py for vdsm-upgrade

2012-05-16  Adam Litke  <agl@us.ibm.com>

	rest-api: Fix software version parsing
	Fix the parsing of the software_version field of getVdsCapabilities.
	 - Properly handle the version whether it is x.y.z or just x.y
	 - Due to git tags, the data type for revision is a string, not short int

2012-05-16  Hans de Goede  <hdegoede@redhat.com>

	Add support for redir devices
	With this patch it is possible to create vms setup for usb redirection with
	vdsm, ie:

	vdsClient 0 create /dev/null \
	    vmId=00000001-0002-0003-0004-000000000006 vmName=F14-x86_64 memSize=512 \
	    macAddr=52:54:00:7a:b4:7e nicModel=virtio bridge=test display=qxl \
	    spiceDisableTicketing=1 \
	    devices='{type:disk,device:disk,path:/home/virt-images/f14-i386.qcow2.img,propagateErrors:off,iface:ide,index:0,readonly:False,format:cow}' \
	    devices='{type:video,device:qxl,specParams:{vram:65536},address:{type:pci,domain:0x0000,bus:0x00,slot:0x02,function:0x0}}' \
	    devices='{type:controller,device:virtio-serial,address:{type:pci,domain:0x0000,bus:0x00,slot:0x03,function:0x0}}' \
	    devices='{type:controller,device:usb,model:ich9-ehci1,address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x7}}' \
	    devices='{type:controller,device:usb,model:ich9-uhci1,master:{startport:0},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x0,multifunction:on}}' \
	    devices='{type:controller,device:usb,model:ich9-uhci2,master:{startport:2},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x1}}' \
	    devices='{type:controller,device:usb,model:ich9-uhci3,master:{startport:4},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x2}}' \
	    devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:1}}' \
	    devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:2}}' \
	    devices='{type:redir,device:spicevmc,bus:usb,address:{type:usb,bus:0,port:3}}' \

	libvirtvm.py: Extend controller support to allow configuring USB controllers
	This allows creating a vm with a USB-2.0 (EHCI) controller with USB-1.1
	companion controllers (UHCI), ie:

	vdsClient 0 create /dev/null \
	    vmId=00000001-0002-0003-0004-000000000006 vmName=F14-x86_64 memSize=512 \
	    macAddr=52:54:00:7a:b4:7e nicModel=virtio bridge=test display=qxl \
	    spiceDisableTicketing=1 \
	    devices='{type:disk,device:disk,path:/home/virt-images/f14-i386.qcow2.img,propagateErrors:off,iface:ide,index:0,readonly:False,format:cow}' \
	    devices='{type:video,device:qxl,specParams:{vram:65536},address:{type:pci,domain:0x0000,bus:0x00,slot:0x02,function:0x0}}' \
	    devices='{type:controller,device:virtio-serial,address:{type:pci,domain:0x0000,bus:0x00,slot:0x03,function:0x0}}' \
	    devices='{type:controller,device:usb,model:ich9-ehci1,address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x7}}' \
	    devices='{type:controller,device:usb,model:ich9-uhci1,master:{startport:0},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x0,multifunction:on}}' \
	    devices='{type:controller,device:usb,model:ich9-uhci2,master:{startport:2},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x1}}' \
	    devices='{type:controller,device:usb,model:ich9-uhci3,master:{startport:4},address:{type:pci,domain:0x0000,bus:0x00,slot:0x04,function:0x2}}'

	libvirtvm.py: Refactor device xml generation
	To remove a lot of code duplication and making adding new device types
	easier.

2012-05-16  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#806625: validate vdsmcert against cacert
	There is a bug situation where the administrator of oVirt Node
	executes the Engine registration procedure, and the host doesn't
	get 'approved' (note: at this point cacert.pem from Engine already
	replaced the /etc/pki/vdsm/certs/cacert.pem) causing a failure in
	the next reboot on libvirt daemon startup. This happens because
	cacert.pem certificate file cannot be validated with vdsmcert.pem.

	Since commit 8aa19150e75af025ebd77392b39268d9ab4f98d3 we execute a
	backup of certs before replace the cacert.pem and using the backup
	file we will restore the correct cacert.pem in configure_libvirt() flow
	fixing the bug.

2012-05-16  Dan Kenigsberg  <danken@redhat.com>

	caps: if cpuCompare failes, return incompat host

2012-05-16  Timothy Asir  <tjeyasin@redhat.com>

	Added gluster support into vds bootstrap.

2012-05-16  Douglas Schilling Landgraf  <dougsland@redhat.com>

	.gitignore: dsaversion.py
	Add vdsm/dsaversion.py to .gitignore

2012-05-15  Lei Li  <lilei@linux.vnet.ibm.com>

	Pass iface without nic interface
	When add a network without nic, unexpected error showed
	as "IndexError: tuple index out of range".

	vdsm should pass iface with nic as None to meet the
	topology in-host only. Also to keep consistence to
	other interface that the default value of iface is
	None.

2012-05-15  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configure.ac: add python-devel requirement
	vdsm/betterPopen: requires python-devel package.

	dsaversion: renamed to dsaversion.in
	Use @PACKAGE_VERSION@ to define software_version
	Use @PACKAGE_RELEASE@ to define software_revision

2012-05-14  Adam Litke  <agl@us.ibm.com>

	rest-api: Add the basic server infrastructure
	Add a new API binding for a REST API based on CherryPy and the Cheetah
	templating framework.  This patch introduces the basic infrastructure for the
	API as follows:

	vdsm/clientIF.py
	 * Initialize the REST API along with the XMLRPC binding.
	 * The rest server is started in its own thread.  It will create more threads as
	   needed.

	vdsm/rest/BindingREST.py
	 * REST API initialization

	vdsm/rest/Controller.py
	 * Main API logic controller
	 * In this patch we introduce utilities and structure
	 * Render the Root resource in the API

	vdsm/rest/Dispatcher.py
	 * A custom cherrypy URI dispatcher that handles URIs with nested identifiers:
	    http://<server>:<port>/api/storagedomains/<sdUUID>/images/<imgUUID>

	vdsm/rest/templates/api.xsd
	vdsm/rest/templates/rsdl.xml
	 * Define the rest API schema and valid URIs
	 * This API is compatible with ovirt-engine-sdk and ovirt-engine-cli

	vdsm/rest/templates/response.json.x
	vdsm/rest/templates/response.xml.x
	vdsm/rest/templates/root.json.x
	vdsm/rest/templates/root.xml.x
	 * Cheetah template files to render responses in json and xml format
	 * The API can accept requests in either json or xml

	API Implemented:
	----------------
	/api : The Root of the API
	 * Provides vdsm version information
	 * Lists the available sub-collections
	 Actions: None

2012-05-14  Dan Kenigsberg  <danken@redhat.com>

	remove stale libvirtNet before creating a new net with same name
	Vdsm is the owner of vdsm-bla networks. If for some reasons (such as
	vdsm being kill just after defining a libvirt network) we find a stale
	definition of the network, Vdsm should override it.

	v2: check if net is active/persistent before destroy/undefine to avoid
	    silly libvirt exceptions.

2012-05-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#788640 - Don't waste SD produces in validateSdUUID.

2012-05-13  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Configure vdsm to use syslog
	By default, rsyslogd doesn't listening on UDP port 514. So change to use
	the unix domain socket '/dev/log' instead of udp socket. Then we
	we needn't modify rsyslog.conf to make rsyslogd accpet message from udp
	socket.

	And rsyslogd puts a timestamp before the message automatically, so
	remove timestamp from the format 'sysform'

2012-05-13  Xu He Jie  <xuhj@linux.vnet.ibm.com>

	Move the creation of /data/updates out of init script
	Move the creation of /data/updates out of init script,
	make init script more simple.

	* move the creation of /data/updates to vdsm_reg/vdsm-reg-setup.in
	  vdsm-reg-setup can create '/data/updates' after host register to engine.

	* remove /data/updates after vdsm rpm uninstalled

2012-05-11  Douglas Schilling Landgraf  <dougsland@redhat.com>

	caps: fix osversion() report
	Replace 'if' statement with 'elif'. Otherwise, will report wrongly
	oVirt Node version/release.

2012-05-11  Adam Litke  <agl@us.ibm.com>

	Split xmlrpc server into its own rpm
	We would like to move towards a model where API bindings are optional.  This
	means that we can package each one separately any any combination of bindings
	can be enabled/disabled by editing the vdsm configuration file.  This patch
	splits the XMLRPC binding into a new package (vdsm-xmlrpc) and modifies the
	binding loading logic in clientIF to check the configuration file and handle
	import errors that can result if a user enables the binding but does not install
	the rpm.

	Make the xmlrpc binding run in a thread
	Currently, the xmlrpc binding runs in the vdsmd main thread.  To prepare for
	making xmlrpc optional, change the binding loading logic so that all bindings
	run in their own threads.  The vdsmd main thread will sleep until shutdown and
	then join() with any active binding threads before exiting.

2012-05-11  Wenyi Gao  <wenyi@linux.vnet.ibm.com>

	Fix usage message for vdsm-tool
	Fixed the following ussage message:
	print "Usage: %s [options] <action> <module>\n" % sys.argv[0]
	to:
	print "Usage: %s [options] <action> [arguments]\n" % sys.argv[0]

	Also fixed some pep8 problems

2012-05-11  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove GC lock hack, it's not needed when using betterPopen

	Implement Popen without forking back to python
	Python's implementation of Popen forks back to python before execing.
	Forking a python proc is a very complex and volatile process and we
	already have hacks to try and avoid some of the bugs involved with it.

	This is a simpler method of execing that doesn't go back to python after
	forking. This allows for faster safer exec.

	Should solve bugs involving with GIL\GC\Logging deadlocks related to the
	python implementation.

	This also makes means that python-devel and gcc are needed for testing
	as the extension needs to be compiled to be tested.

2012-05-10  Saggi Mizrahi  <smizrahi@redhat.com>

	Add netmaskconversions to dist
	the check phase fails when creating an RPM because this file is not
	distributed with the tar ball.

2012-05-10  Shahar Havivi  <shaharh@redhat.com>

	Create payload directory if not exists

2012-05-10  huntxu  <mhuntxu@gmail.com>

	replace ifconfig cmdline with ethtool and sysfs in netinfo
	Since ifconfig output format has been changed recently(see
	https://bugzilla.redhat.com/show_bug.cgi?id=784314), instead of parsing
	ifconfig's output, use ethtool module to get ip address and netmask
	of an interface, and get hardware address via
	/sys/class/net/INTERFACE/address.

	This makes vdsm could run normally on some bleeding edge distributions
	such as Archlinux or F17 on which new version ifconfig has already been
	deployed.

2012-05-10  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Clean the RHEVM parser help in deployUtil.py.in

2012-05-09  Zhou Zheng Sheng  <zhshzhou@linux.vnet.ibm.com>

	Let LC_ALL=C when running tests
	The function validateDDBytes() in vdsm/storage/misc.py needs C locale.
	When vdsm runs /bin/dd, the stderr output of /bin/dd is inspected by
	validateDDBytes(). Then the last line of the output is splitted by space
	and the 0th word is the total count of bytes transferred. In a locale
	like zh_CN.utf8(Chinese), the stderr output message is different from
	that in C locale. Although dd runs successfully, validateDDBytes() can
	not take out the count of the bytes transferred, and an exception
	will be raised.

	When vdsmd is started by vdsmd.init, LC_ALL is set to C to provide a
	compatible locale for vdsmd. However, when running tests, the locale is
	not set to C. So "make check" will fail in a zh_CN.utf8 locale in all
	tests related to dd, and this causes "autobuild.sh" and "make rpm" fail
	as well. So, set LC_ALL=C will provide a standard locale for running the
	tests.

2012-05-09  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Add unit tests to lsblk

2012-05-09  Federico Simoncelli  <fsimonce@redhat.com>

	Revert "Avoid to activate parent volume on cloning"
	This reverts commit 8f5edaea39141cc6174dffce33108596a4643d1e.

	Many volumes created with a previous VDSM version have a mismatch
	in the size advertised by the metadata and the virtual size defined
	in the the qcow2 header. At the moment the only solution is reverting
	to the hold behavior and propagate the mismatch (BZ#811880).

2012-05-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#815825: backup certs during registration
	During the registration of oVirt Engine in a oVirt Node, instead of
	remove cacert.pem and downloading the new cacert from Engine, is
	important to backup the current certs before going further.

	Besides, there is also a bug situation where the administrator of oVirt
	Node executes the Engine registration procedure, and the host doesn't
	get 'approved' (note: at this point cacert.pem from Engine already replaced
	the /etc/pki/vdsm/certs/cacert.pem) causing a failure in the next reboot
	on libvirt daemon startup. This happens because cacert.pem certificate
	file cannot be validated with vdsmcert.pem, so if we have a backup, we
	can easily revert it.

	For record, steps to reproduce the bug:

	- Install oVirt Node
	- Setup Network
	- Register the Node to oVirt Engine (do not approve)
	- Reboot. (libvirt will fail to start)

	Finally, there's also available a patch to libvirt.upstart
	(http://gerrit.ovirt.org/#change,3885) that adds a validation feature
	during the start of libvirt daemon, in order to check cacert.pem and
	vdsmcert.pem. In case of
	failure, upstart will look for the correct CA (backup file) in
	/etc/pki/vdsm/certs and replace the
	current cacert.pem. This approach can avoid the above bug description.

2012-05-08  Nigel Jones  <nigjones@redhat.com>

	BZ#809012 - Calculate metadata offset from logical block size
	Changes to ensure that V1 storage domain metadata area is not made dirty due to
	7e79153705891a91a06eb31cd642fb209d10ff86.

2012-05-07  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#752470 Related: Out of process getReadDelay
	To avoid being blocked by a thread in a D state we should determine the
	read delay using oop also for block devices.

2012-05-07  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Move get-vm-pid to superVdsm

2012-05-07  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	Clean the RHEVM log message in deployUtil.py.in

	add NOSE_EXCLUDE to avoid running the test twice
	when build vdsm by autobuild.sh, it runs the test twice for the same build.
	It takes a long time, add NOSE_EXCLUDE to avoid this.
	To skip test step, you can run "NOSE_EXCLUDE=.* ./autobuild.sh".

2012-05-07  Shahar Havivi  <shaharh@redhat.com>

	vm payload: add file injection to vm
	this patch adds new parameter to create verb vmPayload,
	user can send file content and have them in the vm in floppy (.vmf) or
	cdrom (.iso) format.

	vmPayload is in specParams
	'vmPayload': {'file': {'filename': 'content' }}
	for now we are only supporting file type in cdrom or floppy,
	we intend to add more formats such as network url which vdsm will
	download the file and place it in cdrom or floppy.

2012-05-07  Hans de Goede  <hdegoede@redhat.com>

	libvirtvm.py: Remove unnecessary constructor overriding

	vdsClient.py: Allow specifying nested dicts for devices when creating a vm
	With this patch one can do things like:
	vdsClient 0 create /dev/null \
	    vmId=00000001-0002-0003-0004-000000000006 vmName=F14-x86_64 memSize=512 \
	    macAddr=52:54:00:7a:b4:7e nicModel=virtio bridge=test display=qxl \
	    devices='{type:disk,device:disk,path:/home/virt-images/f14-i386.qcow2.img,propagateErrors:off,iface:ide,index:0,readonly:False,format:cow}' \
	    devices='{type:video,device:qxl,specParams:{vram:65536}}'

	Which allows testing vdsm with the new devices create params syntax from the
	cmdline with vdsClient.

	vm.py: Fix legacy disk support
	Creating vms with legacy disk parameters, ie hda=/path/disk.img would fail
	with a backtrace in clientIF:prepareVolumePath() with a missing attribute
	error for drive['device'], while at it also setup type properly (not strictly
	necessary, since getConfDrives will fill this in otherwise).

2012-05-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.init: rewritten listen_addr
	Default listen_addr should be the complete IPv4 address.

	Also resolves the following error:

	virNetSocketNewListenTCP:209: Unable to resolve address '0' service '16514': Address family for hostname not supported

	To reproduce the bug:

	1. Install oVirt Node.
	2. Register to first oVirt Node and do not approve it.
	3. Register to second oVirt Node and do not approve it.
	4. Reboot oVirt Node.

2012-05-06  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#807687 - Do not return new references to an invalid object.

2012-05-06  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix loop device handling for mount command
	loop devices sometimes appear as themselves and sometimes appear as the
	backing file. This canonicalizes the behaviour to always show the backing
	file.

2012-05-06  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#807687 - Adding log for debugging purposes.
	Note: We can't change the API returning an Error.

2012-05-06  Saggi Mizrahi  <smizrahi@redhat.com>

	Make ClusterLock stateless
	With it being stateless we no longer have issues with new domain objects
	not having to correct state

2012-05-06  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#812793 - Fix addNetwork to be able attach network to interface

2012-05-06  lvroyce  <lvroyce@linux.vnet.ibm.com>

	fix vdsm_reg makefile error
	register-to-engine was added to cleanup files,
	and will cause error when autobuild

2012-05-04  Bala.FA  <barumuga@redhat.com>

	Added register-to-engine command line tool.
	This tool accepts oVirt Engine name and register current node to the
	engine.

2012-05-03  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#812793 - Fix delNetwork to be able delete network interface

2012-05-03  y kaplan  <ykaplan@redhat.com>

	Add caps test

2012-05-02  Lei Li  <lilei@linux.vnet.ibm.com>

	Avoid skipping libvirt when add bridgeless network
	Change since V2
	    - Adjust subject and comment to make it more reasonable.

	Change since V1
	    - Move this validation into _addNetworkValidation based
	      on Dan's suggestion.

	The bridgeless network can not be added when the options contain
	skip libvirt. When I dig into the code, seems this type of network
	is supported by libvirt, but it will not do its real job if skip
	libvirt based on current logical in addNetwork. So set limitation
	to avoid such situation.

2012-05-02  y kaplan  <ykaplan@redhat.com>

	Change mathing to matching (typo)

2012-05-01  Shahar Havivi  <shaharh@redhat.com>

	mount: use sudo only of not root user

2012-05-01  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove support for string command
	Without the shell arg it's useless anyway as the command will fail
	anyway.

	Remove infile and outfile from execCmd, no one uses them
	All respectable tools that have a reason to write to disk have this
	option built in. This is why we never used or tested this feature.

2012-04-30  Adam Litke  <agl@us.ibm.com>

	doc: Add informational message for skipping tests

2012-04-30  wenchao xia  <xiawenc@linux.vnet.ibm.com>

	workaround pipe and thread issue in python
	  Calling subprocess.Popen and threading.Thread at the same
	time is not safe in Python v2.7.2. Running test case for
	several release, results are:
	  Fedora16: v3.2.2 and v2.7.3 pass, v2.7.2 fail.
	  Redhat6.2: v2.6.6 pass.
	  This patch modify the spec file to avoid the fails.
	  bugzilla:
	  https://bugzilla.redhat.com/show_bug.cgi?id=814492
	  cpython issue tracker solving the problem:
	  http://bugs.python.org/issue13156

2012-04-30  Federico Simoncelli  <fsimonce@redhat.com>

	Add vdsm_reg/engine.py to gitignore

2012-04-29  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix pep8 for alignmentScan.py

2012-04-29  Dan Kenigsberg  <danken@redhat.com>

	alignmentScanTests: use real-world sized image
	alignmentScanTests used a 1MiB image for its tests, which is not really
	similar to what happens in the real world. This revealed a bug in
	libguestfs-1.16.18-2.el6
	https://bugzilla.redhat.com/show_bug.cgi?id=815149

	Let us test the use case that we are interested in.

2012-04-29  Federico Simoncelli  <fsimonce@redhat.com>

	Use the correct size for createSparseFile in fileVolume

2012-04-26  Bala.FA  <barumuga@redhat.com>

	Added a forgotten @logDecorator

2012-04-25  y kaplan  <ykaplan@redhat.com>

	add for in hackVdsmModule  - taken from Adam Litke

2012-04-25  wenchao xia  <xiawenc@linux.vnet.ibm.com>

	Skip parted-utils test if pyparted is not installed.
	  At building time, if pyparted is not installed, test will
	fail breaking the procedure. This patch skip it in such
	condition.

2012-04-25  Joey Boggs  <jboggs@redhat.com>

	BZ#814413 - switch engine plugin to use system() instead of os.system to prevent screen alterations

2012-04-24  Federico Simoncelli  <fsimonce@redhat.com>

	The method readMultipathConf should return a list
	For backward compatibility with the previous implementation (using sudo
	and execCmd, see commit f869064) the readMultipathConf method should
	return a list of lines.

2012-04-24  Oved Ourfali  <oourfali@redhat.com>

	spec: remove the conflicts of ovirt-engine from vds_bootstrap section
	This commit removes the conflicts of ovirt-engine < 3.1 from the
	vds_bootstrap section in the spec file, as it is no longer needed.

	vds_bootstrap: changing the default to install virt to true
	Preivous patch added an option "-v" to enable virt installation.
	This made issues in backward compatability, as old engine couldn't
	install new client. Passing now -V to disable virt installation.

	vds_bootstrap: allowing the options n and u as paratemers
	Previous patch removed dead code, thus removing the options "n" and "u"
	from the vds_bootstrap, and it broke backward compatibility (old engine
	couldn't install new clients).

2012-04-24  Ryan Harper  <ryanh@us.ibm.com>

	vdsm/storage/misc.py: ensure uuid input is str or unicode for regex
	When abusing the createVolume() method by passing numeric values
	as UUIDs, the validation regex needs a string to process and
	throws an exception when it isn't:

	Traceback (most recent call last):
	  File "/usr/share/vdsm/storage/task.py", line 861, in _run
	    return fn(*args, **kargs)
	  File "/usr/share/vdsm/logUtils.py", line 38, in wrapper
	    res = f(*args, **kwargs)
	  File "/usr/share/vdsm/storage/hsm.py", line 1206, in createVolume
	    misc.validateUUID(imgUUID, 'imgUUID')
	  File "/usr/share/vdsm/storage/misc.py", line 525, in validateUUID
	    m = UUID_REGEX.match(uuid)
	TypeError: expected string or buffer

	And on the client side, I get a less than useful error:

	Traceback (most recent call last):
	  File "create_a_vm.py", line 98, in <module>
	    BLANK_UUID, BLANK_UUID))
	  File "create_a_vm.py", line 19, in vdsOK
	    raise Exception(str(d))
	Exception: {'status': {'message': "Error creating a new volume: ('sdUUID=99d43d50-5946-4451-8e12-9d85cb426e19, spUUID=150e55ab-e68c-411c-af30-587071905216, imgUUID=4194304, size=4, volFormat=2, preallocate=rootfs, diskType=7bdf7b4b-4909-41ce-a9c0-9bc06ba045fe, volUUID=00000000-0000-0000-0000-000000000000, desc=00000000-0000-0000-0000-000000000000, srcImgUUID=00000000-0000-0000-0000-000000000000, srcVolUUID=00000000-0000-0000-0000-000000000000',)", 'code': 205}}

	We can test that the input is str or unicode before attempting to regex
	if it's something else, raise an exception.

	Now, I get:

	Traceback (most recent call last):
	  File "create_a_vm.py", line 98, in <module>
	    BLANK_UUID, BLANK_UUID))
	  File "create_a_vm.py", line 19, in vdsOK
	    raise Exception(str(d))
	Exception: {'status': {'message': "Invalid parameter: 'imgUUID=4194304'", 'code': 1000}}

	Which explains to me my error quite well.

	V2 -> V3:
	    - change check to use isinstance(s, basestring) per Dan Kenigsberg
	V1 -> V2:
	    - Fix case where we pass in a string, but it's not a UUID as
	      Reported by Dan Kenigsberg <danken@redhat.com>

2012-04-24  Bala.FA  <barumuga@redhat.com>

	Added getMdDeviceUuidMap function in supervdsm.
	getMdDeviceUuidMap function returns all md/uuid map.  Sample return value
	is,

	{'/dev/md0': 'e35641fc:621a9fa8:123456e4:a1bc6b5f',
	 '/dev/md1': '95451662:3945780b:123456a7:f3ad55c5'}

2012-04-24  Ryan Harper  <ryanh@us.ibm.com>

	tests/misc: add utf-8 string test to validateUUID
	As requested, add a test case with a Chinese UTF-8 string.

	tests:miscTests add integer input test for validateUUID

2012-04-23  Dan Kenigsberg  <danken@redhat.com>

	API.py: fix pep8 noise
	commit a35c862341a4fa05e6 did not manage to completely make API.py
	conform to pep8, at least not with python-pep8-0.6.0-3.fc15.noarch

2012-04-23  Bala.FA  <barumuga@redhat.com>

	Added getDevicePartedInfo function in supervdsm.
	This function accepts device path and returns its information as
	dictionary.  Sample return value is,

	{'model': 'Virtio Block Device',
	 'sectorSize': 512L,
	 'type': 'gpt',
	 'freeSpaceRegions': [(34L, 2047L, 2014L, 1031168L),
	                      (16775168L, 16777182L, 2015L, 1031680L)],
	 'partitions': {'/dev/vda1': (['bios_grub'], 2048L, 4095L),
	                '/dev/vda2': (['boot'], 4096L, 16285695L),
	                '/dev/vda3': ([], 16285696L, 16775167L)}}

2012-04-23  Lei Li  <lilei@linux.vnet.ibm.com>

	Make API.py conform to pep8
	v1->v2
	    - Modify all the place to follow the rule that break around
	      a binary operator after the operator, and other small errors
	      suggested by Saggi.

2012-04-23  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#773210 - Avoid infinite loop when delete volume failed during the merge.
	This loop occurs at the end of the merge operation and if we failed
	to remove remnants at this point it's still OK.

2012-04-23  Lei Li  <lilei@linux.vnet.ibm.com>

	Improve usage for bridgeless network
	The usage of add/del network is still for bridge only network,
	It is useless and may cause confusion. So change it to keep
	consistence with current network.

2012-04-23  y kaplan  <ykaplan@redhat.com>

	add 2 info tests to hooks tests

2012-04-23  shu ming  <shuming@linux.vnet.ibm.com>

	Make blkid.py pep8 clean

2012-04-23  Federico Simoncelli  <fsimonce@redhat.com>

	Add volumeExists to the StorageDomain class

	Don't use qemu-img to create sparse file volumes
	It's not required to run volume.createVolume when we are creating a
	sparse file volume (see createSparseFile few lines above).

2012-04-23  shu ming  <shuming@linux.vnet.ibm.com>

	Clean the RHEVM log message in vdsm-reg-setup-in

2012-04-23  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#813423: Adding ENGINENAME macro
	To help backward compatibility, let's create ENGINENAME macro which
	will contain the engine name.

2012-04-23  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove (almost all) class Volume virtual (!) methods.

2012-04-23  ShaoHe Feng  <shaohef@linux.vnet.ibm.com>

	change the style of supervdsm.py code in order to comply with PEP 8

2012-04-21  Saša Tomić  <tomic80@gmail.com>

	VDSM interface for the virt-alignment-scan tool from libguestfs
	The libguestfs-tools rpm has an application called virt-alignment-scan.
	http://libguestfs.org/virt-alignment-scan.1.html
	Virt-alignment-scan scans the partition alignment in guest VMs and reports
	if a partition in guest VM is not aligned.

	This is a vdsm interface to virt-alignment-scan. It is now possible
	to scan the alignment of VM guest partitions directly from vdsm.
	In the future, it should be possible to expose this functionality
	through vdsClient.

2012-04-19  Saggi Mizrahi  <smizrahi@redhat.com>

	Skip test if sudo is not configured

2012-04-19  Yeela Kaplan  <ykaplan@redhat.com>

	Add hooksTests.

2012-04-19  Douglas Schilling Landgraf  <dougsland@redhat.com>

	getAuthkeysFile: try to download multiple ssh keys
	Try to download multiple ssh keys defined in
	REMOTE_SSH_KEY_FILE. Specially helping backward compatibility.

	delNetwork(): Add skipLibvirt validation
	Do not try to delete an interface from libvirt which was not added.
	Introduced by: 1a24550b968ca48bb808e263368743f4c91adde4

2012-04-19  Shahar Havivi  <shaharh@redhat.com>

	setVmTicket: add before and after hooks
	setVmTicket gets additional params dictionary,
	currently engine will send user-name and user-id, for
	the benefit of the setVmTicket hooks scripts.

2012-04-18  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove sudo parameter from watchCmd. No one uses it and no one ever will

	Make supervdsmServer.py conform to pep8

	Remove SUDO from readblockSUDO() no one uses it and no one should

	Read multipath.conf with supervdsm instead of SUDO

2012-04-18  Joey Boggs  <jboggs@redhat.com>

	fix console colors for engine plugin
	rhbz#813897

2012-04-18  Saggi Mizrahi  <smizrahi@redhat.com>

	Make logskip more pylint friendly

2012-04-18  lvroyce  <lvroyce@linux.vnet.ibm.com>

	fix check None sdUUID for getVmsList and getVmsInfo
	BZ#807719:getVmsList get broken when running without sdUUID
	when sdUUID given, validate domain uuid,
	when sdUUID is None, enumerate Vms from master domain of the pool
	v3>v2,
	change according to Ayal's comments,clear validate backup domain

2012-04-18  Federico Simoncelli  <fsimonce@redhat.com>

	Move libvirtconnection to the python sitelib

	Adding the qemuImg command line

2012-04-17  Douglas Schilling Landgraf  <dougsland@redhat.com>

	engine.py: improve password text
	Replace 'Set oVirt Engine Admin Password'. This text is confusing
	because in fact this option has nothing to do with the oVirt Engine
	admin password and in fact sets the root password for the node.

2012-04-17  Adam Litke  <agl@us.ibm.com>

	storageServer: Fix isConnected for LocalDirectoryConnections
	The current isConnected method for LocalDirectoryConnection objects checks if
	the source path exists.  It should instead check for the presence of the symlink
	in '/rhev/datacenter/mnt/.

	BindingXMLRPC: Check irs init status
	During vdsm initialization, it is possible that IRS will fail to initialize and
	will instead be None.  During API refactoring we added a TODO to the code to
	re-enable checking for this case.  In this patch, we check if cif.irs is None
	and if so, activate a default storage error message for all storage methods.

2012-04-17  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Add build time checks for required python modules
	With these checks configure will fail if required python modules can't
	be imported. The benefit is that it will fail faster, making it easier
	to notice dependency changes for packagers.

	The ax_python_module comes (unmodified) from the GNU autoconf archive.

2012-04-17  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove writefileSUDO() no one uses it

	Add persistentDictTests

2012-04-16  Saggi Mizrahi  <smizrahi@redhat.com>

	Add missing \ to Makefile.am

2012-04-16  Ryan Harper  <ryanh@us.ibm.com>

	pylint:vdsm/netinfo.py rename local vars to avoid overload with global func.
	************* Module netinfo
	E:377:NetInfo.getNicsVlanAndBondingForNetwork: Function 'nics' has no 'append' member

	The global function nics() is confusion pylint with the local 'nics' list;
	remedy this by renaming the local variables.

	V2->V3
	    - change the local vars instead of global func
	V1->V2
	    - change function name to use mixedCaps

2012-04-16  lvroyce  <lvroyce@linux.vnet.ibm.com>

	fix circular reference of storage pool
	master storage domain can not be freed because storage pool refers to it.
	storage pool can't be freed because upgradeCallback is a partial function
	which refers to itself, making this a circular reference,
	using proxy of storage pool instead of real ref in upgradeCallback
	makes them freeable.

2012-04-16  Saggi Mizrahi  <smizrahi@redhat.com>

	Make resource manager stress test use 75% of allowed nprocs instead of a fixed number

	Fix processPool.py to conform with pep8

	BZ#802759 - Make old FD shutdown a bit more robust

2012-04-16  Federico Simoncelli  <fsimonce@redhat.com>

	Add the the debug plugin client

	Fix typo in the IscsiInterface class

2012-04-16  Ryan Harper  <ryanh@us.ibm.com>

	pylint: vdsm/libvirtvm.py
	E:914,11:NetworkInterfaceDevice.__init__: Access to member 'nicModel' before its definition line 915

	Modify the kwarg dict before device init.

2012-04-16  Saggi Mizrahi  <smizrahi@redhat.com>

	Add betterThreadingTests

2012-04-16  Lee Yarwood  <lyarwood@redhat.com>

	BZ#809012 - Remove physical block size limitations
	Corrects limitations set against the logical and physical block size of
	a device.

2012-04-16  Igor Lvovsky  <ilvovsky@redhat.com>

	isBlockDevice should fail for empty cdrom/floppy. Don't need traceback in the log.

2012-04-12  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix build-aux version scripts so that internal tags don't confuse them

2012-04-11  Igor Lvovsky  <ilvovsky@redhat.com>

	Compare Drive according to its name during lvextend
	There are several disks can be attached to each VM, but not all of them
	define as 'vdsm image' ( define by quartette: Pool,Domain,Image,Volume).
	VDSM support volume extend only for the disks that defined as 'vdsm image'.

2012-04-10  Saggi Mizrahi  <smizrahi@redhat.com>

	Don't escape colors if not a tty

2012-04-10  y kaplan  <ykaplan@redhat.com>

	define two tests as slowtest

2012-04-09  Saggi Mizrahi  <smizrahi@redhat.com>

	Add slowtests plugin
	Plugin slowtests
	  Skips tests that might be too slow to be run for quick iteration
	  builds

	  Options:
	    --without-slow-tests
	          Some tests might take a long time to run, use this to skip slow
		  tests automatically.  [NOSE_SKIP_SLOW_TESTS]

	Ergo, you can set the aforementioned env variable to have make skip slow
	tests. As what a "slow test" is debatable I just marked one test as
	slow. The rest will have to be suggested in future patches and
	go through the regular review process before deemed slow.

	To mark a test a slow use the slowtest decorator from the
	testValidation module.

	Add forgotten files to all-local so they would exist even wihtout installing vdsm

	Fix import error when running vdsm tests

2012-04-09  y kaplan  <ykaplan@redhat.com>

	Added guestIFTests

2012-04-09  Saggi Mizrahi  <smizrahi@redhat.com>

	Add fileUtil unit tests

2012-04-08  Dan Kenigsberg  <danken@redhat.com>

	fix broken pyflakes check

2012-04-08  Douglas Schilling Landgraf  <dougsland@redhat.com>

	configure.ac: Add validation for python-nose
	Avoid make check and make rpm errors due a lack of python-nose.

2012-04-08  Mike Burns  <mburns@redhat.com>

	make ovirt-node detection more robust
	rhbz#806555

2012-04-05  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix inconsistencies with new connection management API

	Add pep8 checks to build process
	This adds pep8 verification check. pep8 is the recommended styling for
	python. The pep8 tester doesn't check all of the style recomendations
	but it does help. Currently most of our code doesn't conform, so in
	order to integrate it slowly there is a whitelist declared in
	/Makefile.am.
	When fixing a file to conform please add the file to the whitelist so
	that after the patch is submitted the file will be tracked for
	conformance.

	More about pep8
	http://www.python.org/dev/peps/pep-0008/

	Make misc.py conform with pep8 again

	Add processPool unit tests

	Add resource manager unit tests

	Add unit tests for misc.py

	Make main.py confrom to pep8

	Integrate nosetests to vdsm testing
	This patch integrates nosetests into the vdsm testing pipeline. This
	gives us a more advanced framework to write tests around.

	`make check` still works as expected. In order to run tests
	individually or with different options use /tests/run_tests.sh.
	To learn more about nose tests you could run
	`./run_tests.sh -h` or go to the nose documentation.

	http://readthedocs.org/docs/nose/en/latest/#

	This also introduces the VdsmTestCase base class. There is no need to
	inherit from it but it will set up a logger for you that in the future
	will be used to log out intermidate test information for long tests.

2012-04-05  Federico Simoncelli  <fsimonce@redhat.com>

	Integrate SANLock with VM's life cycle

2012-04-05  Adam Litke  <agl@us.ibm.com>

	Define some constants in API.py
	The API bindings should be implemented in terms of the API bridge (API.py) and
	not rely on vdsm internals.  Currently the xmlrpc binding imports some internal
	modules in order to provide some default values (ie. BLANK_UUID and volume
	constants).  Constants that are needed at the API level need to appear in
	API.py.

	This patch converts the obvious offenses.  If this approach is acceptible I will
	follow up with additional patches.  In the future, APIs that take 'magic'
	parameters must formally define the valid values in API.py.

2012-04-05  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#804640 Image.getChain must work with multiple leaves
	The method Image.getChain() should be able to work also when the image
	has multiple leaves (preview mode).

2012-04-04  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#773210 - Avoid infinite loop when delete volume failed during the merge

2012-04-03  Deepak C Shetty  <deepakcs@linux.vnet.ibm.com>

	nfs-check improvements
	Adds nfs trouble shooting wiki link and shows
	the same in case of an error and also fixes the
	wrong uid:gid issue when removing testfile.

2012-04-03  Igor Lvovsky  <ilvovsky@redhat.com>

	bootstrap: installation now requires libvirt when defining mgmt network

2012-04-03  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#804640 Modify Image.getChain to return a subchain
	The method Image.getChain was returning the entire image chain. Now
	it's possible to specify an (optional) volUUID to return a subchain
	from the base up to volUUID.

2012-04-03  Roi Dayan  <roi.dayan@gmail.com>

	Added iSER support enabled with a configuration option.
	When used VDSM will try to connect with iser and fallback
	to default on failure.

2012-04-02  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#807642 Add TestSecurable safety test
	The test makes sure that all the Securable classes have different
	_safety (Event) objects.
	The metaclasses are used to generate new types (at import time); the
	_safety Event therefore was created only once and inherited by all the
	objects created later on.

2012-04-02  Peter V. Saveliev  <peet@redhat.com>

	fix LV_ATTR_BITS for use with lvm 2.02.95(2)-RHEL6
	lvs in this version has two more attrs

2012-04-02  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#807642 Use Securable as base class
	Using Securable as base class allow us to take the best of metaclasses
	(being able to modifying methods at import time) and the best of
	subclassing (explicit inherited methods such as __init__, _setSafe and
	_setUnsafe).
	It's also now possible to instantiate attributes per object (__init__)
	instead of per class and therefore fix BZ#807642.

	Using supervdsmServer.py when present

2012-04-02  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#808116 - Fix post-zeroing process during deletion of preallocated volumes

2012-04-02  Saggi Mizrahi  <smizrahi@redhat.com>

	Added some documentation to the connection management verbs

2012-04-01  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm: fix make distcheck
	ERROR: files left in build directory after distclean:
	./vdsm/constants.py
	./vdsm/config.py
	./vdsm/dumpStorageTable.py
	./vdsm_cli/vdscli.py
	make[1]: *** [distcleancheck] Error 1

2012-04-01  Saggi Mizrahi  <smizrahi@redhat.com>

	Support unicode in domain and pool description

2012-04-01  Dan Kenigsberg  <danken@redhat.com>

	dispatcher: drop Unicode-less validation

2012-04-01  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#805273 Fix LVM preferred names

2012-03-29  Danny Rankevich  <danny.ran@redhat.com>

	vdsm: error when creating a bond/nic with more than one network attached
	When creating a Bond or Nic with more than one network attached, the
	code breaks since it is expecting a dictionary, but a list is used.
	This fix creates the dictionary in the correct way.

2012-03-29  Haim Ateya  <hateya@redhat.com>

	Fix bad import preventing SuperVdsm to start

2012-03-29  Federico Simoncelli  <fsimonce@redhat.com>

	Add partial live merge
	Let's activate the partial live merge (libvirt supports it).

	Use the _REUSE_EXT flag in snapshotCreateXML
	The _REUSE_EXT flag is needed to use an external snapshot file that is
	already present (in our case created by the SPM).
	We need to require libvirt-0.9.10-9 for RHBZ#807147 that makes the flag
	fail in some situations.

2012-03-29  Saggi Mizrahi  <smizrahi@redhat.com>

	Make misc.py conform pep8 and other minor cleanup

2012-03-29  Dan Kenigsberg  <danken@redhat.com>

	Revert "added a very very simple test for the function filterXmlChars in the guestIF module"
	This reverts commit 14e80f5e65cd2d11a00987ba3f8b8e1bc5021107 as it fails common `make`.

2012-03-28  Douglas Schilling Landgraf  <dougsland@redhat.com>

	nfs-check: Add except socket.gethostbyname()
	Avoid exception when cannot resolve localhost.

2012-03-28  Shahar Havivi  <shaharh@redhat.com>

	added support for mirror promisc mode
	let ability to VM to monitor (mirror) all other VMs in the same host by
	specific network (bridge)

	Currently there is no protection agains mirroring a network twice,
	unsetting mirror network will clear both mirroring (on the same network).

2012-03-28  y kaplan  <ykaplan@redhat.com>

	added a very very simple test for the function filterXmlChars in the guestIF module

2012-03-28  Dan Kenigsberg  <danken@redhat.com>

	spec: VIR_DOMAIN_DESTROY_GRACEFUL is only in libvirt-0.9.10

2012-03-28  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix required libvirt version for new VIR_DOMAIN_DESTROY_GRACEFUL support

	Assign proper PCI address to each video/sound device

2012-03-27  Federico Simoncelli  <fsimonce@redhat.com>

	Use certtool to generate the certificates
	Using certtool is easier (commands are easy to understand and maintain),
	requires less steps (at least 1 less: the crt request), and it's the
	tool suggested by libvirt in the documentation (this should limit the
	mismatches). Achieving the same thing with openssl would have required
	shipping a openssl.cnf and having a temporary certificate request to be
	self-signed.

2012-03-27  Bala.FA  <barumuga@redhat.com>

	Added getMountFromDevice function.

2012-03-27  Saggi Mizrahi  <smizrahi@redhat.com>

	Make sure that internally we always use pvs from /dev/mapper/
	This is of course wrong, but I don't want to start figureing out all the
	places where we assume PVs sit under /dev/mapper. A proper fix will be
	pushed we I have the time to do all this work.

2012-03-27  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#806757 - Update video and sound devices of running VM with full info from libvirt

2012-03-26  y kaplan  <ykaplan@redhat.com>

	No tearDownVolumePath function exists, changed to teardownVolumePath

2012-03-26  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix old 'klass' joke in setMaxOutgoingMigrations definition.
	It was harmless, but let's get rid from this now.

2012-03-25  Igor Lvovsky  <ilvovsky@redhat.com>

	Try to destroy VM gracefully

2012-03-23  Saggi Mizrahi  <smizrahi@redhat.com>

	Have sdc.py pass pep8

2012-03-22  Saggi Mizrahi  <smizrahi@redhat.com>

	Create mount base path on hsm initialization

2012-03-22  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#805444 - Do not link unrelated domains under pool

2012-03-22  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#804618 vdsmImport should load the vdsm package

2012-03-22  Haim Ateya  <hateya@redhat.com>

	BZ#804618 - Fix import ERROR on vds_bootstrap

2012-03-20  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#804618 Add legacy imports to bootstrap

2012-03-20  Dan Kenigsberg  <danken@redhat.com>

	cman is no longer conflicting with Vdsm
	In prehistoric RHEL5 era, cman carried a set of fence-agents that conflicted with
	RHEV's flavor of fence-agent. fence-agents were later repackaged and now cman
	can be installed on the same host as Vdsm.

2012-03-18  Igor Lvovsky  <ilvovsky@redhat.com>

	Remove unneeded 'getIpAddresses' import

2012-03-18  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#803754 - Fix file mangling for localfs connections

	fix forgotten properties in NfsConnection

	pass missing arg to devicemapper.getSlaves

	Remove unused methods from hsm

2012-03-18  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#787709 - Do not validate IP existence during setup network

2012-03-18  Dan Kenigsberg  <danken@redhat.com>

	BZ#787728 configNet: restore backup on connectivity failure
	v2:
	    - do not try to call restoreAtomicBackup twice
	    - maintain the content of configWriter when changing multiple
	      networks

2012-03-18  Saggi Mizrahi  <smizrahi@redhat.com>

	Cut the line in a different place so pylint doesn't complain

2012-03-16  Saggi Mizrahi  <smizrahi@redhat.com>

	Removed unused method

2012-03-16  Dan Kenigsberg  <danken@redhat.com>

	do not croak on mountpoint with space and digit
	A mountpoint with ' 09' gave me the following error

	    return _RE_ESCAPE.sub(lambda s: chr(int(s.group()[1:], 8)), path)
	ValueError: invalid literal for int() with base 8: '04009'

	since the code concatenates 09 to 040 (octal for space).

2012-03-15  Eduardo Warszawski  <ewarszaw@redhat.com>

	Backing VG's should be named as SD name. Renaming VG's is not supported.

2012-03-15  Bala.FA  <barumuga@redhat.com>

	Added lsblk tool support in supervdsm.
	lsblk tool is used to get block device information.
	Now supervdsm has a function getLsBlk which returns all block
	device information as dictionary.  Sample return value is,

	{'sda': {'FSTYPE': '', 'KNAME': 'sda', 'UUID': ''},
	 'sda1': {'FSTYPE': 'ext4',
	          'KNAME': 'sda1',
	          'UUID': '12345678-0c05-1111-2222-1234567890d6'},
	 'sda2': {'FSTYPE': 'swap',
	          'KNAME': 'sda2',
	          'UUID': '12345678-1111-2222-3333-12345678903c'}}

2012-03-15  Saggi Mizrahi  <smizrahi@redhat.com>

	Removed unused imports from clientif

2012-03-15  Oved Ourfali  <oourfali@redhat.com>

	vds_bootstrap: add flags for installVirtualizationService and installGlusterService
	This commit adds two more flags to the vds bootstrap
	that denote whether in install virt/gluster services on the host.
	Currently it will only have an effect on whether we run virt test on
	the host before installation or not

2012-03-15  Dan Kenigsberg  <danken@redhat.com>

	BZ#729251 vds_bootstrap: drop dead netconsole/vdcrepo code
	When http://gerrit.ovirt.org/1848 and http://gerrit.ovirt.org/1689 are taken
	into Engine, -u and -n options to vds_bootrap would never be passed.

	Remove this dead code.

2012-03-15  Bala.FA  <barumuga@redhat.com>

	Added blkid tool support to get device for uuid.
	getDeviceByUuid accepts uuid and returns block device of the uuid.

2012-03-15  Derrick Ornelas  <dornelas@redhat.com>

	dumpStorageTable: search deeper for vms list

2012-03-15  Eduardo Warszawski  <ewarszaw@redhat.com>

	Restore direct lun functionality.
	Using vdsClient:
	vdsClient 0 create /dev/null vmId=<uuid> vmName=<vm_name> memSize=256 macAddr=aa:bb:dd:aa:bb:cc bridge=rhevm nicModel=pv display=vnc devices='index':0,'iface':'ide','format':'raw','type':'disk','readonly':'False','device':'disk','propagateErrors':'off','GUID':<guid>

2012-03-14  Haim Ateya  <hateya@redhat.com>

	Fix TypeError when using se.iSCSIDiscoveryError without any params

	BZ#800915 - no need to support list in removeVM command
	Since engine-core use string in removeVM command and never sends vdsm a
	list of vms, there is no need to support it in the code.

	change-Id: I4a0e5848ece1aa147f4508d4d16842bcdb30af0d

2012-03-13  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#802229 - Fix missing tpgt argument handling

	BZ#802347 try and not access iscsid concurrently

2012-03-12  Federico Simoncelli  <fsimonce@redhat.com>

	Add the device type in the snapshot dictionary
	Since commit 3c1dad8 (Fix vdsm disks ops for the new API) it is required
	to pass the device type to prepareVolumePath.

2012-03-09  Federico Simoncelli  <fsimonce@redhat.com>

	VDSM-Reg should not import vdsm.config

2012-03-09  Roi Dayan  <roi.dayan@gmail.com>

	read iscsi session info properly
	read from /sys/class/iscsi_session and /sys/class/iscsi_connection directories
	instead of /sys/devices/platform/host*/

2012-03-09  Gal Hammer  <ghammer@redhat.com>

	Updated threading.Lock acquire to a more Python-like mean.

2012-03-07  Federico Simoncelli  <fsimonce@redhat.com>

	Fix minor issues in the iscsi module

2012-03-06  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Use urllib.urlencode to build URI parameters

	Clean up logging in vdsm-reg-setup.in

2012-03-06  Dan Kenigsberg  <danken@redhat.com>

	oops, fix a bad rebase

2012-03-06  Saggi Mizrahi  <ficoos@gmail.com>

	Minor text fixes

	New connection management API
	Connection are no longer managed directly. A client uses references to
	the actual connection and VDSM manages the actuall lifcycle of the
	objects.

	More information at http://www.ovirt.org/wiki/Features/ConnectionReferences

2012-03-06  Saggi Mizrahi  <smizrahi@redhat.com>

	Implement storage server connection monitoring
	This is the actual connection monitoring. Takes aliased connection
	Information and makes sure everything is connected. It will disconnect a
	connectino once there are no aliases referencing it.

	Implement storage server connection aliasing
	This is the actual perstiance mechanism for the connection info. It
	saves all the information needed to create a connection object in memory
	on disk.

	Refactor storage connection subsystem
	Currently connection management is an abysmal mess. This is a
	transitional patch
	retrofitting the old API to some of the concepts we intend to implement.

	Notice:
	Permissions are no longer checked on storage connect only on domain
	initialization. This is good as the storage connection is far from an
	appropriate place for that check.

	I've removed stale root folder handling for NFS. I will add it back I
	can't do everything at once.

	There are also no proper engine acceptable exceptions yet

	ISCSI Subsystem refactoring
	!!Do not apply without following patch!!

	Currently the iscsi subsystem is a mess of list concatenation.
	This refactoring tries to:
	    - Make variable and object naming consistent and in line with iscsi
	      terminology.
	      Note that:
	        * portal now refers to an ISCSI Portal and not a tpgt
	        * ISCSI interfaces are modeled so that initiator name is
	          actually property of the interface and not its identity
	    - Make a coherent object hierarchy of the ISCSI objects. Functions
	      now expect to get ISCSI objects (like portal, target) instead of
	      scattered arguments that have to be validated and parsed every
	      time.
	    - Make the ISCSI interface a 1st class member. Up until now support
	      for multiple interfaces was amateurish at best.
	    - Support for different credentials for discovery and target. Ground
	      work to support authentication methods other then CHAP.
	    - Thin wrap around iscsiadm to separate cmdline parsing from actual
	      VDSM iscsi logic

	Stuff known to be broken:
	    - implicit interface creation. As this was never officially
	      supported by VDSM I will not bring this back.
	    - tpgt is ignored. This is in line with old VDSM behaviour.

	Note that the confusing naming is still used by the old API calls for
	backward compatibility. New API calls should try and use correct naming
	and format!

2012-03-06  Federico Simoncelli  <fsimonce@redhat.com>

	Initial live block migration API

	Update the live merge implementation
	In this patch:
	* Add the support for partial merges (blockRebase)
	* Handle all the corner cases when vdsm is restarted

	Add the vdsm-tool command

	Move the VDSM common code to the python site lib
	Some VDSM code is shared between different components (eg: vdsm and
	vdsm-cli share vdscli.py) and some modules have a really common name
	(eg: utils, config) risking to collide with other packages.
	For these two reasons and for cleanliness some modules are moved to
	a new location (the standard python site lib) and they can be shipped
	in a different package.

2012-03-06  Saggi Mizrahi  <ficoos@gmail.com>

	Minor cleanup in processPool

	Release logging module lock after fork

2012-03-06  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Remove another instance of traceback.format_exc

2012-03-06  Dan Kenigsberg  <danken@redhat.com>

	drop three ancient rotting files
	No idea why Tabula Rasa did not do his trick on them.

2012-03-06  Gal Hammer  <ghammer@redhat.com>

	A new method to read from VMs' channels.
	Replaced having a thread-per-VM that monitors and reads from the
	VM's virtual channel with a 1-thread listener that handles all
	VMs' channels.

	This patch should reduce vdsm's memory usage consumed by memory
	overhread of each thread.

2012-03-06  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#798211 - Normalize hibernation images

2012-03-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix NETPREFIX AttributeError.
	Constant was removed in Change-Id: Id7a3efea92.

2012-03-01  Dan Kenigsberg  <danken@redhat.com>

	BZ#797354 drop enic from modprobe.d/vdsm.conf

2012-03-01  Federico Simoncelli  <fsimonce@redhat.com>

	Initial live merge implementation

2012-03-01  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Replace most traceback.format_exc() calls by exc_info

2012-02-29  Federico Simoncelli  <fsimonce@redhat.com>

	Initial unit tests implementation

	Fix make distcheck errors

2012-02-27  Dan Kenigsberg  <danken@redhat.com>

	BZ#737104 Disallow cross-vendor virtualization

2012-02-24  Federico Simoncelli  <fsimonce@redhat.com>

	Automatically detect qemu-kvm path in vdsm-faqemu

2012-02-24  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Fix typo

2012-02-24  Doron Fediuck  <dfediuck@redhat.com>

	boostrap completion: Restart vdsmd service.
	Recently we've fixed the functionality which avoids
	reboot once bootstrap is completed. However, the vdsmd
	service requiers restart in order to pick up the new
	configuration and the new certificates issues during
	the bootstrap.

	This patch uses the same logic as the ovirt-node reboot
	function, which reboots the machine or restarts the
	vdsmd servide when reboot is avoided.

2012-02-23  Eduardo Warszawski  <ewarszaw@redhat.com>

	Tuple is cheaper than list.

	Fix minor log issue.

2012-02-22  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix typo in log message

2012-02-21  Federico Simoncelli  <fsimonce@redhat.com>

	Release the host ID only when dom is defined

2012-02-21  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix vdsm disks ops for the new API.

2012-02-21  Igor Lvovsky  <ilvovsky@redhat.com>

	Revert "Fix remotePath comparison in getStorageDomainsList".
	This patch broke filtering in getStorageDomainsList query

	This reverts commit fe22ef5fe9893bbf7ba02c4fc2e83e4f6c2197dc.

2012-02-21  Doron Fediuck  <dfediuck@redhat.com>

	boostrap completion: fix no reboot function and report.
	This patch fixes the functionality of no reboot as a
	given argument to the script. So using 0 will avoid
	rebooting and anything else will continue rebooting
	as it did so far.

	Additionaly the vds_bootsrap_complete XML report was corrected;
	when the script is being asked not to reboot the machine,
	so the operation is still considered to be a success.

2012-02-20  Dan Kenigsberg  <danken@redhat.com>

	migrateCancel: properly fix another typo

2012-02-19  Dan Kenigsberg  <danken@redhat.com>

	libvirtvm.Drive: compute blockDev locally
	There is no need to expose the blockDev boolean in Vdsm API; but it
	should exist in any Drive.

	task.py: avoid overtly silly casting to str()
	For a reason unknown (to me), task.py does not use pickle to persist its
	data to file. We cannot fix that without breaking
	backward-compatibility. However, we can avoid pointless casts to str,
	and can encode data to utf8 before storing to disk.

	Note that this patch does not solve BZ#567077 as the storage subsystem
	prevents entry of Unicode arguments. This prevention must be kept
	for old storage domain formats.

	BindingXMLRPC: fix typo

2012-02-19  Saggi Mizrahi  <smizrahi@redhat.com>

	This us a useful method for converting namedtuples to dictionaries

2012-02-19  Haim Ateya  <hateya@redhat.com>

	Reduce log verbosity for unknown devices from error to warn

2012-02-19  Saggi Mizrahi  <smizrahi@redhat.com>

	Make validateStorageServerConnection API call a noop
	This call is useless and slow. It check different things in different
	levels for different storage types and does not guarantee a future
	connect will succeed. Until someone actually defines what is actually
	being validated (params? hostname? permissions? authentication tokens?)
	I suggest to just disable this verb so it doesn't make any NFS
	connection take twice as long and be exponentially more complex.

	Fix connectStorageServer doc string

	Fix remotePath comparison in getStorageDomainsList
	Note that filtering getStorageDomainsList according to remotePath is
	still broken for block domains (luckily it is never used).

2012-02-19  Shahar Havivi  <shaharh@redhat.com>

	add/del network - add bridgesless network

2012-02-19  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#790014 Fix multiple issues in detachSD
	In this patch:
	* Remove __unmountLastMaster, the manager cannot deactivate the master
	  storage domain (where the SPM resource is hold)
	* Move all the checks related to the master migration inside masterMigrate
	* detachSD cannot be used to migrate a master

	Note that this patch makes it possible to deactivate a master domain
	(thus breaking the pool) even if there are other active domains in the
	pool. A future patch should discuss if reverting to the old semantics is
	necessary, and if so - how it should be done.

2012-02-19  Eduardo Warszawski  <ewarszaw@redhat.com>

	Restore optional drive cap.

2012-02-17  Federico Simoncelli  <fsimonce@redhat.com>

	Improve the lvm.USER_DEV_LIST parsing
	In this patch:
	* Remove the ConfigParser.Error exception handling (impossible)
	* Filter out empty strings

2012-02-16  Shahar Havivi  <shaharh@redhat.com>

	Clean libvirt networks if bridge not exists

2012-02-16  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Flip execCmd default to sudo=False

2012-02-16  Adam Litke  <agl@us.ibm.com>

	storagePool: Reject unknown method in uploadVolume
	Address a previously identified TODO in the code and report an error if a method
	other than 'wget' or 'rsync' is specified.

2012-02-16  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Add myself to the authors list

2012-02-15  Igor Lvovsky  <ilvovsky@redhat.com>

	Allow drive devices without indices

2012-02-15  Dan Kenigsberg  <danken@redhat.com>

	configNet: drop local reimpl of utils.tobool

2012-02-14  Federico Simoncelli  <fsimonce@redhat.com>

	Move dumpStorageTable from vdsm_cli to vdsm
	The dumpStorageTable.py script is used by the sos plugin shipped with
	vdsm.

	VDSMBRIDGE doesn't need a special expansion

	Fix RHEL qemu-kvm requirements

2012-02-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	fix spmStop failure
	SPM_ID pool key is written after we are not SPM anymore.
	(By design.)

2012-02-14  Adam Litke  <agl@us.ibm.com>

	Log exceptions when calling irs functions from XMLRPC (V3)
	Changes since V2:
	 - Use style log.error("error message", exc_info=True)
	Changes since V1:
	 - Return errcode['unexpected'] instead of raising an exception

	An earlier change I made introduced a bug in API.py that triggered an exception
	when calling the 'getDeviceList' XMLRPC call.  Unfortunately the server-side
	exception was not logged anywhere (which made debugging more difficult).  This
	patch adds exception logging for irs methods (note: wrapApiMethod already does
	this for the other calls).

2012-02-13  Saggi Mizrahi  <smizrahi@redhat.com>

	Implement __hash__ for mount objects
	mount.Mount.__eq__ is already defined, so we should have __hash__ as
	well to make Mount properly hashable.

2012-02-13  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsClient: drop clearAsyncTask
	Removed clearAsyncTask

2012-02-13  Federico Simoncelli  <fsimonce@redhat.com>

	Fix CpuInfo.cores() for missing IDs in cpuinfo

2012-02-13  Dan Kenigsberg  <danken@redhat.com>

	fix broken migration

2012-02-13  Ewoud Kohl van Wijngaarden  <ewoud@kohlvanwijngaarden.nl>

	Clean up flowID logging
	This change should prevent empty IDs being logged.

2012-02-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Revert "Fix getMasterDomain masterVersion handling"
	This reverts commit ce280b09c776b33203847dc7e7ad77ee90a34bc0.

	masterVersion is an exclusive property of RHEV-m.
	There are no RHEV-M flows that not send the expected version.
	All VDSM flows should have an expected version.
	Towards a masterVersion (>0) meaning a master domain and
	removing redundant metadata fields as isMaster, etc.

2012-02-12  Shahar Havivi  <shaharh@redhat.com>

	added mtu support for network interface

2012-02-12  Gal Hammer  <ghammer@redhat.com>

	Added an option to create a memory balloon device.
	A support for a virtual memory balloon device was added
	to the "devices" configuration.

2012-02-12  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Adding flowID
	This patch will implement the flowID schema in vdsm side. The idea is
	provide a mechanism to identify the flow between ovirt engine and vdsm API calls
	in order to identify the entire scope of the backend action
	(which possibly consisted of several VSDM calls). At moment, we are
	going to use HTTP headers to implement this feature to keep the
	compability with current API, avoiding possible breakes.

2012-02-12  Shahar Havivi  <shaharh@redhat.com>

	addNetwork in BindingXMLRPC is not forwarding options

2012-02-12  Igor Lvovsky  <ilvovsky@redhat.com>

	NIC model should be converted from 'pv' to 'virtio'

2012-02-12  Dan Kenigsberg  <danken@redhat.com>

	BZ#785717 caps: cpuCores should report only physical cores
	CPU Hyper-Thread shows up as a processor in /proc/cpuinfo, but does not amount
	to a physical core.

2012-02-10  Rami Vaknin  <rvaknin@redhat.com>

	Mailbox: Use EXT_DD instead of dd

2012-02-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	_createXMLRPCServer: avoid some code duplication

2012-02-08  Saggi Mizrahi  <smizrahi@redhat.com>

	Happy new year hsm.py

2012-02-08  Eduardo Warszawski  <ewarszaw@redhat.com>

	Adding optional startupPolicy for (file) cdrom and floppy.

2012-02-08  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BindingXMLRPC: Initialize s.lastClient as IP
	Fix the error: illegal IP address string passed to inet_aton

2012-02-07  Dan Kenigsberg  <danken@redhat.com>

	Adam Litke is an AUTHOR

2012-02-07  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#787722 - Make the spm internal lock an RLock
	This will prevent the object from deadlocking itself when moving between
	protected areas in related methdos.

2012-02-07  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Fix another mac address comparison issue caused by letter case.

2012-02-07  Dan Kenigsberg  <danken@redhat.com>

	have an empty lastClient on xmlrpc startup

	BZ#787710 configNet: allow multiple nets

2012-02-06  Adam Litke  <agl@us.ibm.com>

	Fix typo in xmlrpc bindings registration
	Fix a typo in the xmlrpc binding that was causing the mergeSnapshots command to
	be misnamed.

2012-02-06  Haim Ateya  <hateya@redhat.com>

	BZ#787594 - Enable fenceSpmStorage on hsm nodes

2012-02-06  Douglas Schilling Landgraf  <dougsland@redhat.com>

	contrib: Adding contrib/nfs-check.py
	nfs-check is a python script to validate nfs targets.
	Currently, nfs-check mount the nfs target, create a file as vdsm:kvm
	and remove it. If any of these operations fails, the script will make
	suggestions to make the NFS server available for the tests.

	$ sudo python nfs-check.py
	Usage: nfs-check.py server:/target

2012-02-05  Dan Kenigsberg  <danken@redhat.com>

	BZ#785557 bootstrap: do not mark ifcfg as NM_CONTROLLED
	Network devices created by Vdsm should not ask to be controlled by
	NetworkManager. Particularly when NM does not support controlling them
	(bridge device).

	However, we require that the non-default network.service is started in
	order to control them.

	BZ#773371 call `vdsmd reconfigure` after bootstrap
	If installation change ssl from False to True and added valid
	certificates, we need to reconfigure vdsm to use it.

	This was done by the "reconfigure" verb for our SysV daemon, but
	unsupported by systemd.

	This patch is an ugly hack for an oVirt release, until we have a proper
	vdsm-tool for these purposes.

2012-02-05  Shahar Havivi  <shaharh@redhat.com>

	promisc hook: release monitor traffic on before_vm_destory
	after_vm_destroy is too late to release tc monitor traffic,
	moving the event to before_vm_destroy event.

2012-02-05  Igor Lvovsky  <ilvovsky@redhat.com>

	Add hotPlug/hotUnplug NIC feature

	Add hotplugNic/hotunplugNic feature to vdsClient.
	Usage: vdsClient 0 hotplugNic|hotunplugNic vmUUID <nicspec>

	'nicspec parameters list: r=required, o=optional',
	 'r   device: bridge|sriov|vnlink|bridgeless.',
	 'r   network: network name',
	 'r   macAddr: mac address',
	 'r   nicModel: pv|rtl8139|e1000',
	 'o   bootOrder: <int>  - global boot order across all bootable devices'

2012-02-05  Dan Kenigsberg  <danken@redhat.com>

	Fix two regressions introduced by the API.py refactoring
	The recovery code is left a serious need of refactoring. At least it is
	working now.

2012-02-04  Igor Lvovsky  <ilvovsky@redhat.com>

	Add cluster version 3.1

2012-02-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BindingXMLRPC: wrapper - fix __name__
	- list now is getVMList
	- getVdsStats now is getStats
	- desktopLogin now is vmDesktopLogin

2012-02-04  Federico Simoncelli  <fsimonce@redhat.com>

	Excluding some VM commands on migration
	Some operations are not permitted during a live migration:

	* take a live snapshot
	* hotplug/hotunplug a disk device

2012-02-02  Federico Simoncelli  <fsimonce@redhat.com>

	Fix the XMLRPC binding for vmSnapshot

2012-02-01  Igor Lvovsky  <ilvovsky@redhat.com>

	Minor code refactoring during domXml parsing

2012-02-01  Federico Simoncelli  <fsimonce@redhat.com>

	Fix small issues introduced by API.py

2012-02-01  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix exception string for mount commands

2012-02-01  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove BLANK_POOL_UUID constant.

2012-02-01  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix broken APIs: hotplugDisk, hotunplugDisk, migrateCancel

2012-01-31  Adam Litke  <agl@us.ibm.com>

	Move API out of clientIF
	Many API functions are implemented inside clientIF but this is no longer the
	proper place for them.  Move API-related functions into their proper objects
	inside API.py.  clientIF still owns the storage dispatcher and the vm list.  In
	the future, I would like to move these out of clientIF as well but I have
	decided to reserve that for a future patch series.

	Add an object model to clientIF
	Create an object-based API for vdsm.  The current objects are: Task,
	StoragePool, StorageDomain, Image, Volume, ISCSIConnection, LVMVolumeGroup, and
	VM.  Additionally, a Global object currently handles APIs which don't map nicely
	to one of the above objects.  Right now this interface is only an abstraction
	that maps directly to the flat function namespace.  This will change later in
	the patch series and more over time.  Since this API is internal (it only
	affects bindings), we can continue to change it over time without affecting
	ovirt-engine.

	Factor out xmlrpc server
	Move the xmlrpc server code out of clientIF and into its own file.

2012-01-30  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#769502 Do not use lvm to get lv size if lv is active
	Calling LVM is expensive so the less we use it the better.

2012-01-30  Adam Litke  <agl@us.ibm.com>

	API: Separate clientIF and the xmlrpc server
	Currently the xmlrpc server functionality is entwined with the clientIF class.
	In order to proceed with the API bridge plan (http://ovirt.org/wiki/Vdsm_API) I
	would like to separate the xmlrpc server into its own class.  This brings
	clientIF one step closer to becoming a generic API Bridge that is able to host
	additional bindings such as REST and QMF.

	Despite the size of this patch, this was a pretty simple refactoring.  I made
	the following choices as I split this out:

	- The xmlrpc server binding class has start() and prepareForShutdown() APIs
	- clientIF will still own the storage dispatcher but API wrapper mechanisms
	  have moved into the xmlrpc class.

2012-01-30  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#773666 - Avoid more rw changes in HSM flows.

2012-01-30  Federico Simoncelli  <fsimonce@redhat.com>

	Use SANLock for the SPM resource

	Change safelease APIs to match SANLock flow

	Add the live snapshot command to vdsClient
	Add the new vdsClient command to take live snapshots:

	  vdsClient [-s] <host> snapshot <vmId> \
	      <sdUUID> <spUUID> <imgUUID> <baseVolUUID> <volUUID>

	Implement VMs live snapshots
	Add a new command to take live snapshots of VMs:

	  clientIF.snapshot(vmId, snapDrives)

	The parameter snapDrives is in the format:

	  snapDrives = [
	    { "domainID": "<sdUUID>",
	      "imageID": "<imgUUID>",
	      "baseVolumeID": "<baseVolUUID>",
	      "volumeID": "<volUUID>" },
	    ...
	  ]

2012-01-29  Dan Kenigsberg  <danken@redhat.com>

	destroy may be called when the Vm is already Down
	This patch fixes an error introduced in c0766ddb0852fd391d15424ae24761.

	add a virtio console to each VM
	With this patch, vdsm-controlled VMs support `virsh console`. Note that
	guest kernel should have virtio drivers and stream its console i/o to
	the virtio-console device.

2012-01-29  Shahar Havivi  <shaharh@redhat.com>

	Add before_vm_destroy hook
	Run a hook directory when a Vm is asked to die. Note that a Vm may die
	without being asked to, were the hook would not run.

	This hook is currently missing from Vdsm since I was not sure what
	should be its exact semantic. However in hindsight, we'd better have
	something (even awkward) and improve after feedback from the real world.

2012-01-29  Igor Lvovsky  <ilvovsky@redhat.com>

	Add hotplugDisk/hotunplugDisk feature to vdsClient.
	Usage: vdsClient 0 hotplugDisk|hotunplugDisk vmUUID <drivespec>
	   'drivespec parameters list: r=required, o=optional',
	   'r   iface:<ide|virtio> - Unique identification of the existing VM.',
	   'r   index=<int> - disk index unique per interface virtio|ide',
	   'r   [pool:UUID,domain:UUID,image:UUID,volume:UUID]|[GUID:guid]|[UUID:uuid]',
	   'r   format: cow|raw',
	   'r   readonly: True|False   - default is False',
	   'r   propagateErrors: off|on   - default is off',
	   'o   bootOrder: <int>  - global boot order across all bootable devices',
	   'o   shared: True|False',
	   'o   optional: True|False'

	Add hotPlug/hotUnplug disk feature

2012-01-27  Federico Simoncelli  <fsimonce@redhat.com>

	Fix metadata file permissions for fileSD
	In this patch:
	* remove createmetafile (we already have other functions to create an
	  empty file)
	* create empty metadata files (createmetafile was using sizeStr2Int
	  which is wrong)
	* set the metadata files permission to 0660

2012-01-25  Matthias Heinz  <matthias.heinz@goobernetworks.com>

	This patch adds some basic debian support

2012-01-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#782348 - Fix getBridgeParams()
	Blank lines are valid in /etc/sysconfig/network-scripts/ifcfg-ethX

2012-01-25  Haim Ateya  <hateya@redhat.com>

	Set exc_info=True when self.message is used in log.error for vds_bootstrap

2012-01-25  Douglas Schilling Landgraf  <dougsland@redhat.com>

	BZ#619360 enable and start ntpd
	Vdsm needs to keep host time in sync, or else guest time would lap if
	guest is started on a different host. Make sure ntpd is running.

2012-01-24  Igor Lvovsky  <ilvovsky@redhat.com>

	Add validate minimal keys set in dictionaries

	Fix address parsing during build domXml

2012-01-24  huntxu  <mhuntxu@gmail.com>

	Make getRoutes() return the default gateway of each bridge interface
	Assuming `route -n` returns the followings:
	Kernel IP routing table
	Destination   Gateway     Genmask       Flags Metric Ref Use Iface
	192.168.1.0   0.0.0.0     255.255.255.0 U     0      0   0   engine
	0.0.0.0       192.168.1.1 0.0.0.0       UG    0      0   0   engine
	192.168.10.0  192.168.1.2 255.255.255.0 UG    0      0   0   engine

	Then the last shown gateway of engine '192.168.1.2' would be returned
	by this functions since it latest occurs in /proc/net/route.
	This commit makes this function always return the default gateway of
	each bridge interface as ovirt-engine expects.

2012-01-23  Dan Kenigsberg  <danken@redhat.com>

	setupNetwork: release deleted network first
	We may need their resources for newly requested networks.

	Do not distribute vdsm-gencert.sh
	... and particularly not one that has /usr/local as a prefix, and fails rpm
	creation.

2012-01-22  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix race during VM recovery flow
	In this patch:
	 * Save conf just after build devices

2012-01-22  Mark Wu  <wudxw@linux.vnet.ibm.com>

	Ignore differences in case when comparing mac addresses

2012-01-22  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm/Makefile.am: fix make install
	currently vdsm-logrotate.conf is not generated automatically, which break the 'make install'
	[vdsmdevel@medogz vdsm]$ sudo make install
	[sudo] password for vdsmdevel:

	<snip>
	/usr/bin/install -c -m 644 vdsm.rwtab \
		/etc/rwtab.d/vdsm
	/bin/mkdir -p /etc/logrotate.d
	/usr/bin/install -c -m 644 ./vdsm-logrotate.conf \
		/etc/logrotate.d/vdsm
	/usr/bin/install: cannot stat `./vdsm-logrotate.conf': No such file or directory
	make[3]: *** [install-data-logrotate] Error 1
	make[3]: Leaving directory `/home/vdsmdevel/sem-patch/vdsm/vdsm'
	make[2]: *** [install-am] Error 2
	make[2]: Leaving directory `/home/vdsmdevel/sem-patch/vdsm/vdsm'
	make[1]: *** [install-recursive] Error 1
	make[1]: Leaving directory `/home/vdsmdevel/sem-patch/vdsm/vdsm'
	make: *** [install-recursive] Error 1
	[vdsmdevel@medogz vdsm]$

2012-01-22  Eduardo Warszawski  <ewarszaw@redhat.com>

	Removing dead code.

2012-01-22  Federico Simoncelli  <fsimonce@redhat.com>

	Avoid to activate parent volume on cloning
	The benefit is that we can now create new snapshot volumes without
	looking at the parent. This is indispensable for live snapshots since
	the parent volume is in use by the VM.

	WARNING: if you run an SPM host with this change you need all the
	HSM hosts to have: I4b5cb55a868cb9bf5a720610273af139ee858a1a (Don't
	lock the image when preparing the VM path) and you won't be able use
	the domain from old SPMs/HSMs anymore.

	In this patch:
	* Do not activate the parent volume on cloning (it could be in use
	  by the VM), the only information needed is the size and it can be
	  provided as additional parameter in qemu-img
	* Do not change the volume permission to read-only when setting the
	  parent to "internal" (it could be in use by the VM)

	Refactor prepareVolumePath in clientIF
	In this patch:
	* refactoring
	* set drive['volumeChain'] (required for sanlock and bz760547)
	* set drive['blockDev']  (required for the hotplug feature)

	Remove the _preparedDrives dictionary from vm
	The _preparedDrives dictionary was a fix for bz670599 introduced with
	the commit 7aa57fe. Currently prepareVolumePath is not relying on the
	resource manager anymore and therefore the race fix is superfluous.

	In this patch:
	* make prepareVolumePath and teardownVolumePath public

2012-01-20  Federico Simoncelli  <fsimonce@redhat.com>

	Do not lock the image when preparing the VM path
	Since the resource manager scope is local there is no need for a VM
	to take an exclusive lock on the images: in fact the SPM running on
	an other machine could still manipulate such images.
	Using the resource manager in general on HSM is wrong because it is
	mapped on actions that are valid only on the SPM such as: modifing
	the lvm permissions and the modification time in the metadata.

	In this patch:
	* add an activate/deactivate image method to StorageDomain
	* implement the activate/deactivate image for BlockStorageDomain
	* add the prepareImage/teardownImage methods in HSM

2012-01-19  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#783098 - notFound should be and iterable and not an iterator.

2012-01-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#782099 - Add vdsm modprobe configuration.
	This is required as a hack around kernel bug 772317.

2012-01-18  Dan Kenigsberg  <danken@redhat.com>

	getDevInfo: report partitioned devices, too
	One cannot create a PV on a partitioned device, and therefor such
	devices where not reported to Engine. This proved surprising to users
	who wonder where their LUN disappeared.

	Vdsm should report all devices, and ovirt-engine should mark partitioned
	devices as unworthy of a PV. In the future, Vdsm may allow to forcefully
	remove a partition table from a device, to make it usable as a PV.

	hard-coding the value of se.StorageException.code is ugly

2012-01-17  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#773371 Generate the VDSM certificates
	VDSM is installed with ssl enabled by default, such configuration
	requires the certificates to be generated when they're missing.

	Group the cluster lock code into a new SP method
	Both the create and reconstructMaster methods were sharing a very
	similar code for temporarly acquiring the cluster lock.

2012-01-17  Eduardo Warszawski  <ewarszaw@redhat.com>

	Change device ownership for VM's drives.

2012-01-17  Igor Lvovsky  <ilvovsky@redhat.com>

	Support stable PCI address for uknown general devices

	Support stable PCI address for controller devices

2012-01-17  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#770834 Handle complex interface names in nicSort

2012-01-16  Federico Simoncelli  <fsimonce@redhat.com>

	Move all the substitution at make time
	Moving all the substitution at make time we can avoid the double pass
	on the .in.in files.

2012-01-16  Igor Lvovsky  <ilvovsky@redhat.com>

	Support stable PCI addresses for video/sound/disk/nic devices.
	- The 'getVmStats'/'getAllVmStats' verbs report the hash of the device part of domXml per VM.
	- Return full vm's conf including device's addreses
	- Handle new addresses parameter in vm's create flow

	Add 'readonly' attribute to disk's libvirt XML

2012-01-16  Dan Kenigsberg  <danken@redhat.com>

	Use drive[path] only after it is known
	... and make isBlockDevice actually work. Thanks, xTs_w!

	BZ#781970 kaxmlrpclib: fix plaintext transport in Python 2.7

2012-01-16  Shahar Havivi  <shaharh@redhat.com>

	BZ#773364 cancel-migration: abort migration on dest results an exception
	While starting migration, it appear in dest host vm list.
	When trying to cancel migration the _dom have not set, and when trying
	to call abortJob() we get AttributeError() exception.

2012-01-15  Federico Simoncelli  <fsimonce@redhat.com>

	Mark vds_bootstrap as executable in the Makefile
	The bootstrap files should be always installed as executables (not only
	in the rpm package).

2012-01-15  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#769502 Check if block device w/o invoking storage subsystem
	...and fix a bug about SHAREDFS being considered as block domain.

	BZ#769502 Move limit configuration to its proper place
	Currently limit configuration is managed part by vdsmd.init and part by
	vdsm configuration. This is confusing an non standard. Putting a Vdsm
	configuration file in limits.d will make admins life easier when looking
	to change Vdsm's limits.

	This may result in a surprise on upgrade - if someone has
	max_open_files=nondefault on his vdsm.conf.

	HOWEVER, these are very few and very technical users who could handle
	(and would prefer) this sitting in limits.d

	Throw key error in case on missing or already registered namespace

	BZ#769502 - Make namespace registering more efficient

2012-01-15  Haim Ateya  <hateya@redhat.com>

	BZ#781317 - adjust getos() to print real node type

2012-01-15  Dan Kenigsberg  <danken@redhat.com>

	allow running old-style Vm without 'drives'
	This has no effect on engine-initiated VMs which always have 'drives'
	(or in the future, 'devices'). Only manual tests are affected.

	drop ugly dead function execAndGetOutput

2012-01-15  Saggi Mizrahi  <smizrahi@redhat.com>

	Added copyright info to securable.py

2012-01-14  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#771329 Use a copy of the domainsToUpgrade
	The original code just uses another ref that is changed while iterated
	which has unexpected results. This was not apparent as the remove might
	happened after the iteration because it might run in another thread.

	To illustrate:

	In [1]: a = [1,2,3,4,5,6,7,8,9,10]

	In [2]: for i in a:
	...:     a.remove(i)
	...:

	In [3]: a
	Out[3]: [2, 4, 6, 8, 10]

	In [4]: for i in a:
	...:     a.remove(i)
	...:

	In [5]: a
	Out[5]: [4, 8]

	In [6]: for i in a[:]:
	...:     a.remove(i)
	...:

	In [7]: a
	Out[7]: []

	Fun!

	Raise ongoing creations count
	Multi-core hosts are generally more capable to start up multiple qemu
	processes efficiently. (And, the RHEL-5 kernel bug that limited
	_ongoingCreations to 1 is long irrelevant)

2012-01-13  ye kap  <yeela.kaplan@gmail.com>

	BZ#771686 fix MAX_VLAN_ID

2012-01-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#773666 - Fix HSM flows should not change rw permissions.
	Changing permissions on LV/File is a clustered operation and
	should never be done in HSM.
	Prepare is used by HSM therefore should not change permissions.
	Minimal fix needs further development.

2012-01-12  Dan Kenigsberg  <danken@redhat.com>

	BZ#772556 bootstrap: ignore restorecon errors
	This is particularly painful if SELinux is disabled.

2012-01-12  Shahar Havivi  <shaharh@redhat.com>

	BZ#772670 [rhevh] network is not set after using boot params
	When using vdsm-reg we are adding/deleting network before libvirt starts.
	Added a "hidden" parameter to add/delNetwork if we want to skip libvirt's
	add-network.
	When vdsm is up it is syncing the libvirt network with host bridge.

2012-01-11  Federico Simoncelli  <fsimonce@redhat.com>

	Set the drive sizes to '0' as default
	In some situations (eg: empty cdrom drive) the 'reqsize' and the
	'apparentsize' arguments are missing and they should be considered '0'.

2012-01-10  huntxu  <mhuntxu@gmail.com>

	BZ#772591 Specify which user/group should be used for core dumps rotation
	New 'su' directive is new to logrotate 3.8.0. This patch breaks systems
	with older logrotate.

2012-01-10  Igor Lvovsky  <ilvovsky@redhat.com>

	Support specParams parameter as dictionary per device

	All size parameters in vm's conf should be strings and not integers

2012-01-10  Federico Simoncelli  <fsimonce@redhat.com>

	Don't try to schedule SPM tasks on HSM
	When the manager tries to run an SPM task on an HSM host the returned
	(and logged) error is not clear:

	Traceback (most recent call last):
	[...]
	  File "/usr/share/vdsm/storage/hsm.py", line 571, in _spmSchedule
	    self.taskMng.scheduleJob("spm", pool.tasksDir, vars.task, name,
	                             func, *args)
	AttributeError: 'StoragePool' object has no attribute 'tasksDir'

	VDSM should verify to be an SPM before trying to schedule any spm
	job.

	Don't change the name of a secured class
	The variable 'name' used to name the secured classes was overridden
	by the 'name' variable used to cycle over the methods.
	The result was that the secured classes were renamed to their last
	method name, eg: storage.sp.StoragePool => storage.sp.setMaxHostId.

2012-01-09  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix warning: File listed twice

2012-01-08  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove unnecessary validates.
	All this instances race with the "recover" state of the VDSM,
	if disk info is required when the StoragePool is not reconnected
	yet.

	Remove unnecessary validation.
	This check prevents VDSM to query info about a disk on a running
	VM after VDSM restart.

	Fixing unnecessary preparePath() call on recover.
	On behalf of Dan Kenisberg.

2012-01-08  Igor Lvovsky  <ilvovsky@redhat.com>

	For BC we should to keep running VM run after vdsm upgrade.
	So, because this vm doesn't have normalize conf we need to build it
	in recovery flow

	Fix sendExtendMsg declaration, should be public

2012-01-07  Saggi Mizrahi  <smizrahi@redhat.com>

	Move domain monitor out of sp.py
	Domain monitoring logic should be seperated from the core pool logic to
	reduce StoragePool class complexity

	Make exporting more pythonic
	This seperated the dispatcher from hsm and allows us to add propertoes
	to all public function with ease

	Move reconnect file existence check
	Move the check to the inside of the _saveReconnectFunction show it's
	always recreated.

2012-01-06  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix getMasterDomain masterVersion handling
	If getMasterDomain() gets -1 as the expected masterVersion it should
	skip the masterVersion equality test and accept whatever version is in
	the MD.

	Fix logging formatting in resourceManager

2012-01-06  Haim Ateya  <hateya@redhat.com>

	BZ#674010 - Fix name error in vdsClient - 'commands' not found

2012-01-05  Igor Lvovsky  <ilvovsky@redhat.com>

	Support new type of vmParams parameter for VM create.
	- Normalize old vmParams to support new type that includes 'devices' key
	- Return normalized conf including 'devices'
	- Add new general Device class
	- Add subclasses for each device: Drive, NetworkInterface, Sound, Video

2012-01-05  Shahar Havivi  <shaharh@redhat.com>

	new verb: migration cancel
	the verb migrateCancel will take vmid and try to stop migration,
	if there is no migration in progress it will return error.

	when migrateCancel stop the migration progress, the migrate verb will
	return error "Migration canceled"

2012-01-04  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm_reg: rename rhevm.py to engine.py
	Renamed the file rhevm to engine.
	BZ#771414

	rhevm.py: replace RHEV-M string to oVirt-Engine
	Replace RHEV-M string to oVirt Engine
	BZ#771414

2012-01-04  Saggi Mizrahi  <smizrahi@redhat.com>

	Removed useless docs from lvm.py
	Man pages exist for a reason.

	Keeping copies of documentation in the code is necessary cry and will only
	grow stale in time.

	To see the list of fields run:
	$ lvm lvs -o help

2012-01-03  Igor Lvovsky  <ilvovsky@redhat.com>

	Fix floppy drives: bus should be 'fdc'.

2012-01-02  Federico Simoncelli  <fsimonce@redhat.com>

	Compile python files using automake
	In this patch:
	* Use the PYTHON macro to compile python files
	* Remove the redhat-rpm-config build dependency
	* Move the vdsm sos plugin into its own directory to avoid the custom
	  file renaming and to use the PYTHON macro
	* Update the gitignore file and the copyright in the touched files
	* Add the all-local target to force the substitutions in the python
	  files
	* Unify the macro substitution in build-aux/Makefile.subs

2012-01-02  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-reg.conf.in: remove vdc_authkeys_path
	The auth key is defined in deployUtil.py.in
	This conf value has never been used.

2012-01-01  Haim Ateya  <hateya@redhat.com>

	BZ#769179 - Omit getSessionList from vdsClient and its dependent files

2011-12-30  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsmd.8: update man page to reference oVirt
	Replace any remaining reference from RHEV to oVirt

2011-12-28  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm-reg: change registration servlet name
	Note that this change prohibits registration of Vdsm to RHEV-M-3.0.
	It depends on ovirt-engine change I4f36a302adbafdc5f9d0bb219896c794cbad31dd
	BZ# 752464.

	replace default bridge name from brVDSM to ovirtmgmt

2011-12-27  Douglas Schilling Landgraf  <dougsland@redhat.com>

	deployUtil: replace rhevm cert to engine
	Note that this patch breaks bootstrap for RHEV-M-3.0

	rename rhevm bridge to brVDSM
	Remove rhevm as bridge and use brVDSM
	http://bugzilla.redhat.com/753879
	http://bugzilla.redhat.com/753571

	Add Fedora support to vdsm-bootstrap
	while (hopefully) maintaining RHEL-5 support, and leaving bridge name
	games to a following patch.

	make vds_bootstrap executable again
	while keeping rpmlint happy.

2011-12-26  Federico Simoncelli  <fsimonce@redhat.com>

	Handle EAGAIN and EINTR in ProcessPool.runExternally

	Add NoIntr utility class

2011-12-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	create /rhev repository
	Currently, the repository /rhev is not created automatically by
	vdsm.spec.in. Without this directory, vdsm doesn't work correctly
	and vdsm will throw errors messages like:
	[Errno 30] Read-only file system: '/rhev' or even 'permission denied'.

2011-12-26  Saggi Mizrahi  <smizrahi@redhat.com>

	Add protocol version selection support for the NFS protocoll

	Support changing retransmission number and timeout for nfs mounts
	Parameter validity is done by mount. Valid ranges should be tested for
	and implemented in the UI.

	Add SharedFS Support
	This adds a new connection type called sharedfs (6). This is a way for
	users to try and use unsupported NAS storage as domains. This is
	considered bad practice and completely unsupported.

	The connection dict should be:
	{"id": <ID>,
	 "connection": <MOUNT SPEC> eg. server:/export
	 "vfs_type": <MOUNT VFS TYPE> eg. nfs
	 "mnt_options": <MOuNT OPTIONS> eg. user=0,noatime

	Minor refactoring

	Rename *FileServer methods to *NFSServer to prevent confusion

	Rearange code in storage_connection to minimize code duplication

2011-12-26  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#736034 - Add metadataignore switch to pvcreate.
	We would like to pre-allocate metadata space in all PVs
	used for our VGs. However, we are using only the metadata
	of the first PV.
	This is important for an occasion where the first PV has
	to be removed and the metadata it carries has to be copied
	into somewhere else.

	Could not have been done without Haim's help.

2011-12-26  Douglas Schilling Landgraf  <dougsland@redhat.com>

	storage_connection: unexpected keyword 'timeout'
	remove from mount.Mount() timeout argument
	added to umount() and mount() the timeout argument

	vdsm log:
	==========
	Thread-1265:INFO::2011-12-23 17:47:54,285::storage_connection::128::Storage.ServerConnection:(validae(Request to
	validate NFS storage server)
	Thread-1265:ERROR:2011-12-23 18:47:54,285::storage_connection::291::StoragerServerConnection::(__validadeFileServer)
	Error during storage connection validation: __init__() got an unexpected keyword argument 'timeout'
	Traceback (most recent call last):
	File "/usr/share/vdsm/storage/storage_connection.py", line 264, in __validateFileServer
	TypeError: __init()__ got an unexpected keyword argument 'timeout'

2011-12-25  Federico Simoncelli  <fsimonce@redhat.com>

	Improve the cleanStorageRepository method

	BZ#747917 Don't get information about mountpoints
	The regular os.walk() function tries to identify the files present in
	the given path. Avoiding to descend into the mountpoint is not enough
	to prevent vdsm from getting stuck if a NFS mount is unreachable, we
	should also prevent any other operation, eg: os.path.isdir().

2011-12-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	Restore shared raw disks (after refactoring).

	Optional: Drive.__str__().

	Remove _addFloppy. floppy is now in _drives.
	Where is flipper?

	Remove appendCD. cdrom is now in _drives.

	Normalize support for legacy drives.

	Adding arbitrary disks to _drives.

	Simplified Drive class.

	drives config normalization.
	drives parameters are normalized when passed,
	instead of tweaking the cmd line xml creation.

2011-12-23  Douglas Schilling Landgraf  <dougsland@redhat.com>

	storage_connection: fix variable name
	Replace fileUtils.FSTYPE_NFS to mount.VFS_NFS

	Fix the following error when I tried to add a new NFS mountpoint:

	Traceback (most recent call last):
	File "/usr/share/vdsm/storage/task.py", line 863 in _run
	File "/usr/share/vdsm/logUtils.py" line 38, in wrapper
	File "/usr/share/vdsm/storage/hsm.py", line 1810, in public_disconnectStorageServer
	File "/usr/share/vdsm/storage/storage_connection.py", line 116, in disconnect AttirbuteError 'module' object has no
	attribute 'FSTYPE_NFS'

	Traceback (most recent call last):
	File "/usr/share/vdsm/storage/dispatcher.py" line 87, in run
	File "/usr/shaare/vdsm/storage/task.py" line 1166, in prepare
	AttributeError: 'module' object has no attribute 'FSTYPE_NFS'

	vdsm: Add ovirt_functions script
	Add isOvirt() to validate the current hypervisor.
	Thanks to Mike Burns <mburns AT redhat DOT com> - The original author of these patches.

2011-12-22  Saggi Mizrahi  <smizrahi@redhat.com>

	Refactor mount logic

	Remove uneeded str() calls in hsm.py

2011-12-22  Shahar Havivi  <shaharh@redhat.com>

	promisc hook: added in-line (redirect) mode

2011-12-22  Dan Kenigsberg  <danken@redhat.com>

	BZ#716573 make `ulimit -u` configurable, too
	We need to let Vdsm run hundreds of Vms over lvm

2011-12-22  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix error message composition in refreshLV()

2011-12-21  Federico Simoncelli  <fsimonce@redhat.com>

	Remove extra os.path.join call from getImageVolumes

2011-12-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	Introduce vm.isVdsmImage()

2011-12-18  Shahar Havivi  <shaharh@redhat.com>

	hooks, promisc: note added for inline mode

2011-12-14  Saggi Mizrahi  <smizrahi@redhat.com>

	Reduce the memsize of basic locking object

2011-12-14  Igor Lvovsky  <ilvovsky@redhat.com>

	Part of create pool operation should be done under SPM lock

2011-12-14  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#767111 Extend volume size must be in Megabytes
	In commit c24396af (Merged SPM to StoragePool and HSM) the
	spm.public_extendVolume call was replaced by pool.extendVolume.
	The problem is that they use different units for the size
	parameter, the first one uses bytes and the second one uses
	megabytes.

	In this patch:
	* do not convert megabytes to bytes when calling pool.extendVolume
	* improve logging to record also the size received from the mailbox

2011-12-13  Dan Kenigsberg  <danken@redhat.com>

	supervdsmServer: fix typo
	we must add `pylint -E` to our check-local.

	caps: fix typo
	typo introduced in commit 5ac3213e3ab087

2011-12-11  Eduardo Warszawski  <ewarszaw@redhat.com>

	Naming conventions in Image._baseRawVolumeMerge temp files changed.
	This change is required for succesful recovery of interrrupted
	merge flows.
	After a failed merger of volUUID, no future merges of it can take
	place until the _MERGE volume is removed.
	This is intentional in order to protect user data.

	Remove unnecessary produces from Image.merge() auxiliary functions.

	Image.getSubChain: avoid unnecessary productions of all kinds.

	Produce the SD in FileVolume.getAllChildrenList() once

	Split deletedVolumeName functionality

2011-12-10  Douglas Schilling Landgraf  <dougsland@redhat.com>

	vdsm.spec.in: Requires: tree
	vdsm-sosplugin.py requires the /usr/bin/tree command.

2011-12-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	storage/misc.py: Add validation to oVirt Node
	Check if /etc/ovirt-node-image-release exists too

2011-12-09  Igor Lvovsky  <ilvovsky@redhat.com>

	Set drive's name during Drive initialization

2011-12-09  Douglas Schilling Landgraf  <dougsland@redhat.com>

	caps.py: include oVirt Node to OSName
	Add oVirt Node as a supported

	deployUtil: isOvirt() check oVirt release
	Adding support to isOvirt() to validate oVirt Node

2011-12-07  Saggi Mizrahi  <smizrahi@redhat.com>

	InvalidParameterException() takes two args

	BZ#754445 - Separate granting from callback emitting
	Granting has to happen inside the request transaction to prevent races
	with cancel\timeouts. The callback is code that the subsystem does not
	know anything about. For that reason it is crucial to run the callback
	outside of the lock scope. To keep both demands I split up emit() from
	grant().

2011-12-07  Douglas Schilling Landgraf  <dougsland@redhat.com>

	deployUtil.py.in:  add support to restart vdsmd
	vdsm-complete script define reboot() which uses deployUtil.setService("vdsmd", "restart")
	However, deployUtil.setService() just execute the validation for initd
	script (/etc/init.d/vdsmd), if the distro doesn't contain this file it fails
	and do not execute the restart action.

	Since vdsm.spec specify that if it's not RHEL we should use systemd,
	this patch includes the validation for systemd vdsmd service.

2011-12-05  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#745510 Additional rpm fixes required by fedora
	In this patch:
	* Use a standard name for the polkit macro
	* The _unitdir macro requires the systemd-units package
	* Do not ship the vdsm configuration file on rhel
	* Update the project URL
	* Fix typo: bootstrap

2011-12-05  Dan Kenigsberg  <danken@redhat.com>

	Add Shahar to AUTHORS

2011-12-03  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove checkImage
	This API function is unused and is based on buggy functions with outdated semantics.

	Remove checkDomain().
	This API function is unused and is based on buggy functions with outdated semantics.

2011-12-01  Federico Simoncelli  <fsimonce@redhat.com>

	The configuration values must be strings
	The configuration values must be strings to avoid errors such as:

	  TypeError: argument of type 'int' is not iterable
	  (ConfigParser.py:586)

	Apparently the value for vm_sample_disk_latency_interval was the only
	one not respecting this rule.

2011-11-30  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#745510 Fedora rpmlint fixes
	In this patch:
	* Remove shebang from the non-script python files
	* Require iscsi-initiator-utils >= 6.2.0.872-14 (BZ#442980)
	* Move the lvm rules to the appropriate path
	* Use the %ghost keyword for the /var/run paths
	* vdsm-libvirt-logrotate doesn't need to be executable
	* Require only the saslpasswd2 binary instead of the sasl package

	Revise the release versioning
	In this patch:
	* revise the release versioning according to fedora guidelines

	Clean up the config.py format

	Substitute the vdsm paths directly in config.py

	Simplify the vdsm.conf.sample generation

	Add PolicyKit support to access libvirt
	The best approach upstream is installing vdsm limiting the changes of
	the system settings.
	The PolicyKit authentication (chosen by default by libvirt) is allowing
	us to manage the vm's without setting up a password.

	BZ#756693 Handle destroyed VMs in handleStatsException
	After issuing a shutdown/detroy command to a VM, VDSM should expect it
	to disappear and not report an error.

2011-11-30  Shahar Havivi  <shavivi@redhat.com>

	Adding hooks to VDSM
	New custom hooks:
	directlun, fileinject, hugepages qos, smartcard,
	floppy, isolatedprivatevlan, pincpu, smbios, hostusb, numa,
	promisc, scratchpad, sriov, vmdisk

2011-11-30  Federico Simoncelli  <fsimonce@redhat.com>

	Use the vdsm user and group macro consistently

2011-11-30  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#756686 - Avoid looking for suddenly disappeared VMs.

	Remove checkPool.

2011-11-28  Federico Simoncelli  <fsimonce@redhat.com>

	Add an initial systemd service file for vdsm-reg

	Add an initial systemd service file for vdsmd

2011-11-26  Federico Simoncelli  <fsimonce@redhat.com>

	Fix distcheck and gitignore for vdsm-faqemu

2011-11-25  Dan Kenigsberg  <danken@redhat.com>

	fix faqemu for fedora host
	Instead of hacking qemu-kvm under libvirt, use libvirt's domxml <emulator> tag.

2011-11-24  Federico Simoncelli  <fsimonce@redhat.com>

	Do not attempt to configure the iscsid service
	Using an old rhel6 iscsid.conf file to overwrite any upstream system
	configuration is not recommended.
	According to BZ#499222 we just needed to set the node.startup parameter
	to "manual". That can be accomplished using:

	 # iscsiadm -m node -p <ip:port> [-I <iqn>] \
	            -o update -n node.startup -v manual

2011-11-24  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#755596 - Minor Image.merge() cleanup.

	Related to BZ#755596 - Remove unused Task.removeRecovery()
	This function is unused and does not write to the disk.

	Related BZ#755596 - Remove illegal volume marking rollback.

	BZ#755596 - Persist clearRecoveries().

2011-11-23  Federico Simoncelli  <fsimonce@redhat.com>

	Use the defined constants in iscsi.py

	Use the nodiscard option at mkfs time
	Change the mkfs option according to the warning message:

	 $ mkfs -q -j -K <dev>
	 Warning: -K option is deprecated and should not be used anymore.
	          Use '-E nodiscard' extended option instead!

2011-11-23  Igor Lvovsky  <ilvovsky@redhat.com>

	Use exception from libvirt and not from libvirtvm

2011-11-23  Federico Simoncelli  <fsimonce@redhat.com>

	Fix error message in StoragePool.connect
	String formatting has precedence over concatenation:

	 File "/usr/share/vdsm/storage/sp.py", line 681, in connect
	   (hostID, self.spUUID, self._poolsTmpDir))
	 TypeError: not all arguments converted during string formatting

	Removing the addition and continuing the string on a new line fixes
	the problem.

2011-11-21  Douglas Schilling Landgraf  <dougsland@redhat.com>

	Make /var/lib/vdsm read and write, otherwise it will break vdsm_reg.
	Error message during oVirt node installation:

	MainThread::DEBUG::2011-11-17
	11:00:57,778::deployUtil::853::root::makeBridge Failed to del existing
	bridge. out= err=INFO:root:Removing bridge breth0 with vlan=None,
	bonding=None, nics=['eth0']. options={'nics': ['eth0'], 'bonding': '',
	'vlan': ''}
	WARNING:root:
	Traceback (most recent call last):
	File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
	File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
	File "/usr/share/vdsm/configNetwork.py", line 900, in <module>
	File "/usr/share/vdsm/configNetwork.py", line 875, in main
	File "/usr/share/vdsm/configNetwork.py", line 555, in delNetwork
	File "/usr/share/vdsm/configNetwork.py", line 277, in removeNic
	File "/usr/share/vdsm/configNetwork.py", line 153, in _backup
	File "/usr/share/vdsm/configNetwork.py", line 200, in _persistentBackup
	OSError: [Errno 30] Read-only file system: '/var/lib/vdsm/netconfback/

2011-11-21  Dan Kenigsberg  <danken@redhat.com>

	vm.py: drop never-used Driver.bus

2011-11-20  Shahar Havivi  <shaharh@redhat.com>

	BZ#753625 honor displayNetwork again
	added libvirt-network support for add/del network,
	and on vdsm startup add libvirt-network to each local
	network

2011-11-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	Avoid unnecesary produce-invalidate-produce on SD conf changes.

	Fix: HSM should not write metadata (*BlkSize)

2011-11-17  Federico Simoncelli  <fsimonce@redhat.com>

	Fix StoragePool.extendSD definition

2011-11-16  Dan Kenigsberg  <danken@redhat.com>

	spec: require xz explicitly
	Our logrotate configurations explicitly state xz crompression. It would
	be more polite for the spec to state that, and not rely on libvirt's xz
	requirement.

2011-11-15  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#737340 Use the new migrateToURI2 API

2011-11-15  Dan Kenigsberg  <danken@redhat.com>

	BZ#754054 bootstrap: report success first, reboot later
	v2: flush stdout before reboot

2011-11-15  Federico Simoncelli  <fsimonce@redhat.com>

	Strip the trailing newline from libvirt password
	In this patch:
	* read only the first line of the file containing the libvirt password
	* strip the trailing newline

2011-11-15  Eduardo Warszawski  <ewarszaw@redhat.com>

	Adding shared raw disk feature.
	Arbitrary disks can be added as local VM drives.
	Use
	drive=GUID:<guid>,
	or
	drive=UUID:<uuid>,
	Note the mandatory ','

2011-11-14  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#745510 Fedora RPM revisions
	In this patch:
	* use %global instead of %define
	* use Requires instead of Conflicts for selinux-policy-targeted
	* do not modify the sudoers file (we should not try to override
	  a sysadmin custom configuration or misconfiguration)
	* fix a build warning for deployUtil.py
	* fix the libvirt_password path when uninstalling

2011-11-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	Generalize _parseDriveSpec dictionaries.
	parseDriveSpec() accepts now any keys.
	Capable of manage only one key:value, pair as drive= parameter.
	The comma is required for dicts, for one key:value too.

2011-11-14  Dan Kenigsberg  <danken@redhat.com>

	init.d/vdsmd: look for initctl where it is expected
	It may be better to have a vdsmd.in.in game, but let's fix the
	regression first.

2011-11-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#751977 - Raise if VG remove fails.

2011-11-14  Saggi Mizrahi  <smizrahi@redhat.com>

	Rename variables that look like their pointing to a domain

	Fix __cleanupStoragePool()

	Revert change of except to finally in StoragePool.create().
	We need the id set for the entire scope. In StoragePool.attachSD() we
	take another clustered lock and we need the field set.

	Fixed missing parameter when raising exception in resource owner

	dir is a builtin, overriding it is not nice

	Fixed device mapper failing on partition check for non dm devices

	Clean SPM leftovers on HSM init

2011-11-14  Eduardo Warszawski  <ewarszaw@redhat.com>

	Remove redundant StoragePool.spmStarted state.

2011-11-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Cleanup StoragePool.create()
	(Incomplete) cleanup without functional effects.

	MSD and version mandatory when calling StoragePool.refresh()

	Fix attachStorageDomain logic.

2011-11-10  Federico Simoncelli  <fsimonce@redhat.com>

	Add libvirt password as config file

2011-11-10  Dan Kenigsberg  <danken@redhat.com>

	betterThreading.Event is never used; drop it.
	betterThreading was initially conceived to be a drop-in replacement of
	threading.py. However, once we opted for mokey-patching threading.py
	instead, betterThreading.Event has become redundant.

2011-11-10  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#744704 - Do not stop SPM task if in 'racquiring' state

	BZ#744704 - Fix rollback support for complex tasks

2011-11-10  Dan Kenigsberg  <danken@redhat.com>

	BZ#746766 deployUtil: restorecon on created ~/.ssh/ dir

2011-11-10  Igor Lvovsky  <ilvovsky@redhat.com>

	Async tasks should be saved in 'tasks' directory on master domain but not in 'hsm-tasks'

2011-11-10  Dan Kenigsberg  <danken@redhat.com>

	Related to BZ#682513: spec: require mke2fs with -K

2011-11-08  Jarod. w  <work.iec23801@gmail.com>

	Correct the variable name from VDSM-BIN to VDSM-REG-BIN in vdsm-reg script

2011-11-07  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#751629 - Avoid migrate master if MSD is obsolete.
	In addition deactivate the (block) domain if it's unreloadable.

2011-11-03  Dan Kenigsberg  <danken@redhat.com>

	vds_bootstrap: fix usage string

	fix typo in trying to copy iscsid.conf template

2011-11-02  Saggi Mizrahi  <smizrahi@redhat.com>

	Fixed SPM_mailbox attribute errror

2011-11-02  Dan Kenigsberg  <danken@redhat.com>

	BZ#749151 revive Vm ticket just before migration
	We set a new expiry time on the spice password of the source qemu. That is
	copied to the destination qemu as migration begins. We thus give spice client
	two minutes to connect to destination to facilitate seamless migration.

	v2:
	- revive password only when spice client is connected
	- revive password, do not remove it completely

	v3:
	- do not disconnect current client while reviving password.

	Revert "BZ#727602 setVmTicket: never expire ticket"
	This reverts commit fd1f8a7a117067f1733898734b1c97bdf75d18bd.

	Conflicts:

		vdsm/libvirtvm.py

2011-11-02  Saggi Mizrahi  <smizrahi@redhat.com>

	Move iscsid.conf template outside of the source file

2011-11-01  Dan Kenigsberg  <danken@redhat.com>

	BZ#733000 vdsmd: upstart hates soflinks
	Copy libvirt's upstart job definition instead of linking it.

2011-10-30  Saggi Mizrahi  <smizrahi@redhat.com>

	isMounted() now handles / at end of export in certain distros

	Changed default bridge name to engine

	Fixed reconstruct master

2011-10-28  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix missing arg in sp.StoragePool() call.
	Fix reconstruct master flow.

	Fix unsecured on forceFreeSpm().

	Fix lock release and reversed SPM logic.

2011-10-27  Dan Kenigsberg  <danken@redhat.com>

	configure.ac: find scsi_id on Fedora 16, too.

2011-10-27  Federico Simoncelli  <fsimonce@redhat.com>

	Add the systemd support for bootstrap

	RPM changes for Fedora

	Recreate the run paths when needed
	On some systems the run directory might be mounted as tmpfs (eg: on
	Fedora). The daemon will refuse to start at next reboot if the paths
	aren't recreated.

	Convert the OrderedDict from namedtuple._asdict()
	Since python 2.7 the namedtuple._asdict() method returns an
	OrderedDict, therefore we need to convert it to a regular
	dictionary before marshalling it on xmlrpc.

2011-10-24  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to 726960 - Restore higher version check.
	This check was removed in commit 85b58b7d9 since the manager
	can't send a lower pool version number.
	In spite of this some tests stress this condition.
	Restoring it in order to fix tests results.

2011-10-24  Dan Kenigsberg  <danken@redhat.com>

	use correct path for fencing agent
	There's probably a nicer way to do it with autoconf, avoiding
	os.path.dirname. Comments appreciated.

2011-10-24  Saggi Mizrahi  <smizrahi@redhat.com>

	Fix call to getSpmRole()

2011-10-24  Dan Kenigsberg  <danken@redhat.com>

	BZ#748466 bootstrap: report vendor properly
	Do not compare a string to a function, you are bound to fail.

	BZ#746766 BZ#747337: bootstrap: download selinux module before usage

2011-10-24  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#744755 Don't wait for tasks on shutdown
	During shutdown we can't wait for all tasks to complete because some
	of them might be stuck in D state if the storage is unreachable (eg:
	createVolume preallocated on NFS).

2011-10-24  Dan Kenigsberg  <danken@redhat.com>

	BZ#748222 netinfo: report operstate, not adminstate
	Until commit 4153e08acb8ae23ef79 (fixing BZ#726359), when reporting if a
	network inteface is up or down, Vdsm was considering the operative status.
	That was the correct behavior, since users do not really care that they have
	configered the nic to be up while the line is cut off by evil mice (or quality
	engineers).

2011-10-23  Dan Kenigsberg  <danken@redhat.com>

	BZ#725540 vdsClient: check return code first
	client should not assume that its data exists in the response before verifying
	that the request was served without error.

	Fix bad rebase

2011-10-23  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#729933 - Redefine public_activateStorageDomain()

2011-10-23  Saggi Mizrahi  <smizrahi@redhat.com>

	Switched secure semantics to exclude rather then include

	recoveryMode param is never used

	Merged SPM to StoragePool and HSM
	SPM was an unholy union of two paradigms and was making everything hard.
	This is an attempt to put everything in order

	Made SPM_Mailmonitor independent from SPM

	Made spm securing logic more generic
	 - Security is no longer system wide but instance wide
	 - Security can be used on any class
	 - Security override is supported by the subsystem and doesn't require
	   trickery

	The start of exceptions being independent from the interface

	Refactor dispatcher unicode handling

	Made the logging mechanism more generic
	 - modified storage connection verification to have better errors
	 - pulled out logging logic from dispatcher to a generic decorator

2011-10-23  Dan Kenigsberg  <danken@redhat.com>

	BZ#745390 always report product=RHEV to guest bios
	Laziness is dangerous; patches should be checked.

2011-10-22  Eduardo Warszawski  <ewarszaw@redhat.com>

	Removing references to SDF.

	Remove sdf.py

	Simplify SDF.produce() for removing sdf.py.
	produce() will return a domain or raise StorageDomainDoesNotExist.
	No need for this check.

	Remove SDF.create() for removing sdf.py

	Simplify recycle function for removing the sdf.py

	Change format signature in order to simplify SD recycle.
	Needed for remove the sdf.py

2011-10-19  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#741203 Use cached node id if SPM is active
	Do not invalidate the metadata cache if the node is the SPM and it
	is active. This will prevent the getStoragePoolInfo call to be stuck
	when the domain is unreachable and at the same time won't break the
	fix for BZ#733909.

	In the patch:
	* add the attribute isSPM to the StoragePool class
	* the SPM never requires to invalidate the cache

	BZ#741203 Don't return a value in domain selftest
	The domain selftest doesn't need to return a boolean value, if the check
	fails an exception is raised.

2011-10-19  Dan Kenigsberg  <danken@redhat.com>

	BZ#746766 deployUtil: set proper selinux context to .ssh/authorized_hosts

	BZ#745390 always report product=RHEV to guest bios
	Two years after insisting the ueber-importance of differentiating RHEL
	hosts from RHEV ones, RHN/Satellite suddenly needs us to always report
	"RHEV-H" to the guest, or else the guest would not be recognized as
	virtual by them.

	Disagreing and committing.

2011-10-19  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#746975 - Allow deactivate storage domain if not reachable

2011-10-18  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#741658 Move VM to Down if libvirt reports VIR_ERR_NO_DOMAIN

	Correct the vdsmd init script path

2011-10-16  Federico Simoncelli  <fsimonce@redhat.com>

	Remove unused symlinks

	Minor fixes for distcheck
	In this patch:
	* don't distribute files generated by the substitutions
	* use srcdir as path for substitutions
	* add uninstall-local for the storage subdirectory

2011-10-12  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#743549 - Allow concurrency in task manager

2011-10-12  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#743887 Close lifeline pipe when oop is killed

2011-10-11  Dan Kenigsberg  <danken@redhat.com>

	BZ#744549 getVdsCaps: survive multiple redhat-release rpms
	caps._getKeyPackages() already handles this case. Too bad this was
	forgotten in osversion().

2011-10-11  Federico Simoncelli  <fsimonce@redhat.com>

	Include vdscli.py in the vdsm rpm
	Since we moved to kaxmlrpclib we require vdscli in vm.py which is part
	of vdsm.

2011-10-11  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#742764 - Don't change template's type during createVolume rollback

2011-10-11  Yotam Oron  <yoron@redhat.com>

	Need to also catch AuthenticationError in case connecting to the SuperVdsm fails.

2011-10-10  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#732980 Initialize the block sizes metadata

2011-10-10  Dan Kenigsberg  <danken@redhat.com>

	BZ#736114 bootstrap: override iptables if requested
	vds_bootstrap script gets a new optional argument -f <filename>.
	vds_installer will use the argument to pass the local location of an iptables
	rule file to override /etc/sysconfig/iptables.

2011-10-10  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#743272 - dirList IS and WAS dirList.

2011-10-09  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#738120 - Logging in OOP - drop identical messages.
	Somehow we get every log 3 times in the queue.
	In the future we will be need to find out the real reason
	for such behavior and fix it. For now just drop identical messages.

	Related to BZ#738120 - Logging in OOP.
	Now we can use logging in OOP operations.

	Add partial vms list support to the regular 'list' query.
	Usage: vdsClient 0 list [table/ids/long] [vms:vmId1,vmId2]

2011-10-09  Dan Kenigsberg  <danken@redhat.com>

	BZ#743828 allocate only 32MB vram for multiple qxl monitors

2011-10-07  Dan Kenigsberg  <danken@redhat.com>

	BZ#740158 netinfo.speed(): never report -1 speed
	Related to Bug 709674: sysfs may report -1 speed (in unsigned 16- and
	32-bit integers) for disabled nics. Vdsm should report their speed as 0.

2011-10-07  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#720385 - Report disk latency (read , write & flush ) for each storage device.

2011-10-07  Yotam Oron  <yoron@redhat.com>

	BZ#741856 delete rhevm cert before conf_update
	Delete CA certificate before updating vdsm-reg.conf, to avoid certificate
	collision in the case of later re-configuration with no fingerprint verification

2011-10-06  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#740887 Tune cache dirty ratio
	Tuning the dirty_ratio and dirty_background_ratio kernel parameters
	increases I/O throughput from the guests, improves fairness between
	the guests and reduces the ability of a buffered writer to starve
	guests.

2011-10-06  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#732765 - Drop disktotal/diskfree parameters for unreachable domains

2011-10-05  Yotam Oron  <yoron@redhat.com>

	BZ#737722 Do not pass cmdline args to grub in RHEV-H
	cmdline args are only needed in installation time,
	oVirt has a builtin functionallity to not pass the args
	to grub

2011-10-05  Dan Kenigsberg  <danken@redhat.com>

	BZ#743122 libvirtvm.create: honor tdf param
	Some guests (mostly Windows) need the time-drift-fix to keep up their
	clock.

	v2
	- Invert default, as KVM's Dor says it is safe enough for all guests.

2011-10-05  Federico Simoncelli  <fsimonce@redhat.com>

	Don't pollute the root directory during installation

2011-10-05  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#736301 - Don't fail lvm.getVGbyUUID() if unreadable VGs found.

2011-10-04  Federico Simoncelli  <fsimonce@redhat.com>

	Remove unused TaskResource class

	Correct typos for 'successfully'

2011-10-04  Dan Kenigsberg  <danken@redhat.com>

	BZ#742267 server_connection: checking access is enough
	There is no need to verify that a directory/mountpoint is owned by
	vdsm:kvm. All we need is vdsm accessibility. Ownership requirement was
	added in downstream commit 9fb05359 for local storage, and later
	(http://gerrit.usersys.redhat.com/776) extended to all storage types.

2011-10-03  Adam Litke  <agl@us.ibm.com>

	BZ#735621 fileSD: Fix remotePath in SD metadata (V3)
	Changes since V2:
	 - Rename mountToRemotePath() to getRealPath() and define it in each child
	   class.

	Changes since V1:
	 - Derive the remotePath from self.mountpoint instead of using the metadata

	The current method for gathering a LOCALFS Storage Domain's remotePath
	property does not work because these domains are connected with a symlink,
	not a mount.  Fix up the current code so that it handles links and
	mountpoints.

2011-10-03  Gal Hammer  <ghammer@redhat.com>

	Related to BZ#736422: Fixed a typo in command's name.
	The RHEV-Agent send a "session-lock" notification but vdsm
	expected to receive a "session-locked".

2011-10-03  Mark Huth  <mhuth@redhat.com>

	BZ#716573 make vdsm's `ulimit -n` configurable

2011-10-03  Dan Kenigsberg  <danken@redhat.com>

	BZ#741190 never add a second "vdsm" stanza to logrotate.d/libvirtd

2011-09-27  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#732980 Devices block size must be 512

	Don't use a list to calculate VG size

	BZ#732980 Check block size on VG commands

	BZ#732980 MD tag must be in blocks unit
	This patch fixes the unit used for the MD tag (blocks instead of
	bytes) and completes the support for the new MS tag which holds
	the size (in blocks) of the metadata.

2011-09-27  Yotam Oron  <yoron@redhat.com>

	BZ#735725 - Insert a configuration line if not exists
	- Simple configuration line insertion if missing

2011-09-27  Dan Kenigsberg  <danken@redhat.com>

	Replace m2crypto: re-add kaxmlrpclib

	SecureXMLRPC: work with python 2.7, too.

	Replace m2crypto: re-add timeout

	read thp state from its upstream location first

	make /etc/init.d/vdsmd workable under F15

	Replace m2crypto with python's standard ssl

2011-09-26  Dan Kenigsberg  <danken@redhat.com>

	BZ#735725 vdsm-reg: add a default (empty) ticket
	Code should not assume 'ticket' already exist in conf file, as this is a
	new addition.

2011-09-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#732416 fix deleteMultipleVolumes().

2011-09-23  Dan Kenigsberg  <danken@redhat.com>

	BZ#740158 netinfo: never report negative speed
	Even if, for some reason,

	    /sys/class/net/eth0/speed

	had a negative value, we should not report it as such. It justly
	confuses users.

2011-09-22  Douglas Schilling Landgraf  <dougsland@redhat.com>

	deployUtils.py.in: fix typo
	- Replace Faild to Failed

2011-09-21  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#688616 Fix kernel requirement in the spec file

2011-09-21  Dan Kenigsberg  <danken@redhat.com>

	BZ#688616 re-enable cgroups with kernel scaling issue fixed
	Once we are shipping with kernel >= kernel-2.6.32-150 with a fix to
	kernel BZ 623712, we can drop this hack an re-enable cgroups.

	This reverts commit b48a4d9b2ce2162 and adds explicit kernel rpm
	dependency.

	The specific kernel version is not strictly important - we just want to
	make sure it is a RHEL-6.2 kernel.

2011-09-20  Yotam Oron  <yoron@redhat.com>

	BZ#735725 - Don't remove ticket option from configuration file
	Rather than removing - set it to empty string

2011-09-20  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#735932 Use redhat-release file during bootstrap
	The system-release file is not present on RHEL5.

	BZ#733669 Avoid local hostname check on RHEL5

	BZ#731598 Fix syntax in _addNetwork for RHEL5

2011-09-20  Dan Kenigsberg  <danken@redhat.com>

	BZ#739645 getHostUUID: ignore dmidecode comments
	`dmidecode -s system-uuid` may produce the likes of

	 # SMBIOS implementations newer than version 2.6 are not
	 # fully supported by this version of dmidecode.
	 30353036-3837-4247-3831-303946353250

	lines beginning with hash (#) should not be included in the reported uuid

2011-09-19  Dan Kenigsberg  <danken@redhat.com>

	Synchronize libvirtconnection.get()
	I'd like to consider making _ongoingCreation bigger than 1, and to
	let all parts of the code a safe access to the libvirt connection.
	libvirtconnection should never have trusted its user to take care of
	the synchronization. Taking a lock would not slow down the seldom-used
	libvirtconnection.get() noticeably.

	StoragePool.__rebuild(): implement oldLinks as a set
	We don not care about order within oldLinks, but we do care about quick
	removal. Set it is.

	Related to BZ#726400 do not remove links to known domains
	Code introduced in commit 8ca7b3998f63d7555d253a66e02a23d577652233 was
	buggy as it kept oldLinks intact after identifying a domain dir within
	it. Later, all oldLinks were removed since
	(oldie not in domUUIDs) is always True.

	This patch reverts to former logic: as a domaindir is identified, it is
	pruned from oldLinks. Left oldLinks are removed from disk.

2011-09-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#737329 - Fix masterVersion error log in getMasterDomain().

	Related to BZ#726400 - Fix StoragePool.__rebuild() new lvm.getVGs() usage.

2011-09-15  Max Benenson  <mbenenso@redhat.com>

	fix formatting error on ImageDeleteError

2011-09-15  Federico Simoncelli  <fsimonce@redhat.com>

	Remove check for incoming migration in _highWrite

	Use the correct events to end migration

	BZ#733669 Improve error reporting for wrong local hostname
	This patch improves the error reporting when migration fails.
	It is mainly designed to return the new error 'wrongHost' to
	the manager when the migration destination has a wrong local
	hostname (which will cause the migration to fail without any
	informative message).
	Additionally it checks the local hostname during the bootstrap
	process and produces a warning if needed.

	In this patch:
	* add local hostname check during bootstrap (report a warning)
	* return the new error 'wrongHost' if migration destination has
	  a wrong local hostname
	* source node must return a specific error when migration fails

2011-09-15  David Naori  <dnaori@redhat.com>

	BZ#738355 BZ#736422 guestIF: log exception before initialization of 'line'

2011-09-15  Dan Kenigsberg  <danken@redhat.com>

	man page: document behavior on hook failure
	per Geert Jansen's request.

2011-09-15  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#737181  - mount NFS with a higher retransmit rate

2011-09-15  Yotam Oron  <yoron@redhat.com>

	BZ#735725 - Add installation flow for the RHEVH
	- Add a 'ticket' variable in the vdsm-reg.conf
	- Send the ticket with the regiatration request
	- Delete ticket if registration is successful or retries quota is over

	BZ#736154 - Add root password configuration option in the rhevm tab
	- Add root password configuration option
	- Enable remote access

2011-09-15  Dan Kenigsberg  <danken@redhat.com>

	createVolume: fix default values for two args
	When createVolume is called without specifying explicit values for
	srcImgUUID and srcVolUUID, None value was passed done the chain, running
	havoc in async task creation.

	This was not noticed since vdsClient and RHEV-M fill these args with
	volume.BLANK_UUID. This patch makes Vdsm itself follow suit and have
	sane defaults.

2011-09-15  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#726400 - Remove lvm operations from StoragePool.__rebuild().

2011-09-14  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#730778 - Add timeout when acquiring resources in prepareVolume
	Also added seperate timeout for prepare volume operations because they
	might take longer

	BZ#736103 - Raise error when volumes acquision fails in image resource factory
	I chose not to reraise but to do `if failed:` because `raise e` would
	have lost some of the exception information and I hate it when that
	happens

2011-09-13  Yotam Oron  <yoron@redhat.com>

	BZ#736154 - Add rhevm_admin_password kernel param
	- Add rhevm_admin_password to kernel params
	- Override root password with the rhevm admin password (to be changed in
	  the future to a rhevm admin user)

2011-09-13  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#737329 - Remove verifyMasterDomain().

	Related to BZ#737329 - Beautify StoragePool.masterDomain usages.

	Related to BZ#737329 - Simplify getMasterDomain().
	Unveil the behaviour of getMasterDomain() without parameters.
	verifyMasterDomain() can't return None.

2011-09-12  Saggi Mizrahi  <smizrahi@redhat.com>

	Related to BZ#723579 - OOP Handlers shouldn't print to stdout on failure

	BZ#725967 - Have global pool users use the limiter as well
	In the last patch in the quest for using only 1 storage pool I left out
	the global pool users. Because the global pool was initialized on import
	because after this patch all the handlers are created at once this
	caused all the handlers to be created on import. This made the pool act
	strange on certain occasions. The fact that the global users didn't pass
	through the limiter was a mistake in itself.

	This patch:
	* Moves ProcessPoolLimiter to the processPool module because it is
	  the correct place and I didn't want all the global pool users
	  importing sd.py.
	* Removes ProcessPoolDict and creates a new class called
	  ProcessPoolMultiplexer that does the same thing but does not inherit
	  from dict which means you don't get the __set__ methods and other
	  garbage. It also moves the logic to the processPool module.
	* Adds getProcessPool() to outOfProcess so there is convenient access
	  to the global multiplexer.
	* Adds getGlobalProcPool() to outOfProcess so global pool users can get
	  the global pool on demand and not on import
	* Changes all calls to the global process pool to go through the
	  aforementioned methods so that the pool is never created on import

2011-09-12  Dan Kenigsberg  <danken@redhat.com>

	BZ#736316 persist network config on rhevh, too.
	On RHEV-H we should not really worry about backing up old configuration
	files, since they are already stored under
	/config/etc/sysconfig/network-scripts. However, vdsm-store-net-config
	looks under the netconfbackup dir for the files it needs to store - when it
	sees nothing there, nothing is persisted for next boot.

	Quickest fix is to make configNetwork._persistentBackup() hold a copy of
	ifcfg-* in netconfbackup for rhevh, too.

	Makefile: define extra_release only for nonempty BUILDID
	Formerly, make rpm without BUILDID produced:
	error: Macro %extra_release has empty body

2011-09-11  Joey Boggs  <jboggs@redhat.com>

	BZ#734917 set tui page title to black text

2011-09-11  Dan Kenigsberg  <danken@redhat.com>

	getVdsStats: report a unique generationID whenever vdsm is restarted
	RHEV-M wants to notice when vdsm is restarted (rhevm bug 684583).
	I must say that I am not 100% sure why RHEV-M wants that.

2011-09-11  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#734712 - Set vdsm:kvm ownership to master dir.

	BZ#733373 - Remove the pool level vsm and tasks links.
	As verified by the previous version of this patch, the pool level
	links to the tasks and vms are superflous, dangerous and can
	prevent spm restart.
	Since they are unused, best if they are not created at all.
	cleanupSpmLinks() removed so it can't fail.
	_createSpmLinks() removed too.

	BZ#732416 Introduce deleteMultipleVolumes

	Related to BZ#732416 - Remove Irs throttling during copy.

	Related to BZ#732416 - Remove volume.qemuCommit()

	Related to BZ#732416 - Remove idle param in volume.qemuRebase()

	Related to BZ#732416 - Remove unused idle param in volume.qemuConvert()

	Related to BZ#732416 - Fixes to misc.ddWatchCopy()

	Related to BZ#732416 - Remove unused idle parameter from misc.watchCmd()

	BZ#732416 - Pluralise lvm remove LV(s) verb.

	Related to BZ#732416 - Unify criteria for active LV in lvm cache.

2011-09-08  Federico Simoncelli  <fsimonce@redhat.com>

	Don't override the rpm topdir macro settings

2011-09-08  Gal Hammer  <ghammer@redhat.com>

	Rewrote the _filterXmlChars after a code review.
	Using constant to generate restricted characters only once and a little speed improvment when returning the filtered string.

2011-09-08  Dan Kenigsberg  <danken@redhat.com>

	BZ#735932 vds_bootstrap: read version from /etc/system-release
	Former patch for this bug fails measerably on RHEL hosts.

	v2:
	- no need to look for /etc/rhev-hypervisor-release even on old RHEV-H.
	v3:
	- no need to loop at all: /etc/system-release points to the right file.

2011-09-08  Gal Hammer  <ghammer@redhat.com>

	BZ#736422: A new JSON-based protocol with the guest's agent.
	In order to recover from a malformed message send from the guest's
	agent, a new JSON-based protocol was implemented. This allow vdsm
	to drop bad messages (messages are terminated with a '\n' character)
	and handle the following good messages.

	This patch also include code related to BZ#729254 as the new
	protocol includes the disk usage information.

2011-09-07  David Naori  <dnaori@redhat.com>

	BZ#726970 iscsiadm: Return an appropriate error code to ISCSI_ERR_LOGIN_AUTH_FAILED

2011-09-07  Yotam Oron  <yoron@redhat.com>

	BZ#731698 - Fix syntax error

2011-09-07  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#732914 Establish libvirt connection on startup

	BZ#732914 Default signals handlers in processPool

2011-09-07  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#728958 Don't check read delay when domain was not produced

	BZ#733909 - double check spm id before claiming being it

2011-09-07  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#731598 Use the correct port in waitRouteRestore

	BZ#732652 Avoid logging in the processPool Helper
	Logging can cause a deadlock in a multi-threaded multi-process
	environment therefore closing the logging file descriptors is
	not enough we should also remove all the handlers.
	Reference: http://bugs.python.org/issue6721

2011-09-07  Dan Kenigsberg  <danken@redhat.com>

	Related BZ#735932: bootstrap: no need to install DEVEL_PACKAGES
	Bootstrap takes too long. Some of this time is wasted on installing
	pacakges we do not really need any more.

	BZ#735932 vds_bootstrap: do not require and do not use redhat-lsb
	redhat-lsb is no longer installed on RHEL by default, and comes with a
	heavy dependency list. Using it lengthen installation time needlessly.

	v2:
	- drop remnants of lsb from configure.ac
	- do not require redhat-lsb
	- search all files for release info
	- fix logging typo

2011-09-07  Yotam Oron  <yoron@redhat.com>

	BZ#602338 - Reset vdsm-reg conf file on certificate fingerprint verification failure
	When the certificate verification failed, need to reset the vdsm-reg
	conf file so that the ovirt node will not register

2011-09-06  Dan Kenigsberg  <danken@redhat.com>

	vdsm.spec.in: report upstream URL

2011-09-06  David Naori  <dnaori@redhat.com>

	BZ#735068 - remove not existing volume.spUUID from VolumeGeneralException.

2011-09-06  Saggi Mizrahi  <smizrahi@redhat.com>

	Remove log collector as it's no longer needed

	subprocess's shell parameter is evil

	BZ#725967 - one process pool to rule them all
	Instead of having a process pool per domain use one pool but limit the amount of
	workers a domain can hold at any given time.

2011-09-05  Yotam Oron  <yoron@redhat.com>

	BZ#733910 - Clean links in directories in __cleanStorageRepository
	os.walk() sees links to directories as directories, so the code
	tries to delete the links with rmdir(), fails, and then the consequent
	rmdir() of the parent dir also fails since the directory is not empty.
	Instead of rmdir(), unlink() a link.

2011-09-05  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#734136 - Stricter partition detection

2011-09-05  Federico Simoncelli  <fsimonce@redhat.com>

	Strip gerrit headers from changelog

2011-09-05  Yotam Oron  <yoron@redhat.com>

	BZ#719857 - Rhevh give user a warning before press the "reject"
	Instead of rebooting the host, fail the configuration and notify the user

2011-09-05  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#734768 - Handle 'guest' element being missing in libvrit caps

2011-09-05  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#732275 - Stop all repoStats threads that were started during reconstructMaster.

2011-09-04  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#732416 - Remove volume.Volume.delete()

	Related to BZ#726400 - ISO domain on block is not supported.

2011-09-04  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#723579 - Disown child procs so they wouldn't hold VDSM shutdown
	This patch touches a protected variable in the python multiprocessing
	framework. This is not ideal but necessary to keep VDSM from getting
	stuck waiting for a child.

	BZ#732245, BZ#732269 - Handle EAGAIN and EINTR in AsyncProc.communicate

2011-08-31  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#732765 - Don't return empty strings for 'disktotal'/'diskfree' on unreachable domains during getStoragePoolInfo

2011-08-31  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#734184 - Fix new killall

2011-08-31  Yotam Oron  <yoron@redhat.com>

	BZ#705058 - Don't create a new pool object on storage refresh
	Use the standard interface for pool connection and avoid double pool creation

2011-08-31  Federico Simoncelli  <fsimonce@redhat.com>

	Add a buildid name to the rpms when specified
	It's now possible to build the rpms appending an arbitrary name for the
	packages:

	  $ make BUILDID=.bzXXXXXX rpm
	  vdsm-4.9.0-0.63.g28186b7.el6.bzXXXXXX.x86_64.rpm

2011-08-30  Saggi Mizrahi  <smizrahi@redhat.com>

	Don't include vdsClient in tarball

2011-08-29  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#731750, BZ#733239 - handle missing libvirt lograte config
	* I also added restorecon in case there is a configuration where
	  logrotate conf file should have a special context.

	VDSM failed to start if it couldn't find the original libvirt logrotate
	configurations. Because we just replace the configuration there is no
	need to actually make sure the old one existed. If it didn't we can just
	create a new config with default permissions.

2011-08-25  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#732272 Activate nics in the correct order

2011-08-25  Saggi Mizrahi  <smizrahi@redhat.com>

	Add getDevUuid() to device mapper
	This method though unused is pretty useful and I wouldn't want people
	misimplementing it. This is a small part in making the device mapper
	volume complete and useful outside of vdsm.

	Don't subprocess for killall
	This is safer, quicker, removes one more subprocess call.
	This also has the added benefit of giving us proper error codes so we
	can differentiate between "no process found" and "failed to kill
	process".

	Get dmId from device number instead of looking for it

	BZ#730946 - detect ISCSI HBAs as ISCSI

2011-08-25  Federico Simoncelli  <fsimonce@redhat.com>

	Remove all the references to VDC from logging

2011-08-25  Yotam Oron  <yoron@redhat.com>

	BZ#725992 - Make sure vdsm-reg runs after every configuration changr
	Stop vdsm-reg before the configuration is written, wirte the configuration and start it again.

2011-08-25  Federico Simoncelli  <fsimonce@redhat.com>

	Remove symlinks for subsequent autobuild runs

2011-08-25  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#726400 - Remove BlockStorageDomain.refreshSpecialVolumes()

	Related to BZ#726400 - A dict is not a list.

	Related to BZ#726400 - Remove unnecesary import.

	Related to BZ#726400 - Rename links for cleaning

2011-08-25  Dan Kenigsberg  <danken@redhat.com>

	BZ#602338 vdsm-reg: take fingerprint param into consideration
	Without this spelling error fixed, management_server_fingerprint
	parameter is always ignored.

2011-08-25  Haim Ateya  <hateya@redhat.com>

	BZ#732772: vdsClient - fix attribute error using getIsoList when ISO domain doesn't exists in pool

	BZ#732933: vdsClient - getFloppyList returns with KeyError

2011-08-25  Yotam Oron  <yoron@redhat.com>

	BZ#732850 - Change defaults in RHEV-M registration dialog
	- Change default RHEVM port to 8443
	- Change verify checkbox wording

2011-08-23  Federico Simoncelli  <fsimonce@redhat.com>

	Check for pyflakes to be installed

2011-08-23  David Naori  <dnaori@redhat.com>

	Related to BZ#730297: Dont set connAct 'disconnect' on vnc.

2011-08-22  Daniel P. Berrange  <berrange@redhat.com>

	Automatically generate ChangeLog file during make dist
	This adds a script that will automatically generate the ChangeLog
	file content from the git changelog. This is performed only when
	running 'make dist', via an automake hook

	* .gitignore: Don't ignore the entire of build-aux/
	* Makefile.am: Add hook to generate ChangeLog
	* build-aux/gitlog-to-changelog: Script for generating ChangeLog
	  from GIT history

	Add some useful content to the AUTHORS file

	Add control script for automated builds
	The http://autobuild.org/ tool is a framework for doing automated
	builds from upstream source, including builds of RPMs. The file
	autobuild.sh is a simple script that integrates with this tool.
	It can also be run directly by developers

	  export AUTOBUILD_INSTALL_ROOT=$HOME/builder
	  ./autobuild.sh

	* vdsm.spec.in: Add a unique counter for automated builds
	* .gitignore: Ignore results.log file
	* autobuild.sh: Add script for doing automated builds of source
	  and RPM

	Make sure autogen.sh always runs configure
	Standard practice for an autogen.sh script is to always run the
	configure script. In addition 'libdir' cannot be assumed to be
	/usr/lib, rather than /usr/lib64.

	* autogen.sh: Fix --system for x86_64 and always run configure

	Add missing GPLv2+ headers & standardize existing headers
	Ensure all .py and .sh files contain a standardized GPLv2+
	header comment. This fixes the obsolete references to the
	now deleted LICENSE_GPL_v2 files

	All copyright dates are extended to cover 2011. Any files
	without existing headers had a 2011 date stamp added.
	Recommendation is for all dates to be extended on the 1st
	of Jan each year

	Make the README file more useful
	It is not important to have a full GPLv2+ boilerplate in the
	README file. It can just refer to the main COPYING file and
	note the OpenSSL exception.

	More important for the README is info about what VDSM is, how
	to install it, package it and how to report bugs / get help,
	etc

	* README: Update content to be more useful

	Ignore all autogenerated files

	Make tests work in a non-GIT checkout environment
	Replace the 'dist-hook' target, with the 'check-local' target,
	which is the automake standard for adding tests to 'make check'.
	Add 'pyflakes' as a build pre-requisite for the RPM, and run
	tests as part of the RPM build process

	* Makefile.am: Switch to use 'check-local' for tests and avoid
	  use of GIT commands
	* vdsm.spec.in: Add BR on pyflakes & add %check section

2011-08-18  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#726105 - Check that qemu can also access file mounts
	v3:
	- use both qemu and kvm groups when testing access to directory
	v4:
	- add OOP handling. I hate NFS.

2011-08-18  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#728381 -  Add additional 'alert' in getStoragePoolInfo if VG's metadata too small

	BZ#728381 - Return 'alerts' key for each domain in getStoragePoolInfo query

2011-08-18  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#726960 - Unify SD.validate signature.

2011-08-17  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to 726960 - Remove unused StorageDomain.deactivate()

	BZ#730912 - Optimize BlockVolume.findImagesByVolume()
	Fixes a reg introduced by lvm.lvsByTag() in:
	http://gerrit.usersys.redhat.com/#change,764

2011-08-17  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#728874 - vdsm-logrotate shouldn't prints invalid error message

2011-08-16  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#730536 Bootstrap should create VDSM_DIR
	The bootstrap needs to create the VDSM_DIR in order to successfully add
	it to sys.path.

2011-08-16  David Naori  <dnaori@redhat.com>

	BZ#717868: Use iscsiadm return code to indicate existing session
	Now that iscsiadm return ISCSI_ERR_SESS_EXISTS in case session
	is already logged in, we can use that and remove checkSession().

2011-08-16  Federico Simoncelli  <fsimonce@redhat.com>

	Run pyflakes and exception check before dist

	Fix the storage exception check

	Fix make distcheck
	It's now possible to run "make distcheck" to verify that we are
	properly shipping, installing and removing the relevant files.

	Change-ID: I0ea26d65baf633265e201094e1c2c40859276203

2011-08-16  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#726960 - Recognise faulty domains on deactivateSD.

2011-08-16  Dan Kenigsberg  <danken@redhat.com>

	BZ#730297 setVmTicket: pass "disconnect" to libvirt

2011-08-11  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#722649 - Invalidate domain MD in removeStorageDomain()
	Because the pool might have been destroyed on another host without this
	host's knowledge, don't trust the MD cache before formatting.

2011-08-11  Dan Kenigsberg  <danken@redhat.com>

	BZ#725802 spmprotect: kill vdsm process, do not restart service
	restarting vdsmd service succeeds to stop vdsm process, but later fails
	to start a new one because of various resons. This patch kills the
	service just as `vdsmd stop` does, and waits for 'respawn' to fire up a
	new process. Respawning would succeed once restarting vdsmd is possible.

	task.py: use LoggerAdapter
	Calling _debug() instread of having an adapter hides the line number of
	the caller function.

2011-08-10  Federico Simoncelli  <fsimonce@redhat.com>

	Fix qemu-img epoch in the package dependencies

2011-08-09  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#726952 - Set original volume as leaf in volume clone recovery

2011-08-09  Gal Hammer  <ghammer@redhat.com>

	BZ#727871: guestIF: rewrite the message reading code.
	The previous code handle only one message at a time. This mean that in case of
	multiple messages vdsm handled only the first message while the following
	messages was not handle until more data was send from the guest.

	This patch change this behavior to scan the entire buffer for messages and
	handle all of them.

2011-08-08  Eduardo Warszawski  <ewarszaw@redhat.com>

	formatStorageDomain removes the VG too.
	When removing a SD the VG should be removed too (atomicity).
	Actually this is what RHEV-M does. Therefore the functions
	split is redundant.
	The removeVG function is marked as DEPRECATED (to be removed).
	The VG is removed in this version in order to minimize the
	chance to remain with a VG thats not belongs to a SD.

	Related to BZ#701671 - Return ENODEV if device does not exist.

	BZ#704131 - Activate all image volumes at once.
	Required for performance reasons if the image is deep.
	Candidate to the Ugly Patch of the Month.

	Related to BZ#704131 - Reduce the number of lvm ops during image mgmt.
	lvm.getLV() is called once per LV, instead of once per LV tag in findImagesByVolume().

	Related to BZ#704131 - Simplify getDomains.

	Avoid to do lvm._bootstrap when importing lvm module.

2011-08-07  Dan Kenigsberg  <danken@redhat.com>

	BZ#727920 restart libvirt upstart job upon libvirt upgrade
	We configure libvirt to run as an Upstart job, instead of the default
	SysV service. When libvirt is upgraded it should stop the old libvirtd
	process and start the new one, but it does so only if it is run via
	SysV.

	BZ#726941 vds_bootstrap: fix broken forward-port

2011-08-04  Dan Kenigsberg  <danken@redhat.com>

	supportedRHEVMs: remove non-exsiting rhevm 2.3 version
	The fact that we still report 2.3 was mentioned in BZ#727945

2011-08-04  Federico Simoncelli  <fsimonce@redhat.com>

	Standardize fileUtils.DirectFile behavior
	According to python documentation:

	  The most commonly-used values of mode are 'r' for reading,
	  'w' for writing (truncating the file if it already exists),
	  and 'a' for appending. Modes 'r+', 'w+' and 'a+' open the
	  file for updating (note that 'w+' truncates the file).

	BZ#726630 Use os.access twice for NFS stale handle

2011-08-04  Yotam Oron  <yoron@redhat.com>

	BZ#716919 - Update guest cpu running state after underlying VM is continued
	The guest CPU state should be updated after the underlying machine is
	resumed, so that the right value is read from libvirt.

2011-08-03  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#723579 AdvancedStatsThread should expose stop()
	The VmStatsThread wasn't exposing the stop method and therefore
	it was never stopped during prepareForShutdown.
	Even if it was declared as 'daemon' thread it kept the rest of
	the application running satisfying its requests.

2011-08-03  Haim Ateya  <hateya@redhat.com>

	BZ#727649 - Raise log severity when vdsm fails to run vm

2011-08-03  Dan Kenigsberg  <danken@redhat.com>

	BZ#727602 setVmTicket: never expire ticket
	Revert when libvirt bug 727602 is resolved.

	v2:
	- expire all tickets sometime in 2035

2011-08-03  Federico Simoncelli  <fsimonce@redhat.com>

	Introduce new version system for VDSM

	Use automake to build and install vdsm
	Autoconf is a tool for producing shell scripts that automatically
	configure software source code packages to adapt to many kinds of
	Posix-like systems.
	Automake aims to allow the programmer to write a makefile in a
	higher-level language, rather than having to write the whole makefile
	manually.
	In VDSM autoconf is used to configure paths and check for tools
	required both at build and run time. Automake is used to generate
	makefiles which already include features like recursion and standard
	targets like: all, dist, clean, distclean.

	Path and user substitutions using autoconf

	Use autoconf for external programs

	Initial support for autoconf

	Add a recursive install target in Makefile

	Move vdsm/hooks to vdsm_hooks

	Replace 'cp' and 'mkdir' with $(INSTALL)

	Add SCRIPTFILES group to vdsm/Makefile

	Replace variable PREFIX with DESTDIR

2011-08-03  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#727537 - Actually invalidate lvmCache when asked

2011-08-02  Dan Kenigsberg  <danken@redhat.com>

	BZ#725240 logrotate libvirtd.log often
	Edit libvirt's /etc/logrotate.d/libvirtd and call it every 15 minutes so
	that /var/log/libvirtd.log is rotated and compressed more often

	v2:
	- use correct path to /etc/logrotate.d/libvirtd in cont.d rule
	- keep /etc/logrotate.d/libvirtd mode
	- use full path to coreutils

	v3:
	- use valid comments in /etc/logrotate.d/libvirtd

2011-08-01  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#726630 Use only os.access to check permissions
	The old implementation of fileUtils.pathExists was using a flawed
	re-implementation of os.access as backup check for files with a NFS
	stale handle, the consequence was that accessible files were
	reported as non-accessible.
	We now use os.stat to refresh the NFS handle and then os.access to
	determine weather we can read and write the file.

2011-08-01  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#726410 - Ignore patitioned device (again)

2011-08-01  Juan Hernandez  <juan.hernandez@redhat.com>

	BZ#725720 Add "devcapacity" to PV info
	Add a new "devcapacity" field to the PV info provided by VDSM.
	This is obtained from the "dev_size" from "pvs". This and change
	Ic0bd3c94a6e4999cb91f96c798a0108890321fbd in RHEV-M are
	required to fix bug #716964 in RHEV-M.

2011-08-01  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#726941 Force VDSM_DIR in sys.path

2011-07-31  Haim Ateya  <hateya@redhat.com>

	BZ#722865 - Increment multipath.conf revision (tag) so upgrade will take effect

2011-07-30  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#726359 Use ethtool to get interface state

2011-07-29  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#699976 Bypass host cache when using qemu-img

2011-07-28  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#722754 Limit lvm retries to broken devices

2011-07-28  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#726045 mask OSError in case domain sampling fails

2011-07-28  Dan Kenigsberg  <danken@redhat.com>

	BZ#698173 updateVM: encode ovf data as utf8 on disk
	v2:
	- decode ovf when it is read by getVmsInfo

2011-07-27  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#720981 - Sometimes devices have whitespace in their name file

	BZ#725963 - Fix error handling in isBlockDevice()

2011-07-27  Dan Kenigsberg  <danken@redhat.com>

	BZ#688616 keep cgroup off as kernel support is not ready yet
	We are not yet ready to ship kernel release -150 which solves the cgroup
	bug. Sorry for the noise.

	Related to BZ#688616: do not stop cgroup when vdsmd start
	Oopsy, forgot to revert that one...

2011-07-26  Dan Kenigsberg  <danken@redhat.com>

	Revert "BZ#688616 Turn cgroups off in the installation of a node."
	This reverts commit c622f6a45d9eb34e3203f24b2f53f4e70e37ded9.

	With kernel-2.6.32-150.el6 built, the return of cgroups is imminent.

2011-07-26  Federico Simoncelli  <fsimonce@redhat.com>

	Remove unused tool config-rhev-manager

	Remove unused img_verifier tool

	Remove unused targets and variables in Makefile

	Remove unused external programs

2011-07-26  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#720911 - Update lvm cache filter when an lvm command fails

	Related to BZ#720911 - Move filtering logic to LVMCache Class

	Related to BZ#720911 - Use context manager in updateLvmConf

	Related to BZ#720911 - Split LVMSetup()

	Related BZ#720911 - use iterator instead of generating a list

	Related BZ#720911 - change class name from LVMInfo LVMCache

	BZ#720257 - Resouce manage volume activation properly
	- Instead of using autorelese = False, hsm will save a record of all
	prepare operations so whenever you teardown a volume you know that the
	operation is accounted for.
	- Ignore errors in domain production after release.

	Related BZ#720911 - Read user defined device only once

2011-07-26  Erez Sh  <erez@redhat.com>

	BZ#723198 - Add timeout to migration: abort it if no progress has been made in a while

2011-07-25  Federico Simoncelli  <fsimonce@redhat.com>

	Use system-uuid parameter in dmidecode command

2011-07-25  Dan Kenigsberg  <danken@redhat.com>

	vdsm-logrotate: remove leftovers of coredump handling
	commit 626c4b4f6 moved compression of coredumps into
	vdsm-logrotate.conf, but left error-handling code in vdsm-logrotate.

	BZ#694026 use libvirt's upstart service
	Unlike the default System V init script, the upstart service would try
	to restart libvirtd daemon in case the latter crashes.

	v8
	- use initctl restart properly
	- shutdown conflicting services (libvirtd sysv included) before
	  configuration
	v9
	- do not fail `initctl restart` if libvirtd is not already running
	v10
	- make rpm removal quite

2011-07-23  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#721356 - Use delay to actually check the delay

2011-07-21  Dan Kenigsberg  <danken@redhat.com>

	BZ#720919 spmprotect.sh: remove more log noise
	former patch for this bug left one place where check_renew complains
	that its RENEWDIR was already removed.

2011-07-20  Haim Ateya  <hateya@redhat.com>

	BZ#722865 - Increase fds limit in multipath.conf

2011-07-20  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#720981 - Don't rely on files in /dev/mapper to be symlinks

2011-07-19  Yotam Oron  <yoron@redhat.com>

	BZ#705058 - StoragePool instanciations should be lock protected.
	Add a storage shared lock on the call to _restorePool, since creates a
	new pool object

2011-07-17  Erez Sh  <erez@redhat.com>

	BZ#720425 - No longer using the return value from wait, because there is None.

2011-07-17  Yotam Oron  <yoron@redhat.com>

	BZ#719857 - Add reboot message to certificate reject
	When the user rejects the certificate's fingerprint, the host will reboot -
	added a message about that.

	BZ#705058 - StoragePool instanciations should be lock protected.
	Add a storage shared lock on the call to _restorePool, since creates a
	new pool object

2011-07-17  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#713173 - Add killProc rollback to deleteImage
	When we run deleteImage with post-zeroing flag, we need to issue 'dd' for this.
	The rollback procedure for deleteImage it's actually roll forward.
	In this situation we need first to kill previous 'dd' operation that may hold
	file handler (or LV) open and prevent us to run the new deleteImage.
	Note that in case we need to run this roll forward action on different host (SPM switchover)
	the 'dd' killing will do nothing and still may fail.

	Related to BZ#719255 - Release lock if prepare volume failed
	We need release lock explicitly and not with autoRelease mechanism.
	This mechanism wouldn't work always. It depends on behaviour of
	different Python's components such like garbage collector and so on.

2011-07-14  Robert Munilla  <rmunilla@redhat.com>

	BZ#720670 vdsm-reg: rotate and compress correct log file

2011-07-13  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#717847 - Postpone VM's periodic tasks until all volumes are prepared

2011-07-13  Dan Kenigsberg  <danken@redhat.com>

	BZ#720919 spmprotect.sh: remove log noise
	check_renew may have been called after fence or release have removed
	RENEWDIR. We should not print nonsense to the log in that case.

2011-07-13  David Naori  <dnaori@redhat.com>

	libvirtconnection: Add "VIR_FROM_RPC" to trigger prepareForShutdown.
	libvirt-0.9.3-2 has change the behavior of libvirt disconnection,
	we now should trigger prepareForShutdown in this case too. (Reference: BZ#681911)

2011-07-12  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#712106 - Add lock for template during moveImage operation

	BZ#717952 - Fix race in moveImage with overwrite of VM with several disks on NFS domains

	Related to BZ#717952 - Use 'with' instead of old lock.acquire and avoid unneeded SDF.produce(sdUUID)

2011-07-12  David Naori  <dnaori@redhat.com>

	BZ#720359: Remove lockfile instead of stop libvirt-guests.
	`service libvirt-guests stop` tries to access libvirtd which
	requires sasl authentication. Instead, removing the lockfile
	signifies to libvirt-guests that it has stopped.

	Related to BZ#719516: Make list nicer and include listNames inside.

2011-07-11  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#699976 Related, use RHEVM leasetime and timeout
	Use the values provided by RHEV-M for LOCK_RENEWAL_INTERVAL, LEASE_TIME,
	LEASE_RETRIES and IO_OP_TIMEOUT.

2011-07-11  Eduardo Warszawski  <ewarszaw@redhat.com>

	Fix vgs reload for stale VGs.
	Stale VG: A VG that is in canche but not in lvm data.

2011-07-10  Dan Kenigsberg  <danken@redhat.com>

	Revert "BZ#701398 Set monitorResponse using controlInfo"
	This reverts commit e1a615c9ad91fe5f7fe147cded028954e80ccf08.

	Libvirt-0.9.3 is not yet ready for our consumption; Furthermore, the
	reverted commit does not solve the case of blocked libvirtd.

2011-07-10  Yotam Oron  <yoron@redhat.com>

	Related to BZ#705058 - Don't start monitoring domains when reconstructing master
	recontructMaster caused domain monitoring threads to be created (repostats)
	but were never released. During "reconstructMaster" the storage pool is
	not connected and hence there is no point in monitoring domain liveness at all.

2011-07-10  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#719255 - Release lock if prepare volume failed

2011-07-07  David Naori  <dnaori@redhat.com>

	BZ#719516 vdsClient: avoid possible race in list table.

2011-07-07  Dan Kenigsberg  <danken@redhat.com>

	BZ#719003 vdsbootstrap: fix English text

2011-07-07  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#718993 - Remove vgchange --refresh
	vgchange --refresh:
	    If any logical volume in the volume group is active, reload its metadata.
	vgchange --refresh may be too long when are many LVs in the VG.
	vgchange --refresh was NOT needed for refreshLV after migration in bug 651803,
	since the LV metadata is reloaded using lvchange --refresh.

2011-07-07  David Naori  <dnaori@redhat.com>

	BZ#719301 clientIF: fix log typo.

	BZ#719346 vdsClient: Remove unsupported "stopAllCopies"

2011-07-06  Federico Simoncelli  <fsimonce@redhat.com>

	Return 1 socket when "physical id" not present
	When "physical id" is not present in /proc/cpuinfo return 1 socket.

2011-07-05  David Naori  <dnaori@redhat.com>

	BZ#716675 Remove timezone from kernelDict

2011-07-05  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#707217 - Remove unneeded IO from __createMailboxMonitor.

	BZ#707217 - Refresh only the VG tree without unnecesary lvm gymnastics.
	StoragePool._refreshDomainLinks() needs only to call domain.refreshDirTree(),
	instead of the much more intrusive domain.refresh().
	For fileSD, refreshDirTree() (as well as refresh()) is completely empty.

	BZ#707217 - Remove unneeded refreshSpecialVolumes() call
	Special LVs are activated in the subsequent refreshDirTree() call.

	BZ#707217 - Do not re-produce the msd in __rebuild.

	BZ#707217 - Remove getMasterDomain call from _refreshDomainLinks.
	self.masterDomain already contains the needed data, which should not be checked again in this flow.

	BZ#707217 - Reduce the number of lvm ops in connectStoragepool().

2011-07-05  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#701398 Set monitorResponse using controlInfo

2011-07-05  Yotam Oron  <yoron@redhat.com>

	BZ#680034 - Delegate long blocking operations out of process
	When a NFS server is unreachable, any files related operation
	takes long time (about 6 minutes) before it fails.
	In the case of connectStorageServer, it eventually causes
	rhevm timeout. Instead of doing the file ops in process,
	delegate them to another process with a 1 minute timeout.

2011-07-05  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#717658 - Do lvm cache refresh in SDF.refreshStorage

	BZ#717658 - Remove StorageDomainCache.invalidate().

	BZ#717658 - Remove unnecessary SDF.refreshStorage().

2011-07-03  Dan Kenigsberg  <danken@redhat.com>

	BZ#718488 deployUtil: run on python2.4

	Related to BZ#716692: avoid pyflakes error

2011-07-01  Federico Simoncelli  <fsimonce@redhat.com>

	BZ#716692 Report the real gateway for the networks

	BZ#716962 logrotate: compress logs using the xz format

2011-06-30  Dan Kenigsberg  <danken@redhat.com>

	BZ#716705 refuse to start VMs with "unknown" host osname
	If, due to misconfiguration, the host os is not recognizable, refuse to
	start new VMs as the os name should be passed to the guest bios.

2011-06-30  Igor Lvovsky  <ilvovsky@redhat.com>

	Related to BZ#712106 - Get rid of redundant instance of rmanager

2011-06-29  Erez Shinan  <eshinan@redhat.com>

	BZ#709788 - Don't assume failure when migration times out + specialized exception
	Vdsm waits for an event from libvirt to tell it that migration succeeded.
	If the connection to libvirt is lost, vdsm might think that the migration failed, though it didn't.
	The solution in this patch is to "ping" libvirt before deciding that the migration failed.

2011-06-29  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#713823 - We should not fail if deactivateLV failed during block volume creation

2011-06-29  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#717225 - Check version consistency only for data SDs.
	Only data domains are restricted to be not mixed.
	ISO and export domains can be attach with no regard to their version.

2011-06-29  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#716833 - Fix race in metadata offset computation during simultaneously volume creation in block storage domain

2011-06-28  Dan Kenigsberg  <danken@redhat.com>

	Revert "BZ#716705 refuse to start VMs with "unknown" host osname"
	This reverts commit 3cfe2b9f15705eec9c749fd173bf5634e8919bde.

	Related to BZ#705297: have a single virEventLoopPure thread
	Allowing multiple virEventLoopPure threads causes events being lost.

	BZ#678039 vdsmd: use bash assignment properly
	Bash is not perl.

2011-06-27  Dan Kenigsberg  <danken@redhat.com>

	BZ#716705 refuse to start VMs with "unknown" host osname
	If, due to misconfiguration, the host os is an recognizable, refuse to
	start new VMs as the os name should be passed to the guest bios.

	BZ#715006 set qemu death reason only once
	There used to be a race condition between destroy() setting the exitCode
	to NORMAL, and the onQemuDeath event setting it to ERROR.

	BZ#715006 releaseVm only once
	releaseVm() is called both by destroy() and by onQemuDeath. Since we
	obtain onQemuDeath event following destroy, we used to run it twice.

2011-06-26  Dan Kenigsberg  <danken@redhat.com>

	BZ#715327 connectStorageServer: report original error
	When connectStorageServer: fails, we try to clean after ourselves.
	However, the error code we report should reflect the original cause of
	the error, not a consequential error during cleanup.

2011-06-26  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#713145 getMetaDataMapping: remove duplicate PV metadata if seen

2011-06-26  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#713725 - Remove unused parameters from StoragePool.disconnect.

	BZ#713725 - Remove pool validations from task mgmt.

	BZ#713725 - Removed validateConnectedPool.

	BZ#713725 - Use getPool in validatePoolSD.
	We want validatePoolSD() to raise a specific Storage exception if the pool does not exists, instead of a cryptic KeyError.

	BZ#713725 - Assert that pool is not in dict if connect failed.

	BZ#713325 - Remove StoragePool.state.
	pool.states should be protected by Storage SPUUID lock or are racy in they actual form.
	Therefore are removed.
	If the pool can't be connected it should no be added to the pools dict.
	If the pool failed to be disconnected it will not removed from the pools dict.

	BZ#713725 - Remove StoragePool.isConnected
	No thread (but the one running StoragePool.connect()) can find the pool in the
	state "connecting", since connect() is protected by Storage SPUUID resource.

	BZ#713725 - Avoid leaving disconnected pools in pools dict.

	BZ#713725 - Remove unused StoragePool.validatePoolMVerEqual function.

	BZ#713725 - Remove unused parameter in SPM.isActive.

	BZ#713725 - Remove setPool.

	BZ#713725 - One pools dict to rule them all

2011-06-26  Sanjay Mehrotra  <smehrotr@redhat.com>

	BZ#678039 - If vdsm start fails, 0 exit code is returned
	The current vdsmd returns for start, stop, status, reload and
	reconfigure does not comply with Fedora Initscripts standard.

	The changes allow vdsmd to adhere to Fedora standard of exit codes as
	mentioned in Exit Codes of non-Status Actions, Exit Codes for the Status
	Action sections of fedora project.

2011-06-26  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#712796 expose domain version as string instead of int

2011-06-26  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#676322 - Removed multipath.getDeviceCapacities.

2011-06-23  Yotam Oron  <yoron@redhat.com>

	BZ#707874 - Disable RHEVM configuration in RHEVH until network is up
	    RHEVM configuration will always fail if the network was not configured,
	    therefore don't allow RHEVM configuration until network has been
	    configured.

2011-06-20  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#713185 - getStorageDomainsList return the same domain twice.

2011-06-20  Yotam Oron  <yoron@redhat.com>

	BZ#602338 - Add RHEVM certificate finrgerprint verification
	Add RHEVM certificate finrgerprint verification option for both the
	menus installation and the kernel params installation

2011-06-20  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#708779 - Avoid pools with mixed domain versions
	RHEV-M should not be attempting to join domains of mixed versions into a
	single pool anyway, but let us protect rhevm from itself.

	Related to BZ#676322 - Added getDeviceSize.

2011-06-19  Dan Kenigsberg  <danken@redhat.com>

	BZ#705297 getVdsCaps: memoize libvirt responses

	factor getCaps out of clientIF

	libvirtconnection: cache several connections, one per context

	vm.py: drop more qemu-related dead code

2011-06-19  Erez Shinan  <eshinan@redhat.com>

	BZ#713211 - vdsClient now accepts empty nics argument for addNetwork (regression fix?)

2011-06-19  Yotam Oron  <yoron@redhat.com>

	BZ#709998 - Actually write the port value to the config file during RHEVH installation
	    It so happens that the port value was not written to the config file
	    during menus installation. Fized that.

2011-06-16  Eduardo Warszawski  <ewarszaw@redhat.com>

	Related to BZ#712829 - Simplify refreshSpecialVolumes.

	Related to BZ#712829 - Simplify refreshDirTree.

	Related to BZ#712829 - Remove unnecessary validations in activateLVs flows.

2011-06-15  Igor Lvovsky  <ilvovsky@redhat.com>

	BZ#702906 - Add process pool per domain

	BZ#713196 - Ignore SPM parameters validation during fenceSpmStorage

2011-06-15  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#713215 - Fix tuple startswith.
	devicemapper.getAllMappedDevices returns tuple.

2011-06-15  Yotam Oron  <yoron@redhat.com>

	BZ#602338 - Use standard ovirtfunctions python module instead of the bash version

2011-06-15  Eduardo Warszawski  <ewarszaw@redhat.com>

	BZ#704666 - Avoid unnecesary lvExtends on high write.

2011-06-15  Dan Kenigsberg  <danken@redhat.com>

	Makefile: run pyflake on all .py files
	former code was confused if current directory had *.py files.

2011-06-15  Yotam Oron  <yoron@redhat.com>

	BZ#602338 - Remove netconsole configuration from RHEVH menus
	    This commit removes netconsole configuration from rhevm menus
	    in rhevh installation. The actual support for netconsole is
	    long gone; the menus should match reality.

	BZ#602338 - Make pyflakes happy
	    After rhevm.py was moved to the vdsm repo, pyflakes found a few
	    errors and therefore was not checking this file.
	    Clean the errors and make pyflakes check the file

	BZ#602338 - Move rhevm.py from the ovirt repo to vdsm repo
	    rhevm.py is the file that will present the user with RHEVM
	    configuration menus when the RHEVH boots. It needs to be part
	    of the vdsm repo.

2011-06-15  Saggi Mizrahi  <smizrahi@redhat.com>

	BZ#705058 - Clear repostats on pool deletion

2011-06-15  Dan Kenigsberg  <danken@redhat.com>

	BZ#684764 bootstrap: reconfigure after installation
	And log exceptions if encountered.

	v2: use nicer name for log file, break long lines.

2011-06-15  Tabula Rasa  <cleanslate@redhat.com>

	Initial commit
