Skip to content

Commit

Permalink
TRITON-2112 update sdc-events to exclude virtual servers (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
twhiteman authored Apr 20, 2020
1 parent 0460343 commit c898e7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# sdc (SDC ops core zone) Changelog

## 1.8.6

- TRITON-2112 update sdc-events to exclude virtual servers

## 1.8.5

- TRITON-2111 update sdc-events to include volapi logs
Expand Down
7 changes: 5 additions & 2 deletions lib/sdc-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,12 @@ function main() {
},

function getNodes(ctx, next) {
CNAPI.listServers(function (err, servers) {
CNAPI.listServers({extras: 'sysinfo'}, function (err, servers) {
ctx.nodes = servers.filter(function (server) {
return server.status === 'running' && server.setup;
var isVirtualServer = server.sysinfo &&
server.sysinfo['System Type'] === 'Virtual';
return server.status === 'running' && server.setup &&
!isVirtualServer;
});
ctx.nodeFromUuid = [];
ctx.nodeFromHostname = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sdc",
"description": "SmartDataCenter 'sdc' zone to hold ops/admin tools",
"version": "1.8.5",
"version": "1.8.6",
"author": "Joyent (joyent.com)",
"private": true,
"dependencies": {
Expand Down

0 comments on commit c898e7b

Please sign in to comment.