vatesfr / xen-orchestra

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

xo-server tries to deactivate its host's LVM volume groups on startup #4317

Closed mas90 closed 5 years ago

mas90 commented 5 years ago

Context

Expected behavior

I am running Xen Orchestra on a server which uses LVM for its root filesystem. Xen Orchestra should leave that alone.

Current behavior

On startup, Xen Orchestra tries to deactivate all LVM volume groups by executing 'vgchange -an' -- this fails because they are in use:

Jun 30 18:09:34 trinculo xo-server[119382]: 2019-06-30T17:09:34.833Z - xo:xo-mixins:hooks - [DEBUG] start start…
Jun 30 18:09:34 trinculo xo-server[119382]: 2019-06-30T17:09:34.883Z - xo:xo-mixins:hooks - [WARN] hook start failure:
Jun 30 18:09:34 trinculo xo-server[119382]: { error:
Jun 30 18:09:34 trinculo xo-server[119382]:    { Error: Command failed: vgchange -an
Jun 30 18:09:34 trinculo xo-server[119382]:   Logical volume trinculo-vg/root contains a filesystem in use.
Jun 30 18:09:34 trinculo xo-server[119382]:   Can't deactivate volume group "trinculo-vg" with 2 open logical volume(s)
Jun 30 18:09:34 trinculo xo-server[119382]:     at makeError (/opt/xen-orchestra/node_modules/execa/index.js:174:9)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise.all.then.arr (/opt/xen-orchestra/node_modules/execa/index.js:278:16)
Jun 30 18:09:34 trinculo xo-server[119382]:     at tryCatcher (/opt/xen-orchestra/node_modules/bluebird/js/release/util.js:16:23)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromiseFromHandler (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:517:31)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromise (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:574:18)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromise0 (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:619:10)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromises (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:699:18)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._fulfill (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:643:18)
Jun 30 18:09:34 trinculo xo-server[119382]:     at PromiseArray._resolve (/opt/xen-orchestra/node_modules/bluebird/js/release/promise_array.js:126:19)
Jun 30 18:09:34 trinculo xo-server[119382]:     at PromiseArray._promiseFulfilled (/opt/xen-orchestra/node_modules/bluebird/js/release/promise_array.js:144:14)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromise (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:579:26)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromise0 (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:619:10)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Promise._settlePromises (/opt/xen-orchestra/node_modules/bluebird/js/release/promise.js:699:18)
Jun 30 18:09:34 trinculo xo-server[119382]:     at _drainQueueStep (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:138:12)
Jun 30 18:09:34 trinculo xo-server[119382]:     at _drainQueue (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:131:9)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Async._drainQueues (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:147:5)
Jun 30 18:09:34 trinculo xo-server[119382]:     at Immediate.Async.drainQueues (/opt/xen-orchestra/node_modules/bluebird/js/release/async.js:17:14)
Jun 30 18:09:34 trinculo xo-server[119382]:     at runCallback (timers.js:810:20)
Jun 30 18:09:34 trinculo xo-server[119382]:     at tryOnImmediate (timers.js:768:5)
Jun 30 18:09:34 trinculo xo-server[119382]:     at processImmediate [as _immediateCallback] (timers.js:745:5)
Jun 30 18:09:34 trinculo xo-server[119382]:      code: 5,
Jun 30 18:09:34 trinculo xo-server[119382]:      stdout: '',
Jun 30 18:09:34 trinculo xo-server[119382]:      stderr: '  Logical volume trinculo-vg/root contains a filesystem in use.\n  Can\'t deactivate volume group "trinculo-vg" with 2 open logical volume(s)\n',
Jun 30 18:09:34 trinculo xo-server[119382]:      failed: true,
Jun 30 18:09:34 trinculo xo-server[119382]:      signal: null,
Jun 30 18:09:34 trinculo xo-server[119382]:      cmd: 'vgchange -an',
Jun 30 18:09:34 trinculo xo-server[119382]:      timedOut: false,
Jun 30 18:09:34 trinculo xo-server[119382]:      killed: false,
Jun 30 18:09:34 trinculo xo-server[119382]:      [Symbol(originalCallSite)]:
Jun 30 18:09:34 trinculo xo-server[119382]:       [ CallSite {},
Jun 30 18:09:34 trinculo xo-server[119382]:         CallSite {},
Jun 30 18:09:34 trinculo xo-server[119382]:         CallSite {} ],
Jun 30 18:09:34 trinculo xo-server[119382]:      [Symbol(mutatedCallSite)]:
Jun 30 18:09:34 trinculo xo-server[119382]:       [ CallSite {},
Jun 30 18:09:34 trinculo xo-server[119382]:         CallSite {},
Jun 30 18:09:34 trinculo xo-server[119382]:         CallSite {} ] } }
Jun 30 18:09:34 trinculo xo-server[119382]: 2019-06-30T17:09:34.936Z - xo:xo-mixins:hooks - [DEBUG] start finished
julien-f commented 5 years ago

Hi,

Thanks for your report.

I agree this is far from ideal but it helps making sure that old volume groups are not still enabled, otherwise it might cause issues with the file restore.

This warning is displayed when some volume groups are mounted, but it can be safely ignored and should not cause any issues.

If you want to improve this, feel free to propose a pull request :slightly_smiling_face:

mguarienti commented 5 years ago

Hi,

I'm having the same warning about LVM. However, at the end of this, it is displayed:

2019-07-19T18:57:15.812Z - xo:xo-server - [ERROR] unhandled error event
{ error:
   { Error: Redis connection to 127.0.0.1:6379 failed - connect ETIMEDOUT 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
     errno: 'ETIMEDOUT',
     code: 'ETIMEDOUT',
     syscall: 'connect',
     address: '127.0.0.1',
     port: 6379 } }

I tried to kill the process but it doesn't work.

olivierlambert commented 5 years ago

@mguarienti your problem isn't related at all to this topic. I suppose you installed XO from the sources, just double check you correctly followed the documentation: https://xen-orchestra.com/docs/from_the_sources.html

If you continue to have this issue, 2 options:

mguarienti commented 5 years ago

@olivierlambert Thanks for the information. I solved allowing the port of redis (6379)