Re: [ovirt-users] Hosted engine notifications don't work after upgrading ovirt from 3.5 to 3.6

This is a multi-part message in MIME format. --------------020306050904050501090802 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while. Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <s.danzi@hawai.it <mailto:s.danzi@hawai.it>> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ Users mailing list Users@ovirt.org <mailto:Users@ovirt.org> http://lists.ovirt.org/mailman/listinfo/users
--------------020306050904050501090802 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> <br> <br> <div class="moz-cite-prefix"><br> </div> <blockquote cite="mid:563B97C7.8050600@hawai.it" type="cite"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> the content is:<br> <br> [email]<br> smtp-server=localhost<br> smtp-port=25<br> destination-emails=root@localhost<br> source-email=root@localhost<br> <br> [notify]<br> state_transition=maintenance|start|stop|migrate|up|down<br> <br> </blockquote> and is the default. My conf was lost during upgrade.<br> If I restart ovirt-ha-broker the broker.conf is replaced with the default<br> <br> If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.<br> <br> Looking here <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html">http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html</a><br> I understand that broker.conf is stored in another place and overwrite at runtime.<br> <br> <blockquote cite="mid:563B97C7.8050600@hawai.it" type="cite"> <br> <div class="moz-cite-prefix">Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:<br> </div> <blockquote cite="mid:CAN8-ONpSxYVP050rp0ZGOxTmqKPDUUZy+8+2wf3Y8XSXgSTZMA@mail.gmail.com" type="cite"> <div dir="ltr">Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? <div>eventually make it anonymous if you prefer<br> <div><br> </div> <div><br> </div> </div> </div> <div class="gmail_extra"><br> <div class="gmail_quote">On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <span dir="ltr"><<a moz-do-not-send="true" href="mailto:s.danzi@hawai.it" target="_blank">s.danzi@hawai.it</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work.<br> I think that broker.conf was lost during upgrade.<br> <br> I found this: <a moz-do-not-send="true" href="https://bugzilla.redhat.com/show_bug.cgi?id=1260757" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1260757</a><br> But I don't undertand how to change the configuration now.<br> _______________________________________________<br> Users mailing list<br> <a moz-do-not-send="true" href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br> <a moz-do-not-send="true" href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br> </blockquote> </div> <br> </div> </blockquote> <br> </blockquote> <br> <pre class="moz-signature" cols="72"> </pre> </body> </html> --------------020306050904050501090802--

On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default
If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.
Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI. The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage. I'm opening a bug against that. Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system): dir=`mktemp -d` && cd $dir systemctl stop ovirt-ha-broker sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf) sdUUID=${sdUUID_line:7:36} conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_volume_UUID=${conf_volume_UUID_line:17:36} conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_image_UUID=${conf_image_UUID_line:16:36} dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf - cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave broker.conf # or edit broker.conf as you need tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115: _Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID systemctl start ovirt-ha-broker
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

This is a multi-part message in MIME format. --------------030505080109080902020507 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Your trick work fine! Thanks! Now I see that emails sent from brocker has "corrupted" headers: At the ent of message we can see: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:; From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance The state machine changed state. From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject. On message body I see everything after "To: undisclosed-recipients:;" Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:
On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <s.danzi@hawai.it <mailto:s.danzi@hawai.it>> wrote:
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default
If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.
Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI.
The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage. I'm opening a bug against that.
Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system):
dir=`mktemp -d` && cd $dir systemctl stop ovirt-ha-broker sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf) sdUUID=${sdUUID_line:7:36} conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_volume_UUID=${conf_volume_UUID_line:17:36} conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_image_UUID=${conf_image_UUID_line:16:36} dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf - cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave broker.conf # or edit broker.conf as you need tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID systemctl start ovirt-ha-broker
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <s.danzi@hawai.it <mailto:s.danzi@hawai.it>> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ Users mailing list Users@ovirt.org <mailto:Users@ovirt.org> http://lists.ovirt.org/mailman/listinfo/users
--------------030505080109080902020507 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> Your trick work fine! Thanks!<br> <br> Now I see that emails sent from brocker has "corrupted" headers:<br> <br> At the ent of message we can see:<br> <br> <pre>Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <a class="moz-txt-link-rfc2396E" href="mailto:20151109103337.D9C7D1260001@my.server.lan"><20151109103337.D9C7D1260001@my.server.lan></a> From: <a class="moz-txt-link-abbreviated" href="mailto:mysender@server.lan">mysender@server.lan</a> To: undisclosed-recipients:; From: <a class="moz-txt-link-abbreviated" href="mailto:mysender@server.lan">mysender@server.lan</a> To: <a class="moz-txt-link-abbreviated" href="mailto:myreceiver@server.lan">myreceiver@server.lan</a> Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance The state machine changed state.</pre> <br> <br> From and To are repeated twice. This cause that email client show correctly the sender,<br> an empty recipient and an empty subject.<br> <br> On message body I see everything after "To: undisclosed-recipients:;" <br> <br> <div class="moz-cite-prefix">Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:<br> </div> <blockquote cite="mid:CAN8-ONqJs3nMJQg5L8uRDt44S2ON5e_fbUdAEJ8-BBiK7i+T9A@mail.gmail.com" type="cite"> <div dir="ltr"><br> <div class="gmail_extra"><br> <div class="gmail_quote">On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <span dir="ltr"><<a moz-do-not-send="true" href="mailto:s.danzi@hawai.it" target="_blank">s.danzi@hawai.it</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <div bgcolor="#FFFFFF" text="#000000"><span class=""> <br> <br> <div><br> </div> <blockquote type="cite"> the content is:<br> <br> [email]<br> smtp-server=localhost<br> smtp-port=25<br> destination-emails=root@localhost<br> source-email=root@localhost<br> <br> [notify]<br> state_transition=maintenance|start|stop|migrate|up|down<br> <br> </blockquote> and is the default. My conf was lost during upgrade.<br> If I restart ovirt-ha-broker the broker.conf is replaced with the default<br> <br> </span> If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.<br> <br> Looking here <a moz-do-not-send="true" href="http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html" target="_blank">http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html</a><br> I understand that broker.conf is stored in another place and overwrite at runtime.</div> </blockquote> <div><br> </div> <div>The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI.</div> <div><br> </div> <div>The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage.</div> <div>I'm opening a bug against that.</div> <div><br> </div> <div>Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system):</div> </div> <div class="gmail_quote"><br> <font face="monospace, monospace">dir=`mktemp -d` && cd $dir<br> systemctl stop ovirt-ha-broker<br> sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf)<br> sdUUID=${sdUUID_line:7:36}<br> conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf)<br> conf_volume_UUID=${conf_volume_UUID_line:17:36}<br> conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf)<br> conf_image_UUID=${conf_image_UUID_line:16:36}<br> dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf -<br> cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave </font><span style="font-family:monospace,monospace">broker.conf </span><font face="monospace, monospace"># or edit broker.conf as you need </font></div> <div class="gmail_quote"><font face="monospace, monospace">tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID<br> </font><span style="font-family:monospace,monospace">systemctl start ovirt-ha-broker</span><br> </div> <div class="gmail_quote"> <div><br> </div> <div> </div> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <div bgcolor="#FFFFFF" text="#000000"><span class=""><br> <br> <blockquote type="cite"> <br> <div>Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:<br> </div> <blockquote type="cite"> <div dir="ltr">Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? <div>eventually make it anonymous if you prefer<br> <div><br> </div> <div><br> </div> </div> </div> <div class="gmail_extra"><br> <div class="gmail_quote">On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <span dir="ltr"><<a moz-do-not-send="true" href="mailto:s.danzi@hawai.it" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:s.danzi@hawai.it">s.danzi@hawai.it</a></a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work.<br> I think that broker.conf was lost during upgrade.<br> <br> I found this: <a moz-do-not-send="true" href="https://bugzilla.redhat.com/show_bug.cgi?id=1260757" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1260757</a><br> But I don't undertand how to change the configuration now.<br> _______________________________________________<br> Users mailing list<br> <a moz-do-not-send="true" href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br> <a moz-do-not-send="true" href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br> </blockquote> </div> <br> </div> </blockquote> <br> </blockquote> <br> </span></div> </blockquote> </div> <br> </div> </div> </blockquote> <br> <pre class="moz-signature" cols="72"> </pre> </body> </html> --------------030505080109080902020507--

