XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Attempting to add new host fail on xoa and on server, worked on xcp-ng center

    Scheduled Pinned Locked Moved Management
    8 Posts 4 Posters 232 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      Jonathon
      last edited by

      I got the following when trying to add a new host to an existing pool

      pool.mergeInto
      {
        "sources": [
          "0af9d764-44e6-1393-4eea-6cb59b934f2a"
        ],
        "target": "38aea760-cf23-927c-ccf5-90969681e04b",
        "force": true
      }
      {
        "message": "app.getLicenses is not a function",
        "name": "TypeError",
        "stack": "TypeError: app.getLicenses is not a function
          at enforceHostsHaveLicense (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/pool.mjs:15:30)
          at Pools.apply (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/pool.mjs:80:13)
          at Pools.mergeInto (/opt/xen-orchestra/node_modules/golike-defer/src/index.js:85:19)
          at Xo.mergeInto (file:///opt/xen-orchestra/packages/xo-server/src/api/pool.mjs:311:15)
          at Task.runInside (/opt/xen-orchestra/@vates/task/index.js:175:22)
          at Task.run (/opt/xen-orchestra/@vates/task/index.js:159:20)
          at Api.#callApiMethod (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:469:18)"
      }
      

      Had no idea what was up with this error, so updated the xoa vm and installed updates. But I still got the same error
      40b881da-29e7-4858-bfdb-8ad91466d8c3-image.png
      I then tried adding it from the server itself, that also failed
      f411a9a5-ae28-4d43-8134-c730266669b5-Screenshot from 2025-05-20 15-26-59.png /home/jonathon/Pictures/Screenshots/Screenshot from 2025-05-20 15-26-59.png

      Just to see if it would work, I then tried with the latest xcp-ng center, and that worked.

      So I do not need anything now, but thought it was interesting and worth posting.

      1 Reply Last reply Reply Quote 0
      • DanpD Offline
        Danp Pro Support Team
        last edited by

        Your XO VM is about 2 months out-of-date. Please make sure you are fully updated before posting making this type of post.

        Let us know if you are able to reproduce using an up-to-date version of XO. You could also use a free trial of XOA to test this.

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Online
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          Indeed, there's a big yellow warning "You are not up to date with master". Maybe we should mark it bigger?

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            Jonathon @olivierlambert
            last edited by

            I ran the upgrade yesterday. And this is the state that it gave me

              installing : node-v22.15.1
                   mkdir : /usr/local/n/versions/node/22.15.1
                   fetch : https://nodejs.org/dist/v22.15.1/node-v22.15.1-linux-x64.tar.xz
               installed : v22.15.1 (with npm 10.9.2)
            
            Stopping xo-server...
            Checking for Yarn package...
            Checking for Yarn update...
            Reading package lists...
            ...
            yarn install v1.22.22
            [1/5] Validating package.json...
            [2/5] Resolving packages...
            [3/5] Fetching packages...
            [4/5] Linking dependencies...
            [5/5] Building fresh packages...
            $ husky install
            husky - Git hooks installed
            Done in 46.08s.
            yarn run v1.22.22
            $ TURBO_TELEMETRY_DISABLED=1 turbo run build --filter xo-server --filter xo-server-'*' --filter xo-web
            • Packages in scope: xo-server, xo-server-audit, xo-server-auth-github, xo-server-auth-google, xo-server-auth-ldap, xo-server-auth-oidc, xo-server-auth-saml, xo-server-backup-reports, xo-server-load-balancer, xo-server-netbox, xo-server-perf-alert, xo-server-sdn-controller, xo-server-test, xo-server-test-plugin, xo-server-transport-email, xo-server-transport-icinga2, xo-server-transport-nagios, xo-server-transport-slack, xo-server-transport-xmpp, xo-server-usage-report, xo-server-web-hooks, xo-web
            • Running build in 22 packages
            • Remote caching disabled
            
             Tasks:    29 successful, 29 total
            Cached:    0 cached, 29 total
              Time:    1m18.85s 
            
            Done in 79.13s.
            Updated version 5.177.0 / 5.173.2
            Updated commit a49b27bff7d325f704957b8aac3055ad0407bd40 2025-05-20 16:42:02 +0200
            Checking plugins...
            Ignoring xo-server-test plugin
            Cleanup plugins...
            Restarting xo-server...
            
            J 1 Reply Last reply Reply Quote 0
            • J Offline
              Jonathon @Jonathon
              last edited by

              It does not matter now, the host has been added. I had just found the error to be interesting that thought someone would want to know about it.

              DanpD 1 Reply Last reply Reply Quote 0
              • DanpD Offline
                Danp Pro Support Team @Jonathon
                last edited by

                @Jonathon We are interested if you can reproduce using an up-to-date instance of XO. šŸ™‚

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  Jonathon @Danp
                  last edited by

                  @Danp Sorry, due to the host being added and me continuing on with my other tasks, it is not. I could have made that more clear.

                  H 1 Reply Last reply Reply Quote 0
                  • H Offline
                    henri9813 @Jonathon
                    last edited by henri9813

                    Hello, @Danp

                    I just reproduced it.

                    All my nodes are up to date
                    ( my xo have 7 commits behind master, i read the commit's log of my missing commit, the commits are not related to my issue. ).

                    In my scenario, i had a pool with 3 nodes

                    • node1
                    • node2
                    • node3

                    I reinstall node3 after a disaster ( i force forgot node 3).

                    Now, i can't add the host back to the pool.

                    6e6c4b93-7a3d-4c48-92fb-d311b4117983-image.png

                    I also tried to update the host after installation ( usually, i do this after ).

                    But it doesn't works more.

                    I will not add my node thought xcpng center to permit you further investigation šŸ™‚

                    Here is the detailed operation json

                    {
                      "id": "0mcwehjzy",
                      "properties": {
                        "method": "pool.mergeInto",
                        "params": {
                          "sources": [
                            "64365465-fd4e-25b6-3db2-2cdcd9edba5e"
                          ],
                          "target": "a92ca4ca-caac-83b9-fa00-4bb75cb48f6c",
                          "force": true
                        },
                        "name": "API call: pool.mergeInto",
                        "userId": "63a0dbaf-ba2d-4028-b80f-fe49f56686b2",
                        "type": "api.call"
                      },
                      "start": 1752092249470,
                      "status": "failure",
                      "updatedAt": 1752092249473,
                      "end": 1752092249472,
                      "result": {
                        "message": "app.getLicenses is not a function",
                        "name": "TypeError",
                        "stack": "TypeError: app.getLicenses is not a function\n    at enforceHostsHaveLicense (file:///etc/xen-orchestra/packages/xo-server/src/xo-mixins/pool.mjs:15:30)\n    at Pools.apply (file:///etc/xen-orchestra/packages/xo-server/src/xo-mixins/pool.mjs:80:13)\n    at Pools.mergeInto (/etc/xen-orchestra/node_modules/golike-defer/src/index.js:85:19)\n    at Xo.mergeInto (file:///etc/xen-orchestra/packages/xo-server/src/api/pool.mjs:311:15)\n    at Task.runInside (/etc/xen-orchestra/@vates/task/index.js:175:22)\n    at Task.run (/etc/xen-orchestra/@vates/task/index.js:159:20)\n    at Api.#callApiMethod (file:///etc/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:469:18)"
                      }
                    }```
                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post