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

Container reconfiguration is broken #930

Closed
wkz opened this issue Feb 5, 2025 · 3 comments · Fixed by #955
Closed

Container reconfiguration is broken #930

wkz opened this issue Feb 5, 2025 · 3 comments · Fixed by #955
Assignees
Labels
bug Something isn't working cn:styx
Milestone

Comments

@wkz
Copy link
Contributor

wkz commented Feb 5, 2025

Current Behavior

After a container has been launched any further reconfiguration is not applied until after reboot or a manual container {stop, setup, start} cycle.

Expected Behavior

  1. Setup docker://nginx:alpine
  2. Activate

As expected, the default landing page is accessible

  1. Add a content mount with a custom landing page
  2. Activate

The custom landing page is expected to be seen, but the default is still shown

Steps To Reproduce

No response

Additional information

The root cause is that the download/setup phase for the container is run by finit as a task. So unless the runlevel changes (which it does not during a normal reconfig-cycle), the setup phase is not run again.

@wkz wkz added bug Something isn't working triage Pending investigation & classification (CCB) labels Feb 5, 2025
@troglobit troglobit self-assigned this Feb 7, 2025
@troglobit troglobit removed the triage Pending investigation & classification (CCB) label Feb 7, 2025
@troglobit troglobit moved this to In progress in Infix & C:o Feb 7, 2025
@troglobit
Copy link
Contributor

@jovatn
Copy link
Contributor

jovatn commented Feb 10, 2025

@troglobit Milestone 25.02? I will assume this was the intention during last CCB, and add it to 25.02 now.

@jovatn jovatn added this to the Infix v25.02 milestone Feb 10, 2025
@troglobit
Copy link
Contributor

@troglobit Milestone 25.02? I will assume this was the intention during last CCB, and add it to 25.02 now.

Indeed, thanks for keeping track 🙏

troglobit added a commit that referenced this issue Feb 23, 2025
When updating a container configuration we need to rerun the setup stage
of the container.  However, a run/task in Finit only runs once for each
runlevel, meaning changes at runtime of a container was broken.

This is a refactor of the container script to allow it to also run as a
pre:script in the Finit setup stage of a sysv/service.  Also included is
a fix to the timeout/retry handling in case the container setup fails.
We must call `read -t 60` *before* calling `ip monitor`, otherwise it
will not be called until `ip monitor` returns.

This patch requires Finit v4.9, or later.

Fixes #930

Signed-off-by: Joachim Wiberg <[email protected]>
troglobit added a commit that referenced this issue Feb 23, 2025
Add new test step that adds a content mount to /var/www/index.html to
verify that changes to a running container are activated.

This test pass was previously part of the container bridge test, but
was moved here to allow that test to focus on bridge specific checks.

Issue #930

Signed-off-by: Joachim Wiberg <[email protected]>
@troglobit troglobit mentioned this issue Feb 23, 2025
17 tasks
troglobit added a commit that referenced this issue Feb 23, 2025
When updating a container configuration we need to rerun the setup stage
of the container.  However, a run/task in Finit only runs once for each
runlevel, meaning changes at runtime of a container was broken.

This is a refactor of the container script to allow it to also run as a
pre:script in the Finit setup stage of a sysv/service.  Also included is
a fix to the timeout/retry handling in case the container setup fails.
We must call `read -t 60` *before* calling `ip monitor`, otherwise it
will not be called until `ip monitor` returns.

This patch requires Finit v4.9, or later.

Fixes #930

Signed-off-by: Joachim Wiberg <[email protected]>
troglobit added a commit that referenced this issue Feb 23, 2025
Add new test step that adds a content mount to /var/www/index.html to
verify that changes to a running container are activated.

This test pass was previously part of the container bridge test, but
was moved here to allow that test to focus on bridge specific checks.

Issue #930

Signed-off-by: Joachim Wiberg <[email protected]>
troglobit added a commit that referenced this issue Feb 23, 2025
When updating a container configuration we need to rerun the setup stage
of the container.  However, a run/task in Finit only runs once for each
runlevel, meaning changes at runtime of a container was broken.

This is a refactor of the container script to allow it to also run as a
pre:script in the Finit setup stage of a sysv/service.  Also included is
a fix to the timeout/retry handling in case the container setup fails.
We must call `read -t 60` *before* calling `ip monitor`, otherwise it
will not be called until `ip monitor` returns.

This patch requires Finit v4.9, or later.

Fixes #930

Signed-off-by: Joachim Wiberg <[email protected]>
troglobit added a commit that referenced this issue Feb 23, 2025
Add new test step that adds a content mount to /var/www/index.html to
verify that changes to a running container are activated.

This test pass was previously part of the container bridge test, but
was moved here to allow that test to focus on bridge specific checks.

Issue #930

Signed-off-by: Joachim Wiberg <[email protected]>
troglobit added a commit that referenced this issue Feb 24, 2025
Add new test step that adds a content mount to /var/www/index.html to
verify that changes to a running container are activated.

This test pass was previously part of the container bridge test, but
was moved here to allow that test to focus on bridge specific checks.

Issue #930

Signed-off-by: Joachim Wiberg <[email protected]>
@wkz wkz closed this as completed in 3811df9 Feb 25, 2025
@wkz wkz closed this as completed in #955 Feb 25, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Infix & C:o Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cn:styx
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants