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

supervisor does not consistently use property "storage.directory" to store effective yaml, agent.log #34341

Closed
cforce opened this issue Jul 31, 2024 · 6 comments · Fixed by #34348
Assignees
Labels
bug Something isn't working cmd/opampsupervisor

Comments

@cforce
Copy link

cforce commented Jul 31, 2024

Component(s)

cmd/opampsupervisor

What happened?

Observations from testing

config file changes
YAML

storage:
  directory: /home/root/myfolder/super_check

contents of /home/root/myfolder/super_check after running supervisor

root@:~/super# ls /home/root/myfolder/super_check
persistent_state.yaml

Contents of directory from where supervisor was run

root@:~/super# ls
agent.log         effective.yaml    otelcol supervisor     supervisor.yaml

storage: what we give applies for persistent_state.yaml file not effective yaml file.
effective.yaml file is still created in same directory from where supervisor was run

Collector version

master

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@cforce cforce added bug Something isn't working needs triage New item requiring triage labels Jul 31, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@BinaryFissionGames
Copy link
Contributor

Yeah, we definitely should be putting any files the supervisor creates under the storage directory. I'll take this on.

@cforce
Copy link
Author

cforce commented Aug 12, 2024

After a first test it look like "effective.yaml" file is still in same directory as supervisor and not in the configured one.
The change shall cover all files which are created to be located only in the configured folder, shouldn't' it?
@BinaryFissionGames

@BinaryFissionGames
Copy link
Contributor

After a first test it look like "effective.yaml" file is still in same directory as supervisor and not in the configured one. The change shall cover all files which are created to be located only in the configured folder, shouldn't' it? @BinaryFissionGames

It should cover all files, yeah.

I've given it another test off main (commit 7f79eba), and I'm seeing effective.yaml end up in my configured storage directory.

Can you confirm the commit you've built the supervisor off of? If you're still seeing the issue, it'd also be helpful to get a config for the supervisor that reproduces the issue. I'm also curious if this is happening on startup or on reconfigure.

@cforce
Copy link
Author

cforce commented Aug 12, 2024

based on tagged src i used git clone --branch v0.106.1 --depth 1 https://github.com/open-telemetry/opentelemetry-collector-contrib.git

server:
  endpoint: ws://localhost:9082/

capabilities:
  reports_effective_config: true
  reports_own_metrics: true
  reports_health: true
  accepts_remote_config: true
  reports_remote_config: true

storage:
  directory: ./yaml

agent:
  executable: ./otelcol

@BinaryFissionGames
Copy link
Contributor

Ah, that explains it. The fix isn't in a release yet, it'll release in v0.107.0 (which should be happening today/tomorrow, from what I understand)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmd/opampsupervisor
Projects
None yet
3 participants