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

Write a PIDFILE when we start ollama from the extension #2

Open
jandubois opened this issue Oct 17, 2024 · 2 comments
Open

Write a PIDFILE when we start ollama from the extension #2

jandubois opened this issue Oct 17, 2024 · 2 comments
Assignees
Milestone

Comments

@jandubois
Copy link
Member

jandubois commented Oct 17, 2024

Right now we only stop the ollama process when the binary is stored inside the extension directory.

But that does not cover the case when ollama is installed in the default system location, but not currently running when the extension is started:

The extension will start ollama, but not stop it again when the user terminates Rancher Desktop.

Checking the PID against the PIDFILE instead of checking the binary location would allow us to do the right thing in all scenarios.

This issue has been extracted from #14 (comment) so rancher-sandbox/rancher-desktop-rdx-open-webui-archive#14 can be merged as-is.

@jandubois jandubois added this to the 1.17 milestone Oct 17, 2024
@jandubois
Copy link
Member Author

I just realized that we need to have some standard naming convention for these PID files, so rdctl factory-reset could look for them too.

I realize this won't work for subprocesses created by extension from other authors, but it would work at least for ours.

@jandubois
Copy link
Member Author

jandubois commented Oct 17, 2024

Also I just remembered that I implemented killpg for Perl on WIn32 almost 20 years ago: Perl/perl5@542cb85

The current version of the function (with the code to support Win95 removed) is https://github.com/Perl/perl5/blob/19a5403/win32/win32.c#L1347-L1378

Maybe that could help us to determine which processes are owned by the Rancher Desktop process?

@jandubois jandubois transferred this issue from rancher-sandbox/rancher-desktop-rdx-open-webui-archive Oct 30, 2024
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