@@ -165,15 +165,6 @@ let wait_for_management_ip ~__context =
165165 done ; end );
166166 ! ip
167167
168- let update_getty () =
169- (* Running update-issue service on best effort basis *)
170- try
171- ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. update_issue_script [] );
172- ignore (Forkhelpers. execute_command_get_output ! Xapi_globs. kill_process_script [" -q" ; " -HUP" ; " mingetty" ; " agetty" ])
173- with e ->
174- debug " update_getty at %s caught exception: %s"
175- __LOC__ (Printexc. to_string e)
176-
177168let on_dom0_networking_change ~__context =
178169 debug " Checking to see if hostname or management IP has changed" ;
179170 (* Need to update:
@@ -192,17 +183,19 @@ let on_dom0_networking_change ~__context =
192183 Db.Host. set_name_label ~__context ~self: localhost ~value: new_hostname;
193184 begin match Helpers. get_management_ip_addr ~__context with
194185 | Some ip ->
186+ (* WARNING: this does NOT detect IP address changes that happen before
187+ xapi's startup (see CA-242706) *)
195188 if Db.Host. get_address ~__context ~self: localhost <> ip then begin
196189 debug " Changing Host.address in database to: %s" ip;
197190 Db.Host. set_address ~__context ~self: localhost ~value: ip;
198191 debug " Refreshing console URIs" ;
199- update_getty () ;
192+ Helpers. update_getty () ;
200193 Dbsync_master. refresh_console_urls ~__context
201194 end
202195 | None ->
203196 if Db.Host. get_address ~__context ~self: localhost <> " " then begin
204197 debug " Changing Host.address in database to: '' (host has no management IP address)" ;
205- update_getty () ;
198+ Helpers. update_getty () ;
206199 Db.Host. set_address ~__context ~self: localhost ~value: " "
207200 end
208201 end ;
0 commit comments