Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

Use return code to track command status#28

Open
protohuf wants to merge 1 commit intoopennetworkinglab:mainfrom
protohuf:main_protohuf
Open

Use return code to track command status#28
protohuf wants to merge 1 commit intoopennetworkinglab:mainfrom
protohuf:main_protohuf

Conversation

@protohuf
Copy link
Copy Markdown

Using a string to track command success doesn't seem to work in all circumstances. Using the return code directly instead works fine.

In a situation where AMP is not ready to respond to the PATCH request, using result.stdout.find("command terminated") == -1 will fail immediately (no retries). Using return code works:

TASK [roc-load : load roc models file] ********************************************************************************************************************************************************************************************************
FAILED - RETRYING: [node1]: load roc models file (5 retries left).
FAILED - RETRYING: [node1]: load roc models file (4 retries left).
FAILED - RETRYING: [node1]: load roc models file (3 retries left).
FAILED - RETRYING: [node1]: load roc models file (2 retries left).
changed: [node1]

doesn't seem to work in all circumstances

Signed-off-by: Marcus Hufvudsson <mh@protohuf.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant