Unverified Commit b0732e01 authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Refactor integration test (step 3) - Azure blob mount robustness (#4894)

parent 91a68821
......@@ -155,16 +155,17 @@ export class AzureBlobSharedStorageService extends SharedStorageService {
return Promise.reject(errorMessage);
}
try {
this.log.debug(`Local mount command is: ${this.localMountCommand}`);
const result = await cpp.exec(this.localMountCommand);
if (result.stderr) {
throw new Error(result.stderr);
}
} catch (error) {
const errorMessage: string = `${this.storageType} Shared Storage: Mount ${this.storageAccountName}/${this.containerName} to ${this.localMountPoint} failed, error is ${error}`;
this.log.error(errorMessage);
return Promise.reject(errorMessage);
// FIXME: This has security risks. The command might contain secrets.
this.log.debug(`Local mount command is: ${this.localMountCommand}`);
const result = await cpp.exec(this.localMountCommand);
if (result.stderr) {
// FIXME: I don't know how to check whether it failed.
// But looking at stderr definitely isn't a good idea.
this.log.warning(
`${this.storageType} Shared Storage: Mount ${this.storageAccountName}/${this.containerName} to ${this.localMountPoint}. Stderr is not empty.`
);
this.log.warning(`Stdout: ${result.stdout}`);
this.log.warning(`Stderr: ${result.stderr}`);
}
return Promise.resolve();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment