Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes to md_blow #8578

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading