[ovirt-users] Solved: Re: 3.5 to 3.6 upgrade stuck

Robert Story rstory at tislabs.com
Fri Jul 22 02:11:04 UTC 2016


On Thu, 21 Jul 2016 16:04:41 -0400 Robert wrote:
RS> Thread-1::config::278::ovirt_hosted_engine_ha.broker.notifications.Notifications.config
RS>      ::(refresh_local_conf_file) local conf file was correctly written
RS> 
RS> And then .... nothing. It just hangs. Nothing more is logged Thread-1.

So I started digging around the the python source, starting from
refresh_local_conf_file. I ended up in ./broker/notifications.py, in
send_email. I added some logging:

def send_email(cfg, email_body):
    """Send email."""

    logger = logging.getLogger("%s.Notifications" % __name__)

    try:
        logger.debug("#### setting up smtp 1")
        server = smtplib.SMTP(cfg["smtp-server"], port=cfg["smtp-port"])
        logger.debug("#### setting up smtp 2")
        ...

Now the final messages are:

Thread-1::DEBUG::2016-07-21 21:35:05,280::config::278::
  ovirt_hosted_engine_ha.broker.notifications.Notifications.config::
  (refresh_local_conf_file) local conf file was correctly written
Thread-1::DEBUG::2016-07-21 21:35:05,282::notifications::27::
  ovirt_hosted_engine_ha.broker.notifications.Notifications::
  (send_email) #### setting up smtp 1


So the culprit is:

        server = smtplib.SMTP(cfg["smtp-server"], port=cfg["smtp-port"])

Note that this does actually send the email - 2 minutes later.

So I tried:

  $ telnet localhost 25
  Trying ::1...

which hung, and a little bell went off in my brain...

After changing /etc/hosts from:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

to

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost6 localhost6.localdomain6

localhost resolves to 127.0.0.1, the delay is gone, and everything is fine.

I don't want to update /etc/hosts on each host. Is there somewhere I can
edit the broker config for mail?


Robert

-- 
Senior Software Engineer @ Parsons
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160721/0e41c6b2/attachment-0001.sig>


More information about the Users mailing list