Skip to content

Commit bc9094c

Browse files
authored
Merge pull request #1561 from BernardMC/fix/session-manager-not-getting-tags
Fix: Tags client not returning tags when session manager is used
2 parents 982f5fc + 95a7950 commit bc9094c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/common/connectionmanager/zones.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func withTagsClient(ctx context.Context, connection *vclib.VSphereConnection, f
294294
c := rest.NewClient(connection.Client)
295295
if connection.SessionManagerURL != "" {
296296
c.SessionID(connection.Client.SessionCookie().Value)
297-
return nil
297+
return f(c)
298298
}
299299

300300
signer, err := connection.Signer(ctx, connection.Client)
@@ -312,11 +312,6 @@ func withTagsClient(ctx context.Context, connection *vclib.VSphereConnection, f
312312
}
313313

314314
defer func() {
315-
// When using shared session manager we don't need to logout
316-
if connection.SessionManagerURL != "" {
317-
return
318-
}
319-
320315
if err := c.Logout(ctx); err != nil {
321316
klog.Errorf("failed to logout: %v", err)
322317
}

0 commit comments

Comments
 (0)