Skip to content

DisableCloudLogging doesn't seem to work when deployed to railway #1016

Closed

Description

@maddsua

Describe the bug
DisableCloudLogging doesn't seem to work when deployed to railway

Cloudprober Version
v0.13.9

To Reproduce
Steps to reproduce the behavior:

  1. Deploy to railway.com using a Dockerfile
  2. Set both CLOUDPROBER_DISABLE_CLOUD_LOGGING=true and --disable_cloud_logging
  3. Observe over 9000 various errors related to google cloud not being connected

Additional context
Technically railway is being run on top of google cloud, I expected this project to be able to handle such a case

Activity

  1. added
    bug
    on Feb 23, 2025
  2. maddsua commented on Feb 23, 2025

    @maddsua
    Author

    For more context:

    Dockerfile:

    from ghcr.io/cloudprober/cloudprober:v0.13.9
    copy ./probe.cfg /
    entrypoint /cloudprober --config_file=/probe.cfg --disable_cloud_logging --cloud_metadata=none --debug_log

    Logs:

    [Region: us-west1]
    Using Detected Dockerfile
    ...
    Build time: 1.99 seconds
    Deploy complete
    Starting Container
    time=2025-02-23T12:58:51.506Z level=WARN source=logger/logger.go:303 msg="Error getting project id for google cloud logging: Get \"http://169.254.169.254/computeMetadata/v1/project/project-id\": dial tcp 169.254.169.254:80: i/o timeout, will skip. Set flag --disable_cloud_logging to explicitly disable cloud logging." system=cloudprober component=global-resolver
    time=2025-02-23T12:59:04.531Z level=WARN source=logger/logger.go:303 msg="Error getting project id for google cloud logging: Get \"http://169.254.169.254/computeMetadata/v1/project/project-id\": dial tcp 169.254.169.254:80: i/o timeout, will skip. Set flag --disable_cloud_logging to explicitly disable cloud logging." system=cloudprober component=global-resolver
    time=2025-02-23T12:59:04.532Z level=ERROR+4 source=cmd/cloudprober/main.go:151 msg="Error initializing cloudprober. Err: error processing config. Err: proto: syntax error (line 2:3): missing field separator :" system=cloudprober component=global
    ...
    
  3. manugarg commented on Feb 27, 2025

    @manugarg
    Contributor

    Hello @maddsua, thanks for filing this. I could reproduce this, but I found that there are only 2 such log lines, both coming from global-resolver. I've an idea of what might be going on here: race between init and flags parsing -- I'll confirm that and send a fix.

  4. manugarg commented on Feb 27, 2025

    @manugarg
    Contributor

    Fix in #1020.

  5. added this to the v0.14.0 milestone on Feb 27, 2025
  6. manugarg commented on Feb 27, 2025

    @manugarg
    Contributor

    Marking it closed. It will go out in the next release.

  7. maddsua commented on Feb 27, 2025

    @maddsua
    Author

    Perfect, thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions