979 Commits

Author SHA1 Message Date
Andrey Smirnov
06bff97a3f
refactor: change conditions to be interface, add descriptions (#677)
Conditions are now implemented as interface with two methods: `Wait` for
condition to be true (cancelable via context) and 'String' which
describes what condition is waiting for.

Generic 'WaitForAll' was implemented to wait for multiple conditions at
once.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-21 21:25:08 +03:00
Brad Beam
b6a01d6e5b
fix: Address lint warning for unknown linter (#676)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-21 10:59:13 -05:00
Andrew Rynhard
0487099243
docs: add Zoom meeting schedule to README (#674)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-20 14:38:35 -07:00
Andrey Smirnov
e35a910da2
refactor: fix stream chunker & provide some tests (#672)
Stream chunker should be cancellable at any point of execution, plus it
should be stop chunking on EOF.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-20 23:53:05 +03:00
Brad Beam
b0dab6e021
fix(osd): Sanitize request.id for log streams (#673)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-20 14:46:05 -05:00
Brad Beam
a64de7ed51
feat(init): Add initToken parameter to userdata (#664)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-20 14:23:38 -05:00
Andrew Rynhard
bbbd1f70d1
chore: prepare release v0.1.0-alpha.27 (#671)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.1.0-alpha.27
2019-05-20 10:24:18 -07:00
Andrey Smirnov
204873e257
refactor: fix filechunker not exiting on context cancel (#668)
This started as a simple unit-test for file chunker, but the first test
hung immediately, so I started looking into the code.

One problem was that when entering inotify() code, ctx cancel wasn't
considered. Another problem is that remove fsnotify was never triggered,
but I saw that with unit-test later.

Small nit was that inotify() was initialized every time we got to EOF,
which is not efficient for "follow" mode.

So I moved inotify into the main loop, and plugged context cancel watch
into the place when chunk is delivered. Chunker code is supposed to
block in two places: when it tries to deliver next chunk (as client
might be slow to recieve buffers) or when there's no new data (on
inotify). So it makes sense to assert context canceled condition in both
cases.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-20 18:00:40 +03:00
Andrew Rynhard
496bb83078
feat: add plural alias of service command (#670)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-18 09:17:09 -07:00
Andrey Smirnov
54168cef1c feat(init): implement healthchecks for the services (#667)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-18 08:44:56 -07:00
Andrey Smirnov
75b2ce7fd2
feat(init): implement services list API and osctl service CLI (#662)
This returns list of all the services registered, with their current
status, past events, health state, etc.

New CLI is `osctl service [<id>]`: without `<id>` it prints list of all
the services, with specific `<id>` it provides details for a service.

I decided to create "parallel" data structures in protobuf as Go
structures don't map nicely onto what protoc generates: pointers vs.
values, additional fields like mutexes, etc. Probably there's a better
approach, I'm open for it.

For CLI, I tried to keep CLI stuff in `cmd/` package, and I also created
simple wrapper to remove duplicated code which sets up client for each
command.

Examples:

```
$ osctl service
SERVICE      STATE     HEALTH   LAST CHANGE   LAST EVENT
containerd   Running   OK       21s ago       Health check successful
kubeadm      Running   ?        2s ago        Started task kubeadm (PID 280) for container kubeadm
kubelet      Running   ?        0s ago        Started task kubelet (PID 383) for container kubelet
ntpd         Running   ?        14s ago       Started task ntpd (PID 129) for container ntpd
osd          Running   ?        14s ago       Started task osd (PID 126) for container osd
proxyd       Waiting   ?        14s ago       Waiting for conditions
trustd       Running   ?        14s ago       Started task trustd (PID 125) for container trustd
udevd        Running   ?        14s ago       Started task udevd (PID 130) for container udevd
```

```
$ osctl service proxyd
ID       proxyd
STATE    Running
HEALTH   ?
EVENTS   [Preparing]: Running pre state (22s ago)
         [Waiting]: Waiting for conditions (22s ago)
         [Preparing]: Creating service runner (6s ago)
         [Running]: Started task proxyd (PID 461) for container proxyd (6s ago)
```

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-17 18:01:12 +03:00
Andrew Rynhard
d36d4404bd
fix(osctl): output config without localAPIEndpoint (#665)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-16 21:18:42 -07:00
Brad Beam
dd3d3fac9c
fix(osd): Read talos service logs from file (#663)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-16 20:05:23 -05:00
Andrey Smirnov
d034987f71 fix(init): fix containerd healthcheck leaking memory in init/containerd (#661)
As containerd client API wasn't closed after use, connection was leaking
every time healthcheck was run.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-16 18:35:14 -05:00
Andrew Rynhard
98d76d8198
fix(init): mount /sys into kubelet container (#660)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-16 14:42:34 -07:00
Andrew Rynhard
4bdcccfd00
fix: add libressl to rootfs (#659)
This library is required by socat.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-15 19:09:27 -07:00
Andrew Rynhard
18a1536b01
feat: use osctl in installer (#654)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-15 16:14:30 -07:00
Andrew Rynhard
ea4d3c4f66
feat: add bootstrap token package (#657)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-15 14:54:20 -07:00
Andrew Rynhard
92fb18e3ea
feat: use github.com/mdlayher/kobject (#653)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-15 11:18:08 -07:00
Andrey Smirnov
1dde9f8cc0 feat(init): implement health checks for services (#656)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-15 09:30:35 -07:00
Tony Bai
8c2a4452cd docs: fix typo in README.md (#655)
Signed-off-by: Tony Bai <bigwhite.cn@aliyun.com>
2019-05-14 18:30:58 -07:00
Andrew Rynhard
3ceb7a84ee
chore: prepare release v0.1.0-alpha.26 (#652)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
v0.1.0-alpha.26
2019-05-13 17:16:55 -07:00
Andrey Smirnov
4bf649f14c chore: workaround flaky tests (#651)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-13 15:00:59 -07:00
Andrew Rynhard
42a562a2bc
chore: remove AMI publish step (#650)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-13 13:36:17 -07:00
Brad Beam
0b33280915
feat(init): Add upgrade endpoint (#623)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-13 15:15:25 -05:00
Andrew Rynhard
636bdf4439
test: add another test case for setting kernel params (#649)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-13 11:49:23 -07:00
Andrew Rynhard
a25cb09bf2
refactor: use os.Remove instead of unix.Unlink (#648)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-13 08:05:02 -07:00
Andrey Smirnov
3dc5606053 fix(init): don't close ACPI listen handle too early (#647)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-13 07:50:21 -07:00
Andrew Rynhard
3c52f5e686
feat: add support for UEFI (#642)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-12 10:11:33 -07:00
Andrew Rynhard
ff58642d93
feat: improve package for /proc/cmdline parsing and management (#645)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-12 09:05:29 -07:00
Brad Beam
5485b9ecb4
fix(osctl): Fix panic on osctl df if error is returned (#646)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-11 21:52:10 -05:00
Brad Beam
a6989db1d1
fix(osd): Use correct context in stats endpoint (#644)
Without this we never set the namespace for the context which prevents it from functioning at all

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-11 14:26:23 -05:00
Andrew Rynhard
967e547d87
fix(init): unlink unix bind address (#643)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-11 10:19:51 -07:00
Brad Beam
8548271d8e fix: Update filesystem check to open device as a device (#641)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-10 15:55:15 -07:00
Andrew Rynhard
4a0c4d84f3
chore: fix creation of syslinux config file (#639)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-10 07:54:35 -07:00
Andrew Rynhard
64c48353e2
feat: add ability to create multiple entries in extlinux.conf (#636)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-10 04:50:26 -07:00
Brad Beam
3d5d419b93 fix(osctl): Fix formatting of command/args to be useful (#638)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-09 20:58:36 -07:00
Andrew Rynhard
9bd047995e
chore: set PACKER_LOG=1 in AMI build (#637)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 15:16:07 -07:00
Andrew Rynhard
62b06e8f46
chore: add env vars required for AMI publishing (#635)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 13:59:55 -07:00
Andrew Rynhard
86e24601b1
chore: publish AMIs on tags (#633)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 13:04:41 -07:00
Andrew Rynhard
265a94f40e
fix: allow no trustd endpoints to be specified (#634)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 11:11:05 -07:00
Brad Beam
90ca160e95
refactor(initramfs): Compose Install better (#624)
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-05-09 12:24:38 -05:00
Andrey Smirnov
995f4c6841 feat(init): core health check package (#632)
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-05-09 10:03:05 -07:00
Andrew Rynhard
f0e162a7f5
refactor: move osinstall into osctl (#629)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 08:49:32 -07:00
Andrew Rynhard
5160cbc5b6
feat: remove EC2 verification step (#631)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 08:10:23 -07:00
Andrew Rynhard
fca2b9d17b
feat: add helper package for cordon and drain (#626)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 07:38:29 -07:00
Andrew Rynhard
21c0b05af6
feat: upgrade Linux to v4.19.40 (#630)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 06:29:22 -07:00
Andrew Rynhard
08789a0b8c
feat: update toolchain (#628)
This toolchain brings in:
- Linux v4.19.40
- Musl v1.1.22
- Golang v1.12.5
- Protobuf v3.7.1
- Golang-protobuf v1.3.1

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 05:36:13 -07:00
Andrew Rynhard
9b5b2f0c7c
fix(osctl): output talosconfig on generate (#627)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-08 20:27:50 -07:00
Andrew Rynhard
2ea7e055a2
feat(osctl): add flag for number of workers to create (#625)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-08 07:29:22 -07:00