FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 11-27-2009, 11:51 AM
Jarl Friis
 
Default Debugging init scripts.

Hi. I am using Karmic Koala

I have written some innit scripts to start and stop some virtual
machines.

The top of the file looks like this.
#!/bin/sh
#
# Init script for one libvirtd domain
#
# (c) 2009 Jarl Friis <jarl@gavia.dk>
# based on http://www.linux-kvm.com/content/stop-script-running-vms-using-virsh#comment-511
#
### BEGIN INIT INFO
# Provides: kvm-rcs-poseidon
# Required-Start: $kvm $qemu-kvm $libvirtd
# Required-Stop: $kvm $qemu-kvm $libvirtd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starting/Saving, Stopping/Restoring kvm-rcs-<VIRSH DOMAIN> KVM guest.
# Description: Starting/Saving, Stopping/Restoring KVM guest.
### END INIT INFO#

I can send the whole file if you are interested.

I have put in into /etc/init.d/ and the run update-rc.d apropriately,
so I have

$ ls -l /etc/rc*.d/*kvm-rcs-poseidon*
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc0.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc1.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc2.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc3.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc4.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc5.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc6.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon

However the scripts does not seem to run at boot. How can I debug to
figure out what is going on.

There seems to be a problem that prevents logging of startup activity,
hence I can see no trace of problem in this script.

What is the best approach forward to find the problem?

Jarl


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 11-27-2009, 12:15 PM
Paul Schulz
 
Default Debugging init scripts.

Hi Jarl,

Have a look into the 'upstart' scripts, located in /etc/init for
examples of new upstart configuration scripts.
see: http://upstart.ubuntu.com/wiki/

On Fri, Nov 27, 2009 at 11:21 PM, Jarl Friis <jarl@gavia.dk> wrote:
> Hi. I am using Karmic Koala
>
> I have written some innit scripts to start and stop some virtual
> machines.
>
> The top of the file looks like this.
> #!/bin/sh
> #
> # Init script for one libvirtd domain
> #
> # (c) 2009 Jarl Friis <jarl@gavia.dk>
> # based on http://www.linux-kvm.com/content/stop-script-running-vms-using-virsh#comment-511
> #
> ### BEGIN INIT INFO
> # Provides: * * * * *kvm-rcs-poseidon
> # Required-Start: * *$kvm $qemu-kvm $libvirtd
> # Required-Stop: * * $kvm $qemu-kvm $libvirtd
> # Default-Start: * * 2 3 4 5
> # Default-Stop: * * *0 1 6
> # Short-Description: Starting/Saving, Stopping/Restoring kvm-rcs-<VIRSH DOMAIN> KVM guest.
> # Description: * * * Starting/Saving, Stopping/Restoring KVM guest.
> ### END INIT INFO#
>
> I can send the whole file if you are interested.
>
> I have put in into /etc/init.d/ and the run update-rc.d apropriately,
> so I have
>
> $ ls -l /etc/rc*.d/*kvm-rcs-poseidon*
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc0.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc1.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc2.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc3.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc4.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc5.d/S21kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
> lrwxrwxrwx 1 root root 26 2009-11-27 12:18 /etc/rc6.d/K19kvm-rcs-poseidon -> ../init.d/kvm-rcs-poseidon
>
> However the scripts does not seem to run at boot. How can I debug to
> figure out what is going on.
>
> There seems to be a problem that prevents logging of startup activity,
> hence I can see no trace of problem in this script.
>
> What is the best approach forward to find the problem?
>
> Jarl
>
>
> --
> ubuntu-server mailing list
> ubuntu-server@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam
>

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 11-27-2009, 06:54 PM
Jarl Friis
 
Default Debugging init scripts.

Hi Paul.

Paul Schulz <paul@mawsonlakes.org> writes:

> Hi Jarl,
>
> Have a look into the 'upstart' scripts, located in /etc/init for
> examples of new upstart configuration scripts.
> see: http://upstart.ubuntu.com/wiki/

Thanks a lot, that clears up things that I was not aware of...

1) The script that I have written is old sys-v style script.
2) upstarts takes a completely different approach to the boot process
using configuration files.
3) It seems that upstarts have backward compatibility configuration
file to wrap old sys-v boot scripts.

So now I have two options
1) spend lots of time learning pure upstart configuration files.
2) continue to use my sys-v style scripts.

I think I stick to the second choice. Yet I still wonder how I can
trace any activity in my scripts. For example are they executed at
all?, and if not, why not? If they fail, how can I figure uot why
they fail?

Any help is appreciated. I may sound a complete newbie, but actually I
am not, I am just completely new to upstart, and I feel completely
lost without logging facility.

Jarl

--
Jarl Friis
Gavia Technologies ApS
Omøgade 8, 2.sal
2100 København Ø.
Denmark
Phone: +45 26 13 20 90
E-mail: jarl@gavia.dk
LinkedIn: www.linkedin.com/in/jarlfriis


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 08:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org