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

    Why changing objects in resource set wipe limits ???

    Scheduled Pinned Locked Moved REST API
    7 Posts 2 Posters 70 Views 2 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.
    • K Offline
      Kptainflintt
      last edited by

      Hi,

      I have a big trouble with playing with xo-cli to update my resource sets.

      First, it's really annoying that templates and tags assigned to them aren't update (I want that user "X" cans use all tamplates with "X" tags; I tag a new template, I have to add manually it to resource set...).

      Whatever, I build a script who list object, list taggued templates and with resourceSet.set "rebuild" objects array.

      What a surprise when I realize that my new template is here, but all of my limits aren't!
      So, to see if it's my script which blow away quotas, I test manually on one resource set, it's the same.

      For exemple :

      {
        "id": "h-PSp-FzCb0",
        "ipPools": [],
        "limits": {
          "cpus": {
            "total": 6,
            "usage": 1
          },
          "memory": {
            "total": 17179869184,
            "usage": 2147483648
          },
          "disk": {
            "total": 80530636800,
            "usage": 17179869184
          },
          "vms": {
            "usage": 1
          }
        },
      

      I launch

      xo-cli resourceSet.set id="h-PSp-FzCb0" objects=json:"["71359f87-2297-a2d9-1236-77ebfcbe71eb","74f92165-9f40-a6b0-26e2-6377409d3911","92751eb2-0007-fa22-9001-1b08db171145","dd467579-027a-21a7-5c81-1a396312befb","89ef16d0-9fc6-3bb0-8161-37dc69e64b3b","94f4a9be-5614-9a2b-a389-d0b2c8228b60"]"
      

      And tadaaa !

      limits: {"cpus":{"usage":1},"memory":{"usage":2147483648},"disk":{"usage":17179869184},"vms":{"usage":1}}
      

      Is there anything that I'm missing ??

      K 1 Reply Last reply Reply Quote 0
      • K Offline
        Kptainflintt @Kptainflintt
        last edited by

        Update : same thing when adding or changing "tags" field.

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

          Hi,

          That would be helpful to know on which XO version you are running first.

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            Kptainflintt @olivierlambert
            last edited by

            @olivierlambert Hi,

            I use xo from sources. Update two weeks ago.

            From CHANGELOG :

            • @vates/types 1.10.0
            • @xen-orchestra/web-core 0.27.0
            • @xen-orchestra/rest-api 0.14.0
            • @xen-orchestra/web 0.25.0
            • xo-server 5.185.0

            Thank you

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

              First, you need to update to the latest commit on Master, it's important to be sure in case something changed since then. Cf https://docs.xen-orchestra.com/community#report-a-bug

              1 Reply Last reply Reply Quote 0
              • K Offline
                Kptainflintt
                last edited by

                Indeed, I have 39 commits behind...

                I can't do it now, as I have several users working on it.

                I'll do this before next week, I come back if it's changing something.

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

                  Keep us posted when you are on master, then we'll try to reproduce the issue when we can.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post