Skip to content

Commit

Permalink
fix: r/vsphere_nas_datastore not mounted to additional hosts as day-t…
Browse files Browse the repository at this point in the history
…wo (#1860)

Fix a bug in nasDatastoreMountProcessor.diff() method which was the root cause of #1589
  • Loading branch information
stoyan-hristov authored Mar 28, 2023
1 parent fa2f3fa commit e5278a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vsphere/nas_datastore_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ func (p *nasDatastoreMountProcessor) diffNewOld() []string {

// diff is what diffOldNew and diffNewOld hand off to.
func (p *nasDatastoreMountProcessor) diff(a, b []string) []string {
var found bool
c := make([]string, 0)
for _, v1 := range a {
found := false
for _, v2 := range b {
if v1 == v2 {
found = true
break
}
}
if !found {
Expand Down

0 comments on commit e5278a0

Please sign in to comment.