vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
767 stars 262 forks source link

Do backup if one of remotes unavailable #6374

Open TristisOris opened 2 years ago

TristisOris commented 2 years ago

Is your feature request related to a problem? Please describe. i'm doing backup into 2 remotes. Need to disable 1 for maintenance, but all backups now failed because it not available.

Describe the solution you'd like Do backup to any available remotes, skip others.

Additional context Untitled Untitled2

as i see, backup itself don't know that it not just unavailable, but disabled at XO.

Xen Orchestra, commit [2f38e] xo-server 5.100.1 xo-web 5.101.1

TristisOris commented 2 years ago

same if disable pool, i got error, but backup for other pools works. изображение

julien-f commented 2 years ago

I agree with you, the backup should run on other non-disabled remotes.

Regarding your second comment, I believe it works as expected (ie the backup run on connected pools), am I right?

TristisOris commented 2 years ago

it's a problem if pool really not available. But if i disabled it manually, no reasons to report this.

TristisOris commented 1 year ago

tested with 1 disabled remote - no any errors, works perfect.

TristisOris commented 1 year ago

@fbeauchamp this commit broke the Continuous Replication.

backupNg.runJob
{
  "id": "61ce232b-fe91-4f47-b137-f7c3f8b00382",
  "schedule": "f1eaaacc-7b82-4611-a2c1-e89d6ecbd3d4"
}
{
  "errors": {},
  "message": "couldn't instantiate any remote",
  "name": "Error",
  "stack": "Error: couldn't instantiate any remote
    at executor (file:///opt/xo/xo-builds/xen-orchestra-202209261824/packages/xo-server/src/xo-mixins/backups-ng/index.mjs:233:27)
    at file:///opt/xo/xo-builds/xen-orchestra-202209261824/packages/xo-server/src/xo-mixins/jobs/index.mjs:263:30
    at Jobs._runJob (file:///opt/xo/xo-builds/xen-orchestra-202209261824/packages/xo-server/src/xo-mixins/jobs/index.mjs:292:22)
    at Jobs.runJobSequence (file:///opt/xo/xo-builds/xen-orchestra-202209261824/packages/xo-server/src/xo-mixins/jobs/index.mjs:332:7)
    at Api.#callApiMethod (file:///opt/xo/xo-builds/xen-orchestra-202209261824/packages/xo-server/src/xo-mixins/api.mjs:394:20)"
}

also it didn't work for Pool metadata & XO config backup - old error remote is disabled And i didn't test Rolling and DR jobs.

TristisOris commented 1 year ago

commit d87210e903a69a6ff09af5d2ac270fec34322038 CR backup fixed, metadata still remote is disabled.

fbeauchamp commented 1 year ago

Hi @TristisOris In my test the backup metadata run successfully on enabled remote(s) and failed on a disabled one , like this , with local flo disabled , in a job with pool and xo config backup : image

Is it the same for you ? regards

TristisOris commented 1 year ago

hm yes, my bad. Job total status - fail, but it only fail for disabled remote. All other tasks completed. Maybe hide this error to not get any email about this task? Same as for usual backup.