pmcf 2.71.7 → 2.71.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.71.7",
3
+ "version": "2.71.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/cluster.mjs CHANGED
@@ -127,7 +127,7 @@ export class Cluster extends Host {
127
127
  cfg.push(` virtual_router_id ${cluster.routerId}`);
128
128
 
129
129
  let reducedPrio = cluster.masters.indexOf(ni);
130
- if(reducedPrio < 0) {
130
+ if (reducedPrio < 0) {
131
131
  reducedPrio = cluster.backups.indexOf(ni) + 5;
132
132
  }
133
133
 
@@ -193,6 +193,37 @@ export class Cluster extends Host {
193
193
  cfg.push("}", "");
194
194
  break; // only one for now
195
195
  }
196
+ await writeLines(
197
+ join(packageStagingDir, "/usr/lib/systemd/system"),
198
+ `${cluster.name}-master.target`,
199
+ [
200
+ "[Unit]",
201
+ `Description=master state of cluster ${cluster.name}`,
202
+ "PartOf=keepalived.service",
203
+ `Conflicts=${cluster.name}-fault.target`
204
+ ]
205
+ );
206
+
207
+ await writeLines(
208
+ join(packageStagingDir, "/usr/lib/systemd/system"),
209
+ `${cluster.name}-backup.target`,
210
+ [
211
+ "[Unit]",
212
+ `Description=backup state of cluster ${cluster.name}`,
213
+ "PartOf=keepalived.service",
214
+ `Conflicts=${cluster.name}-fault.target`
215
+ ]
216
+ );
217
+
218
+ await writeLines(
219
+ join(packageStagingDir, "/usr/lib/systemd/system"),
220
+ `${cluster.name}-fault.target`,
221
+ [
222
+ "[Unit]",
223
+ `Description=fault state of cluster ${cluster.name}`,
224
+ `Conflicts=${cluster.name}-master.target ${cluster.name}-backup.target`
225
+ ]
226
+ );
196
227
  }
197
228
 
198
229
  await writeLines(
@@ -201,38 +232,6 @@ export class Cluster extends Host {
201
232
  cfg
202
233
  );
203
234
 
204
- await writeLines(
205
- join(packageStagingDir, "/usr/lib/systemd/system"),
206
- `${this.name}-master.target`,
207
- [
208
- "[Unit]",
209
- `Description=master state of cluster ${this.name}`,
210
- "PartOf=keepalived.service",
211
- `Conflicts=${this.name}-fault.target`
212
- ]
213
- );
214
-
215
- await writeLines(
216
- join(packageStagingDir, "/usr/lib/systemd/system"),
217
- `${this.name}-backup.target`,
218
- [
219
- "[Unit]",
220
- `Description=backup state of cluster ${this.name}`,
221
- "PartOf=keepalived.service",
222
- `Conflicts=${this.name}-fault.target`
223
- ]
224
- );
225
-
226
- await writeLines(
227
- join(packageStagingDir, "/usr/lib/systemd/system"),
228
- `${this.name}-fault.target`,
229
- [
230
- "[Unit]",
231
- `Description=fault state of cluster ${this.name}`,
232
- `Conflicts=${this.name}-master.target ${this.name}-backup.target`
233
- ]
234
- );
235
-
236
235
  yield result;
237
236
  }
238
237
  }
package/src/service.mjs CHANGED
@@ -167,16 +167,15 @@ export class Service extends Base {
167
167
  } else {
168
168
  if (e.family === na.family) {
169
169
  result.push(new Endpoint(this, na, options));
170
- } else {
171
- if (!domainNames.has(this.domainName)) {
172
- domainNames.add(this.domainName);
173
- result.push(
174
- new DomainNameEndpoint(this, this.domainName, options)
175
- );
176
- }
177
170
  }
178
171
  }
179
172
  }
173
+
174
+ if (!domainNames.has(this.domainName)) {
175
+ domainNames.add(this.domainName);
176
+ result.push(new DomainNameEndpoint(this, this.domainName, options));
177
+ }
178
+
180
179
  break;
181
180
  }
182
181
  }