-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manager host to list of nodes when deploy method is Server #256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @myxie - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -635,7 +635,7 @@ def gen_pg( | |||
host=mhost, port=mport, url_prefix=mprefix, timeout=30 | |||
) | |||
# 1. get a list of nodes | |||
node_list = mgr_client.nodes() | |||
node_list = [f"{mhost}:{mport}"] + mgr_client.nodes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awicenec Are you happy with this approach to the fix? I recall you saying in-person you'd made changes to the API instead, but that may have been orthogonal to this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are perfect, thanks.
Add manager host to list of nodes when deploy method is Server
Issue
This PR addresses #255, in which I was not able to generate and deploy physical graphs because only a single node was being returned to the translator when the ManagerClient was queried for current nodes.
This is only an issue with the Server deploy method; the Browser Direct method is working fine.
Cause
The server and the Browser Direct method use different REST calls:
This is likely due to their requiring different pieces of information at runtime.
They do get the same list of nodes, albeit in different through different methods. What they do with this list, however, is the difference.
\gen_pg
, Serverdaliuge/daliuge-translator/dlg/dropmake/web/translator_rest.py
Lines 637 to 641 in bf3a8fc
\gen_pg_spec
, Browser Directdaliuge/daliuge-translator/dlg/dropmake/web/translator_rest.py
Lines 721 to 726 in bf3a8fc
It is clear that for the Browser Direct case (i.e., the one that works) we are adding the manager to the start of any list of nodes, which is what we need when we split the list of nodes into island and node managers in
to_pg_spec
:daliuge/daliuge-translator/dlg/dropmake/pgt.py
Lines 279 to 280 in bf3a8fc
Solution
The following is necessary to resolve the issue: