~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/uniter/actions/resolver.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
                        return opFactory.NewAction(nextAction)
53
53
                }
54
54
        case operation.RunAction:
55
 
                // TODO(fwereade): we *should* handle interrupted actions, and make sure
56
 
                // they're marked as failed, but that's not for now.
57
55
                if localState.Hook != nil {
58
56
                        logger.Infof("found incomplete action %q; ignoring", localState.ActionId)
59
57
                        logger.Infof("recommitting prior %q hook", localState.Hook.Kind)
60
58
                        return opFactory.NewSkipHook(*localState.Hook)
61
59
                } else {
62
60
                        logger.Infof("%q hook is nil", operation.RunAction)
 
61
                        return opFactory.NewFailAction(*localState.ActionId)
63
62
                }
64
63
        case operation.Continue:
65
64
                return opFactory.NewAction(nextAction)