Matthew Penner
7ba32aca84
Fix some typos and run gofmt on all .go files
2020-09-05 13:08:40 -06: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
c73a53dbe3
Replace cache with single int64
2020-08-22 22:50:49 -07:00
Dane Everitt
9d2321f357
Correctly set the server state on install; closes pterodactyl/panel#2236
2020-08-19 19:08:15 -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
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
Matthew Penner
afa6fb200e
Force disk usage calculation when loading servers
2020-07-31 17:01:02 -06:00
Dane Everitt
373dbd355e
Better handling of subscribers to avoid a slice panic
2020-07-29 21:56:22 -07: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
a00288aa64
Require a lock on the restart process to avoid double restarts causing unexpected behavior
2020-07-18 16:46:41 -07:00
Dane Everitt
8315ff8ae1
Misc mutex locking things to avoid data races
2020-07-18 16:03:25 -07:00
Matthew Penner
63e7bde39c
Merge branch 'develop' into feature/server-mounts
2020-07-04 15:17:59 -06:00
Dane Everitt
65809b5731
Don't crash when passing in an environment variable that isn't a string value
2020-07-02 20:32:17 -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
a3d83d23bd
Don't try to send space available when loading from a configuration
...
Server is not always installed when this function is called, this will cause errors in those cases.
2020-06-22 20:52:23 -07:00
Dane Everitt
62e5547c6d
Merge pull request #32 from pterodactyl/issue/1796
...
Send disk usage when server is offline
2020-05-31 10:54:21 -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
Matthew Penner
74097cc4ad
Fix sending status event to all subscribers, send disk usage when server is offline
2020-05-22 11:01:27 -06:00
Matthew Penner
662eb17241
Pass server mounts into docker
2020-05-21 14:53:00 -06:00
Dane Everitt
ffd7357a1c
Calculate memory swap using the same memory overhead values as the hard cap; pterodactyl/panel#2000
2020-05-08 20:57:00 -07:00
Dane Everitt
4279fa510e
Cleanup data storage locations for daemon
2020-04-17 14:27:06 -07:00
Dane Everitt
03045c94be
Better race condition prevention
2020-04-10 18:22:18 -07:00
Dane Everitt
17d204a631
Little bit of code refactoring
2020-04-10 18:07:57 -07:00
Dane Everitt
af241f3de4
Code cleanup
2020-04-10 18:03:35 -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
28c8f3f400
Add the ability to fetch all servers, fix cpu usage leak again..
2020-04-10 15:39:07 -06:00
Matthew Penner
e719c67e0b
Removes SyncServersOnBoot configuration option and requires that servers are synced when the daemon boots
2020-04-10 12:16:04 -06:00
Matthew Penner
9e30d63818
Add debug logs when a non-500 error occurs, force sync the configuration during installation of a new server
2020-04-10 12:00:04 -06:00
Dane Everitt
cf2ef1a173
Port most of the HTTP code over to gin
2020-04-05 18:00:33 -07:00
Matthew Penner
6af3cb2c9b
Get transfers 'fully' working, need to add fail request though
2020-04-04 16:15:49 -06:00
Matthew Penner
3dba11ac6f
Add ability to create archives of servers, add GET and POST /api/servers/:server/archive routes to get and request an archive of a server
2020-04-03 23:17:26 -06:00
Dane Everitt
ddca34f9e8
Add support for defining specific threads for containers
2020-03-29 12:31:17 -07:00
Dane Everitt
99a11f81c3
Improve event emitter/subscription abilities
2020-01-18 14:04:26 -08:00
Dane Everitt
6ef2773c01
Very, very basic server installation process
2019-12-28 14:57:19 -08:00
Dane Everitt
32e389db21
General code cleanup
2019-12-24 16:40:51 -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
0866b84d8e
Implement server deletion
2019-12-21 23:23:56 -08:00
Dane Everitt
189289ad5f
Correctly handle updating server data
2019-12-21 21:02:02 -08:00
Dane Everitt
3fd5b1e92b
Fix crash detection defaults
2019-12-16 21:23:57 -08:00
Dane Everitt
92a7c9d231
Don't freak out if the server doesn't exist on the remote
2019-12-16 20:47:35 -08:00
Dane Everitt
514c16ccc8
Less obtuse error handling from API responses
2019-12-16 20:34:58 -08:00
Dane Everitt
c9bff0fa31
Move server tracking in program into global memory state
2019-12-07 16:43:00 -08:00
Dane Everitt
8c57583ce9
[ #389686 ] Add crash detection logic to daemon
2019-11-30 16:43:18 -08:00
Dane Everitt
be14811eb4
Fix issues instantiating the server struct
2019-11-30 16:37:11 -08:00
Dane Everitt
b3de4705ae
Persist configuration when server state is changed
2019-11-24 21:36:33 -08:00
Dane Everitt
85762ba4b9
Server state handling; auto start servers if they were running when the daemon stopped
2019-11-24 21:31:31 -08:00