vatesfr / xen-orchestra

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

[Backup NG - Delta] Can't pick VM #3764

Closed Moxified closed 5 years ago

Moxified commented 5 years ago

Context

Expected behavior

During create or modify existing Delta backup job, I should be able to pick a VM from the right selector window.

Current behavior

VMs to backup dropdown is replaced with the following text:

Delta Backup and Continuous Replication require at least XenServer 6.5.
an error has occured

Also note occurred is spelled incorrectly in the UI... sub issue :)

This started happening after I upgraded XCP-NG 7.4 to 7.6 and XO to 5.31. Unfortunately I upgraded both XCP and XO at the same time so I'm not sure which is causing the issue.

Existing delta job continues to run but I cannot add/remove vm's from the job or create new jobs.

I have a pool of 2 hosts.

Sunilplayer commented 5 years ago

I have the same Problem I only have one Host and 9 VMs. I have the same Version of XCP-NG and the same XOCE version. I have one Delta Backup Job for all 9 vms.

badrAZ commented 5 years ago

Hi!

Can you please copy/paste the error displayed in the console? Thank you!

Sunilplayer commented 5 years ago

I think now it is working.

Moxified commented 5 years ago

Hi!

Can you please copy/paste the error displayed in the console? Thank you!

I'm not sure what you are asking for.

To reproduce, I click on backup NG -> new. Click Delta backup and "VMs to backup" dropdown goes away and is replaced with "Delta Backup and Continuous Replication require at least XenServer 6.5. an error has occured"

badrAZ commented 5 years ago

It had an issue with selecting VMs on Delta backup mode that was been resolved 3 days ago. Please check if you are up to date with the master branch.

If you are up to date follow this steps:

This message will help me to understand the issue and to fix it. Thank you!

Moxified commented 5 years ago

I re pulled from sources and it still does it. I think I'm on the master. I found this in my .git/conifg:

[remote "origin"]
        url = http://github.com/vatesfr/xen-orchestra

This is the output from the console in chrome developer tools:

index.js:589 Uncaught TypeError: (0 , V.canDeltaBackup) is not a function
    at index.js:589
    at pickBy.js:33
    at t.exports (_basePickBy.js:23)
    at t.exports (pickBy.js:32)
    at selectors.js:155
    at selectors.js:47
    at selectors.js:100
    at index.js:65
    at index.js:27
    at u (index.js:76)
badrAZ commented 5 years ago

This issue has already been fixed, you are not up to date with the master branch. Please follow the documentation to correctly update your branch.

Moxified commented 5 years ago

Respectfully, I installed it based on those instructions and updated using those exact commands.

I originally set this server up when xo-web and xo-server were separated and I followed the instructions to redirect to the single repo when that changed. Perhaps something isn't correct with that.

I'm not that strong with git but I ran this... not sure if it is correct:

/opt/xen-orchestra$ git remote show origin
* remote origin
  Fetch URL: http://github.com/vatesfr/xen-orchestra
  Push  URL: http://github.com/vatesfr/xen-orchestra
  HEAD branch: master
  ....
  master                                                 tracked

I did have a few "stale (use 'git remote prune' to remove)". I've never run git remote prune as I don't see that in the documentation.

I understand that if this is resolved, this issue no longer applies to my updating problem and can go back to the forums.

badrAZ commented 5 years ago

Can you please copy/paste the result of this command git log -1? Thank you!

Moxified commented 5 years ago
/opt/xen-orchestra$ git log -1
commit 12dd40d3302b8456cb4dd62e6d39a670dcb53439
Author: Pierre Donias <pierre.donias@gmail.com>
Date:   Fri Nov 30 15:12:10 2018 +0100

    fix(xo-web): missingPaths → missingPatches (#3741)
badrAZ commented 5 years ago

Can you please copy/paste the result of this command git pull --ff-only ?

Moxified commented 5 years ago
/opt/xen-orchestra# git pull --ff-only
remote: Enumerating objects: 138, done.
remote: Counting objects: 100% (138/138), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 148 (delta 112), reused 132 (delta 107), pack-reused 10
Receiving objects: 100% (148/148), 222.01 KiB | 0 bytes/s, done.
Resolving deltas: 100% (113/113), completed with 37 local objects.
From http://github.com/vatesfr/xen-orchestra
   d6012d8..70b9b67  master     -> origin/master
 * [new branch]      audit-emitEvents -> origin/audit-emitEvents
 + 6250664...a568da8 fs-outputFile-stream -> origin/fs-outputFile-stream  (forced update)
   12dd40d..61962b8  georges-disk-space -> origin/georges-disk-space
Updating 12dd40d..70b9b67
error: Your local changes to the following files would be overwritten by merge:
yarn.lock
Please, commit your changes or stash them before you can merge.
Aborting

Sorry, I'm working via vpn and ssh on my phone so I'm trying to keep the formatting right.

badrAZ commented 5 years ago

Execute this command git stash and re-copy/paste the result of the command git pull --ff-only.

Moxified commented 5 years ago
git pull --ff-only
Updating 12dd40d..70b9b67
Fast-forward
 .env.example                     |   2 +
 .eslintrc.js                     |   3 +
 .gitignore                       |   1 +
 @xen-orchestra/fs/package.json   |   7 +-
 .../fs/src/abstract.js           | 540 +++---
 .../fs/src/abstract.spec.js      |  54 +-
 .../fs/src/fs.integ.spec.js      |  26 -
 @xen-orchestra/fs/src/fs.spec.js | 279 ++++
 @xen-orchestra/fs/src/local.js   | 108 +-
 @xen-orchestra/fs/src/nfs.js     |  36 +-
 @xen-orchestra/fs/src/smb.js     | 270 +--
 @xen-orchestra/log/src/index.js  |  12 +-
 CHANGELOG.md                     |   9 +
 package.json                     |   2 +-
 .../xo-acl-resolver/index.js     |  10 +-
 .../src/index.js                 |  10 +-
 .../src/index.spec.js            |  11 +
 packages/xo-server/config.json   |   1 +
 packages/xo-server/package.json  |   1 +
 .../xo-server/src/api/host.js    |  36 +-
 .../xo-server/src/api/xosan.js   |   2 +-
 .../src/sensitive-values.js      |   8 +-
 packages/xo-server/src/utils.js  |  20 +-
 .../src/xo-mixins/api.js         |  19 +-
 .../backups-ng/migration.js      |   4 +-
 .../src/xo-mixins/xen-servers.js |  46 +-
 .../src/common/render-xo-item.js | 441 +++--
 .../src/common/select-objects.js |  10 +-
 .../xo-web/src/common/utils.js   |  12 +-
 .../index.js                     |   4 +-
 .../xo-web/src/patch-react.js    |   6 +-
 .../backup-ng/new/index.js       |   8 +-
 .../dashboard/health/index.js    |  27 +-
 .../src/xo-app/home/host-item.js |   6 +-
 .../logs/backup-ng-logs.js       |   6 +-
 .../logs/log-alert-body.js       |   8 +-
 .../src/xo-app/new-vm/index.js   |  19 +-
 .../src/xo-app/tasks/index.js    |   6 +-
 .../xo-app/vm-import/index.js    |  10 +-
 .../src/xo-app/vm/index.js       |  29 +-
 .../src/xo-app/vm/tab-disks.js   |  27 +-
 .../xo-app/xoa/licenses/xosan.js |   4 +-
 .../xo-app/xoa/update/index.js   |  12 +-
 scripts/lint-staged              |   2 +-
 yarn.lock                        | 833 +++++-----
 45 files changed, 1840 insertions(+), 1147 deletions(-)
 create mode 100644 .env.example
 delete mode 100644 @xen-orchestra/fs/src/fs.integ.spec.js
 create mode 100644 @xen-orchestra/fs/src/fs.spec.js
/opt/xen-orchestra# 
 @xen-orchestra/fs/src/fs.spec.js | 279 ++++
badrAZ commented 5 years ago

Please execute yarn then execute yarn build and verify if you still have this issue.

Moxified commented 5 years ago

Great! That did it. Thank you so much for your assistance which I realize was above and beyond.

One last question and feel free to ignore it :)

Any clue why this happened? I just want to educate myself in-case I run into something similar in the future.

Thanks again!

julien-f commented 5 years ago

The file yarn.lock has been modified, either directly by yarn or as a consequence of a command you run.

You should always carefully read the messages printed by git, it was very explicit of the problem:

error: Your local changes to the following files would be overwritten by merge: yarn.lock Please, commit your changes or stash them before you can merge. Aborting

Moxified commented 5 years ago

Understood.

To be fair, that error wasn't raised when running the standard upgrade commands listed in documentation... or... if they were, it was burred in 1000 lines of babel and other output from the building process.

In any event, thanks again. I'll tuck this info away for later use if I run into trouble again.

julien-f commented 5 years ago

Fair enough, I'll improve the documentation :slightly_smiling_face:

Thanks for your feedback.