How do you "upgrade" a cluster non-database member to database member?

I have 6 servers, 3 are database server, 3 are not. How did take one out of being master database and give that job to another. Is one of the 3 database servers a master of masters, or are they all equal peers?

Thanks

With LXD 3.20 roles are assigned automatically. Just don’t worry about it: as long as a majority of your servers is online and you shut them down cleanly, you should be good. For example if all 6 servers are running and healthy, and you shutdown one database server, then during shutdown that server will automatically transfer his role to one of the 3 other non-database servers.

I tried that and it didn’t work - may be I did not give enough time

Q9 doesn’t want to be a database server

The servers are not picking new db managers.

I would like switch Q0 and Q9 database roles.
If I replace roles info in faft_nodes would that change their “role”
Not sure why Q9 doesn’t want to be master. I guess if only two server, then only one is role master.
Everything works fine otherwise.

The thing I don’t understand from the screenshots you pasted is how did you end up with only 2 database nodes. That shouldn’t be possible (or at least not very likely).

Please can you provide a detailed step-by-step way to reproduce what you are seeing?

We have a test in our test suite that spawns a cluster of 4 nodes, kills the 2nd node with kill -9, and checks that the 4th node gets promoted from non-database to database.

I modified the test to run with 9 nodes instead of 4 and it still works as expected.

Your going to really love this now… I added Q9 to be master via database. Works great now. I can bring Q0 down and it still works. Which is great for me.
I believe there is something wrong in your voting logic, it is not working as you think.

But here is how I would like to work… based on my experience with Clusters on other platforms.

There is a Master of Master(MOM), call it Node0
If you bring up more nodes, they become Regular Masters until you get 2 more. If you get more than that they become Children.
If you fall below three Node0 but less than two it becomes MOM again
If a node finds itself without any partners it goes into Safenode. It still operates but basically you can’t do anything besides start and stop containers, or export them.
There should also be a function to force Safenode to immediately try to find partners again. Since it was in safe mode, then upon finding partners it will assume these to be Master.
BTW every time a node changes state it create a date-timed backup of database.
There should also be a simple lxd command like LXD makemaster Q0, LXD makechild Q9, LXD makemom Q5 so that changing this is a simple thing in case of hardware/software problems that happen in real world.

Just my thoughts, from someone that has been working with LXD since before version 1 and this voting has never worked for me because if one node goes down you are screwl. And I avoid rebooting servers or upgrades because it has come back to bite me so many times.

If you don’t provide info to reproduce the issue there’s not much we can do.