-
Notifications
You must be signed in to change notification settings - Fork 525
BIGTOP-2345 Create Flink packaging #101
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
Conversation
|
||
%dir %{_sysconfdir}/%{flink_name} | ||
%config(noreplace) %{initd_dir}/%{flink_name}-master | ||
%config(noreplace) %{initd_dir}/%{flink_name}-worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those need to be
%config(noreplace) %{initd_dir}/%{flink_name}-jobmanager
%config(noreplace) %{initd_dir}/%{flink_name}-taskmanager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the rebasing before the PR went horribly wrong :(
I'm getting the following error message when building using
|
%define etc_flink /etc/%{flink_name} | ||
%define config_flink %{etc_flink}/conf | ||
%define man_dir %{_mandir} | ||
%define flink_services master worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this also needs to be changed to -
%define flink_services jobmanager taskmanager
try rebuilding the package again after running ./gradlew flink-clean
The gradle build of the RPM should be fixed. But there seems to be still an issue with the systemd start of the jobmanager. |
I verified the RPM build again. It should be working now. |
Debian is now fixed as well. |
Tested the RPM package on Fedora 23. First, a bit of a disappointment: ● jobmanager.service - LSB: Flink jobmanager
Loaded: loaded (/etc/rc.d/init.d/jobmanager)
Active: failed (Result: exit-code) since Mon 2016-04-25 16:40:45 CEST; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 13344 ExecStart=/etc/rc.d/init.d/jobmanager start (code=exited, status=127)
Apr 25 16:40:41 localhost.localdomain jobmanager[13344]: /etc/rc.d/init.d/jobmanager: line 34: /lib/lsb/init-functions: No such file or directory
Apr 25 16:40:41 localhost.localdomain jobmanager[13344]: /etc/rc.d/init.d/jobmanager: line 74: log_success_msg: command not found
Apr 25 16:40:41 localhost.localdomain jobmanager[13344]: /etc/rc.d/init.d/jobmanager: line 120: pidofproc: command not found
Apr 25 16:40:41 localhost.localdomain su[13386]: (to flink) root on none
Apr 25 16:40:45 localhost.localdomain jobmanager[13344]: /etc/rc.d/init.d/jobmanager: line 120: pidofproc: command not found
Apr 25 16:40:45 localhost.localdomain jobmanager[13344]: /etc/rc.d/init.d/jobmanager: line 102: log_failure_msg: command not found
Apr 25 16:40:45 localhost.localdomain systemd[1]: jobmanager.service: Control process exited, code=exited status=127
Apr 25 16:40:45 localhost.localdomain systemd[1]: Failed to start LSB: Flink jobmanager.
Apr 25 16:40:45 localhost.localdomain systemd[1]: jobmanager.service: Unit entered failed state.
Apr 25 16:40:45 localhost.localdomain systemd[1]: jobmanager.service: Failed with result 'exit-code'. Turns out, it works when you install ● jobmanager.service - LSB: Flink jobmanager
Loaded: loaded (/etc/rc.d/init.d/jobmanager)
Active: active (exited) since Mon 2016-04-25 16:42:56 CEST; 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 14071 ExecStart=/etc/rc.d/init.d/jobmanager start (code=exited, status=0/SUCCESS)
Apr 25 16:42:56 localhost.localdomain systemd[1]: Starting LSB: Flink jobmanager...
Apr 25 16:42:56 localhost.localdomain jobmanager[14071]: Starting Flink jobmanager (flink-jobmanager):[ OK ]
Apr 25 16:42:56 localhost.localdomain jobmanager[14071]: Flink jobmanager is running[ OK ]
Apr 25 16:42:56 localhost.localdomain systemd[1]: Started LSB: Flink jobmanager.
● taskmanager.service - LSB: Flink taskmanager
Loaded: loaded (/etc/rc.d/init.d/taskmanager)
Active: active (exited) since Mon 2016-04-25 16:44:28 CEST; 22s ago
Docs: man:systemd-sysv-generator(8)
Process: 15428 ExecStart=/etc/rc.d/init.d/taskmanager start (code=exited, status=0/SUCCESS)
Apr 25 16:44:25 localhost.localdomain systemd[1]: Starting LSB: Flink taskmanager...
Apr 25 16:44:25 localhost.localdomain taskmanager[15428]: Starting Flink taskmanager (flink-taskmanager):[ OK ]
Apr 25 16:44:25 localhost.localdomain su[15483]: (to flink) root on none
Apr 25 16:44:28 localhost.localdomain taskmanager[15428]: Started Flink taskmanager (flink-taskmanager):[ OK ]
Apr 25 16:44:28 localhost.localdomain systemd[1]: Started LSB: Flink taskmanager. So we need to add The jobmanager/taskmanager came up fine. I wonder, should we rename the service to Another thing, the logs are named "flink-flink-jobmanager-0-localhost.localdomain.log". Probably could remove the Other than that, great work 👍 |
Hi. My Nitty picky comment: Please see https://cwiki.apache.org/confluence/display/BIGTOP/Bigtop+Packaging on how to patch sources. (you may have a look at the hive or zookeeper packages for examples) Short : rename 1837.patch to patch1-1837.patch . Insert the magic patterns into the spec file. remove the patch command from the do-component-build. In order to get committed the patch on the branch has to be collapsed to only one patch with the exact message as the JIRA. |
Hi the build looks very promising! You should not package /var/run, since this is only a temporary filesystem. You should create it with your init script (This will fix one of the lintian errors for debian/ubuntu). |
Thank you for the feedback! |
Thank you for the review @mxm! Regarding the lsb dependency: I saw that the Hadoop spec for example has the following entry:
I guess we can add that as well.
I'm definitively against
The naming schema for logs is @oflebbe: I'll check the guide again and adopt the patch integration accordingly. |
@oflebbe quick question: %if %{?suse_version:1}0
# Required for init scripts
Requires: insserv
%global initd_dir %{_sysconfdir}/rc.d
%else
# Required for init scripts
Requires: /lib/lsb/init-functions
%global initd_dir %{_sysconfdir}/rc.d/init.d
%endif I assume the if condition is true for suse, so the else branch applied for Max' build, requiring the init-functions? |
Another follow up Q:
Okay, makes sense. I was looking a bit into other scripts and I saw that others are setting the |
Then let's call them |
Okay, I'll rename the services |
f0dc70e
to
069cfea
Compare
I addressed all remaining issues with the pull request. Please let me know if there's anything else blocking this from being merged. |
f893e66
to
0dd8d18
Compare
Hey guys, any update on this? I am looking forward to having the Flink integration in. :) |
I have committed this to the master. Feel free to close the PR and thanks for your contribution! |
Thanks a lot for merging. |
With ODPi 2.0 release branch cut, the main is now at version 2.1-SNAPSHOT
This PR is based on the work done in #93.
I've picked only the parts regarding the packaging (ignoring the puppet deployment).
The changes have been tested on a Debian8 virtual machine and Fedora 23.
Packaging, installation, the init scripts, user creation, file removal, logging seem to work now.
I'm looking forward to any comments regarding the proposed changes.