-
Notifications
You must be signed in to change notification settings - Fork 69
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
fix(cspi): import pool without cachefile #77
Conversation
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
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.
Lgtn
go.mod needs to be updated once PR got merged openebs-archive/api#48 |
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
echo "cache file is not present in persistent path" | ||
exit 1 | ||
fi | ||
|
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.
Awesome job for adding this to ci. ❤️
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.
changes are good.
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
cmdOut, err = zfs.NewPoolImport(). | ||
WithCachefile(cacheFile). |
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.
@kmova @sonasingh46 Removed -c cachefile
option in the import command for sparse based pool. While building the command directory option will be ignored if cachefile is set.
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.
As discussed -- let us make the workflow :
- Cache file import
- Then, directory-based import if above fails
For all the pool type -- whether be sparse or disk.
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.
pushed the changes!! Verifying the same
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.
Changes look good.
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
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.
lgtm
* fix(cspi): fix the import pool bug This commits fixes a bug due to which pool import was failing in case of pool manager pod restarts. Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu sai.chaithanya@mayadata.io
This PR will try to import the pool without the cache file as a last option.
It will import the pool in the following ways:
zpool import -c cachefile=<cache_file> -o cachefile=<cache_file> <pool_name>
zpool import -o cachefile=<cache_file> -d <parent_directory_of_sparse_file> <pool_name>
zpool import -o cachefile=<cache_file> <pool_name>
(By default it will scan /dev directory).Impact to users:
NOTE: