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.

Change-Id: Iefd5f53c9118eeea6817ce9660ea18abcfd1955c
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/9840
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@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

Change-Id: I5abd61c03ce907ea94761f0209a4626669051eb1
Signed-off-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/9042
Reviewed-by: Yaniv Bronhaim <ybronhei@redhat.com>
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@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.

Change-Id: I300adc5ac3d9b12fee49023a54e5ffb4dee98da1
Signed-off-by: Yaniv Bronhaim <ybronhei@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10194
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-by: Ohad Basan <obasan@redhat.com>
Reviewed-by: Adam Litke <agl@us.ibm.com>
Tested-by: Adam Litke <agl@us.ibm.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.

Change-Id: I6925c59650aaa81fa925a4be3bcd72dcbebbb415
Signed-off-by: Antoni S. Puimedon <asegurap@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10161
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
Fix miscTests:ExecCmd.testNice failing due to race

Change-Id: I9df2a3b437fe1eb380beebf10ef049f2d49104a6
Signed-off-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10207
Reviewed-by: Peter V. Saveliev <peet@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
caps nits

Change-Id: I231ede3f64010a3f9d3801914bc46088600befd2
Signed-off-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10047
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-by: Adam Litke <agl@us.ibm.com>
Fix blockSD pep8.

Change-Id: I2ed4ce2a5748a911f76da02f762e5bda9352b905
Signed-off-by: Antoni S. Puimedon <asegurap@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10213
Reviewed-by: Dan Kenigsberg <danken@redhat.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

Change-Id: I0a3831761aed81932466e29d88f5eb50bf5ce23d
Signed-off-by: Pradipta Kr. Banerjee <bpradip@in.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/10202
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
Handling removing file Exceptions.

Change-Id: If76e158ad69921d382e3d42ae45486534b9379f9
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/8625
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
vdsm: pep8 cleanups

Change-Id: I481621405ec782e4e6707a16ac06e27e0f4cdffd
Signed-off-by: Moti Asayag <masayag@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10215
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
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.

Change-Id: I5264058737cc2b53b9bfa22d344bf26c8d269f87
Signed-off-by: Moti Asayag <masayag@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10214
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Add results.log to .gitignore

Change-Id: I5f623af645f5b90a6772f1588e91c1ddd2f81992
Signed-off-by: Moti Asayag <masayag@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10216
Reviewed-by: Dan Kenigsberg <danken@redhat.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


Change-Id: Ib74950bd3721a23cc2b84f8c860d3aea8144e01e
Signed-off-by: Adam Litke <agl@us.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/10246
Reviewed-by: Saggi Mizrahi <smizrahi@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.

Change-Id: I12b5ba80121b8e8d23a63ecc7aaab829bfc67a51
Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=886533
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10024
Tested-by: Daniel Paikov <paikov@gmail.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Override compellent device defaults in multipath.conf

Change-Id: Ice1d3c1845746384794e724a064ba05c56bf2a42
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=865673
Signed-off-by: Yeela Kaplan <ykaplan@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10192
Reviewed-by: Ayal Baron <abaron@redhat.com>
Tested-by: Ayal Baron <abaron@redhat.com>
restarting libvirtd didn't work over allinone setup

Change-Id: I1ab443fbef35f1ffaab59973f278eebe0143dd87
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=888258
Signed-off-by: Yaniv Bronhaim <ybronhei@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10237
Tested-by: Ohad Basan <obasan@redhat.com>
Reviewed-by: Ohad Basan <obasan@redhat.com>
Reviewed-by: 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.

Change-Id: I2caacba292fc05118542ba3636281ef4970e32d4
Signed-off-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10225
Reviewed-by: Antoni Segura Puimedon <asegurap@redhat.com>
Reviewed-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
api: Report CPU thread info in getVdsCapabilities

Report CPU thread info in getVdsCapabilities

Change-Id: If6868f3947ade62dda7cb6265b0c9e50c2face94
Signed-off-by: Greg Padgett <gpadgett@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10144
Reviewed-by: Doron Fediuck <dfediuck@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Fix typo in negative flow log in blockSD.rmDCImgDir().

Related to BZ#885489.

Change-Id: I951e582acc86e08d709da4249084015660fc4ea0
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/10153
Reviewed-by: Yeela Kaplan <ykaplan@redhat.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.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

Change-Id: I40178f44b5ab2602769aa4c70a5e54564f9f360e
Signed-off-by: Pradipta Kr. Banerjee <bpradip@in.ibm.com>
Reviewed-on: http://gerrit.ovirt.org/10181
Reviewed-by: Dan Kenigsberg <danken@redhat.com>