Martin Sivák has posted comments on this change.

Change subject: Separate the state machine into machine, states with logic and 
communication
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.ovirt.org/#/c/24333/4/ovirt_hosted_engine_ha/agent/hosted_engine.py
File ovirt_hosted_engine_ha/agent/hosted_engine.py:

Line 41: from .state_machine import EngineStateMachine
Line 42: 
Line 43: 
Line 44: class MetadataTooNewError(Exception):
Line 45:     pass
> I should have used a couple of doc lines instead of pass, just telling when
Done
Line 46: 
Line 47: 
Line 48: def handler_cleanup(f):
Line 49:     """


Line 71:         # Convert the json unicode strings back to ascii:
Line 72:         # it makes the output and logs much easier to read
Line 73:         try:
Line 74:             return dict([(str(k), str(v)) for (k, v)
Line 75:                         in json.loads(status).iteritems()])
> please verify this also with python2.6, I'm not sure if this works there.
I only moved this code, we used it before. Also this is not a dict 
comprehension, it creates a list of tuples.
Line 76:         except ValueError:
Line 77:             return {"vm": "unknown", "health": "unknown",
Line 78:                     "detail": "serialization error"}
Line 79:     else:


Line 171:             'engine-retry-score-penalty': 
constants.ENGINE_RETRY_SCORE_PENALTY,
Line 172:             'cpu-load-penalty-min': constants.CPU_LOAD_PENALTY_MIN,
Line 173:             'cpu-load-penalty-max': constants.CPU_LOAD_PENALTY_MAX,
Line 174:         }
Line 175:         float_keys = {'cpu-load-penalty-min', 'cpu-load-penalty-max'}
> please verify this also on python2.6, I'm not sure it works there.
Done
Line 176: 
Line 177:         cfg = ConfigParser.SafeConfigParser()
Line 178:         cfg.read(constants.AGENT_CONF_FILE)
Line 179:         try:


-- 
To view, visit http://gerrit.ovirt.org/24333
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icad82e819b653cd8b9210d0a71e0312fc6b20134
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to