[Engine-devel] Sorting in tabs

2013-06-27 Thread Lior Vernia
Hello everyone (UI peeps in particular),

I've pushed (not yet merged) a patch that would enable us to keep items
in tabs (main/sub) sorted at all times by setting a comparator in
SearchableListModel:

http://gerrit.ovirt.org/#/c/15846/

If a comparator isn't set, then everything should behave as before. If a
comparator is set, then from that moment on the tab items will be kept
in a SortedSet, so that even if an item is added in a way that doesn't
trigger an event (e.g. getItems().add()) the items will be kept sorted
according to the given comparator. If the comparator is set to null,
from that moment on the tab should revert to its old behaviour.

You're most welcome to have a look and let me know if this might break
something (remember though that it's not obligatory to set a comparator,
so only possible breakage should be in generic flows).

Feel free to use it once it's merged; along with SortedListModel, this
should make sorting less painful. Just keep in mind that once you set a
comparator, you can't cast getItems() to a List. This shouldn't be a
problem in general, as mostly it's as useful (and probably more correct)
to cast to a Collection.

Lior.
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


[Engine-devel] EngineEncryptionUtilsTest

2013-06-27 Thread Laszlo Hornyak
Hi,

Just ran into an issue with EngineEncryptionUtilsTest, looks like it is failing 
if the /etc/ovirt-engine/engine.conf does not have some keys. So of course by 
now all of us added those keys, but isn't there a logical loop here?
First the code should be tested, packaged and then installed and that's how 
that file should get there. We should not build the tests on the assumption 
that a version of oVirt is already installed.

What is your opinion?

Thx,
Laszlo

___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


[Engine-devel] NPE approving node

2013-06-27 Thread Juan Hernandez

Any idea why?

2013-06-27 10:37:40,219 INFO 
[org.ovirt.engine.core.bll.ApproveVdsCommand] (pool-6-thread-5) 
[3dd1f412] Running command: ApproveVdsCommand internal: false. Entities 
affected :  ID: 0be6cd89-c5f5-4a4e-b498-504bb2c23eb2 Type: VDS
2013-06-27 10:37:40,239 INFO 
[org.ovirt.engine.core.bll.InstallVdsCommand] (pool-6-thread-5) 
[3dd1f412] Before Installation host 
0be6cd89-c5f5-4a4e-b498-504bb2c23eb2, h0.example.com
2013-06-27 10:37:40,294 ERROR 
[org.ovirt.engine.core.bll.InstallVdsCommand] (pool-6-thread-5) 
[3dd1f412] Host installation failed for host 
0be6cd89-c5f5-4a4e-b498-504bb2c23eb2, h0.example.com.: 
java.lang.NullPointerException
	at 
org.ovirt.engine.core.utils.ssh.EngineSSHDialog.useDefaultKeyPair(EngineSSHDialog.java:32) 
[utils.jar:]
	at 
org.ovirt.engine.core.bll.VdsDeploy.useDefaultKeyPair(VdsDeploy.java:804) [bll.jar:]
	at 
org.ovirt.engine.core.bll.InstallVdsCommand.executeCommand(InstallVdsCommand.java:170) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.ApproveVdsCommand.executeCommand(ApproveVdsCommand.java:49) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1065) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1150) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1613) 
[bll.jar:]
	at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:174) 
[utils.jar:]
	at 
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:116) 
[utils.jar:]
	at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1168) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:316) [bll.jar:]
	at 
org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommand(MultipleActionsRunner.java:174) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:156) 
[bll.jar:]
	at 
org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:94) 
[bll.jar:]
	at 
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:71) 
[utils.jar:]
	at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
[rt.jar:1.7.0_09-icedtea]
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
[rt.jar:1.7.0_09-icedtea]
	at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
[rt.jar:1.7.0_09-icedtea]
	at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[rt.jar:1.7.0_09-icedtea]
	at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[rt.jar:1.7.0_09-icedtea]

at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]

--
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 
3ºD, 28016 Madrid, Spain

Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST

2013-06-27 Thread Tomas Jelinek
well, it seems that everyone agree that the decision what to add to the
menu is the client responsibility. It means there is no additional work needed 
on the
oVirt engine side - going to remove the feature page.

- Original Message -
 From: Christophe Fergeau cferg...@redhat.com
 To: Michal Skrivanek michal.skriva...@redhat.com
 Cc: Itamar Heim ih...@redhat.com, Tomas Jelinek tjeli...@redhat.com, 
 spice-de...@lists.freedesktop.org,
 engine-devel engine-devel@ovirt.org, Marc-André Lureau 
 mlur...@redhat.com
 Sent: Monday, June 24, 2013 11:47:36 AM
 Subject: Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST
 
 On Mon, Jun 24, 2013 at 10:02:29AM +0200, Michal Skrivanek wrote:
  I would agree as long as it is not hardcoded and can be change in some
  config file easily. We shouldn't wait for next RHEL release to do a
  little modification if possible.
  I think owning the menu in some form on RHEV-M side has an advantage of
  delivery synchronization.
 
 This probably would also make things harder from a client documentation
 point of view. With something too generic, there's also always the risk
 that it becomes a way to add workaround for bugs, or that the menu starts
 containing things that would be better integrated in other places in the
 client, ...
 
 Christophe
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] [ATN][Action Required] development environemnt users - otopi migration

2013-06-27 Thread Alon Bar-Lev

Hi,

Are you sure you installed it with PREFIX?
Can you please send me 
$HOME/ovirt-engine/share/ovirt-engine/setup/ovirt_engine_setup/config.py

- Original Message -
 From: Moti Asayag masa...@redhat.com
 To: Alon Bar-Lev alo...@redhat.com
 Cc: engine-devel engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 12:11:23 PM
 Subject: Re: [Engine-devel] [ATN][Action Required] development environemnt 
 users - otopi migration
 
 Hi,
 
 Just tried to run 'bin/engine-setup-2' with the latest version of otopi
 (otopi-1.1.0-0.0.master.20130626.git33d9561.fc17.noarch) and failed due to:
 
 [ ERROR ] Failed to execute stage 'Misc configuration': [Errno 13]
 Permission denied: '/etc/ovirt-engine-setup.conf.d'
 
 OSError: [Errno **FILTERED**3] Permission denied:
 '/etc/ovirt-engine-setup.conf.d'
 20**FILTERED**3-06-27 **FILTERED**2:04:36 ERROR otopi.context
 context._executeMethod:**FILTERED**4**FILTERED** Failed to execute stage
 'Misc configuration': [Errno **FILTERED**3] Permission
  denied: '/etc/ovirt-engine-setup.conf.d'
 
 Log is attached.
 
 Thanks,
 Moti
 
 On 06/26/2013 03:21 PM, Alon Bar-Lev wrote:
  Hello,
  
  We have pending patch queue that requires latest otopi-1.1 features. We
  held that queue so we reduce noise to peers.
  
  We would like now to merge this queue, it is best if you can upgrade to
  most recent otopi package before we merge to avoid breakage.
  
  Latest otopi packages are available at the standard locations[1][2][3]
  
  The minimum version required is otopi-1.1.0-0.0.master.20130626.
  
  I delay merge to ~24 hours.
  
  Of course if you have any issue, please don't hesitate to contact me.
  
  Thank you for your cooperation,
  Alon Bar-Lev
  
  [1] http://resources.ovirt.org/releases/nightly/rpm/Fedora/17
  [2] http://resources.ovirt.org/releases/nightly/rpm/Fedora/18
  [3] http://resources.ovirt.org/releases/nightly/rpm/EL/6/
  ___
  Engine-devel mailing list
  Engine-devel@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/engine-devel
  
 
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] [ATN][Action Required] development environemnt users - otopi migration

2013-06-27 Thread Moti Asayag
On 06/27/2013 12:25 PM, Alon Bar-Lev wrote:
 
 Hi,
 
 Are you sure you installed it with PREFIX?

yes.

 Can you please send me 
 $HOME/ovirt-engine/share/ovirt-engine/setup/ovirt_engine_setup/config.py

Here is its content:

Config.


ENGINE_SYSCONFDIR = '/home/motia/ovirt-engine-quantum/etc/ovirt-engine'
ENGINE_SERVICE_CONFIG =
'/home/motia/ovirt-engine-quantum/etc/ovirt-engine/engine.conf'
ENGINE_NOTIFIER_SERVICE_CONFIG =
'/home/motia/ovirt-engine-quantum/etc/ovirt-engine/notifier/notifier.conf'
ENGINE_PKIDIR = '/home/motia/ovirt-engine-quantum/etc/pki/ovirt-engine'
ENGINE_DATADIR = '/home/motia/ovirt-engine-quantum/share/ovirt-engine'
ENGINE_LOCALSTATEDIR =
'/home/motia/ovirt-engine-quantum/var/lib/ovirt-engine'
ENGINE_TMP = '/home/motia/ovirt-engine-quantum/var/tmp/ovirt-engine'
PACKAGE_VERSION = '3.3.0_master'
DISPLAY_VERSION = '3.3.0_master'
RPM_VERSION = '3.3.0'
RPM_RELEASE = '0.2.master.20130627083750'


# vim: expandtab tabstop=4 shiftwidth=4

 
 - Original Message -
 From: Moti Asayag masa...@redhat.com
 To: Alon Bar-Lev alo...@redhat.com
 Cc: engine-devel engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 12:11:23 PM
 Subject: Re: [Engine-devel] [ATN][Action Required] development environemnt 
 users - otopi migration

 Hi,

 Just tried to run 'bin/engine-setup-2' with the latest version of otopi
 (otopi-1.1.0-0.0.master.20130626.git33d9561.fc17.noarch) and failed due to:

 [ ERROR ] Failed to execute stage 'Misc configuration': [Errno 13]
 Permission denied: '/etc/ovirt-engine-setup.conf.d'

 OSError: [Errno **FILTERED**3] Permission denied:
 '/etc/ovirt-engine-setup.conf.d'
 20**FILTERED**3-06-27 **FILTERED**2:04:36 ERROR otopi.context
 context._executeMethod:**FILTERED**4**FILTERED** Failed to execute stage
 'Misc configuration': [Errno **FILTERED**3] Permission
  denied: '/etc/ovirt-engine-setup.conf.d'

 Log is attached.

 Thanks,
 Moti

 On 06/26/2013 03:21 PM, Alon Bar-Lev wrote:
 Hello,

 We have pending patch queue that requires latest otopi-1.1 features. We
 held that queue so we reduce noise to peers.

 We would like now to merge this queue, it is best if you can upgrade to
 most recent otopi package before we merge to avoid breakage.

 Latest otopi packages are available at the standard locations[1][2][3]

 The minimum version required is otopi-1.1.0-0.0.master.20130626.

 I delay merge to ~24 hours.

 Of course if you have any issue, please don't hesitate to contact me.

 Thank you for your cooperation,
 Alon Bar-Lev

 [1] http://resources.ovirt.org/releases/nightly/rpm/Fedora/17
 [2] http://resources.ovirt.org/releases/nightly/rpm/Fedora/18
 [3] http://resources.ovirt.org/releases/nightly/rpm/EL/6/
 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel




___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST

2013-06-27 Thread Tomas Jelinek


- Original Message -
 From: Christophe Fergeau cferg...@redhat.com
 To: Tomas Jelinek tjeli...@redhat.com
 Cc: Michal Skrivanek michal.skriva...@redhat.com, Itamar Heim 
 ih...@redhat.com,
 spice-de...@lists.freedesktop.org, engine-devel engine-devel@ovirt.org, 
 Marc-André Lureau mlur...@redhat.com
 Sent: Thursday, June 27, 2013 11:30:10 AM
 Subject: Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST
 
 Hey,
 
 On Thu, Jun 27, 2013 at 05:21:11AM -0400, Tomas Jelinek wrote:
  well, it seems that everyone agree that the decision what to add to the
  menu is the client responsibility. It means there is no additional work
  needed on the
  oVirt engine side - going to remove the feature page.
 
 If we go the REST API way to handle foreign menu, we need additional info
 in the .vv files: some way to auth with the REST API, and the guid of the
 VM to act on.
Yes, we can provide the sessionId to authenticate with the REST and the vm guid 
is not a problem.

 
 Christophe
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Eli Mesika


- Original Message -
 From: Lior Vernia lver...@redhat.com
 To: engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 10:12:33 AM
 Subject: [Engine-devel] Sorting in tabs
 
 Hello everyone (UI peeps in particular),
 
 I've pushed (not yet merged) a patch that would enable us to keep items
 in tabs (main/sub) sorted at all times by setting a comparator in
 SearchableListModel:

But tabs includes only 100 records and supports paging , how you deal with that 
???


 
 http://gerrit.ovirt.org/#/c/15846/
 
 If a comparator isn't set, then everything should behave as before. If a
 comparator is set, then from that moment on the tab items will be kept
 in a SortedSet, so that even if an item is added in a way that doesn't
 trigger an event (e.g. getItems().add()) the items will be kept sorted
 according to the given comparator. If the comparator is set to null,
 from that moment on the tab should revert to its old behaviour.
 
 You're most welcome to have a look and let me know if this might break
 something (remember though that it's not obligatory to set a comparator,
 so only possible breakage should be in generic flows).
 
 Feel free to use it once it's merged; along with SortedListModel, this
 should make sorting less painful. Just keep in mind that once you set a
 comparator, you can't cast getItems() to a List. This shouldn't be a
 problem in general, as mostly it's as useful (and probably more correct)
 to cast to a Collection.
 
 Lior.
 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


[Engine-devel] SSH Soft Fencing

2013-06-27 Thread Martin Perina
Hi,

SSH Soft Fencing is a new feature for 3.3 and it tries to restart VDSM
using SSH connection on non responsive hosts prior to real fencing.
More info can be found at 

http://www.ovirt.org/Automatic_Fencing#Automatic_Fencing_in_oVirt_3.3

In current SSH Soft Fencing implementation the restart VDSM using SSH
command is part of standard fencing implementation in 
VdsNotRespondingTreatmentCommand. But this command is executed only
if a host has a valid PM configuration. If host doesn't have a valid
PM configuration, the execution of the command is disabled and host
state is change to Non Responsive.

So my question are:

1) Should SSH Soft Fencing be executed on hosts without valid PM
   configuration?

2) Should VDSM restart using SSH command be reimplemented
   as standalone command to be usable also in other parts of engine?
   If 1) is true, I think it will have to be done anyway.


Martin Perina
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] [ATN][Action Required] development environemnt users - otopi migration

2013-06-27 Thread Sandro Bonazzola
Patch pushed for review: http://gerrit.ovirt.org/16182


Il 27/06/2013 11:36, Alon Bar-Lev ha scritto:
 Hi,

 Confirmed[1] bug in engine code, will fix soon.

 Workaround:

 packaging/setup/ovirt_engine_setup/constants.py

 Find: OVIRT_SETUP_POST_INSTALL_CONFIG
 Modify: OVIRT_OVIRT_SETUP_CONFIG_FILE-'/tmp/xxx'

 [1] http://gerrit.ovirt.org/#/c/15957/

 - Original Message -
 From: Moti Asayag masa...@redhat.com
 To: Alon Bar-Lev alo...@redhat.com
 Cc: engine-devel engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 12:27:49 PM
 Subject: Re: [Engine-devel] [ATN][Action Required] development environemnt 
 users - otopi migration

 On 06/27/2013 12:25 PM, Alon Bar-Lev wrote:
 Hi,

 Are you sure you installed it with PREFIX?
 yes.

 Can you please send me
 $HOME/ovirt-engine/share/ovirt-engine/setup/ovirt_engine_setup/config.py
 Here is its content:

 Config.


 ENGINE_SYSCONFDIR = '/home/motia/ovirt-engine-quantum/etc/ovirt-engine'
 ENGINE_SERVICE_CONFIG =
 '/home/motia/ovirt-engine-quantum/etc/ovirt-engine/engine.conf'
 ENGINE_NOTIFIER_SERVICE_CONFIG =
 '/home/motia/ovirt-engine-quantum/etc/ovirt-engine/notifier/notifier.conf'
 ENGINE_PKIDIR = '/home/motia/ovirt-engine-quantum/etc/pki/ovirt-engine'
 ENGINE_DATADIR = '/home/motia/ovirt-engine-quantum/share/ovirt-engine'
 ENGINE_LOCALSTATEDIR =
 '/home/motia/ovirt-engine-quantum/var/lib/ovirt-engine'
 ENGINE_TMP = '/home/motia/ovirt-engine-quantum/var/tmp/ovirt-engine'
 PACKAGE_VERSION = '3.3.0_master'
 DISPLAY_VERSION = '3.3.0_master'
 RPM_VERSION = '3.3.0'
 RPM_RELEASE = '0.2.master.20130627083750'


 # vim: expandtab tabstop=4 shiftwidth=4

 - Original Message -
 From: Moti Asayag masa...@redhat.com
 To: Alon Bar-Lev alo...@redhat.com
 Cc: engine-devel engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 12:11:23 PM
 Subject: Re: [Engine-devel] [ATN][Action Required] development environemnt
 users - otopi migration

 Hi,

 Just tried to run 'bin/engine-setup-2' with the latest version of otopi
 (otopi-1.1.0-0.0.master.20130626.git33d9561.fc17.noarch) and failed due
 to:

 [ ERROR ] Failed to execute stage 'Misc configuration': [Errno 13]
 Permission denied: '/etc/ovirt-engine-setup.conf.d'

 OSError: [Errno **FILTERED**3] Permission denied:
 '/etc/ovirt-engine-setup.conf.d'
 20**FILTERED**3-06-27 **FILTERED**2:04:36 ERROR otopi.context
 context._executeMethod:**FILTERED**4**FILTERED** Failed to execute stage
 'Misc configuration': [Errno **FILTERED**3] Permission
  denied: '/etc/ovirt-engine-setup.conf.d'

 Log is attached.

 Thanks,
 Moti

 On 06/26/2013 03:21 PM, Alon Bar-Lev wrote:
 Hello,

 We have pending patch queue that requires latest otopi-1.1 features. We
 held that queue so we reduce noise to peers.

 We would like now to merge this queue, it is best if you can upgrade to
 most recent otopi package before we merge to avoid breakage.

 Latest otopi packages are available at the standard locations[1][2][3]

 The minimum version required is otopi-1.1.0-0.0.master.20130626.

 I delay merge to ~24 hours.

 Of course if you have any issue, please don't hesitate to contact me.

 Thank you for your cooperation,
 Alon Bar-Lev

 [1] http://resources.ovirt.org/releases/nightly/rpm/Fedora/17
 [2] http://resources.ovirt.org/releases/nightly/rpm/Fedora/18
 [3] http://resources.ovirt.org/releases/nightly/rpm/EL/6/
 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel





-- 
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com

___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Einav Cohen
 - Original Message -
 From: Eli Mesika emes...@redhat.com
 Sent: Thursday, June 27, 2013 6:46:58 AM
 
 
 - Original Message -
  From: Lior Vernia lver...@redhat.com
  To: engine-devel@ovirt.org
  Sent: Thursday, June 27, 2013 10:12:33 AM
  Subject: [Engine-devel] Sorting in tabs
  
  Hello everyone (UI peeps in particular),
  
  I've pushed (not yet merged) a patch that would enable us to keep items
  in tabs (main/sub) sorted at all times by setting a comparator in
  SearchableListModel:
 
 But tabs includes only 100 records and supports paging , how you deal with
 that ???

if this is in the GUI level, then I assume that the comparator is simply 
comparing the 
items within the current page, and not globally.
so the sorting doesn't affect the set of items that is displayed in the page 
(it would 
be the same as before the sorting) - just their order.

e.g. if I have VMs named e, a, c in page 1 and f, b, d in page 2, 
then with 
a comparator that is comparing by name (asc) you will see the following in page 
1:
a
c
e
and the following in page 2:
b
d
f

However, I assume that in this case, we would ideally want to see the following 
in page 1:
a
b
c
and the following in page 2:
d
e
f

also: @Lior - what happens when the search query contains a sort by part? 
there is a chance that the behaivor would be unexpected in this case; 

I believe that the correct thing to do is to attach the GUI sorting mechanism 
to the one in the search mechanism.

thoughts?

 
 
  
  http://gerrit.ovirt.org/#/c/15846/
  
  If a comparator isn't set, then everything should behave as before. If a
  comparator is set, then from that moment on the tab items will be kept
  in a SortedSet, so that even if an item is added in a way that doesn't
  trigger an event (e.g. getItems().add()) the items will be kept sorted
  according to the given comparator. If the comparator is set to null,
  from that moment on the tab should revert to its old behaviour.
  
  You're most welcome to have a look and let me know if this might break
  something (remember though that it's not obligatory to set a comparator,
  so only possible breakage should be in generic flows).
  
  Feel free to use it once it's merged; along with SortedListModel, this
  should make sorting less painful. Just keep in mind that once you set a
  comparator, you can't cast getItems() to a List. This shouldn't be a
  problem in general, as mostly it's as useful (and probably more correct)
  to cast to a Collection.
  
  Lior.
  ___
  Engine-devel mailing list
  Engine-devel@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/engine-devel
  
 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] SSH Soft Fencing

2013-06-27 Thread Eli Mesika


- Original Message -
 From: Martin Perina mper...@redhat.com
 To: engine-devel@ovirt.org
 Cc: Yair Zaslavsky yzasl...@redhat.com, Barak Azulay 
 bazu...@redhat.com, Eli Mesika emes...@redhat.com
 Sent: Thursday, June 27, 2013 1:51:06 PM
 Subject: SSH Soft Fencing
 
 Hi,
 
 SSH Soft Fencing is a new feature for 3.3 and it tries to restart VDSM
 using SSH connection on non responsive hosts prior to real fencing.
 More info can be found at
 
 http://www.ovirt.org/Automatic_Fencing#Automatic_Fencing_in_oVirt_3.3
 
 In current SSH Soft Fencing implementation the restart VDSM using SSH
 command is part of standard fencing implementation in
 VdsNotRespondingTreatmentCommand. But this command is executed only
 if a host has a valid PM configuration. If host doesn't have a valid
 PM configuration, the execution of the command is disabled and host
 state is change to Non Responsive.
 
 So my question are:
 
 1) Should SSH Soft Fencing be executed on hosts without valid PM
configuration?

I think that the answer should be yes. The vdsm restart will solve most of 
problems , so why not using it whether a PM agent is defined or not.

 
 2) Should VDSM restart using SSH command be reimplemented
as standalone command to be usable also in other parts of engine?
If 1) is true, I think it will have to be done anyway.

+1 

 
 
 Martin Perina
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Lior Vernia


On 27/06/13 15:37, Einav Cohen wrote:
 - Original Message -
 From: Eli Mesika emes...@redhat.com
 Sent: Thursday, June 27, 2013 6:46:58 AM


 - Original Message -
 From: Lior Vernia lver...@redhat.com
 To: engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 10:12:33 AM
 Subject: [Engine-devel] Sorting in tabs

 Hello everyone (UI peeps in particular),

 I've pushed (not yet merged) a patch that would enable us to keep items
 in tabs (main/sub) sorted at all times by setting a comparator in
 SearchableListModel:

 But tabs includes only 100 records and supports paging , how you deal with
 that ???
 
 if this is in the GUI level, then I assume that the comparator is simply 
 comparing the 
 items within the current page, and not globally.
 so the sorting doesn't affect the set of items that is displayed in the page 
 (it would 
 be the same as before the sorting) - just their order.

Yes, if I understand correctly how the paging works, Einav is correct -
only the items passed to the UI are sorted.

 also: @Lior - what happens when the search query contains a sort by part? 
 there is a chance that the behaivor would be unexpected in this case; 

Yes, I thought about this case, and it may result in a confusing user
experience if developers aren't careful. Together with the issue of
paging, this probably makes this sorting mechanism a better candidate
for use within subtabs rather than main tabs.

 
 I believe that the correct thing to do is to attach the GUI sorting 
 mechanism 
 to the one in the search mechanism.
 
 thoughts?

This can be done, however I'm not sure there's much utility in it. Main
tabs are always sorted according to some default ordering even if one
was not entered in the search panel, and this sorting is also performed
consistently with respect to paging. So maybe the right thing to do
would be to just block the GUI sorting mechanism for main tabs (i.e.
override the setter method and make it no-op)?




 http://gerrit.ovirt.org/#/c/15846/

 If a comparator isn't set, then everything should behave as before. If a
 comparator is set, then from that moment on the tab items will be kept
 in a SortedSet, so that even if an item is added in a way that doesn't
 trigger an event (e.g. getItems().add()) the items will be kept sorted
 according to the given comparator. If the comparator is set to null,
 from that moment on the tab should revert to its old behaviour.

 You're most welcome to have a look and let me know if this might break
 something (remember though that it's not obligatory to set a comparator,
 so only possible breakage should be in generic flows).

 Feel free to use it once it's merged; along with SortedListModel, this
 should make sorting less painful. Just keep in mind that once you set a
 comparator, you can't cast getItems() to a List. This shouldn't be a
 problem in general, as mostly it's as useful (and probably more correct)
 to cast to a Collection.

 Lior.
 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel

 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel

___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Einav Cohen
 - Original Message -
 From: Lior Vernia lver...@redhat.com
 Sent: Thursday, June 27, 2013 8:53:59 AM
 
 
 
 On 27/06/13 15:37, Einav Cohen wrote:
  - Original Message -
  From: Eli Mesika emes...@redhat.com
  Sent: Thursday, June 27, 2013 6:46:58 AM
 
 
  - Original Message -
  From: Lior Vernia lver...@redhat.com
  To: engine-devel@ovirt.org
  Sent: Thursday, June 27, 2013 10:12:33 AM
  Subject: [Engine-devel] Sorting in tabs
 
  Hello everyone (UI peeps in particular),
 
  I've pushed (not yet merged) a patch that would enable us to keep items
  in tabs (main/sub) sorted at all times by setting a comparator in
  SearchableListModel:
 
  But tabs includes only 100 records and supports paging , how you deal with
  that ???
  
  if this is in the GUI level, then I assume that the comparator is simply
  comparing the
  items within the current page, and not globally.
  so the sorting doesn't affect the set of items that is displayed in the
  page (it would
  be the same as before the sorting) - just their order.
 
 Yes, if I understand correctly how the paging works, Einav is correct -
 only the items passed to the UI are sorted.
 
  also: @Lior - what happens when the search query contains a sort by part?
  there is a chance that the behaivor would be unexpected in this case;
 
 Yes, I thought about this case, and it may result in a confusing user
 experience if developers aren't careful. Together with the issue of
 paging, this probably makes this sorting mechanism a better candidate
 for use within subtabs rather than main tabs.

note that at some point, I think that we would want to introduce paging also to 
search-
based sub-tabs - it will be useful especially for sub-tabs that potentially 
display a 
large number of results (e.g. Disks sub-tab in Storage main tab). 
In addition, at some point, we would want to get rid of the paging UI as it is 
now 
(i.e. next/prev buttons at the top panel) and move to paging triggered by 
scroll 
(i.e. have a very long grid, dynamically loaded as you continue to scroll - 
similar 
to the behavior of some e-mail web-clients, for example). In this case, sorting 
on 
the client side will make no sense at all (i.e. from the user perspective, only 
a 
portion of a very large grid will be sorted, the other portions won't be).

So for now - yes, I think it makes sense to introduce your mechanism to all 
sub-tabs, 
however in the long-term - we would probably want the search-based sub-tabs 
(which 
will support paging) to move to search-based sorting, rather than 
GUI-based-sorting.

BTW (maybe the other GUI maintainers can help me with that one) - what about 
sub-tabs 
that are not search-based (i.e. display results from a regular query or even 
from a 
field within the selected item in the main grid, e.g. Applications in VM) - are 
these 
managed via SearchableListModel as well? since the comparator mechanism *is* 
relevant 
for them.

Also: Worth mentioning Bug 893999 - webadmin: please allow column sorting, 
which 
requests to enable sorting when clicking on a grid-column header; when 
implementing 
column-sorting, probably worth attaching your mechanism to it somehow (i.e. 
clicking on 
a column header should set the relevant comparator in the relevant 
SearchableListModel).

 
  
  I believe that the correct thing to do is to attach the GUI sorting
  mechanism
  to the one in the search mechanism.
  
  thoughts?
 
 This can be done, however I'm not sure there's much utility in it. Main
 tabs are always sorted according to some default ordering even if one
 was not entered in the search panel, and this sorting is also performed
 consistently with respect to paging. So maybe the right thing to do
 would be to just block the GUI sorting mechanism for main tabs (i.e.
 override the setter method and make it no-op)?

yes, and related to what I mentioned above - at some point in the future, we'd 
might want 
to block it for search-based sub-tabs as well.

 
 
 
 
  http://gerrit.ovirt.org/#/c/15846/
 
  If a comparator isn't set, then everything should behave as before. If a
  comparator is set, then from that moment on the tab items will be kept
  in a SortedSet, so that even if an item is added in a way that doesn't
  trigger an event (e.g. getItems().add()) the items will be kept sorted
  according to the given comparator. If the comparator is set to null,
  from that moment on the tab should revert to its old behaviour.
 
  You're most welcome to have a look and let me know if this might break
  something (remember though that it's not obligatory to set a comparator,
  so only possible breakage should be in generic flows).
 
  Feel free to use it once it's merged; along with SortedListModel, this
  should make sorting less painful. Just keep in mind that once you set a
  comparator, you can't cast getItems() to a List. This shouldn't be a
  problem in general, as mostly it's as useful (and probably more correct)
  to cast to a Collection.
 
  

Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Eli Mesika


- Original Message -
 From: Einav Cohen eco...@redhat.com
 To: Lior Vernia lver...@redhat.com
 Cc: Eli Mesika emes...@redhat.com, engine-devel@ovirt.org, Vojtech 
 Szocs vsz...@redhat.com, Alexander Wels
 aw...@redhat.com, Daniel Erez de...@redhat.com, Gilad Chaplik 
 gchap...@redhat.com, Alona Kaplan
 alkap...@redhat.com, Tomas Jelinek tjeli...@redhat.com
 Sent: Thursday, June 27, 2013 4:42:18 PM
 Subject: Re: [Engine-devel] Sorting in tabs
 
  - Original Message -
  From: Lior Vernia lver...@redhat.com
  Sent: Thursday, June 27, 2013 8:53:59 AM
  
  
  
  On 27/06/13 15:37, Einav Cohen wrote:
   - Original Message -
   From: Eli Mesika emes...@redhat.com
   Sent: Thursday, June 27, 2013 6:46:58 AM
  
  
   - Original Message -
   From: Lior Vernia lver...@redhat.com
   To: engine-devel@ovirt.org
   Sent: Thursday, June 27, 2013 10:12:33 AM
   Subject: [Engine-devel] Sorting in tabs
  
   Hello everyone (UI peeps in particular),
  
   I've pushed (not yet merged) a patch that would enable us to keep items
   in tabs (main/sub) sorted at all times by setting a comparator in
   SearchableListModel:
  
   But tabs includes only 100 records and supports paging , how you deal
   with
   that ???
   
   if this is in the GUI level, then I assume that the comparator is simply
   comparing the
   items within the current page, and not globally.
   so the sorting doesn't affect the set of items that is displayed in the
   page (it would
   be the same as before the sorting) - just their order.
  
  Yes, if I understand correctly how the paging works, Einav is correct -
  only the items passed to the UI are sorted.
  
   also: @Lior - what happens when the search query contains a sort by
   part?
   there is a chance that the behaivor would be unexpected in this case;
  
  Yes, I thought about this case, and it may result in a confusing user
  experience if developers aren't careful. Together with the issue of
  paging, this probably makes this sorting mechanism a better candidate
  for use within subtabs rather than main tabs.
 
 note that at some point, I think that we would want to introduce paging also
 to search-
 based sub-tabs - it will be useful especially for sub-tabs that potentially
 display a
 large number of results (e.g. Disks sub-tab in Storage main tab).
 In addition, at some point, we would want to get rid of the paging UI as it
 is now
 (i.e. next/prev buttons at the top panel) and move to paging triggered by
 scroll
 (i.e. have a very long grid, dynamically loaded as you continue to scroll -
 similar
 to the behavior of some e-mail web-clients, for example). In this case,
 sorting on
 the client side will make no sense at all (i.e. from the user perspective,
 only a
 portion of a very large grid will be sorted, the other portions won't be).
 
 So for now - yes, I think it makes sense to introduce your mechanism to all
 sub-tabs,
 however in the long-term - we would probably want the search-based sub-tabs
 (which
 will support paging) to move to search-based sorting, rather than
 GUI-based-sorting.
 
 BTW (maybe the other GUI maintainers can help me with that one) - what about
 sub-tabs
 that are not search-based (i.e. display results from a regular query or
 even from a
 field within the selected item in the main grid, e.g. Applications in VM) -
 are these
 managed via SearchableListModel as well? since the comparator mechanism *is*
 relevant
 for them.
 
 Also: Worth mentioning Bug 893999 - webadmin: please allow column sorting,
 which
 requests to enable sorting when clicking on a grid-column header; when
 implementing
 column-sorting, probably worth attaching your mechanism to it somehow (i.e.
 clicking on
 a column header should set the relevant comparator in the relevant
 SearchableListModel).

I think that when we will implement column sorting it will fulfill all UI 
sorting requirements 
 
  
   
   I believe that the correct thing to do is to attach the GUI sorting
   mechanism
   to the one in the search mechanism.
   
   thoughts?

But this should be visible , i.e. the search syntax should be changed to 
reflect this kind of sorting.

  
  This can be done, however I'm not sure there's much utility in it. Main
  tabs are always sorted according to some default ordering even if one
  was not entered in the search panel, and this sorting is also performed
  consistently with respect to paging. So maybe the right thing to do
  would be to just block the GUI sorting mechanism for main tabs (i.e.
  override the setter method and make it no-op)?
 
 yes, and related to what I mentioned above - at some point in the future,
 we'd might want
 to block it for search-based sub-tabs as well.
 
  
  
  
  
   http://gerrit.ovirt.org/#/c/15846/
  
   If a comparator isn't set, then everything should behave as before. If
   a
   comparator is set, then from that moment on the tab items will be kept
   in a SortedSet, so that even if an item is added in a way that 

Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Lior Vernia


On 27/06/13 16:42, Einav Cohen wrote:
 - Original Message -
 From: Lior Vernia lver...@redhat.com
 Sent: Thursday, June 27, 2013 8:53:59 AM



 On 27/06/13 15:37, Einav Cohen wrote:
 - Original Message -
 From: Eli Mesika emes...@redhat.com
 Sent: Thursday, June 27, 2013 6:46:58 AM


 - Original Message -
 From: Lior Vernia lver...@redhat.com
 To: engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 10:12:33 AM
 Subject: [Engine-devel] Sorting in tabs

 Hello everyone (UI peeps in particular),

 I've pushed (not yet merged) a patch that would enable us to keep items
 in tabs (main/sub) sorted at all times by setting a comparator in
 SearchableListModel:

 But tabs includes only 100 records and supports paging , how you deal with
 that ???

 if this is in the GUI level, then I assume that the comparator is simply
 comparing the
 items within the current page, and not globally.
 so the sorting doesn't affect the set of items that is displayed in the
 page (it would
 be the same as before the sorting) - just their order.

 Yes, if I understand correctly how the paging works, Einav is correct -
 only the items passed to the UI are sorted.

 also: @Lior - what happens when the search query contains a sort by part?
 there is a chance that the behaivor would be unexpected in this case;

 Yes, I thought about this case, and it may result in a confusing user
 experience if developers aren't careful. Together with the issue of
 paging, this probably makes this sorting mechanism a better candidate
 for use within subtabs rather than main tabs.
 
 note that at some point, I think that we would want to introduce paging also 
 to search-
 based sub-tabs - it will be useful especially for sub-tabs that potentially 
 display a 
 large number of results (e.g. Disks sub-tab in Storage main tab). 
 In addition, at some point, we would want to get rid of the paging UI as it 
 is now 
 (i.e. next/prev buttons at the top panel) and move to paging triggered by 
 scroll 
 (i.e. have a very long grid, dynamically loaded as you continue to scroll - 
 similar 
 to the behavior of some e-mail web-clients, for example). In this case, 
 sorting on 
 the client side will make no sense at all (i.e. from the user perspective, 
 only a 
 portion of a very large grid will be sorted, the other portions won't be).
 
 So for now - yes, I think it makes sense to introduce your mechanism to all 
 sub-tabs, 
 however in the long-term - we would probably want the search-based sub-tabs 
 (which 
 will support paging) to move to search-based sorting, rather than 
 GUI-based-sorting.

Sounds good to me. Let me just re-iterate that it is not mandatory to
set a comparator, so in technical terms it's not even necessary to
introduce it at once to all sub-tabs, if they're already sorting their
items some other way. It could happen gradually, and only if developers
find it more convenient. In either case, dropping the GUI sorting once
search-based sorting is implemented shouldn't be difficult.

 BTW (maybe the other GUI maintainers can help me with that one) - what about 
 sub-tabs 
 that are not search-based (i.e. display results from a regular query or 
 even from a 
 field within the selected item in the main grid, e.g. Applications in VM) - 
 are these 
 managed via SearchableListModel as well? since the comparator mechanism *is* 
 relevant 
 for them.

As far as I've seen, some are managed via SearchableListModel and some
aren't. Those that aren't are those that display non-trivial behaviour
upon receipt of the items to display (setItems() method) - often this
non-trivial behaviour is exactly sorting :) And if it's doing its job,
then there's no necessity to change it either. But anyway, I don't know
all of them, so I'd also love to hear GUI maintainers.

 Also: Worth mentioning Bug 893999 - webadmin: please allow column sorting, 
 which 
 requests to enable sorting when clicking on a grid-column header; when 
 implementing 
 column-sorting, probably worth attaching your mechanism to it somehow (i.e. 
 clicking on 
 a column header should set the relevant comparator in the relevant 
 SearchableListModel).

I didn't want to say it, because if we upgrade to a newer version of GWT
then we could probably use their table column sorting. But this
mechanism could allow us to achieve this without upgrading, and it was
definitely sitting in the back of my head when I implemented it. All
that's needed is, as you said, to listen to table header clicks in the
view, and then appropriately set the comparator in the model.



 I believe that the correct thing to do is to attach the GUI sorting
 mechanism
 to the one in the search mechanism.

 thoughts?

 This can be done, however I'm not sure there's much utility in it. Main
 tabs are always sorted according to some default ordering even if one
 was not entered in the search panel, and this sorting is also performed
 consistently with respect to paging. So maybe the right thing to do
 

Re: [Engine-devel] SSH Soft Fencing

2013-06-27 Thread Eli Mesika


- Original Message -
 From: Yair Zaslavsky yzasl...@redhat.com
 To: Eli Mesika emes...@redhat.com
 Cc: Martin Perina mper...@redhat.com, engine-devel@ovirt.org, Barak 
 Azulay bazu...@redhat.com
 Sent: Thursday, June 27, 2013 5:43:17 PM
 Subject: Re: SSH Soft Fencing
 
 
 
 - Original Message -
  From: Eli Mesika emes...@redhat.com
  To: Martin Perina mper...@redhat.com
  Cc: engine-devel@ovirt.org, Yair Zaslavsky yzasl...@redhat.com, Barak
  Azulay bazu...@redhat.com
  Sent: Thursday, June 27, 2013 3:48:39 PM
  Subject: Re: SSH Soft Fencing
  
  
  
  - Original Message -
   From: Martin Perina mper...@redhat.com
   To: engine-devel@ovirt.org
   Cc: Yair Zaslavsky yzasl...@redhat.com, Barak Azulay
   bazu...@redhat.com, Eli Mesika emes...@redhat.com
   Sent: Thursday, June 27, 2013 1:51:06 PM
   Subject: SSH Soft Fencing
   
   Hi,
   
   SSH Soft Fencing is a new feature for 3.3 and it tries to restart VDSM
   using SSH connection on non responsive hosts prior to real fencing.
   More info can be found at
   
   http://www.ovirt.org/Automatic_Fencing#Automatic_Fencing_in_oVirt_3.3
   
   In current SSH Soft Fencing implementation the restart VDSM using SSH
   command is part of standard fencing implementation in
   VdsNotRespondingTreatmentCommand. But this command is executed only
   if a host has a valid PM configuration. If host doesn't have a valid
   PM configuration, the execution of the command is disabled and host
   state is change to Non Responsive.
   
   So my question are:
   
   1) Should SSH Soft Fencing be executed on hosts without valid PM
  configuration?
  
  I think that the answer should be yes. The vdsm restart will solve most of
  problems , so why not using it whether a PM agent is defined or not.
 I agree.
 I would like to say that I also don't like the fact that
 VdsNotRespondingTreatment extends RestartVdsCommand.
 One should ask if non responding treatment is a restart vds operation or
 maybe RestartVdsCommand is just a step in the non responding treatment
 (inheritance vs containment/delegation).
 I think that VdsNotRespodingTreatment should delegate the call to
 RestartVdsCommand as the 2nd step after issuing the Soft Fencing command.
 Thoughts anyone?

That would be a nice and needed re-factoring 

 
  
   
   2) Should VDSM restart using SSH command be reimplemented
  as standalone command to be usable also in other parts of engine?
  If 1) is true, I think it will have to be done anyway.
 
 I agree here.
  
  +1
  
   
   
   Martin Perina
   
  
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Lior Vernia


On 27/06/13 18:15, Einav Cohen wrote:
 - Original Message -
 From: Lior Vernia lver...@redhat.com
 Sent: Thursday, June 27, 2013 10:38:04 AM



 On 27/06/13 16:42, Einav Cohen wrote:
 - Original Message -
 From: Lior Vernia lver...@redhat.com
 Sent: Thursday, June 27, 2013 8:53:59 AM



 On 27/06/13 15:37, Einav Cohen wrote:
 - Original Message -
 From: Eli Mesika emes...@redhat.com
 Sent: Thursday, June 27, 2013 6:46:58 AM


 - Original Message -
 From: Lior Vernia lver...@redhat.com
 To: engine-devel@ovirt.org
 Sent: Thursday, June 27, 2013 10:12:33 AM
 Subject: [Engine-devel] Sorting in tabs

 Hello everyone (UI peeps in particular),

 I've pushed (not yet merged) a patch that would enable us to keep items
 in tabs (main/sub) sorted at all times by setting a comparator in
 SearchableListModel:

 But tabs includes only 100 records and supports paging , how you deal
 with
 that ???

 if this is in the GUI level, then I assume that the comparator is simply
 comparing the
 items within the current page, and not globally.
 so the sorting doesn't affect the set of items that is displayed in the
 page (it would
 be the same as before the sorting) - just their order.

 Yes, if I understand correctly how the paging works, Einav is correct -
 only the items passed to the UI are sorted.

 also: @Lior - what happens when the search query contains a sort by
 part?
 there is a chance that the behaivor would be unexpected in this case;

 Yes, I thought about this case, and it may result in a confusing user
 experience if developers aren't careful. Together with the issue of
 paging, this probably makes this sorting mechanism a better candidate
 for use within subtabs rather than main tabs.

 note that at some point, I think that we would want to introduce paging
 also to search-
 based sub-tabs - it will be useful especially for sub-tabs that potentially
 display a
 large number of results (e.g. Disks sub-tab in Storage main tab).
 In addition, at some point, we would want to get rid of the paging UI as it
 is now
 (i.e. next/prev buttons at the top panel) and move to paging triggered
 by scroll
 (i.e. have a very long grid, dynamically loaded as you continue to scroll -
 similar
 to the behavior of some e-mail web-clients, for example). In this case,
 sorting on
 the client side will make no sense at all (i.e. from the user perspective,
 only a
 portion of a very large grid will be sorted, the other portions won't be).

 So for now - yes, I think it makes sense to introduce your mechanism to all
 sub-tabs,
 however in the long-term - we would probably want the search-based sub-tabs
 (which
 will support paging) to move to search-based sorting, rather than
 GUI-based-sorting.

 Sounds good to me. Let me just re-iterate that it is not mandatory to
 set a comparator, so in technical terms it's not even necessary to
 introduce it at once to all sub-tabs, if they're already sorting their
 items some other way. It could happen gradually, and only if developers
 find it more convenient. In either case, dropping the GUI sorting once
 search-based sorting is implemented shouldn't be difficult.

 BTW (maybe the other GUI maintainers can help me with that one) - what
 about sub-tabs
 that are not search-based (i.e. display results from a regular query or
 even from a
 field within the selected item in the main grid, e.g. Applications in VM) -
 are these
 managed via SearchableListModel as well? since the comparator mechanism
 *is* relevant
 for them.

 As far as I've seen, some are managed via SearchableListModel and some
 aren't. Those that aren't are those that display non-trivial behaviour
 upon receipt of the items to display (setItems() method) - often this
 non-trivial behaviour is exactly sorting :) And if it's doing its job,
 then there's no necessity to change it either. But anyway, I don't know
 all of them, so I'd also love to hear GUI maintainers.

 Also: Worth mentioning Bug 893999 - webadmin: please allow column
 sorting, which
 requests to enable sorting when clicking on a grid-column header; when
 implementing
 column-sorting, probably worth attaching your mechanism to it somehow (i.e.
 clicking on
 a column header should set the relevant comparator in the relevant
 SearchableListModel).

 I didn't want to say it, because if we upgrade to a newer version of GWT
 then we could probably use their table column sorting. But this
 mechanism could allow us to achieve this without upgrading, and it was
 definitely sitting in the back of my head when I implemented it. All
 that's needed is, as you said, to listen to table header clicks in the
 view, and then appropriately set the comparator in the model.

 
 [Vojtech/GUI-maintainers - your input would be appreciated here]
 
 we are actually planning on upgrading the GWT version *really* soon (to GWT 
 2.5), 
 so my question is: should we wait until the new GWT is introduced, and 
 implement 
 client-sorting based on the GWT-grid-widget 

Re: [Engine-devel] Sorting in tabs

2013-06-27 Thread Einav Cohen
 - Original Message -
 From: Lior Vernia lver...@redhat.com
 Sent: Thursday, June 27, 2013 12:15:14 PM
 
 
 
 On 27/06/13 18:15, Einav Cohen wrote:
  - Original Message -
  From: Lior Vernia lver...@redhat.com
  Sent: Thursday, June 27, 2013 10:38:04 AM
 
 
 
  On 27/06/13 16:42, Einav Cohen wrote:
  - Original Message -
  From: Lior Vernia lver...@redhat.com
  Sent: Thursday, June 27, 2013 8:53:59 AM
 
 
 
  On 27/06/13 15:37, Einav Cohen wrote:
  - Original Message -
  From: Eli Mesika emes...@redhat.com
  Sent: Thursday, June 27, 2013 6:46:58 AM
 
 
  - Original Message -
  From: Lior Vernia lver...@redhat.com
  To: engine-devel@ovirt.org
  Sent: Thursday, June 27, 2013 10:12:33 AM
  Subject: [Engine-devel] Sorting in tabs
 
  Hello everyone (UI peeps in particular),
 
  I've pushed (not yet merged) a patch that would enable us to keep
  items
  in tabs (main/sub) sorted at all times by setting a comparator in
  SearchableListModel:
 
  But tabs includes only 100 records and supports paging , how you deal
  with
  that ???
 
  if this is in the GUI level, then I assume that the comparator is
  simply
  comparing the
  items within the current page, and not globally.
  so the sorting doesn't affect the set of items that is displayed in the
  page (it would
  be the same as before the sorting) - just their order.
 
  Yes, if I understand correctly how the paging works, Einav is correct -
  only the items passed to the UI are sorted.
 
  also: @Lior - what happens when the search query contains a sort by
  part?
  there is a chance that the behaivor would be unexpected in this case;
 
  Yes, I thought about this case, and it may result in a confusing user
  experience if developers aren't careful. Together with the issue of
  paging, this probably makes this sorting mechanism a better candidate
  for use within subtabs rather than main tabs.
 
  note that at some point, I think that we would want to introduce paging
  also to search-
  based sub-tabs - it will be useful especially for sub-tabs that
  potentially
  display a
  large number of results (e.g. Disks sub-tab in Storage main tab).
  In addition, at some point, we would want to get rid of the paging UI as
  it
  is now
  (i.e. next/prev buttons at the top panel) and move to paging
  triggered
  by scroll
  (i.e. have a very long grid, dynamically loaded as you continue to scroll
  -
  similar
  to the behavior of some e-mail web-clients, for example). In this case,
  sorting on
  the client side will make no sense at all (i.e. from the user
  perspective,
  only a
  portion of a very large grid will be sorted, the other portions won't
  be).
 
  So for now - yes, I think it makes sense to introduce your mechanism to
  all
  sub-tabs,
  however in the long-term - we would probably want the search-based
  sub-tabs
  (which
  will support paging) to move to search-based sorting, rather than
  GUI-based-sorting.
 
  Sounds good to me. Let me just re-iterate that it is not mandatory to
  set a comparator, so in technical terms it's not even necessary to
  introduce it at once to all sub-tabs, if they're already sorting their
  items some other way. It could happen gradually, and only if developers
  find it more convenient. In either case, dropping the GUI sorting once
  search-based sorting is implemented shouldn't be difficult.
 
  BTW (maybe the other GUI maintainers can help me with that one) - what
  about sub-tabs
  that are not search-based (i.e. display results from a regular query or
  even from a
  field within the selected item in the main grid, e.g. Applications in VM)
  -
  are these
  managed via SearchableListModel as well? since the comparator mechanism
  *is* relevant
  for them.
 
  As far as I've seen, some are managed via SearchableListModel and some
  aren't. Those that aren't are those that display non-trivial behaviour
  upon receipt of the items to display (setItems() method) - often this
  non-trivial behaviour is exactly sorting :) And if it's doing its job,
  then there's no necessity to change it either. But anyway, I don't know
  all of them, so I'd also love to hear GUI maintainers.
 
  Also: Worth mentioning Bug 893999 - webadmin: please allow column
  sorting, which
  requests to enable sorting when clicking on a grid-column header; when
  implementing
  column-sorting, probably worth attaching your mechanism to it somehow
  (i.e.
  clicking on
  a column header should set the relevant comparator in the relevant
  SearchableListModel).
 
  I didn't want to say it, because if we upgrade to a newer version of GWT
  then we could probably use their table column sorting. But this
  mechanism could allow us to achieve this without upgrading, and it was
  definitely sitting in the back of my head when I implemented it. All
  that's needed is, as you said, to listen to table header clicks in the
  view, and then appropriately set the comparator in the model.
 
  
  

Re: [Engine-devel] SSH Soft Fencing

2013-06-27 Thread Livnat Peer
On 06/27/2013 05:43 PM, Yair Zaslavsky wrote:
 
 
 - Original Message -
 From: Eli Mesika emes...@redhat.com
 To: Martin Perina mper...@redhat.com
 Cc: engine-devel@ovirt.org, Yair Zaslavsky yzasl...@redhat.com, Barak 
 Azulay bazu...@redhat.com
 Sent: Thursday, June 27, 2013 3:48:39 PM
 Subject: Re: SSH Soft Fencing



 - Original Message -
 From: Martin Perina mper...@redhat.com
 To: engine-devel@ovirt.org
 Cc: Yair Zaslavsky yzasl...@redhat.com, Barak Azulay
 bazu...@redhat.com, Eli Mesika emes...@redhat.com
 Sent: Thursday, June 27, 2013 1:51:06 PM
 Subject: SSH Soft Fencing

 Hi,

 SSH Soft Fencing is a new feature for 3.3 and it tries to restart VDSM
 using SSH connection on non responsive hosts prior to real fencing.
 More info can be found at

 http://www.ovirt.org/Automatic_Fencing#Automatic_Fencing_in_oVirt_3.3

 In current SSH Soft Fencing implementation the restart VDSM using SSH
 command is part of standard fencing implementation in
 VdsNotRespondingTreatmentCommand. But this command is executed only
 if a host has a valid PM configuration. If host doesn't have a valid
 PM configuration, the execution of the command is disabled and host
 state is change to Non Responsive.

 So my question are:

 1) Should SSH Soft Fencing be executed on hosts without valid PM
configuration?

 I think that the answer should be yes. The vdsm restart will solve most of
 problems , so why not using it whether a PM agent is defined or not.
 I agree.
 I would like to say that I also don't like the fact that 
 VdsNotRespondingTreatment extends RestartVdsCommand.
 One should ask if non responding treatment is a restart vds operation or 
 maybe RestartVdsCommand is just a step in the non responding treatment 
 (inheritance vs containment/delegation).
 I think that VdsNotRespodingTreatment should delegate the call to 
 RestartVdsCommand as the 2nd step after issuing the Soft Fencing command.
 Thoughts anyone?
 

I agree.
The purpose of this feature is to add escalation step when handling non
responsive host.
Power fencing is only a step in the escalation flow. so should be called
from within the main flow controller (the VdsNotRespodingTreatment).

Maybe we'd like this to be fine tuned by a custom policy in future versions.



 2) Should VDSM restart using SSH command be reimplemented
as standalone command to be usable also in other parts of engine?
If 1) is true, I think it will have to be done anyway.
 
 I agree here. 

 +1

+1
The VDSM restart is a step in the escalation flow, and it should not be
tightly coupled with the non-responsive treatment implementation.




 Martin Perina


 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel
 
 

___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] SSH Soft Fencing

2013-06-27 Thread Barak Azulay


- Original Message -
 From: Eli Mesika emes...@redhat.com
 To: Yair Zaslavsky yzasl...@redhat.com
 Cc: Martin Perina mper...@redhat.com, engine-devel@ovirt.org, Barak 
 Azulay bazu...@redhat.com
 Sent: Thursday, June 27, 2013 5:55:29 PM
 Subject: Re: SSH Soft Fencing
 
 
 
 - Original Message -
  From: Yair Zaslavsky yzasl...@redhat.com
  To: Eli Mesika emes...@redhat.com
  Cc: Martin Perina mper...@redhat.com, engine-devel@ovirt.org, Barak
  Azulay bazu...@redhat.com
  Sent: Thursday, June 27, 2013 5:43:17 PM
  Subject: Re: SSH Soft Fencing
  
  
  
  - Original Message -
   From: Eli Mesika emes...@redhat.com
   To: Martin Perina mper...@redhat.com
   Cc: engine-devel@ovirt.org, Yair Zaslavsky yzasl...@redhat.com,
   Barak
   Azulay bazu...@redhat.com
   Sent: Thursday, June 27, 2013 3:48:39 PM
   Subject: Re: SSH Soft Fencing
   
   
   
   - Original Message -
From: Martin Perina mper...@redhat.com
To: engine-devel@ovirt.org
Cc: Yair Zaslavsky yzasl...@redhat.com, Barak Azulay
bazu...@redhat.com, Eli Mesika emes...@redhat.com
Sent: Thursday, June 27, 2013 1:51:06 PM
Subject: SSH Soft Fencing

Hi,

SSH Soft Fencing is a new feature for 3.3 and it tries to restart VDSM
using SSH connection on non responsive hosts prior to real fencing.
More info can be found at

http://www.ovirt.org/Automatic_Fencing#Automatic_Fencing_in_oVirt_3.3

In current SSH Soft Fencing implementation the restart VDSM using SSH
command is part of standard fencing implementation in
VdsNotRespondingTreatmentCommand. But this command is executed only
if a host has a valid PM configuration. If host doesn't have a valid
PM configuration, the execution of the command is disabled and host
state is change to Non Responsive.

So my question are:

