Commit Graph

970 Commits

Author SHA1 Message Date
dependabot[bot] 06fdd1604a build(deps): bump github.com/containers/storage from 1.30.1 to 1.30.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.30.1 to 1.30.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.30.1...v1.30.2)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-10 08:18:56 -04:00
OpenShift Merge Robot 4646422800 Merge pull request #536 from rhatdan/event
Only close EventChannel if it has been created.
2021-05-10 07:12:53 -04:00
Daniel J Walsh 3528cdbf3f Only close eventchannel if it exists
We got some crashes in Fedora 34 testing.

Second part of this PR is to fix the config_test which is accitendtly
picking up a containers.conf settings from the host.  This change forces
the default settings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-10 06:17:32 -04:00
Daniel J Walsh 2af3bb7489 Merge pull request #534 from rhatdan/VERSION
Bump to v0.38.0
2021-05-07 10:47:51 -04:00
Daniel J Walsh db89288e21 Move to v0.38.1-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-07 10:46:53 -04:00
Daniel J Walsh e48b8a5ab0 Bump to v0.38.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-07 10:46:39 -04:00
OpenShift Merge Robot b13e599e4b Merge pull request #529 from vrothberg/transports
pull: simplify transports switch
2021-05-07 09:13:26 -04:00
OpenShift Merge Robot 3991f443f0 Merge pull request #531 from vrothberg/libimage-tests
libimage: add unit tests
2021-05-07 05:21:26 -04:00
OpenShift Merge Robot e49c5db4dd Merge pull request #533 from containers/dependabot/go_modules/github.com/docker/docker-20.10.6incompatible
build(deps): bump github.com/docker/docker from 20.10.3-0.20210216175712-646072ed6524+incompatible to 20.10.6+incompatible
2021-05-07 05:10:26 -04:00
dependabot[bot] ce19e08732 build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.3-0.20210216175712-646072ed6524+incompatible to 20.10.6+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/commits/v20.10.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-07 07:54:09 +00:00
OpenShift Merge Robot 16925320d9 Merge pull request #524 from vrothberg/libimage-events
libimage: add an events system
2021-05-06 14:34:49 -04:00
Valentin Rothberg bb4c4ab9c0 libimage: add an events system
Add an event system to libimage.  Callers can opt-in to using events by
requesting an event channel via `(*Runtime).EventChannel()`.  The
returned channel has a buffer of size 100 which should be sufficient
even under high loads.  But, to be on the safe side, writing an event
will time out after 2 seconds to prevent operations from blocking.

Currently, the only user of such an event system is Podman which will
need to convert the `Event` type to what's used internally in libpod.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-06 17:26:30 +02:00
Valentin Rothberg 3b721f41df libimage: add unit tests
This adds tests pulling and a framwork that can be used to add more
tests in the future.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-06 15:41:33 +02:00
Valentin Rothberg 60144cafa6 libimage: rename dockerTransport to registryTransport
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-06 12:11:31 +02:00
OpenShift Merge Robot 6f30c9b576 Merge pull request #528 from ktock/fix-64-name
Fix images tagged by 64 chars cannot be pulled when "docker://" prefix is ommitted
2021-05-06 06:04:21 -04:00
OpenShift Merge Robot 583aaafd32 Merge pull request #530 from containers/dependabot/go_modules/github.com/onsi/gomega-1.12.0
Bump github.com/onsi/gomega from 1.11.0 to 1.12.0
2021-05-06 06:03:22 -04:00
dependabot[bot] 6846d4d246 Bump github.com/onsi/gomega from 1.11.0 to 1.12.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.11.0...v1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-06 07:47:48 +00:00
OpenShift Merge Robot b3686a3081 Merge pull request #525 from vrothberg/image-tree
fix image tree
2021-05-06 03:16:21 -04:00
Valentin Rothberg f3faca2fb6 pull: simplify transports switch
Simplify the transports-sensitive dispatcher when pulling images and use
the default case for transports that do not require special casing.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-06 08:34:05 +02:00
ktock 1901fdfd48 Fix images tagged by 64 chars cannot be pulled when ommiting "docker://" prefix
Recently images tagged by 64 chars cannot be pulled when ommiting "docker://"
prefix. This commit fixes this issue.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-05-06 14:06:45 +09:00
OpenShift Merge Robot 4769b30832 Merge pull request #527 from rhatdan/cleanup
Add support for codespell, and fix issues found
2021-05-05 17:09:54 -04:00
Daniel J Walsh dee190ce4c Add support for codespell, and fix issues found
[NO TESTS NEEDED] This is just code cleanup

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-05-05 17:02:11 -04:00
OpenShift Merge Robot 2a05e3ca72 Merge pull request #526 from nalind/transports
libimage: restore the ability to pull from docker-daemon and tarball
2021-05-05 14:25:10 -04:00
Nalin Dahyabhai 89efe5cf33 libimage: restore the ability to pull from docker-daemon and tarball
Dropping support for these would be a regression in tools that switch to
this library.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-05-05 14:12:13 -04:00
OpenShift Merge Robot ba743c0fdb Merge pull request #518 from rhatdan/journald
Swap default logging to journald
2021-05-05 11:18:10 -04:00
Daniel J Walsh 8f0efa1fc0 Merge pull request #523 from containers/dependabot/go_modules/github.com/containers/image/v5-5.12.0
Bump github.com/containers/image/v5 from 5.11.1 to 5.12.0
2021-05-05 11:10:50 -04:00
Valentin Rothberg ea6846cfaf fix image tree
To remain backwards compatible with the old behavior of Podman, we need
to print the layers in the reverse order.  Also make sure that we branch
correctly when `traversChildren` is true (`--whatrequires` in Podman).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-05 16:48:32 +02:00
OpenShift Merge Robot 0f35284c97 Merge pull request #521 from mheon/add_default_subnet
Add support for creating default CNI network
2021-05-05 10:18:17 -04:00
OpenShift Merge Robot e2ed0d3c62 Merge pull request #522 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.16.2
Bump github.com/onsi/ginkgo from 1.16.1 to 1.16.2
2021-05-05 10:11:16 -04:00
dependabot[bot] b2f8b8380b Bump github.com/containers/image/v5 from 5.11.1 to 5.12.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.11.1 to 5.12.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.11.1...v5.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 07:49:50 +00:00
dependabot[bot] cb32aa43f4 Bump github.com/onsi/ginkgo from 1.16.1 to 1.16.2
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.16.1 to 1.16.2.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.16.1...v1.16.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-05 07:49:30 +00:00
Matthew Heon 02f33aa9cc Add a default network creation package
This package exposes a function for creating a default CNI
network configuration that can be used by Podman and Buildah.
This will allow us to stop shipping a default configuration file,
and instead create it on demand (once per Podman installation.
This allows for greater configurability by the user - set the
default subnet (and, later, default IPv6 subnet) in
containers.conf, and the config file will be created with those
settings.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-05-04 11:51:22 -04:00
Matthew Heon 85df6670fb Add ability to specify a subnet for the default network
This lays the foundation for c/common to be able to create the
default CNI configuration file itself.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-05-04 11:40:22 -04:00
Daniel J Walsh bd198b4d92 Merge pull request #519 from vrothberg/libimage-updates
libimage: follow-up changes
2021-05-03 15:34:05 -04:00
Valentin Rothberg bc6c57edb5 libimage: follow-up changes
The following changes were not split into smaller commits since the
entire package is still work in progress and I want to keep moving:

 * Various small fixes.

 * The internal image cache has been removed as it's a recipe for
   inconsistencies for longer running processes.  This should make
   libimage easier to use for CRI-O and a Podman service.

 * LookupImage now returns storage.ErrUnknownImage rather than nil.
   This simplifies the callers and makes sure we have a consistent
   error.

 * LookupImage is now able to handle manifests lists.  Unless the
   platform is explicitly ignored via the options, the matching
   image within the manifest list is now returned.  This greatly
   simplifies the spec generation in Podman; no callers should have
   to worry about this kind of detail.

 * LookupImage has been refactored into smaller-sized and easier to
   read functions.

 * RemoveImages has been changed to assemble the data of removed or
   untagged images.  This comes in handy for pruning images.  I am
   heavily against having a dedicated API for pruning since the it's
   really just a combination of filtering and removing images which
   RemoveImages already supports.  Hence these changes to satisfy
   the needs of `podman image prune`.
   Furthermore, it now returns an []error slice rather than a single
   error.  Again to make Podman happy which needs to inspect *all*
   errors for setting the appropriate exit code.

 * A rather large refactoring of the removal code along with very
   verbose comments.  Those were largely absent in the Podman code base
   but there many rules and contracts embedded that I partially could
   only reconstruct by manually tests and comparing to Docker.

 * Add a new `containers={true,false}` filter which allows filtering
   images whether they are used by containers (=true) or if no container
   is using them (=false).  This filter is required for pruning images
   in Podman.

 * `libimage/types` has been merged into `libimage`.  Podman has to do
   _a lot of_ massaging for the remote client already and the types
   are pretty much nailed down for the remote API.  Hence, I prefer to
   do some translation between `libimage` types and what Podman needs
   rather than splitting `libimage` in half without an obvious reason.
   This way the package is self-contained allowing for an easier
   navigation and maintenance.

 * `libimage.PullPolicy` has been merged into `pkg/config.PullPolicy`
   to have _one_ central place to deal with pull policies.  The type
   system in `pkg/config` sets "always" as the default unfortunately
   but I think consistency is more important at that point.

 * Added `CopyOptions.DirForceCompress` to enforce layer compression
   when copying to a `dir` destination.

 * We now use `github.com/disiqueira/gotree` for pretty printing image
   trees.  That greatly simplifies the code and we don't have to worry
   about the logic of printing a tree.  Note that trees are now always
   printed top down!

 * Added a new `libimage.ManifestList` type along with an API for local
   lookups and performing certain operations on it to wrap around
   `libimage/manifests` as previously done in `libpod/image` and other
   places in Podman.

 * Correct caching of `(*Image).Inspect`.

 * In addition to username, password and credentials, allow for
   speciying an identity token for copying images.  That's needed for
   Podman's remote API.

 * Make image removal more tolerant toward corrupted images.

 * A new "until=timestamp" filter that can be used by all APIs
   supporting filtering.

 * An empty string now resolves to PullPolicyMissing.

 * `(*Runtime) systemContextCopy()` returns a deep copy of the runtime's
   system context.  Golang's shallow copies are very dangerous for long
   running processes such as Podman's system service.  Hence, we need to
   make sure that base data is not altered over time.  That adds another
   external dependency but I do not see a way around that.  Long term,
   I desire a `(*containers/image/types.SystemContext).Copy()` function.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-05-03 15:20:40 +02:00
Daniel J Walsh 2e5b7ca531 Merge pull request #520 from rhatdan/VERSION
Bump to v0.37.1
2021-04-30 11:58:07 -04:00
Daniel J Walsh f364699e98 Move to v0.37.2-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-30 11:56:43 -04:00
Daniel J Walsh 960e564cfd Bump to v0.37.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-30 11:56:27 -04:00
Daniel J Walsh ebfe786429 Swap default logging to journald
This eliminates the concern of log files growing infinitely and also
records all containers for posterity rather then allowing the removal
of a container to destroy the record.

Partially fixes: https://github.com/containers/podman/issues/9158

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-29 13:32:50 -04:00
OpenShift Merge Robot c1f83da84b Merge pull request #517 from containers/dependabot/go_modules/github.com/containers/storage-1.30.1
Bump github.com/containers/storage from 1.30.0 to 1.30.1
2021-04-29 05:53:12 -04:00
dependabot[bot] 7712cbcc6d Bump github.com/containers/storage from 1.30.0 to 1.30.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.30.0 to 1.30.1.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.30.0...v1.30.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-29 08:07:30 +00:00
OpenShift Merge Robot 9724f1b55e Merge pull request #510 from rhatdan/parallel
Add support for the runsc OCI Runtime
2021-04-26 15:45:14 -04:00
OpenShift Merge Robot 91389f7ec0 Merge pull request #513 from rhatdan/lxd
Fix tests on lxd
2021-04-26 03:41:47 -04:00
Daniel J Walsh a611d0b06c Fix tests on lxd
Fixes: https://github.com/containers/common/issues/462

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-24 06:43:19 -04:00
OpenShift Merge Robot 30c5a2ba11 Merge pull request #511 from ashley-cui/machine
Add support for machine_enabled in containers.conf
2021-04-24 06:14:42 -04:00
Daniel J Walsh 671db86c0d Add support for the runsc OCI Runtime
Based on https://github.com/containers/common/pull/507 PR.

Thanks to unknowndev233 unknowndevQwQ@protonmail.com whoever they are.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-24 06:11:10 -04:00
Ashley Cui 24f4991dc1 Add support for machine_enabled in containers.conf
machine_enabled is a bool that indicates if Podman is running in a
podman-machine VM

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-04-23 14:37:18 -04:00
OpenShift Merge Robot 639677d952 Merge pull request #508 from unknowndev233/patch-2
modify README.md: Contributing section finetuning
2021-04-23 10:33:45 -04:00
unknowndev233 ce96bec0ad micro modify: README.md: delete one space
Just delete the meaningless spaces

Signed-off-by: unknowndev233 <unknowndevQwQ@protonmail.com>
2021-04-23 22:29:04 +08:00
unknowndev233 e86da93575 modify README.md: Contributing section finetuning
Highlighted and clickable the Contributing section

offtopic: Just a reminder Contributing section not noticeable
Signed-off-by: unknowndev233 <unknowndevQwQ@protonmail.com>
2021-04-23 22:17:32 +08:00