Skip to content

Commit

Permalink
TRITON-1707 sdcadm post-setup prometheus breaks if CNS allow_transf…
Browse files Browse the repository at this point in the history
…er metadata does not exist yet

Reviewed by: Trent Mick <trentm@gmail.com>
Reviewed by: Pedro Palazón Candel <pedro@joyent.com>
Approved by: Pedro Palazón Candel <pedro@joyent.com>
  • Loading branch information
Isaac Davis committed May 28, 2019
1 parent c49d4be commit c877492
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Expand Up @@ -10,6 +10,11 @@

# sdcadm Changelog

## 1.27.3

- TRITON-1707 `sdcadm post-setup prometheus` breaks if CNS allow\_transfer
metadata does not exist yet

## 1.27.2

- TRITON-1706 'sdcadm post-setup dev-sample-data' will now ensure that sample
Expand Down
4 changes: 3 additions & 1 deletion lib/procedures/add-allow-transfer.js
Expand Up @@ -180,7 +180,9 @@ AddAllowTransferProcedure.prototype.execute =
return;
}

const existingIps = self.cnsSvc.metadata.allow_transfer;
const allow_transfer = self.cnsSvc.metadata.allow_transfer;
const existingIps =
allow_transfer === undefined ? [] : allow_transfer;
const updatedIps = existingIps.concat(self.newIps);
sapi.updateService(self.cnsSvc.uuid, {
metadata: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "sdcadm",
"description": "Administer a Triton Data Center",
"version": "1.27.2",
"version": "1.27.3",
"author": "Joyent (joyent.com)",
"private": true,
"dependencies": {
Expand Down

0 comments on commit c877492

Please sign in to comment.