panel icon indicating copy to clipboard operation
panel copied to clipboard

Scheduled backups using wrong adapter type after changing adapter type

Open ohaitrans opened this issue 5 years ago • 1 comments

Background (please complete the following information):

  • Version of Panel/Wings: Wings 1.4.2, Panel 1.4.1
  • Panel Logs: https://bin.ptdl.co/ry859/
  • Server's OS: Centos 7.9.2009

Describe the bug I was configured to use S3 for backups, but am no longer. Removed "APP_BACKUP_DRIVER=s3" and other aws options from .env, and creating backups manually by clicking "create backup" works as expected, producing this in wings.log:

 INFO: [May 27 06:48:19.181] creating backup for server adapter=wings backup=a84733e5-3cab-48c6-a7fc-7b5ea5c0c4d9 path=/mnt/pterobackup/a84733e5-3cab-48c6-a7fc-7b5ea5c0c4d9.tar.gz request_id=0386a4cf-1b79-4e62-b3d3-85de68f51c0d server=8e1ae9b8-34de-4936-ba08-c8c6e0915e20
 INFO: [May 27 06:48:19.877] created backup successfully adapter=wings backup=a84733e5-3cab-48c6-a7fc-7b5ea5c0c4d9 request_id=0386a4cf-1b79-4e62-b3d3-85de68f51c0d server=8e1ae9b8-34de-4936-ba08-c8c6e0915e20
 INFO: [May 27 06:48:20.310] notified panel of successful backup state backup=a84733e5-3cab-48c6-a7fc-7b5ea5c0c4d9 server=8e1ae9b8-34de-4936-ba08-c8c6e0915e20

However, with the same server on the same node with no changes, scheduled backups fail and produce this:

 INFO: [May 27 07:42:02.796] creating backup for server adapter=s3 backup=24ab8747-cafe-45c8-86e7-dc428da0b904 path=/mnt/pterobackup/24ab8747-cafe-45c8-86e7-dc428da0b904.tar.gz request_id=410c8479-07c5-4a16-a955-434d4785ca1e server=8e1ae9b8-34de-4936-ba08-c8c6e0915e20
 INFO: [May 27 07:42:03.427] created backup successfully adapter=s3 backup=24ab8747-cafe-45c8-86e7-dc428da0b904 request_id=410c8479-07c5-4a16-a955-434d4785ca1e server=8e1ae9b8-34de-4936-ba08-c8c6e0915e20
 INFO: [May 27 07:42:31.751] notified panel of failed backup state backup=24ab8747-cafe-45c8-86e7-dc428da0b904 server=8e1ae9b8-34de-4936-ba08-c8c6e0915e20
ERROR: [May 27 07:42:31.751] router: failed to generate server backup error=backup: error while generating server backup: Error response from Panel: BadRequestHttpException: The configured backup adapter is not an S3 compatible adapter. (HTTP/400) request_id=410c8479-07c5-4a16-a955-434d4785ca1e server_id=8e1ae9b8-34de-4936-ba08-c8c6e0915e20

Stacktrace:
Error response from Panel: BadRequestHttpException: The configured backup adapter is not an S3 compatible adapter. (HTTP/400)
github.com/pterodactyl/wings/remote.(*client).request.func1
	/home/runner/work/wings/wings/remote/http.go:153
github.com/cenkalti/backoff/v4.RetryNotifyWithTimer
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:55
github.com/cenkalti/backoff/v4.RetryNotify
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:34
github.com/cenkalti/backoff/v4.Retry
	/home/runner/go/pkg/mod/github.com/cenkalti/backoff/[email protected]/retry.go:28
github.com/pterodactyl/wings/remote.(*client).request
	/home/runner/work/wings/wings/remote/http.go:133
github.com/pterodactyl/wings/remote.(*client).Get
	/home/runner/work/wings/wings/remote/http.go:78
github.com/pterodactyl/wings/remote.(*client).GetBackupRemoteUploadURLs
	/home/runner/work/wings/wings/remote/servers.go:149
github.com/pterodactyl/wings/server/backup.(*S3Backup).generateRemoteRequest
	/home/runner/work/wings/wings/server/backup/backup_s3.go:137
github.com/pterodactyl/wings/server/backup.(*S3Backup).Generate
	/home/runner/work/wings/wings/server/backup/backup_s3.go:72
github.com/pterodactyl/wings/server.(*Server).Backup
	/home/runner/work/wings/wings/server/backup.go:69
github.com/pterodactyl/wings/router.postServerBackup.func1
	/home/runner/work/wings/wings/router/router_server_backup.go:50
runtime.goexit
	/opt/hostedtoolcache/go/1.16.3/x64/src/runtime/asm_amd64.s:1371

backup: error while generating server backup

To Reproduce Steps to reproduce this behavior:

  1. Configure to use S3 for backups
  2. Create scheduled backup
  3. Remove S3 settings from the panel .env
  4. Observe result of scheduled backup

Expected behavior For the scheduled backups to not attempt to use S3

ohaitrans avatar May 27 '21 12:05 ohaitrans

Restart the pteroq service whenever you make changes to the environment like that.

DaneEveritt avatar May 27 '21 15:05 DaneEveritt