Created
September 18, 2018 17:28
-
-
Save kusor/47bd8b6b06d6f62443cd48d0c85990cb to your computer and use it in GitHub Desktop.
Patch sdcadm to know why an instance hasn't got a known associated server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/sdcadm.js b/lib/sdcadm.js | |
index 156d743..e797d28 100644 | |
--- a/lib/sdcadm.js | |
+++ b/lib/sdcadm.js | |
@@ -2307,7 +2307,11 @@ SdcAdm.prototype.genUpdatePlan = function genUpdatePlan(options, cb) { | |
function checkMinPlatform(ins, chg) { | |
if (ins.service === chg.service.name) { | |
server = serverFromUuidOrHostname[ins.server]; | |
+ if (!server) { | |
+ progress('Unknown server for instance: '); | |
+ console.log(util.inspect(ins, false, 8, true)); | |
+ } | |
- if (server.current_platform < | |
+ if (server && server.current_platform < | |
self.config.vmMinPlatform) { | |
errs.push(new errors.UpdateError(format( | |
'insufficient platform for service "%s" ' + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment