Skip to content
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

feat(auto-salvage): v2 support #222

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

c3y1huang
Copy link
Contributor

Which issue(s) this PR fixes:

Issue longhorn/longhorn#8430

What this PR does / why we need it:

Skip creating lvol bdev for a new replica instance if it exists.

Special notes for your reviewer:

None

Additional documentation or context

None

@c3y1huang c3y1huang self-assigned this Sep 19, 2024
@c3y1huang c3y1huang force-pushed the 8430-feat-v2-auto-salvage branch 2 times, most recently from 4acf3c9 to 0d205b4 Compare September 23, 2024 08:30
Copy link

mergify bot commented Sep 24, 2024

This pull request is now in conflict. Could you fix it @c3y1huang? 🙏

@c3y1huang c3y1huang force-pushed the 8430-feat-v2-auto-salvage branch 4 times, most recently from b411222 to 80dd23b Compare September 27, 2024 03:20
go.mod Outdated
Comment on lines 7 to 9
replace github.com/longhorn/types => github.com/c3y1huang/types v0.0.0-20240927004343-3ad221f0cbfc

replace github.com/longhorn/go-common-libs => github.com/c3y1huang/go-common-libs v0.0.0-20240927004544-ee33d7bb917c
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update when dependency PRs are merged.

longhorn/longhorn-8430

Signed-off-by: Chin-Ya Huang <[email protected]>
longhorn/longhorn-8430

Signed-off-by: Chin-Ya Huang <[email protected]>
}

for replicaName := range e.ReplicaAddressMap {
if _, exist := salvageCandidates[replicaName]; !exist {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can replicaName not exist in salvageCandidates? This map has been populated by volumeHeadSizeToReplicaNames, which has been populated by ReplicaAddressMap.

Copy link

mergify bot commented Oct 12, 2024

This pull request is now in conflict. Could you fix it @c3y1huang? 🙏

@@ -206,7 +207,15 @@ func (e *Engine) Create(spdkClient *spdkclient.Client, replicaAddressMap map[str
e.ReplicaAddressMap = replicaAddressMap
e.log = e.log.WithField("replicaAddressMap", replicaAddressMap)

e.checkAndUpdateInfoFromReplicaNoLock()
if salvageRequested {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the engine need to try to connect all replicas before a salvage?
If NO, then the mode check inside updateInfoToFilterReplicaSalvageCandidates makes no sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants