-
Notifications
You must be signed in to change notification settings - Fork 13
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
Doc 182 share data between sessions #87
base: master
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,15 @@ The equivalent CLI command: | |
grid session delete $INTERACTIVE_NODE_ID | ||
``` | ||
|
||
## Share Data Between Sessions | ||
At this time the only supported way to share data between sessions is to mount the sessions locally and copy files to the local mounts. Establishing SSH connection to your sessions is a prerequisite to this. See these [steps](https://github.com/gridai/grid-docs/blob/doc-182-share-data-between-sessions/docs/products/sessions/how-to-ssh-into-a-session.md) to set up SSH connection with your sessions. **Be sure to logout of the interactive session before attempting the next step**. After that you can do the following to create your session mounts: | ||
|
||
``` | ||
# Do for each session you wish to share data between | ||
mkdir <dir for each session mount> | ||
grid session mount <your session> <created session mount dir> | ||
mkdir <created session mount dir>/shared_data | ||
|
||
# to share data from a session to another session | ||
cp -R <dir of interest in created session mount dir> <other session mount dir>/shared_data | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oojo12 I like how you used the concepts of Session A and Session B in your testing. It makes it clear and easy to use the commands. Could you incorporate that here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I kinda wanted to stay away from that here and use more general language. @essiequoi if you still would like the concept of Session A Session B here let me know and I will make that change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. addressed |
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.
@oojo12 when hyperlinking to an internal link, use relative markdown path so you can update the link here to
(./how-to-ssh-into-a-session.md) otherwise the link will take them to the page in Github
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.
Huh, why do you need to logout of ixsession before this step?
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.
@essiequoi making the change now
@nmiculinic because running grid session ssh logs you into the session. Attempting to perform a session mount from within the session gives you an aws public key error. See the screenshot. Thus the provided instructions are workaround for that by doing it from your local machine.
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.
addressed @essiequoi
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.
huh....first things first
This is not AWS public key error. It has nothing to do with AWS. It's SSH public key error, since a valid private key isn't present on the session; you'd have to use ssh-agent forwarding for this perhaps, this would require CLI changes to include agent forwarding. What do you think @rusenask ?
The second error for modprobe fuse is...interesting. Since we're running sessions within a container, can we use a fuse to mount something using it within a non-privileged container?
https://stackoverflow.com/questions/48402218/fuse-inside-docker This is interesting, albeit a bit dated (2018).
This seems to be a more recent find, 2021 https://stackoverflow.com/questions/68709395/how-to-mount-a-fuse-based-filesystem-on-docker-container-running-on-aws but it still gives a lot of permissions to the session container. CC @filintod for any thoughts.
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.
@nmiculinic @filintod how would you like to proceed? If it is additional content I would ask that you just commit it directly instead of placing in the comment something for me to copy + paste. It will be more efficient that way. @essiequoi says this is important for the bug bash.
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.
Regarding fuse; currently mounting fusefs within session will fail since fuse device isn't exposed within the container. Though there's:
https://github.com/JasonChenY/fuse-device-plugin
https://github.com/kuberenetes-learning-group/fuse-device-plugin
fuse device plugins for k8s we could investigate and potentially add; allowing users to use fusefs within the sessions (and mount other sessions within original session, to remind we're using sshfs, that is fuse filesystem when doing session mounting)