Linux Clustering Issue with 2 servers only using corosync and pacemaker

Hey there! I’m working on running a Python application program on Ubuntu server and want to set up Linux clustering from the ground up so that if one server goes down, the other one can take over seamlessly. I’ve been checking out some YouTube videos and reading articles to get the hang of active-active clustering. So far, I’ve set up two old computers, installed Ubuntu on both of them, and installed packages like pcs, pacemaker, and corosync on both servers. I’ve also enabled them in the background. I’ve tested them, and they can ping each other on the same network. But after I checked the pcs status, it didn’t seem to be working.

Server 1 pcs status :
Cluster name: testcluster
Cluster Summary:

    Stack: corosync (Pacemaker is running)
    Current DC: clusternode1 (version 2.1.6-6fdc9deea29) - partition WITHOUT quorum
    Last updated: Fri Jan 24 17:15:28 2025 on clusternode1
    Last change: Fri Jan 24 17:08:55 2025 by root via cibadmin on clusternode1
    2 nodes configured
    1 resource instance configured

Node List:

    Node clusternode2: UNCLEAN (offline)
    Online: [ clusternode1 ]

Full List of Resources:

    myfence (stonith:fence_virsh): Stopped

Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled```



And here is the status of server 2 :

```sudo pcs status
[sudo] password for clusternode2:
Cluster name: testcluster

WARNINGS:
No stonith devices and stonith-enabled is not false

Cluster Summary:

    Stack: corosync (Pacemaker is running)
    Current DC: clusternode2 (version 2.1.6-6fdc9deea29) - partition WITHOUT quorum
    Last updated: Fri Jan 24 22:32:47 2025 on clusternode2
    Last change: Fri Jan 24 21:55:13 2025 by hacluster via crmd on clusternode2
    2 nodes configured
    0 resource instances configured

Node List:

    Node clusternode1: UNCLEAN (offline)
    Online: [ clusternode2 ]

Full List of Resources:

    No resources

Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled

I’m not sure what to do next. I’m not sure why it’s not working. I’ve been setting these up with the help of ChatGPT so far. I haven’t been able to find any helpful online resources for this.

Sounds like firewall. Check ufw or iptables.

Depending on what your software does, you might not need corosync + pacemaker, but just a simple VRRP stack, like keepalived. If your program functions like DNS (it’s always there and takes queries and returns them), then keepalived will work better.

If your software requires specific resources (managed by pacemaker) then idk if you could do an active-active setup. Well, technically, if both of them run and write data to a remote file system (shared among the 2 servers) and only 1 is accessed at a time and then it goes down, then the main node will become the other active one, which will be the one writing to the shared FS.

But you might need to consider other stuff, like fencing if you have to deal with an active-active setup, to prevent concurrent access (or collisions). In those cases, keepalived isn’t enough.

ufw is disabled on both the ubuntu systems. The python application just collects data ( coming from another IP) and processes it and then send into another destination ip. I also need to create a Virtual IP.