# HG changeset patch # User Jonathan Ludlam # Date 1268826097 0 # Node ID 154cf67342c22f2bd46bc0469309cd522bd33246 # Parent 5b343db0055dda379733d518826b36465114e34b CA-36244: Broadcast the management_ip_cond condition variable unconditionally in the 'on_dom0_networking_change' - the only thing waiting on this is immediately above, where we're waiting for a management IP. If the IP obtained by DHCP was the same as we had before, the old logic wouldn't have signalled, and therefore the loop would never have woken. Signed-off-by: Jon Ludlam diff -r 5b343db0055d -r 154cf67342c2 ocaml/xapi/xapi_mgmt_iface.ml --- a/ocaml/xapi/xapi_mgmt_iface.ml Tue Mar 16 22:29:33 2010 +0000 +++ b/ocaml/xapi/xapi_mgmt_iface.ml Wed Mar 17 11:41:37 2010 +0000 @@ -90,17 +90,18 @@ debug "Changing Host.address in database to: %s" ip; Db.Host.set_address ~__context ~self:localhost ~value:ip; debug "Refreshing console URIs"; - Dbsync_master.refresh_console_urls ~__context; - debug "Signalling anyone waiting for the management IP address to change"; - Mutex.execute management_ip_mutex - (fun () -> Condition.broadcast management_ip_cond) + Dbsync_master.refresh_console_urls ~__context end | None -> if Db.Host.get_address ~__context ~self:localhost <> "" then begin debug "Changing Host.address in database to: '' (host has no management IP address)"; Db.Host.set_address ~__context ~self:localhost ~value:"" end - end + end; + debug "Signalling anyone waiting for the management IP address to change"; + Mutex.execute management_ip_mutex + (fun () -> Condition.broadcast management_ip_cond) + let change_ip interface ip = Mutex.execute management_m (fun () -> change (interface, ip))