If we do not pass a profile to install_host(), we end up un-setting the host's profile in cobbler, which causes subsequent sync's to throw exceptions. It makes sense in this situation to use the existing profile from the system. But rather than call this repeatedly, pull it up before we start the install.
Found during verify/repair testing. Signed-off-by: Nishanth Aravamudan <n...@us.ibm.com> diff --git a/server/hosts/install_server.py b/server/hosts/install_server.py index 9a6c013..5a4a637 100644 --- a/server/hosts/install_server.py +++ b/server/hosts/install_server.py @@ -109,6 +109,10 @@ class CobblerInterface(object): # 1 hour of timeout by default timeout = 3600 + system, system_handle = self.get_system_handle(host) + if profile is None: + profile = self.server.get_system(system).get('profile') + host.record("START", None, "install", host.hostname) host.record("GOOD", None, "install.start", host.hostname) logging.info("Installing machine %s with profile %s (timeout %s s)", @@ -122,7 +126,6 @@ class CobblerInterface(object): (time_elapsed < timeout)): self._set_host_profile(host, profile) - system, system_handle = self.get_system_handle(host) self.server.power_system(system_handle, 'reboot', self.token) installations_attempted += 1 -- Nishanth Aravamudan <n...@us.ibm.com> IBM Linux Technology Center _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest