Commit Graph

715 Commits

Author SHA1 Message Date
Dave Tucker
fcaab549fe init: Migrate to Go Modules
Moves vendoring over to Go modules.
Fixes issues found by Go Vet in Go 1.16

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2022-01-11 20:18:37 +00:00
Rolf Neugebauer
b5bf29c0f6
Merge pull request #3747 from sprat/fix-sshd
Fix sshd
2022-01-01 22:46:56 +00:00
Avi Deitcher
210a308602
Merge pull request #3746 from sprat/fix-openntpd
openntpd: the "-s" flag is obsolete, this generates some error messages in the ntpd logs
2021-12-29 21:24:02 +02:00
Sylvain Prat
a71a52b57c SSHd: allow access to all devices & fix a warning with tini
Signed-off-by: Sylvain Prat <sylvain.prat@gmail.com>
2021-12-22 19:03:43 +01:00
Sylvain Prat
42a3f80bec The "-s" flag is obsolete, this generates some errors messages in the ntpd logs
Signed-off-by: Sylvain Prat <sylvain.prat@gmail.com>
2021-12-22 17:13:59 +01:00
Frédéric Dalleau
3e38a8c323 Bump runc to 1.0.3
Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
2021-12-16 19:10:58 +01:00
Sylvain Prat
1c3e40ea2b Fixes #3738: add missing devices to acpid
According to busybox' acpid code, acpid should be allowed to access /dev/input/event*, so we all all "input" devices (whose major number is 13)

Signed-off-by: Sylvain Prat <sylvain.prat@gmail.com>
2021-12-09 21:05:34 +01:00
Avi Deitcher
4e7abb5250 document and simplify some releasing
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2021-11-29 16:39:06 +02:00
Emmanuel Briney
e254145257 Use RFC3339Nano for timestamps
Signed-off-by: Emmanuel Briney <emmanuel.briney@docker.com>
2021-11-26 16:41:51 +01:00
Avi Deitcher
7549a63c9f pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2021-11-09 14:02:42 +02:00
Tonis Tiigi
5af7c526ec init: add support for cgroupv2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-10-24 23:03:51 -07:00
David Scott
476d5a0f2e Update alpine for containerd
Signed-off-by: David Scott <dave@recoil.org>
2021-10-21 11:34:59 +01:00
David Scott
7434e5f5aa pkg/kmsg: grant access to /dev/kmsg
Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:02:44 +01:00
David Scott
6bc99c5ff2 pkg/metadata: grant access to all block devices
Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:02:36 +01:00
David Scott
9209808ac3 pkg/losetup: grant access to all block devices
Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:02:18 +01:00
David Scott
344d974ae1 pkg/extend: grant access to all block devices
Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:02:11 +01:00
David Scott
71fa9f2cae pkg/dm-crypt: grant access to all devices
The package needs block devices e.g. for /dev/sda

It also needs character devices for /dev/mapper/

Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:01:01 +01:00
David Scott
5895976b33 tools/mkimage: grant access to block devices
Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:00:55 +01:00
David Scott
0cfaa9ce65 runc: update to v1.0.2
Signed-off-by: David Scott <dave@recoil.org>
2021-10-18 21:00:04 +01:00
Rolf Neugebauer
6efae97c20 Update alpine for containerd
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2021-10-16 16:57:15 +01:00
David Scott
7d76051bb0 runc: update to v1.0.0-rc95
Signed-off-by: David Scott <dave@recoil.org>
2021-10-16 16:57:15 +01:00
David Scott
46ea02f65b moby: device "all" will add to the cgroup whitelist
After the runc security advisory[1] the default cgroup device
whitelist was changed.

In previous versions every container had "rwm" (read, write, mknod)
for every device ("a" for all). Typically this was overridden by
container engines like Docker. In LinuxKit we left the permissive
default.

In recent `runc` versions the default allow-all rule was removed,
so a container can only access a device if it is specifically
granted access, which LinuxKit handles via a device: entry.

However it is inconvenient for pkg/format, pkg/mount, pkg/swap
to list all possible block devices up-front. Therefore we add the
ability to grant access to an entire class of device with a single
rule:

```
- path: all
  type: b
```

Obviously a paranoid user can still override this with a specific
major/minor number in a device: rule.

[1] https://github.com/opencontainers/runc/security/advisories/GHSA-g54h-m393-cpwq

Signed-off-by: David Scott <dave@recoil.org>
2021-10-14 16:14:21 +01:00
David Scott
24db42dd68 moby: add a Devices array to the image yml
According to https://github.com/linuxkit/linuxkit/pull/3684#issuecomment-860128095

runc removed the console as a default device, so now it must be specified
explicitly in the OCI config.

See 60e21ec26e

The similar code in moby/moby is here: https://github.com/moby/moby/blob/master/oci/devices_linux.go

This patch allows packages to declare a `devices` array, which can contain `/dev/console` etc.

Signed-off-by: David Scott <dave@recoil.org>
2021-10-14 16:14:05 +01:00
David Scott
e463855425 trim-after-delete: avoid building on s390x
Signed-off-by: David Scott <dave@recoil.org>
2021-05-18 13:39:20 +01:00
Anca Iordache
d326c1b2e6 Add more event types to trigger fstrim
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2021-05-12 16:12:14 +02:00
Avi Deitcher
ef3e45ac02 pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2021-04-28 09:13:18 +03:00
Sebastiaan van Stijn
a63ff3c480
pkg/trim-after-delete: make docker socket path configurable
Docker Desktop proxies the docker socket at its default location
(/var/run/docker.sock), but allows connecting to the non-proxied
socket through /var/run/docker.sock.raw.

This patch allows the trim-after-delete utility to customize
the docker socket path, so that it can connect to the non-proxied
socket.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-21 13:11:12 +02:00
Rolf Neugebauer
e48d5294ee
Merge pull request #3539 from djs55/trim-after-delete-container
trim-after-delete: handle containers and volumes as well as images
2021-04-05 13:21:02 +01:00
Michael Aldridge
b820b0a129 Support metaldata metadata provider
Signed-off-by: Michael Aldridge <aldridge.mac@gmail.com>
2021-01-21 23:03:49 -08:00
Petr Fedchenkov
564a4ece26
strip containerd binaries
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
2021-01-06 19:04:49 +03:00
Avi Deitcher
203cbd9b9f multiple containerd options
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-10-21 11:11:48 +03:00
Avi Deitcher
54be4048f0 fix reversed equals error
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-10-19 20:54:14 +03:00
Avi Deitcher
865ed8a1ce add containerd cli opts
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-10-19 14:49:15 +03:00
David Scott
76c7f6c1a6 trim-after-delete: also handle containers and volumes
We already run the command after an image delete but

- a container delete
- a volume delete

will also free space on the filesystem.

Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: David Scott <dave@recoil.org>
2020-10-16 16:56:53 +01:00
Avi Deitcher
a1427d0b7b
Merge pull request #3558 from deitch/containerd-141
containerd 1.4.1 from latest version of lkt/alpine
2020-10-08 10:39:44 +03:00
Avi Deitcher
3143c04de9 containerd 1.4.1 from latest version of lkt/alpine
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-10-07 20:33:08 +03:00
Avi Deitcher
26d46d6c82 include openssh-client in sshd pkg
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-10-07 20:15:28 +03:00
Rolf Neugebauer
ea8ecd146d pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-05-10 14:52:05 +01:00
Rolf Neugebauer
47063eee62
Merge pull request #3512 from saljam/master
metadata: add support for digitalocean
2020-05-08 11:53:50 +01:00
Justin Cormack
c01f72d556
Add Risc-V support and only ship binaries we use
Ported from https://github.com/docker/binfmt/pull/21

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2020-05-07 11:53:30 +01:00
Rolf Neugebauer
dbcf2611a0
Merge pull request #3515 from justincormack/qemu-up
Update to Qemu 4.2.0 from Debian testing
2020-05-06 23:27:53 +01:00
Ilya Dmitrichenko
86fb6ba0aa
pkg/init: Mount /sys/fs/bpf
NOTE: This will be a shared mount, due to root being turned into a
shared with `MC_REC` set: `mount("", "/", "", rec|shared, "")`.
For some reason setting `shared` when mounting `/sys/fs/bpf` doesn't
work at all, perhaps that's just a kernel feature.

Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2020-05-06 11:06:54 +01:00
Justin Cormack
d2f55af35c
Update to Qemu 4.2.0 from Debian testing
This has fixed a lot of outstanding emulation issues, see comments
in https://github.com/docker/binfmt/pull/24

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2020-05-04 16:22:52 +01:00
salman aljammaz
35ae4e028c metadata: add support for digitalocean
This adds support for fetching metadata and user data from the
DigitalOcean metadata service.

https://www.digitalocean.com/docs/droplets/resources/metadata/

Signed-off-by: salman aljammaz <s@aljmz.com>
2020-05-02 11:24:11 -04:00
Avi Deitcher
3678adeca8 find cloud-init on cdrom by label
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-04-27 17:00:42 +03:00
Rolf Neugebauer
2427145dfc pkg/init: Revert "workaround bad containerd bug"
This reverts commit 6653c3387e.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-26 22:49:48 +01:00
Rolf Neugebauer
1b8cb8b235 pkg/runc: Update to v1.0.0-rc10
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-26 22:47:48 +01:00
Rolf Neugebauer
db1f9c8dc8 pkgs" Update containerd to v1.3.4
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-26 22:47:48 +01:00
Federico Pellegatta
6133c561fd Add GUID Partition Table (GPT) support to extend and mount packages
Signed-off-by: Federico Pellegatta <12744504+federico-pellegatta@users.noreply.github.com>
2020-04-24 12:54:48 +02:00
Federico Pellegatta
5fc196c289 Add partition table type selector (defaulted to DOS/MBR) to format package
Signed-off-by: Federico Pellegatta <12744504+federico-pellegatta@users.noreply.github.com>
2020-04-23 10:16:36 +02:00
Avi Deitcher
59697ffc62 read cdrom userdata from spec location
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-04-20 10:03:17 +03:00
Rolf Neugebauer
463216acda pkg: Add gcc for all packages build for arm64
This is a workaround for https://github.com/linuxkit/linuxkit/issues/3496

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
5301dbf352 pkg/firmware: Disable firmware packages for s390x
Reduce the number of packages to build for s390x. Firmware
is only used for physical devices, so disable it for s390x
where we mostly run in virtual machines.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
cd92ad3f16 pkg/firmware: Fix firmware extraction
Some drivers offer mutliple firmwares with the WHENCE file
defining the default. Use the cope-firmware.sh script to
create a copy of the firmware repository with the defaults
copied in to the right place.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
384b439d05 pkg/firmware: Use kernel v5.4.x as the base
this determines which firmware packages are included.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
bd5fb29ba1 pkg/firmware: update to latest
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
0b750af7cd pkg/node_exporter: Fix build
Add curla and gcc

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
facc612603 pkg/node_exporter: Bump to v0.18.1
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
5c190c96e1 pkg/cadvisor: Bump to v0.36.0
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Rolf Neugebauer
2f4034d36c pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-04-17 10:36:03 +01:00
Avi Deitcher
6653c3387e workaround bad containerd bug
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2020-03-23 12:18:14 +02:00
Rolf Neugebauer
7bcd19058b pkg/runc: Update to v1.0.0-rc9
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-01-21 23:17:17 +00:00
Rolf Neugebauer
11d9acf35b pkg/containerd: Add containerd-shim-runc-v2
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-01-21 23:17:17 +00:00
Rolf Neugebauer
f14ad3af82 pkgs: Update to containerd v1.3.2
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-01-21 23:17:17 +00:00
Rolf Neugebauer
bbf174d374 pkg/ip: Pick up the new version of wireguard-tools
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-01-03 00:15:43 +00:00
Simon Ferquel
3f56669576 Metadata: add support for loading from a file
This adds a new configuration provider that just reads a file.
This is needed for Docker Desktop, where we will run a LinuxKit distro in an isolated namespace within WSL 2.
In this scenario, the config will be accessible trough the WSL2 built-in 9p mount of the Windows filesystem.

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2019-12-20 11:21:20 +01:00
Rolf Neugebauer
a09b86a8e1
Merge pull request #3371 from guillaumerose/error
Skip disk resize for dos partition if no free space is available
2019-12-19 19:31:58 +00:00
Rolf Neugebauer
547521d146
Merge pull request #3349 from ptone/gcp-fixes
Update GCP metadata provider
2019-12-19 18:00:47 +00:00
Rolf Neugebauer
f0ac623b11
Merge pull request #3430 from Sh4d1/fix_scaleway_metadata
remove sendBootSignal in scaleway metadata package
2019-12-19 17:41:51 +00:00
Rolf Neugebauer
80f0765097
Merge pull request #3429 from zimme/metadata-fix-provider-scaleway
Fix the Scaleway provider in the metadata package
2019-12-19 17:41:10 +00:00
Rolf Neugebauer
725dc47a37
Merge pull request #3431 from zimme/metadata-fix-provider-hetzner
Fix the Hetzner provider in the metadata package
2019-12-19 17:39:45 +00:00
Simon Fridlund
4005082664
Fix the Hetzner provider in the metadata package
There were some mistakes made in the initial code where writes didn't work, this commit fixes that.

Signed-off-by: Simon Fridlund <simon@fridlund.email>
2019-12-04 23:01:40 +01:00
David Scott
57dd4029c8 swap: speed up preferring a 1MiB blocksize
If the swap disk is larger than 1MiB, then use a 1MiB blocksize in `dd`

On my machine using a large block size speeds up swap file creation:

```
/ # time dd if=/dev/zero of=output bs=1024 count=1048576
1048576+0 records in
1048576+0 records out
real    0m 4.61s
user    0m 0.79s
sys     0m 3.77s
/ # time dd if=/dev/zero of=output bs=1048576 count=1024
1024+0 records in
1024+0 records out
real    0m 1.06s
user    0m 0.00s
sys     0m 1.04s
```

Signed-off-by: David Scott <dave.scott@docker.com>
2019-11-22 20:48:31 +00:00
Simon Fridlund
ea5f542450
Fix the Scaleway provider in the metadata package
This commit will update the Scaleway provider to fetch the cloud-init/cloud-config data from the user_data/cloud-init endpoint it will also make sure the whole public ssh key is fetched and no longer strip out the `ssh-rsa` part of the keys

Signed-off-by: Simon Fridlund <simon@fridlund.email>
2019-10-15 12:38:52 +02:00
Patrik Cyvoct
1e1326b40a
remove sendBootSignal in scaleway metadata package
It's now not needed to send a boot signal when booting an instance on
Scaleway, thus the method is not needed anymore.

Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2019-10-15 09:35:35 +02:00
Simon Fridlund
fc88e2104e
Add Hetzner provider in the metadata package
Signed-off-by: Simon Fridlund <simon@fridlund.email>
2019-10-07 17:31:57 +02:00
hyperized
680c6ebd8c Fix label argument mkfs.btrfs
Signed-off-by: Gerben Geijteman <gerben@hyperized.net>
2019-09-30 09:14:40 +02:00
Avi Deitcher
c050fb7276
Merge pull request #2742 from deitch/getty-dedup
Keep track of processed ttys and only start same one once
2019-09-10 09:15:35 -04:00
Avi Deitcher
49ffa978d3 Keep track of processed ttys and only start same one once
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2019-08-29 11:03:18 +03:00
Rolf Neugebauer
2018f5f499 Bump packages to new alpine w/ containerd v1.2.8
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-08-25 14:11:09 +01:00
Rolf Neugebauer
3c0131e2e1 pkg/firmware: Update to latest firmware package
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-08-02 00:32:09 +01:00
Rolf Neugebauer
f6695a7e03 pkg/firmware: Update the kernel package to a newer version.
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-08-02 00:28:39 +01:00
Rolf Neugebauer
b1bed08f72 pkg/firmware: Fix directory layout
Copy firmaware files to the correct directory. Instead of

<vendor>/<fw-name>/<fw-name> copy it to <vendor>/<fw-name>.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-08-02 00:26:17 +01:00
Sachi King
f966dea6ff metadata: Fix Vultr provider SSH pubkey fetching
The Vultr provider currently never calls handleSSH, resulting in it
being impossible to bring up a LinuxKit image in vultr with the SSH
pubkey provided via the Vultr metadata API.

Signed-off-by: Sachi King <nakato@nakato.io>
2019-07-22 17:14:25 +10:00
Guillaume Rose
6a6d169af9 Use ioctl instead of blockdev
Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
2019-07-17 21:56:21 +02:00
Guillaume Rose
0fb16ac8b0 Don’t resize dos partition if no free space is available
Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
2019-07-17 16:56:02 +02:00
Guillaume Rose
518220ee44 LastLBA is only present for GPT table
Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
2019-07-17 16:56:02 +02:00
Guillaume Rose
65f3d9bcc1 Propagate error instead of log.Fatalf()
Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
2019-07-17 16:56:02 +02:00
Rolf Neugebauer
c0fcc3ddac Bump packages to new alpine w/ containerd v1.2.7
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-06-28 01:56:20 +01:00
Guillaume Rose
fa1cd40a2a Create swap file only if absent
Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
2019-06-17 10:06:17 +02:00
Krister Johansen
3b20802be7 rngd exits after being stopped and resumed
Linux has documented but somewhat unusual behavior around
SIGSTOP/SIGCONT and certain syscalls, of which epoll_wait(2) is one.  In
this particular case, rngd exited unexpectedly after getting ptrace'd
mid-epoll_wait.  Fix this by handling EINTR from this syscall, and
continuing to add entropy and wait.

Signed-off-by: Krister Johansen <krister.johansen@oracle.com>
2019-06-04 13:22:50 -07:00
Preston Holmes
d11404ca97
Update GCP metadata provider
Signed-off-by: Preston Holmes <preston@ptone.com>
2019-05-15 13:51:58 -07:00
Justin Terry (VM)
1d9cedc0bb Update opencontainers/runc to v1.0.0-rc8
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2019-04-29 16:24:02 -07:00
Rolf Neugebauer
c7799a9080 pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-04-16 23:25:22 +01:00
Rolf Neugebauer
53485a1f83 Bump packages to new alpine w/ containerd v1.2.6
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-04-14 11:29:08 +01:00
Rolf Neugebauer
fd67969697 pkg/runc: Bump to v1.0.0-rc7-6-g029124da
This is the recommended version for containerd v1.2.6

While at it, also bump the alpine base.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-04-14 11:29:08 +01:00
Ian Campbell
3510c792ea Bump packages to new alpine w/ containerd v1.2.5
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-03-14 10:18:56 +00:00
Rolf Neugebauer
14039d0597 pkg/bpftrace: Disable the package
The compile fails with:

[ 30%] Building CXX object src/ast/CMakeFiles/ast.dir/codegen_llvm.cpp.o
[ 30%] Building CXX object src/ast/CMakeFiles/ast.dir/irbuilderbpf.cpp.o
[ 31%] Building CXX object src/ast/CMakeFiles/ast.dir/printer.cpp.o
[ 31%] Building CXX object src/ast/CMakeFiles/ast.dir/semantic_analyser.cpp.o
/bpftrace/src/ast/irbuilderbpf.cpp: In member function 'llvm::CallInst* bpftrace::ast::IRBuilderBPF::CreateProbeReadStr(llvm::AllocaInst*, size_t, llvm::Value*)':
/bpftrace/src/ast/irbuilderbpf.cpp:279:16: error: 'BPF_FUNC_probe_read_str' was not declared in this scope
       getInt64(BPF_FUNC_probe_read_str),
                ^~~~~~~~~~~~~~~~~~~~~~~
/bpftrace/src/ast/irbuilderbpf.cpp: In member function 'llvm::CallInst* bpftrace::ast::IRBuilderBPF::CreateProbeReadStr(llvm::Value*, size_t, llvm::Value*)':
/bpftrace/src/ast/irbuilderbpf.cpp:294:16: error: 'BPF_FUNC_probe_read_str' was not declared in this scope
       getInt64(BPF_FUNC_probe_read_str),
                ^~~~~~~~~~~~~~~~~~~~~~~
/bpftrace/src/ast/irbuilderbpf.cpp: In member function 'llvm::CallInst* bpftrace::ast::IRBuilderBPF::CreateGetCurrentCgroupId()':
/bpftrace/src/ast/irbuilderbpf.cpp:422:16: error: 'BPF_FUNC_get_current_cgroup_id' was not declared in this scope
       getInt64(BPF_FUNC_get_current_cgroup_id),
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/bpftrace/src/ast/irbuilderbpf.cpp: In member function 'llvm::CallInst* bpftrace::ast::IRBuilderBPF::CreateGetCurrentTask()':
/bpftrace/src/ast/irbuilderbpf.cpp:461:16: error: 'BPF_FUNC_get_current_task' was not declared in this scope
       getInt64(BPF_FUNC_get_current_task),
                ^~~~~~~~~~~~~~~~~~~~~~~~~
/bpftrace/src/ast/irbuilderbpf.cpp: In member function 'llvm::CallInst* bpftrace::ast::IRBuilderBPF::CreateGetStackId(llvm::Value*, bool)':
/bpftrace/src/ast/irbuilderbpf.cpp:497:16: error: 'BPF_FUNC_get_stackid' was not declared in this scope
       getInt64(BPF_FUNC_get_stackid),
                ^~~~~~~~~~~~~~~~~~~~
/bpftrace/src/ast/semantic_analyser.cpp: In member function 'int bpftrace::ast::SemanticAnalyser::create_maps(bool)':
/bpftrace/src/ast/semantic_analyser.cpp:871:68: error: 'BPF_MAP_TYPE_STACK_TRACE' was not declared in this scope
       bpftrace_.stackid_map_ = std::make_unique<bpftrace::FakeMap>(BPF_MAP_TYPE_STACK_TRACE);
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~
/bpftrace/src/ast/semantic_analyser.cpp:885:64: error: 'BPF_MAP_TYPE_STACK_TRACE' was not declared in this scope
       bpftrace_.stackid_map_ = std::make_unique<bpftrace::Map>(BPF_MAP_TYPE_STACK_TRACE);
                                                                ^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/ast/CMakeFiles/ast.dir/build.make:89: src/ast/CMakeFiles/ast.dir/irbuilderbpf.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/ast/CMakeFiles/ast.dir/build.make:115: src/ast/CMakeFiles/ast.dir/semantic_analyser.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:276: src/ast/CMakeFiles/ast.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-03 14:02:09 +00:00
Rolf Neugebauer
82d6f949c7 pkg/firmware: Update to latest
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-03 12:25:40 +00:00
Rolf Neugebauer
0552c47a26 pkg/cadvisor: Update to v0.33.0
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-03 12:25:40 +00:00
Rolf Neugebauer
4fdad53190 pkgs: Update packages to the latest linuxkit/alpine
except for bpftrace, since it does not compile:
https://github.com/linuxkit/linuxkit/pull/3230

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-03 12:25:40 +00:00
Ian Campbell
39ee6c0e9b Bump packages to new alpine w/ containerd v1.2.4
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-02-14 10:01:33 +00:00
Ian Campbell
24c13f222c Bump runc to version from containerd v1.2.4
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-02-14 10:01:33 +00:00
Ian Campbell
61ff76a7e3 Bump packages to new alpine w/ containerd v1.2.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-02-11 09:47:37 +00:00
Ian Campbell
d56442cf2e Bump runc to version from containerd v1.2.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-02-11 09:47:36 +00:00
Rolf Neugebauer
1d19a27e08
Merge pull request #3238 from kppk/master
Add support for named pipes to init
2019-02-08 10:04:28 +00:00
Tomas Knappek
63a6a60fed Fixes linuxkit#3237: add support for named pipes to init
Signed-off-by: Tomas Knappek <tomas.knappek@gmail.com>
2019-02-07 10:37:15 -08:00
Rolf Neugebauer
c44cf1293f
Merge pull request #3253 from johanneswuerbach/s390x-support
Add s390x support to binfmt_misc
2019-02-07 00:20:19 +00:00
Rolf Neugebauer
eeb2d546d1
Merge pull request #3249 from chriswue/master
Adding support to mount an encrypted filesystem
2019-01-18 01:28:50 +01:00
Christian Wuerdig
a9bc7372de Adding dm-crypt as core pkg
Signed-off-by: Christian Wuerdig <christian.wuerdig@gmail.com>
2019-01-18 11:56:18 +13:00
Christian Wuerdig
8cd16c4904 Adding losetup utility package to core pkg
Signed-off-by: Christian Wuerdig <christian.wuerdig@gmail.com>
2019-01-14 06:24:00 +13:00
Ian Campbell
7386a32afe pkg/runc: bump alpine base to newest one.
Corresponding to the similar changes in ed2dd46cd0.

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-08 16:28:36 +00:00
Ian Campbell
ddd8c0c017 Bump runc to version from containerd v1.2.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-08 11:52:42 +00:00
Ian Campbell
ed2dd46cd0 Bump packages to new alpine w/ containerd v1.2.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-08 11:52:42 +00:00
Johannes Würbach
81d17a19c4
Add s390x support to binfmt_misc
Signed-off-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
2018-12-22 22:50:37 +01:00
Simarpreet Singh
3e0686e5c2 pkg/bpftrace: Add bpftrace as a core pkg
Signed-off-by: Simarpreet Singh <simar@linux.com>
2018-12-07 14:31:43 -08:00
Ian Campbell
ce126caf3a Bump runc to version from containerd v1.2.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-30 10:53:47 +00:00
Ian Campbell
1292f7aa87 Bump packages to new alpine w/ containerd v1.2.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-30 10:53:47 +00:00
Ian Campbell
a4ca9fa674 getty&ssh: bind /var/lib/containerd
Needed for containerd v1.2.0 otherwise:

    $ ctr run -t docker.io/library/hello-world@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f test
    [ 1311.667587] overlayfs: failed to resolve '/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/5/fs': -2
    ctr: failed to mount /tmp/containerd-mount111658703: no such file or directory

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-30 09:29:54 +00:00
Ian Campbell
2ddce9bdea Bump runc to version from containerd v1.1.4
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-09-25 15:55:08 +01:00
Ian Campbell
809d257502 Bump packages to new alpine w/ containerd v1.1.4
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-09-25 15:55:07 +01:00
Ian Campbell
e1c6ae1678 Bump runc to version from containerd v1.1.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 13:40:00 +01:00
Ian Campbell
ad556eab78 Bump packages to new alpine w/ containerd v1.1.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-30 13:40:00 +01:00
David Scott
24a6112548 pkg/host-timesync-daemon: update vendoring of linuxkit/virtsock
Signed-off-by: David Scott <dave.scott@docker.com>
2018-08-02 16:09:29 +01:00
David Scott
50199d5bd5 pkg/vsudd: update the vendoring of linuxkit/virtsock
In addition to bug fixes, this removes the special protocol used
for `shutdown` needed by old Windows builds < 14393.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-08-02 16:09:24 +01:00
Rolf Neugebauer
21ff90c4c7 pkgs: Update packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-07-26 20:03:09 +01:00
David Scott
ddee5f27f3 memlogd/logwrite: use the same naming convention as init
In e8786d73bb the logwrite package will
automatically append .log to every log.

In 5201049f2c the init package will send
stderr of a service `s` to a log named `s` and the stdout to `s.out`.
Therefore the files we create on disk are `s.log` and `s.out.log`.

This patch modifies the memlogd `logwrite` command-line wrapper to use
the same convention.

Note there is a confusing name clash between `pkg/logwrite` and `cmd/logwrite`
in `memlogd` modified here.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-20 15:31:29 +01:00
Rolf Neugebauer
090f461e7f
Merge pull request #3117 from steeve/patch-1
Change GCP metadata SSH keys URL
2018-07-16 20:40:59 +01:00
Rolf Neugebauer
358f1a812a
Merge pull request #3115 from justincormack/merge-moby-tool
Merge moby tool back into LinuxKit
2018-07-16 17:52:37 +01:00
Justin Cormack
cf5cec204d
Update LinuxKit for merge of moby tool
- use the mkimage hashes that we had in LinuxKit as more up to date than tool.
- update docs
- move the code from moby under src/cmd/linuxkit

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2018-07-16 14:22:15 +01:00
Ian Campbell
eb48b1284c Bump packages to new alpine w/ containerd v1.1.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-16 10:29:41 +01:00
Steeve Morin
33b6fc77ea Change GCP metadata SSH keys URL
According to [1] the URL is not sshKeys but ssh-keys now.

