Skip to content

Commit 3e1b2a6

Browse files
authored
Merge pull request #9185 from jackyalbo/jacky_nodes_monitor
Removing node decommission/recommission
2 parents 8592e21 + 0c315d6 commit 3e1b2a6

File tree

15 files changed

+13
-1068
lines changed

15 files changed

+13
-1068
lines changed

src/agent/agent.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ class Agent {
163163
'test_network_perf_to_peer',
164164
'collect_diagnostics',
165165
'set_debug_node',
166-
'decommission',
167-
'recommission',
168-
'uninstall',
169166
'update_node_service'
170167
]);
171168

@@ -721,11 +718,6 @@ class Agent {
721718

722719
update_node_service(req) {
723720
this.location_info = req.rpc_params.location_info;
724-
if (req.rpc_params.enabled) {
725-
return this._enable_service();
726-
} else {
727-
return this._disable_service();
728-
}
729721
}
730722

731723
_disable_service() {
@@ -1063,19 +1055,6 @@ class Agent {
10631055
}
10641056
}
10651057

1066-
uninstall() {
1067-
return P.resolve()
1068-
.then(() => {
1069-
const dbg = this.dbg;
1070-
dbg.log1('Received uninstall req');
1071-
if (os_utils.IS_MAC) return;
1072-
P.delay(30 * 1000) // this._disable_service()
1073-
.then(() => {
1074-
this.send_message_and_exit('UNINSTALL', 85); // 85 is 'U' in ascii
1075-
});
1076-
});
1077-
}
1078-
10791058
async send_message_and_exit(message_code, exit_code) {
10801059
const dbg = this.dbg;
10811060
// if we have an open ipc channel than send the message. otherwise exit

src/api/agent_api.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,8 @@ module.exports = {
195195
method: 'POST',
196196
params: {
197197
type: 'object',
198-
required: ['enabled', 'location_info'],
198+
required: ['location_info'],
199199
properties: {
200-
enabled: {
201-
type: 'boolean'
202-
},
203200
location_info: {
204201
$ref: 'common_api#/definitions/location_info'
205202
}
@@ -283,9 +280,6 @@ module.exports = {
283280
}
284281
},
285282

286-
uninstall: {
287-
method: 'DELETE',
288-
},
289283

290284
},
291285

src/api/host_api.js

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -105,45 +105,6 @@ module.exports = {
105105
}
106106
},
107107

108-
update_host_services: {
109-
method: 'POST',
110-
params: {
111-
type: 'object',
112-
required: ['name'],
113-
properties: {
114-
name: {
115-
type: 'string'
116-
},
117-
services: {
118-
type: 'object',
119-
properties: {
120-
storage: {
121-
type: 'boolean'
122-
}
123-
}
124-
},
125-
nodes: {
126-
type: 'array',
127-
items: {
128-
type: 'object',
129-
required: ['name', 'enabled'],
130-
properties: {
131-
name: {
132-
type: 'string',
133-
},
134-
enabled: {
135-
type: 'boolean'
136-
}
137-
}
138-
}
139-
}
140-
}
141-
},
142-
auth: {
143-
system: 'admin'
144-
}
145-
},
146-
147108
get_test_hosts: {
148109
method: 'GET',
149110
params: {
@@ -413,8 +374,6 @@ module.exports = {
413374
enum: [
414375
'OFFLINE',
415376
'DELETING',
416-
'DECOMMISSIONED',
417-
'DECOMMISSIONING',
418377
'UNTRUSTED',
419378
'STORAGE_NOT_EXIST',
420379
'IO_ERRORS',
@@ -430,7 +389,6 @@ module.exports = {
430389
'SOME_STORAGE_OFFLINE',
431390
'SOME_STORAGE_IO_ERRORS',
432391
'SOME_STORAGE_NOT_EXIST',
433-
'SOME_STORAGE_DECOMMISSIONING',
434392
'SOME_STORAGE_INITIALIZING',
435393
'SOME_STORAGE_MIGRATING',
436394
]
@@ -442,8 +400,6 @@ module.exports = {
442400
'OFFLINE',
443401
'DELETING',
444402
'STORAGE_OFFLINE',
445-
'DECOMMISSIONED',
446-
'DECOMMISSIONING',
447403
'IO_ERRORS',
448404
'UNTRUSTED',
449405
'STORAGE_NOT_EXIST',
@@ -459,7 +415,6 @@ module.exports = {
459415
'SOME_STORAGE_OFFLINE',
460416
'SOME_STORAGE_IO_ERRORS',
461417
'SOME_STORAGE_NOT_EXIST',
462-
'SOME_STORAGE_DECOMMISSIONING',
463418
'SOME_STORAGE_INITIALIZING',
464419
'SOME_STORAGE_MIGRATING',
465420
'HAS_ERRORS',
@@ -535,12 +490,6 @@ module.exports = {
535490
STORAGE_OFFLINE: {
536491
type: 'integer'
537492
},
538-
DECOMMISSIONED: {
539-
type: 'integer'
540-
},
541-
DECOMMISSIONING: {
542-
type: 'integer'
543-
},
544493
UNTRUSTED: {
545494
type: 'integer'
546495
},
@@ -586,9 +535,6 @@ module.exports = {
586535
SOME_STORAGE_NOT_EXIST: {
587536
type: 'integer'
588537
},
589-
SOME_STORAGE_DECOMMISSIONING: {
590-
type: 'integer'
591-
},
592538
SOME_STORAGE_INITIALIZING: {
593539
type: 'integer'
594540
},

src/api/node_api.js

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,6 @@ module.exports = {
8383
}
8484
},
8585

86-
decommission_node: {
87-
method: 'DELETE',
88-
params: {
89-
$ref: '#/definitions/node_identity'
90-
},
91-
auth: {
92-
system: 'admin'
93-
}
94-
},
95-
96-
recommission_node: {
97-
method: 'DELETE',
98-
params: {
99-
$ref: '#/definitions/node_identity'
100-
},
101-
auth: {
102-
system: 'admin'
103-
}
104-
},
105-
10686
delete_node: {
10787
method: 'DELETE',
10888
params: {
@@ -563,12 +543,6 @@ module.exports = {
563543
migrating_to_pool: {
564544
idate: true
565545
},
566-
decommissioning: {
567-
idate: true
568-
},
569-
decommissioned: {
570-
idate: true
571-
},
572546
deleting: {
573547
idate: true
574548
},
@@ -645,8 +619,6 @@ module.exports = {
645619
'DELETED',
646620
'STORAGE_NOT_EXIST',
647621
'AUTH_FAILED',
648-
'DECOMMISSIONED',
649-
'DECOMMISSIONING',
650622
'MIGRATING',
651623
'N2N_ERRORS',
652624
'N2N_PORTS_BLOCKED',
@@ -677,12 +649,6 @@ module.exports = {
677649
DELETED: {
678650
type: 'integer'
679651
},
680-
DECOMMISSIONED: {
681-
type: 'integer'
682-
},
683-
DECOMMISSIONING: {
684-
type: 'integer'
685-
},
686652
MIGRATING: {
687653
type: 'integer'
688654
},
@@ -785,12 +751,6 @@ module.exports = {
785751
migrating_to_pool: {
786752
type: 'boolean'
787753
},
788-
decommissioning: {
789-
type: 'boolean',
790-
},
791-
decommissioned: {
792-
type: 'boolean',
793-
},
794754
deleting: {
795755
type: 'boolean',
796756
},
@@ -931,7 +891,6 @@ module.exports = {
931891
enum: [
932892
'RESTORING', // offline
933893
'MIGRATING', // assign_nodes
934-
'DECOMMISSIONING', // decommission_node
935894
'DELETING', // delete_node
936895
]
937896
},

src/server/node_services/host_server.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ function set_debug_host(req) {
6464
return nodes_server.get_local_monitor().set_debug_host(req);
6565
}
6666

67-
async function update_host_services(req) {
68-
const monitor = nodes_server.get_local_monitor();
69-
await monitor.update_nodes_services(req);
70-
}
71-
7267
function diagnose_host(req) {
7368
const { name } = req.rpc_params;
7469
const monitor = nodes_server.get_local_monitor();
@@ -118,6 +113,5 @@ exports.hide_host = hide_host;
118113
exports.get_test_hosts = get_test_hosts;
119114
exports.test_host_network = test_host_network;
120115
exports.set_debug_host = set_debug_host;
121-
exports.update_host_services = update_host_services;
122116
exports.list_hosts = list_hosts;
123117
exports.diagnose_host = diagnose_host;

src/server/node_services/node_schema.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@ module.exports = {
110110
migrating_to_pool: {
111111
idate: true
112112
},
113-
decommissioning: {
114-
idate: true
115-
},
116-
decommissioned: {
117-
idate: true
118-
},
119113
deleting: {
120114
idate: true
121115
},

src/server/node_services/node_server.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ exports.start_monitor = start_monitor;
114114
exports.test_node_id = req => monitor.test_node_id(req);
115115
exports.heartbeat = req => monitor.heartbeat(req);
116116
exports.read_node = req => monitor.read_node(req.rpc_params);
117-
exports.decommission_node = req => monitor.decommission_node(req);
118-
exports.recommission_node = req => monitor.recommission_node(req);
119117
exports.delete_node = req => monitor.delete_node(req.rpc_params);
120118
exports.list_nodes = list_nodes;
121119
exports.aggregate_nodes = aggregate_nodes;

0 commit comments

Comments
 (0)