Compare commits

...

2 Commits

Author SHA1 Message Date
Takuya ASADA
7a101a0e1b dist/redhat: stop using systemd macros, call systemctl directly
Fedora version of systemd macros does not work correctly on CentOS7,
since CentOS7 does not support "file trigger" feature.
Even after 05d4378, scriptlets on old scylla .rpm and new scylla .rpm is
not completely same.

To fix the issue we need to stop using systemd macros, call systemctl
directly.

Fixes #94

(cherry picked from commit 949cefc251)
2021-05-13 18:24:17 +03:00
Pekka Enberg
c510a5683b APIBuilder: Unlock RW-lock in remove()
The remove() function accidentally calls lock() in the finally
block, leaving the RW-lock unlocked.

Refs: scylladb/scylla#7991
(cherry picked from commit 59fd4d2b03)
2021-03-04 14:35:53 +02:00
2 changed files with 10 additions and 4 deletions

View File

@ -38,14 +38,20 @@ echo
fi
%post
%systemd_post scylla-jmx.service
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl preset scylla-jmx.service ||:
fi
/usr/bin/systemctl daemon-reload ||:
%preun
%systemd_preun scylla-jmx.service
if [ $1 -eq 0 ] ; then
/usr/bin/systemctl --no-reload disable scylla-jmx.service ||:
/usr/bin/systemctl stop scylla-jmx.service ||:
fi
%postun
%systemd_postun scylla-jmx.service
/usr/bin/systemctl daemon-reload ||:
%clean
rm -rf $RPM_BUILD_ROOT

View File

@ -172,7 +172,7 @@ public class APIBuilder extends MBeanServerBuilder {
logger.log(SEVERE, "Unexpected error.", x);
}
} finally {
lock.writeLock().lock();
lock.writeLock().unlock();
}
}
}