[Ovirt-devel] Bugs with ovirt-awake

Darryl L. Pierce dpierce at redhat.com
Tue Mar 9 16:13:25 UTC 2010


On Tue, Mar 09, 2010 at 04:25:31PM +0100, Arthur CLEMENT wrote:
> The ovirt-awake script is no more in the path, only in /etc/init.d/ so the 
> ovirt script return a command not found.
> I did little dirty fix in /etc/init.d/ovirt :
> 
> diff --git a/scripts/ovirt b/scripts/ovirt
> index 160c3d3..d9e50a2 100755
> --- a/scripts/ovirt
> +++ b/scripts/ovirt
> @@ -41,7 +41,7 @@ ovirt_start() {
>          if [ -s $krb5_tab ]; then
>            krb5_tab=
>          fi
> -        ovirt-awake start $SRV_HOST $SRV_PORT $krb5_tab
> +        /etc/init.d/ovirt-awake start $SRV_HOST $SRV_PORT $krb5_tab
>          if [ $? -ne 0 ]; then
>              log "ovirt-awake failed"; return 1
>          fi

ovirt-awake is no longer a command line tool but instead should be
working as a separate service. It's the first one that should run in the
chain of ovirt-specific services.

Also, it doesn't handle command line arguments any longer but is instead
driven by the DNS SRV records for the management server and the contents
of the /etc/sysconfig/node-config file.

> diff --git a/scripts/ovirt-awake b/scripts/ovirt-awake
> index c6a6902..8983ef1 100755
> --- a/scripts/ovirt-awake
> +++ b/scripts/ovirt-awake
> @@ -68,7 +68,7 @@ ovirt_startup () {
> 
>      if [[ -n "${mgmthost}" ]] && [[ -n "${mgmtport}" ]]; then
>          # log "Notifying oVirt management server: ${mgmthost}:${mgmtport}"
> -        exec 3<> /dev/tcp/$mgmthost:$mgmtport
> +        exec 3<>/dev/tcp/$mgmthost/$mgmtport
> 
>          connect-to-server
>          receive_text
>          if [ $REPLY == "HELLO?" ]; then
> -            logo "Starting wakeup conversation."
> +            log "Starting wakeup conversation."
>              send_text "HELLO!"
>              receive_text
> 
> 
> 
> 
> I still have this error :
> 
> Starting ovirt-awake: /etc/init.d/ovirt-awake: line 73: connect-to-server: 
> command not found

D'oh! Yeah, that call to connect-to-server should have been removed
since it's replaced by the previous line to connection 3 to the TCP
socket.

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20100309/24339850/attachment.sig>


More information about the ovirt-devel mailing list