Re: [Users] CustomProperties not being passed when using Run Once

2014-02-01 Thread Gilad Chaplik
tested it out, run once flow doesn't pass any custom property to the hypervisor.
simple workaround:
edit vm - show advanced options (button) - custom properties (section)
these properties stick.

anyway as Sven said you can report a bug (good for tracking).

Thanks, 
Gilad.

- Original Message -
 From: Dresel Christopher dre...@fhwn.ac.at
 To: users@ovirt.org
 Sent: Thursday, January 30, 2014 10:02:47 AM
 Subject: [Users] CustomProperties not being passed when using Run Once
 
 
 
 Hi,
 
 
 
 when using CustomProperties they are not being passed when starting VM with
 Run. How to reproduce:
 
 
 
 vim /usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu
 
 
 
 #!/usr/bin/python
 
 
 
 import os
 
 import sys
 
 import hooking
 
 
 
 if hooking.tobool(os.environ.get('remove_cpu')):
 
 sys.stderr.write('TRUE')
 
 else:
 
 sys.stderr.write('FALSE')
 
 
 
 sys.exit(0)
 
 
 
 chmod 755 /usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu
 
 
 
 engine-config -s UserDefinedVMProperties='remove_cpu=^(true|false)$'
 --cver=3.3
 
 service ovirt-engine restart
 
 
 
 Setup Virtual Machine with custom property set. When starting VM via Run,
 vdsm.log shows ‘TRUE’:
 
 
 
 Thread-1830::DEBUG::2014-01-30 08:58:35,767::utils::489::root::(execCmd)
 '/usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu' (cwd None)
 
 Thread-1830::DEBUG::2014-01-30 08:58:35,794::utils::509::root::(execCmd)
 SUCCESS: err = 'TRUE'; rc = 0
 
 
 
 When calling the same via Run Once (the dialog even shows that the custom
 property is set: http://imgur.com/wVSe75L ), the vdsm.log shows ‘FALSE’:
 
 
 
 Thread-1589::DEBUG::2014-01-30 08:52:24,219::utils::489::root::(execCmd)
 '/usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu' (cwd None)
 
 Thread-1589::DEBUG::2014-01-30 08:52:24,246::utils::509::root::(execCmd)
 SUCCESS: err = 'FALSE'; rc = 0
 
 
 
 Best Regards,
 
 Christopher
 
 
 
 Fachhochschule Wiener Neustadt für Wirtschaft und Technik Ges.m.b.H.
 University of Applied Sciences Wiener Neustadt for Business and Engineering
 Ltd., Austria
 Johannes Gutenberg-Straße 3
 2700 Wiener Neustadt
 Austria, Europe
 ATU: 37772406
 Firmenbuchnummer: 77005v
 Firmenbuchgericht: Landesgericht Wiener Neustadt
 DVR: 0769665
 Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten
 Adressaten bestimmt. Jede Form der Kenntnisnahme, Veroeffentlichung,
 Vervielfaeltigung oder Weitergabe des Inhalts dieses E-Mails durch
 unberechtigte Dritte ist unzulaessig. Wir bitten Sie, sich mit dem Absender
 des E-Mails in Verbindung zu setzen, falls Sie nicht der Adressat dieses
 E-Mails sind und das Material von Ihrem Computer zu loeschen.
 
 This e-mail and any attachments are confidential and intended solely for the
 addressee. The perusal, publication, copying or dissemination of the
 contents of this e-mail by unauthorised third parties is prohibited. If you
 are not the intended recipient of this e-mail, please delete it and
 immediately notify the sender.
 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] CustomProperties not being passed when using Run Once

2014-01-30 Thread Dresel Christopher
Hi,

when using CustomProperties they are not being passed when starting VM with 
Run. How to reproduce:

vim /usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu

#!/usr/bin/python

import os
import sys
import hooking

if hooking.tobool(os.environ.get('remove_cpu')):
sys.stderr.write('TRUE')
else:
sys.stderr.write('FALSE')

sys.exit(0)

chmod 755 /usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu

engine-config -s UserDefinedVMProperties='remove_cpu=^(true|false)$' --cver=3.3
service ovirt-engine restart

Setup Virtual Machine with custom property set. When starting VM via Run, 
vdsm.log shows ‘TRUE’:

Thread-1830::DEBUG::2014-01-30 08:58:35,767::utils::489::root::(execCmd) 
'/usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu' (cwd None)
Thread-1830::DEBUG::2014-01-30 08:58:35,794::utils::509::root::(execCmd) 
SUCCESS: err = 'TRUE'; rc = 0

When calling the same via Run Once (the dialog even shows that the custom 
property is set: http://imgur.com/wVSe75L), the vdsm.log shows ‘FALSE’:

Thread-1589::DEBUG::2014-01-30 08:52:24,219::utils::489::root::(execCmd) 
'/usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu' (cwd None)
Thread-1589::DEBUG::2014-01-30 08:52:24,246::utils::509::root::(execCmd) 
SUCCESS: err = 'FALSE'; rc = 0

Best Regards,
Christopher



Fachhochschule Wiener Neustadt für Wirtschaft und Technik Ges.m.b.H.
University of Applied Sciences Wiener Neustadt for Business and Engineering 
Ltd., Austria
Johannes Gutenberg-Straße 3
2700 Wiener Neustadt
Austria, Europe
ATU: 37772406
Firmenbuchnummer: 77005v
Firmenbuchgericht: Landesgericht Wiener Neustadt
DVR: 0769665
Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten Adressaten 
bestimmt. Jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung 
oder Weitergabe des Inhalts dieses E-Mails durch unberechtigte Dritte ist 
unzulaessig. Wir bitten Sie, sich mit dem Absender des E-Mails in Verbindung zu 
setzen, falls Sie nicht der Adressat dieses E-Mails sind und das Material von 
Ihrem Computer zu loeschen.

This e-mail and any attachments are confidential and intended solely for the 
addressee. The perusal, publication, copying or dissemination of the contents 
of this e-mail by unauthorised third parties is prohibited. If you are not the 
intended recipient of this e-mail, please delete it and immediately notify the 
sender.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] CustomProperties not being passed when using Run Once

2014-01-30 Thread Sven Kieske
Hi,

if this is a true bug (didn't check myself)
the fastest way to get a response is to open
a bugzilla at bugzilla.redhat.com

HTH

-- 
Mit freundlichen Grüßen / Regards

Sven Kieske

Systemadministrator
Mittwald CM Service GmbH  Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users