plugins cannot error like juju commands

Bug #1382063 reported by Aaron Bentley on 2014-10-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Medium
Unassigned
juju-core
Medium
Unassigned

Bug Description

When a juju command errors, it exits with a specific exit status. When a juju plugin errors, juju writes an additional message: "ERROR subprocess encountered error code $FOO". This means that plugins cannot behave quite like juju commands. It implies that something is wrong with the plugin, when in fact, nothing is wrong. It draws attention away from the actual error message.

For example, I've written a plugin "retry" that runs "juju resolved --retry":

# Actual command
$ juju resolved --retry apache2-reverseproxy
error: invalid unit name "apache2-reverseproxy"

# Plugin running the same command
$ juju retry apache2-reverseproxy
error: invalid unit name "apache2-reverseproxy"
ERROR subprocess encountered error code 2

# Plugin run without juju does not have the extra error message.
$ juju-retry apache2-reverseproxy
error: invalid unit name "apache2-reverseproxy"

Abel Deuring (adeuring) on 2014-10-20
Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
tags: added: plugin
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 2.0.1
Changed in juju-core:
status: Triaged → Won't Fix
Curtis Hovey (sinzui) on 2016-11-01
Changed in juju:
milestone: 2.0.1 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers