-
Notifications
You must be signed in to change notification settings - Fork 64
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
georgettica/login to owner cluster #55
georgettica/login to owner cluster #55
Conversation
georgettica
commented
Aug 1, 2021
•
edited
Loading
edited
- feat(ocm-login-owner): login to owner cluster
- get-shard-id extracts the external_id of the parent shard the mapping is done by hand as there is no actuall mapping between shard id to the external_id (or any unique identifier for that manner) once that mapping will exist this automation will use it instead
4615000
to
4b28583
Compare
Can you be more descriptive what this is doing? I think I get it reading the code, but Regarding the mixed bash and python - I'm not going to say it's enough to downvote the PR, but would this be better to just use python for the whole thing rather than dragging it in at the end? The code itself looks good, though! |
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.
Overall looks good and I like this. As @clcollins mentioned, it would be nice to understand how this is used.
if I'm not logged in I'm gettng an error.
Traceback (most recent call last):
File "/root/./get-shards-clusterid", line 35, in <module>
described_clusters_raw = convert_to_dict(res)
File "/root/./get-shards-clusterid", line 12, in convert_to_dict
return json.loads(stringified_bytes)
File "//usr/lib64/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "//usr/lib64/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "//usr/lib64/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Maybe run ocm config get url
or similar to check if logged in?
Fixing your comment now @T0MASD |
- some functionality was taken from utils/bin/create-cluster - fix OCM_CONTAINER_DOC to be correct this is a seperate commit in case the fuctionality is too complex and should be half bash half python Co-authored-by: Tomas Dabašinskas <[email protected]>
85806e2
to
c09d725
Compare
@T0MASD can you look again? I can add README aswell |
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.
Looking nice. I've tried running ./ocm-login-owner <cluster_id>
but I get
Error: exec: "xdg-open": executable file not found in $PATH
FAILURE: unable to login
I ran dnf install xdg-utils
and re-ran, but then I get a different error:
/usr/bin/xdg-open: line 881: www-browser: command not found
/usr/bin/xdg-open: line 881: links2: command not found
/usr/bin/xdg-open: line 881: elinks: command not found
/usr/bin/xdg-open: line 881: links: command not found
/usr/bin/xdg-open: line 881: lynx: command not found
/usr/bin/xdg-open: line 881: w3m: command not found
Co-authored-by: Tomas Dabašinskas <[email protected]>
Co-authored-by: Tomas Dabašinskas <[email protected]>
@T0MASD this PR is mostly to set the groundwork for The tool will be added to the downstream once merged |
thanks |