Commit Graph

77 Commits

Author SHA1 Message Date
Dane Everitt
ba6cec9615
Merge branch 'dane/backup-restore' into develop 2021-01-30 18:51:35 -08:00
Dane Everitt
225f8aa904
Support some additional signal types for stopping a server; ref pterodactyl/panel#3042 2021-01-28 21:26:02 -08:00
Dane Everitt
f7788e10a0
Fix broken error handling when creating network 2021-01-21 20:46:15 -08:00
Dane Everitt
bcca2550d1
Fix broken error handling when creating network 2021-01-21 20:45:56 -08:00
Dane Everitt
5021ea6a86
Code cleanup unrelated to changes for backup restoration 2021-01-18 21:27:00 -08:00
Dane Everitt
05c04c4350
Update remaining logic using viper 2021-01-14 20:19:28 -08:00
Dane Everitt
80faea3286
yoink viper back out of code, simplify some config logic 2021-01-14 20:11:01 -08:00
Dane Everitt
9480ccdbba
Initial WIP logic to handle loading configuration from the disk using viper 2021-01-12 21:14:57 -08:00
Jakob Schrettenbrunner
648072436f organize imports with gopls format 2021-01-10 01:22:39 +00:00
Dane Everitt
044c46fc9a
Merge branch 'develop' of https://github.com/pterodactyl/wings into develop 2021-01-08 21:21:37 -08:00
Dane Everitt
c9d972d544
Revert usage of ContainerWait, return to io.Copy blocking
Until https://github.com/moby/moby/issues/41827 is resolved this code causes chaos to unfold on machines and causes servers to be non-terminatable.

This logic was intially changed to logical purposes, but this io.Copy logic works perfectly fine (even if not immediately intuitive).
2021-01-08 21:21:09 -08:00
Matthew Penner
0aab4b1ac2 environment(docker): re-attach to container logs after EOF 2021-01-08 08:19:33 -07:00
Matthew Penner
4f4b4fd2e6 environment(docker): cleanup code 2021-01-08 08:15:40 -07:00
Matthew Penner
66c9be357c Potential fix for servers being marked as stopping after being marked as offline 2021-01-07 19:32:15 -07:00
Dane Everitt
1937d0366d
cleanup; fix environment stats not reporting network TX correctly 2021-01-06 20:47:44 -08:00
Dane Everitt
963a906c30
Less obtuse logic for polling resource usage when attaching a container 2021-01-06 20:36:29 -08:00
Matthew Penner
a4c8b8714b Bump all dependencies 2020-12-27 11:49:08 -07:00
Dane Everitt
1ba3631cc1
Don't follow if there is an error 2020-12-25 17:09:35 -08:00
Dane Everitt
94d41bc1f5
Use the system.ScanReader function to replace this logic 2020-12-25 17:07:57 -08:00
Dane Everitt
a4c68eed16
Use sync.Once here to instantiate the event handler 2020-12-25 17:07:40 -08:00
Dane Everitt
59c30c2842
Fix use of atomics in codebase 2020-12-25 17:04:18 -08:00
Matthew Penner
5c78cb9ab3
Add transfer logging output (#77)
Co-authored-by: Dane Everitt <dane@daneeveritt.com>
2020-12-25 13:32:41 -08:00
Dane Everitt
c0523df696
Add a server context that gets canceled when a server is deleted 2020-12-25 11:21:09 -08:00
Dane Everitt
3495fb1c76
Less racey logic for resource usage 2020-12-16 22:03:35 -08:00
Dane Everitt
59a111de39
Invite our lord and savior emperror back to the table 2020-12-15 21:56:53 -08:00
Yannick Schinko
c253a4bac0
Explictily disable log compression
Log compression is only relevant when `max-file` is 2 or higher.

Older versions of docker (Docker version 19.03.14, build 5eb3275d40 for example (currently the latest version on Debian 9)) error out when compression is enabled in the ``/etc/docker/daemon.json`` file:

```
Error response from daemon: failed to initialize logging driver: compress cannot be true when max-file is less than 2 or max-size is not set
```

While newer docker versions just don't care setting this explicitly to false like in ``intsall.go``, it doesn't hurt being explicit here:

de51fd1c51/server/install.go (L481-L485)
2020-12-12 00:51:11 +01:00
TortleWortle
da4c542724 Update allocations.go 2020-12-02 14:27:37 +01:00
Tortle
e7d93a5248
Update allocations.go 2020-12-01 23:03:05 +01:00
Tortle
51aa4c73cd
Update allocations.go 2020-12-01 21:20:01 +01:00
Tortle
4a7510d36f
Allow multiple publishing on multiple interfaces on same port.
Fixes the issue where you cannot have multiple ip addresses on the same port for a server.
2020-12-01 20:43:40 +01:00
Matthew Penner
de51fd1c51
Error handling improvements (#71)
* Remove `emperror.dev/errors`, remove all `errors#Wrap` and `errors#WithStack` calls
* Improve logging in `server/backup.go`
2020-11-28 16:57:10 -07:00
Dane Everitt
e2872e786e
Tiny optimization for handling string output from server console 2020-11-12 21:41:35 -08:00
Dane Everitt
672fb860ea
Don't add a stack for deadline exceeded when terminating 2020-11-12 20:50:15 -08:00
Dane Everitt
ffb6bd72ef
Don't accidentally reset a server's state when starting it after a system reboot; closes pterodactyl/panel#2695 2020-11-10 21:21:20 -08:00
Dane Everitt
34349d4b48
Don't report a context cancelation as an error 2020-11-10 20:36:40 -08:00
Dane Everitt
be9d1a3986
Replace error handling package with emperror; add better reporting for errors escaping server root 2020-11-08 13:52:20 -08:00
Dane Everitt
4b17ac4f1c
Fix atomic string handling for JSON output 2020-11-06 22:22:33 -08:00
Dane Everitt
944d381778
Improve server state logical handling; allow setting state directly on the environment 2020-11-06 21:53:00 -08:00
Dane Everitt
3fce1b98d5
Create atomic string to allow for simpler logic 2020-11-06 21:14:29 -08:00
Dane Everitt
912d95de24
Ensure environment starts in default offline state, rather than an empty string; closes pterodactyl/panel#2519 2020-11-02 19:43:49 -08:00
Dane Everitt
1c787b5f26
Fix handling of super long lines to not hit a scanner error; closes pterodactyl/panel#2549
Also fixes return handling in games like Minecraft to properly display the full line output.
2020-10-19 18:13:52 -07:00
Dane Everitt
3f9ac8b89a
Fix local images not being pulled correctly; closes #2559 2020-10-19 16:18:33 -07:00
Dane Everitt
9b54be06bb
Remove unused config values 2020-10-17 14:09:02 -07:00
Dane Everitt
c031d37b91
Use single call to create/return the docker client 2020-10-17 14:04:56 -07:00
Dane Everitt
947279a07c
Don't abort entire boot process due to one bad server egg; closes pterodactyl/panel#2448 2020-10-17 12:06:47 -07:00
Dane Everitt
4748d7cb29
Don't spam errors to the output if attempting to send a command to an unattached starting instance; closes pterodactyl/panel#2385 2020-09-26 17:35:11 -07:00
Jakob Schrettenbrunner
f79868ff6c why tf do we create docker clients in two locations... 2020-09-26 04:31:43 +02:00
Jakob
6cbcfece8e
enable client version negotiation for docker env (#61)
* enable client version negotiation for docker env

* derp

* another try
2020-09-25 19:19:27 -07:00
Matthew Penner
62d5248b0c Remove stacktrace from image exists locally warning 2020-09-20 14:20:42 -06:00
Dane Everitt
783832fc71
Set the docker image correctly when a server is updated; closes pterodactyl/panel#2356 2020-09-17 20:20:39 -07:00