touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #71946
[Bug 1446577] [NEW] upstart feedback is confusing when .conf file contains syntax errors
Public bug reported:
When an `upstart` script in `/etc/init/` contains a line like
`NAME=value` the feedback of `sudo start myservice` fails with a
feedback that indicates that the service doesn't exist, rather than
telling that it contains a syntax error. Example output:
$ start myservice
start: Unknown job: myservice
$ service myservice start
myservice: unrecognized service
An example of a failing script is
# myservice - myservice job file
description "my service description"
author "Me <myself@xxxxx>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect fork
# Run before process
pre-start script
[ -d /var/run/myservice ] || mkdir -p /var/run/myservice
echo "Put bash code here"
end script
# Start the process
exec echo "Hello world!"
After fixing the syntax error the `start` and `service` command refuse
to start the service.
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: upstart 1.13.2-0ubuntu2
Uname: Linux 4.0.0-040000-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.14.7-0ubuntu8.4
Architecture: amd64
Date: Tue Apr 21 13:01:42 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-04-20 (0 days ago)
InstallationMedia: Ubuntu-Server 14.10 "Utopic Unicorn" - Release amd64 (20141022.2)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcKernelCmdline: BOOT_IMAGE=/vmlinuz-4.0.0-040000-generic root=/dev/mapper/root-root ro rootflags=subvol=@ nomdmonddf nomdmonisw
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)
UpstartBugCategory: System
UpstartRunningSystemVersion: init (upstart 1.13.2)
modified.conffile..etc.at.deny: [inaccessible: [Errno 13] Permission denied: '/etc/at.deny']
modified.conffile..etc.init.d.squid3: [modified]
modified.conffile..etc.init.squid3.conf: [modified]
modified.conffile..etc.libvirt.qemu.conf: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu.conf']
modified.conffile..etc.squid3.squid.conf: [modified]
modified.conffile..etc.sudoers.d.zfs: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/zfs']
mtime.conffile..etc.init.d.squid3: 2015-04-20T19:38:26.086956
mtime.conffile..etc.init.squid3.conf: 2015-04-20T19:41:30.667871
mtime.conffile..etc.squid3.squid.conf: 2015-04-20T19:27:33.523720
** Affects: upstart (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug third-party-packages utopic
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/1446577
Title:
upstart feedback is confusing when .conf file contains syntax errors
Status in upstart package in Ubuntu:
New
Bug description:
When an `upstart` script in `/etc/init/` contains a line like
`NAME=value` the feedback of `sudo start myservice` fails with a
feedback that indicates that the service doesn't exist, rather than
telling that it contains a syntax error. Example output:
$ start myservice
start: Unknown job: myservice
$ service myservice start
myservice: unrecognized service
An example of a failing script is
# myservice - myservice job file
description "my service description"
author "Me <myself@xxxxx>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect fork
# Run before process
pre-start script
[ -d /var/run/myservice ] || mkdir -p /var/run/myservice
echo "Put bash code here"
end script
# Start the process
exec echo "Hello world!"
After fixing the syntax error the `start` and `service` command refuse
to start the service.
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: upstart 1.13.2-0ubuntu2
Uname: Linux 4.0.0-040000-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
ApportVersion: 2.14.7-0ubuntu8.4
Architecture: amd64
Date: Tue Apr 21 13:01:42 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-04-20 (0 days ago)
InstallationMedia: Ubuntu-Server 14.10 "Utopic Unicorn" - Release amd64 (20141022.2)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcKernelCmdline: BOOT_IMAGE=/vmlinuz-4.0.0-040000-generic root=/dev/mapper/root-root ro rootflags=subvol=@ nomdmonddf nomdmonisw
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)
UpstartBugCategory: System
UpstartRunningSystemVersion: init (upstart 1.13.2)
modified.conffile..etc.at.deny: [inaccessible: [Errno 13] Permission denied: '/etc/at.deny']
modified.conffile..etc.init.d.squid3: [modified]
modified.conffile..etc.init.squid3.conf: [modified]
modified.conffile..etc.libvirt.qemu.conf: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu.conf']
modified.conffile..etc.squid3.squid.conf: [modified]
modified.conffile..etc.sudoers.d.zfs: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/zfs']
mtime.conffile..etc.init.d.squid3: 2015-04-20T19:38:26.086956
mtime.conffile..etc.init.squid3.conf: 2015-04-20T19:41:30.667871
mtime.conffile..etc.squid3.squid.conf: 2015-04-20T19:27:33.523720
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/1446577/+subscriptions
Follow ups
References