Skip to content

Conversation

@timmc-edx
Copy link
Member

  • Use app user by default; may need to switch back to root at some point for ease of development, but for now let's try to keep it as similar as possible to stage and prod so that we can find issues sooner.
  • Document the situation, and note how to enter as root (same as for any container, but may be helpful in this uncommon situation).
  • Correct comment for FSIZE
  • Copy NPROC and PROXY defaults into settings for reference

This depends on edx/edx-arch-experiments#983, otherwise the service will start failing.


I've completed each of the following or determined they are not applicable:

  • Made a plan to communicate any major developer interface changes (or N/A)

- Use `app` user by default; may need to switch back to `root` at some
  point for ease of development, but for now let's try to keep it as
  similar as possible to stage and prod so that we can find issues sooner.
- Document the situation, and note how to enter as root (same as for any
  container, but may be helpful in this uncommon situation).
- Correct comment for `FSIZE`
- Copy `NPROC` and `PROXY` defaults into settings for reference

This depends on edx/edx-arch-experiments#983,
otherwise the service will start failing.
Copy link
Contributor

@robrap robrap left a comment

Choose a reason for hiding this comment

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

Minor comment.


If you need to debug the confinement, either because it is restricting too much or too little, a good strategy is to run ``tail -F /var/log/kern.log | grep codejail`` and watch for ``DENIED`` lines. You should expect to see several appear during service startup, as the service is designed to probe the confinement as part of its initial healthcheck.

Unlike other devstack services, this one runs as the ``app`` user rather than as ``root``. In order to enter the container as root, you can use ``docker compose exec -it --user root codejail bash`` rather than ``make codejail-shell``.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add something like the following from your PR description:

Although this isn't strictly needed to develop, it better matches our production environment.

@timmc-edx timmc-edx merged commit 1cd0fd8 into master Mar 19, 2025
4 of 14 checks passed
@timmc-edx timmc-edx deleted the timmc/cj-app branch March 19, 2025 16:36
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.

3 participants