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

datadog-agent: panic: must be called from a bundle #299469

Open
teto opened this issue Mar 27, 2024 · 4 comments
Open

datadog-agent: panic: must be called from a bundle #299469

teto opened this issue Mar 27, 2024 · 4 comments

Comments

@teto
Copy link
Member

teto commented Mar 27, 2024

Describe the bug

I tried to update a server with nixos-unstable and now the datadog agent and now journalctl -b0 -u datadog-agent.service -e spouts

Mar 27 10:55:36 azure1 datadog-agent-start[814097]: panic: must be called from a bundle (comp/<bundle>/bundle.go)
Mar 27 10:55:36 azure1 datadog-agent-start[814097]: goroutine 1 [running]:
Mar 27 10:55:36 azure1 datadog-agent-start[814097]: github.com/DataDog/datadog-agent/pkg/util/fxutil.getBundleName()
Mar 27 10:55:36 azure1 datadog-agent-start[814097]:         github.com/DataDog/datadog-agent/pkg/util/fxutil@v0.50.3/createcomponent.go:89 +0xd6
Mar 27 10:55:36 azure1 datadog-agent-start[814097]: github.com/DataDog/datadog-agent/pkg/util/fxutil.Bundle(...)
Mar 27 10:55:36 azure1 datadog-agent-start[814097]:         github.com/DataDog/datadog-agent/pkg/util/fxutil@v0.50.3/createcomponent.go:66
Mar 27 10:55:36 azure1 datadog-agent-start[814097]: github.com/DataDog/datadog-agent/comp/metadata.init()
Mar 27 10:55:36 azure1 datadog-agent-start[814097]:         <autogenerated>:1 +0x226
Mar 27 10:55:36 azure1 systemd[1]: datadog-agent.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

This concerns the
ExecStart=/nix/store/802bsc7gslqhl2by467fkscnx5dlbbip-unit-script-datadog-agent-start/bin/datadog-agent-start
of the unit, which is quite short

set -e
export DD_API_KEY=$(head -n 1 /run/secrets/datadog)
exec /nix/store/3a8qwg6d3d3030ak35pxg9ildikfm2qz-datadog-agent-7.50.3/bin/agent run -c /etc/datadog-agent/datadog.yaml

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

current unstable

Add a 👍 reaction to issues you find important.

@teto
Copy link
Member Author

teto commented Apr 23, 2024

cc @thoughtpolice @domenkozar

@teto
Copy link
Member Author

teto commented May 2, 2024

tried to bump the package to 7.53.0 but got

go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
go: downloading modernc.org/token v1.1.0
go: downloading lukechampine.com/uint128 v1.2.0
go: downloading modernc.org/strutil v1.1.3
buildPhase completed in 45 seconds
Running phase: installPhase
error: illegal path references in fixed-output derivation '/nix/store/2n4s53jfgxr0d1nk404cmy8aggk4mnc0-datadog-agent-7.53.0-go-modules.drv'
note: keeping build directory '/tmp/nix-build-datadog-agent-7.53.0-go-modules.drv-1'
error: 1 dependencies of derivation '/nix/store/pv5ra379zr7sqi1jrm5ypvncsv9c78xc-datadog-agent-7.53.0.drv' failed to build

@ryanrasti
Copy link
Contributor

I ran into this issue too. It's almost certainly this issue coupled with the fact that the default go builder is the unsupported version.

I was able to workaround by downgrading versions via:

pkgs.datadog-agent.override { buildGoModule = pkgs.buildGo121Module; }

@teto
Copy link
Member Author

teto commented May 15, 2024

it worked beautifully ty !

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

No branches or pull requests

2 participants