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

[dev.icinga.com #9236] PerfdataWriter: Better failure handling for file renames across file systems #2993

Closed
icinga-migration opened this issue May 7, 2015 · 14 comments
Labels
area/metrics General metrics handling enhancement New feature or request
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/9236

Created by cark on 2015-05-07 08:43:53 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-05-11 07:33:51 +00:00)
Target Version: 2.4.8
Last Update: 2016-05-11 07:33:51 +00:00 (in Redmine)

Backport?: Not yet backported
Include in Changelog: 1

If [service|host]_temp_path and [service|host]_perfdata_path are not on the same mountpoint, performance data willnot be rotated.

Run into this problem while converting 60K services to Icinga2 and used 2 different tmpfs mountpoints for it.

Attachments

Changesets

2016-05-11 07:29:32 +00:00 by (unknown) 7dbd665

Throw exception if PerfdataWriter::RotateFile fails to rename from host_temp_path to host_perfdata_path (and same for service)

This can happen if the two paths are not on the same mount-point.

fixes #9236

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>

2016-05-11 07:32:37 +00:00 by gbeutner f7e1e4e

Update .mailmap for Jason Youngh

refs #9236

2016-05-12 09:09:49 +00:00 by (unknown) 88806b0

Throw exception if PerfdataWriter::RotateFile fails to rename from host_temp_path to host_perfdata_path (and same for service)

This can happen if the two paths are not on the same mount-point.

fixes #9236

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>

2016-05-12 09:11:00 +00:00 by gbeutner 48ea880

Update .mailmap for Jason Youngh

refs #9236

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-05-08 08:08:23 +00:00

  • Subject changed from PerfDataWrite to PerfdataWriter: Different filesystems for temp and data path don't work

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-05-13 11:59:21 +00:00

Out of curiosity, why were you using tmpfs?

@icinga-migration
Copy link
Author

Updated by cark on 2015-05-13 12:43:13 +00:00

gunnarbeutner wrote:

Out of curiosity, why were you using tmpfs?

My Icinga 1 installation used one so i planned to use it for icinga2 also.
All in all i have about 14k hosts and ~60k services with performance data. Its a lot less IO if i use tmpfs (ramdisk) for temp files like perfdata until it is catched by npcd and written to the rrd files.

To use ramdisk is written in "Optimize Icinga Performance" (https://wiki.icinga.org/display/howtos/Optimize+Icinga+Performance)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-18 09:25:43 +00:00

  • Tracker changed from Bug to Feature
  • Subject changed from PerfdataWriter: Different filesystems for temp and data path don't work to PerfdataWriter: Explain that temp and data path must be on the same mount point
  • Category changed from Perfdata to Documentation

@icinga-migration
Copy link
Author

Updated by jyoung15 on 2015-07-19 04:56:26 +00:00

I recently ran into this issue as well. The return value for the rename function in PerfdataWriter::RotateFile is not checked, so this error is silently ignored. Please add code to log a warning if rename returns an error (EXDEV errno 18 in this case).

@icinga-migration
Copy link
Author

Updated by jdonahue on 2015-09-08 22:19:10 +00:00

jyoung15 wrote:

I recently ran into this issue as well. The return value for the rename function in PerfdataWriter::RotateFile is not checked, so this error is silently ignored. Please add code to log a warning if rename returns an error (EXDEV errno 18 in this case).

I also ran into this problem recently when moving the perfdata files to a different file system, +1 for adding a warning if the rename fails.

@icinga-migration
Copy link
Author

Updated by jdonahue on 2015-09-08 23:34:23 +00:00

In addition, instead of rename, we should use use /bin/mv which works across file systems.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-09-09 08:17:56 +00:00

Patches welcome :)

@icinga-migration
Copy link
Author

Updated by jyoung15 on 2015-09-14 01:13:32 +00:00

  • File added PerfdataWriter-RotateFile-rename-9236.patch

Patch attached.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-04-07 12:08:07 +00:00

  • Subject changed from PerfdataWriter: Explain that temp and data path must be on the same mount point to PerfdataWriter: Better failure handling for file renames across file systems
  • Category changed from Documentation to Perfdata
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.5.0

Sorry for the late response. Thanks for the patch :)

We'll also need a custom validator which checks the same device for _temp_path and_perfdata_path (stat).

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-04-07 12:08:51 +00:00

  • Relates set to 11505

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-05-11 07:33:30 +00:00

  • Assigned to changed from mfriedrich to gbeutner
  • Target Version changed from 2.5.0 to 2.4.8

Eh, forget about the custom validator. I'm going to merge the patch. :)

@icinga-migration
Copy link
Author

Updated by Anonymous on 2016-05-11 07:33:51 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 7dbd665.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-05-18 12:00:46 +00:00

  • Relates set to 11801

@icinga-migration icinga-migration added enhancement New feature or request area/metrics General metrics handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.8 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics General metrics handling enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant