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
Dane Everitt
6ba1b75696
Add console throttling; closes pterodactyl/panel#2214 ( #60 )
2020-09-17 20:13:04 -07:00
Dane Everitt
be49e08f4f
Show note in console when image is being pulled, show pull status to admins
2020-09-12 21:37:48 -07:00
Dane Everitt
0cd8dc2b5f
avoid deadlocks while processing tons of data over server event listeners; closes pterodactyl/panel#2298
2020-09-10 20:05:01 -07:00
Dane Everitt
891e5baa27
Don't restart if the stop command is manually sent to the console
2020-09-07 15:53:44 -07:00
Dane Everitt
001bbfad1b
avoid panic from environment; ref pterodactyl/panel#2307
2020-09-07 15:37:35 -07:00
Dane Everitt
5bead443ad
Handle port bindings correctly when using 127.0.0.1
...
closes pterodactyl/panel#2307
2020-09-07 15:33:47 -07:00
Matthew Penner
a81146d730
Potential fix for console becoming unresponsive ( #55 )
...
* Potentially fix console logs not being pulled after a server has been running for a while
* Add container_id to resource polling debug logs
2020-09-07 13:04:56 -07:00
Matthew Penner
7ba32aca84
Fix some typos and run gofmt on all .go files
2020-09-05 13:08:40 -06:00
Dane Everitt
b9f6e17a7d
Additional error logging
2020-09-03 21:21:42 -07:00
Dane Everitt
d99225c0fb
Add additional logging around resource polling
2020-09-03 21:19:06 -07:00
Dane Everitt
7d8710824c
Fix startup variables not being properly updated on server reboot; closes pterodactyl/panel#2255
2020-08-27 21:08:33 -07:00
Dane Everitt
711ee2258c
Minimize code duplication for environment variables; ref pterodactyl/panel#2255
2020-08-27 20:28:29 -07:00
Dane Everitt
60acee2df5
avoid panic crash due to bad environment variable values; closes pterodactyl/panel#2275
2020-08-27 20:05:07 -07:00
Dane Everitt
4d3a860604
Use environment namespace for power state, don't duplicate them across server
2020-08-19 18:58:48 -07:00
Dane Everitt
5b241fdf36
Correctly send stats & proc information back for servers
2020-08-18 21:38:42 -07:00
Dane Everitt
956e87eb93
Handle restarting correctly, ensure power state propagates correctly
2020-08-18 20:43:28 -07:00
Dane Everitt
4a2a0b25bb
Run chown when starting a server
2020-08-18 20:27:42 -07:00
Dane Everitt
a24a5466e5
Remove restart from environment, handle at a server level; also fix pre-boot logic
2020-08-13 21:36:23 -07:00
Dane Everitt
63c09adaa1
Better handling of stop & restart without releasing process locks too soon
2020-08-13 21:10:33 -07:00
Dane Everitt
cf1c671e68
Support changing the /tmp volume size in the config
2020-08-12 20:38:02 -07:00
Dane Everitt
cc52954a2a
Refactor environment handling logic to separate a server from the environment handler itself
...
This change makes the environment handling logic execute independent of the server itself and should make it much easier for people to contribute changes and additional environment handlers down the road without polluting the server object even more.
There is still a lot of work to do on this front to make things easier to work with, and there are some questionable design decisions at play I'm sure.
Welcome to additional modifications and cleanup to make this code easier to reason about and work with.
2020-08-10 21:38:42 -07:00
Dane Everitt
f8bffd8391
Start the process of migrating from zap to a cleaner CLI output for logs
2020-05-28 22:07:53 -07:00
vagrant
59b11eb80c
use cobra for cli
...
reorganize a bit to be able to use it
2020-04-10 13:12:18 +00:00
Dane Everitt
08af485c40
Get basic environment creation beginning to work
2019-04-03 22:01:11 -07:00
Dane Everitt
639d9edef5
Better configuration loading process for servers
...
Loads up to 10 configurations at once in parallel
2019-03-24 18:39:01 -07:00
Dane Everitt
29de97c857
That editorconfig file really butchered the formatting for go
2019-03-24 18:00:21 -07:00
Dane Everitt
a3d5bf7982
Migrate very basic environment capabilities
2019-03-24 17:27:14 -07:00