refresh doesn't warn about hook failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
A local charm deploy failed in the install hook so after fixing the charm I ran:
```
juju refresh foo --path ./foo.charm
Added charm "local:focal/foo-2" to the model.
```
The following `juju status` showed that the charm had been upgraded but the install hook was still in a failed state and the error in `debug-log` showed the same error as before.
```
App Version Status Scale Charm Store Rev OS Message
foo error 1 foo local 2 ubuntu hook failed: "install"
```
It's my understanding then that the charm wasn't actually upgraded even though the status indicated as such. So which charm is actually running here?
I'd have expected a warning when refreshing that there was an issue AND how to start resolving it, something like..
```
juju refresh foo --path ./foo.charm
Application foo has an install hook failure, try running `juju resolved install` to refresh
```
or
```
juju refresh foo --path ./foo.charm
Application foo has an install hook failure.
If you'd like ignore this error run
juju refresh foo --path ./foo.charm --force-units
```
Curious, was this a k8s charm?