pmcf 2.59.7 → 2.60.0
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 +1 -2
- package/src/host.mjs +17 -13
- package/src/services/systemd-journal-remote.mjs +11 -6
- package/src/services/systemd-journal-upload.mjs +2 -2
- package/src/services/systemd-journal.mjs +1 -1
- package/src/services/systemd-resolved.mjs +2 -2
- package/src/services/systemd-timesyncd.mjs +2 -2
- package/types/services/systemd-journal-remote.d.mts +2 -2
- package/types/services/systemd-journal-upload.d.mts +1 -1
- package/types/services/systemd-journal.d.mts +1 -1
- package/types/services/systemd-resolved.d.mts +1 -1
- package/types/services/systemd-timesyncd.d.mts +1 -1
package/package.json
CHANGED
package/src/cluster.mjs
CHANGED
|
@@ -139,8 +139,7 @@ export class Cluster extends Host {
|
|
|
139
139
|
` notify_fault "/usr/bin/systemctl start ${cluster.name}-fault.target"`
|
|
140
140
|
);
|
|
141
141
|
|
|
142
|
-
cfg.push("}");
|
|
143
|
-
cfg.push("");
|
|
142
|
+
cfg.push("}", "");
|
|
144
143
|
|
|
145
144
|
for (const endpoint of serviceEndpoints(cluster, {
|
|
146
145
|
services: { type: "http" },
|
package/src/host.mjs
CHANGED
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
domainFromDominName,
|
|
9
9
|
domainName,
|
|
10
10
|
writeLines,
|
|
11
|
-
sectionLines
|
|
11
|
+
sectionLines,
|
|
12
|
+
asArray
|
|
12
13
|
} from "./utils.mjs";
|
|
13
14
|
import { objectFilter } from "./filter.mjs";
|
|
14
15
|
import { addType, types } from "./types.mjs";
|
|
@@ -457,7 +458,7 @@ export class Host extends ServiceOwner {
|
|
|
457
458
|
|
|
458
459
|
for (const networkInterface of this.networkInterfaces.values()) {
|
|
459
460
|
for (const s of networkInterface.subnets()) {
|
|
460
|
-
sn.set(s.address,s);
|
|
461
|
+
sn.set(s.address, s);
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
|
|
@@ -514,17 +515,20 @@ export class Host extends ServiceOwner {
|
|
|
514
515
|
await generateKnownHosts(this.owner.hosts(), join(dir, "root", ".ssh"));
|
|
515
516
|
|
|
516
517
|
for (const service of this.services) {
|
|
517
|
-
if (service.
|
|
518
|
-
const {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
518
|
+
if (service.systemdConfigs) {
|
|
519
|
+
for (const {
|
|
520
|
+
serviceName,
|
|
521
|
+
configFileName,
|
|
522
|
+
content
|
|
523
|
+
} of asArray(service.systemdConfigs(this.name))) {
|
|
524
|
+
await writeLines(dir, configFileName, sectionLines(...content));
|
|
525
|
+
|
|
526
|
+
addHook(
|
|
527
|
+
packageData.properties.hooks,
|
|
528
|
+
"post_install",
|
|
529
|
+
`systemctl enable ${serviceName}`
|
|
530
|
+
);
|
|
531
|
+
}
|
|
528
532
|
}
|
|
529
533
|
}
|
|
530
534
|
|
|
@@ -32,11 +32,16 @@ export class SystemdJournalRemoteService extends Service {
|
|
|
32
32
|
return SystemdJournalRemoteServiceTypeDefinition.name;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
systemdConfigs(name) {
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
serviceName: "systemd-journal-remote.service",
|
|
39
|
+
configFileName: `etc/systemd/journal-remote.conf.d/${name}.conf`,
|
|
40
|
+
content: ["Remote", {}]
|
|
41
|
+
} /*,
|
|
42
|
+
{
|
|
43
|
+
serviceName: "systemd-journal-remote.socket"
|
|
44
|
+
}*/
|
|
45
|
+
];
|
|
41
46
|
}
|
|
42
47
|
}
|
|
@@ -34,9 +34,9 @@ export class SystemdJournalUploadService extends Service {
|
|
|
34
34
|
return SystemdJournalUploadServiceTypeDefinition.name;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
systemdConfigs(name) {
|
|
38
38
|
return {
|
|
39
|
-
serviceName: "systemd-journal-upload",
|
|
39
|
+
serviceName: "systemd-journal-upload.service",
|
|
40
40
|
configFileName: `etc/systemd/journal-upload.conf.d/${name}.conf`,
|
|
41
41
|
content: ["Upload", {
|
|
42
42
|
URL : this.url
|
|
@@ -32,7 +32,7 @@ export class SystemdJournalService extends Service {
|
|
|
32
32
|
return SystemdJournalServiceTypeDefinition.name;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
systemdConfigs(name) {
|
|
36
36
|
return {
|
|
37
37
|
serviceName: "systemd-journald",
|
|
38
38
|
configFileName: `etc/systemd/journal.conf.d/${name}.conf`,
|
|
@@ -36,7 +36,7 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
36
36
|
return SystemdResolvedServiceTypeDefinition.name;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
systemdConfigs(name) {
|
|
40
40
|
const options = (priority, limit) => {
|
|
41
41
|
return {
|
|
42
42
|
services: { type: "dns", priority },
|
|
@@ -48,7 +48,7 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
return {
|
|
51
|
-
serviceName: "systemd-resolved",
|
|
51
|
+
serviceName: "systemd-resolved.service",
|
|
52
52
|
configFileName: `etc/systemd/resolved.conf.d/${name}.conf`,
|
|
53
53
|
content: [
|
|
54
54
|
"Resolve",
|
|
@@ -36,9 +36,9 @@ export class SystemdTimesyncdService extends ExtraSourceService {
|
|
|
36
36
|
return SystemdTimesyncdServiceTypeDefinition.name;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
systemdConfigs(name) {
|
|
40
40
|
return {
|
|
41
|
-
serviceName: "systemd-timesyncd",
|
|
41
|
+
serviceName: "systemd-timesyncd.service",
|
|
42
42
|
configFileName: `etc/systemd/timesyncd.conf.d/${name}.conf`,
|
|
43
43
|
content: [
|
|
44
44
|
"Time",
|
|
@@ -245,10 +245,10 @@ export class SystemdJournalRemoteService extends Service {
|
|
|
245
245
|
};
|
|
246
246
|
get type(): string;
|
|
247
247
|
get systemdServices(): string;
|
|
248
|
-
|
|
248
|
+
systemdConfigs(name: any): {
|
|
249
249
|
serviceName: string;
|
|
250
250
|
configFileName: string;
|
|
251
251
|
content: {}[];
|
|
252
|
-
};
|
|
252
|
+
}[];
|
|
253
253
|
}
|
|
254
254
|
import { Service } from "pmcf";
|
|
@@ -251,7 +251,7 @@ export class SystemdJournalUploadService extends Service {
|
|
|
251
251
|
};
|
|
252
252
|
get type(): string;
|
|
253
253
|
get systemdServices(): string;
|
|
254
|
-
|
|
254
|
+
systemdConfigs(name: any): {
|
|
255
255
|
serviceName: string;
|
|
256
256
|
configFileName: string;
|
|
257
257
|
content: (string | {
|
|
@@ -245,7 +245,7 @@ export class SystemdJournalService extends Service {
|
|
|
245
245
|
};
|
|
246
246
|
get type(): string;
|
|
247
247
|
get systemdServices(): string;
|
|
248
|
-
|
|
248
|
+
systemdConfigs(name: any): {
|
|
249
249
|
serviceName: string;
|
|
250
250
|
configFileName: string;
|
|
251
251
|
content: (string | {
|
|
@@ -244,7 +244,7 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
244
244
|
properties: {};
|
|
245
245
|
};
|
|
246
246
|
get systemdServices(): string;
|
|
247
|
-
|
|
247
|
+
systemdConfigs(name: any): {
|
|
248
248
|
serviceName: string;
|
|
249
249
|
configFileName: string;
|
|
250
250
|
content: (string | {
|
|
@@ -244,7 +244,7 @@ export class SystemdTimesyncdService extends ExtraSourceService {
|
|
|
244
244
|
properties: {};
|
|
245
245
|
};
|
|
246
246
|
get systemdServices(): string;
|
|
247
|
-
|
|
247
|
+
systemdConfigs(name: any): {
|
|
248
248
|
serviceName: string;
|
|
249
249
|
configFileName: string;
|
|
250
250
|
content: (string | {
|