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

    XO user authentication - excessive and unknown tasks

    Scheduled Pinned Locked Moved Management
    17 Posts 4 Posters 2.0k Views 5 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.
    • olivierlambertO Offline
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by

      Hi,

      Are you on the latest commit from the master branch? (the commit number is visible in the About section). If you confirm that, I will ping the right person šŸ™‚

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        stevezemlicka @olivierlambert
        last edited by

        @olivierlambert
        I was originally using commit 1fac7. I reinstalled/upgraded today to 339d9 and the issue is still present. One interesting thing is these "started" tasks disappear when the page is refreshed.

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

          Ping @julien-f

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            stevezemlicka @olivierlambert
            last edited by

            @julien-f
            I updated to commit 3410c today and the issue is still present.

            julien-fJ 1 Reply Last reply Reply Quote 0
            • julien-fJ Offline
              julien-f Vates 🪐 Co-Founder XO Team @stevezemlicka
              last edited by

              Hello!

              Indeed, it's a know issue, only tasks for failed authentications are kept, successful tasks are removed otherwise they would flood the logs (validating an authentication token, which happens for every requests done to xo-server by xo-web is an authentication).

              But the subscription process (used to keep the list up to date on the UI side) currently does not properly handle task removals which can lead to ghost tasks which are still marked as running and leads to not found errors when interacting with them.

              Most of the removed authentication tasks don't appear because they live for a very short time but some still show up and exhibits this behavior.

              Fixing this bug is in our roadmap šŸ™‚

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                stevezemlicka @julien-f
                last edited by

                @julien-f
                Awesome, thank you for the update. So if I'm hearing you correctly, this seems to be more of a minor annoyance and not necessarily anything harmful or detrimental. Thank you for verifying this is on the roadmap. I'll hang tight until it is patched. Thank you for all your work and efforts on this project!

                julien-fJ 1 Reply Last reply Reply Quote 0
                • julien-fJ Offline
                  julien-f Vates 🪐 Co-Founder XO Team @stevezemlicka
                  last edited by

                  @stevezemlicka Exactly šŸ™‚

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    fataugie
                    last edited by

                    So I've got a similar issue, but with slightly different additional sticky logs. So in my pic, "A" refers to this topic, but I also have the list "B" that is persistent between reboots of the Xen instance and even the Host server.
                    "A" will disappear with a refresh of the page... "B" is like the walking dead....

                    Is there a location I can go to on the server and remove them via the cli?xen.JPG

                    julien-fJ 1 Reply Last reply Reply Quote 0
                    • julien-fJ Offline
                      julien-f Vates 🪐 Co-Founder XO Team @fataugie
                      last edited by

                      @fataugie Those successful authentication logs (B) may be related to an old bug.

                      You can indeed delete them with xo-cli, either one by one or all task logs:

                      # a specific task
                      xo-cli rest del tasks/$id
                      
                      # all of them
                      xo-cli rest del tasks
                      
                      F 1 Reply Last reply Reply Quote 1
                      • F Offline
                        fataugie @julien-f
                        last edited by olivierlambert

                        @julien-f Well, I tried to delete all.....and got this output:

                        tony@xenorchestra:~/XenOrchestraInstallerUpdater$ xo-cli rest del tasks
                        āœ– TypeError [ERR_INVALID_URL]: Invalid URL
                            at new NodeError (node:internal/errors:405:5)
                            at new URL (node:internal/url:611:13)
                            at Object.exec (file:///opt/xo/xo-builds/xen-orchestra-202312212125/packages/xo-cli/rest.mjs:152:21)
                            at Object.del (file:///opt/xo/xo-builds/xen-orchestra-202312212125/packages/xo-cli/rest.mjs:46:33)
                            at Object.rest (file:///opt/xo/xo-builds/xen-orchestra-202312212125/packages/xo-cli/rest.mjs:149:28)
                            at async main (file:///opt/xo/xo-builds/xen-orchestra-202312212125/packages/xo-cli/index.mjs:396:14) {
                          code: 'ERR_INVALID_URL',
                          input: 'undefined'
                        }
                        
                        1 Reply Last reply Reply Quote 0
                        • olivierlambertO Offline
                          olivierlambert Vates 🪐 Co-Founder CEO
                          last edited by

                          Have you registered your XO CLI to your XO instance first?

                          F 1 Reply Last reply Reply Quote 0
                          • F Offline
                            fataugie @olivierlambert
                            last edited by

                            @olivierlambert Well.....now I did.
                            After much hair pulling and gnashing of teeth, it worked as it should. I was unaware I needed to. Thanks

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

                              It's documented here: https://xen-orchestra.com/docs/architecture.html#xo-cli-cli

                              Happy to know it works now šŸ™‚

                              1 Reply Last reply Reply Quote 0
                              • julien-fJ Offline
                                julien-f Vates 🪐 Co-Founder XO Team @fataugie
                                last edited by

                                @fataugie xo-cli will now display an explicit error in that case šŸ™‚

                                https://github.com/vatesfr/xen-orchestra/commit/0d4cf48410840ee8e9dd783da0dec9d505ff47dd

                                0 julien-f committed to vatesfr/xen-orchestra
                                feat(xo-cli rest): explicit error if not registered
                                
                                Fixes https://xcp-ng.org/forum/post/68698
                                F 1 Reply Last reply Reply Quote 1
                                • F Offline
                                  fataugie @julien-f
                                  last edited by fataugie

                                  @julien-f Just one question.....do you guys EVER sleep?
                                  I'm blown away at the responsiveness of this project....thanks for the efforts!

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

                                    And we are blown away by our wonderful community! šŸ˜‰ Thank you very much, and happy to help you!

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