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

Unnecessary logs when starting/ending storage tasks #195

Open
nirs opened this issue May 23, 2022 · 0 comments
Open

Unnecessary logs when starting/ending storage tasks #195

nirs opened this issue May 23, 2022 · 0 comments
Labels
logs Enhancement or fixes to logs storage

Comments

@nirs
Copy link
Member

nirs commented May 23, 2022

When starting and ending tasks, we log unhelpful logs:

2022-05-23 12:29:03,998+0300 INFO  (tasks/9) [storage.threadpool.workerthread] START task 539688e9-a899-4d15-9a30-acd0563e5bf0 (cmd=<bound method Task.commit of <vdsm.storage.task.Task object at 0x7f2cb064c7f0>>, args=None) (threadPool:146)

2022-05-23 12:29:04,069+0300 INFO  (tasks/9) [storage.volume] Request to reduce LV cd981010-ac48-49e1-b28b-cbde06c085bf of image 4b72aba2-0668-463d-b856-7f0f7406b6a2 in VG bafd0f16-9aba-4f9f-ba90-46d3b8a29157 with size = 134217728 allowActive = True (blockVolume:692)

2022-05-23 12:29:04,069+0300 INFO  (tasks/9) [storage.lvm] Reducing LV bafd0f16-9aba-4f9f-ba90-46d3b8a29157/cd981010-ac48-49e1-b28b-cbde06c085bf to 128 megabytes (force=True) (lvm:1704)

2022-05-23 12:29:04,160+0300 WARN  (tasks/9) [storage.lvm] Command ['/usr/sbin/lvm', 'lvreduce', '--devices', '/dev/mapper/0QEMU_QEMU_HARDDISK_data-fc-01,/dev/mapper/0QEMU_QEMU_HARDDISK_data-fc-02,/dev/mapper/0QEMU_QEMU_HARDDISK_data-fc-03', '--config', 'devices {  preferred_names=["^/dev/mapper/"]  ignore_suspended_devices=1  write_cache_state=0  disable_after_error_count=3    hints="none"  obtain_device_list_from_udev=0 } global {  prioritise_write_locks=1  wait_for_locks=1  use_lvmpolld=1 } backup {  retain_min=50  retain_days=0 }', '--autobackup', 'n', '--force', '--size', '128m', 'bafd0f16-9aba-4f9f-ba90-46d3b8a29157/cd981010-ac48-49e1-b28b-cbde06c085bf'] succeeded with warnings: ['  WARNING: Reducing active and open logical volume to 128.00 MiB.', '  THIS MAY DESTROY YOUR DATA (filesystem etc.)'] (lvm:358)

2022-05-23 12:29:04,192+0300 INFO  (tasks/9) [storage.threadpool.workerthread] FINISH task 539688e9-a899-4d15-9a30-acd0563e5bf0 (threadPool:148)

In this case the actual operation was logged by the task:

2022-05-23 12:29:04,069+0300 INFO  (tasks/9) [storage.volume] Request to reduce LV ...

And in lvm:

2022-05-23 12:29:04,069+0300 INFO  (tasks/9) [storage.lvm] Reducing LV ...

The task START/FINISH logs do not add interesting info, except the task id, which
is the only way to locate a task after a task is started by the API.

Fix:

  • Include the task id in all task logs, so we can follow all task logs using the task id and we don't need the start/finish logs.
  • Change the START/FINISH logs to DEBUG level
@nirs nirs added storage good first issue Good issue for a new contributor logs Enhancement or fixes to logs and removed good first issue Good issue for a new contributor labels May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logs Enhancement or fixes to logs storage
Projects
None yet
Development

No branches or pull requests

1 participant