pmcf 6.26.1 → 6.26.3

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": "6.26.1",
3
+ "version": "6.26.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/cluster.mjs CHANGED
@@ -88,7 +88,7 @@ export class Cluster extends Host {
88
88
  ""
89
89
  ];
90
90
 
91
- const credentials = [];
91
+ const credentials = new Map();
92
92
  for (const cluster of [...this.owner.clusters.values()].sort((a, b) =>
93
93
  a.name.localeCompare(b.name)
94
94
  )) {
@@ -121,7 +121,7 @@ export class Cluster extends Host {
121
121
  }
122
122
 
123
123
  const credential = name.toUpperCase() + "_PASSWORD";
124
- credentials.push(credential);
124
+ credentials.set(credential,name);
125
125
  cfg.push(` priority ${host.priority - reducedPrio}`);
126
126
  cfg.push(" smtp_alert");
127
127
  cfg.push(" advert_int 5");
@@ -150,11 +150,9 @@ export class Cluster extends Host {
150
150
  cfg.push(` protocol ${endpoint.protocol.toUpperCase()}`);
151
151
 
152
152
  for (const member of this.members) {
153
- const memberService = Array.from(
154
- member.expression(`services[types[${endpoint.type}]][0]`)
155
- );
153
+ const memberService = member.expression(`services[types[${endpoint.type}]][0]`);
156
154
 
157
- console.log(member.fullName, endpoint.type, memberService);
155
+ console.log(member.fullName, endpoint.type, memberService?.fullName);
158
156
  cfg.push(` real_server ${member.address} ${memberService.port} {`);
159
157
  cfg.push(` weight ${memberService.weight}`);
160
158
 
@@ -223,9 +221,9 @@ export class Cluster extends Host {
223
221
  "credentials.conf",
224
222
  [
225
223
  "[Service]",
226
- ...credentials.map(
227
- c =>
228
- `LoadCredentialEncrypted=${c}:/etc/credstore.encrypted/keepalived.password`
224
+ ...credentials.entries().map(
225
+ ([credName,instance]) =>
226
+ `LoadCredentialEncrypted=${credName}:/etc/credstore.encrypted/keepalived.${instance}.password`
229
227
  )
230
228
  ]
231
229
  );
@@ -73,6 +73,7 @@ export class SystemdJournalRemoteService extends CoreService {
73
73
  };
74
74
  static service = {
75
75
  systemdService: "systemd-journal-remote.service",
76
+ //extends: ["http"],
76
77
  endpoints: [
77
78
  {
78
79
  family: FAMILY_IPV4,