vdsm/aglitke.git
10 years agoBZ#781317 - adjust getos() to print real node type48/1048/1
Haim Ateya [Sun, 15 Jan 2012 14:20:13 +0000 (15 16:20 +0200)]
BZ#781317 - adjust getos() to print real node type

Change-Id: Ia42fcf9570e096f7b79fed10c3a66d3fdf739cf6

10 years agoBZ#771329 Use a copy of the domainsToUpgrade
Saggi Mizrahi [Wed, 4 Jan 2012 17:50:27 +0000 (4 12:50 -0500)]
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!

Change-Id: I3de0646af2fe9a9fcde708837cfcd83d10385026
Reviewed-on: http://gerrit.ovirt.org/900
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRaise ongoing creations count
Saggi Mizrahi [Mon, 19 Dec 2011 18:05:29 +0000 (19 13:05 -0500)]
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)

Change-Id: I83b4f956619ee6cdfde5fdbec9d52484c355b33f
Reviewed-on: http://gerrit.ovirt.org/679
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#771686 fix MAX_VLAN_ID
ye kap [Fri, 13 Jan 2012 11:42:39 +0000 (13 13:42 +0200)]
BZ#771686 fix MAX_VLAN_ID

Change-Id: I6ddc533d18cbc2411fd4f1b26397eb344419def4
Reviewed-on: http://gerrit.ovirt.org/1033
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#773666 - Fix HSM flows should not change rw permissions.
Eduardo Warszawski [Wed, 28 Dec 2011 17:40:42 +0000 (28 19:40 +0200)]
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.

Change-Id: Ia53f0008cf3e7b25e14c7f03798c1ae527056725
Reviewed-on: http://gerrit.ovirt.org/797
Reviewed-by: Ayal Baron <abaron@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#772556 bootstrap: ignore restorecon errors
Dan Kenigsberg [Thu, 12 Jan 2012 14:05:34 +0000 (12 16:05 +0200)]
BZ#772556 bootstrap: ignore restorecon errors

This is particularly painful if SELinux is disabled.

Change-Id: I0af8e5f68c2d1ec52208684b95bcff2e68ba88fe
Reviewed-on: http://gerrit.ovirt.org/1022
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#772670 [rhevh] network is not set after using boot params
Shahar Havivi [Thu, 12 Jan 2012 14:22:06 +0000 (12 16:22 +0200)]
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.

Change-Id: I87e425c684a187e5dd874d11646aa7acf676e0a2
Reviewed-on: http://gerrit.ovirt.org/1024
Reviewed-by: Michael Burns <mburns@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSet the drive sizes to '0' as default
Federico Simoncelli [Wed, 11 Jan 2012 11:42:50 +0000 (11 11:42 +0000)]
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'.

Change-Id: Iba8168a40c9b2d27c60788f5f97d3f7551df2781
Reviewed-on: http://gerrit.ovirt.org/990
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#772591 Specify which user/group should be used for core dumps rotation
huntxu [Wed, 7 Dec 2011 02:33:17 +0000 (7 10:33 +0800)]
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.

Change-Id: I38738f494e9bd241ea27e6e18b4d348fc3dfe643
Reviewed-on: http://gerrit.ovirt.org/971
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSupport specParams parameter as dictionary per device
Igor Lvovsky [Sun, 8 Jan 2012 12:25:49 +0000 (8 14:25 +0200)]
Support specParams parameter as dictionary per device

Change-Id: I0e584931d77c2f64ee5a1d613d6b73e6d0397ba7
Reviewed-on: http://gerrit.ovirt.org/979
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoAll size parameters in vm's conf should be strings and not integers
Igor Lvovsky [Tue, 10 Jan 2012 14:00:29 +0000 (10 16:00 +0200)]
All size parameters in vm's conf should be strings and not integers

Change-Id: Ief705e67908ee5a2dbe6a51959e47789d78aaa16
Reviewed-on: http://gerrit.ovirt.org/978
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoDon't try to schedule SPM tasks on HSM
Federico Simoncelli [Wed, 21 Dec 2011 13:08:03 +0000 (21 13:08 +0000)]
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.

Change-Id: I7183fb2a7ef391a73cbb1a6dff9bf46238275100
Reviewed-on: http://gerrit.ovirt.org/695
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoDon't change the name of a secured class
Federico Simoncelli [Tue, 10 Jan 2012 11:58:56 +0000 (10 11:58 +0000)]
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.

Change-Id: I7d34b14391a0940e1ca73b8d736877f49b1c47f5
Reviewed-on: http://gerrit.ovirt.org/974
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoFix warning: File listed twice
Igor Lvovsky [Sun, 8 Jan 2012 16:29:31 +0000 (8 18:29 +0200)]
Fix warning: File listed twice

Change-Id: I9279838367bca753190108130d10ea1d77aaf6df
Reviewed-on: http://gerrit.ovirt.org/951
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove unnecessary validates.
Eduardo Warszawski [Wed, 28 Dec 2011 18:10:54 +0000 (28 20:10 +0200)]
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.

Change-Id: I55482fc5ce78d68d5af7ba62c92d253e19f45e6b
Reviewed-on: http://gerrit.ovirt.org/801
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Haim Ateya <hateya@redhat.com>
10 years agoRemove unnecessary validation.
Eduardo Warszawski [Wed, 28 Dec 2011 16:38:57 +0000 (28 18:38 +0200)]
Remove unnecessary validation.

This check prevents VDSM to query info about a disk on a running
VM after VDSM restart.

Change-Id: I3b9c89402f28614a893c9c4a1d8abbb55d9eaf1f
Reviewed-on: http://gerrit.ovirt.org/800
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
10 years agoFixing unnecessary preparePath() call on recover.
Eduardo Warszawski [Sun, 8 Jan 2012 15:23:35 +0000 (8 17:23 +0200)]
Fixing unnecessary preparePath() call on recover.

On behalf of Dan Kenisberg.

Change-Id: Ifca49f960d80176d5ddc594a2ae269cdaf13dec5
Reviewed-on: http://gerrit.ovirt.org/950
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoFor BC we should to keep running VM run after vdsm upgrade.
Igor Lvovsky [Sun, 8 Jan 2012 15:34:26 +0000 (8 17:34 +0200)]
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

Change-Id: I67d555b1b75e3287d083ccde6e1f0869f09f3234
Reviewed-on: http://gerrit.ovirt.org/949
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
10 years agoFix sendExtendMsg declaration, should be public
Igor Lvovsky [Sun, 8 Jan 2012 14:30:24 +0000 (8 16:30 +0200)]
Fix sendExtendMsg declaration, should be public

Change-Id: Idc060de51daf573b462c2f4ade789fd884e627a6
Reviewed-on: http://gerrit.ovirt.org/948
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
10 years agoMove domain monitor out of sp.py
Saggi Mizrahi [Thu, 3 Nov 2011 14:53:45 +0000 (3 16:53 +0200)]
Move domain monitor out of sp.py

Domain monitoring logic should be seperated from the core pool logic to
reduce StoragePool class complexity

Change-Id: I18f30541a3466c532b2fd6144cd54b46545aff0c
Reviewed-on: http://gerrit.ovirt.org/190
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoMake exporting more pythonic
Saggi Mizrahi [Mon, 14 Nov 2011 10:03:37 +0000 (14 12:03 +0200)]
Make exporting more pythonic

This seperated the dispatcher from hsm and allows us to add propertoes
to all public function with ease

Change-Id: I4e26da2a53bae5e897cebdb41af9abe519760aca
Reviewed-on: http://gerrit.ovirt.org/208
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoMove reconnect file existence check
Saggi Mizrahi [Wed, 4 Jan 2012 21:38:32 +0000 (4 16:38 -0500)]
Move reconnect file existence check

Move the check to the inside of the _saveReconnectFunction show it's
always recreated.

Change-Id: I72abecc0dab58cd008d0afe8046d2b3c8f898517
Reviewed-on: http://gerrit.ovirt.org/917
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoFix getMasterDomain masterVersion handling
Saggi Mizrahi [Mon, 28 Nov 2011 20:16:27 +0000 (28 15:16 -0500)]
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.

Change-Id: I2e5dd06800e770c098460466fa8642c5bc928e54
Reviewed-on: http://gerrit.ovirt.org/431
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoFix logging formatting in resourceManager
Saggi Mizrahi [Wed, 7 Dec 2011 20:09:55 +0000 (7 15:09 -0500)]
Fix logging formatting in resourceManager

Change-Id: I08b530e8fbf66b9b8326cf1733df6a3e4f23ef1a
Reviewed-on: http://gerrit.ovirt.org/531
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#674010 - Fix name error in vdsClient - 'commands' not found
Haim Ateya [Fri, 6 Jan 2012 06:40:01 +0000 (6 08:40 +0200)]
BZ#674010 - Fix name error in vdsClient - 'commands' not found

Change-Id: I091b32ff19d59ec7036ee440ee60913c06be4c13
Reviewed-on: http://gerrit.ovirt.org/906
Tested-by: Haim Ateya <hateya@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSupport new type of vmParams parameter for VM create.
Igor Lvovsky [Thu, 22 Dec 2011 15:19:11 +0000 (22 17:19 +0200)]
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

