~go-bot/juju-core/trunk

« back to all changes in this revision

Viewing changes to state/machine.go

  • Committer: Tarmac
  • Author(s): Frank Mueller
  • Date: 2013-09-27 15:54:12 UTC
  • mfrom: (1880.1.8 juju-core)
  • Revision ID: tarmac-20130927155412-7jg4vd1xuikq4umy
[r=themue],[bug=1224568] uniter: add hook error status data

With this CL information about a failing hook and,
if possible, the relation id and the remote unit are
written into the status data of the status doc.

https://codereview.appspot.com/14030043/

Show diffs side-by-side

added added

removed removed

Lines of Context:
702
702
}
703
703
 
704
704
// Status returns the status of the machine.
705
 
func (m *Machine) Status() (status params.Status, info string, err error) {
 
705
func (m *Machine) Status() (status params.Status, info string, data params.StatusData, err error) {
706
706
        doc, err := getStatus(m.st, m.globalKey())
707
707
        if err != nil {
708
 
                return "", "", err
 
708
                return "", "", nil, err
709
709
        }
710
710
        status = doc.Status
711
711
        info = doc.StatusInfo
 
712
        data = doc.StatusData
712
713
        return
713
714
}
714
715