Skip to content

Commit

Permalink
test_nsfs_cephs3: Add uid and gid to manage_nsfs cmd
Browse files Browse the repository at this point in the history
1. Add uid and gid to manage_nsfs cmd in standalone_depoly_nsfs
2. copy data instead of symlink

Signed-off-by: Vinayakswami Hariharmath <[email protected]>
  • Loading branch information
vh05 committed Nov 29, 2023
1 parent b741676 commit 45cd97f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/cmd/manage_nsfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ async function add_account_config_file(data, accounts_path, access_keys_path, co
data = JSON.stringify(data);
await native_fs_utils.create_config_file(fs_context, accounts_path, full_account_config_path, data);
await native_fs_utils._create_path(access_keys_path, fs_context);
await nb_native().fs.symlink(fs_context, full_account_config_path, full_account_config_access_key_path);
//await nb_native().fs.symlink(fs_context, full_account_config_path, full_account_config_access_key_path);
await copy_config_data_to_path(full_account_config_path, full_account_config_access_key_path);
}

async function update_account_config_file(data, accounts_path, access_keys_path, config_root_backend) {
Expand Down Expand Up @@ -592,6 +593,10 @@ async function get_config_data(config_file_path) {
return resources;
}

async function copy_config_data_to_path(source, dest) {
const data = await fs.promises.readFile(source);
await fs.promises.writeFile(dest, data.toString());
}
/**
* get_view_config_data will read a config file and return its content ready to be printed
* @param {fs.PathLike} config_file_path
Expand Down
4 changes: 2 additions & 2 deletions src/deploy/NVA_build/standalone_deploy_nsfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function execute() {

function main() {
# Add accounts to run ceph tests
execute "node src/cmd/manage_nsfs account add --config_root ./standalone/config_root --name cephalt --email [email protected] --new_buckets_path ./standalone/nsfs_root --access_key abcd --secret_key abcd" nsfs_cephalt.log
execute "node src/cmd/manage_nsfs account add --config_root ./standalone/config_root --name cephtenant --email [email protected] --new_buckets_path ./standalone/nsfs_root --access_key efgh --secret_key efgh" nsfs_cephtenant.log
execute "node src/cmd/manage_nsfs account add --config_root ./standalone/config_root --name cephalt --email [email protected] --new_buckets_path ./standalone/nsfs_root --access_key abcd --secret_key abcd --uid 10001 --gid 0" nsfs_cephalt.log
execute "node src/cmd/manage_nsfs account add --config_root ./standalone/config_root --name cephtenant --email [email protected] --new_buckets_path ./standalone/nsfs_root --access_key efgh --secret_key efgh --uid 10001 --gid 0" nsfs_cephtenant.log
# Start nsfs server
execute "node src/cmd/nsfs --config_root ./standalone/config_root" nsfs.log
# Wait for sometime to process to start
Expand Down

0 comments on commit 45cd97f

Please sign in to comment.