one icon indicating copy to clipboard operation
one copied to clipboard

onemonitord parsing arguments doesn't work

Open paczerny opened this issue 3 years ago • 1 comments

Description Unable to debug startup of onemonitord, if I run it from command line: /usr/lib/one/mads/onemonitord --config /etc/one/monitord.conf --oned-config /etc/one/oned.conf There are 2 issues:

  • oned pass all arguments to onemonitord as a single string, running it from command line the onemonitord segfaults trying to read the arguments
  • onemonitord doesn't handle correctly absolute paths to configs /etc/one/monitord.conf

Expected behavior Never segfault. Able to pass absolute path as argument

Details

  • Affected Component: Monitoring
  • Version: 6.0+

Additional context Check also relative paths in the form ../folder/filename.conf

Progress Status

  • [ ] Branch created
  • [ ] Code committed to development branch
  • [ ] Testing - QA
  • [ ] Documentation
  • [ ] Release notes - resolved issues, compatibility, known issues
  • [ ] Code committed to upstream release/hotfix branches
  • [ ] Documentation committed to upstream release/hotfix branches

paczerny avatar Feb 14 '22 11:02 paczerny

This issue come up from forum https://forum.opennebula.io/t/onemonitord-segfault-on-6-0-debian-10/10322 User mentions there some silent onemonitord error on DB connection, without properly reporting to /var/log/one/monitor.log The most important think of this issue should be to always report failure to /var/log/monitor.log

paczerny avatar Feb 14 '22 21:02 paczerny

PRs:

paczerny avatar Dec 08 '22 08:12 paczerny