-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
quadlet: Add a network requirement on .image and .containers units #22057
quadlet: Add a network requirement on .image and .containers units #22057
Conversation
aa7b604
to
d2d5b1e
Compare
Cockpit tests failed for commit aa7b60454692c7f0b502ce3c9d749a7ece5ce3aa. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit d2d5b1e7755f736dafcc64ab2b04bde5696dba71. @martinpitt, @jelly, @mvollmer please check. |
LGTM |
The specific code LGTM. But, it addresses only the In addition, while the documentation states that setting |
@ygalblum I am looking at adding another test to verify that I started to add |
@jbtrystram how about |
@ygalblum neat suggestion, thanks ! |
c26db33
to
2b45a19
Compare
Cockpit tests failed for commit 2b45a19b1c52b8765721f07c11be5a2380fc6c39. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit c26db33125b2b5f044d4d016d3642d3f7508b0b4. @martinpitt, @jelly, @mvollmer please check. |
added a comment to the issue but linking it here: |
@jbtrystram What is going on with this PR? |
@rhatdan This is something i am working on my spare time and i hadn't had a lot of that lately, sorry. |
2b45a19
to
03ad189
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
03ad189
to
b954c6f
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
@ygalblum I picked that up and fixed it. The
However the test code with that I tried to add some debug statements in the test code but they're not printed when running |
Another two tests are failing since they already check the
|
f68dc4d
to
2ad505d
Compare
/ok-to-test |
/retest |
401a1ec
to
69a7343
Compare
@ygalblum I rebased this to see if that help with the tests. |
test_fixes.txt
|
@ygalblum I got confused by your patch because I am 100% sure I already fixed those tests earlier. I think I messed up the rebase yesterday and pushed an out of date branch |
69a7343
to
401a1ec
Compare
yeah, that's better. I found my previous work on another machine. The test failure is related to buildah :
|
If a container unit starts on boot with a dependency on `default.target` the image unit may start too soon, before network is ready. This cause the unit to fail to pull the image. - Add a dependency on `network-online.target` to make sure image pulls don't fail. See containers#21873 - Document the hardcoded dependency on `network-online.target` for images unit and explain how it can be overriden if necessary. - tests/e2e/quadlet: Add `assert-last-key-regex` Required to test the `After=` override in [Unit] section See containers#22057 (comment) - quadlet/unitfile: add a prepenUnitLine method Requirements on networks should be inserted at the top of the section so the user can override them. Signed-off-by: jbtrystram <[email protected]>
401a1ec
to
ad1d3f8
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jbtrystram, ygalblum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I don't think this failure have anything to do with my PR :
|
@containers/podman-maintainers PTAL |
Known flake, restarted |
everything passed ! Can I get a LGTM ? |
LGTM. This is probably good for inclusion in 5.1 |
/lgtm |
/lgtm |
If a container unit starts on boot with a dependency on
default.target
the image unit may start too soon, before network is ready. This cause
the unit to fail to pull the image.
Add a dependency on
network-online.target
to make sure image pullsdon't fail.
Does this PR introduce a user-facing change?
yes
Fixes #21873