pmcf 6.66.7 → 6.66.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": "6.66.7",
3
+ "version": "6.66.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -7,7 +7,7 @@ import {
7
7
  ADDRESS_TYPE_LOOPBACK
8
8
  } from "ip-utilties";
9
9
  import {
10
- string_attribute_writable,
10
+ enum_string_attribute_writable,
11
11
  string_collection_attribute_writable,
12
12
  number_attribute_writable,
13
13
  boolean_attribute_writable_true,
@@ -95,10 +95,16 @@ export class kea extends CoreService {
95
95
  default: 86400
96
96
  },
97
97
  "ddns-conflict-resolution-mode": {
98
- ...string_attribute_writable,
98
+ ...enum_string_attribute_writable,
99
99
  name: "ddns-conflict-resolution-mode",
100
- scope: SCOPE_KEA
101
- //values: new Set(["check-exists-with-dhcid","no-check-with-dhcid"])
100
+ scope: SCOPE_KEA,
101
+ values: new Set([
102
+ "check-with-dhcid",
103
+ "no-check-with-dhcid",
104
+ "no-check-without-dhcid",
105
+ "check-exists-with-dhcid"
106
+ ]),
107
+ default: "check-with-dhcid"
102
108
  }
103
109
  };
104
110
  static service = {
@@ -5,7 +5,7 @@ import {
5
5
  enum_string_attribute_writable,
6
6
  priority_attribute_writable
7
7
  } from "pacc";
8
- import { FAMILY_IPV4 } from "ip-utilties";
8
+ import { FAMILY_IPV4, FAMILY_IPV6 } from "ip-utilties";
9
9
  import { addType } from "../type.mjs";
10
10
  import { PROTOCOL_TCP } from "../constants.mjs";
11
11
  import { core } from "../core.mjs";
@@ -125,14 +125,18 @@ export class keepalived extends CoreService {
125
125
 
126
126
  cfg.push(` interface ${ni.name}`);
127
127
 
128
- cfg.push(" virtual_ipaddress {");
129
-
130
- for (const na of cluster.networkAddresses(
131
- na => na.networkInterface.kind !== "loopback"
132
- )) {
133
- cfg.push(` ${na.cidrAddress} dev ${ni.name} label ${clusterName}`);
128
+ function vip(slot, family) {
129
+ cfg.push(` ${slot} {`);
130
+ for (const na of cluster.networkAddresses(
131
+ na => na.networkInterface.kind !== "loopback" && na.family === family
132
+ )) {
133
+ cfg.push(` ${na.cidrAddress} dev ${ni.name} label ${clusterName}`);
134
+ }
135
+ cfg.push(" }");
134
136
  }
135
- cfg.push(" }");
137
+
138
+ vip("virtual_ipaddress", FAMILY_IPV4);
139
+ vip("virtual_ipaddress_excluded", FAMILY_IPV6);
136
140
 
137
141
  cfg.push(` virtual_router_id ${cluster.id}`);
138
142
 
@@ -220,7 +224,10 @@ export class keepalived extends CoreService {
220
224
  "[Unit]",
221
225
  `Description=${state} state of cluster ${clusterName}`,
222
226
  "PartOf=keepalived.service",
223
- `Conflicts=${states.filter(s=>s!==state).map(other=>`${clusterName}-${other}.target`).join(' ')}`
227
+ `Conflicts=${states
228
+ .filter(s => s !== state)
229
+ .map(other => `${clusterName}-${other}.target`)
230
+ .join(" ")}`
224
231
  ]
225
232
  );
226
233
  }