pmcf 2.59.6 → 2.59.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cluster.mjs +11 -8
package/package.json
CHANGED
package/src/cluster.mjs
CHANGED
|
@@ -106,15 +106,22 @@ export class Cluster extends Host {
|
|
|
106
106
|
cfg.push(` state ${cluster.masters.has(ni) ? "MASTER" : "BACKUP"}`);
|
|
107
107
|
cfg.push(` interface ${ni.name}`);
|
|
108
108
|
|
|
109
|
-
cfg.push(" virtual_ipaddress {");
|
|
110
109
|
for (const na of cluster.networkAddresses(
|
|
111
110
|
na => na.networkInterface.kind !== "loopback"
|
|
112
111
|
)) {
|
|
112
|
+
cfg.push(
|
|
113
|
+
` ${
|
|
114
|
+
na.family === "IPv4"
|
|
115
|
+
? "virtual_ipaddress"
|
|
116
|
+
: "virtual_ipaddress_excluded"
|
|
117
|
+
} {`
|
|
118
|
+
);
|
|
113
119
|
cfg.push(
|
|
114
120
|
` ${na.cidrAddress} dev ${ni.name} label ${cluster.name}`
|
|
115
121
|
);
|
|
122
|
+
cfg.push(" }");
|
|
116
123
|
}
|
|
117
|
-
|
|
124
|
+
|
|
118
125
|
cfg.push(` virtual_router_id ${cluster.routerId}`);
|
|
119
126
|
cfg.push(
|
|
120
127
|
` priority ${host.priority + (cluster.masters.has(ni) ? 0 : 5)}`
|
|
@@ -127,12 +134,8 @@ export class Cluster extends Host {
|
|
|
127
134
|
cfg.push(" }");
|
|
128
135
|
|
|
129
136
|
cfg.push(
|
|
130
|
-
` notify_master "/usr/bin/systemctl start ${cluster.name}-master.target"
|
|
131
|
-
|
|
132
|
-
cfg.push(
|
|
133
|
-
` notify_backup "/usr/bin/systemctl start ${cluster.name}-backup.target"`
|
|
134
|
-
);
|
|
135
|
-
cfg.push(
|
|
137
|
+
` notify_master "/usr/bin/systemctl start ${cluster.name}-master.target"`,
|
|
138
|
+
` notify_backup "/usr/bin/systemctl start ${cluster.name}-backup.target"`,
|
|
136
139
|
` notify_fault "/usr/bin/systemctl start ${cluster.name}-fault.target"`
|
|
137
140
|
);
|
|
138
141
|
|