Skip to content

Commit

Permalink
Disable journal entry fetch from systemctl call
Browse files Browse the repository at this point in the history
systemctl has known performance issues with large numbers of journal files.

See systemd/systemd#2460.

Changing to use `is-active` to improve call speed when systemctl is called. This
avoids first systemctl call issues that may result in high latency for the mount
as systemctl indexes all journal files. Given that mount.efs is only looking for
the exit code of the command and does not care about the journal entries, there
is no loss of usability by adding the flag.
  • Loading branch information
halfdime-code authored and Cappuccinuo committed Dec 2, 2022
1 parent 16e6852 commit e629560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mount_efs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ def check_network_target(fs_id):
with open(os.devnull, "w") as devnull:
if not check_if_platform_is_mac():
rc = subprocess.call(
["systemctl", "status", "network.target"],
["systemctl", "is-active", "network.target"],
stdout=devnull,
stderr=devnull,
close_fds=True,
Expand Down

0 comments on commit e629560

Please sign in to comment.