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
base: main
Are you sure you want to change the base?
Conversation
aa7b604
to
d2d5b1e
Compare
Cockpit tests failed for commit aa7b604. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit d2d5b1e. @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 |
Required to test the `After=` override in [Unit] section See containers#22057 (comment)
@ygalblum neat suggestion, thanks ! |
Required to test the `After=` override in [Unit] section See containers#22057 (comment) Signed-off-by: jbtrystram <jbtrystram@redhat.com>
c26db33
to
2b45a19
Compare
Cockpit tests failed for commit 2b45a19. @martinpitt, @jelly, @mvollmer please check. |
Cockpit tests failed for commit c26db33. @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. |
Required to test the `After=` override in [Unit] section See containers#22057 (comment) Signed-off-by: jbtrystram <jbtrystram@redhat.com>
2b45a19
to
03ad189
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
Required to test the `After=` override in [Unit] section See containers#22057 (comment) Signed-off-by: jbtrystram <jbtrystram@redhat.com>
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
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 <jbtrystram@redhat.com>
2ad505d
to
0c1d177
Compare
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 <jbtrystram@redhat.com>
0c1d177
to
4ee5e07
Compare
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 <jbtrystram@redhat.com>
2f54442
to
401a1ec
Compare
Thanks @ygalblum for the help. |
[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 |
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