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
NIFI-1709 - Introduce logic to probe Linux version using /etc/os-rele… #1794
Conversation
…ase to nifi.sh Add explicit paths to support SLES 11 SP4 / OpenSUSE init.d layout
@apiri may I ask you to have a look on this? Idea here is to use |
@trixpan I think this seems okay overall. Not overly well versed in SUSE though. Could you explain why it needs special handling? Isn't it also systemd? |
@trixpan @apiri Few things. It seems like we should be using lsb_release to grab the OS as well as chkconfig to handle creating run level symlinks instead of on on our own, at least for most of the OSes. And, while we install an init.d script and systemd can run those, we actually don't create a systemd unit today, so for many of the latest releases service and systemctl won't actually start nifi. So I guess what I'm saying is that I think there might be 3 issues here: OS detection improvement, change how we set run levels, and add systemd unit and upstart scripts for OSes that aren't really doing sysv init anymore. FWIW I've been using something like this for the systemd unit:
|
SuSE may or may not be using systemd. Reason why we rely on systemd support to init scripts to achieve the outcome. @jfrazee disagree regarding the use of [1] https://www.unixmen.com/linux-troubleshooting-fix-lsb_release-command-found-centos/ |
@trixpan Fair enough. Seems clear the lsb_release suggestion was bad. BTW, I tested your changes on opensuse:latest (leap) and it's working as expected. |
@jfrazee thanks. I haven't tested on leap. as not working you mean the file is not being linked or the service isn't being started? Cheers |
@jfrazee sorry. I misread your comment. It works on leap?! Great. :-) |
@trixpan Yep, it's working. Is there any use in using the ID_LIKE variable instead of ID? If so we could change that up quick, else I think this is good to go. |
@jfrazee I intentionally used ID as I noticed ID_LIKE seemed like a mix bag... |
@trixpan LGTM +1 and I tested on SuSE and not SuSE. You can go ahead and merge it or I can in my afternoon/your evening. |
…ase to nifi.sh
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.