Skip to content

Commit

Permalink
Merge pull request #8578 from jackyalbo/jacky_fix
Browse files Browse the repository at this point in the history
Minor fixes to md_blow
  • Loading branch information
jackyalbo authored Dec 4, 2024
2 parents 10ac364 + da6d28c commit b53e772
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tools/md_blow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit b53e772

Please sign in to comment.