diff --git a/dist/f5-cloud-libs.tar.gz b/dist/f5-cloud-libs.tar.gz index e81e6b3c..4ec6ed76 100644 Binary files a/dist/f5-cloud-libs.tar.gz and b/dist/f5-cloud-libs.tar.gz differ diff --git a/dist/verifyHash b/dist/verifyHash index 5e5aa9c2..a1f2532e 100644 --- a/dist/verifyHash +++ b/dist/verifyHash @@ -1,7 +1,7 @@ cli script /Common/verifyHash { proc script::run {} { if {[catch { - set hashes(f5-cloud-libs.tar.gz) afcd5165f47a538ace25374fdc26f8992fe6b7dbce00d8736dce95786ce0daa06cfce8ca3d8bb5116f291f01105d95e5aa96d5dcf624a568185c656113079298 + set hashes(f5-cloud-libs.tar.gz) f4e30dd04f065daa2d9f0adab38a91d1164cd483783542da41f5a0cf017588580b352983e5283bf1cdc963cb20e6f6c84f76e84c0ce298aafbcd9256ba3e185d set hashes(f5-cloud-libs-aws.tar.gz) e06f724ff1c7fc41d95ef87fc6f7a118d7e64d5555b5e9548ee7582bc3eb8d461ca72266a0758837a951ccd465876c877329fe8a47b38da5183c832680b76b93 set hashes(f5-cloud-libs-azure.tar.gz) f1a5e8cfc639063885b595282cb5befdaf88d51ef62bd26e3658e2f3f3b5bbbb2ce0ba54ec1cd12ba87a2336134588affe63052511f7c6c93fb7fc73b8a0e095 set hashes(f5-cloud-libs-gce.tar.gz) 66072a397912a2f64ef74f2bb3fcc51c2ca90002d7df67534cf1ace031251d0a2d08f5efb492fa3c46718c65fb24234d2c863dd457e1d300b41dd6f82aca9849 diff --git a/lib/autoscaleProvider.js b/lib/autoscaleProvider.js index c3eb180a..37e8549c 100644 --- a/lib/autoscaleProvider.js +++ b/lib/autoscaleProvider.js @@ -480,7 +480,7 @@ AutoscaleProvider.prototype.putInstance = function putInstance(instanceId, insta * * @abstract * - * @param {String} actionId - Action id of message to send + * @param {String} action - Action id of message to send * @param {Object} [options] - Optional parameters * @param {String} [options.toInstanceId] - Instance ID that message is for * @param {String} [options.fromInstanceId] - Instance ID that message is from @@ -489,9 +489,9 @@ AutoscaleProvider.prototype.putInstance = function putInstance(instanceId, insta * @returns {Promise} A promise which will be resolved when the message * has been sent or rejected if an error occurs */ -AutoscaleProvider.prototype.sendMessage = function sendMessage(actionId, data) { +AutoscaleProvider.prototype.sendMessage = function sendMessage(action, data) { if (this.hasFeature(AutoscaleProvider.FEATURE_MESSAGING)) { - throw new Error('Unimplemented abstract method AutoscaleProvider.sendMessage', actionId, data); + throw new Error('Unimplemented abstract method AutoscaleProvider.sendMessage', action, data); } else { this.logger.debug('No override for AutoscaleProvider.sendMessage'); return q(true); diff --git a/scripts/autoscale.js b/scripts/autoscale.js index bf8595e0..0065506e 100644 --- a/scripts/autoscale.js +++ b/scripts/autoscale.js @@ -313,9 +313,6 @@ const commonOptions = require('./commonOptions'); util.logAndExit('Currently becoming master. Exiting.', 'info'); } - return asProvider.putInstance(this.instanceId, this.instance); - }) - .then(() => { if (optionsForTest.bigIp) { bigIp = optionsForTest.bigIp; return q(); @@ -334,6 +331,20 @@ const commonOptions = require('./commonOptions'); } ); }) + .then(() => { + // Make sure we have our own hostname + if (!this.instance.hostname) { + return bigIp.list('/tm/sys/global-settings'); + } + return q(); + }) + .then((globalSettings) => { + if (globalSettings) { + this.instance.hostname = globalSettings.hostname; + } + + return asProvider.putInstance(this.instanceId, this.instance); + }) .then(() => { return asProvider.bigIpReady(); })