Fix runtime error and uninstall warning
(cherry picked from commit 9be6d8606cfa18a65e3af8c1ec7cd8dab68ebab3)
This commit is contained in:
parent
abc7dab7cf
commit
216d5c33ba
@ -3,9 +3,7 @@ Description=Apache Storm logviewer service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
EnvironmentFile=/etc/sysconfig/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml logviewer
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
|
||||
@ -3,9 +3,7 @@ Description=Apache Storm nimbus service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
EnvironmentFile=/etc/sysconfig/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml nimbus
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
|
||||
@ -3,9 +3,7 @@ Description=Apache Storm supervisor service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
EnvironmentFile=/etc/sysconfig/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml supervisor
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
|
||||
@ -3,9 +3,7 @@ Description=Apache Storm ui service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
EnvironmentFile=/etc/sysconfig/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml ui
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
|
||||
21
storm.spec
21
storm.spec
@ -5,7 +5,7 @@
|
||||
%define _data_dir %{_sharedstatedir}/storm
|
||||
Name: storm
|
||||
Version: 1.2.3
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Apache Storm realtime computation system
|
||||
License: Apache-2.0
|
||||
Url: http://storm.apache.org
|
||||
@ -60,21 +60,15 @@ install -p -D -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/storm
|
||||
install -p -D -m 644 conf/storm.yaml $RPM_BUILD_ROOT%{_conf_dir}/
|
||||
install -p -D -m 644 conf/storm_env.ini $RPM_BUILD_ROOT%{_conf_dir}/
|
||||
|
||||
%pre
|
||||
/usr/bin/getent group storm > /dev/null || /usr/sbin/groupadd -r storm
|
||||
if ! /usr/bin/getent passwd storm > /dev/null ; then
|
||||
/usr/sbin/useradd -r -g storm -m -d %{_prefix}/storm -s /bin/bash -c "Storm" storm
|
||||
fi
|
||||
|
||||
%post
|
||||
%systemd_post storm-nimbus.service
|
||||
%systemd_post storm-supervisor.service
|
||||
%systemd_post storm-logviewer.service
|
||||
%systemd_post storm-ui.service
|
||||
|
||||
%postun
|
||||
%preun
|
||||
for module in nimbus supervisor logviewer ui; do
|
||||
systemctl status storm.$module > /dev/null
|
||||
systemctl status storm-$module > /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
%systemd_preun storm-$module.service
|
||||
fi
|
||||
@ -89,11 +83,14 @@ done
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/storm
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/storm
|
||||
%config(noreplace) %{_conf_dir}/*
|
||||
%attr(-,storm,storm) %{_prefix}/storm
|
||||
%attr(0755,storm,storm) %dir %{_log_dir}
|
||||
%attr(0700,storm,storm) %dir %{_data_dir}
|
||||
%{_prefix}/storm
|
||||
%dir %{_log_dir}
|
||||
%dir %{_data_dir}
|
||||
|
||||
%changelog
|
||||
* Fri 20 Aug 2021 sunguoshuai <sunguoshuai@huawei.com> 1.2.3 - 4
|
||||
- Fix runtime error and uninstall warning
|
||||
|
||||
* Mon Jun 14 2021 lingsheng <lingsheng@huawei.com> 1.2.3 - 3
|
||||
- Fix status failure after stopping service
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user