[1] https://cloud.google.com/compute/docs/storing-retrieving-metadata

Signed-off-by: Steeve Morin <steeve.morin@gmail.com>
2018-07-15 01:29:31 +02:00
David Scott
637b1bdb3f pkg/kmsg: write to stderr (instead of stdout)
Part of #3111

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 11:48:16 +01:00
David Scott
7c243a8e8b pkg/init: only create /var/log/onboot symlink if not using memlogd
When logging directly to files (the not-using-memlogd case) the onboot
services must log to /run/log because /var/log might be overmounted
by a persistent disk. Therefore we create a symlink at the end of
the onboot section.

When logging via memlogd, all logs are buffered until a logwrite service
starts, so no symlink is needed.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 11:47:43 +01:00
David Scott
5201049f2c pkg/init: write stderr to <name> rather than <name>.err
This will then be written to disk as <name>.log by logwrite.

Part of #3111

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-13 10:48:31 +01:00
Rolf Neugebauer
e8786d73bb pkg/logwrite: Append .log to the log files
Also simplify the code by directly storing the path to
the log file in the LogFile structure.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-11 15:55:27 +01:00
Rolf Neugebauer
b4c3f9db1f pkg/tss: Switch SF repository to our mirror hosted on github
sourceforge git access is not very reliable...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 18:00:00 +01:00
Rolf Neugebauer
3672843dc9 pkg/node_exporter: Update to 0.16.0
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
1a6b6b2db9 pkg/firmware,firmware-all: Update to latest version
Update the the firmware packages to the latest commit
of the upstream linux-firmware repository.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
46184e258b pkg/cadvisor: Update to 0.30.2
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
c1e10002b0 pkgs: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 15:49:20 +01:00
Ian Campbell
18f11b2834 Bump packages to new alpine w/ containerd v1.1.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-10 09:53:11 +01:00
David Scott
e7fc5b59a3 pkg/kmsg: re-run vndr
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:58 +01:00
David Scott
793dd1b257 Add pkg/kmsg
This very simple program reads from `/dev/kmsg` and logs the output.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:58 +01:00
David Scott
565f787bb3 Add pkg/logwrite which writes and rotates log files
This process connects to memlogd and streams logs to individual files,
one per log. It keeps track of how many bytes have been written to each
file and rotates when the file size exceeds a defined threshold.

By default the maximum size of each file before rotation is 1MiB and
we keep up to 10 files per log.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:51 +01:00
Rolf Neugebauer
6045ddaf51 pkg: Use alpine 3.8 version of go (no need for go1.10)
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 18:24:56 +01:00
Rolf Neugebauer
a9acdd827e pkg: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 18:05:29 +01:00
David Scott
a07ecf60d5 memlogd: use kmsg format for reading the logs
Switch to a more formally-specified `kmsg`-style format for reading
the logs.

- update the spec in docs/logging.md
- check for bad names in pkg/memlogd with unit test

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
fe64f33430 memlogd: add test cases
- check writing to the log does not block
- check the log doesn't expand -- it should be finite
- check that client connections don't buffer arbitrary amounts of
  data if the client is slow

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
6aca715ad8 memlogd: replace an unbounded buffer with bounded channel
Previously we had a per-connection

  bytes.Buffer // to be written to the connection
  sync.Cond    // to allow us to Wait for more data

This had the major disadvantage that the buffer was unbounded and so
a slow client could cause memory exhaustion in the server. This patch
replaces these with a single

  chan *logEntry

which is naturally bounded and supports blocking read. We make write
non-blocking using select i.e. we drop messages rather than allocate
more space.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00