1) Should SSH Soft Fencing be executed on hosts without valid PM
   configuration?
   
   I think that the answer should be yes. The vdsm restart will solve most
   of
   problems , so why not using it whether a PM agent is defined or not.
  I agree.
  I would like to say that I also don't like the fact that
  VdsNotRespondingTreatment extends RestartVdsCommand.
  One should ask if non responding treatment is a restart vds operation or
  maybe RestartVdsCommand is just a step in the non responding treatment
  (inheritance vs containment/delegation).
  I think that VdsNotRespodingTreatment should delegate the call to
  RestartVdsCommand as the 2nd step after issuing the Soft Fencing command.
  Thoughts anyone?
 
 That would be a nice and needed re-factoring

I would say yes - but would add it only with appropriate configuration 
(enableAutoSoftVdsmRestartWhenNoPMAvailable  I hate the name)

 

 
  
   

2) Should VDSM restart using SSH command be reimplemented
   as standalone command to be usable also in other parts of engine?
   If 1) is true, I think it will have to be done anyway.
  
  I agree here.
   
   +1

On one hand it makes sense,  but I have several questions on the above:
- Who do we think may want to use such a command ?
- Should (or even can) we limit the use of such command to 
noneResponsiveTreatment ?

Having general commands available to all code when there is only one specific 
case we are using it might be a bit riskey,
Especially when we talk about restarting something.

Thoughts ?



   


Martin Perina

   
  
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


[Engine-devel] Introduce mail

2013-06-27 Thread Fellipe Henrique
hello folks!

I'm here today, to introduce myself. I want to start to contribute to oVirt
project, I'm developing most of time in python, and I'll love to contribute
in python, but can be in C.

I love developing and virtualization, and I think this project have all I
like.

well, like I said, this is a introduce email, and I'll like suggestion how
can I help, and show my code to you guys.

best regards,

T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

*Quemadmodum gladius neminem occidit, occidentis telum est.* (Epistulae
morales ad Luciliumhttp://en.wikipedia.org/wiki/Epistulae_morales_ad_Lucilium,
Lucius Annaeus Seneca)

*Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move in
the opposite direction.*
Albert Einstein (March 14th 1879 – April 18th 1955)
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] Introduce mail

2013-06-27 Thread Alon Bar-Lev

Hello Fillipe,

If you can integrate between several components of ovirt we need help in 
re-writing the ovirt-node vdsm plugin[1].

This is somewhat complex task, in which we integrate ovirt-node distribution 
with UI and logic of registration and the ovirt-engine.

The basic sequence is as follows:

1. admin login into ovirt-node TUI.
2. ovirt-node TUI loads a plugin out of the ovirt-node-plugin-vdsm.
3. ovirt-node TUI allows user to interact with the plugin.
4. once the ip address and port of the engine are provided the plugin performs:
a) download CA certificate.
b) download SSH public key.
c) perform registration via HTTP
d) create bridge

What we need is to cleanup the code first which contains a lot of legacy, then 
to modify the behavior to suite our current needs.

The task is complex because of the integration between different components and 
the ovirt-node hostile environment.

If you are interested, we can start...

Regards,
Alon

[1] http://gerrit.ovirt.org/gitweb?p=ovirt-node-plugin-vdsm.git

- Original Message -
 From: Fellipe Henrique felli...@gmail.com
 To: engine-devel@ovirt.org
 Sent: Friday, June 28, 2013 12:48:08 AM
 Subject: [Engine-devel] Introduce mail
 
 hello folks!
 
 I'm here today, to introduce myself. I want to start to contribute to oVirt
 project, I'm developing most of time in python, and I'll love to contribute
 in python, but can be in C.
 
 I love developing and virtualization, and I think this project have all I
 like.
 
 well, like I said, this is a introduce email, and I'll like suggestion how
 can I help, and show my code to you guys.
 
 best regards,
 
 T.·.F.·.A.·. S+F
 Fellipe Henrique P. Soares
 
 Quemadmodum gladius neminem occidit, occidentis telum est. ( Epistulae
 morales ad Lucilium , Lucius Annaeus Seneca)
 
 Any intelligent fool can make things bigger, more complex, and more violent.
 It takes a touch of genius -- and a lot of courage -- to move in the
 opposite direction.
 Albert Einstein (March 14th 1879 – April 18th 1955)
 
 ___
 Engine-devel mailing list
 Engine-devel@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/engine-devel
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel


Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST

2013-06-27 Thread Tomas Jelinek


- Original Message -
 From: Einav Cohen eco...@redhat.com
 To: Tomas Jelinek tjeli...@redhat.com, Vojtech Szocs vsz...@redhat.com
 Cc: engine-devel engine-devel@ovirt.org, Michael Pasternak 
 mpast...@redhat.com
 Sent: Thursday, June 27, 2013 6:01:13 PM
 Subject: Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST
 
 Hi Tomas,
 
  Yes, we can provide the sessionId to authenticate with the REST and the vm
  guid is not a problem.
 
 Note that in the web-admin, we already have code that generates REST API
 session-ID;
 this code is being utilized in the ui-plugins infrastructure to allow the
 different
 ui-plugins to communicate with the rest api.
 [one related file is this context is RestApiSessionManager.java in the
 web-admin, not
 sure if there are others]

Yes, I'm aware of that. This is what I had in mind when was talking about 
passing the SessionId to SPICE.

 
 maybe the RestApiSessionManager(?) can somehow be utilized for the SPICE
 purpose as well
 (I guess that it will require a couple of code-changes though, and maybe
 worth moving it
 to gwt-common, to allow its utilization from the user portal as well?) -
 @Vojtech would
 probably know best to advise on this.
 
 * Note: Today:
 (a) a *single* REST API session-ID is generated and used across all
 ui-plugins in the system
 (upon user login to the web-admin).
 
 (b) this REST-API session-ID is generated based on the *same credentials*
 with which the user
 logged into the web-admin.
 
 both (a) and (b) will change once [1] will be addressed.

Thank you for mentioning this! I was not aware of this RFE. IIUC the RFE 
addresses only
UIPlugins with their metadata so in order to integrate this with the SPICE we 
nee to either
enrich the RFE or to create a UIPlugin which will start the SPICE. I would vote 
for the second option.
What others?

 Only for the SPICE case in particular - I think that (b) should remain. so

Why only for SPICE? I can imagine UIPlugins which could make use of this option.

 maybe worth allowing
 both same-credentials-login and different-credentials-login in the
 REST-API-Session-ID-generation
 code in the GUI.

This option might make sense also for other UIPlugins so maybe the SPICE 
integration will not be anything special, just a UIPlugin.

 
 
 Thanks,
 Einav
 
 [1] Bug 962863 - RFE: Improve REST API integration for UI Plugins
 https://bugzilla.redhat.com/show_bug.cgi?id=962863
 some of the planned changes (from the BZ description):
 
 ...
 - each UI plugin will have its own dedicated REST API session, unrelated to
 GUI (admin)
 user credentials
 ...
 
 
  - Original Message -
  From: Tomas Jelinek tjeli...@redhat.com
  Sent: Thursday, June 27, 2013 5:50:31 AM
  
  
  
  - Original Message -
   From: Christophe Fergeau cferg...@redhat.com
   To: Tomas Jelinek tjeli...@redhat.com
   Cc: Michal Skrivanek michal.skriva...@redhat.com, Itamar Heim
   ih...@redhat.com,
   spice-de...@lists.freedesktop.org, engine-devel
   engine-devel@ovirt.org,
   Marc-André Lureau mlur...@redhat.com
   Sent: Thursday, June 27, 2013 11:30:10 AM
   Subject: Re: [Engine-devel] [Spice-devel] SPICE Foreign Menu Using REST
   
   Hey,
   
   On Thu, Jun 27, 2013 at 05:21:11AM -0400, Tomas Jelinek wrote:
well, it seems that everyone agree that the decision what to add to the
menu is the client responsibility. It means there is no additional work
needed on the
oVirt engine side - going to remove the feature page.
   
   If we go the REST API way to handle foreign menu, we need additional info
   in the .vv files: some way to auth with the REST API, and the guid of the
   VM to act on.
  Yes, we can provide the sessionId to authenticate with the REST and the vm
  guid is not a problem.
  
   
   Christophe
   
  ___
  Engine-devel mailing list
  Engine-devel@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/engine-devel
  
  
 
 
___
Engine-devel mailing list
Engine-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-devel