Skip to content
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

mount error #13

Open
zhoushengsheng-droid opened this issue Mar 28, 2022 · 18 comments
Open

mount error #13

zhoushengsheng-droid opened this issue Mar 28, 2022 · 18 comments

Comments

@zhoushengsheng-droid
Copy link

Hi, I recently want to mount a network disk into the container of this project. I modified KVM Py file adds this parameter -- privileged. But after adding this parameter. My JNLP file cannot be opened. How to modify it?

@IngoMeyer441
Copy link
Member

Hey,
for mounting, it is probably better to use the --mount or --volume option of the Docker command. This is the link to the documentation for an NFS mount: https://docs.docker.com/storage/volumes/#create-a-service-which-creates-an-nfs-volume. There are also other examples for network mounts.

Do you get an error message? You can run nojava-ipmi-kvm with the --debug flag to get more detailed output.

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Mar 28, 2022 via email

@IngoMeyer441
Copy link
Member

Does it work when you replace --privilged with a --mount parameter? For direct mounts you don't need the --privileged flag.

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Mar 28, 2022 via email

@IngoMeyer441
Copy link
Member

I think it is ok to change the Python file to test the mounting. It would be better to add a command line option to nojava-ipmi-kvm to make it available in general.

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Mar 31, 2022 via email

IngoMeyer441 added a commit that referenced this issue Mar 31, 2022
This (partially) fixes GitHub issue #13.
@IngoMeyer441
Copy link
Member

Thanks for pointing me to this issue. This should be fixed in commit f7a6046 and version v0.9.2. Please upgrade to the latest version to get the patch.

@zhoushengsheng-droid
Copy link
Author

Hi. I have another problem. If I want to use the mount function in VNC, I need another JNLP file of VM. Can nojava download one more JNLP file specified by me internally and let me open it?

@IngoMeyer441
Copy link
Member

Couldn't you use another download link in the configuration for that case?

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Apr 2, 2022 via email

@IngoMeyer441
Copy link
Member

So, you would like to set a list of JNLP files in the central configuration file and then all the given JNLP files should be started in parallel?
Sorry for all the questions, but I try to understand how this feature should work and why it is needed. Maybe there is another way of solving your problem.

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Apr 5, 2022 via email

@IngoMeyer441
Copy link
Member

IngoMeyer441 commented Apr 6, 2022

The images are not visible in the GitHub issue tracker.

It would be possible to load multiple JNLP files, but this needs quite a lot of code changes and I have no system to test this. But I always welcome code contributions. I think these changes are necessary:

  • The config file needs to store either a string or a list as download endpoint. Since the config file is parsed by PyYaml, it would create either a Python string or list which is passed to the JavaHostConfig class and needs to be updated to accept a list type.
  • The download_endpoint attribute is read in the kvm.py module and then is passed to get_java_viewer.py in the Docker container.
  • The get_java_viewer.py needs to be updated to accept a list for the download endpoint and then needs to handle multiple download urls in the get_java_viewer function.
  • The supervisord configs files (for example this one) need to be updated to allow to start more than one JNLP file. Currently, this file is static. It probably needs to be generated dynamically to add as many javaws processes as needed.

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Apr 6, 2022 via email

@IngoMeyer441
Copy link
Member

The code makes a login to the KVM web page, downloads the viewer and passes it to /usr/bin/javaws. The relevant code lines (and statements or commands) are referenced in my previous post.

@IngoMeyer441
Copy link
Member

Maybe the links are not shown in the GitHub mail. But they are visible in the GitHub comment box: #13 (comment)

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Apr 6, 2022 via email

@zhoushengsheng-droid
Copy link
Author

zhoushengsheng-droid commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants