« Previous | Next » 

Revision b7309a0d


Added by Iustin Pop over 15 years ago

Fix the watcher not restarting instance bug

The watcher was using conflicting attributes of the instance:
- it queried the admin_/oper_state, which are booleans
- but it compared those to the status (which is a text field)

The code was changed to query the aggregated 'status' field, as that
will also return indication of node problems, and we can use this only
one field for all decisions. We still ask for the admin_state field as
that is needed for the activate disks check (in secondary node restart).

The patch also touches the watcher in some other parts:
- log exceptions nicer
- convert a method to @staticmethod
- remove unused imports

Reviewed-by: imsnah


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences