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

Suggest XCP-ng as an alternative when user is restricted by his XS license #3876

Closed Marcpezin closed 5 years ago

Marcpezin commented 5 years ago

XenServer 7.3 introduced some restrictions in the free edition and moved some features from free to standard and enterprise version.

Restricted license error

In Xen Orchestra, users can experience issues using some features (eg. trying to add a fourth host in a free XenServer pool). An error message already exists RESTRICTED LICENSE but do not provide any guidance to find a solution.

As XCP-ng unlocks most of the restricted features in XenServer, we should replace the error message with a more detailed one, suggesting the usage of XCP-ng instead of XenServer in order to perform the locked action.

XenServer license detection

We should also put a notification to the user when we are detecting than his XenServer version is free and higher than XenServer 7.2 to avoid future issue - suggesting XCP-ng as well. Now done in https://github.com/vatesfr/xen-orchestra/issues/4091

pdonias commented 5 years ago

An error message already exists RESTRICTED LICENSE

Are we sure it will always be that exact error message? I can't find any documentation about it.

We should also put a notification to the user when we are detecting than his XenServer version is free and higher than XenServer 7.2 to avoid future issue - suggesting XCP-ng as well.

What do you mean exactly? Where and when should there be a notification?

Marcpezin commented 5 years ago
  1. I have no idea what is the exact error message. @olivierlambert have you more clues?

  2. Something like this with a tooltip? capture d ecran de 2019-01-22 11-17-36

olivierlambert commented 5 years ago

The error message is on the template LICENCE_RESTRICTION(Feature). For example with storage migration:

vm.migrate
{
  "vm": "9f35ce33-d4ca-d225-e047-0465b970ff18",
  "sr": "a7c630bf-b38c-489e-d3c3-e62507948980",
  "targetHost": "ec247d65-00b5-47e5-a736-ff1495556383",
  "id": "9f35ce33-d4ca-d225-e047-0465b970ff18"
}
{
  "message": "LICENCE_RESTRICTION(Storage_motion)",
  "stack": "XapiError: LICENCE_RESTRICTION(Storage_motion)
    at wrapError (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/index.js:113:9)
    at _call.catch.error (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/index.js:1129:18)
    at run (/usr/local/lib/node_modules/xo-server-xoa/node_modules/core-js/modules/es6.promise.js:75:22)
    at /usr/local/lib/node_modules/xo-server-xoa/node_modules/core-js/modules/es6.promise.js:92:30
    at flush (/usr/local/lib/node_modules/xo-server-xoa/node_modules/core-js/modules/_microtask.js:18:9)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)",
  "code": "LICENCE_RESTRICTION",
  "params": [
    "Storage_motion"
  ],
  "call": {
    "method": "host.migrate_receive",
    "params": [
      "OpaqueRef:b87f18bc-0059-417f-b526-aa8a0a0d237c",
      "OpaqueRef:a80e7923-3ac9-48d1-814f-c16757e4a24f",
      "OpaqueRef:1a94bdce-5651-e826-d92c-4cf8a7fd8b8e",
      {}
    ]
  }
}