From da6d28ce54a9dea657ec59dd8b1603b275eb3985 Mon Sep 17 00:00:00 2001 From: jackyalbo Date: Wed, 4 Dec 2024 17:25:24 +0200 Subject: [PATCH] minor fixes to md_blow Signed-off-by: jackyalbo --- src/tools/md_blow.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tools/md_blow.js b/src/tools/md_blow.js index 6a39005b3c..ab50977706 100644 --- a/src/tools/md_blow.js +++ b/src/tools/md_blow.js @@ -7,22 +7,23 @@ const crypto = require('crypto'); const P = require('../util/promise'); const api = require('../api'); const dbg = require('../util/debug_module')(__filename); -const system_store = require('../server/system_services/system_store').get_instance(); +const system_store = require('../server/system_services/system_store').get_instance({ standalone: true }); const node_allocator = require('../server/node_services/node_allocator'); const db_client = require('../util/db_client'); const rpc = api.new_rpc(); const client = rpc.new_client(); -argv.email = argv.email || 'demo@noobaa.com'; +argv.email = argv.email || 'admin@noobaa.io'; argv.password = argv.password || 'DeMo1'; -argv.system = argv.system || 'demo'; +argv.system = argv.system || 'noobaa'; argv.bucket = argv.bucket || 'first.bucket'; argv.count = argv.count || 100; argv.chunks = argv.chunks || 128; argv.chunk_size = argv.chunk_size || 1024 * 1024; argv.concur = argv.concur || 20; argv.key = argv.key || ('md_blow-' + Date.now().toString(36)); +argv.pool = argv.pool || 'noobaa-default-backing-store'; main(); @@ -79,7 +80,7 @@ async function blow_parts(params) { const [record] = bucket.tiering.tiers; const tier = await client.tier.read_tier({ name: record.tier }); const tier_db = _.find(system_store.data.tiers, t => (t.name.unwrap() === tier.name.unwrap())); - const pool_db = system_store.data.pools[0]; + const pool_db = _.find(system_store.data.pools, p => (p.name === argv.pool)); await node_allocator.refresh_pool_alloc(pool_db); const node = node_allocator.allocate_node({ pools: [pool_db]