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

Unified agent host charm #437

Merged
merged 11 commits into from
Jan 9, 2025
Merged

Unified agent host charm #437

merged 11 commits into from
Jan 9, 2025

Conversation

plars
Copy link
Collaborator

@plars plars commented Jan 7, 2025

Description

We've actually been running this for a while now, but have held off on landing it because the old version of the charms were running in the devices lab still. It looks like it should be safe to merge now though!

Resolved issues

CERTTF-374

Documentation

Updated READMEs and deployment instructions

Web service API changes

N/A

Tests

This is currently used in our labs and has been running smoothly for a while now.

plars added 9 commits January 7, 2025 14:56
* Move run_with_logged_errors out of charm.py

* Update testflinger source and add action for it

* Add integration tests and docs for the update-testflinger action

* cleanup
* Write out the supervisord configs for all agents

* Update the supervisor services when configs/code is updated

* Update README for the agent charm with instructions for test/debug

* redirect stderr for all supervisord agents

* Fix charm to expect base64 encoded ssh keys as already documented

* important fix - reservations won't work without this

Any script (like ssh-copy-id) which uses $HOME, or ~ or anything like
that won't work without this. Although supervisord execs the process as
the specified user, there's no shell. So we need to set certain vars
like this in the supervisord config.

* Also install the device-connector so that things like reserve work

* Rename ssh config options for better consistency

* Update testflinger-agent-host-charm README
* Add agent-host terraform module

* Separate variables from main.tf
* Fix some formatting issues in the README.md

* Add variables to build constraints to the agent-host terraform module
@plars plars requested a review from a team January 7, 2025 21:25
Copy link
Contributor

@nancyc12 nancyc12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super great work! I appreciate the benefit brought by the unified agent host charm :)

I only have a small suggestion.
Plus, it would be nice to resolve the open files limit of supervisorctl that we've discussed. Below is the limit I put in supervisord.conf. As experimented, 336 agents would exceed the default limit of 1024. So it can be either lower than 65535 or we can just put it as a safe number.

[supervisord]
minfds=65535

@plars
Copy link
Collaborator Author

plars commented Jan 8, 2025

@nancyc12 for the minfds thing, I'm looking at doing that as a separate commit if that's ok. There's some other fixes/cleanups I'd like to do first, but I figured we could land this one for now since it's well tested at this point. Also it won't revert any change to the supervisord.conf that you made even if you deployed it

@plars plars requested a review from nancyc12 January 8, 2025 19:16
@plars
Copy link
Collaborator Author

plars commented Jan 8, 2025

@nancyc12 I also pushed a few more changes to fix some test issues

@plars plars merged commit 8ba0366 into main Jan 9, 2025
2 checks passed
@plars plars deleted the unified-agent-host-charm branch January 9, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants