This is just an example. Please feel free to reject this pull request. No feelings hurt :)
When pulling the package manager JSON validate the JSON and provide feedback to the end user if it is invalid.
When getting net interfaces data validate what is expected and provide feedback when expected data is missing.
We would then get status outputs like the following in error scenarios:
juju status-history neutron-openvswitch-cplane/0
TIME TYPE STATUS MESSAGE
25 Aug 2016 09:53:58-07:00 juju-unit executing running install hook
25 Aug 2016 10:09:34-07:00 workload blocked JSON Error: Expecting property name: line 56 column 13 (char 2519)
25 Aug 2016 10:10:50-07:00 workload maintenance installing charm software
TIME TYPE STATUS MESSAGE
25 Aug 2016 10:10:50-07:00 juju-unit executing running install hook
25 Aug 2016 10:15:02-07:00 workload blocked Interface eth1 does not have an address in the address family 2
25 Aug 2016 10:15:02-07:00 juju-unit error hook failed: "install"
This is just an example. Please feel free to reject this pull request. No feelings hurt :)
When pulling the package manager JSON validate the JSON and provide feedback to the end user if it is invalid. When getting net interfaces data validate what is expected and provide feedback when expected data is missing.
We would then get status outputs like the following in error scenarios: juju status-history neutron-openvswitch-cplane/0
TIME TYPE STATUS MESSAGE 25 Aug 2016 09:53:58-07:00 juju-unit executing running install hook 25 Aug 2016 10:09:34-07:00 workload blocked JSON Error: Expecting property name: line 56 column 13 (char 2519) 25 Aug 2016 10:10:50-07:00 workload maintenance installing charm software
TIME TYPE STATUS MESSAGE 25 Aug 2016 10:10:50-07:00 juju-unit executing running install hook 25 Aug 2016 10:15:02-07:00 workload blocked Interface eth1 does not have an address in the address family 2 25 Aug 2016 10:15:02-07:00 juju-unit error hook failed: "install"