scylla_fstrim_setup: start scylla-fstrim.timer on setup

Currently, scylla_fstrim_setup does not start scylla-fstrim.timer and
just enables it, so the timer starts only after rebooted.
This is incorrect behavior, we start start it during the setup.

Also, unmask is unnecessary for enabling the timer.

Fixes #14249

Closes #14252
This commit is contained in:
Takuya ASADA
2023-06-15 08:59:01 +09:00
committed by Avi Kivity
parent 1e851262f2
commit c70a9cbffe

View File

@@ -16,7 +16,7 @@ if __name__ == '__main__':
if os.getuid() > 0:
print('Requires root permission.')
sys.exit(1)
systemd_unit('scylla-fstrim.timer').unmask()
systemd_unit('scylla-fstrim.timer').enable()
systemd_unit('scylla-fstrim.timer').start()
if is_redhat_variant() or is_arch() or is_suse_variant():
systemd_unit('fstrim.timer').disable()