Networking with Upstart and sysvinit scripts

Christian Roessner c at roessner-network-solutions.com
Fri Jan 27 20:01:09 UTC 2012


Hi,

first of all this is my very first mail here to this list and I am completely unsure, if I am right here. So if this message does not address the right people, I say sorry for this.

My problem is starting from services with Upstart and sysvinit. I am a postmaster and managing several mail servers. And for some of them, I really do have boot issues with Upstart.

To explain:

I have many IPv4 and IPv6 addresses for one server. The problem starts with /etc/network/interfaces. No matter if I put several iface ethX inet(6) static blocks into the config file or adding post-up/pre-down scripts with iproute, it happens every two of three boots, that not all of the addresses were set up correctly. And this causes many services to fail on startup.

As far as I know, this interfaces file is laded through Upstart. And now there is a second problem: Services like amaivs, saslauthd, slapd are started through init.d. And it happens that they fail on startup, because the network has not yet finished being set.

Now there are some services in init (not init.d) that normally depend on started services in init.d. For example dovecot. I also have ported postfix to use Upstart. Maybe Scott and Clint remember the discussion together with Wietse Vennema, where we tried to solve this problem, starting postfix with Upstart.

Now my question:

What can I do to have services in init and init.d to really wait until the _whole_ network was set up correctly? And how can I make dependencies between these to worlds?

Here is some header from postfix:

start on (started opendkim-sign   and
          started opendkim-verify and
          started amavisd-milter)
stop on runlevel [!2345]

Here you can see missing deps. Amavisd and slapd are missing. Also saslauthd and I do not know how to solve this.

saslauthd for example _always_ fails to start, because it requires a second IP on this host, which at startup seems not to be ready and therefor the service can not connect to LDAP, which in turn leads to authentication issues for my customers. Same goes with amavisd and its milter service.

So right now, I am not so very happy with this hybrid style (if I may call it so).

Why contacting devel? Maybe I can tell, what I would expect and someone can tell me, if this is possible with Upstart and how, or if there needs to be done fixes to Upstart.

What would I expect:

1. Starting networking and defining some kind of NETWORK_DONE=yes event or environment thing

2. Starting services in rc which can track this event and maybe raise events for Upstart itself.

3. Services collect these last events from rc and have some way to intercommunicate with each other. Don't know how to explain this better.

I give you a list of services that make trouble:

/etc/network/interfaces, slapd, amavisd, amavisd-milter, saslauthd, postfix, dovecot, clamav-daemon and any kind of milter (several developed by myself; all started though Upstart).

If you like and can help me to resolve this problem, I really would be happy :)

By the way: I am only using LTS versions in production environments. So I am talking about Ubuntu Lucid Lynx right now.

Best wishes and thanks in advance
Christian
---
Roessner-Network-Solutions
Bachelor of Science Informatik
Nahrungsberg 81, 35390 Gießen
F: +49 641 5879091, M: +49 176 93118939
USt-IdNr.: DE225643613
http://www.roessner-network-solutions.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3880 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20120127/fc07f090/attachment.bin>


More information about the upstart-devel mailing list