Dane Everitt
4ff7bd2777
Abstract out more of the backup functionality
2020-04-17 13:46:36 -07:00
Dane Everitt
11035b561a
Break out the backup functions of the daemon in prep for S3 support
2020-04-13 22:01:07 -07:00
Dane Everitt
2bf293823f
Fix state handing logic
2020-04-12 17:43:16 -07:00
Dane Everitt
b73f78a832
Fix configuration parsing
2020-04-12 17:39:19 -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
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
Dane Everitt
c57708d1e0
Merge pull request #20 from matthewpi/issues/1899
...
Improved server loading
2020-04-10 17:37:45 -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
Dane Everitt
2220eb049c
Avoid race condition when listing a directory
2020-04-10 16:43:05 -07:00
Matthew Penner
4ea1b90560
Merge branch 'develop' into issues/1899
2020-04-10 17:27:39 -06:00
Dane Everitt
d3cbf96c57
Avoid race condition while calculating directory size of server
2020-04-10 16:14:04 -07:00
Matthew Penner
acf425b705
Add a lock to the states file
2020-04-10 16:37:10 -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
33875105b6
Fix topic handling for websocket with namespace
2020-04-06 21:22:43 -07:00
Dane Everitt
222091b68c
Fire an event to the websocket when a backup is completed
2020-04-06 21:03:50 -07:00
Dane Everitt
45d441ac32
Check permissions when performing websocket actions
2020-04-06 21:03:39 -07:00
Dane Everitt
03311ecf03
Move over backup and create transfer logic
2020-04-05 19:07:16 -07:00
Dane Everitt
cf2ef1a173
Port most of the HTTP code over to gin
2020-04-05 18:00:33 -07:00
Dane Everitt
223b9e05a1
Merge pull request #16 from matthewpi/feature/server-transfers
...
Server Transfers (pterodactyl/panel#18 )
2020-04-05 11:06:34 -07:00
Dane Everitt
4ad57af990
Support one-time downloads of server backups
2020-04-04 19:55:23 -07:00
Matthew Penner
0ca9c8a114
Delete the server's archive when the server is deleted
2020-04-04 18:31:18 -06:00
Matthew Penner
5693d0431e
Merge branch 'develop' into feature/server-transfers
2020-04-04 17:17:09 -06:00
Dane Everitt
4ce2b73490
Add first implementation of local backups for a server
2020-04-04 16:07:25 -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
c096d8802f
Add configurable ArchiveDirectory
2020-04-04 00:17:32 -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
019d028011
Add support for reinstalling a server
2020-04-03 13:43:13 -07:00
Dane Everitt
ddca34f9e8
Add support for defining specific threads for containers
2020-03-29 12:31:17 -07:00
Matthew Penner
8107532080
Revert style changes due to gofmt
2020-02-02 14:43:13 -07:00
Matthew Penner
07b1876954
Chown directories, not just files
2020-02-02 14:41:15 -07:00
Dane Everitt
ab54d2c416
Avoid triggering crash detection on container destroy
2020-01-19 14:00:59 -08:00
Dane Everitt
59299d3cda
Add code to notify panel when install is completed
2020-01-19 13:30:54 -08:00
Dane Everitt
7533e38543
Add support for running installation process when creating a server
2020-01-19 13:05:49 -08:00
Dane Everitt
99a11f81c3
Improve event emitter/subscription abilities
2020-01-18 14:04:26 -08:00
Dane Everitt
c6fcd8cabb
Send installation data over socket when running
2020-01-18 13:05:44 -08:00
Dane Everitt
5c3823de9a
Only dump pull status in debug
2019-12-28 15:14:56 -08:00
Dane Everitt
5350a2d5a5
Don't block the HTTP request while waiting on the installation
2019-12-28 15:12:12 -08:00
Dane Everitt
6ef2773c01
Very, very basic server installation process
2019-12-28 14:57:19 -08:00
Dane Everitt
d7bd10fcee
Better approach to timezone handling by using a TZ environment variable
2019-12-24 16:57:22 -08:00
Dane Everitt
06f495682c
When mounting timezone data, check for the path first to avoid a fatal error
2019-12-24 16:49:08 -08:00
Dane Everitt
32e389db21
General code cleanup
2019-12-24 16:40:51 -08: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
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
21d8384848
Create the config file if it is missing for the server, then try again
2019-12-07 16:48:26 -08:00
Dane Everitt
c9bff0fa31
Move server tracking in program into global memory state
2019-12-07 16:43:00 -08:00
Dane Everitt
4a68eabd1b
Initial functionality to pull a docker image when booting an environment
2019-12-07 14:19:51 -08:00
Dane Everitt
32c32bb24e
Fix improper goroutine
2019-11-30 21:46:54 -08:00
Dane Everitt
1003abaa63
[#3896bk] Configure base support for properties file parsing
2019-11-30 18:07:05 -08:00
Dane Everitt
11c6738264
[ #389686 ] Show crash output in console
2019-11-30 17:08:11 -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
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
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
Dane Everitt
47c7c872fc
Don't track the process state in the yaml
2019-11-24 21:18:51 -08:00
Dane Everitt
ca17d8ca5d
Use correct permission mask to allow docker to execute against bind
2019-11-24 21:18:41 -08:00
Dane Everitt
151be4a458
Recreate the container if rebuild is required
2019-11-24 21:12:02 -08:00
Dane Everitt
a8c16debfb
More logical environment variable checking
2019-11-24 20:59:40 -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
65b01e1869
oom is disabled by default
2019-11-24 20:02:53 -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
Dane Everitt
9f4518fc58
Add (unchecked) code to do an in-situ replacement of build settings
2019-11-24 15:08:38 -08:00
Dane Everitt
7f4c29580a
Create the container if the server is booted and it is missing
2019-11-24 13:04:24 -08:00
Dane Everitt
48a303608a
Wrap errors to ensure a stacktrack is returned where possible
2019-11-16 17:05:21 -08:00
Dane Everitt
cae0090763
Correct some error handling, use package that provides useful stack traces
2019-11-16 17:01:38 -08:00
Dane Everitt
56be65888c
Don't try to truncate a file that doesn't actually exist yet
2019-11-16 16:07:54 -08:00
Dane Everitt
f0da1eeb48
Add basic support for creating a server on wings
2019-11-16 15:48:50 -08:00
Dane Everitt
c9bfb18b1c
Update to match new yaml format
2019-11-16 13:34:05 -08:00
Dane Everitt
9dcda47657
Send the correct signal to the instance
2019-09-28 13:18:09 -07:00
Dane Everitt
4e1b7988bf
Set server to stopping when stop command is sent
2019-09-22 21:33:44 -07:00
Dane Everitt
00bc71afd1
Update stop for servers to use configuration
2019-09-22 21:22:16 -07:00
Dane Everitt
d7753d9c7f
Add initial support for fetching egg configuration from panel for servers
2019-09-22 20:47:38 -07:00
Dane Everitt
2a745c5da1
Fix CPU calculation
2019-09-17 23:10:02 -07:00
Dane Everitt
64f477f423
Send server stat updates over the websocket
2019-09-05 22:08:10 -07:00
Dane Everitt
9a4f1672f7
Fix logic for resource usage -- include disk and reset to 0 when stopped
2019-08-17 16:10:48 -07:00
Dane Everitt
c8e6e29abc
Add support for streaming usage stats back to the calling process
2019-08-17 13:19:56 -07:00
Dane Everitt
a1987f3aef
Return times in RFC3339 format since the default format is not parsable in PHP
2019-08-05 22:22:49 -07:00
Dane Everitt
7c82c6445d
Correctly connect to running containers
2019-06-29 17:52:55 -07:00
Dane Everitt
2db705f697
Send the server logs when the websocket is connected to initially
2019-05-27 18:03:37 -07:00
Dane Everitt
93c71a6ab7
Correct handling of state and console events
2019-05-27 17:12:51 -07:00
Dane Everitt
7b1ebd790d
When connecting to the server socket send the state right away
2019-05-27 16:58:05 -07:00
Dane Everitt
8d8ec70683
Add support for writing to a file (and creating it if not existent)
2019-05-25 15:40:15 -07:00
Dane Everitt
7182b02ce2
Order A-Z not Z-A
2019-05-14 18:43:04 -07:00
Dane Everitt
9c252a5ad7
Truncate the logs when server process is starting
2019-05-09 21:52:24 -07:00
Dane Everitt
7a52e3a9c2
For now, chown the server directory when the server starts
2019-05-09 21:48:58 -07:00
Dane Everitt
e95c22a526
Add support for deleting a file or directory from a server
2019-05-04 17:09:35 -07:00