Skip to content

Commit a7ed71f

Browse files
committed
Remove the uninstall of helios overrides
This reverts commit e5c66d9. Change-type: patch
1 parent 9dc6bb0 commit a7ed71f

2 files changed

Lines changed: 0 additions & 48 deletions

File tree

src/lib/supervisor-metadata.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ const SUPERVISOR_APPS: { [arch: string]: string } = {
1818
rpi: '6822565f766e413e96d9bebe2227cdcc',
1919
};
2020

21-
export function isSupervisorApp(appUuid: string): boolean {
22-
return Object.values(SUPERVISOR_APPS).some((uuid) => uuid === appUuid);
23-
}
24-
2521
/**
2622
* Check if the supervisor in the target state belongs to the known
2723
* supervisors

src/supervisor.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ import * as firewall from './lib/firewall';
1919
import * as constants from './lib/constants';
2020
import * as uname from './lib/uname';
2121

22-
// FIXME: remove when we release supervisor v19
23-
import * as servicesManager from './compose/service-manager';
24-
import * as supervisorMetadata from './lib/supervisor-metadata';
25-
2622
const startupConfigFields: config.ConfigKey[] = [
2723
'uuid',
2824
'listenPort',
@@ -36,42 +32,6 @@ const startupConfigFields: config.ConfigKey[] = [
3632
'legacyAppsPresent',
3733
];
3834

39-
// This function removes any `helios` overrides in order to restore
40-
// the supervisor functionality as the only service.
41-
//
42-
// - It removes the port/endpoint overrides
43-
// - It stops helios
44-
//
45-
// Returns true if the changes were applied
46-
//
47-
// FIXME: remove when we release supervisor v19
48-
async function recoverFromOverrides() {
49-
const { listenPortOverride, apiEndpointOverride } = await config.getMany([
50-
'listenPortOverride',
51-
'apiEndpointOverride',
52-
]);
53-
if (listenPortOverride != null || apiEndpointOverride != null) {
54-
// stop helios-api
55-
const [heliosApi] = (
56-
await servicesManager.getAll(`service-name=helios-api`)
57-
).filter(
58-
(svc) =>
59-
svc.appUuid != null && supervisorMetadata.isSupervisorApp(svc.appUuid),
60-
);
61-
if (heliosApi != null) {
62-
await servicesManager.kill(heliosApi, { wait: true });
63-
}
64-
65-
log.info('Removing supervisor overrides');
66-
await db.models('config').del().where({ key: 'listenPortOverride' });
67-
await db.models('config').del().where({ key: 'apiEndpointOverride' });
68-
69-
// terminate the process
70-
log.info('restarting');
71-
process.exit(1);
72-
}
73-
}
74-
7535
export class Supervisor {
7636
private api: SupervisorAPI;
7737

@@ -80,10 +40,6 @@ export class Supervisor {
8040

8141
await db.initialized();
8242
await config.initialized();
83-
84-
// FIXME: remove when we release supervisor v19
85-
await recoverFromOverrides();
86-
8743
await avahi.initialized();
8844
log.debug('Starting logging infrastructure');
8945
await logger.initialized();

0 commit comments

Comments
 (0)