@@ -19,10 +19,6 @@ import * as firewall from './lib/firewall';
1919import * as constants from './lib/constants' ;
2020import * 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-
2622const 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-
7535export 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