On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Your trick work fine! Thanks!
Now I see that emails sent from brocker has "corrupted" headers:
At the ent of message we can see:
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:;
From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance
The state machine changed state.
Adding Roy and Martin, looks like a separate issue
From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject.
On message body I see everything after "To: undisclosed-recipients:;"
Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:
On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default
If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.
Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI.
The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage. I'm opening a bug against that.
Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system):
dir=`mktemp -d` && cd $dir systemctl stop ovirt-ha-broker sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf) sdUUID=${sdUUID_line:7:36} conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_volume_UUID=${conf_volume_UUID_line:17:36} conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_image_UUID=${conf_image_UUID_line:16:36} dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf - cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave broker.conf # or edit broker.conf as you need tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115: _Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID systemctl start ovirt-ha-broker
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi < <s.danzi@hawai.it> s.danzi@hawai.it> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ 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
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

Hi, can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed). Thanks -- Martin Sivak SLA / oVirt On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Your trick work fine! Thanks!
Now I see that emails sent from brocker has "corrupted" headers:
At the ent of message we can see:
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:;
From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance
The state machine changed state.
Adding Roy and Martin, looks like a separate issue
From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject.
On message body I see everything after "To: undisclosed-recipients:;"
Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:
On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default
If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.
Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI.
The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage. I'm opening a bug against that.
Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system):
dir=`mktemp -d` && cd $dir systemctl stop ovirt-ha-broker sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf) sdUUID=${sdUUID_line:7:36} conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_volume_UUID=${conf_volume_UUID_line:17:36} conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_image_UUID=${conf_image_UUID_line:16:36} dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf - cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave broker.conf # or edit broker.conf as you need tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID systemctl start ovirt-ha-broker
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ 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
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line. Martin On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote:
Hi,
can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed).
Thanks
-- Martin Sivak SLA / oVirt
On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Your trick work fine! Thanks!
Now I see that emails sent from brocker has "corrupted" headers:
At the ent of message we can see:
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:;
From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance
The state machine changed state.
Adding Roy and Martin, looks like a separate issue
From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject.
On message body I see everything after "To: undisclosed-recipients:;"
Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:
On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default
If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.
Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI.
The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage. I'm opening a bug against that.
Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system):
dir=`mktemp -d` && cd $dir systemctl stop ovirt-ha-broker sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf) sdUUID=${sdUUID_line:7:36} conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_volume_UUID=${conf_volume_UUID_line:17:36} conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_image_UUID=${conf_image_UUID_line:16:36} dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf - cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave broker.conf # or edit broker.conf as you need tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID systemctl start ovirt-ha-broker
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ 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
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

Hello, I've made no changes than upgrading oVirt from 3.5 to 3.6 Distro is a standard CenOS 7.1 Pyton is: python-2.7.5-18.el7_1.1.x86_64 state_transition.txt hasn't an empty line as first line. Il 09/11/2015 13.32, Martin Sivak ha scritto:
Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line.
Martin
On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote:
Hi,
can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed).
Thanks
-- Martin Sivak SLA / oVirt
On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Your trick work fine! Thanks!
Now I see that emails sent from brocker has "corrupted" headers:
At the ent of message we can see:
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:;
From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance
The state machine changed state.
Adding Roy and Martin, looks like a separate issue
From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject.
On message body I see everything after "To: undisclosed-recipients:;"
Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:
On Thu, Nov 5, 2015 at 7:10 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
the content is:
[email] smtp-server=localhost smtp-port=25 destination-emails=root@localhost source-email=root@localhost
[notify] state_transition=maintenance|start|stop|migrate|up|down
and is the default. My conf was lost during upgrade. If I restart ovirt-ha-broker the broker.conf is replaced with the default
If I don't restart ovirt-ha-broker, the broker.conf is silently replaced after a while.
Looking here http://lists.ovirt.org/pipermail/engine-commits/2015-June/022940.html I understand that broker.conf is stored in another place and overwrite at runtime.
The broker.conf is now on the shared storage (as other hosted-engine related configuration files) so that in the future they'll be easily editable from the web UI.
The issue here seams to be that the upgrade overwrite it with the default file before copying to the shared storage. I'm opening a bug against that.
Let's try to fix in your instance (please substitute '192.168.1.115:_Virtual_ext35u36' with the mount point on your system):
dir=`mktemp -d` && cd $dir systemctl stop ovirt-ha-broker sdUUID_line=$(grep sdUUID /etc/ovirt-hosted-engine/hosted-engine.conf) sdUUID=${sdUUID_line:7:36} conf_volume_UUID_line=$(grep conf_volume_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_volume_UUID=${conf_volume_UUID_line:17:36} conf_image_UUID_line=$(grep conf_image_UUID /etc/ovirt-hosted-engine/hosted-engine.conf) conf_image_UUID=${conf_image_UUID_line:16:36} dd if=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID 2>/dev/null| tar -xvf - cp /etc/ovirt-hosted-engine-ha/broker.conf.rpmsave broker.conf # or edit broker.conf as you need tar -cO * | dd of=/rhev/data-center/mnt/192.168.1.115:_Virtual_ext35u36/$sdUUID/images/$conf_image_UUID/$conf_volume_UUID systemctl start ovirt-ha-broker
Il 05/11/2015 18.44, Simone Tiraboschi ha scritto:
Can you please paste here the content of /var/lib/ovirt-hosted-engine-ha/broker.conf ? eventually make it anonymous if you prefer
On Thu, Nov 5, 2015 at 6:42 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
After upgrading from 3.5 to 3.6 Hosted engine notifications stop to work. I think that broker.conf was lost during upgrade.
I found this: https://bugzilla.redhat.com/show_bug.cgi?id=1260757 But I don't undertand how to change the configuration now. _______________________________________________ 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
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

Hello, there are a way to solve this? Il 09/11/2015 14.08, Stefano Danzi ha scritto:
Hello, I've made no changes than upgrading oVirt from 3.5 to 3.6 Distro is a standard CenOS 7.1
Pyton is: python-2.7.5-18.el7_1.1.x86_64
state_transition.txt hasn't an empty line as first line.
Il 09/11/2015 13.32, Martin Sivak ha scritto:
Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line.
Martin
On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote:
Hi,
can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed).
Thanks
-- Martin Sivak SLA / oVirt
On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Your trick work fine! Thanks!
Now I see that emails sent from brocker has "corrupted" headers:
At the ent of message we can see:
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:;
From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance
The state machine changed state.
Adding Roy and Martin, looks like a separate issue
From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject.
On message body I see everything after "To: undisclosed-recipients:;"
Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:

