Commit Graph

42 Commits

Author SHA1 Message Date
Dane Everitt
fb2dc39a47 Remove some forgotten debug 2021-03-03 21:00:58 -08:00
Dane Everitt
0919fb2da6 Improve error handling and reporting for server installation & process boot 2021-03-03 20:56:18 -08:00
Dane Everitt
df721f45f8
Reset the whole build block to avoid merge issues with 0 values 2021-01-27 21:41:13 -08:00
Jakob Schrettenbrunner
648072436f organize imports with gopls format 2021-01-10 01:22:39 +00:00
Dane Everitt
59a111de39
Invite our lord and savior emperror back to the table 2020-12-15 21:56:53 -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
Matthew Penner
73b221d022 Switch old Server#GetState() calls over to Server#Environment#State() 2020-11-20 14:35:29 -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
c415abf971
Safety logic check, don't try to stop a stopped server when suspending; closes #2318
Couldn't actually reproduce this, but a good sanity check I guess.
2020-09-10 20:16:16 -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
c69a0bb107
Don't run install scripts if disabled; closes pterodactyl/panel#2265 2020-08-30 09:41:14 -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
4d3a860604
Use environment namespace for power state, don't duplicate them across server 2020-08-19 18:58:48 -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
Matthew Penner
b811d2474e Add the ability to define additional allowed origins 2020-07-31 16:19:09 -06:00
Dane Everitt
cb850fd81a
Update all of the old UUID refs to new 2020-07-19 17:53:41 -07:00
Dane Everitt
e28c05ae56
Address some race conditions 2020-07-19 17:46:39 -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
8315ff8ae1
Misc mutex locking things to avoid data races 2020-07-18 16:03:25 -07:00
Dane Everitt
21303dc517
Address race conditions when booting a server process 2020-07-18 10:10:34 -07:00
Matthew Penner
63e7bde39c
Merge branch 'develop' into feature/server-mounts 2020-07-04 15:17:59 -06:00
Dane Everitt
7d4a8d7f7e
Update everything expect transfers & sftp to not use zap 2020-06-13 10:40:26 -07:00
Dane Everitt
0ae286d617
Correctly handle empty values from the API requests; mergo by default thinks these "empty" values should be skipped 2020-05-31 12:42:10 -07:00
Matthew Penner
4483bfa2aa Make mounts not get overridden when a server is updated 2020-05-21 15:13:27 -06:00
Dane Everitt
4279fa510e
Cleanup data storage locations for daemon 2020-04-17 14:27:06 -07:00
Dane Everitt
083bea5504
Add support for modifying daemon configuration on-the-fly 2020-04-11 16:17:46 -07:00
Dane Everitt
03045c94be
Better race condition prevention 2020-04-10 18:22:18 -07:00
Matthew Penner
1f4aca8210 Fix issue with config file saving, fix issue with state file saving, fix issue when merging a uuid into a server without one 2020-04-10 17:55:36 -06:00
Matthew Penner
1e12b7b37c Remove server configurations files and add shared state file 2020-04-10 16:33:30 -06:00
Matthew Penner
6af3cb2c9b Get transfers 'fully' working, need to add fail request though 2020-04-04 16:15:49 -06:00
Matthew Penner
c096d8802f Add configurable ArchiveDirectory 2020-04-04 00:17:32 -06:00
Dane Everitt
d9ceb9601d
Do not set the default values in the struct we're unmarshaling into
closes pterodactyl/panel#1786

If you set the defaults, you'll override a bunch of values for the server with the original values. For example this code caused servers in a running state to be changed to a non-running state, thus leading to stats not sending.

Just merge in any new values, leave everything else as empty.
2019-12-24 16:35:43 -08:00
Dane Everitt
2d0faadeb6
Always rebuild the container when a server is started 2019-12-22 13:52:22 -08:00
Dane Everitt
fabaf21a0d
Sync all server details when booting daemon or server process 2019-12-22 13:21:21 -08:00
Dane Everitt
189289ad5f
Correctly handle updating server data 2019-12-21 21:02:02 -08:00
Dane Everitt
be14811eb4
Fix issues instantiating the server struct 2019-11-30 16:37:11 -08:00
Dane Everitt
4ce9c83fad
[#3896cn] Fix nil pointer when passing data through patch 2019-11-30 15:46:28 -08:00
Dane Everitt
0ce95aa2e3
[#3896cn] Add support for suspending a server and blocking boot when suspended 2019-11-30 15:19:08 -08:00
Dane Everitt
c684410722
Obliterate mappings/env variables if passed through, since we want to completely replace those arrays 2019-11-24 20:54:03 -08:00
Dane Everitt
3ca6d5d74b
Whoops, if UUID is empty that is fine 2019-11-24 20:01:38 -08:00
Dane Everitt
c96f22787a
Correct logic handling a server resource update 2019-11-24 19:57:20 -08:00
Dane Everitt
35c1e467cd
Logical file rename 2019-11-24 19:32:02 -08:00