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

    Can't login

    Scheduled Pinned Locked Moved XO Lite
    12 Posts 3 Posters 1.6k 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.
    • E Offline
      elementalwindx
      last edited by

      I have 2 XCP-NG servers in a cloud setup.

      I can login to both as root on the main console screen itself to reboot/shutdown/maintenance mode.

      XCP-One I can login via xo lite just fine
      XCP-Two I cannot login via xo lite.

      For some reason the root u/p doesn't work on XCP-Two.

      Any idea what I may have done wrong?

      Thanks.

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

        Hi,

        Bad password given during the install?

        E 1 Reply Last reply Reply Quote 0
        • E Offline
          elementalwindx @olivierlambert
          last edited by

          @olivierlambert No? Why would it let me login in every manner possible except the xo lite interface? I know I have the right server as well as the IP matches.

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

            Ah you mean so you can SSH with both OK, but XO Lite login the second one doesn't work, right?

            Well, if you 2 hosts are in the same pool, you shouldn't login to the slave host, because the only active API is on the master. So there's 0 reason to login on a slave (the DB is read only anyway).

            But indeed, the error message isn't obvious at all, let me ask to fix this 🙂 Thanks for the feedback!

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              elementalwindx @olivierlambert
              last edited by

              @olivierlambert ah did not know that! Yeah a "Hey dummy this is a slave pc, you can't log into xo lite" would be nice 🙂 Instead of "an error occurred" 🙂

              Thanks!

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

                Totally, I think it was just forgotten 🙂 I made a report to the team!

                1 Reply Last reply Reply Quote 1
                • J Offline
                  john.c @elementalwindx
                  last edited by john.c

                  @elementalwindx @olivierlambert Another option on pool members which aren't masters, is to maybe not by default show the login form for XO: Lite. But display a message saying "Sorry but this XCP-ng host is a member of a pool and not currently a master! Please login to the pool master.

                  For this pool it is <URL address for pool master>". The address for the pool master would be shown as a link, which is currently dynamically pointing to the current master of the pool.

                  This way the user can quickly get to the correct host with XO: Lite if they accidentally go to the wrong one when in a pool. The option to display the login form would be a setting able to be toggled in XO: Lite for a particular host in a pool as well as globally. It could also be toggled using a command over SSH.

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

                    @john-c The thing is: I don't see how to do it. Any host can be a master at some point, so it might require a specific mechanism from XAPI to rewrite the HTML file on the fly for this. Sounds a bit complicated to me. At least, I don't see any elegant way right now.

                    For now, before a login, there's absolutely no way to guess if you are on the master.

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      john.c @olivierlambert
                      last edited by john.c

                      @olivierlambert said in Can't login:

                      @john-c The thing is: I don't see how to do it. Any host can be a master at some point, so it might require a specific mechanism from XAPI to rewrite the HTML file on the fly for this. Sounds a bit complicated to me. At least, I don't see any elegant way right now.

                      For now, before a login, there's absolutely no way to guess if you are on the master.

                      Well could it be added to the XAPI then please, as it can also be used by XOA and also that public API of XOA? This will as result allow for my request, plus additionally showing the master of pools on XOA and also reporting this via the REST API.

                      Plus it could also then through XOA be reported to NetBox so that data can be part of the "source of truth" for the network.

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

                        After some digging, we found that you don't need to log to get a XAPI error when accessing a slave, it's directly returning:

                        XapiError: HOST_IS_SLAVE(<MASTER IP ADDRESS)

                        So we could use it in theory to tell the user without even bothering to login

                        J 1 Reply Last reply Reply Quote 0
                        • J Offline
                          john.c @olivierlambert
                          last edited by

                          @olivierlambert Well in that case please do.

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

                            I'm not waiting for your suggestion to do it, it's already in the backlog 😉

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