Merge branch '2.3' into 2.4
This commit is contained in:
@ -273,9 +273,29 @@ exports.builder = function(yargs) {
|
|||||||
promises.push(doAsyncRequest(host, i + '/' + j.id, null, {method: 'PATCH', body: {data: j}}))
|
promises.push(doAsyncRequest(host, i + '/' + j.id, null, {method: 'PATCH', body: {data: j}}))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (src['maxscale']) {
|
||||||
|
// TODO: Don't filter the altered parameters on the client side. The REST
|
||||||
|
// API should ignore no-op changes.
|
||||||
|
src['maxscale'].data.attributes.parameters = _.pick(
|
||||||
|
src['maxscale'].data.attributes.parameters,
|
||||||
|
['auth_connect_timeout',
|
||||||
|
'auth_read_timeout',
|
||||||
|
'auth_write_timeout',
|
||||||
|
'admin_auth',
|
||||||
|
'admin_log_auth_failures',
|
||||||
|
'passive',
|
||||||
|
'ms_timestamp',
|
||||||
|
'skip_permission_checks',
|
||||||
|
'query_retries',
|
||||||
|
'query_retry_timeout',
|
||||||
|
'retain_last_statements',
|
||||||
|
'dump_last_statements'])
|
||||||
|
}
|
||||||
|
|
||||||
// Do the same for individual resources
|
// Do the same for individual resources
|
||||||
endpoints.forEach(function(i) {
|
endpoints.forEach(function(i) {
|
||||||
promises.push(doAsyncRequest(host, i, null, {method: 'PATCH', body: dest[i]}))
|
promises.push(doAsyncRequest(host, i, null, {method: 'PATCH', body: src[i]}))
|
||||||
})
|
})
|
||||||
return Promise.all(promises)
|
return Promise.all(promises)
|
||||||
})
|
})
|
||||||
|
@ -156,6 +156,15 @@ describe('Cluster Command Internals', function() {
|
|||||||
describe('Cluster Sync', function() {
|
describe('Cluster Sync', function() {
|
||||||
before(startDoubleMaxScale)
|
before(startDoubleMaxScale)
|
||||||
|
|
||||||
|
it('sync global options', function() {
|
||||||
|
return doCommand('alter maxscale auth_connect_timeout 1234 --hosts ' + secondary_host)
|
||||||
|
.then(() => verifyCommand('cluster sync ' + secondary_host + ' --hosts ' + primary_host,
|
||||||
|
'maxscale'))
|
||||||
|
.then(function(res) {
|
||||||
|
res.data.attributes.parameters.auth_connect_timeout.should.equal(1234)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
it('sync after server creation', function() {
|
it('sync after server creation', function() {
|
||||||
return doCommand('create server server5 127.0.0.1 3003 --hosts ' + secondary_host)
|
return doCommand('create server server5 127.0.0.1 3003 --hosts ' + secondary_host)
|
||||||
.then(() => verifyCommand('cluster sync ' + secondary_host + ' --hosts ' + primary_host,
|
.then(() => verifyCommand('cluster sync ' + secondary_host + ' --hosts ' + primary_host,
|
||||||
|
Reference in New Issue
Block a user