Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Conversation

@domdom82
Copy link
Contributor

@domdom82 domdom82 commented Feb 23, 2022

  • A short explanation of the proposed change:
    This is just a small fix to be able to run gorouter under MacOS for development purposes.
    The PR changes the fd_monitor so that it distinguishes between Linux (which has /proc) and MacOS (which has not).

As a result, this annoying error message will be gone:

{"log_level":3,"timestamp":1645613724.0060532,"message":"error-reading-filedescriptor-path","source":"gorouter.stdout.FileDescriptor","data":{"error":"open /proc/<pid>/fd: no such file or directory"}}
(repeats every 5s)

Instead of outright removing the fd_monitor functionality, I've opted to make it work under MacOS by shelling out to lsof to count the open file descriptors. Since gorouter will be deployed to Linux in production scenarios, this may be overkill but I wanted to retain the original functionality and not just turn it off. However, I can also just put in a no-op to turn off the error message instead.

  • An explanation of the use cases your change solves
    It allows to develop gorouter under MacOS without breaking the fd_monitor

  • Instructions to functionally test the behavior change using operator interfaces (BOSH manifest, logs, curl, and metrics)

  1. go build on MacOS
  2. nats-server &
  3. ./gorouter
  • Expected result after the change
    Gorouter starts up, connects to natsd and shows no error messages

  • Current result before the change
    Gorouter starts up, connects to natsd and keeps logging the above error message every 5s

  • Links to any other associated PRs

  • I have viewed signed and have submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using scripts/run-unit-tests-in-docker from routing-release.

  • (Optional) I have run Routing Acceptance Tests and Routing Smoke Tests on bosh lite

  • (Optional) I have run CF Acceptance Tests on bosh lite

@ameowlia
Copy link
Member

LGTM! Apologizes for the wait.

@ameowlia ameowlia merged commit daadc72 into cloudfoundry:main May 31, 2022
@ameowlia
Copy link
Member

Bumped in routing-release: cloudfoundry/routing-release@b8c7078

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants