Commit graph

45258 commits

Author SHA1 Message Date
Bjorn Neergaard
f5106148e3
Merge pull request #43060 from akerouanton/fix-42127
Check iptables options before looking for ip6tables binary
2022-12-29 17:13:36 -07:00
Sebastiaan van Stijn
eef2d20e23
Merge pull request #43285 from thaJeztah/cleanup_testutils
integration-cli: cleanup some of the test-utilities
2022-12-30 00:41:35 +01:00
Bjorn Neergaard
d8e3e6d606
Merge pull request #44705 from thaJeztah/inspect_literal
daemon: rename vars that collided, and use struct-literals
2022-12-29 16:08:22 -07:00
Bjorn Neergaard
865fdf4dcd
Merge pull request #44668 from masibw/44269-marshal-json-empty
api: can marshal and unmarshal when args.fields is empty
2022-12-29 15:39:50 -07:00
Akihiro Suda
2f9987c816
Merge pull request #44713 from thaJeztah/carry_44600_update_delve
Update delve version (carry 44600)
2022-12-30 07:23:58 +09:00
Sebastiaan van Stijn
5b908cfb5f
Merge pull request #44699 from thaJeztah/docker_proxy_version_flag
cmd/docker-proxy: add "-v / --version" flag
2022-12-29 21:01:18 +01:00
Yamazaki Masashi
5fed968b1d
api: can marshal and unmarshal when args.fields is empty
Signed-off-by: Yamazaki Masashi <masi19bw@gmail.com>
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-29 12:49:01 -07:00
Bjorn Neergaard
0e4efb15f5
Merge pull request #44707 from zhsj/btrfs-progs-6.1
daemon/graphdriver/btrfs: workaround field rename in btrfs-progs 6.1
2022-12-29 12:45:18 -07:00
oscar.chen
ad8804885c
Update delve version
Signed-off-by: oscar.chen <2972789494@qq.com>
2022-12-29 18:57:55 +01:00
Sebastiaan van Stijn
018347f802
integration-cli: remove waitInspectWithArgs()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-29 18:26:12 +01:00
Sebastiaan van Stijn
61c434c030
integration-cli: remove inspectMountPointJSON()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-29 18:26:00 +01:00
Shengjing Zhu
ffbbe3d103 daemon/graphdriver/btrfs: workaround field rename in btrfs-progs 6.1
Closes: #44698

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-12-29 03:47:12 +08:00
Sebastiaan van Stijn
0eb7b49a17
daemon: remove some intermediate vars, use struct-literals
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-28 11:26:44 +01:00
Sebastiaan van Stijn
288cf20f98
daemon: rename some vars that collided with imports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-28 11:25:05 +01:00
Sebastiaan van Stijn
940730093b
integration-cli: remove cli.Build(), cli.Inspect()
They were just small wrappers arround cli.Args(), and the abstraction
made one wonder if they were doing some "magic" things, but they weren't,
so just inlining the `cli.Args()` makes it more transparent what's executed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-28 09:25:27 +01:00
Sebastiaan van Stijn
bc0885f364
integration-cli: remove WaitRestart(), un-export WaitForInspectResult()
- Remove `WaitRestart()` as it was no longer used
- Un-export `WaitForInspectResult()` as it was only used internally, and we want
  to reduce uses of these utilities.
- Inline `appendDocker()` into `Docker()` as it was the only place it was used,
  and the name was incorrect anyway (should've been named `prependXX`).
- Simplify `Args()`, as it was first splitting the slice (into `command` and `args`),
  only to join them again into a single slice (in `icmd.Command()`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-28 09:25:27 +01:00
Sebastiaan van Stijn
12df6024db
cmd/docker-proxy: add "-v / --version" flag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-27 22:26:57 +01:00
Sebastiaan van Stijn
598c295707
Merge pull request #44701 from thaJeztah/fix_buildkit_ci
gha: update buildkit to fix integration tests
2022-12-27 21:54:18 +01:00
Sebastiaan van Stijn
c42b304f62
gha: update buildkit to fix integration tests
full diff: 0bfcd83e6d...d77361423c

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-27 19:21:40 +01:00
Sebastiaan van Stijn
2a7908c939
Merge pull request #44182 from thaJeztah/subtests_TestNewClientWithOpsFromEnv
client: TestNewClientWithOpsFromEnv(): use sub-tests
2022-12-27 13:12:50 +01:00
Sebastiaan van Stijn
c4ed09ad4e
Merge pull request #44663 from thaJeztah/move_meminfo
pkg/system: move memory-info types to pkg/systeminfo, and minor refactor
2022-12-27 13:07:09 +01:00
Sebastiaan van Stijn
ab78900e29
Merge pull request #44649 from thaJeztah/config_cleanup
daemon/config: rename CommonTLSOptions, and remove RootDeprecated field
2022-12-27 13:06:16 +01:00
Sebastiaan van Stijn
980701114f
Merge pull request #44627 from thaJeztah/network_nit
daemon: CreateNetwork: remove redundant error check
2022-12-23 17:40:52 +01:00
Albin Kerouanton
799cc143c9
Always use iptables -C to look for rules
iptables -C flag was introduced in v1.4.11, which was released ten
years ago. Thus, there're no more Linux distributions supported by
Docker using this version. As such, this commit removes the old way of
checking if an iptables rule exists (by using substring matching).

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2022-12-23 11:04:28 +01:00
Albin Kerouanton
205e5278c6
Merge iptables.probe() into iptables.detectIptables()
The former was doing some checks and logging warnings, whereas
the latter was doing the same checks but to set some internal variables.
As both are called only once and from the same place, there're now
merged together.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2022-12-23 11:04:28 +01:00
Cory Snider
3330fc2e93
Merge pull request #44667 from masibw/44610-logs-for-DNS-failures
libnetwork: improve logs for DNS failures
2022-12-22 16:24:47 -05:00
Tianon Gravi
bcb8f69cc5
Merge pull request #44239 from thaJeztah/resolvconf_refactor_step2
libnetwork: simplify handling of reading resolv.conf
2022-12-22 13:18:47 -08:00
Sebastiaan van Stijn
1eb09c8ce2
Merge pull request #44683 from thaJeztah/libnetwork_consts
libnetwork/netlabel: make consts actual consts, remove redundant utils
2022-12-22 21:55:05 +01:00
Sebastiaan van Stijn
b97ee34947
Merge pull request #44669 from thaJeztah/mux_tests
registry: use http.NewServeMux for tests instead of gorilla/mux
2022-12-22 21:49:26 +01:00
Sebastiaan van Stijn
bee4b80754
Merge pull request #44534 from thaJeztah/layer_minor_fix
layer: layerStore.registerWithDescriptor: rename var to prevent shadowing
2022-12-22 21:17:27 +01:00
Yamazaki Masashi
0787ea8b26 libnetwork: improve logs for DNS failures
Signed-off-by: Yamazaki Masashi <masi19bw@gmail.com>

libnetwork: fix function call

Signed-off-by: Yamazaki Masashi <masi19bw@gmail.com>
2022-12-22 23:25:21 +09:00
Tianon Gravi
204cbfb68d
Merge pull request #44684 from thaJeztah/libnetwork_bridge_remove_deprecated
libnetwork/drivers/bridge: remove "ioctl" fallback code for legacy kernels
2022-12-21 09:41:19 -08:00
Tianon Gravi
e6d4475a6c
Merge pull request #44678 from thaJeztah/errdefs_improve_debug_logs
errdefs: FromStatusCode() don't log "FIXME" debug message
2022-12-21 09:38:33 -08:00
Sebastiaan van Stijn
a959487597
libnetwork/netlabel: remove Key(), Value(), and KeyValue() utils
These were only used in a single location, and in a rather bad way;
replace them with strings.Cut() which should be all we need for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 18:17:54 +01:00
Sebastiaan van Stijn
9015cb7111
libnetwork: controller: rename vars that collided or shadowed
- config collided with import
- cap collided with a built-in
- c collided with the "controller" receiver

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 18:17:17 +01:00
Sebastiaan van Stijn
96cfb076ce
libnetwork/netlabel: make consts actual consts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 18:17:13 +01:00
Tianon Gravi
3a5598affa
Merge pull request #44381 from thaJeztah/strings_cut
Replace uses of `strings.Split(N)` with `strings.Cut()`
2022-12-21 09:16:05 -08:00
Sebastiaan van Stijn
36151bd1d7
libnetwork/drivers/bridge: remove "ioctl" fallback code for legacy kernels
This code was forked from libcontainer (now runc) in
fb6dd9766e

From the description of this code:

> THIS CODE DOES NOT COMMUNICATE WITH KERNEL VIA RTNETLINK INTERFACE
> IT IS HERE FOR BACKWARDS COMPATIBILITY WITH OLDER LINUX KERNELS
> WHICH SHIP WITH OLDER NOT ENTIRELY FUNCTIONAL VERSION OF NETLINK

That comment was added as part of a refactor in;
4fe2c7a4db

Digging deeper into the code, it describes:

> This is more backward-compatible than netlink.NetworkSetMaster and
> works on RHEL 6.

That comment (and code) moved around a few times;

- moved into the libcontainer pkg: 6158ccad97
- moved within the networkdriver pkg: 4cdcea2047
- moved into the networkdriver pkg: 90494600d3

Ultimately leading to 7a94cdf8ed, which implemented
this:

> create the bridge device with ioctl
>
> On RHEL 6, creation of a bridge device with netlink fails.  Use the more
> backward-compatible ioctl instead.  This fixes networking on RHEL 6.

So from that information, it looks indeed to support RHEL 6, and Ubuntu 12.04
which are both EOL, and we haven't supported for a long time, so probably time
to remove this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 17:32:04 +01:00
Sebastiaan van Stijn
6a91e09218
pkg/parsers: use strings.Cut(), and cleanup error-messages
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:03 +01:00
Sebastiaan van Stijn
3f935d0e2c
daemon/graphdriver/zfs: use strings.Cut, and refactor
Fixes a (theoretical?) panic if ID would be shorter than 12
characters. Also trim the ID _after_ cutting off the suffix.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:03 +01:00
Sebastiaan van Stijn
f95e9b68d6
daemon: use strings.Cut() and cleanup error messages
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:03 +01:00
Sebastiaan van Stijn
46f7c92c9a
libnetwork: use strings.Cut() and minor refactor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:03 +01:00
Sebastiaan van Stijn
87ca9490b0
libnetwork/datastore: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:03 +01:00
Sebastiaan van Stijn
ff447f4fd5
runconfig/opts: use strings.Cut()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:03 +01:00
Sebastiaan van Stijn
bffb35612c
plugin: use strings.Cut()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00
Sebastiaan van Stijn
01365cbd74
libcontainerd/local: use strings.Cut()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00
Sebastiaan van Stijn
6059d38f21
pkg/parsers/operatingsystem: don't use strings.SplitN()
We're looking for a specific prefix, so remove the prefix instead. Also remove
redundant error-wrapping, as `os.Open()` already provides details in the error
returned;

    open /no/such/file: no such file or directory
    open /etc/os-release: permission denied

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00
Sebastiaan van Stijn
451b8579ef
pkg/parsers/kernel: use strings.Cut() and minor refactor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00
Sebastiaan van Stijn
774cd9a26c
opts: use strings.Cut() and refactor parseDaemonHost()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00
Sebastiaan van Stijn
d3cd746067
integration-cli: use strings.Cut()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-21 11:09:02 +01:00