initctl too old upstart check
Asked Answered
A

1

12

I am trying to do a syntax check on an upstart script using init-checkconf. However when I run it, it returns ERROR: version of /sbin/initctl too old.

I have no idea what to do, I have tried reinstalling upstart but nothing changes. This is being run from within a docker container (ubuntu:14.04) which might have something to do with it.

Aggravate answered 19/2, 2015 at 0:44 Comment(2)
Have you tried doing an apt-get update before reinstalling?Behm
I've done, update,upgrade and then reinstalled still the same error.Aggravate
R
10

I just ran into the same issue.

Looking in the container:

root@puppet-master:/# cat /sbin/initctl
#!/bin/sh
exit 0

I haven't tested it completly yet, but I added the following to my Dockerfile:

# Fix upstart
RUN rm -rf /sbin/initctl && ln -s /sbin/initctl.distrib /sbin/initctl

I thought this link explained it pretty good:

When your Docker container starts, only the CMD command is run. The only processes that will be running inside the container is the CMD command, and all processes that it spawns. That's why all kinds of important system services are not run automatically – you have to run them yourself.

Digging around some more, I found an official Ubuntu image containing a working version of upstart: https://registry.hub.docker.com/_/ubuntu-upstart/

Rhinoplasty answered 30/6, 2015 at 9:17 Comment(1)
Admittedly, one probably won't be using Ansible to manage the internals of running Docker containers in the real world, but this hack was driving me nuts for a while trying to fix a lab setup. That no-op initctl script causes Ansible's service module to misdiagnose the init module to use, so it doesn't function properly.Dentil

© 2022 - 2024 — McMap. All rights reserved.