Commit Graph

715 Commits

Author SHA1 Message Date
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
David Scott
3e742018d6 memlogd: use net.Conn rather than *net.UnixConn
There's no need to be so specific about the connection implementation.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:25 +01:00
David Scott
c92af038fb projects/logging: promote pkg/memlogd to a toplevel package
This is an example external logging service which can be enabled by
adding it to the `init` section of the .yml, for example:

    ...
    init:
      - linuxkit/init:35866bb276c264a5f664bfac7456f4b9eeb87a4d
      - linuxkit/runc:v0.4
      - linuxkit/containerd:f2bc1bda1ab18146967fa1a149800aaf14bee81b
      - linuxkit/ca-certificates:v0.4
      - linuxkit/memlogd:cc035e5c9e4011ec1ba97a181a6689fc90965ce9
    onboot:
    ...

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:25 +01:00
David Scott
f4bbce7a6c service: use the logging system with runc
If external logging is enabled, this patch sets the stdout and stderr
of the `runc` invocations to one end of a socketpair and the other end is
sent to the logging service. Otherwise we log to files as before.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:21 +01:00
David Scott
4dc75bc67b service: use the logging system with containerd
An external logging system exists if the socket

  /var/run/linuxkit-external-logging.sock

exists.

If an external logging system is enabled then create FIFOs for
containerd and send the other end of the FIFOs to the logging service.
Otherwise use /var/log files as before.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:48:57 +01:00
Brice Figureau
f7ff31382b Make sure motd contains the correct ctr command
The listed namespace wasn't correct, and thus the given `ctr` command
wasn't working.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2018-07-04 11:32:36 +02:00
Rolf Neugebauer
9dac66b831
Merge pull request #3078 from justincormack/dhcp-hook-fix
Fix dhcpcd hooks config
2018-06-29 19:02:24 +01:00
Justin Cormack
157c73cfed
Fix dhcpcd hooks config
These were being added to the incorrect directory.

Also move config file to /etc to be more standard.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-29 16:31:44 +01:00
Ian Campbell
34666cd87d Bump packages to new alpine w/ containerd v1.1.0-rc.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-28 17:35:04 +01:00
Justin Cormack
561e9375e8
Merge pull request #3075 from justincormack/binfmt_mount
Binfmt fixes
2018-06-22 16:09:34 +01:00
Justin Barrick
14ba30f418
Workaround DNS issue with qemu-user-static on alpine by using Debian in the first stage #2710
DNS lookups fail in qemu-user when it is built on Alpine: https://bugs.alpinelinux.org/issues/8131

Until this is resolved, we fetch the binaries from Debian and use those instead. The final stage
of the Dockerfile is still based on scratch.

We can revert this once the Alpine issue is fixed.

Signed-off-by: Justin Barrick <jbarrick@cloudflare.com>
2018-06-22 14:10:50 +01:00
Justin Cormack
a6dbe8ceba
Rather than bind mounting binfmt_misc filesystem, mount a copy.
For some reason, bind mounting does not always seem to work,
sometimes the filesystem is empty. Mounting a fresh copy seems
a better solution, and simplifies things. The container does
need `CAP_SYS_ADMIN` but only on boot.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-22 14:10:43 +01:00
Ian Campbell
90f7d1bed9 Bump packages to new alpine w/ containerd v1.1.1-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-19 16:01:20 +01:00
Patrik Cyvoct
5ab6b88029
Add Scaleway provider in metadata package
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 11:51:03 +02:00
Justin Barrick
9821180548 Add a restart and stop command to service.
Signed-off-by: justinbarrick <jbarrick@cloudflare.com>
2018-06-12 15:04:16 -07:00
Krister Johansen
16604bc039 Reboot should reboot instead of powering off.
When busybox's reboot processing occurs in init, it runs all SHUTDOWN
actions that are defined in inittab.  Once those are complete, it will
trigger either a halt, poweroff, or reboot, depending upon what signal
is received.  The mechanism that's used to shell out through inittab
does not allow us to pass through exactly which invocation was
requested.

Due to the way that rc.shutdown works, it invokes the poweroff action
for any and all SHUTDOWN callbacks, whether they're a reboot, poweroff,
or halt.  Instead of handling the reboot(2) syscall in rc.shutdown,
return after killing and unmounting and let busybox's init process
decide which reboot(2) action to use.

Signed-off-by: Krister Johansen <krister.johansen@oracle.com>
2018-06-11 08:29:08 -07:00
Avi Deitcher
643414f6f4 Add services.linuxkit warning to motd for sshd and getty
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-06-06 14:32:12 +03:00
Ian Campbell
525ff1c1a8 Bump packages to new alpine w/ containerd v1.1.1-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-01 14:09:05 +01:00
Rolf Neugebauer
1de059188b pkgs: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 13:18:03 +01:00
Ian Campbell
d563d78ac1 Bump packages to new alpine w/ containerd v1.1.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 09:58:31 +01:00
Robin Winkelewski
ffe9ac2319 move pkg config from Dockerfile to build.yml
Signed-off-by: Robin Winkelewski <w9ncontact@gmail.com>
2018-04-24 00:59:09 +02:00
Ian Campbell
2aea82683e containerd: disable cri plugin by default
It complains/fails if CNI is not available.

Also drop two obsolete keys.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 13:20:51 +01:00
Ian Campbell
e8e28c27e9 Bump packages to new alpine w/ containerd v1.1.0-rc.2
Since we are building containerd v1.1.0 with go 1.10 (as it requires) to the
same for init and runc too for consistency. In the case of init it is actually
required since we use the containerd client library there.

The subreaper interfaces have been removed from containerd and replaced with a
similar interface in runc/libcontainer, update init to use that now.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 11:27:03 +01:00
Ian Campbell
3301af529c Avoid writing to tty devices which don't actually exist.
$ git diff linuxkit.yml
    diff --git a/linuxkit.yml b/linuxkit.yml
    index e2ec829db..21b84e4ad 100644
    --- a/linuxkit.yml
    +++ b/linuxkit.yml
    @@ -1,6 +1,6 @@
     kernel:
       image: linuxkit/kernel:4.14.32
    -  cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
    +  cmdline: "console=ttyS0 console=foobar"
     init:
       - linuxkit/init:v0.3
       - linuxkit/runc:v0.3
    $ linuxkit  build linuxkit.yml
    [...]
    $ linuxkit run linuxkit
    [...]
    getty: cmdline has console=foobar but /dev/foobar is not a character device; not starting getty for foobar

    linuxkit-2ae2c420a11c login: root (automatic login)

    Welcome to LinuxKit!

    NOTE: This system is namespaced.
    The namespace you are currently in may not be the root.
    (ns: getty) linuxkit-2ae2c420a11c:~# ls -l /proc/1/root/dev/foobar
    -rw-r--r--    1 root     root           311 Apr  9 13:19 /proc/1/root/dev/foobar
    (ns: getty) linuxkit-2ae2c420a11c:~# cat /proc/1/root/dev/foobar

    Welcome to LinuxKit

                            ##         .
                      ## ## ##        ==
                   ## ## ## ## ##    ===
               /"""""""""""""""""\___/ ===
              {                       /  ===-
               \______ O           __/
                 \    \         __/
                  \____\_______/

Also added quotes around $tty for good measure.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-09 14:26:49 +01:00
Rolf Neugebauer
2d00440351 pkg: Update to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:05:39 +01:00
Ian Campbell
62d8e43fe4 Bump runc to version from containerd v1.0.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 11:11:32 +01:00
Ian Campbell
98aed68d98 Bump packages to new alpine w/ containerd v1.0.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 11:11:32 +01:00
Rolf Neugebauer
998eaa7dad pkg: Fix cgo CFLAGS for rngd
Go commit https://github.com/golang/go/issues/23672 introduced a
whitelist ofr flags passed into gcc to prevent arbitrary code
execution (CVE-2018-6574). The x86 rngd code uses two CFLAGS
not on the whitelist. Add them to 'CGO_CFLAGS_ALLOW'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-24 09:23:15 +00:00
Rolf Neugebauer
7459bd1546 pkg: Disable cadvisor for s390x
I get a build error:

patching file build/build.sh
>> building assets
>> building binaries
>> building cadvisor
vendor/github.com/klauspost/crc32/crc32.go:157:10: undefined: updateCastagnoli
vendor/github.com/klauspost/crc32/crc32.go:159:10: undefined: updateIEEE
vendor/github.com/klauspost/crc32/crc32.go:182:48: undefined: updateIEEE
make: *** [Makefile:40: build] Error 2

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 21:00:37 +00:00
Rolf Neugebauer
68fb6d0951 pkg: Update kernel used for the firmware package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:54:42 +00:00
Rolf Neugebauer
eb9e6cda93 pkg: Update to latest alpine base
This should enable s390x support for all package

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:20:13 +00:00
Pratik Mallya
8333ea0b5e Update README to include privileged flag
Without the privileged flag, the tcsd daemon does not have
access to the mounted host device files, especially the tpm
device file.

Signed-off-by: Pratik Mallya <pratik.mallya@gmail.com>
2018-03-06 01:32:04 -06:00
Avi Deitcher
cc57288b64 Add logging to /var/log for onboot containers
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-03-02 15:29:23 +02:00
Ian Campbell
1b07ca4d8c Bump runc to version from containerd v1.0.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 13:10:42 +00:00
Ian Campbell
b72df17cb3 Bump packages to new alpine w/ containerd v1.0.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 13:10:42 +00:00
Ian Campbell
3157ff9976 Bump packages to new alpine w/ containerd v1.0.2-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-07 09:50:19 +00:00
Ian Campbell
46b0ab3d9b Bump runc to version from containerd v1.0.2-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-31 09:43:25 +00:00
Ian Campbell
726f967f2d Bump packages to new alpine w/ containerd v1.0.2-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-31 09:41:49 +00:00
Rolf Neugebauer
1fadf13ec4 pkg: Allow specifying addition options to 'linuxkit' invocations
This is useful for 'make OPTIONS="-release=v0.1" push'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 13:50:28 +00:00
Rolf Neugebauer
7cf2c5abf7 pkg: Update all packages to the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 13:42:33 +00:00
Rolf Neugebauer
9b208c3772 pkg/ip: Update package with latest WireGuard tools
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-24 11:44:17 +00:00
Justin Cormack
d4b23a76de Increase size of ARP cache
We already had this increased above the defaults, but even larger values
seem to be recommended.

See https://blog.openai.com/scaling-kubernetes-to-2500-nodes/

"It’s common to tune this setting in HPC clusters, and is particularly
relevant in Kubernetes clusters since every pod has its own IP address
which consumes space in the ARP cache."

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-19 11:02:17 +00:00
Justin Cormack
4b9ffadb2e Add support for runtime containerd namespace configuration
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-18 12:40:56 +00:00
Ian Campbell
a811110ad8 Bump packages to new alpine w/ containerd v1.0.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-18 10:59:41 +00:00
Rolf Neugebauer
aa2791a6dd pkg/firmware-all: Add package containing all Linux Firmware blobs
This package is primarily for users of custom or foreign
kernels which may have drivers enabled for which the
'firmware' package does not contain the firmware blobs.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-16 19:08:19 +00:00
Rolf Neugebauer
1d9c4361c0 pkg/firmware: Add a package with firmware required by enabled device drivers
This new 'firmware' package contains the firmware blobs required
by the device drivers in a LinuxKit kernel. The list of required
blobs is determined by calling 'modinfo' on each module.

We also unconditionally include the AMD CPU microcode and the
licence files.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-16 19:08:18 +00:00
Avi Deitcher
c0ff9cf6f0
Merge pull request #2864 from deitch/fix-metadata-label
Add /run to binds and use newer yml label format
2018-01-16 11:36:49 +02:00
Avi Deitcher
0d4b2742e2 Add /run to binds and use newer yml label format
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-01-15 19:51:35 +02:00
Ian Campbell
779be8cff1 mount: Add missing argument to Printf
go_vet (via https://goreportcard.com/report/github.com/linuxkit/linuxkit)
reported:

    error: missing argument for Printf("%v"): format reads arg 2, have only 1 args (vet)
    error: wrong number of args for format in Printf call: 2 needed but 3 args (vet)

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-15 17:24:36 +00:00
Ian Campbell
826ee28c8d metadata: print Entry objects with %+v not %s
go_vet (via https://goreportcard.com/report/github.com/linuxkit/linuxkit)
reported:

    error: arg current for printf verb %s of wrong type: main.Entry (vet)

For each of these.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-15 17:24:36 +00:00
Ian Campbell
a4230b74aa init: print integer with %d not %s
go_vet (via https://goreportcard.com/report/github.com/linuxkit/linuxkit)
reported:

    error: arg resource for printf verb %s of wrong type: int (vet)

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-15 17:24:36 +00:00
Avi Deitcher
2af908d1b7 Move metadata to /run instead of /var
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-01-15 14:23:03 +02:00
Ian Campbell
e0b871560a Bump to runc 7f24b40cc5423 as used by containerd v1.0.1-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-12 10:51:34 +00:00
Ian Campbell
913e6420ba Bump packages to new alpine w/ containerd v1.0.1-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-12 10:51:01 +00:00
Ian Campbell
965c678f9c
Merge pull request #2845 from ijc/example-hostmount-writeable-overlay
Add an example of setting up a writeable overlay of a host path
2018-01-11 16:03:15 +00:00
Rolf Neugebauer
e3284d50e0
Merge pull request #2847 from w9n/nvme
format: fix for nvme
2018-01-11 14:21:03 +00:00
Ian Campbell
794ea7ed72 Make runtime.mounts[].destination relative to container rootfs
This is similar to ae64ab6b82 from #2849 which
did the same for runtime.mkdir.

This makes it possible to specify both host (absolute) or container (relative)
paths.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-11 12:58:09 +00:00
Robin Winkelewski
bd20f419bf format: fix for nvme
Signed-off-by: Robin Winkelewski <w9ncontact@gmail.com>
2018-01-11 11:43:53 +01:00
Justin Cormack
ae64ab6b82 Make relative paths in runtime mkdir be relative to container rootfs
Currently all paths were treated as absolute paths.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-10 14:58:49 +00:00
Justin Cormack
a4a332f39a Use logrus not log for logging consistently
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-10 14:28:50 +00:00
Stephen J Day
fbbab9eafd
pkg/init/cmd/service: plumb containerd namespace
This PR correctly plumbs a single context to propagate the containerd
namespace to the necessary commands. Services launched with containerd
after this change will now be in a default namespace of
`services.linuxkit`.

A top-level flag is added to the service command,
`--containerd-namespace` which can be used to change, if needed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-01-05 14:45:19 -08:00
Tobias Klauser
642c6f23ac Use pure Go unix.Reboot function in rc.init
Use unix.Reboot from golang.org/x/sys/unix for poweroff and reboot
instead of relying on external commands.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2018-01-04 13:16:28 +01:00
isaac.rodman
6ac2ab8924 pkg/sysctl fixes: support commented KV lines, no post-crit KV set skips, support adding sysctl .conf files
- Previously, KV lines which were commented would attempt to be set. Now any commented KV lines will also be ignored.
- Comments can start with a hash or semicolon
- Splitting KV on both period and forward slash
- Some kernels may not have certain features enabled (such as IPv6) in the default etc/sysctl.d/*.conf, and thus pkg/sysctl would only set the KV until the first failure, and then silently skip the rest of the KVs. Now any failure is logged as a WARN, and those lines can now be commented per the above change, as they will be identified.

Signed-off-by: Isaac Rodman <isaac@eyz.us>
2018-01-02 07:33:13 -07:00
Rolf Neugebauer
720fb219ce pkg/sysctl: Prevent ebpf privilege escalation
On 4.9.x and 4.14.x kernels ebpf verifier bugs allow ebpf
programs to access (read/write) random memory. Setting
kernel.unprivileged_bpf_disabled=1 mitigates this somewhat
until it is fixed upstream.

See:
- https://lwn.net/Articles/742170
- https://lwn.net/Articles/742169

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-25 15:32:57 +01:00
Ian Campbell
abf0a5d098 auditd: Use package from alpine 3.7
This was added to alpine since our package was created. Now we have upgraded we
can just use the binary.

The package contains an auditd.conf but we have a tweak local copy which writes
to stdio (which goes to /var/log/auditd.*.log already). The package doesn't
have an audit.rules so keep that here too.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-15 11:07:55 +00:00
Ian Campbell
de242facca auditd: move config into build.yml
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-15 10:16:37 +00:00
Rolf Neugebauer
fa51c915ba pkg: Update all package to the alpine:3.7 base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Rolf Neugebauer
a41dd90a64 pkg/qemu-ga: Fix build issue with alpine:3.7
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Rolf Neugebauer
84b8bce809 pkg/audit: Fix build issue with alpine:3.7
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Ian Campbell
2561827100 Bump packages to new alpine w/ containerd v1.0.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-05 09:55:32 +00:00
Phil Estes
42014e361f
remove subreaper config item
containerd v1.0.0-rc.0 changed the subreaper config entry to the
negative given subreaper "on" is the default. However, linuxkit
does not need to change the default subreaper setting so removing
the now invalid config line.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-12-04 09:23:22 -05:00
Ian Campbell
28e22e40bb Bump packages to new alpine w/ containerd v1.0.0-rc.0
Minor updates due to renamings in containerd.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-01 13:36:16 +00:00
Ian Campbell
1f6c1a59ca linuxkit pkg: Add config field to build.yml
This is a `moby.ImageConfig` struct which is marshalled into JSON and added as
the `org.mobyproject.config` label on the built image.

Convert `pkg/sysctl` as PoC.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-28 12:01:39 +00:00
Marco Mariani
959b6dd96d pkg/cadvisor
Signed-off-by: Marco Mariani <marco.mariani@alterway.fr>
2017-11-21 13:46:42 +01:00
Justin Cormack
83522d81fd
Merge pull request #2761 from justincormack/restore-build
Restore linuxkit build
2017-11-21 10:21:39 +00:00
Justin Cormack
f8e352d375 Replace moby build with linuxkit build throughout
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 17:06:54 +00:00
Marco Mariani
01d0a1835c pkg/node_exporter from sources
Signed-off-by: Marco Mariani <marco.mariani@alterway.fr>
2017-11-20 12:13:26 +01:00
Rolf Neugebauer
0a2db0ac83
Merge pull request #2758 from rn/no-lcow
Remove LCOW
2017-11-17 17:23:34 +00:00
Justin Cormack
cad6527033
Merge pull request #2755 from justincormack/runtime-cgroups
Add support for creating cgroups in runtime section
2017-11-17 17:01:27 +00:00
Rolf Neugebauer
32fca2954f Remove LCOW
It is now under https://github.com/linuxkit/lcow

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-17 15:55:19 +00:00
Justin Cormack
6cb919b489 Add support for creating cgroups in runtime section
Implements https://github.com/moby/tool/pull/181

Design for things like Kubernetes setup that requires some cgroups to
exist when the service starts but it is not running in these, other
services are, so there would be a race if they are not created in each.

Essentially it is just a sugared `mkdir` in all the cgroup dirs.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-17 14:12:41 +00:00
dave
86f254850d After partitioning we now retry the stat prior to formatting
When waiting for devices to refresh a stat can fail with the
error message 'stat: /dev/vda1: stat: no such file or directory'.

This was observered with empty raw disks (*.img) that was being
created by the moby/hyperkit go library.

This commit restores the previous logic of refreshing with mdev
instead of returning an error.

Signed-off-by: dave protasowski <dprotaso@gmail.com>
2017-11-16 09:36:36 -05:00
Rolf Neugebauer
e145ef02b3 pkg/lcow: Update OpenGCS to latest
While at it might as well bump alpine base

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-15 10:57:55 +00:00
Ian Campbell
ca02060a4c Bump runc to 74a17296470088de3805e138d3d87c62e613dfc4
As recommended by containerd v1.0.0-beta.3

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-15 09:28:44 +00:00
Rolf Neugebauer
879ea03277
Merge pull request #2703 from guillaumerose/multi
metadata: handle json with more than 2 levels
2017-11-14 13:39:27 +00:00
Marco Mariani
d87e4f622b node_exporter 0.15.1; updated parameters
Signed-off-by: Marco Mariani <marco.mariani@alterway.fr>
2017-11-14 11:37:02 +01:00
Guillaume Rose
06e86154b6 metadata: handle json with more than 2 levels
Signed-off-by: Guillaume Rose <guillaume.rose@docker.com>
2017-11-13 14:35:17 +01:00
Ian Campbell
61ca751840 Bump packages to new alpine w/ containerd v1.0.0-beta.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-09 10:16:33 +00:00
Rolf Neugebauer
7c5f797935 pkg: Update getty/ip/sshd package to pick up new wireguard
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-03 15:11:06 +00:00
Olaf Flebbe
6ec8e895a7 Support static ppc64le executables in qemu
The /sbin/ldconfig.real command in ubuntu for ppc64le cannot be executed
in docker images since the binfmt-misc configuration does not match the
executable file format. This patch is a port of
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794737 to linuxkit

Signed-off-by: Olaf Flebbe <of@oflebbe.de>
2017-10-28 21:09:38 +02:00
Isaac Rodman
0ff1f84918 pkg/ip: added iptables, ebtables, ipvsadm, and bridge-utils
Signed-off-by: Isaac Rodman <isaac@eyz.us>
2017-10-24 16:45:38 -07:00
Ian Campbell
6c7b1c0251 Bump all packages to newest alpine.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-24 10:11:24 +01:00
Nick Jones
5663112822
Fix typo which broke metadata retrieval
Signed-off-by: Nick Jones <nick@dischord.org>
2017-10-18 22:47:03 +01:00
Ian Campbell
9facf7b585 ip: Update to newest alpine.
Rebuild to pickup newer go also picked up newer wireguard-tools,
0.0.20171005-r0 → 0.0.20171011-r0.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 16:51:37 +01:00
Ian Campbell
29fc12607f Update various other go base pkgs to newer alpine (go1.9)
These are those which set $GOPATH but don't use go-compile.sh.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 16:50:47 +01:00
Ian Campbell
a9b03c3f95 Update all users of go-compile.sh to new alpine (go1.9)
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 16:47:35 +01:00
Ian Campbell
aba82533a0 Update go system components to new alpine (go1.9)
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 16:45:01 +01:00
Ian Campbell
2875ef0e82 runc: Update to version used by containerd v1.0.0-beta.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 13:01:06 +01:00
Ian Campbell
aeed5f6b40 init,containerd: bump to new alpine with v1.0.0-beta.2.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 12:57:08 +01:00
Ian Campbell
a237b51511 Bump alpine base across the board.
By running:

    ./scripts/update-component-sha.sh --image linuxkit/alpine ad35b6ddbc70faa07e59a9d7dee7707c08122e8d

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 09:55:45 +01:00
Ian Campbell
13d11f49ba Rename "tag*" Makefile targets to "build*"
This better matches the `linuxkit pkg build` nomenclature.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:48:48 +01:00