Skip to content

Pass auth to Active RM check #58

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

dimon222
Copy link
Collaborator

@dimon222 dimon222 commented Oct 9, 2019

This is to fix #57

One thing I'm still not sure about is next:
https://github.com/dimon222/hadoop-yarn-api-python-client/blob/82022a1574c6134ade132736ef64d642053b13dc/yarn_api_client/hadoop_conf.py#L52-L57
Should we validate for 401 and throw exception for auth immediately or its valid scenario when we should return just False?

@dimon222 dimon222 force-pushed the bugfix/fix_active_kerberos_check branch from 82022a1 to 6010ea0 Compare October 9, 2019 02:01
@dimon222 dimon222 changed the title Pass auth to Active NM check Pass auth to Active RM check Oct 9, 2019
@dimon222 dimon222 force-pushed the bugfix/fix_active_kerberos_check branch from 6010ea0 to af57fef Compare October 9, 2019 02:03
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look great. I had the "one" comment (sorry for its length) per your initial question.

Also, I wonder if this should be changed to [WIP] until it can be tested. Are you in a position to try to check this out?

@dimon222
Copy link
Collaborator Author

dimon222 commented Oct 9, 2019

@kevin-bates i've applied the suggested change. Logger is not accessible from method, so it's printing to stdout for time being.

@dimon222
Copy link
Collaborator Author

dimon222 commented Oct 9, 2019

I've validated new active RM check on existing cluster with such setup and it seems to work.

One suggestion is still have in mind - response.text is showing very verbose output of page markup (basically html). Maybe it makes more sense to keep only the status code in log instead of full response body?

@kevin-bates
Copy link
Member

Yes - that sounds good. Thank you for checking this!

@dimon222
Copy link
Collaborator Author

dimon222 commented Oct 9, 2019

Adjusted the print statement. Hopefully nothing else missed.

Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you!

@dimon222
Copy link
Collaborator Author

@lresende any chance u can confirm as well?

Copy link
Collaborator

@lresende lresende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lresende lresende merged commit 8010568 into gateway-experiments:master Oct 17, 2019
@dimon222 dimon222 deleted the bugfix/fix_active_kerberos_check branch October 17, 2019 22:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check for active RM is broken for kerberized clusters
3 participants