-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use keytab by environment variable #91
Conversation
chainerio/filesystems/hdfs.py
Outdated
self.keytab_path = keytab_path | ||
if self.keytab_path is None: | ||
self.keytab_path = os.getenv("CHAINERIO_KEYTAB") |
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.
How about renaming it "CHAINERIO_HDFS_KEYTAB"?
docs/source/reference.rst
Outdated
@@ -28,14 +28,22 @@ Toplevel Functions | |||
.. autoclass:: chainerio.container.Container | |||
:members: | |||
|
|||
|
|||
.. note:: With environment variable | |||
``CHAINERIO_KEYTAB=path/to/your.keytab`` set, ``hdfs`` |
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.
ditto
I have changed the whole design to use |
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, LGTM
# variable. If /etc/krb5.keytab doesn't exist, krbticket | ||
# tries to update the ticket with ``kinit -R`` as much as | ||
# possible. | ||
self.ticket = KrbTicket.init(self.username) |
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.
Is the update needed when we do not have the keytab?
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.
Please read the code comment above
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.
I meant do we have to update the ticket even if we do not have the keytab?
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.
Yes. Ticket expiration date can be renewable until renewable date by kinit -R
and the former is usually earlier than latter, like hours or days.
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.
I see
No description provided.