plugins cannot error like juju commands

Bug #1382063 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Medium
Unassigned
juju-core
Won't Fix
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)
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)
Changed in juju:
milestone: 2.0.1 → none
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
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.