On Fri, 2012-05-18 at 21:07 +0000, Spear, Raymond (Mission Critical
Linux) wrote:
> Thank you.  We were going crazy thinking we'ed set something up wrong.
> 
> Cobbler has the system.  it does the installs autotest asks it to do.
> 
> How do we "send" a profile from autotest?
> 
> We have this  in the  global_config.ini file:
> # Profile to install by default on your client machine
> fallback_profile: rhel6.2_server
> 
> is there a place/way to have autotest send over the profile to install?

Yes, but it's in the control file code. There is a branch that contains
patches to make it possible to set profilers from the web interface,
*but* it is work in progress, didn't reach next or master yet.

Meanwhile, you can specify the profile if you hand edit your control
file. The code of the server control file should be something like this:

def run(machine):
    host = hosts.create_host(machine)
    profile = 'rhel6.2'
    timeout = 3600
    host.machine_install(profile=profile, timeout=timeout)

job.parallel_simple(run, machines)

Meanwhile, we're working to make sure you can select profile on the web
interface.

Cheers,

Lucas

> Thanks,
> ray spear
> 
> -----Original Message-----
> From: Lucas Meneghel Rodrigues [mailto:[email protected]] 
> Sent: Friday, May 18, 2012 1:51 PM
> To: Spear, Raymond (Mission Critical Linux)
> Cc: Nishanth Aravamudan; [email protected]; cleber
> Subject: Re: [Autotest] [PATCH] install_server: fix repair
> 
> On Fri, 2012-05-18 at 18:46 +0000, Spear, Raymond (Mission Critical
> Linux) wrote:
> > I do not know if this is related or not.  I am running autotest with this 
> > commit as the "head"
> > 
> > commit 58ede1aed30d6545fb2b2be14f38b8dbdf4b33dc
> > Author: Lucas Meneghel Rodrigues <[email protected]>
> > Date:   Thu May 17 21:35:43 2012 -0300
> > 
> > 
> > When I do the server install "test" I get the following in the debug log:
> > 
> > 05/18 15:27:34 INFO |server_job:0117| START reinstall       reinstall       
> > timestamp=1337380054    localtime=May 18 15:27:34       
> > 05/18 15:27:34 INFO |server_job:0117|       START   ----    install 
> > timestamp=1337380054    localtime=May 18 15:27:34       tcd380-08.cce.hp.com
> > 05/18 15:27:34 INFO |server_job:0117|               GOOD    ----    
> > install.start   timestamp=1337380054    localtime=May 18 15:27:34       
> > tcd380-08.cce.hp.com
> > 05/18 15:27:34 INFO |install_se:0115| Installing machine 
> > tcd380-08.cce.hp.com with profile None (timeout 3600 s)
> > 05/18 15:35:52 DEBUG|install_se:0140| Cobbler got signaled that host 
> > tcd380-08.cce.hp.com installation is finished
> > 05/18 15:35:52 INFO |install_se:0152| Host tcd380-08.cce.hp.com 
> > installation resulted in different profile
> > 05/18 15:38:09 DEBUG|install_se:0140| Cobbler got signaled that host 
> > tcd380-08.cce.hp.com installation is finished
> > 05/18 15:38:09 INFO |install_se:0152| Host tcd380-08.cce.hp.com 
> > installation resulted in different profile
> > 
> > and the "test" then fails even though the SUT successfully installed 
> > (unfortunately twice).
> 
> Like Nisanth said, the failure is expected (the code expects profile None, 
> but when it's going to check, it's not None).
> 
> > Why is my profile "None".
> 
> Well, it's worth checking if tcd380-08.cce.hp.com exists in cobbler and does 
> have a profile set. 
> 
> I've followed the path of the functions going through the code, and it seems 
> that in the case the profile is None (precisely the case of the reinstall 
> test), the profile never ever gets set to a string. With the recent patch 
> that cleber made, we do verify whether at the end of the install the profile 
> is what 'we want', therefore, we check
> 
>             # Check if the installed profile matches what we asked for
>             installed_profile = self.server.get_system(system).get('profile')
>             install_successful = (installed_profile == profile)
> 
> With profile=None, install_successful can never be True.
> 
> So, what happens is that this extra verification step did not take into 
> account no profile at all would be provided.
> 
> I'll think of a fix and will send ASAP.
> 
> Cheers,
> 
> Lucas
> 
> > I have this in the global_config.ini file:
> > [INSTALL_SERVER]
> > # Install server type
> > type: cobbler
> > # URL for xmlrpc_server, such as http://foo.com/cobbler_api
> > xmlrpc_url: http://hilbert.cce.hp.com/cobbler_api
> > # XMLRPC user, in case the server requires authentication
> > user: cobbler
> > # XMLRPC password, in case the server requires authentication
> > password: mclinux
> > # Profile to install by default on your client machine
> > fallback_profile: rhel6.2_server
> > 
> > and my cobbler serve does have that profile.
> > 
> > 
> > Thanks, ray spear
> > 
> > -----Original Message-----
> > From: [email protected] 
> > [mailto:[email protected]] On Behalf Of Nishanth 
> > Aravamudan
> > Sent: Thursday, May 17, 2012 4:29 PM
> > To: [email protected]
> > Cc: [email protected]
> > Subject: [Autotest] [PATCH] install_server: fix repair
> > 
> > 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 <[email protected]>
> > 
> > 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 <[email protected]>
> > IBM Linux Technology Center
> > 
> > _______________________________________________
> > Autotest mailing list
> > [email protected]
> > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
> 
> 


_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to