init-checkconf incorrectly passes an upstart script as valid

Bug #1546702 reported by Janek Bogucki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I validate my upstart script with -v (an unknown option) the script is reported as valid.

Without -v the script is reported as invalid but no information is provided about the cause of the fault.

  $ init-checkconf ../packages/kafka/kafka-broker.upstart.conf
  ERROR: File ../packages/kafka/kafka-broker.upstart.conf: syntax invalid:

  $ init-checkconf -v ../packages/kafka/kafka-broker.upstart.conf
  init-checkconf: unrecognised option '-v'
  File ../packages/kafka/kafka-broker.upstart.conf: syntax ok

This is my upstart script,

# Ubuntu upstart file at /etc/init/kafka-broker.conf

description "Kafka Broker"

limit nofile 32768 32768

start on runlevel [2345]
stop on [!12345]

respawn
respawn limit 2 5

env CONFIG_HOME=/var/lib/kafka/config
env KAFKA_HOME=/var/lib/kafka
umask 007

kill timeout 300

setuid kafka
setgid kafka

script
  exec $KAFKA_HOME/bin/kafka-server-start.sh $CONFIG_HOME/server.properties
end script

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: upstart 1.12.1-0ubuntu4.2
ProcVersionSignature: Ubuntu 3.19.0-47.53~14.04.1-generic 3.19.8-ckt10
Uname: Linux 3.19.0-47-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Feb 17 19:08:28 2016
InstallationDate: Installed on 2015-10-21 (119 days ago)
InstallationMedia: Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)
UpstartBugCategory: Session
UpstartRunningSessionCount: 1
UpstartRunningSessionVersion: init (upstart 1.12.1)
UpstartRunningSystemVersion: init (upstart 1.12.1)

Revision history for this message
Janek Bogucki (janekdb) wrote :
description: updated
Revision history for this message
Janek Bogucki (janekdb) wrote :

The following does not solve the problem of init-checkconf incorrectly reporting an invalid script as valid when an unknown option is included but it does solve the problem of the script being invalid.

This is invalid,

script
exec $KAFKA_HOME/bin/kafka-server-start.sh $CONFIG_HOME/server.properties
end script

This is valid,

script
  exec $KAFKA_HOME/bin/kafka-server-start.sh $CONFIG_HOME/server.properties
end script

When the whitespacing is incorrect a more useful error message would be useful.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.