fix: at least two snapshots were needed to start replication

This commit is contained in:
Anton Schirg 2018-08-30 17:50:43 +02:00
parent 32391adf4f
commit f387e23214
2 changed files with 1 additions and 2 deletions

View File

@ -211,7 +211,7 @@ func statePlanning(ctx context.Context, sender Sender, receiver Receiver, u upda
return handlePlanningError(err)
}
if len(sfsvs) <= 1 {
if len(sfsvs) < 1 {
err := errors.New("sender does not have any versions")
log.Error(err.Error())
q.Add(fsrep.NewReplicationWithPermanentError(fs.Path, err))

View File

@ -87,7 +87,6 @@ type FilesystemVersionFilter interface {
Filter(t VersionType, name string) (accept bool, err error)
}
//FIXME Seems to always forget first snapshot
func ZFSListFilesystemVersions(fs *DatasetPath, filter FilesystemVersionFilter) (res []FilesystemVersion, err error) {
listResults := make(chan ZFSListResult)