On Mon, Mar 11, 2013 at 2:03 PM, Lucas Meneghel Rodrigues
<[email protected]> wrote:
> On Fri, Mar 8, 2013 at 9:44 PM, Nishanth Aravamudan
> <[email protected]> wrote:
>> Locally, I always want to reinstall hosts when I run a job. I imagine
>> others might also like this. Given that reinstallation depends on
>> profile availability (of which, "Do_not_install" and "N/A" are valid
>> depending on the configuration), can we just always reinstall like the
>> following?

I was taking a better look at the reinstall function:

server/hosts/remote.py:

    def machine_install(self, profile='', timeout=None):
        """
        Install a profile using the install server.

        @param profile: Profile name inside the install server database.
        """
        server_info = get_install_server_info()
        if install_server_is_configured():
            if not profile:
                profile = self.profile
            if profile == 'Do_not_install':
                return
            num_attempts = int(server_info.get('num_attempts', 2))
            ServerInterface = self.INSTALL_SERVER_MAPPING[server_info['type']]
            server_interface = ServerInterface(**server_info)
            server_interface.install_host(self, profile=profile,
                                          timeout=timeout,
                                          num_attempts=num_attempts)
        else:
            raise error.AutoservUnsupportedError("Empty install server setup "
                                                 "on global_config.ini")

So this means that by default, with no install server configured, jobs
will raise an AutoservUnsupportedError. This has to be fixed before
this 'always reinstalls hosts' gets in.

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to