On Thu, Mar 8, 2012 at 8:36 PM, Nishanth Aravamudan
<n...@linux.vnet.ibm.com> wrote:
> Hi,
>
> So one gap in the current implementation of the install server
> functionality I noticed is that the end-user still has to fiddle with
> the backend cobbler server when they want to install a different than
> the currently selected profile. It seems like the end user should be
> able to select the profile to use on a host-by-host basis.
>
> Some implementation notes:
>
> - The link between autotest and cobbler is established by the label of
>  the autotest host being found in the comment field for the profile in
>  cobbler.

I gave a look at the patchset, and I do like the fact that you
minimized intrusion in the current code. I need to go over it again.
What I have done is, pick up all the patches you've sent (including
the couple of corrections you've sent later), and made a pull request,
so I could review the patches and apply static code analysis in it
more easily:

https://github.com/autotest/autotest/pull/240

So you're welcome to open your own pull request, that I could then use
as a base for reviewing and do all the back and forth necessary to get
this feature upstream. I consider it a good proof of concept, and I'd
like to work with you to get this upstream. Thank you!

> - Many spots still need to be parameterized on the presence of the
>  xmlrpc URL in the global config

I've noticed we could factor that code out to a library function.
Also, we could have a similar function to verify whether the install
server is up and running.

> - In my environment, I always want to reinstall the machine before
>  running any tests, so I've modified the default client and server
>  control files to run machine_install. Perhaps this makes sense to add
>  via a global config option -- always_reinstall_host or something. If
>  that is added, then I think the verify-before-job job should be
>  avoided if that option is set. Such an option also only makes sense if
>  xmlrpc_url is set.

Like we have talked over irc, I'm not sure whether such an option is a
good idea, but I'm not ruling it out completely. It might have value
to just install the test machines in a compulsory way, although it
seems excessive to me.

> diff --git a/frontend/afe/control_file.py b/frontend/afe/control_file.py
> index d9df3e6..7f33717 100644
> --- a/frontend/afe/control_file.py
> +++ b/frontend/afe/control_file.py
> @@ -85,6 +85,7 @@ def step_init():
>     # a host object we use solely for the purpose of finding out the booted
>     # kernel version, we use machines[0] since we already check that the same
>     # kernel has been booted on all machines
> +    step0()
>     if len(kernel_list) > 1:
>         kernel_host = hosts.create_host(machines[0])
>
> @@ -107,6 +108,12 @@ def step_init():
>             job.automatic_test_tag = kernel_host.get_kernel_ver()
>         step_test()
>
> +def step0():
> +    def run(machine):
> +        host = hosts.create_host(machine, initialize=False)
> +        job.run_test('reinstall', host=host, disable_sysinfo=True)
> +
> +    job.parallel_simple(run, machines)
>
>  def step_test():
>  """ % CLIENT_KERNEL_TEMPLATE
> diff --git a/server/control_segments/client_wrapper 
> b/server/control_segments/client_wrapper
> index 08e6018..c4c71cb 100644
> --- a/server/control_segments/client_wrapper
> +++ b/server/control_segments/client_wrapper
> @@ -3,6 +3,7 @@ at = autotest_remote.Autotest()
>
>  def run_client(machine):
>     host = hosts.create_host(machine)
> +    host.machine_install(timeout=3600)
>     host.log_kernel()
>     at.run(control, host=host)
>
> I'm not sure if the division of the patches is accurate yet, but what I
> have does compile and runs.
>
> 1/9: database: add profile column to afe_host_queue_entries table
> 2/9: frontend: add XMLRPC lookup of profile information from install server 
> to get_hosts
> 3/9: frontend: add profiles parameter to job creation interfaces
> 4/9: hosts: add installable_host class
> 5/9: autoserv: append profile selection to hostname parameter
> 6/9: frontend/afe: add current profile to host view
> 7/9: frontend/afe: add profile used to job view
> 8/9: frontend/afe: add listbox widget support
> 9/9: frontend/afe: add profile to host tables
>
> Thanks,
> Nish
>
> --
> 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



-- 
Lucas
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to