wait_for_login() related update

Redhat ID: 1080834



On 09/12/2014 08:26 PM, Tom Zhou wrote:
>
> In virttest/virt_vm.py:
>
> >          if serial or restart_network:
> >              # Try to login via serila console
> > -            return self.wait_for_serial_login(timeout, internal_timeout,
> > -                                              restart_network,
> > -                                              username, password)
> > +            session = self.wait_for_serial_login(timeout, internal_timeout,
> > +                                                 restart_network,
> > +                                                 username, password)
> > +            if restart_network:
> > +                # Try one more time after restarting guest network.
> > +                session = self.login(nic_index, internal_timeout, username,
>
> Hey Feng,
> Since the latest comment was add in July, I don't know the status of 
> this PR. If you still want to merge it into master, I'd suggest you 
> thinking about this part of code, the propose of this lines is to 
> provide a stable session even though the network is unstable, but the 
> login would still fail if the restart_guest_network function failed, 
> though it's rare, it would happen when meeting nic driver problem and 
> will cause non-network-related case failed.
>
Hi Tom

Thanks for your comments.

Yes, this situation may happen.  Add this part just want to make sure 
guest's network works. Or we may lost some network related bug.

After some discuss, we think catch the bug is more import than get a 
stable session. So we set restart_network to false.  And will not try to 
restart guest's network after this patch.


Thanks.

Feng Yang






> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/autotest/virt-test/pull/1764/files#r17475780>.
>