-
Notifications
You must be signed in to change notification settings - Fork 303
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
Error parsing kernel release number in ifcfg module #5087
Comments
Hi @mariospr thanks for the very detailed bug report! |
No problem, happy to help! For the record, I've just closed the pull request and proposed the same change in the python-ifcfg module instead, following the recommendation from #5088 (comment). Would rather keep this open while KA Lite is not actually fixed, though, just to keep track of it properly. |
Agreed. |
Thanks @mariospr! a new version of ifcfg has been released on pypi. Would you be able to confirm that it works? I'm making a PR now to have it included in the next point release of KA Lite (0.16.4). |
@benjaoming Not very rigorous (but hopefully good enough), I've did this to confirm that the fix works:
Additionally, I added a couple of prints in @MCGallaspy It looks like the #5090 Pull Request is all that is left from your suggestion in #5088 (comment), so I think this can probably be closed as soon as the new release is out and tested to work fine in a more rigorous way (which I volunteer for helping with) |
Thanks @mariospr ! I see that the PR also passes automated tests, so I'm quite confident it's a safe merge for a patch release. Could you weigh in about how you see the severity of the issue? I think there's gonna be a discussion about whether or not to immediately release a patch version. This error has been around forever so the real question is if the sort of Linux Kernel version string is very common or perhaps has become so :) |
Cool, thanks for your help and (extremely) timely response!
I'm not really a kernel expert so I can't tell how common is to have kernels reporting only the VERSION and MAJOR REVISION numbers as their release number string via the
However, I've checked this with one of our Kernel guys and he explained to me that "the minor version is something used by people in several non-standard ways" and so that it can't really be trusted (actually, it seems that ubuntu does a poor job reporting that number), so it's probably wise not to rely on it at all, as if it was always being reported as part of the kernel's release number (output of But on top of that, the patch also fixed a wrong use of the All of this being a long way of saying that... the issues fixed are important, but only if you either run ifcfg in a OS not reporting the kernel version (which will crash) or if you run it in OS with a 3.x kernel >= 3.10 (which will treat as < 3.3). Still, we (Endless) would particularly appreciate if it could make it to the next stable release, for obvious reasons :-). |
Cool, thanks for explaining it thoroughly! I think it's fair to aim for a 0.16.3 within the next ~1 week's time to accommodate the need! I'll let you know as soon as it's done, and this ticket should remain until we're resolved on when we get the fixed released. |
Yeah, we'll have to discuss internally when to make the next patch release, but I don't anticipate any reason to delay it for very long. |
Great! Happy to see my very first contribution to this project so quickly and efficiently dealt with :-). Let me know if you need anything from my side. Otherwise I'll wait until the release is done for testing it again in my (problematic) ARM hardware. Thanks! |
Merged into 0.16.x and I am releasing it now in 0.16.3 -- therefore, closing this. Stay tuned for a new .deb in the PPA during today. |
Thanks a lot. JFTR, I'm confirming that I've uninstalled my previous installation of KA Lite in my arm device and re-installed again with pip and everything worked out of the box this time, as expected. |
Final 0.16.3 - Fixes learningequality#5087 related to certain Linux kernel version labels - Few docs changes Conflicts: data/version.yml kalite/version.py
Final 0.16.3 - Fixes learningequality#5087 related to certain Linux kernel version labels - Few docs changes
Final 0.16.3 - Fixes #5087 related to certain Linux kernel version labels - Few docs changes
Summary
When I install ka-lite in my ARM device, I can't get it to start without crashing, due to a parsin problem in the ifcfg module, which is printing this error instead:
Looking at the relevant code it seems to me that there are two issues:
'4.3.3-301.fc23.x86_64'
on my Intel laptop), but not necessarily true everywhere (it's'3.10-trunk-meson8'
in my ARM device).float('3.10')
will evaluate to the3.1
number, resulting in the wrong conclusion.Branch or installer method
The crash is happening both in the stable version installable with
pip install ka-lite-static
and the one from the master branch on Linux machines, as long as the output ofuname -r
returns a release number string where the major revision number part is not a valid number (e.g. containing non-digits).The wrong comparison against the 3.3 version seems to be wrong regardless of the underlying system.
How to reproduce
kalite start
on Linux whereuname -r
reports a non-integer major revision number stringAlternatively replace this line with something
full_kernel = "3.10-trunk-meson8"
to replicate my environment and you should get the crash too.The text was updated successfully, but these errors were encountered: