pmcf 2.71.6 → 2.71.8

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.6",
3
+ "version": "2.71.8",
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
  }
@@ -152,6 +152,7 @@ export class BindService extends ExtraSourceService {
152
152
  constructor(owner, data) {
153
153
  super(owner, data);
154
154
 
155
+ this._systemd = "bind.service";
155
156
  this._extends.push(new Service(owner, { name: this.name, type: "dns" }));
156
157
  this.views = {};
157
158
 
@@ -34,7 +34,7 @@ const ChronyServiceTypeDefinition = {
34
34
  },
35
35
  {
36
36
  family: "unix",
37
- path: "/run/chrony/chronyd.sock"
37
+ path: "/var/run/chrony/chronyd.sock"
38
38
  }
39
39
  ]
40
40
  }
@@ -54,6 +54,8 @@ export class ChronyService extends ExtraSourceService {
54
54
  constructor(owner, data) {
55
55
  super(owner, data);
56
56
  this.read(data, ChronyServiceTypeDefinition);
57
+
58
+ this._systemd = "chronyd.service";
57
59
  }
58
60
 
59
61
  get type() {
@@ -57,6 +57,8 @@ export class OpenLDAPService extends Service {
57
57
  constructor(owner, data) {
58
58
  super(owner, data);
59
59
  this.read(data, OpenLDAPServiceTypeDefinition);
60
+
61
+ this._systemd = "slapd.service";
60
62
  }
61
63
 
62
64
  get type() {
@@ -400,6 +400,7 @@ export class BindService extends ExtraSourceService {
400
400
  retry: number;
401
401
  expire: number;
402
402
  minimum: number;
403
+ _systemd: string;
403
404
  views: {};
404
405
  get soaUpdates(): number[];
405
406
  set addresses(value: any[]);
@@ -285,6 +285,7 @@ export class ChronyService extends ExtraSourceService {
285
285
  };
286
286
  };
287
287
  };
288
+ _systemd: string;
288
289
  preparePackages(dir: any): AsyncGenerator<{
289
290
  dir: any;
290
291
  sources: FileContentProvider[];
@@ -282,6 +282,7 @@ export class OpenLDAPService extends Service {
282
282
  };
283
283
  _baseDN: any;
284
284
  _rootDN: any;
285
+ _systemd: string;
285
286
  get type(): string;
286
287
  set baseDN(value: any);
287
288
  get baseDN(): any;