15034 Commits

Author SHA1 Message Date
8ed517576c Merge pull request #14118 from rhatdan/VENDOR
Vendor in containers/buildah@v1.26.1
2022-05-05 06:31:39 -04:00
88f8d398b3 Merge pull request #14098 from Luap99/test-tools
vendor test dependencies instead of installing via network
2022-05-05 05:53:18 -04:00
7af4612d6b Merge pull request #14059 from cdoern/clone
pass networks to container clone
2022-05-05 05:51:19 -04:00
97beca9e83 Merge pull request #14123 from DE0CH/rootless_tutorial
[CI:DOCS] Update rootless_tutorial.md
2022-05-05 05:14:26 -04:00
22c51da0cc Merge pull request #14122 from dcermak/patch-1
Fix usermod call in rootless_tutorial.md
2022-05-05 04:48:21 -04:00
ed159f864d Vendor in containers/buildah@v1.26.1
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-05 04:41:06 -04:00
ebde525834 update rootless_tutorial.md
The links to the installation instructions and build instructions seem to
be outdated, so this PR updates them.

Signed-off-by: Deyao Chen <chendeyao000@gmail.com>
2022-05-05 15:57:44 +08:00
7c59f1d077 Fix usermod call in rootless_tutorial.md
The `usermod` calls in rootless_tutorial.md were only adding a very narrow range
for subuids and subgids, which will cause failures with containers where a file
is owned by a user or group with a uid/gid > 1001.

Signed-off-by: Dan Čermák <dcermak@suse.com>
2022-05-05 09:54:20 +02:00
f1703abea1 Merge pull request #14092 from vrothberg/benchmarks
benchmarks: push/pull
2022-05-05 03:40:19 -04:00
bdaac4b2b6 Merge pull request #14037 from rhatdan/remoteuri
Report correct RemoteURI
2022-05-04 14:52:19 -04:00
0e2a80a622 Merge pull request #14095 from baude/moreunittests
Add more unit tests
2022-05-04 14:46:12 -04:00
ad93318370 Merge pull request #14066 from ashley-cui/sysres
podman system reset removed machines incorrectly
2022-05-04 13:20:09 -04:00
5c8277d943 Merge pull request #14109 from giuseppe/ignore-econnreset
libpod: treat ECONNRESET as EOF
2022-05-04 13:12:13 -04:00
5fa6f686db Report correct RemoteURI
Rather than assuming a filesystem path, the API service URI is recorded
in the libpod runtime configuration and then reported as requested.

Note: All schemes other than "unix" are hard-coded to report URI exists.

Fixes #12023

Signed-off-by: Jhon Honce <jhonce@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-04 12:11:32 -04:00
b1e9ea38e5 Merge pull request #14060 from nicrowe00/13781
play kube default log driver
2022-05-04 11:44:06 -04:00
534405caa9 Merge pull request #14107 from containers/dependabot/go_modules/github.com/containers/storage-1.40.2
Bump github.com/containers/storage from 1.40.0 to 1.40.2
2022-05-04 11:20:11 -04:00
88e50d9d45 Merge pull request #14108 from Luap99/machine-event-sock
machine events: only open sockets when needed
2022-05-04 11:12:08 -04:00
3866143675 exclude new tools vendor dir from validate
We have no control over the code in the vendored files.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-04 17:11:50 +02:00
f6b397bf1e add dependabot config for test/tools go.mod
dependabot should update out test dependencies as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-04 17:11:50 +02:00
3b9177995e vendor test tools in submodule
Instead of using the main module we should vendor the test tools in a
different directory. That way we do not add extra dependencies to the
main module which can be problemetic for packages or other users.

This is already done in buildah so this makes us more consitent.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-04 17:11:43 +02:00
80744c6441 podman system reset removed machines incorrectly
podman system reset did not clean up machines fully, leaving some config
files, and breaking machines. Now it removes all machines files fully.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-05-04 10:31:42 -04:00
9974c90ccc libpod: treat ECONNRESET as EOF
when reading from the attach socket, treat ECONNRESET in the same way
as EOF.

[NO NEW TESTS NEEDED]

Closes: https://github.com/containers/podman/issues/11446

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-05-04 15:43:12 +02:00
245151e62d Add more unit tests
Improve "code coverage" with more unit-tests.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-05-04 08:29:54 -05:00
a5800c78fd machine events: only open sockets when needed
We should only open the socket when needed and not always at init time.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-04 15:08:25 +02:00
1975975cf4 Merge pull request #14099 from jwhonce/wip/machine_inspect
Implement --format for machine inspect
2022-05-04 08:33:22 -04:00
36c5e6e0c4 Bump github.com/containers/storage from 1.40.0 to 1.40.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.40.0 to 1.40.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.40.0...v1.40.2)

---
updated-dependencies:
- dependency-name: github.com/containers/storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 12:10:05 +00:00
ccd576504e play kube default log driver
The default log driver is not used when using play kube
without --log-driver. The LogDriver function needs to
be called in order to use the default log driver.

fixes #13781
Signed-off-by: Niall Crowe <nicrowe@redhat.com>
2022-05-04 12:52:27 +01:00
8781a3635a benchmarks: push/pull
Polish the push and pull benchmarks.  In particular, make sure to not be
network bound during these benchmarks by running a local registry and
pushing a local image that can later on be pulled.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-04 12:15:45 +02:00
1585b175db pass networks to container clone
since the network config is a string map, json.unmarshal does not recognize
the config and spec as the same entity, need to map this option manually

resolves #13713

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-05-03 23:04:08 -04:00
3d84661195 Merge pull request #14085 from jwhonce/jira/RUN-1491
Add podman machine events
2022-05-03 19:16:03 -04:00
88015cf0d8 Implement --format for machine inspect
* Fix issue of nil pointer derefence

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-03 16:15:59 -07:00
8da5f3f733 Add podman machine events
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-05-03 13:49:01 -07:00
9166894c69 vendor test dependencies instead of installing via network
We can vendor the test dependencies such as go-md2man, git-validation
and goimports. This allows us to always install the same version as
specified in go.mod. Also we do not rely on a network connection for
this.

The advantage with this method is that dependabot will also update the
dependencies for us and we do not have to hardcode versions in the
Makefile.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-03 18:43:18 +02:00
1e0c50df38 Merge pull request #14089 from vrothberg/generate-systemd-pods
generate systemd: pods: set exit policy
2022-05-03 11:18:19 -04:00
e5a8b0ca5c Merge pull request #14083 from baude/machinestats
Additional stats for podman info
2022-05-03 10:30:14 -04:00
424c856cc5 Merge pull request #14093 from edsantiago/treadmill_script_more
[CI:DOCS] vendor treadmill script: run 'git add vendor'
2022-05-03 10:06:11 -04:00
da2dcad57d Merge pull request #14071 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-1.0.1
Bump github.com/rootless-containers/rootlesskit from 1.0.0 to 1.0.1
2022-05-03 10:04:17 -04:00
e5871bc675 Merge pull request #14084 from rhatdan/VENDOR
Vendor in containers/(common, storage, image)
2022-05-03 10:03:53 -04:00
6e2e3a78ed generate systemd: pods: set exit policy
Unless specified in the create command of the pod, enforce the exit
policy to "stop".  With "stop", a pod is stopped when the last container
exits and does not continue running.  This behavior integrates much
better into systemd which is now able to tell whether the service
running as pod is actually running/active or not.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-05-03 15:28:50 +02:00
5fac879ea4 vendor treadmill script: run 'git add vendor'
Situation encountered just now after buildah #3949 but
before podman #14084: go.mod changed in such a way that
other modules were updated, not just buildah, and those
changes weren't git-added by 'make vendor'. This resulted
in the dirty-tree CI test failing.

Solution: check for untracked vendor files after 'make vendor',
and git-add them. Show a friendly message that we're doing so:

    +---> Adding untracked files under containers/image, containers/storage, klauspost/compress, x/sys

In order to do this safely, we run an untracked-files check
under vendor as one of the first sanity checks. If there are
any when we start the script, fail early.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-03 06:53:36 -06:00
0bb4849377 Additional stats for podman info
In support of podman machine and its counterpart desktop, we have added
new stats to podman info.

For storage, we have added GraphRootAllocated and GraphRootUsed in
bytes.

For CPUs, we have added user, system, and idle percents based on
/proc/stat.

Fixes: #13876

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-05-03 07:11:07 -05:00
e247f02a4f Vendor in containers/(common, storage, image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-05-02 17:16:10 -04:00
3ac5cec086 Merge pull request #14081 from edsantiago/treadmill_revamp
Treadmill script: revamp
2022-05-02 16:48:56 -04:00
e74717f348 Treadmill script: revamp
Major revamp: instead of stacking a vendor commit on top of
the treadmill changes, do it the other way around: vendor,
then apply treadmill diffs.

Reason: the build-all-new-commits test. Sigh. It fails in the
common case where our treadmill changes include a new struct
element in cmd/podman/images/build.go

Why this is good: well, superficially, it's more intuitive.

Why this is horrible: omg the rebasing games are a nightmare.
When the vendor commit is on top (HEAD), it's ultra-trivial
to drop it, rebase the treadmill changes on main, then add
a new vendor-buildah commit on top. As you can see from the
diffs in this PR, treadmill-as-HEAD introduces all sorts
of complex dance steps in which things can go catastrophically
wrong and you can lose all your treadmill patches. I try very
hard to prevent this, and to offer hints if there's a problem,
and heck in the worst case it's still git so it's still possible
to find lost commits... but it's still much riskier than the
old way.

Alternative I considered: using sed magic to disable the
build-all-new-commits test. So tempting... but that would
also disable the bloat check.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-02 13:06:13 -06:00
698cb730a1 Merge pull request #14078 from Luap99/CI
CI: emergency fix for broken go get
2022-05-02 13:56:30 -04:00
e17b56e0cf CI: emergency fix for broken go get
go get is deprecated, we should use go install instead.

Also for some reason go get -u golang.org/x/tools/cmd/goimports is
broken at the moment, thus failing CI jobs where we have to install
this. Switching to go install seems to fix it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-02 18:03:59 +02:00
c3d871a3f6 Merge pull request #13859 from vrothberg/fix-13464
pod: add exit policies
2022-05-02 11:53:30 -04:00
adf6ee671f Merge pull request #14063 from Luap99/libpod-networks
libpod: unset networks before storing container conf
2022-05-02 11:15:30 -04:00
4b2dc2d8df Merge pull request #14069 from n1hility/wsl-inspect
Implement machine inspect for WSL
2022-05-02 10:13:40 -04:00
4e44e5b5de Bump github.com/rootless-containers/rootlesskit from 1.0.0 to 1.0.1
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](https://github.com/rootless-containers/rootlesskit/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/rootless-containers/rootlesskit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 12:12:08 +00:00