Hi Stefano, we haven't touched the code for this, but I see that also. If you are willing to experiment just a bit (it is revertable) you can apply the attached patch to /usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/broker/notifications.py. It seems to solve this for me. diff --git a/ovirt_hosted_engine_ha/broker/notifications.py b/ovirt_hosted_engin index 425822d..00e7e60 100644 --- a/ovirt_hosted_engine_ha/broker/notifications.py +++ b/ovirt_hosted_engine_ha/broker/notifications.py @@ -1,4 +1,4 @@ -from email.mime.text import MIMEText +from email.parser import Parser from email.utils import formatdate import socket @@ -24,7 +24,7 @@ def send_email(cfg, email_body): server = smtplib.SMTP(cfg["smtp-server"], port=cfg["smtp-port"]) server.set_debuglevel(1) to_addresses = EMAIL_SPLIT_RE.split(cfg["destination-emails"].strip()) - message = MIMEText(email_body) + message = Parser().parsestr(email_body) message["Date"] = formatdate(localtime=True) server.sendmail(cfg["source-email"], to_addresses, Then restart the ovirt-ha-broker service. In any case, please open a new bug so we can properly fix it in the nearest 3.6 update. Regards Martin Sivak On Wed, Dec 16, 2015 at 10:26 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Hello, there are a way to solve this?
Il 09/11/2015 14.08, Stefano Danzi ha scritto:
Hello, I've made no changes than upgrading oVirt from 3.5 to 3.6 Distro is a standard CenOS 7.1
Pyton is: python-2.7.5-18.el7_1.1.x86_64
state_transition.txt hasn't an empty line as first line.
Il 09/11/2015 13.32, Martin Sivak ha scritto:
Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line.
Martin
On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote:
Hi,
can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed).
Thanks
-- Martin Sivak SLA / oVirt
On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Your trick work fine! Thanks!
Now I see that emails sent from brocker has "corrupted" headers:
At the ent of message we can see:
Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Mon, 09 Nov 2015 11:33:37 +0100 Message-Id: <20151109103337.D9C7D1260001@my.server.lan> From: mysender@server.lan To: undisclosed-recipients:;
From: mysender@server.lan To: myreceiver@server.lan Subject: ovirt-hosted-engine state transition EngineUp-GlobalMaintenance
The state machine changed state.
Adding Roy and Martin, looks like a separate issue
From and To are repeated twice. This cause that email client show correctly the sender, an empty recipient and an empty subject.
On message body I see everything after "To: undisclosed-recipients:;"
Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:

I applied the patch adn the issue is solved now! Il 16/12/2015 11.43, Martin Sivak ha scritto:
Hi Stefano,
we haven't touched the code for this, but I see that also. If you are willing to experiment just a bit (it is revertable) you can apply the attached patch to /usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/broker/notifications.py. It seems to solve this for me.
diff --git a/ovirt_hosted_engine_ha/broker/notifications.py b/ovirt_hosted_engin index 425822d..00e7e60 100644 --- a/ovirt_hosted_engine_ha/broker/notifications.py +++ b/ovirt_hosted_engine_ha/broker/notifications.py @@ -1,4 +1,4 @@ -from email.mime.text import MIMEText +from email.parser import Parser from email.utils import formatdate import socket
@@ -24,7 +24,7 @@ def send_email(cfg, email_body): server = smtplib.SMTP(cfg["smtp-server"], port=cfg["smtp-port"]) server.set_debuglevel(1) to_addresses = EMAIL_SPLIT_RE.split(cfg["destination-emails"].strip()) - message = MIMEText(email_body) + message = Parser().parsestr(email_body) message["Date"] = formatdate(localtime=True) server.sendmail(cfg["source-email"], to_addresses,
Then restart the ovirt-ha-broker service.
In any case, please open a new bug so we can properly fix it in the nearest 3.6 update.
Regards
Martin Sivak
On Wed, Dec 16, 2015 at 10:26 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Hello, there are a way to solve this?
Il 09/11/2015 14.08, Stefano Danzi ha scritto:
Hello, I've made no changes than upgrading oVirt from 3.5 to 3.6 Distro is a standard CenOS 7.1
Pyton is: python-2.7.5-18.el7_1.1.x86_64
state_transition.txt hasn't an empty line as first line.
Il 09/11/2015 13.32, Martin Sivak ha scritto:
Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line.
Martin
On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote:
Hi,
can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed).
Thanks
-- Martin Sivak SLA / oVirt
On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> wrote: > Your trick work fine! Thanks! > > Now I see that emails sent from brocker has "corrupted" headers: > > At the ent of message we can see: > > Content-Type: text/plain; charset="us-ascii" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Date: Mon, 09 Nov 2015 11:33:37 +0100 > Message-Id: <20151109103337.D9C7D1260001@my.server.lan> > From: mysender@server.lan > To: undisclosed-recipients:; > > From: mysender@server.lan > To: myreceiver@server.lan > Subject: ovirt-hosted-engine state transition > EngineUp-GlobalMaintenance > > The state machine changed state. > > Adding Roy and Martin, looks like a separate issue
> From and To are repeated twice. This cause that email client show > correctly the sender, > an empty recipient and an empty subject. > > On message body I see everything after "To: undisclosed-recipients:;" > > Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:

