native: configurable ready timeout#99
Conversation
Allow the node ready timeout to be configurable.
liambrady
left a comment
There was a problem hiding this comment.
please run make ci-lint and fix all linting errors (for the CI to run)
| ready_timeout = 30 | ||
| # setable via "ready-timeout: 600" in kinds.yaml if a particular type will take a long time. | ||
|
|
||
| for node in ready_nodes: |
There was a problem hiding this comment.
I feel like there is probably a more idiomatic python solution for this block. Maybe something like ready_timeout = max ([node.config.get("ready-timer", 30) for node in ready_nodes])?
There should be no need to try/except the string->integer conversion, since the config is checked against the expected config schema. (Error messages are generated if the leaf is of the wrong type, doesn't exist in the schema, etc.) So long as it is defined as an integer in the schema, we should be able to assume it is an integer in the code.
In order to add new config to the schema, update the YANG module within munet/README.org and then run make check. You should see that munet/munet-schema.json inherits the updates.
| logging.debug("Waiting for ready on nodes: %s", ready_nodes) | ||
| _, pending = await asyncio.wait(tasks, timeout=30) | ||
| ready_timeout = 30 | ||
| # setable via "ready-timeout: 600" in kinds.yaml if a particular type will take a long time. |
There was a problem hiding this comment.
See comment below. Add this new config node and the description of its behavior to the munet YANG module.
Allow the node ready timeout to be configurable.