DEV-5268 Support for openSUSE
This commit is contained in:
parent
b1764c81cb
commit
a075dfcae2
104
README.md
104
README.md
@ -13,7 +13,7 @@ takeover will only occur if a node can communicate with the management server.
|
||||
|
||||
## Requirements
|
||||
|
||||
The nodes must be running Debian 10 (Buster) or newer.
|
||||
The nodes must be running openSUSE Leap or Debian.
|
||||
|
||||
## Initial setup on management server
|
||||
|
||||
@ -22,7 +22,9 @@ on the management server, which will act as a tie-breaker to avoid a
|
||||
split-brain scenario on the bonders where each device independently believes
|
||||
it should be providing services:
|
||||
|
||||
apt install corosync-qnetd
|
||||
```
|
||||
apt install corosync-qnetd
|
||||
```
|
||||
|
||||
Note that this service is used to handle any number of bonder clusters. It
|
||||
only needs to be set up once.
|
||||
@ -82,10 +84,34 @@ are required:
|
||||
|
||||
Execute the following on each bonder:
|
||||
|
||||
apt install git make pacemaker corosync-qdevice crmsh
|
||||
git clone https://git.multapplied.net/Partner/bond-clustering.git
|
||||
cd bond-clustering
|
||||
make install
|
||||
#### openSUSE
|
||||
|
||||
Install packages:
|
||||
```
|
||||
zypper install git make pacemaker corosync-qdevice crmsh
|
||||
```
|
||||
|
||||
Install the bond clustering tool:
|
||||
|
||||
```
|
||||
git clone https://git.multapplied.net/Partner/bond-clustering.git
|
||||
cd bond-clustering
|
||||
make install
|
||||
```
|
||||
|
||||
#### Debian
|
||||
|
||||
```
|
||||
apt install git make pacemaker corosync-qdevice crmsh
|
||||
```
|
||||
|
||||
Install the bond clustering tool:
|
||||
|
||||
```
|
||||
git clone https://git.multapplied.net/Partner/bond-clustering.git
|
||||
cd bond-clustering
|
||||
make install
|
||||
```
|
||||
|
||||
### Setup
|
||||
|
||||
@ -93,7 +119,9 @@ On the first bonder run the following script which will ask for the API
|
||||
account details and ask which connected IP(s) should be used for
|
||||
bonder-to-bonder communication:
|
||||
|
||||
bond-cluster-setup initial
|
||||
```
|
||||
bond-cluster-setup initial
|
||||
```
|
||||
|
||||
This process automatically detects any shared resources configured on the
|
||||
bonds.
|
||||
@ -105,22 +133,28 @@ bonder. Run that command to complete the cluster installation.
|
||||
|
||||
To update, execute the following on each bonder:
|
||||
|
||||
git clone https://git.multapplied.net/Partner/bond-clustering.git
|
||||
cd bond-clustering
|
||||
make install
|
||||
bond-cluster-setup initial
|
||||
```
|
||||
git clone https://git.multapplied.net/Partner/bond-clustering.git
|
||||
cd bond-clustering
|
||||
make install
|
||||
bond-cluster-setup initial
|
||||
```
|
||||
|
||||
If the output indicates to run a command on the peer do it, otherwise run the
|
||||
following on the peer:
|
||||
|
||||
bond-cluster-setup initial
|
||||
```
|
||||
bond-cluster-setup initial
|
||||
```
|
||||
|
||||
### Checking cluster status
|
||||
|
||||
At this point the base cluster communication should be present. Check with the
|
||||
following command:
|
||||
|
||||
corosync-quorumtool
|
||||
```
|
||||
corosync-quorumtool
|
||||
```
|
||||
|
||||
The important parts are that the total votes are equal to the expected votes,
|
||||
and that the bonders are listed under the membership information. The Qdevice
|
||||
@ -131,7 +165,9 @@ aggregator as it makes decisions.
|
||||
You can also check the higher-level cluster status, which includes the running
|
||||
services using the following command on either bonder:
|
||||
|
||||
crm_mon
|
||||
```
|
||||
crm_mon
|
||||
```
|
||||
|
||||
This will continually monitor the state of the bonders and the resources. Note
|
||||
that we have not yet set up the service to manage the routing objects.
|
||||
@ -140,7 +176,9 @@ that we have not yet set up the service to manage the routing objects.
|
||||
|
||||
Run the following command on either bonder:
|
||||
|
||||
bond-cluster-setup setup-resource
|
||||
```
|
||||
bond-cluster-setup setup-resource
|
||||
```
|
||||
|
||||
This will set up the bond-cluster-objects resource, which will start
|
||||
automatically on one of the bonders. If the routing objects are already
|
||||
@ -148,7 +186,9 @@ enabled for a bond, it will detect and leave them running on that bond.
|
||||
|
||||
Check the state on either bonder:
|
||||
|
||||
crm_mon
|
||||
```
|
||||
crm_mon
|
||||
```
|
||||
|
||||
### Testing resource migration
|
||||
|
||||
@ -156,11 +196,15 @@ The easiest way to check what happens when a bonder is down is to simply stop
|
||||
the pacemaker service on the bonder currently running the resource while
|
||||
running crm_mon on the other bonder:
|
||||
|
||||
systemctl stop pacemaker
|
||||
```
|
||||
systemctl stop pacemaker
|
||||
```
|
||||
|
||||
To start it again:
|
||||
|
||||
systemctl start pacemaker
|
||||
```
|
||||
systemctl start pacemaker
|
||||
```
|
||||
|
||||
From there, rebooting or pulling ethernet or power cables willcan be performed
|
||||
for further testing.
|
||||
@ -177,7 +221,9 @@ following changes are made on the management server:
|
||||
|
||||
To do this, login to any of the bonders and run the initial setup again:
|
||||
|
||||
bond-cluster-setup initial --reconfigure
|
||||
```
|
||||
bond-cluster-setup initial --reconfigure
|
||||
```
|
||||
|
||||
Then run the peer setup command that is displayed on the other bonder.
|
||||
|
||||
@ -197,17 +243,23 @@ such as a mobile broadband interface.
|
||||
To enable this, we will need to add a constraint. Say we want to prefer
|
||||
``bond2``, run the following command:
|
||||
|
||||
crm configure location bco-preference bond-cluster-objects inf: bond2
|
||||
```
|
||||
crm configure location bco-preference bond-cluster-objects inf: bond2
|
||||
```
|
||||
|
||||
Note that this will force a transition if it is not running on that bonder.
|
||||
|
||||
You can check the configuration with this command:
|
||||
|
||||
crm configure show
|
||||
```
|
||||
crm configure show
|
||||
```
|
||||
|
||||
If you ever need to remove this preference, run the following:
|
||||
|
||||
crm configure delete bco-preference
|
||||
```
|
||||
crm configure delete bco-preference
|
||||
```
|
||||
|
||||
Note that removing the preference will not cause a transition.
|
||||
|
||||
@ -219,13 +271,17 @@ is another way.
|
||||
Say we have the resource running on ``bond1`` and we want it to move to
|
||||
``bond2``. We can run the following command on either bonder:
|
||||
|
||||
crm resource migrate bond-cluster-objects bond2
|
||||
```
|
||||
crm resource migrate bond-cluster-objects bond2
|
||||
```
|
||||
|
||||
This places a temporary constraint to prefer bond2 for the service and the
|
||||
resource will move.
|
||||
|
||||
The constraint can be removed with the following command:
|
||||
|
||||
crm resource migrate bond-cluster-objects
|
||||
```
|
||||
crm resource migrate bond-cluster-objects
|
||||
```
|
||||
|
||||
Now that there is no preference, the resource will stay where it is.
|
||||
|
@ -338,8 +338,8 @@ nodelist {
|
||||
f.write(config)
|
||||
|
||||
systemctl = get_bin_path("systemctl")
|
||||
subprocess.run([systemctl, "enable", "corosync", "corosync-qdevice"])
|
||||
subprocess.run([systemctl, "restart", "corosync", "corosync-qdevice"])
|
||||
subprocess.run([systemctl, "enable", "corosync", "corosync-qdevice", "pacemaker"])
|
||||
subprocess.run([systemctl, "restart", "corosync", "corosync-qdevice", "pacemaker"])
|
||||
|
||||
def remove_connectedip_hooks(self):
|
||||
active_ids = set([int(i) for i in os.listdir(
|
||||
|
Loading…
x
Reference in New Issue
Block a user