That is good to hear. Sorry it took so long, can you please open a bug for us? Thanks Martin On Wed, Dec 16, 2015 at 12:04 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
I applied the patch adn the issue is solved now!
Il 16/12/2015 11.43, Martin Sivak ha scritto:
Hi Stefano,
we haven't touched the code for this, but I see that also. If you are willing to experiment just a bit (it is revertable) you can apply the attached patch to
/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/broker/notifications.py. It seems to solve this for me.
diff --git a/ovirt_hosted_engine_ha/broker/notifications.py b/ovirt_hosted_engin index 425822d..00e7e60 100644 --- a/ovirt_hosted_engine_ha/broker/notifications.py +++ b/ovirt_hosted_engine_ha/broker/notifications.py @@ -1,4 +1,4 @@ -from email.mime.text import MIMEText +from email.parser import Parser from email.utils import formatdate import socket
@@ -24,7 +24,7 @@ def send_email(cfg, email_body): server = smtplib.SMTP(cfg["smtp-server"], port=cfg["smtp-port"]) server.set_debuglevel(1) to_addresses = EMAIL_SPLIT_RE.split(cfg["destination-emails"].strip()) - message = MIMEText(email_body) + message = Parser().parsestr(email_body) message["Date"] = formatdate(localtime=True) server.sendmail(cfg["source-email"], to_addresses,
Then restart the ovirt-ha-broker service.
In any case, please open a new bug so we can properly fix it in the nearest 3.6 update.
Regards
Martin Sivak
On Wed, Dec 16, 2015 at 10:26 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Hello, there are a way to solve this?
Il 09/11/2015 14.08, Stefano Danzi ha scritto:
Hello, I've made no changes than upgrading oVirt from 3.5 to 3.6 Distro is a standard CenOS 7.1
Pyton is: python-2.7.5-18.el7_1.1.x86_64
state_transition.txt hasn't an empty line as first line.
Il 09/11/2015 13.32, Martin Sivak ha scritto:
Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line.
Martin
On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote:
Hi,
can you please tell us the Python version you are using? We are using the smtplib and email.mime.text standard libraries to send emails so this should not be our bug (unless the API changed).
Thanks
-- Martin Sivak SLA / oVirt
On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote: > > > On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> > wrote: >> >> Your trick work fine! Thanks! >> >> Now I see that emails sent from brocker has "corrupted" headers: >> >> At the ent of message we can see: >> >> Content-Type: text/plain; charset="us-ascii" >> MIME-Version: 1.0 >> Content-Transfer-Encoding: 7bit >> Date: Mon, 09 Nov 2015 11:33:37 +0100 >> Message-Id: <20151109103337.D9C7D1260001@my.server.lan> >> From: mysender@server.lan >> To: undisclosed-recipients:; >> >> From: mysender@server.lan >> To: myreceiver@server.lan >> Subject: ovirt-hosted-engine state transition >> EngineUp-GlobalMaintenance >> >> The state machine changed state. >> >> > Adding Roy and Martin, looks like a separate issue > > > >> From and To are repeated twice. This cause that email client show >> correctly the sender, >> an empty recipient and an empty subject. >> >> On message body I see everything after "To: >> undisclosed-recipients:;" >> >> Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:

Bug report here: https://bugzilla.redhat.com/show_bug.cgi?id=1292060 Il 16/12/2015 12.14, Martin Sivak ha scritto:
That is good to hear. Sorry it took so long, can you please open a bug for us?
Thanks
Martin
On Wed, Dec 16, 2015 at 12:04 PM, Stefano Danzi <s.danzi@hawai.it> wrote:
I applied the patch adn the issue is solved now!
Il 16/12/2015 11.43, Martin Sivak ha scritto:
Hi Stefano,
we haven't touched the code for this, but I see that also. If you are willing to experiment just a bit (it is revertable) you can apply the attached patch to
/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/broker/notifications.py. It seems to solve this for me.
diff --git a/ovirt_hosted_engine_ha/broker/notifications.py b/ovirt_hosted_engin index 425822d..00e7e60 100644 --- a/ovirt_hosted_engine_ha/broker/notifications.py +++ b/ovirt_hosted_engine_ha/broker/notifications.py @@ -1,4 +1,4 @@ -from email.mime.text import MIMEText +from email.parser import Parser from email.utils import formatdate import socket
@@ -24,7 +24,7 @@ def send_email(cfg, email_body): server = smtplib.SMTP(cfg["smtp-server"], port=cfg["smtp-port"]) server.set_debuglevel(1) to_addresses = EMAIL_SPLIT_RE.split(cfg["destination-emails"].strip()) - message = MIMEText(email_body) + message = Parser().parsestr(email_body) message["Date"] = formatdate(localtime=True) server.sendmail(cfg["source-email"], to_addresses,
Then restart the ovirt-ha-broker service.
In any case, please open a new bug so we can properly fix it in the nearest 3.6 update.
Regards
Martin Sivak
On Wed, Dec 16, 2015 at 10:26 AM, Stefano Danzi <s.danzi@hawai.it> wrote:
Hello, there are a way to solve this?
Il 09/11/2015 14.08, Stefano Danzi ha scritto:
Hello, I've made no changes than upgrading oVirt from 3.5 to 3.6 Distro is a standard CenOS 7.1
Pyton is: python-2.7.5-18.el7_1.1.x86_64
state_transition.txt hasn't an empty line as first line.
Il 09/11/2015 13.32, Martin Sivak ha scritto:
Btw, please check the template file (/etc/ovirt-hosted-engine-ha/notifications/state_transition.txt) and make sure it does not start with an empty line.
Martin
On Mon, Nov 9, 2015 at 1:25 PM, Martin Sivak <msivak@redhat.com> wrote: > Hi, > > can you please tell us the Python version you are using? We are using > the smtplib and email.mime.text standard libraries to send emails so > this should not be our bug (unless the API changed). > > Thanks > > -- > Martin Sivak > SLA / oVirt > > > On Mon, Nov 9, 2015 at 1:11 PM, Sandro Bonazzola <sbonazzo@redhat.com> > wrote: >> >> On Mon, Nov 9, 2015 at 11:44 AM, Stefano Danzi <s.danzi@hawai.it> >> wrote: >>> Your trick work fine! Thanks! >>> >>> Now I see that emails sent from brocker has "corrupted" headers: >>> >>> At the ent of message we can see: >>> >>> Content-Type: text/plain; charset="us-ascii" >>> MIME-Version: 1.0 >>> Content-Transfer-Encoding: 7bit >>> Date: Mon, 09 Nov 2015 11:33:37 +0100 >>> Message-Id: <20151109103337.D9C7D1260001@my.server.lan> >>> From: mysender@server.lan >>> To: undisclosed-recipients:; >>> >>> From: mysender@server.lan >>> To: myreceiver@server.lan >>> Subject: ovirt-hosted-engine state transition >>> EngineUp-GlobalMaintenance >>> >>> The state machine changed state. >>> >>> >> Adding Roy and Martin, looks like a separate issue >> >> >> >>> From and To are repeated twice. This cause that email client show >>> correctly the sender, >>> an empty recipient and an empty subject. >>> >>> On message body I see everything after "To: >>> undisclosed-recipients:;" >>> >>> Il 06/11/2015 20.01, Simone Tiraboschi ha scritto:
participants (4)
-
Martin Sivak
-
Sandro Bonazzola
-
Simone Tiraboschi
-
Stefano Danzi