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.

Change-Id: I858e3db495213f05808ee4e2a22ebe095393fbd8
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/5004
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
configuNetworks: no need to create set repeatedly

Yes, this is a very minor performance improvement, but I still like it.

Change-Id: I6c182c877e5b1c0bc5e19797fae43a31940ba924
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/5005
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.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.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Change-Id: I11ad4f8ae4219a75484334b9a772c7bfc44acb56
Reviewed-on: http://gerrit.ovirt.org/5045
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.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

Change-Id: I7ec53b45fc27b48d21638e405b219a66f2707b5b
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/3938
Reviewed-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Tested-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Reviewed-by: Adam Litke <agl@us.ibm.com>
Reviewed-by: Wenyi Gao <wenyi@linux.vnet.ibm.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.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.

Change-Id: Ibb9c371d1f3d90521cc4bfb9516a0bb979843f52
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/3901
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Reviewed-by: Adam Litke <agl@us.ibm.com>
Reviewed-by: Dan Kenigsberg <danken@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

Change-Id: I4d1716a6f66a108d60f39fad14d92625a692d0e3
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/5062
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Close and remove the temporary file before raising a exception

Change-Id: I93eafbcf78805669596258b3579ee49cc1b79360
Signed-off-by: Wenyi Gao <wenyi@linux.vnet.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/4885
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
additional capsTests

Change-Id: I8c8cbf4c5b7801b2887a84c8c3b7a503f1a995f1
Signed-off-by: y kaplan <ykaplan@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/4185
Reviewed-by: Gal Hammer <ghammer@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
deployUtil: Do not use static home for root user

Fix for systems which do not use /root as home for root user.

Change-Id: Ib12318f4d4a4a14cf7508d5ea626d5e6b36bf102
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/5112
Reviewed-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Reviewed-by: Doron Fediuck <dfediuck@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
pep8 fixes for storage/blockVolume.py

An attempt to clean blockVolume.py from pep8 errors.
v2: Added blockVolume.py to the pep8 whitelist.

Change-Id: I270b8182be7fb2cfc33b54dbd262d209bd554164
Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/5091
Reviewed-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
Tested-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Reviewed-by: Dan Kenigsberg <danken@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.

Change-Id: Ic8b5b366b8668cf74b04d1089e6e515e93c0f746
Signed-off-by: Amador Pahim <apahim@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/4755
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Xu He Jie <xuhj@linux.vnet.ibm.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Merge branch 'master' of github.com:wudx05/vdsm