<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-AT" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-US">when using CustomProperties they are not being passed when starting VM with Run. How to reproduce:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">vim /usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">#!/usr/bin/python<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">import os<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">import sys<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">import hooking<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">if hooking.tobool(os.environ.get('remove_cpu')):<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.stderr.write('TRUE')<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">else:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sys.stderr.write('FALSE')<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US">sys.exit(0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">chmod 755 /usr/libexec/vdsm/hooks/before_vm_start/99_remove_cpu<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">engine-config -s UserDefinedVMProperties='remove_cpu=^(true|false)$' --cver=3.3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">service ovirt-engine restart<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Setup Virtual Machine with custom property set. When starting VM via Run, vdsm.log shows ‘TRUE’:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thread-1830::DEBUG::2014-01-30 08:58:35,794::utils::509::root::(execCmd) SUCCESS: &lt;err&gt; = 'TRUE'; &lt;rc&gt; = 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">When calling the same via Run Once (the dialog even shows that the custom property is set:
<a href="http://imgur.com/wVSe75L">http://imgur.com/wVSe75L</a>), the vdsm.log shows ‘FALSE’:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thread-1589::DEBUG::2014-01-30 08:52:24,246::utils::509::root::(execCmd) SUCCESS: &lt;err&gt; = 'FALSE'; &lt;rc&gt; = 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Christopher<o:p></o:p></span></p>
</div>
<br>
<hr>
<font face="Verdana" color="Gray" size="1"><br>
Fachhochschule Wiener Neustadt für Wirtschaft und Technik Ges.m.b.H.<br>
University of Applied Sciences Wiener Neustadt for Business and Engineering Ltd., Austria<br>
Johannes Gutenberg-Straße 3<br>
2700 Wiener Neustadt<br>
Austria, Europe<br>
ATU: 37772406<br>
Firmenbuchnummer: 77005v<br>
Firmenbuchgericht: Landesgericht Wiener Neustadt<br>
DVR: 0769665<br>
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.<br>
<br>
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.<br>
</font>
</body>
</html>