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

Correct erroneous assumption about port being the last line of the pid file #187

Closed
rtibbles opened this issue May 7, 2021 · 2 comments
Closed
Assignees

Comments

@rtibbles
Copy link
Member

rtibbles commented May 7, 2021

Currently the code to get the active port from the Kolibri PID file assumes that it can keep reading the file until the file finishes:

However, recent updates have added additional lines to this PID file, meaning that it is now reading the wrong information.

Instead, we should update the code to only read the second line of the PID file to get the port.

Ideally, in future, we would use Kolibri's utils to determine this information, rather than introspecting the pid file - this will make it less brittle to future changes. But this fix will do for now.

@micahscopes
Copy link
Contributor

Here's a gist verifying that the method of calling getline twice does indeed get the second line in a predictable way:

https://gist.github.com/micahscopes/348cdbed199588cdbf5a281291cc8b6a

I'm not sure what's going wrong at this point.

c.c. @jonboiser @rtibbles

@micahscopes micahscopes assigned jonboiser and rtibbles and unassigned micahscopes Jun 11, 2021
@rtibbles
Copy link
Member Author

rtibbles commented Jul 9, 2021

Fixed in #188 and #192

@rtibbles rtibbles closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants