HTools/Types.hs: minor adjustments to auto-repair types
authorDato Simó <dato@google.com>
Wed, 16 Jan 2013 20:46:08 +0000 (20:46 +0000)
committerDato Simó <dato@google.com>
Wed, 30 Jan 2013 17:37:20 +0000 (17:37 +0000)
commitde9d75c8ac0d65f3dce5f834180b493508cb3413
treef60f10929ca85474500d0492ef741d1f6e9e02cd
parentb8e76da871a8665cf0f5908d81ec419c1b3ec550
HTools/Types.hs: minor adjustments to auto-repair types

In particular:

  - make ArHealthy take an optional AutoRepairData; this allows to
    represent the situation where a repair completed successfully, and
    hence there's an associated tag we might want to know about.

  - add an 'arTag' member to AutoRepairData to store the exact tag this
    data was derived from; this allows for easier removal of the tag when
    its associated state is superseded. It also stores the tag that will
    be written to the cluster when a new AutoRepairData record is created.

  - change the default sort order of AutoRepairResult to reflect the
    precedence used when reading tags from an object (a failure, if
    present, is always the resulting state; a success overrides an
    ENOPERM).

  - (trivial) make AutoRepairStatus and AutoRepairData derive Eq and Show.

Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
src/Ganeti/HTools/Types.hs