-
Notifications
You must be signed in to change notification settings - Fork 2
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
NVMe Command constant needs to use full path #53
Conversation
143c850
to
12068f9
Compare
gonvme_tcp_fc.go
Outdated
if nvme.getChrootDirectory() != "/" { | ||
command = append([]string{"chroot", nvme.getChrootDirectory()}, "which", DefaultNVMeCommand) | ||
} else { | ||
command = []string{"which", DefaultNVMeCommand} | ||
} | ||
log.Infof("NVMe %s",command) | ||
path, err := exec.Command(command[0], command[1:]...).Output() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not solve the original problem reported in the GitHub issue. You are still at the mercy of finding the command from the PATH. My interpretation of the original issue is to hard code the path to the nvme command. You could instead try some well known paths, e.g. [/bin/nvme, /usr/bin/nvme, ...] and pick the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donatwork as discussed yesterday, we tried checking the different possible paths as its updated in commits, but its not working as expected as it checks the path locally and throws path does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donatwork as discussed code changes done with list of paths now and updated in the PR.
a2ded98
to
95be92c
Compare
9ac0de6
to
37b96bf
Compare
Will add Single PR for Both defect fix and UT coverage |
Description
NVMeCommand constant needs to use full path
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Image build pointing to gonvme branch and installed powerstore driver and ran basic scale testing
UTs added and now coverage increased from 20% to 21.3%
UTS covered under this PR: #54, once this is merged, will merge present PR.