Change-Id: I26a9bf46a23f5c6d92ea3fea163ac23dcac21df8
Reviewed-on: http://gerrit.ovirt.org/788
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agonew verb: migration cancel
Shahar Havivi [Wed, 30 Nov 2011 11:35:08 +0000 (30 13:35 +0200)]
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"

Change-Id: I4f503c444c4ca1469c18480d6ca29fba8f011d4c
Reviewed-on: http://gerrit.ovirt.org/480
Tested-by: Shahar Havivi <shavivi@redhat.com>
Reviewed-by: Peter V. Saveliev <peet@redhat.com>
Tested-by: Peter V. Saveliev <peet@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agovdsm_reg: rename rhevm.py to engine.py
Douglas Schilling Landgraf [Wed, 4 Jan 2012 20:40:43 +0000 (4 15:40 -0500)]
vdsm_reg: rename rhevm.py to engine.py

Renamed the file rhevm to engine.
BZ#771414

Change-Id: I2a49c22a3ebfcf31fd5653a1e7fdd88d53c8f7a5
Reviewed-on: http://gerrit.ovirt.org/899
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agorhevm.py: replace RHEV-M string to oVirt-Engine
Douglas Schilling Landgraf [Wed, 4 Jan 2012 06:41:24 +0000 (4 01:41 -0500)]
rhevm.py: replace RHEV-M string to oVirt-Engine

Replace RHEV-M string to oVirt Engine
BZ#771414

Change-Id: Ic52d2d508b3a5f42e1341df5532ba5974cd14d5f
Reviewed-on: http://gerrit.ovirt.org/871
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemoved useless docs from lvm.py
Saggi Mizrahi [Mon, 19 Dec 2011 17:37:44 +0000 (19 12:37 -0500)]
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

Change-Id: I70975ba7e7494a6d6e62acdfed8cd298f1f6f278
Reviewed-on: http://gerrit.ovirt.org/680
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoFix floppy drives: bus should be 'fdc'.
Igor Lvovsky [Tue, 3 Jan 2012 08:39:30 +0000 (3 10:39 +0200)]
Fix floppy drives: bus should be 'fdc'.

Change-Id: I912cc1418e0df32d44bbc1a7c79c496aebd86c36
Reviewed-on: http://gerrit.ovirt.org/787
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoCompile python files using automake
Federico Simoncelli [Thu, 22 Dec 2011 10:09:58 +0000 (22 10:09 +0000)]
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

Change-Id: I7dce5c317605b84ec883feb04bfc83c5f64d921b
Reviewed-on: http://gerrit.ovirt.org/708
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agovdsm-reg.conf.in: remove vdc_authkeys_path
Douglas Schilling Landgraf [Thu, 29 Dec 2011 05:45:28 +0000 (29 00:45 -0500)]
vdsm-reg.conf.in: remove vdc_authkeys_path

The auth key is defined in deployUtil.py.in
This conf value has never been used.

Change-Id: I1ed0cb70d3d77bc00c3dec8cd263968bbd37622e
Reviewed-on: http://gerrit.ovirt.org/798
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#769179 - Omit getSessionList from vdsClient and its dependent files
Haim Ateya [Tue, 20 Dec 2011 09:22:57 +0000 (20 11:22 +0200)]
BZ#769179 - Omit getSessionList from vdsClient and its dependent files

Change-Id: Ia448f4e8c2720b5958fef59f4f55b2f4ae63d2ac
Reviewed-on: http://gerrit.ovirt.org/659
Reviewed-by: Eduardo <ewarszaw@redhat.com>
Tested-by: Haim Ateya <hateya@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agovdsmd.8: update man page to reference oVirt
Douglas Schilling Landgraf [Thu, 29 Dec 2011 16:06:33 +0000 (29 11:06 -0500)]
vdsmd.8: update man page to reference oVirt

Replace any remaining reference from RHEV to oVirt

Change-Id: I7226817576b713490cdeb098356aee8894af2bfe
Reviewed-on: http://gerrit.ovirt.org/550
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agovdsm-reg: change registration servlet name
Douglas Schilling Landgraf [Wed, 7 Dec 2011 16:10:02 +0000 (7 11:10 -0500)]
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.

Change-Id: I743bfc8258a7cf8fd032cde13aadd2827ed9ea29
Reviewed-on: http://gerrit.ovirt.org/310
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoreplace default bridge name from brVDSM to ovirtmgmt
Douglas Schilling Landgraf [Tue, 27 Dec 2011 19:07:57 +0000 (27 14:07 -0500)]
replace default bridge name from brVDSM to ovirtmgmt

Change-Id: I8115192b65b431e8066313bda357f8aa86880c86
Reviewed-on: http://gerrit.ovirt.org/772
Reviewed-by: Doron Fediuck <dfediuck@redhat.com>
Tested-by: Doron Fediuck <dfediuck@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agodeployUtil: replace rhevm cert to engine
Douglas Schilling Landgraf [Tue, 27 Dec 2011 18:46:46 +0000 (27 13:46 -0500)]
deployUtil: replace rhevm cert to engine

Note that this patch breaks bootstrap for RHEV-M-3.0

Change-Id: I945838b1ad59414a382a6419875c6fdb79d4d567
Reviewed-on: http://gerrit.ovirt.org/769
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agorename rhevm bridge to brVDSM
Douglas Schilling Landgraf [Tue, 27 Dec 2011 18:45:33 +0000 (27 13:45 -0500)]
rename rhevm bridge to brVDSM

Remove rhevm as bridge and use brVDSM
http://bugzilla.redhat.com/753879
http://bugzilla.redhat.com/753571

Change-Id: Id1c98658af80ad52a14934a962be4945c91ff48d
Reviewed-on: http://gerrit.ovirt.org/311
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoAdd Fedora support to vdsm-bootstrap
Douglas Schilling Landgraf [Tue, 27 Dec 2011 18:43:55 +0000 (27 13:43 -0500)]
Add Fedora support to vdsm-bootstrap

while (hopefully) maintaining RHEL-5 support, and leaving bridge name
games to a following patch.

Change-Id: I17e9fd3550c5db5865b88ef4cfc93953b99827b6
Reviewed-on: http://gerrit.ovirt.org/767
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agomake vds_bootstrap executable again
Douglas Schilling Landgraf [Tue, 27 Dec 2011 18:25:57 +0000 (27 13:25 -0500)]
make vds_bootstrap executable again

while keeping rpmlint happy.

Change-Id: I43926966e963aee96e9a5b5ededb2974ee0196fa
Reviewed-on: http://gerrit.ovirt.org/765
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoHandle EAGAIN and EINTR in ProcessPool.runExternally
Federico Simoncelli [Tue, 18 Oct 2011 10:45:29 +0000 (18 10:45 +0000)]
Handle EAGAIN and EINTR in ProcessPool.runExternally

Change-Id: Id1d0f35af9db6e237c87b00438b9ce3ded9faa8f
Reviewed-on: http://gerrit.ovirt.org/200
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoAdd NoIntr utility class
Federico Simoncelli [Mon, 7 Nov 2011 12:46:17 +0000 (7 12:46 +0000)]
Add NoIntr utility class

Change-Id: Ib8cd7f2c6ef8c4845fca617a0423b922fc81cf0e
Reviewed-on: http://gerrit.ovirt.org/199
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agocreate /rhev repository
Douglas Schilling Landgraf [Mon, 26 Dec 2011 14:46:16 +0000 (26 09:46 -0500)]
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'.

Change-Id: I971a7b47e834d7b6b95874ff6437e66b1928fc82
Reviewed-on: http://gerrit.ovirt.org/548
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
10 years agoAdd protocol version selection support for the NFS protocoll
Saggi Mizrahi [Tue, 20 Dec 2011 22:15:25 +0000 (20 17:15 -0500)]
Add protocol version selection support for the NFS protocoll

Change-Id: I64537f9170d17fcbac3b357ec0bfdc0dc56e292f
Reviewed-on: http://gerrit.ovirt.org/681
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSupport changing retransmission number and timeout for nfs mounts
Saggi Mizrahi [Thu, 15 Dec 2011 19:52:21 +0000 (15 14:52 -0500)]
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.

Change-Id: I25e4a6f6daa5b14774e03230784b3b2dbe4630e0
Reviewed-on: http://gerrit.ovirt.org/636
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoAdd SharedFS Support
Saggi Mizrahi [Fri, 9 Dec 2011 16:57:40 +0000 (9 11:57 -0500)]
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

Change-Id: I1ea9620f9179b415152d3e32509b5ebe02d8d77b
Reviewed-on: http://gerrit.ovirt.org/559
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoMinor refactoring
Saggi Mizrahi [Fri, 9 Dec 2011 16:57:57 +0000 (9 11:57 -0500)]
Minor refactoring

Change-Id: I0b65e9714fb80d048e1ed244bb961ff8c2e205fd
Reviewed-on: http://gerrit.ovirt.org/558
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRename *FileServer methods to *NFSServer to prevent confusion
Saggi Mizrahi [Fri, 9 Dec 2011 16:34:09 +0000 (9 11:34 -0500)]
Rename *FileServer methods to *NFSServer to prevent confusion

Change-Id: I6a016def65a819c6478b78d569f647aeb5f05dd5
Reviewed-on: http://gerrit.ovirt.org/557
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRearange code in storage_connection to minimize code duplication
Saggi Mizrahi [Fri, 9 Dec 2011 16:18:38 +0000 (9 11:18 -0500)]
Rearange code in storage_connection to minimize code duplication

Change-Id: If3e28c064043f19cefccde13decf6699d2718634
Reviewed-on: http://gerrit.ovirt.org/556
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#736034 - Add metadataignore switch to pvcreate.
Eduardo Warszawski [Wed, 7 Sep 2011 11:00:04 +0000 (7 14:00 +0300)]
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.

Change-Id: Ib040902610fd2c5b0de04de95b57f0bfbdd1e11e
Reviewed-on: http://gerrit.ovirt.org/711
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agostorage_connection: unexpected keyword 'timeout'
Douglas Schilling Landgraf [Mon, 26 Dec 2011 00:47:24 +0000 (25 19:47 -0500)]
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'

Change-Id: Ic64bf1bd366d1e9cb4c80c50b85a57ae022374cd
Reviewed-on: http://gerrit.ovirt.org/734
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
10 years agoImprove the cleanStorageRepository method
Federico Simoncelli [Fri, 16 Dec 2011 14:31:54 +0000 (16 14:31 +0000)]
Improve the cleanStorageRepository method

Change-Id: I4b1733bfa4145bbec07860be41dccafebd584fc3
Reviewed-on: http://gerrit.ovirt.org/631
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#747917 Don't get information about mountpoints
Federico Simoncelli [Fri, 21 Oct 2011 10:50:01 +0000 (21 10:50 +0000)]
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().

Change-Id: I16a9e54586daa766e420fa8571b19a0b744b602d
Reviewed-on: http://gerrit.ovirt.org/202
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRestore shared raw disks (after refactoring).
Eduardo Warszawski [Wed, 21 Dec 2011 09:19:06 +0000 (21 11:19 +0200)]
Restore shared raw disks (after refactoring).

Change-Id: I513ebf1c6e57fb227f261079a475922c1829f927
Reviewed-on: http://gerrit.ovirt.org/691
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoOptional: Drive.__str__().
Eduardo Warszawski [Wed, 21 Dec 2011 09:20:44 +0000 (21 11:20 +0200)]
Optional: Drive.__str__().

Change-Id: If5393d94c9bf8ba31ed4515c4a3e10316dd4f68e
Reviewed-on: http://gerrit.ovirt.org/690
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove _addFloppy. floppy is now in _drives.
Eduardo Warszawski [Fri, 16 Dec 2011 03:26:33 +0000 (16 05:26 +0200)]
Remove _addFloppy. floppy is now in _drives.

Where is flipper?

Change-Id: Ifebc05f25bbc4867a5058cc51799d8573a5d8d64
Reviewed-on: http://gerrit.ovirt.org/629
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove appendCD. cdrom is now in _drives.
Eduardo Warszawski [Fri, 16 Dec 2011 02:28:42 +0000 (16 04:28 +0200)]
Remove appendCD. cdrom is now in _drives.

Change-Id: I7ccf2857b3febb5b41008c8402c196c5f04b3601
Reviewed-on: http://gerrit.ovirt.org/628
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoNormalize support for legacy drives.
Eduardo Warszawski [Fri, 16 Dec 2011 01:53:58 +0000 (16 03:53 +0200)]
Normalize support for legacy drives.

Change-Id: I241dcc08f1a8ad25a95434c5f6969e63449c17e2
Reviewed-on: http://gerrit.ovirt.org/627
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoAdding arbitrary disks to _drives.
Eduardo Warszawski [Thu, 15 Dec 2011 23:30:44 +0000 (16 01:30 +0200)]
Adding arbitrary disks to _drives.

Change-Id: Iea66e23c6c76e2b721255afb8becf913cdd70aa9
Reviewed-on: http://gerrit.ovirt.org/626
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSimplified Drive class.
Eduardo Warszawski [Thu, 15 Dec 2011 16:29:06 +0000 (15 18:29 +0200)]
Simplified Drive class.

Change-Id: I5b33da25e5691910b9d58ecfb727e993991a4c83
Reviewed-on: http://gerrit.ovirt.org/625
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agodrives config normalization.
Eduardo Warszawski [Mon, 12 Dec 2011 13:22:53 +0000 (12 15:22 +0200)]
drives config normalization.

drives parameters are normalized when passed,
instead of tweaking the cmd line xml creation.

Change-Id: I80bbd888acc6cccd381f04701c34f52b155e5ca7
Reviewed-on: http://gerrit.ovirt.org/624
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agostorage_connection: fix variable name
Douglas Schilling Landgraf [Fri, 23 Dec 2011 19:37:31 +0000 (23 14:37 -0500)]
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'

Change-Id: I73335df27b4bf41b26c843ae59730dcfdf6a4dd9
Reviewed-on: http://gerrit.ovirt.org/733
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agovdsm: Add ovirt_functions script
Douglas Schilling Landgraf [Fri, 23 Dec 2011 04:00:01 +0000 (22 23:00 -0500)]
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.

Change-Id: Ice28890457e6329c245aaa99057958d7555f4c05
Reviewed-on: http://gerrit.ovirt.org/455
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRefactor mount logic
Saggi Mizrahi [Tue, 6 Dec 2011 18:19:43 +0000 (6 13:19 -0500)]
Refactor mount logic

Change-Id: I6ca58303c13d8d7a4caed4a87b6a16b37651c359
Reviewed-on: http://gerrit.ovirt.org/543
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove uneeded str() calls in hsm.py
Saggi Mizrahi [Fri, 16 Dec 2011 20:26:49 +0000 (16 15:26 -0500)]
Remove uneeded str() calls in hsm.py

Change-Id: I25768f4845e947d52f67493bb9f41f48564399c7
Reviewed-on: http://gerrit.ovirt.org/635
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agopromisc hook: added in-line (redirect) mode
Shahar Havivi [Thu, 22 Dec 2011 13:24:35 +0000 (22 15:24 +0200)]
promisc hook: added in-line (redirect) mode

Change-Id: I7d0b2e6f369b27292b5b6f7b6bf1275843bc3bb5
Reviewed-on: http://gerrit.ovirt.org/712
Tested-by: Shahar Havivi <shavivi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#716573 make `ulimit -u` configurable, too
Dan Kenigsberg [Sat, 17 Dec 2011 20:54:36 +0000 (17 22:54 +0200)]
BZ#716573 make `ulimit -u` configurable, too

We need to let Vdsm run hundreds of Vms over lvm

Change-Id: I01e8ed81686552a3e838108666d08d9007fb44a0
Reviewed-on: http://gerrit.ovirt.org/638
Reviewed-by: Adam Litke <agl@us.ibm.com>
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoFix error message composition in refreshLV()
Saggi Mizrahi [Tue, 20 Dec 2011 16:19:45 +0000 (20 11:19 -0500)]
Fix error message composition in refreshLV()

Change-Id: I4f39d9a53e04af3302c4f1231c7deca6467475d7
Reviewed-on: http://gerrit.ovirt.org/672
Reviewed-by: Ayal Baron <abaron@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove extra os.path.join call from getImageVolumes
Federico Simoncelli [Tue, 15 Nov 2011 15:04:16 +0000 (15 15:04 +0000)]
Remove extra os.path.join call from getImageVolumes

Change-Id: Idec4d3f254291cb5fa8a8fde6a672a31c3260285
Reviewed-on: http://gerrit.ovirt.org/240
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
10 years agoIntroduce vm.isVdsmImage()
Eduardo Warszawski [Mon, 12 Dec 2011 13:17:03 +0000 (12 15:17 +0200)]
Introduce vm.isVdsmImage()

Change-Id: I46e18d139e0ee86063e285465a037876220d56ca
Reviewed-on: http://gerrit.ovirt.org/623
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agohooks, promisc: note added for inline mode
Shahar Havivi [Sun, 18 Dec 2011 09:23:17 +0000 (18 11:23 +0200)]
hooks, promisc: note added for inline mode

Change-Id: I4b644a7f851aa1d0977b763f5f501dcd0765fecd
Reviewed-on: http://gerrit.ovirt.org/642
Tested-by: Shahar Havivi <shavivi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoReduce the memsize of basic locking object
Saggi Mizrahi [Thu, 8 Dec 2011 16:13:47 +0000 (8 11:13 -0500)]
Reduce the memsize of basic locking object

Change-Id: Icf7f6ccd1add266683a772f5d8f64a3494b4c088
Reviewed-on: http://gerrit.ovirt.org/545
Tested-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoPart of create pool operation should be done under SPM lock
Igor Lvovsky [Wed, 14 Dec 2011 10:35:35 +0000 (14 12:35 +0200)]
Part of create pool operation should be done under SPM lock

Change-Id: I629251f48510d0808a28f2c9e76faa61daad52f7
Reviewed-on: http://gerrit.ovirt.org/587
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
Reviewed-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#767111 Extend volume size must be in Megabytes
Federico Simoncelli [Tue, 13 Dec 2011 09:37:41 +0000 (13 09:37 +0000)]
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

Change-Id: I955da5ca52708eb9bfd51df66f2a0e13e8eaf3c8
Reviewed-on: http://gerrit.ovirt.org/579
Tested-by: Federico Simoncelli <fsimonce@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agosupervdsmServer: fix typo
Dan Kenigsberg [Tue, 13 Dec 2011 12:58:25 +0000 (13 14:58 +0200)]
supervdsmServer: fix typo

we must add `pylint -E` to our check-local.

Change-Id: I25169657a3c98a274f5c7384a54d7423422dfb16
Reviewed-on: http://gerrit.ovirt.org/581
Reviewed-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agocaps: fix typo
Dan Kenigsberg [Tue, 13 Dec 2011 11:23:54 +0000 (13 13:23 +0200)]
caps: fix typo

typo introduced in commit 5ac3213e3ab087

Change-Id: I267018885464edd2a7cbddda2e06570a55ac4418
Reviewed-on: http://gerrit.ovirt.org/580
Reviewed-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoNaming conventions in Image._baseRawVolumeMerge temp files changed.
Eduardo Warszawski [Sun, 4 Dec 2011 11:21:34 +0000 (4 13:21 +0200)]
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.

Change-Id: Ic4263f649e1936fcc1ccb7d5c094e9894f02fcd4
Reviewed-on: http://gerrit.ovirt.org/445
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove unnecessary produces from Image.merge() auxiliary functions.
Eduardo Warszawski [Sun, 27 Nov 2011 16:04:16 +0000 (27 18:04 +0200)]
Remove unnecessary produces from Image.merge() auxiliary functions.

Change-Id: I257bcededb50105496087d3547d95a8b2f14f7b3
Reviewed-on: http://gerrit.ovirt.org/444
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoImage.getSubChain: avoid unnecessary productions of all kinds.
Eduardo Warszawski [Sun, 27 Nov 2011 13:49:11 +0000 (27 15:49 +0200)]
Image.getSubChain: avoid unnecessary productions of all kinds.

Change-Id: I83cf010cf54d34fd1ca7406c508503fcc3e72e0a
Reviewed-on: http://gerrit.ovirt.org/443
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoProduce the SD in FileVolume.getAllChildrenList() once
Eduardo Warszawski [Sun, 27 Nov 2011 13:27:10 +0000 (27 15:27 +0200)]
Produce the SD in FileVolume.getAllChildrenList() once

Change-Id: I732b5c67d605bbf394e05b67a3c8b80336dd3871
Reviewed-on: http://gerrit.ovirt.org/442
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSplit deletedVolumeName functionality
Eduardo Warszawski [Sun, 27 Nov 2011 12:00:52 +0000 (27 14:00 +0200)]
Split deletedVolumeName functionality

Change-Id: Icbf24988a4367fa806f4c4c41519314daf0f6dab
Reviewed-on: http://gerrit.ovirt.org/441
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agovdsm.spec.in: Requires: tree
Douglas Schilling Landgraf [Fri, 9 Dec 2011 22:15:47 +0000 (9 17:15 -0500)]
vdsm.spec.in: Requires: tree

vdsm-sosplugin.py requires the /usr/bin/tree command.

Change-Id: Ifed7b5beab38241bb9d1c6b046784307e89e2134
Reviewed-on: http://gerrit.ovirt.org/555
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agostorage/misc.py: Add validation to oVirt Node
Douglas Schilling Landgraf [Fri, 9 Dec 2011 14:11:19 +0000 (9 09:11 -0500)]
storage/misc.py: Add validation to oVirt Node

Check if /etc/ovirt-node-image-release exists too

Change-Id: Ie35f84712b9165428506798d534fdce8ed2c01af
Reviewed-on: http://gerrit.ovirt.org/453
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSet drive's name during Drive initialization
Igor Lvovsky [Sun, 27 Nov 2011 14:36:59 +0000 (27 16:36 +0200)]
Set drive's name during Drive initialization

Change-Id: I2b3d93ddb8fbf81ff98e90ab96fc9a16bac94644
Reviewed-on: http://gerrit.ovirt.org/408
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agocaps.py: include oVirt Node to OSName
Douglas Schilling Landgraf [Fri, 9 Dec 2011 08:25:38 +0000 (9 03:25 -0500)]
caps.py: include oVirt Node to OSName

Add oVirt Node as a supported

Change-Id: I8e59867abaf4cd6e9f142356b05fca15992ae300
Reviewed-on: http://gerrit.ovirt.org/454
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agodeployUtil: isOvirt() check oVirt release
Douglas Schilling Landgraf [Wed, 7 Dec 2011 04:11:10 +0000 (6 23:11 -0500)]
deployUtil: isOvirt() check oVirt release

Adding support to isOvirt() to validate oVirt Node

Change-Id: I5ada58298552a316f71ed2b99b1fbced48ceee67
Reviewed-on: http://gerrit.ovirt.org/452
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoInvalidParameterException() takes two args
Saggi Mizrahi [Tue, 29 Nov 2011 20:31:17 +0000 (29 15:31 -0500)]
InvalidParameterException() takes two args

Change-Id: Id725f20ecf2836ab73bb8ae28ed0550574365fe7
Reviewed-on: http://gerrit.ovirt.org/432
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#754445 - Separate granting from callback emitting
Saggi Mizrahi [Wed, 16 Nov 2011 13:59:16 +0000 (16 15:59 +0200)]
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().

Change-Id: Ic12d170e64399e37a555960c03804778ad7d053b
Reviewed-on: http://gerrit.ovirt.org/254
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agodeployUtil.py.in: add support to restart vdsmd
Douglas Schilling Landgraf [Wed, 7 Dec 2011 15:21:29 +0000 (7 10:21 -0500)]
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.

Change-Id: I7c9d6e1aefa93e9fff067bf1153c0f555d247c64
Reviewed-on: http://gerrit.ovirt.org/492
Tested-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
10 years agoBZ#745510 Additional rpm fixes required by fedorav4.9.2
Federico Simoncelli [Thu, 1 Dec 2011 10:38:56 +0000 (1 05:38 -0500)]
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

Change-Id: I7bfeddd1558d391762425ad07ecd3942b802f6c0
Reviewed-on: http://gerrit.ovirt.org/467
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoAdd Shahar to AUTHORS
Dan Kenigsberg [Sun, 4 Dec 2011 22:31:12 +0000 (5 00:31 +0200)]
Add Shahar to AUTHORS

Change-Id: I78887ec98e6a1fcc8af1cdcda1eadcc646641380
Reviewed-on: http://gerrit.ovirt.org/477
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Shahar Havivi <shavivi@redhat.com>
Reviewed-by: Shahar Havivi <shavivi@redhat.com>
10 years agoRemove checkImage
Eduardo Warszawski [Tue, 29 Nov 2011 16:09:57 +0000 (29 18:09 +0200)]
Remove checkImage

This API function is unused and is based on buggy functions with outdated semantics.

Change-Id: I691cbc8e92b048a0c803851596f9579ded2b1e4e
Reviewed-on: http://gerrit.ovirt.org/426
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRemove checkDomain().
Eduardo Warszawski [Tue, 29 Nov 2011 16:02:55 +0000 (29 18:02 +0200)]
Remove checkDomain().

This API function is unused and is based on buggy functions with outdated semantics.

Change-Id: Ie063eb81dfdae630d6d47dc6fcea90b055b5bae6
Reviewed-on: http://gerrit.ovirt.org/425
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoThe configuration values must be strings
Federico Simoncelli [Thu, 1 Dec 2011 10:38:56 +0000 (1 05:38 -0500)]
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.

Change-Id: Id51af12b809906848f9dfbde17c42ce56b887772
Reviewed-on: http://gerrit.ovirt.org/459
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Reviewed-by: Igor Lvovsky <ilvovsky@redhat.com>
Tested-by: Igor Lvovsky <ilvovsky@redhat.com>
10 years agoBZ#745510 Fedora rpmlint fixes
Federico Simoncelli [Fri, 18 Nov 2011 16:54:02 +0000 (18 11:54 -0500)]
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

Change-Id: Id619ee8bb200df7cf460a869e2dac7702cf436dd
Reviewed-on: http://gerrit.ovirt.org/261
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoRevise the release versioning
Federico Simoncelli [Mon, 14 Nov 2011 15:57:45 +0000 (14 15:57 +0000)]
Revise the release versioning

In this patch:
* revise the release versioning according to fedora guidelines

Change-Id: I1f7b267a3ea9f415219fec0d45d4e4dad8eadb70
Reviewed-on: http://gerrit.ovirt.org/218
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoClean up the config.py format
Federico Simoncelli [Fri, 18 Nov 2011 12:37:36 +0000 (18 07:37 -0500)]
Clean up the config.py format

Change-Id: I8408613487ee5f4a5cd6e79c83fc7178a869abb5
Reviewed-on: http://gerrit.ovirt.org/294
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSubstitute the vdsm paths directly in config.py
Federico Simoncelli [Fri, 18 Nov 2011 13:01:39 +0000 (18 08:01 -0500)]
Substitute the vdsm paths directly in config.py

Change-Id: Ib4e63b13266daa9be3b37c7b648b57210d853cf1
Reviewed-on: http://gerrit.ovirt.org/293
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
10 years agoSimplify the vdsm.conf.sample generation
Federico Simoncelli [Fri, 18 Nov 2011 13:01:59 +0000 (18 08:01 -0500)]
Simplify the vdsm.conf.sample generation

Change-Id: I2aeab057d45b81e0ff5bbd919f98be2b732982c5
Reviewed-on: http://gerrit.ovirt.org/292
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>