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

BIGTOP-4197. Provide systemd service unit files(RPM): ZooKeeper #1295

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

masatana
Copy link
Contributor

@masatana masatana commented Sep 13, 2024

Description of PR

Provide systemd service unit files(RPM): ZooKeeper (https://issues.apache.org/jira/browse/BIGTOP-4197)

How was this patch tested?

  • Built & tested with smoke-test
$ ./gradlew allclean zookeeper-pkg-ind repo-ind -POS=rockylinux-8
$ cd provisioner/docker/
$ ./docker-hadoop.sh --enable-local-repo \
    --disable-gpg-check \
    --docker-compose-plugin \
    -C config_rockylinux-8.yaml \
    -F docker-compose-cgroupv2.yml \
    --stack zookeeper \
    -c 1 --smoke-tests zookeeper
  • Check if the prepared systemd-unit file is used.
$ docker ps
CONTAINER ID   IMAGE                              COMMAND        CREATED              STATUS              PORTS     NAMES
51a0f314387d   bigtop/puppet:trunk-rockylinux-8   "/sbin/init"   About a minute ago   Up About a minute             20240913_115924_r18302-bigtop-1
$ docker exec -it 51a0f314387d systemctl cat zookeeper-server
# /usr/lib/systemd/system/zookeeper-server.service
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[Unit]
Documentation=https://zookeeper.apache.org/
Description=ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
Before=multi-user.target
Before=graphical.target
After=network-online.target
After=nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=no
PIDFile=/var/run/zookeeper/zookeeper_server.pid
SuccessExitStatus=5 6
ExecStart=/etc/rc.d/init.d/zookeeper-server start
ExecStop=/etc/rc.d/init.d/zookeeper-server stop

FYI: Auto-generated systemd unit file

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/zookeeper-server
Description=LSB: ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=network-online.target
After=nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=no
PIDFile=/var/run/zookeeper/zookeeper_server.pid
SuccessExitStatus=5 6
ExecStart=/etc/rc.d/init.d/zookeeper-server start
ExecStop=/etc/rc.d/init.d/zookeeper-server stop

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'BIGTOP-3638. Your PR title ...')?
  • Make sure that newly added files do not have any licensing issues. When in doubt refer to https://www.apache.org/licenses/

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

Successfully merging this pull request may close these issues.

1 participant