Can't login
-
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.
-
Hi,
Bad password given during the install?
-
@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.
-
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!
-
@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!
-
Totally, I think it was just forgotten I made a report to the team!
-
@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.
-
@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.
-
@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.
-
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
-
@olivierlambert Well in that case please do.
-
I'm not waiting for your suggestion to do it, it's already in the backlog