Commit Graph

52 Commits

Author SHA1 Message Date
Matthew Penner
058f643e65
chore: reformat code 2022-10-06 09:58:42 -06:00
camjac251
c736c24118
it's to its (#123) 2022-09-25 13:34:28 -06:00
DaneEveritt
7bd11c1c28
Switch to SQLite for activity tracking 2022-07-10 16:51:11 -04:00
DaneEveritt
ed330fa6be
Squashed commit of the following:
commit f5baab4e88
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Sat Jul 9 17:50:53 2022 -0400

    Finalize activity event sending logic and cron config

commit 9830387f21
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Sat Jul 9 16:26:13 2022 -0400

    Send power events in a more usable format

commit 49f3a61d16
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Sat Jul 9 15:47:24 2022 -0400

    Configure cron to actually send to endpoint

commit 28137c4c14
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Sat Jul 9 15:42:29 2022 -0400

    Copy the body buffer otherwise subsequent backoff attempts will not have a buffer to send

commit 20e44bdc55
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Sat Jul 9 14:38:41 2022 -0400

    Add internal logic to process activity events and send them to the panel

commit 0380488cd2
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Mon Jul 4 17:55:17 2022 -0400

    Track power events

commit 9eab08b92f
Author: DaneEveritt <dane@daneeveritt.com>
Date:   Mon Jul 4 17:36:03 2022 -0400

    Initial logic to support logging activity on Wings to send back to the panel
2022-07-09 17:51:19 -04:00
Dane Everitt
4c8f5c21a3
Improve power lock logic (#118) 2022-01-23 09:49:35 -08:00
Dane Everitt
a4904365c9 Sink pool cleanup and organization; better future support when we add more sinks 2022-01-23 09:57:25 -05:00
Matthew Penner
649dc9663e
Server Event Optimizations (#116) 2022-01-17 20:23:29 -07:00
Dane Everitt
ee91224eb6 add context timeouts to avoid hanging wings boot process if docker has a hiccup; closes pterodactyl/panel#3358 2021-09-11 14:13:19 -07:00
Dane Everitt
5764894a5e
Cleanup server sync logic to work in a single consistent format (#101)
* Cleanup server sync logic to work in a single consistent format

Previously we had a mess of a function trying to update server details from a patch request. This change just centralizes everything to a single Sync() call when a server needs to update itself.

We can also eventually update the panel (in V2) to not hit the patch endpoint, rather it can just be a generic endpoint that is hit after a server is updated on the Panel that tells Wings to re-sync the data to get the environment changes on the fly.

The changes I made to the patch function currently act like that, with a slightly fragile 2 second wait to let the panel persist the changes since I don't want this to be a breaking change on that end.

* Remove legacy server patch endpoint; replace with simpler sync endpoint
2021-08-29 13:37:18 -07:00
Matthew Penner
3c54c1f840 break everything
- upgrade dependencies
- run gofmt and goimports to organize code
- fix typos
- other small tweaks
2021-08-02 15:07:00 -06:00
Dane Everitt
f57c24002e More API response fixing 2021-04-04 10:20:27 -07:00
Dane Everitt
2e0496c1f9 Add note about handling of UTF-8 sequences in properties files. 2021-04-03 14:02:37 -07:00
Dane Everitt
d4b63bef39 Fix details fetching for a single server instance 2021-04-03 13:15:11 -07:00
Matthew Penner
0e3778ac47 transfers: use backup archiver 2021-03-07 11:04:15 -07:00
Dane Everitt
f3a6ee7a45
re-refactor code 2021-01-25 20:28:24 -08:00
Jakob Schrettenbrunner
c9c949a091 rename ServerManagerFromContext from ExtractServerManager 2021-01-10 02:18:02 +00:00
Jakob Schrettenbrunner
8192244fec replace servers.servers singleton with server.Manager 2021-01-10 02:37:02 +01:00
Jakob Schrettenbrunner
648072436f organize imports with gopls format 2021-01-10 01:22:39 +00:00
Matthew Penner
5be6e20b03 Send archive status request before sending the transfer status event 2020-12-26 11:42:44 -07: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
c8d297a056
Support canceling an in-progress download 2020-12-20 12:53:40 -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
Dane Everitt
0ecc166dcd
Update error reporting middleware 2020-12-15 21:08:00 -08:00
Dane Everitt
acd6dc62d0
Update middleware logic 2020-12-15 20:19:09 -08: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
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
08d1efb475
Support denying a JWT JTI via the API 2020-11-03 21:01:50 -08:00
Dane Everitt
37e59e6928
Close connected sockets when a server is deleted; closes pterodactyl/panel#2428 2020-10-03 20:46:29 -07:00
Dane Everitt
0f7bb1a371
Refactor filesystem to not be dependent on a server struct 2020-09-27 12:24:08 -07:00
Dane Everitt
fb24ad58b4
Don't allow a reinstall while server is processing a power action; closes pterodactyl/panel#2409 2020-09-25 20:03:04 -07:00
Dane Everitt
6ba1b75696
Add console throttling; closes pterodactyl/panel#2214 (#60) 2020-09-17 20:13:04 -07:00
Dane Everitt
d02e37620d
Use workerpools to enforce FIFO without blocking other topics 2020-09-12 20:13:59 -07:00
Dane Everitt
4ac19bd29d
Refactor confusing & fragile event bus logic to use callbacks and not channels; ref pterodactyl/panel#2298 2020-09-12 09:26:17 -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
7d084e3049
Correctly return the suspension status of the server 2020-08-30 09:54:33 -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
b9fb922e91
Fix the race condition where the race is actually happening 2020-08-18 21:46:17 -07:00
Dane Everitt
177aa8e436
Refactor power handling logic to be more robust and able to handle spam clicking and duplicate power actions 2020-08-01 15:20:39 -07:00
Dane Everitt
79ee259874
correctly return server resource stats; closes pterodactyl/panel#2183 2020-07-29 20:34:30 -07:00
Dane Everitt
cb850fd81a
Update all of the old UUID refs to new 2020-07-19 17:53:41 -07:00
Dane Everitt
0cbaad5c72
Completely re-work the server configuration to be separated out better 2020-07-19 16:27:55 -07:00
Dane Everitt
ea2630946a
Sync server state with Panel before performing installation to ensure information is up to date 2020-06-30 20:56:55 -07:00
Dane Everitt
1f6789cba3
Acquire exclusive lock when installing a server
Also allows aborting a server install mid-process when the server is deleted before the process finishes.
2020-06-22 21:38:16 -07:00
Dane Everitt
7d4a8d7f7e
Update everything expect transfers & sftp to not use zap 2020-06-13 10:40:26 -07:00
Dane Everitt
198a22f446
Replace even more zap occurences 2020-06-13 10:26:35 -07:00
Carlo Field
359564bd91 #2078 - fix BindJSON calls 2020-05-29 17:44:49 +02:00
Dane Everitt
2e055cf630
Unsubscribe any open event listeners when deleting a server 2020-05-03 21:30:16 -07:00
Dane Everitt
89e5b63c32
Don't try to remove a non-existent file 2020-04-11 17:46:36 -07:00