You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"DirectPath is misconfigured. The DirectPath XDS option was set, but the attemptDirectPath option was not. Please set both the attemptDirectPath and attemptDirectPathXds options.");
465
-
}
466
-
} else {
467
-
// Case 3: credential is not correctly set
468
-
if (!isCredentialDirectPathCompatible()) {
469
-
LOG.log(
470
-
Level.WARNING,
471
-
"DirectPath is misconfigured. Please make sure the credential is an instance of "
472
-
+ ComputeEngineCredentials.class.getName()
473
-
+ " .");
474
-
}
475
-
// Case 4: not running on GCE
476
-
if (!isOnComputeEngine()) {
477
-
LOG.log(
478
-
Level.WARNING,
479
-
"DirectPath is misconfigured. DirectPath is only available in a GCE environment.");
480
-
}
444
+
if (!isDirectPathXdsEnabled() || !isOnComputeEngine()) {
445
+
return;
446
+
}
447
+
448
+
if (!isDirectPathEnabled()) {
449
+
// This misconfiguration occurs when Direct Path xDS is enabled, but Direct Path is not
450
+
// Direct Path xDS can be enabled two ways: via environment variable or via builder.
451
+
// Case 1: Direct Path is only enabled via xDS env var. We will _warn_ the user that this is
452
+
// a misconfiguration if they intended to set the env var.
453
+
if (isDirectPathXdsEnabledViaEnv()) {
454
+
LOG.log(
455
+
Level.WARNING,
456
+
"Env var "
457
+
+ DIRECT_PATH_ENV_ENABLE_XDS
458
+
+ " was found and set to TRUE, but DirectPath was not enabled for this client. If this is intended for "
459
+
+ "this client, please note that this is a misconfiguration and set the attemptDirectPath option as well.");
460
+
}
461
+
// Case 2: Direct Path xDS was enabled via Builder. Direct Path Traffic Director must be set
462
+
// (enabled with `setAttemptDirectPath(true)`) along with xDS.
"DirectPath is misconfigured. The DirectPath XDS option was set, but the attemptDirectPath option was not. Please set both the attemptDirectPath and attemptDirectPathXds options.");
468
+
}
469
+
} else {
470
+
// Case 3: credential is not correctly set
471
+
if (!isCredentialDirectPathCompatible()) {
472
+
LOG.log(
473
+
Level.WARNING,
474
+
"DirectPath is misconfigured. Please make sure the credential is an instance of "
"DirectPath is misconfigured. The DirectPath XDS option was set, but the attemptDirectPath option was not. Please set both the attemptDirectPath and attemptDirectPathXds options.");
659
+
660
+
if (InstantiatingGrpcChannelProvider.isOnComputeEngine()) {
661
+
assertThat(logHandler.getAllMessages())
662
+
.contains(
663
+
"DirectPath is misconfigured. The DirectPath XDS option was set, but the attemptDirectPath option was not. Please set both the attemptDirectPath and attemptDirectPathXds options.");
0 commit comments