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

Add logging for container instances #2295

Merged
merged 14 commits into from
Nov 21, 2024
Merged

Add logging for container instances #2295

merged 14 commits into from
Nov 21, 2024

Conversation

JimMadge
Copy link
Member

@JimMadge JimMadge commented Nov 15, 2024

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).

🚦 Depends on

⤴️ Summary

🌂 Related issues

Contributes to #1922

🔬 Tests

Tested in a new deployment, screenshots below.

Copy link

github-actions bot commented Nov 15, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/infrastructure/programs
  declarative_sre.py 213
  data_safe_haven/infrastructure/programs/sre
  apt_proxy_server.py 39
  clamav_mirror.py 36
  gitea_server.py 60
  hedgedoc_server.py 63
  identity.py 45
  remote_desktop.py 70
  software_repositories.py 44
  user_services.py 63
Project Total  

This report was generated by python-coverage-comment-action

@JimMadge JimMadge self-assigned this Nov 18, 2024
@JimMadge
Copy link
Member Author

Logs are ingested into the log analytics workspace.
There are event logs from the container instance (container started, image pulled, bootloop occurring) and not the output of the container process.

Screenshot 2024-11-19 at 10 38 33

And container process logs

Screenshot 2024-11-19 at 10 43 15

@JimMadge JimMadge marked this pull request as ready for review November 19, 2024 12:06
@JimMadge JimMadge requested review from a team as code owners November 19, 2024 12:06
@JimMadge JimMadge mentioned this pull request Nov 20, 2024
4 tasks
Copy link
Member

@jemrobinson jemrobinson left a comment

Choose a reason for hiding this comment

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

LGTM and this is definitely worth merging on its own. However, is it possible to get the container logs into the workspace too? They're more interesting than logging when containers turn on and off (which is unlikely to be very useful to many people).

@JimMadge
Copy link
Member Author

LGTM and this is definitely worth merging on its own. However, is it possible to get the container logs into the workspace too? They're more interesting than logging when containers turn on and off (which is unlikely to be very useful to many people).

Yes, they are there too 🚀

@JimMadge JimMadge merged commit 1a9b6bf into develop Nov 21, 2024
11 checks passed
@JimMadge JimMadge deleted the container_logs branch November 21, 2024 11:31
@jemrobinson
Copy link
Member

@JimMadge: does this include logs from terminated containers (which are otherwise inaccessible)?

@JimMadge
Copy link
Member Author

Yes, as long as the workspace gets the log it is kept there.

@JimMadge JimMadge mentioned this pull request Nov 25, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants