[node-devel] [PATCH] Add network configure in emergency shell

Mike Burns mburns at redhat.com
Wed Dec 21 14:41:27 UTC 2011


Thanks for the patch.

Just so you're aware, the normal process for patch submissions is to
post patches to gerrit:

http://ovirt.org/wiki/Working_with_oVirt_Gerrit

It looks like you're working off a rather old version.  The
autoinstall_failed function was moved to ovirt-functions back in
September.

The current repo is at:  
Gitweb: http://gerrit.ovirt.org/gitweb?p=ovirt-node.git
giturl: http://gerrit.ovirt.org/p/ovirt-node.git

The actual commit that moved the function is here:

http://gerrit.ovirt.org/gitweb?p=ovirt-node.git;a=commit;h=a6f000ae812ee1ee4d762ba1f6c807968ac13170


Some initial comments on you're patch are below:

On Wed, 2011-12-21 at 15:47 +0800, taget at linux.vnet.ibm.com wrote:
> From: jimmy <taget at 163.com>
> 
> This patch is to configure networking before dropping in to emergency shell.
> By doing this, user can using ssh to connect host server.
> 
> Signed-off-by: Eli <taget at vnet.linux.ibm.com>
> ---
>  ovirt-firstboot |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/scripts/virt-firstboot b/scripts/ovirt-firstboot
> index ef0a071..48f31e6 100755
> --- a/scripts/ovirt-firstboot
> +++ b/scripts/ovirt-firstboot
> @@ -36,6 +36,9 @@ trap 'exit $?' 1 2 13 15
>  autoinstall_failed(){
>      log "Automatic installation failed. Please review console messages."
>      log "Press Enter to drop to emergency shell."
> +    /usr/libexec/ovirt-config-networking AUTO

Since changed to use python scripts instead of bash.  This should be
calling the network_auto function in network.py.  You can see how this
is called in ovirt-auto-install.py

> +    log "Configure root password : "
> +    /usr/bin/passwd

This will set the root password, but ssh password authentication is
disabled by default, so you need to enable that too.

>      read < /dev/console
>      bash < /dev/console
>  }


The overall concept of being able to ssh in when auto-installation fails
is good, but it's not solved completely here.  Assuming I understand
correctly, you're looking to be able to start the installation process
and then ssh in to debug it if/when it fails.  You're current patch
doesn't remove the need for console access since you need to be able to
type the password anyway to set it.

My recommendation would be to:

1.  get the updated repo
2.  work in ovirt-auto-install.py to configure networking in the else
condition
3.  use existing means to set passwords and ssh password authentication
        you can set root password with rootpw commandline option
        you can set admin password with adminpw commandline option
        you can enable ssh password auth with ssh_pwauth option
        These options are documented in ovirt-early where they're
        parsed.




More information about the node-devel mailing list