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

Podman Improvements #5783

Merged
merged 3 commits into from
Oct 26, 2023
Merged

Conversation

clebergnu
Copy link
Contributor

This is a collection of small improvements and one fix to a race condition, where the state of the container (and thus the task) would not take into account the transition from "created" to "running".

@mr-avocado
Copy link

mr-avocado bot commented Oct 20, 2023

Dear contributor,
Avocado is currently under sprint #103, which is due to release an LTS (Long Term Stability) release.
Please avoid merging changes that do not fall into these categories:

  • Bug fixes
  • Usability Improvements
  • Documentation updates

As for the Avocado utility modules (“avocado.utils”) it is OK to introduce new functionality,
but changes to the existing APIs (including interface and behavior) should be avoided.
These kind of changes should wait until sprint #104.

@clebergnu clebergnu marked this pull request as draft October 23, 2023 12:43
@clebergnu clebergnu force-pushed the podman_improvs branch 2 times, most recently from 404ab40 to 11e237e Compare October 24, 2023 18:35
@clebergnu clebergnu marked this pull request as ready for review October 25, 2023 01:23
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @clebergnu, thank you for this update. Overall the changes LGTM, there is just one small issue with _podman variable, I think it should be part of different commit. Can you please update it? Thank you.

avocado/plugins/spawners/podman.py Show resolved Hide resolved
@@ -142,6 +142,17 @@ def podman_version(self):
if self._podman_version == (None, None, None):
self._podman_version = self._get_podman_version()
return self._podman_version
self._podman = None
Copy link
Contributor

Choose a reason for hiding this comment

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

This will never be used, I think it is a mistake.

@@ -142,7 +143,6 @@ def podman_version(self):
if self._podman_version == (None, None, None):
self._podman_version = self._get_podman_version()
return self._podman_version
self._podman = None
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see that you removed it here. Can you please add this to the proper commit? Thank you.

There's significant change in how to get some information from
containers under Podman version 3.x.x and 4.x.x.

This adds a property to the spawner that will reflect the Podman
version being used, and logs it on initialization.

Signed-off-by: Cleber Rosa <[email protected]>
@clebergnu
Copy link
Contributor Author

Hi @clebergnu, thank you for this update. Overall the changes LGTM, there is just one small issue with _podman variable, I think it should be part of different commit. Can you please update it? Thank you.

Good catch! It was a bad rebase on my side.

I've pushed an updated version.

This updates the method that is used to detect if the container is
running, adding a (by default, one time) timeout between the "created"
and "running" state.

Signed-off-by: Cleber Rosa <[email protected]>
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

LGTM

@richtja richtja merged commit 2c089cc into avocado-framework:master Oct 26, 2023
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants