-
Notifications
You must be signed in to change notification settings - Fork 82
Snapshot auto mount bricks on glusterd restart #1053
Conversation
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
glusterd2/volume/fs_utils.go
Outdated
} | ||
|
||
if err := unix.Setxattr(brickinfo.Path, volumeIDXattrKey, vol.ID, 0); err != nil { | ||
log.WithFields(log.Fields{"error": err.Error(), |
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.
Its better to log error using WithError. log.WithError(err).WithFields...
return errors.New("volume size should provide to perform auto create") | ||
} | ||
|
||
if !req.SelfProvision && len(req.Subvols) <= 0 { |
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.
question:
what happens if I request for SelfProvision= true
and req.Subvols
length greater than zero
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.
Since you requested for smartvol, given bricks should omit or we should have the capability of having both. But I will let @aravindavk answer the question as it is not specific to this PR.
5980ac8
to
d6f5e8d
Compare
25def30
to
64ac57a
Compare
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
This PR contains lot of changes related to Snapshot restore, clean bricks refactor and other refactors. Please split the PRs in future when sending independent features in single PR
96e6ba5
to
39caf2b
Compare
Snapshot bricks are provisoned by glusterd. During a glusterd restart, we should check for brick mounts for activated snapshots. Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
During a snapshot restore, we need to delete the parent lv's if it is auto provisioned or snapshot provisioned Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
39caf2b
to
626ea49
Compare
I see the review comments are addressed. I will merge this PR |
Snapshot bricks should automatically mount upon a glusterd restart. Especially after glusterd restart, mount won't be existing on the machine. This PR will mount the snapshot bricks during a glusterd restart.