10592 Commits

Author SHA1 Message Date
d6711a2929 Merge pull request #9020 from vrothberg/fix-9000
make bindings generation more robust
2021-01-20 10:49:20 -05:00
a3621a7cff Cirrus: add bindings checks
Make sure that bindings are in sync with the code.  The check is similar
to what's already being done with `make vendor`, so integrate the two.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-20 14:38:02 +01:00
41a7e11c7e make bindings generation explicit
Instead of implicitly generating the bindings, make it explicit, similar
to `make vendor`.  This should prevent redundant and possibly error
prone generations.  A following commit will shield CI.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-20 13:19:06 +01:00
f302ce578b make bindings generation more robuts
The Go gods did not shine upon us trying to understand what's going on
in #9000.  The symptom is that `go generate` did not add required
imports to a generated file, ultimately breaking subsequent compilation.

While it still remains unclear *why* Go is behaving like that, the
symptom disappears when `go generate` runs in module mode; that is
without `-mod=vendor` and without `GO111MODULE=off`.  This was
reproducible on two separate machines (Ubuntu and Fedora).

Also, when facing an unset GOPATH, set it to Go's default (i.e.,
$HOME/go) and make sure that GOBIN is in PATH since `goimports`
is required by `go generate`.

Fixes: #9000
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-20 13:19:06 +01:00
7d024a2fc8 Merge pull request #9031 from vrothberg/revert-ginkgo
Revert "ginkgo: install on demand via `go get -u`"
2021-01-20 07:17:23 -05:00
54c465bda6 Merge pull request #8911 from edsantiago/prs_must_include_tests
CI: smoke test: insist on adding tests on PRs
2021-01-20 05:57:09 -05:00
175fc3867a Revert "ginkgo: install on demand via go get -u"
This reverts commit de05e5816869073600ae8e851093b4b9a9d7fab0.

Running `go get -u` will change the local Go module causing CI to fail
as the local git tree is being changed.  Reverting the change for now
until we have a better idea.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-20 10:31:24 +01:00
5e7262ddf5 Merge pull request #9021 from Luap99/podman-network-exists
podman network exists
2021-01-19 16:56:17 -05:00
37470c4d20 Merge pull request #9023 from edsantiago/fix_gomd2man_warnings
[CI:DOCS] fix go-md2man HTMLSpan warnings
2021-01-19 16:38:34 -05:00
37abec240a [CI:DOCS] fix go-md2man HTMLSpan warnings
I'm tired of seeing these every time I run 'make':

   WARNING: go-md2man does not handle node type HTMLSpan

Cause: left-angle-brackets ( < ) in document source

Solution:
  1) backquote-escape those that need to be shown, usually
     ones referring to an argument or email address; or
  2) Actual HTML ( <sup> and <a> ) which are meant to be
     shown in generated HTML docs but can't be shown in
     man pages, we filter out via a sed expression.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-19 12:59:03 -07:00
9f6bb3563d CI: smoke test: insist on adding tests on PRs
On each PR (with a few exceptions), check the list of git-touched
files, and abort if no tests are added. Include instructions
on how to bypass the check if tests really aren't needed.

Include a hardcoded exception list for PRs that only touch a
well-known subset of "safe" files: docs, .cirrus.yml, vendor,
version, hack, contrib, or *.md. This list is likely to need
tuning over time.

Add a test suite, but not one recognized by the new script
(because it's a "*.t" file), so: [NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-19 10:45:58 -07:00
d99e475dd7 Merge pull request #9008 from edsantiago/release_deal_with_set_minus_e
runner.sh : deal with bash 'set -e'
2021-01-19 11:34:14 -05:00
a45d22a1dd podman network exists
Add podman network exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-19 15:18:03 +01:00
8c6df5e93e Merge pull request #9004 from baude/existsoptions
Add binding options for container|pod exists
2021-01-19 08:47:37 -05:00
9a10f20bc1 Merge pull request #9001 from vrothberg/ginkgo
ginkgo: install on demand via `go get -u`
2021-01-19 07:24:29 -05:00
de05e58168 ginkgo: install on demand via go get -u
Install ginkgo on demand via `go get -u` rather than keeping a copy it's
entire source code in the vendor dirctory.  The main motivation for that
is to make `golangci-lint` happy which is continuously throwing up on
the import of a program (i.e., ginkgo).  The linter is broken and stupid
as it ignores flags to ignore dirs and ignores build tags (at least some
linters do) which is blocking us from updating to newer versions.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-19 10:00:53 +01:00
d2ee3d8151 runner.sh : deal with bash 'set -e'
Release trigger script failed[1] because the entire script
runs under 'set -e'; so a 'grep -- -dev' that finds no
results will cause a nonzero exit status and hence the
entire script to fail. Work around that.

 [1] https://cirrus-ci.com/task/4541290882793472

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-18 15:10:58 -07:00
4ccb0729b4 Add binding options for container|pod exists
It turns out an options was added to container exists so it makes sense
to have pods and container exists calls have an optional structure for
options.

Signed-off-by: baude <bbaude@redhat.com>
2021-01-18 13:48:51 -06:00
5f1a7a7d27 Merge pull request #9007 from baude/nocomposeoncidocs
[CI:DOCS]Do not run compose tests with CI:DOCS
2021-01-18 13:01:26 -05:00
683bab03f8 [CI:DOCS]Do not run compose tests with CI:DOCS
Signed-off-by: baude <bbaude@redhat.com>
2021-01-18 10:20:43 -06:00
5b3c7a5293 Merge pull request #8995 from vrothberg/lint-lint-lint
[CI:DOCS] lint lint lint
2021-01-17 15:38:30 -05:00
00ab9cab01 Merge pull request #8994 from vrothberg/fix-8989
Simplify bindings generation
2021-01-17 15:32:56 -05:00
0030a23777 Merge pull request #8992 from rhatdan/push
[ci:docs] Create release notes for V3.0.0
2021-01-17 15:26:47 -05:00
2df59829e4 simplify bindings generation
Run `go generate ./pkg/bindings/...` once for all bindings instead of
generating them separately.  This should speed up bindings generation
as a given package is visited only once, and it fixes #8989 by dropping
the use of pushd and popd.

Fixes: #8989
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-17 17:24:03 +01:00
4629942686 make: generate bindings: use vendor
Set `-mod=vendor` when generating the bindings.  We expect all
dependencies to be vendored already.  This should slightly speed
up the bindings generation and prevent redundant network accesses.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-17 17:24:01 +01:00
caaaa2c5e1 hack/install_golangci.sh: smarter install
Detect if the installed version of golangci-lint is outdated and update
it if needed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-17 17:15:23 +01:00
f38b7f48cc golangci-lint: install to ./bin
Install golangci-lint to `./bin` instead of `$GOBIN`.  The latter may be
shared with other projects who require a different version.  Having a
shared version of golangci-lint is a reoccurring source of red herrings
on my work station, so I think it's time to split them.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-17 17:07:04 +01:00
46c87f6711 Create release notes for V3.0.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-17 07:48:52 -05:00
341c4b1fd9 Merge pull request #8942 from rhatdan/push
Allow podman push to push manifest lists
2021-01-17 06:52:35 -05:00
73b036db56 Merge pull request #8988 from Luap99/rename-port-completion-func
[CI:DOCS] Rename AutocompletePortCommand func
2021-01-16 18:17:38 -05:00
47eeb02c7a Rename AutocompletePortCommand func
This function is now used for the port and rename command.
Rename it to AutocompleteContainerOneArg.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-16 18:54:59 +01:00
83ed464d29 Merge pull request #8986 from baude/bindingreadme
[CI:DOCS]Add README.md for golang bindings
2021-01-15 13:58:27 -05:00
f43f209ca4 Merge pull request #8456 from kazimsarikaya/fix-send-tar
podman remote send tar
2021-01-15 13:49:27 -05:00
53ecda2981 Merge pull request #8949 from giuseppe/sysfs-for-rootless
specgen: improve heuristic for /sys bind mount
2021-01-15 13:38:30 -05:00
cf51c7ed9f Allow podman push to push manifest lists
When doing a podman images, manifests lists look just like images, so
it is logical that users would assume that they can just podman push them
to a registry.  The problem is we throw out weird errors when this happens
and users need to somehow figure out this is a manifest list rather then
an image, and frankly the user will not understand the difference.

This PR will make podman push just do the right thing, by failing over and
attempting to push the manifest if it fails to push the image.

Fix up handling of manifest push

Protocol should bring back a digest string, which can either be
printed or stored in a file.

We should not reimplement the manifest push setup code in the tunnel
code but take advantage of the api path, to make sure remote and local
work the same way.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-15 13:24:34 -05:00
f59c29a6d7 [CI:DOCS]Add README.md for golang bindings
Add a brief description of the golang bindings and provide examples on
how to use them

Signed-off-by: baude <bbaude@redhat.com>
2021-01-15 10:49:40 -06:00
0400dc0a00 Merge pull request #8983 from rhatdan/test
Turn on podman pod stats test for rootless cgroup v2
2021-01-15 11:47:48 -05:00
7d3a628c6b Merge pull request #8982 from Luap99/container-rename-bindings
Container rename bindings
2021-01-15 10:48:27 -05:00
7a30e82220 Turn on podman pod stats test for rootless cgroup v2
These tests should only be blocked for cgroups V1

Fixes: https://github.com/containers/podman/issues/8734
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-15 09:24:28 -05:00
5a166b2973 Merge pull request #8978 from rhatdan/buildah
Bump to containers/buildah 1.9.2
2021-01-15 09:23:57 -05:00
3ceef004e3 Merge pull request #8981 from containers/dependabot/go_modules/github.com/google/uuid-1.1.5
Bump github.com/google/uuid from 1.1.4 to 1.1.5
2021-01-15 08:43:27 -05:00
82462aca7f Merge pull request #8977 from cevich/get_ci_hook_docs
[CI:DOCS] Add hook-script example to get_ci_vm.sh
2021-01-15 08:34:45 -05:00
0688f080b8 Fix missing podman-container-rename man page link
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-15 12:57:33 +01:00
c9bd292b32 Container rename bindings
Add bindings and podman-remote support for container rename.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-15 12:57:22 +01:00
c88022589a Bump to containers/buildah 1.9.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-15 06:23:19 -05:00
3ac930f002 Bump github.com/google/uuid from 1.1.4 to 1.1.5
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.4 to 1.1.5.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.4...v1.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-15 12:18:46 +01:00
2c328a4ac1 specgen: improve heuristic for /sys bind mount
partially revert 95c45773d7dbca2880152de681c81f0a2afec99b

restrict the cases where /sys is bind mounted from the host.

The heuristic doesn't detect all the cases where the bind mount is not
necessary, but it is an improvement on the previous version where /sys
was always bind mounted for rootless containers unless --net none was
specified.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-15 09:10:55 +01:00
3fcf346890 Merge pull request #8955 from mheon/rename
Container Rename
2021-01-14 22:03:01 -05:00
8ce9995951 Merge pull request #8604 from mheon/volume_plugin_impl
Initial implementation of volume plugins
2021-01-14 21:56:37 -05:00
997de2f8e9 Initial implementation of renaming containers
Basic theory: We remove the container, but *only from the DB*.
We leave it in c/storage, we leave the lock allocated, we leave
it running (if it is). Then we create an identical container with
an altered name, and add that back to the database. Theoretically
we now have a renamed container.

The advantage of this approach is that it doesn't just apply to
rename - we can use this to make *any* configuration change to a
container that does not alter its container ID.

Potential problems are numerous. This process is *THOROUGHLY*
non-atomic at present - if you `kill -9` Podman mid-rename things
will be in a bad place, for example. Also, we can't rename
containers that can't be removed normally - IE, containers with
dependencies (pod infra containers, for example).

The largest potential improvement will be to move the majority of
the work into the DB, with a `RecreateContainer()` method - that
will add atomicity, and let us remove the container without
worrying about depencies and similar issues.

Potential problems: long-running processes that edit the DB and
may have an older version of the configuration around. Most
notable example is `podman run --rm` - the removal command needed
to be manually edited to avoid this one. This begins to get at
the heart of me not wanting to do this in the first place...

This provides CLI and API implementations for frontend, but no
tunnel implementation. It will be added in a future release (just
held back for time now - we need this in 3.0 and are running low
on time).

This is honestly kind of horrifying, but I think it will work.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-14 18:29:28 -05:00