diff options
75 files changed, 247 insertions, 120 deletions
diff --git a/client/go/auth0/auth0.go b/client/go/auth0/auth0.go index 52a1997d957..c09f2d4a515 100644 --- a/client/go/auth0/auth0.go +++ b/client/go/auth0/auth0.go @@ -37,8 +37,8 @@ type providers struct { } type config struct { - Version int `json:"version"` - Systems map[string]System `json:"systems"` + Version int `json:"version"` + Systems map[string]*System `json:"systems"` } type System struct { @@ -140,19 +140,19 @@ func (a *Auth0) IsLoggedIn() bool { // The System access token needs a refresh if: // 1. the System scopes are different from the currently required scopes - (auth0 changes). // 2. the access token is expired. -func (a *Auth0) PrepareSystem(ctx context.Context) (System, error) { +func (a *Auth0) PrepareSystem(ctx context.Context) (*System, error) { if err := a.init(); err != nil { - return System{}, err + return nil, err } s, err := a.getSystem() if err != nil { - return System{}, err + return nil, err } if s.AccessToken == "" || scopesChanged(s) { s, err = RunLogin(ctx, a, true) if err != nil { - return System{}, err + return nil, err } } else if isExpired(s.ExpiresAt, accessTokenExpThreshold) { // check if the stored access token is expired: @@ -167,9 +167,10 @@ func (a *Auth0) PrepareSystem(ctx context.Context) (System, error) { if err != nil { // ask and guide the user through the login process: fmt.Println(fmt.Errorf("failed to renew access token, %s", err)) + fmt.Print("\n") s, err = RunLogin(ctx, a, true) if err != nil { - return System{}, err + return nil, err } } else { // persist the updated system with renewed access token @@ -180,7 +181,7 @@ func (a *Auth0) PrepareSystem(ctx context.Context) (System, error) { err = a.AddSystem(s) if err != nil { - return System{}, err + return nil, err } } } @@ -195,7 +196,7 @@ func isExpired(t time.Time, threshold time.Duration) bool { // scopesChanged compare the System scopes // with the currently required scopes. -func scopesChanged(s System) bool { +func scopesChanged(s *System) bool { want := auth.RequiredScopes() got := s.Scopes @@ -219,14 +220,14 @@ func scopesChanged(s System) bool { return false } -func (a *Auth0) getSystem() (System, error) { +func (a *Auth0) getSystem() (*System, error) { if err := a.init(); err != nil { - return System{}, err + return nil, err } s, ok := a.config.Systems[a.system] if !ok { - return System{}, fmt.Errorf("unable to find system: %s; run 'vespa auth login' to configure a new system", a.system) + return nil, fmt.Errorf("unable to find system: %s; run 'vespa auth login' to configure a new system", a.system) } return s, nil @@ -234,12 +235,12 @@ func (a *Auth0) getSystem() (System, error) { // AddSystem assigns an existing, or new System. This is expected to be called // after a login has completed. -func (a *Auth0) AddSystem(s System) error { +func (a *Auth0) AddSystem(s *System) error { _ = a.init() // If we're dealing with an empty file, we'll need to initialize this map. if a.config.Systems == nil { - a.config.Systems = map[string]System{} + a.config.Systems = map[string]*System{} } a.config.Systems[a.system] = s @@ -256,7 +257,7 @@ func (a *Auth0) removeSystem(s string) error { // If we're dealing with an empty file, we'll need to initialize this map. if a.config.Systems == nil { - a.config.Systems = map[string]System{} + a.config.Systems = map[string]*System{} } delete(a.config.Systems, s) @@ -310,9 +311,8 @@ func (a *Auth0) jsonToConfig(buf []byte) (*config, error) { return nil, err } cfg := r.Providers.Config - systems := cfg.Systems - if systems != nil { - for n, s := range systems { + if cfg.Systems != nil { + for n, s := range cfg.Systems { s.Name = n } } @@ -350,14 +350,14 @@ func (a *Auth0) initContext() (err error) { // by showing the login instructions, opening the browser. // Use `expired` to run the login from other commands setup: // this will only affect the messages. -func RunLogin(ctx context.Context, a *Auth0, expired bool) (System, error) { +func RunLogin(ctx context.Context, a *Auth0, expired bool) (*System, error) { if expired { fmt.Println("Please sign in to re-authorize the CLI.") } state, err := a.Authenticator.Start(ctx) if err != nil { - return System{}, fmt.Errorf("could not start the authentication process: %w", err) + return nil, fmt.Errorf("could not start the authentication process: %w", err) } fmt.Printf("Your Device Confirmation code is: %s\n\n", state.UserCode) @@ -371,13 +371,13 @@ func RunLogin(ctx context.Context, a *Auth0, expired bool) (System, error) { } var res auth.Result - util.Spinner("Waiting for login to complete in browser ...", func() error { + err = util.Spinner("Waiting for login to complete in browser ...", func() error { res, err = a.Authenticator.Wait(ctx, state) - return nil + return err }) if err != nil { - return System{}, fmt.Errorf("login error: %w", err) + return nil, fmt.Errorf("login error: %w", err) } fmt.Print("\n") @@ -398,12 +398,12 @@ func RunLogin(ctx context.Context, a *Auth0, expired bool) (System, error) { ExpiresAt: time.Now().Add(time.Duration(res.ExpiresIn) * time.Second), Scopes: auth.RequiredScopes(), } - err = a.AddSystem(s) + err = a.AddSystem(&s) if err != nil { - return System{}, fmt.Errorf("could not add system to config: %w", err) + return nil, fmt.Errorf("could not add system to config: %w", err) } - return s, nil + return &s, nil } func RunLogout(a *Auth0) error { diff --git a/client/go/cmd/clone.go b/client/go/cmd/clone.go index e4bbd751f8a..6fe3c0d5a29 100644 --- a/client/go/cmd/clone.go +++ b/client/go/cmd/clone.go @@ -142,7 +142,7 @@ func getSampleAppsZip() *os.File { return f } - util.Spinner(color.Yellow("Downloading sample apps ...").String(), func() error { + err = util.Spinner(color.Yellow("Downloading sample apps ...").String(), func() error { request, err := http.NewRequest("GET", "https://github.com/vespa-engine/sample-apps/archive/refs/heads/master.zip", nil) if err != nil { fatalErr(err, "Invalid URL") @@ -162,7 +162,7 @@ func getSampleAppsZip() *os.File { fatalErr(err, "Could not write sample apps to file: ", f.Name()) return nil } - return nil + return err }) return f diff --git a/client/go/cmd/deploy.go b/client/go/cmd/deploy.go index 813abe88069..ae39afc3773 100644 --- a/client/go/cmd/deploy.go +++ b/client/go/cmd/deploy.go @@ -65,9 +65,7 @@ $ vespa deploy -t cloud -z perf.aws-us-east-1c`, target := getTarget() opts := getDeploymentOpts(cfg, pkg, target) - sessionOrRunID, err = vespa.Deploy(opts) - - if err == nil { + if sessionOrRunID, err := vespa.Deploy(opts); err == nil { fmt.Print("\n") if opts.IsCloud() { printSuccess("Triggered deployment of ", color.Cyan(pkg.Path), " with run ID ", color.Cyan(sessionOrRunID)) diff --git a/client/go/util/spinner.go b/client/go/util/spinner.go index 5e6522c3990..9f3c2cb4e44 100644 --- a/client/go/util/spinner.go +++ b/client/go/util/spinner.go @@ -3,7 +3,6 @@ package util import ( - "fmt" "os" "time" @@ -19,18 +18,18 @@ const ( var messages = os.Stderr -func Spinner(text string, fn func() error) { +func Spinner(text string, fn func() error) error { initialMsg := text + " " doneMsg := "\r" + initialMsg + spinnerTextDone + "\n" failMsg := "\r" + initialMsg + spinnerTextFailed + "\n" - loading(initialMsg, doneMsg, failMsg, fn) + return loading(initialMsg, doneMsg, failMsg, fn) } -func Waiting(fn func() error) { - loading("", "", "", fn) +func Waiting(fn func() error) error { + return loading("", "", "", fn) } -func loading(initialMsg, doneMsg, failMsg string, fn func() error) { +func loading(initialMsg, doneMsg, failMsg string, fn func() error) error { done := make(chan struct{}) errc := make(chan error) go func() { @@ -59,9 +58,7 @@ func loading(initialMsg, doneMsg, failMsg string, fn func() error) { errc <- err <-done - if err != nil { - fmt.Println(fmt.Errorf("an unexpected error occurred: %w", err)) - } + return err } func Error(e error, message string) error { diff --git a/client/go/vespa/deploy.go b/client/go/vespa/deploy.go index 741b45f9e15..d52fc969c37 100644 --- a/client/go/vespa/deploy.go +++ b/client/go/vespa/deploy.go @@ -374,7 +374,12 @@ func uploadApplicationPackage(url *url.URL, opts DeploymentOpts) (int64, error) if err := opts.Target.PrepareApiRequest(request, sigKeyId); err != nil { return 0, err } - response, err := util.HttpDo(request, time.Minute*10, serviceDescription) + + var response *http.Response + err = util.Spinner("Uploading application package ...", func() error { + response, err = util.HttpDo(request, time.Minute*10, serviceDescription) + return err + }) if err != nil { return 0, err } diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java index f6583468322..08ec615e4c0 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ApplicationClusterEndpoint.java @@ -32,7 +32,7 @@ public class ApplicationClusterEndpoint { public enum Scope {application, global, zone} - public enum RoutingMethod {shared, sharedLayer4} + public enum RoutingMethod {shared, sharedLayer4, exclusive} private final DnsName dnsName; private final Scope scope; @@ -112,6 +112,11 @@ public class ApplicationClusterEndpoint { return this; } + public Builder routingMethod(RoutingMethod routingMethod) { + this.routingMethod = routingMethod; + return this; + } + public Builder weight(int weigth) { this.weigth = weigth; return this; diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java index cd31eb2a49a..78da750fb5b 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ContainerEndpoint.java @@ -20,16 +20,22 @@ public class ContainerEndpoint { private final ApplicationClusterEndpoint.Scope scope; private final List<String> names; private final OptionalInt weight; + private final ApplicationClusterEndpoint.RoutingMethod routingMethod; public ContainerEndpoint(String clusterId, ApplicationClusterEndpoint.Scope scope, List<String> names) { this(clusterId, scope, names, OptionalInt.empty()); } public ContainerEndpoint(String clusterId, ApplicationClusterEndpoint.Scope scope, List<String> names, OptionalInt weight) { + this(clusterId, scope, names, weight, ApplicationClusterEndpoint.RoutingMethod.sharedLayer4); + } + + public ContainerEndpoint(String clusterId, ApplicationClusterEndpoint.Scope scope, List<String> names, OptionalInt weight, ApplicationClusterEndpoint.RoutingMethod routingMethod) { this.clusterId = Objects.requireNonNull(clusterId); this.scope = Objects.requireNonNull(scope); this.names = List.copyOf(Objects.requireNonNull(names)); this.weight = weight; + this.routingMethod = routingMethod; } public String clusterId() { @@ -48,6 +54,10 @@ public class ContainerEndpoint { return weight; } + public ApplicationClusterEndpoint.RoutingMethod routingMethod() { + return routingMethod; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -55,17 +65,18 @@ public class ContainerEndpoint { ContainerEndpoint that = (ContainerEndpoint) o; return Objects.equals(clusterId, that.clusterId) && Objects.equals(scope, that.scope) && - Objects.equals(names, that.names); + Objects.equals(names, that.names) && + Objects.equals(weight, that.weight) && + Objects.equals(routingMethod, that.routingMethod); } @Override public int hashCode() { - return Objects.hash(clusterId, names, scope); + return Objects.hash(clusterId, names, scope, weight, routingMethod); } @Override public String toString() { - return String.format("container endpoint %s -> %s [scope=%s]", clusterId, names, scope); + return String.format("container endpoint %s -> %s [scope=%s, weight=%s, routingMetod=%s]", clusterId, names, scope, weight, routingMethod); } - } diff --git a/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java b/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java index e86689c544f..87df21dc023 100644 --- a/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java +++ b/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java @@ -11,6 +11,7 @@ import com.yahoo.cloud.config.SlobroksConfig; import com.yahoo.cloud.config.ZookeepersConfig; import com.yahoo.cloud.config.log.LogdConfig; import com.yahoo.component.Version; +import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.config.provision.ApplicationId; @@ -76,6 +77,12 @@ public class ApplicationConfigProducerRoot extends AbstractConfigProducer<Abstra this.applicationId = applicationId; } + private boolean useV8GeoPositions = false; + + public void useFeatureFlags(ModelContext.FeatureFlags featureFlags) { + this.useV8GeoPositions = featureFlags.useV8GeoPositions(); + } + /** * @return an unmodifiable copy of the set of configIds in this VespaModel. */ @@ -151,12 +158,16 @@ public class ApplicationConfigProducerRoot extends AbstractConfigProducer<Abstra @Override public void getConfig(DocumentmanagerConfig.Builder builder) { - new DocumentManager().produce(documentModel, builder); + new DocumentManager() + .useV8GeoPositions(this.useV8GeoPositions) + .produce(documentModel, builder); } @Override public void getConfig(DocumenttypesConfig.Builder builder) { - new DocumentTypes().produce(documentModel, builder); + new DocumentTypes() + .useV8GeoPositions(this.useV8GeoPositions) + .produce(documentModel, builder); } @Override diff --git a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java index 8605389e1c2..59387c28287 100644 --- a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java +++ b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentManager.java @@ -20,9 +20,17 @@ import java.util.Set; */ public class DocumentManager { + private boolean useV8GeoPositions = false; + + public DocumentManager useV8GeoPositions(boolean value) { + this.useV8GeoPositions = value; + return this; + } + public DocumentmanagerConfig.Builder produce(DocumentModel model, DocumentmanagerConfig.Builder documentConfigBuilder) { documentConfigBuilder.enablecompression(false); + documentConfigBuilder.usev8geopositions(this.useV8GeoPositions); Set<DataType> handled = new HashSet<>(); for(NewDocumentType documentType : model.getDocumentManager().getTypes()) { buildConfig(documentType, documentConfigBuilder, handled); diff --git a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java index 3b0b63f277e..ed6511f6efa 100644 --- a/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java +++ b/config-model/src/main/java/com/yahoo/vespa/configmodel/producers/DocumentTypes.java @@ -15,8 +15,15 @@ import java.util.*; * @author baldersheim */ public class DocumentTypes { + private boolean useV8GeoPositions = false; + + public DocumentTypes useV8GeoPositions(boolean value) { + this.useV8GeoPositions = value; + return this; + } public DocumenttypesConfig.Builder produce(DocumentModel model, DocumenttypesConfig.Builder builder) { + builder.usev8geopositions(this.useV8GeoPositions); Map<NewDocumentType.Name, NewDocumentType> produced = new HashMap<>(); for (NewDocumentType documentType : model.getDocumentManager().getTypes()) { produceInheritOrder(documentType, builder, produced); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java index f584b4cd207..13b0f6216b2 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java @@ -194,6 +194,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri HostSystem hostSystem = root.hostSystem(); if (complete) { // create a completed, frozen model + root.useFeatureFlags(deployState.getProperties().featureFlags()); configModelRepo.readConfigModels(deployState, this, builder, root, new VespaConfigModelRegistry(configModelRegistry)); addServiceClusters(deployState, builder); setupRouting(deployState); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java index f6a0eb9ce8d..df617bf3eed 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java @@ -51,6 +51,9 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.shared; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.sharedLayer4; + /** * A container cluster that is typically set up from the user application. * @@ -237,15 +240,17 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat .build()); } - // Then get all endpoints provided by controller. Can be created with L4 routing only + // Then get all endpoints provided by controller. + Set<ApplicationClusterEndpoint.RoutingMethod> supportedRoutingMethods = Set.of(shared, sharedLayer4); Set<ContainerEndpoint> endpointsFromController = deployState.getEndpoints(); endpointsFromController.stream() .filter(ce -> ce.clusterId().equals(getName())) + .filter(ce -> supportedRoutingMethods.contains(ce.routingMethod())) .forEach(ce -> ce.names().forEach( name -> endpoints.add(ApplicationClusterEndpoint.builder() .scope(ce.scope()) .weight(Long.valueOf(ce.weight().orElse(1)).intValue()) // Default to weight=1 if not set - .sharedL4Routing() + .routingMethod(ce.routingMethod()) .dnsName(ApplicationClusterEndpoint.DnsName.from(name)) .hosts(hosts) .clusterId(getName()) diff --git a/config-model/src/test/configmodel/types/documentmanager.cfg b/config-model/src/test/configmodel/types/documentmanager.cfg index f59dbeeb3ca..66002968586 100644 --- a/config-model/src/test/configmodel/types/documentmanager.cfg +++ b/config-model/src/test/configmodel/types/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[0].id 1381038251 datatype[0].structtype[0].name "position" datatype[0].structtype[0].version 0 diff --git a/config-model/src/test/configmodel/types/documenttypes.cfg b/config-model/src/test/configmodel/types/documenttypes.cfg index 8f576715a4f..94551567352 100644 --- a/config-model/src/test/configmodel/types/documenttypes.cfg +++ b/config-model/src/test/configmodel/types/documenttypes.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[0].id -853072901 documenttype[0].name "types" documenttype[0].version 0 diff --git a/config-model/src/test/configmodel/types/documenttypes_with_doc_field.cfg b/config-model/src/test/configmodel/types/documenttypes_with_doc_field.cfg index 283e5c2fe79..9be843c89aa 100644 --- a/config-model/src/test/configmodel/types/documenttypes_with_doc_field.cfg +++ b/config-model/src/test/configmodel/types/documenttypes_with_doc_field.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[0].id -1368624373 documenttype[0].name "other_doc" documenttype[0].version 0 diff --git a/config-model/src/test/configmodel/types/references/documentmanager_multiple_imported_fields.cfg b/config-model/src/test/configmodel/types/references/documentmanager_multiple_imported_fields.cfg index 7ae73c23685..bf7632a504c 100644 --- a/config-model/src/test/configmodel/types/references/documentmanager_multiple_imported_fields.cfg +++ b/config-model/src/test/configmodel/types/references/documentmanager_multiple_imported_fields.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[0].id 1381038251 datatype[0].structtype[0].name "position" datatype[0].structtype[0].version 0 diff --git a/config-model/src/test/configmodel/types/references/documentmanager_ref_to_self_type.cfg b/config-model/src/test/configmodel/types/references/documentmanager_ref_to_self_type.cfg index a613c2c034d..d105b894b63 100644 --- a/config-model/src/test/configmodel/types/references/documentmanager_ref_to_self_type.cfg +++ b/config-model/src/test/configmodel/types/references/documentmanager_ref_to_self_type.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/configmodel/types/references/documentmanager_refs_to_other_types.cfg b/config-model/src/test/configmodel/types/references/documentmanager_refs_to_other_types.cfg index 2b6e2e852a3..d7c9ddf8a70 100644 --- a/config-model/src/test/configmodel/types/references/documentmanager_refs_to_other_types.cfg +++ b/config-model/src/test/configmodel/types/references/documentmanager_refs_to_other_types.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[0].id 1381038251 datatype[0].structtype[0].name "position" datatype[0].structtype[0].version 0 diff --git a/config-model/src/test/configmodel/types/references/documentmanager_refs_to_same_type.cfg b/config-model/src/test/configmodel/types/references/documentmanager_refs_to_same_type.cfg index bab281cca36..a99bac3a831 100644 --- a/config-model/src/test/configmodel/types/references/documentmanager_refs_to_same_type.cfg +++ b/config-model/src/test/configmodel/types/references/documentmanager_refs_to_same_type.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[0].id 1381038251 datatype[0].structtype[0].name "position" datatype[0].structtype[0].version 0 diff --git a/config-model/src/test/configmodel/types/references/documenttypes_multiple_imported_fields.cfg b/config-model/src/test/configmodel/types/references/documenttypes_multiple_imported_fields.cfg index 242310b57a4..d992839d5d9 100644 --- a/config-model/src/test/configmodel/types/references/documenttypes_multiple_imported_fields.cfg +++ b/config-model/src/test/configmodel/types/references/documenttypes_multiple_imported_fields.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[0].id 2987301 documenttype[0].name "ad" documenttype[0].version 0 diff --git a/config-model/src/test/configmodel/types/references/documenttypes_ref_to_self_type.cfg b/config-model/src/test/configmodel/types/references/documenttypes_ref_to_self_type.cfg index f925ac99a25..19bcb81db38 100644 --- a/config-model/src/test/configmodel/types/references/documenttypes_ref_to_self_type.cfg +++ b/config-model/src/test/configmodel/types/references/documenttypes_ref_to_self_type.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[].id 2987301 documenttype[].name "ad" documenttype[].version 0 diff --git a/config-model/src/test/configmodel/types/references/documenttypes_refs_to_other_types.cfg b/config-model/src/test/configmodel/types/references/documenttypes_refs_to_other_types.cfg index c3aba21a498..68ed924615f 100644 --- a/config-model/src/test/configmodel/types/references/documenttypes_refs_to_other_types.cfg +++ b/config-model/src/test/configmodel/types/references/documenttypes_refs_to_other_types.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[0].id 2987301 documenttype[0].name "ad" documenttype[0].version 0 diff --git a/config-model/src/test/configmodel/types/references/documenttypes_refs_to_same_type.cfg b/config-model/src/test/configmodel/types/references/documenttypes_refs_to_same_type.cfg index c5930449dc1..6415e62cd7e 100644 --- a/config-model/src/test/configmodel/types/references/documenttypes_refs_to_same_type.cfg +++ b/config-model/src/test/configmodel/types/references/documenttypes_refs_to_same_type.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[0].id 2987301 documenttype[0].name "ad" documenttype[0].version 0 diff --git a/config-model/src/test/derived/advanced/documentmanager.cfg b/config-model/src/test/derived/advanced/documentmanager.cfg index 4da92d82fb9..c317c19b09b 100644 --- a/config-model/src/test/derived/advanced/documentmanager.cfg +++ b/config-model/src/test/derived/advanced/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationsimplicitstruct/documentmanager.cfg b/config-model/src/test/derived/annotationsimplicitstruct/documentmanager.cfg index aa74ecebd5b..cdf554cb747 100644 --- a/config-model/src/test/derived/annotationsimplicitstruct/documentmanager.cfg +++ b/config-model/src/test/derived/annotationsimplicitstruct/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationsinheritance/documentmanager.cfg b/config-model/src/test/derived/annotationsinheritance/documentmanager.cfg index e103218793d..9633eaa532b 100644 --- a/config-model/src/test/derived/annotationsinheritance/documentmanager.cfg +++ b/config-model/src/test/derived/annotationsinheritance/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationsinheritance2/documentmanager.cfg b/config-model/src/test/derived/annotationsinheritance2/documentmanager.cfg index 5b5b2ac348f..85aef02bb3c 100644 --- a/config-model/src/test/derived/annotationsinheritance2/documentmanager.cfg +++ b/config-model/src/test/derived/annotationsinheritance2/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationspolymorphy/documentmanager.cfg b/config-model/src/test/derived/annotationspolymorphy/documentmanager.cfg index 1f71057f268..a8d46f2a940 100644 --- a/config-model/src/test/derived/annotationspolymorphy/documentmanager.cfg +++ b/config-model/src/test/derived/annotationspolymorphy/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationsreference/documentmanager.cfg b/config-model/src/test/derived/annotationsreference/documentmanager.cfg index 737bcbf3cac..7ce09a97be1 100644 --- a/config-model/src/test/derived/annotationsreference/documentmanager.cfg +++ b/config-model/src/test/derived/annotationsreference/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationssimple/documentmanager.cfg b/config-model/src/test/derived/annotationssimple/documentmanager.cfg index 3af65e96558..1342a179239 100644 --- a/config-model/src/test/derived/annotationssimple/documentmanager.cfg +++ b/config-model/src/test/derived/annotationssimple/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationsstruct/documentmanager.cfg b/config-model/src/test/derived/annotationsstruct/documentmanager.cfg index 0a1cda99a95..233c2f729fe 100644 --- a/config-model/src/test/derived/annotationsstruct/documentmanager.cfg +++ b/config-model/src/test/derived/annotationsstruct/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/annotationsstructarray/documentmanager.cfg b/config-model/src/test/derived/annotationsstructarray/documentmanager.cfg index fca86c58ffa..19c1c5eda2f 100644 --- a/config-model/src/test/derived/annotationsstructarray/documentmanager.cfg +++ b/config-model/src/test/derived/annotationsstructarray/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/arrays/documentmanager.cfg b/config-model/src/test/derived/arrays/documentmanager.cfg index f542a936574..554cf017b54 100644 --- a/config-model/src/test/derived/arrays/documentmanager.cfg +++ b/config-model/src/test/derived/arrays/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/attributeprefetch/documentmanager.cfg b/config-model/src/test/derived/attributeprefetch/documentmanager.cfg index dc208a86913..b26698d83a6 100644 --- a/config-model/src/test/derived/attributeprefetch/documentmanager.cfg +++ b/config-model/src/test/derived/attributeprefetch/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/complex/documentmanager.cfg b/config-model/src/test/derived/complex/documentmanager.cfg index 50d5dac1ef9..bc5947ad2b5 100644 --- a/config-model/src/test/derived/complex/documentmanager.cfg +++ b/config-model/src/test/derived/complex/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/emptydefault/documentmanager.cfg b/config-model/src/test/derived/emptydefault/documentmanager.cfg index e69b2c5d8c3..f4234aee087 100644 --- a/config-model/src/test/derived/emptydefault/documentmanager.cfg +++ b/config-model/src/test/derived/emptydefault/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/id/documentmanager.cfg b/config-model/src/test/derived/id/documentmanager.cfg index 8ee82cdd946..dad69375887 100644 --- a/config-model/src/test/derived/id/documentmanager.cfg +++ b/config-model/src/test/derived/id/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg b/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg index ca490b053f7..311c85a6bb1 100644 --- a/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg +++ b/config-model/src/test/derived/imported_fields_inherited_reference/documenttypes.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[].id -94853056 documenttype[].name "child_a" documenttype[].version 0 diff --git a/config-model/src/test/derived/indexswitches/documentmanager.cfg b/config-model/src/test/derived/indexswitches/documentmanager.cfg index ffeaab177ba..8ba249ed751 100644 --- a/config-model/src/test/derived/indexswitches/documentmanager.cfg +++ b/config-model/src/test/derived/indexswitches/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/inheritance/documentmanager.cfg b/config-model/src/test/derived/inheritance/documentmanager.cfg index e054019bd8f..49bf53bce8d 100644 --- a/config-model/src/test/derived/inheritance/documentmanager.cfg +++ b/config-model/src/test/derived/inheritance/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/inheritance/mother/documentmanager.cfg b/config-model/src/test/derived/inheritance/mother/documentmanager.cfg index 71da9265521..3cf7eae655d 100644 --- a/config-model/src/test/derived/inheritance/mother/documentmanager.cfg +++ b/config-model/src/test/derived/inheritance/mother/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[-126593034].id -126593034 datatype[-126593034].structtype[single].name "child.body" datatype[-126593034].structtype[single].version 0 diff --git a/config-model/src/test/derived/inheritdiamond/documentmanager.cfg b/config-model/src/test/derived/inheritdiamond/documentmanager.cfg index df3f8908a60..06169c09969 100644 --- a/config-model/src/test/derived/inheritdiamond/documentmanager.cfg +++ b/config-model/src/test/derived/inheritdiamond/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 336538650 datatype[].structtype[].name "child_struct" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg b/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg index 25872641741..8fa93b61569 100644 --- a/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg +++ b/config-model/src/test/derived/inheritfromgrandparent/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/inheritfromparent/documentmanager.cfg b/config-model/src/test/derived/inheritfromparent/documentmanager.cfg index c9cd6fd3042..e3b6ca87689 100644 --- a/config-model/src/test/derived/inheritfromparent/documentmanager.cfg +++ b/config-model/src/test/derived/inheritfromparent/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/inheritfromparent/documenttypes.cfg b/config-model/src/test/derived/inheritfromparent/documenttypes.cfg index faef3f6923b..ea7a49b1acf 100644 --- a/config-model/src/test/derived/inheritfromparent/documenttypes.cfg +++ b/config-model/src/test/derived/inheritfromparent/documenttypes.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[].id 1175161836 documenttype[].name "parent" documenttype[].version 0 diff --git a/config-model/src/test/derived/mail/documentmanager.cfg b/config-model/src/test/derived/mail/documentmanager.cfg index baf122d0241..b6fdbe8f210 100644 --- a/config-model/src/test/derived/mail/documentmanager.cfg +++ b/config-model/src/test/derived/mail/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/mail/onlydoc/documentmanager.cfg b/config-model/src/test/derived/mail/onlydoc/documentmanager.cfg index a19332685e9..27ac015e630 100644 --- a/config-model/src/test/derived/mail/onlydoc/documentmanager.cfg +++ b/config-model/src/test/derived/mail/onlydoc/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/namecollision/documentmanager.cfg b/config-model/src/test/derived/namecollision/documentmanager.cfg index 8d0d89dde35..99da89f4fbf 100644 --- a/config-model/src/test/derived/namecollision/documentmanager.cfg +++ b/config-model/src/test/derived/namecollision/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/prefixexactattribute/documentmanager.cfg b/config-model/src/test/derived/prefixexactattribute/documentmanager.cfg index 9ab2da3f686..e37ea304b18 100644 --- a/config-model/src/test/derived/prefixexactattribute/documentmanager.cfg +++ b/config-model/src/test/derived/prefixexactattribute/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/ranktypes/documentmanager.cfg b/config-model/src/test/derived/ranktypes/documentmanager.cfg index a8bb9e904dc..dc02052c509 100644 --- a/config-model/src/test/derived/ranktypes/documentmanager.cfg +++ b/config-model/src/test/derived/ranktypes/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/schemainheritance/documentmanager.cfg b/config-model/src/test/derived/schemainheritance/documentmanager.cfg index 0dd87029f32..ec13eae92ff 100644 --- a/config-model/src/test/derived/schemainheritance/documentmanager.cfg +++ b/config-model/src/test/derived/schemainheritance/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/streamingstruct/documentmanager.cfg b/config-model/src/test/derived/streamingstruct/documentmanager.cfg index 63001ea38ca..567944d3b78 100644 --- a/config-model/src/test/derived/streamingstruct/documentmanager.cfg +++ b/config-model/src/test/derived/streamingstruct/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/streamingstruct/onlydoc/documentmanager.cfg b/config-model/src/test/derived/streamingstruct/onlydoc/documentmanager.cfg index 1a1cf522fdd..cb56da169fa 100644 --- a/config-model/src/test/derived/streamingstruct/onlydoc/documentmanager.cfg +++ b/config-model/src/test/derived/streamingstruct/onlydoc/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/structanyorder/documentmanager.cfg b/config-model/src/test/derived/structanyorder/documentmanager.cfg index 3ffc2f22a9b..be5e473e460 100644 --- a/config-model/src/test/derived/structanyorder/documentmanager.cfg +++ b/config-model/src/test/derived/structanyorder/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/tensor/documenttypes.cfg b/config-model/src/test/derived/tensor/documenttypes.cfg index acf5c7ed12f..879b455a711 100644 --- a/config-model/src/test/derived/tensor/documenttypes.cfg +++ b/config-model/src/test/derived/tensor/documenttypes.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false documenttype[].id -1290043429 documenttype[].name "tensor" documenttype[].version 0 diff --git a/config-model/src/test/derived/twostreamingstructs/documentmanager.cfg b/config-model/src/test/derived/twostreamingstructs/documentmanager.cfg index 19d00483a5a..f121eb7628a 100644 --- a/config-model/src/test/derived/twostreamingstructs/documentmanager.cfg +++ b/config-model/src/test/derived/twostreamingstructs/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/derived/types/documentmanager.cfg b/config-model/src/test/derived/types/documentmanager.cfg index 9556f77f6d9..ffdf090f761 100644 --- a/config-model/src/test/derived/types/documentmanager.cfg +++ b/config-model/src/test/derived/types/documentmanager.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[].id 1381038251 datatype[].structtype[].name "position" datatype[].structtype[].version 0 diff --git a/config-model/src/test/examples/fieldoftypedocument.cfg b/config-model/src/test/examples/fieldoftypedocument.cfg index 8074d86b45f..5753ae556a6 100644 --- a/config-model/src/test/examples/fieldoftypedocument.cfg +++ b/config-model/src/test/examples/fieldoftypedocument.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[0].id 1381038251 datatype[0].structtype[0].name "position" datatype[0].structtype[0].version 0 diff --git a/config-model/src/test/examples/structresult.cfg b/config-model/src/test/examples/structresult.cfg index ceaad2e6584..639d91c892d 100755 --- a/config-model/src/test/examples/structresult.cfg +++ b/config-model/src/test/examples/structresult.cfg @@ -1,4 +1,5 @@ enablecompression false +usev8geopositions false datatype[0].id 1381038251 datatype[0].structtype[0].name "position" datatype[0].structtype[0].version 0 diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java index 87dd91a8a11..560ac28b6f7 100755 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java @@ -44,6 +44,11 @@ import java.util.OptionalLong; import java.util.Set; import java.util.stream.Collectors; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.exclusive; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.shared; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.sharedLayer4; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.Scope.application; +import static com.yahoo.config.model.api.ApplicationClusterEndpoint.Scope.global; import static com.yahoo.config.provision.SystemName.cd; import static com.yahoo.config.provision.SystemName.main; import static org.hamcrest.Matchers.containsInAnyOrder; @@ -366,59 +371,71 @@ public class ContainerClusterTest { assertNames(main, ApplicationId.from("t1", "a1", "i1"), Set.of(), - List.of("search-cluster.i1.a1.t1.endpoint.suffix", "search-cluster--i1--a1--t1.endpoint.suffix")); + List.of("search-cluster.i1.a1.t1.endpoint.suffix"), + List.of("search-cluster--i1--a1--t1.endpoint.suffix")); assertNames(main, ApplicationId.from("t1", "a1", "default"), Set.of(), - List.of("search-cluster.a1.t1.endpoint.suffix", "search-cluster--a1--t1.endpoint.suffix")); + List.of("search-cluster.a1.t1.endpoint.suffix"), + List.of("search-cluster--a1--t1.endpoint.suffix")); assertNames(main, ApplicationId.from("t1", "default", "default"), Set.of(), - List.of("search-cluster.default.t1.endpoint.suffix", "search-cluster--default--t1.endpoint.suffix")); + List.of("search-cluster.default.t1.endpoint.suffix"), + List.of("search-cluster--default--t1.endpoint.suffix")); assertNames(main, ApplicationId.from("t1", "a1", "default"), - Set.of(new ContainerEndpoint("not-in-this-cluster", ApplicationClusterEndpoint.Scope.global, List.of("foo", "bar"))), - List.of("search-cluster.a1.t1.endpoint.suffix", "search-cluster--a1--t1.endpoint.suffix")); + Set.of(new ContainerEndpoint("not-in-this-cluster", global, List.of("foo", "bar"))), + List.of("search-cluster.a1.t1.endpoint.suffix"), + List.of("search-cluster--a1--t1.endpoint.suffix")); assertNames(main, ApplicationId.from("t1", "a1", "default"), - Set.of(new ContainerEndpoint("search-cluster", ApplicationClusterEndpoint.Scope.global, List.of("rotation-1.x.y.z", "rotation-2.x.y.z")), - new ContainerEndpoint("search-cluster", ApplicationClusterEndpoint.Scope.application, List.of("app-rotation.x.y.z"), OptionalInt.of(3))), - List.of("search-cluster.a1.t1.endpoint.suffix", "search-cluster--a1--t1.endpoint.suffix", "rotation-1.x.y.z", "rotation-2.x.y.z", "app-rotation.x.y.z")); + Set.of(new ContainerEndpoint("search-cluster", global, List.of("rotation-1.x.y.z", "rotation-2.x.y.z"), OptionalInt.empty(), sharedLayer4), + new ContainerEndpoint("search-cluster", application, List.of("app-rotation.x.y.z"), OptionalInt.of(3), sharedLayer4)), + List.of("search-cluster.a1.t1.endpoint.suffix", "rotation-1.x.y.z", "rotation-2.x.y.z", "app-rotation.x.y.z"), + List.of("search-cluster--a1--t1.endpoint.suffix")); // cd system: assertNames(cd, ApplicationId.from("t1", "a1", "i1"), Set.of(), - List.of("search-cluster.cd.i1.a1.t1.endpoint.suffix", "search-cluster--cd--i1--a1--t1.endpoint.suffix")); + List.of("search-cluster.cd.i1.a1.t1.endpoint.suffix"), + List.of("search-cluster--cd--i1--a1--t1.endpoint.suffix")); assertNames(cd, ApplicationId.from("t1", "a1", "default"), Set.of(), - List.of("search-cluster.cd.a1.t1.endpoint.suffix", "search-cluster--cd--a1--t1.endpoint.suffix")); + List.of("search-cluster.cd.a1.t1.endpoint.suffix"), + List.of("search-cluster--cd--a1--t1.endpoint.suffix")); assertNames(cd, ApplicationId.from("t1", "default", "default"), Set.of(), - List.of("search-cluster.cd.default.t1.endpoint.suffix", "search-cluster--cd--default--t1.endpoint.suffix")); + List.of("search-cluster.cd.default.t1.endpoint.suffix"), + List.of("search-cluster--cd--default--t1.endpoint.suffix")); assertNames(cd, ApplicationId.from("t1", "a1", "default"), - Set.of(new ContainerEndpoint("not-in-this-cluster", ApplicationClusterEndpoint.Scope.global, List.of("foo", "bar"))), - List.of("search-cluster.cd.a1.t1.endpoint.suffix", "search-cluster--cd--a1--t1.endpoint.suffix")); + Set.of(new ContainerEndpoint("not-in-this-cluster", global, List.of("foo", "bar"))), + List.of("search-cluster.cd.a1.t1.endpoint.suffix"), + List.of("search-cluster--cd--a1--t1.endpoint.suffix")); assertNames(cd, ApplicationId.from("t1", "a1", "default"), - Set.of(new ContainerEndpoint("search-cluster", ApplicationClusterEndpoint.Scope.global, List.of("rotation-1.x.y.z", "rotation-2.x.y.z")), - new ContainerEndpoint("search-cluster", ApplicationClusterEndpoint.Scope.application, List.of("app-rotation.x.y.z"), OptionalInt.of(3))), - List.of("search-cluster.cd.a1.t1.endpoint.suffix", "search-cluster--cd--a1--t1.endpoint.suffix", "rotation-1.x.y.z", "rotation-2.x.y.z", "app-rotation.x.y.z")); + Set.of(new ContainerEndpoint("search-cluster", global, List.of("rotation-1.x.y.z", "rotation-2.x.y.z"), OptionalInt.empty(), sharedLayer4), + new ContainerEndpoint("search-cluster", global, List.of("a--b.x.y.z", "rotation-2.x.y.z"), OptionalInt.empty(), shared), + new ContainerEndpoint("search-cluster", application, List.of("app-rotation.x.y.z"), OptionalInt.of(3), sharedLayer4), + new ContainerEndpoint("not-supported", global, List.of("not.supported"), OptionalInt.empty(), exclusive)), + List.of("search-cluster.cd.a1.t1.endpoint.suffix", "rotation-1.x.y.z", "rotation-2.x.y.z", "app-rotation.x.y.z"), + List.of("search-cluster--cd--a1--t1.endpoint.suffix", "a--b.x.y.z", "rotation-2.x.y.z")); } - private void assertNames(SystemName systemName, ApplicationId appId, Set<ContainerEndpoint> globalEndpoints, List<String> expectedNames) { + private void assertNames(SystemName systemName, ApplicationId appId, Set<ContainerEndpoint> globalEndpoints, List<String> expectedSharedL4Names, List<String> expectedSharedNames) { Zone zone = new Zone(systemName, Environment.defaultEnvironment(), RegionName.defaultName()); DeployState state = new DeployState.Builder() .zone(zone) @@ -433,8 +450,9 @@ public class ContainerClusterTest { addContainer(root, cluster, "c1", "host-c1"); cluster.doPrepare(state); List<ApplicationClusterEndpoint> endpoints = cluster.endpoints(); - assertEquals(expectedNames.size(), endpoints.size()); - expectedNames.forEach(expected -> assertTrue("Endpoint not matched " + expected + " was: " + endpoints, endpoints.stream().anyMatch(e -> Objects.equals(e.dnsName().value(), expected)))); + + assertNames(expectedSharedNames, endpoints.stream().filter(e -> e.routingMethod() == shared).collect(Collectors.toList())); + assertNames(expectedSharedL4Names, endpoints.stream().filter(e -> e.routingMethod() == sharedLayer4).collect(Collectors.toList())); List<ContainerEndpoint> endpointsWithWeight = globalEndpoints.stream().filter(endpoint -> endpoint.weight().isPresent()).collect(Collectors.toList()); @@ -443,6 +461,11 @@ public class ContainerClusterTest { .forEach(ce -> assertTrue(endpointsMatch(ce, endpoints))); } + private void assertNames(List<String> expectedNames, List<ApplicationClusterEndpoint> endpoints) { + assertEquals(expectedNames.size(), endpoints.size()); + expectedNames.forEach(expected -> assertTrue("Endpoint not matched " + expected + " was: " + endpoints, endpoints.stream().anyMatch(e -> Objects.equals(e.dnsName().value(), expected)))); + } + private boolean endpointsMatch(ContainerEndpoint configuredEndpoint, List<ApplicationClusterEndpoint> clusterEndpoints) { return clusterEndpoints.stream().anyMatch(e -> configuredEndpoint.names().contains(e.dnsName().value()) && diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java index dfbd605ab50..d748ebb46e5 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionRpcServer.java @@ -11,6 +11,7 @@ import com.yahoo.jrt.StringValue; import com.yahoo.jrt.Supervisor; import com.yahoo.net.HostName; import com.yahoo.vespa.filedistribution.FileDownloader; +import com.yahoo.vespa.filedistribution.FileReferenceDownload; import java.io.File; import java.util.Map; @@ -102,7 +103,7 @@ class FileDistributionRpcServer { private void downloadFile(Request req) { FileReference fileReference = new FileReference(req.parameters().get(0).asString()); log.log(Level.FINE, () -> "getFile() called for file reference '" + fileReference.value() + "'"); - Optional<File> file = downloader.getFile(fileReference, HostName.getLocalhost()); + Optional<File> file = downloader.getFile(new FileReferenceDownload(fileReference, HostName.getLocalhost())); if (file.isPresent()) { new RequestTracker().trackRequest(file.get().getParentFile()); req.returnValues().add(new StringValue(file.get().getAbsolutePath())); diff --git a/config/src/main/java/com/yahoo/vespa/config/JRTConnection.java b/config/src/main/java/com/yahoo/vespa/config/JRTConnection.java index c1fc50f6a82..f731d49941a 100644 --- a/config/src/main/java/com/yahoo/vespa/config/JRTConnection.java +++ b/config/src/main/java/com/yahoo/vespa/config/JRTConnection.java @@ -53,6 +53,7 @@ public class JRTConnection implements Connection { if (target == null || !target.isValid()) { logger.log(Level.INFO, "Connecting to " + address); target = supervisor.connect(new Spec(address)); + logger.log(Level.FINE, "Connected to " + address); } return target; } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java index 02fad2357c3..79337f3d32b 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileServer.java @@ -194,7 +194,10 @@ public class FileServer { // Create new FileReferenceDownload with downloadFromOtherSourceIfNotFound set to false // to avoid config servers requesting a file reference perpetually, e.g. for a file that does not exist anymore FileReferenceDownload newDownload = new FileReferenceDownload(fileReference, false, fileReferenceDownload.client()); - return downloader.getFile(newDownload).isPresent(); + boolean fileExists = downloader.getFile(newDownload).isPresent(); + if ( ! fileExists) + log.log(Level.WARNING, "Failed downloading '" + fileReferenceDownload + "'"); + return fileExists; } else { log.log(Level.FINE, "File not found, will not download from another source, since request came from another config server"); return false; diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java index 9cc475a56a0..d8295373207 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java @@ -82,8 +82,8 @@ public class ApplicationPackageMaintainer extends ConfigServerMaintainer { this.getClass().getSimpleName()); if (fileDownloader.getFile(download).isEmpty()) { failures++; - log.warning("Failed to download application package (" + appFileReference + ")" + - " for " + applicationId + " (session " + sessionId + ")"); + log.info("Failed downloading application package (" + appFileReference + ")" + + " for " + applicationId + " (session " + sessionId + ")"); continue; } } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializer.java index 3bbf98357f5..b813d56b345 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializer.java @@ -31,16 +31,18 @@ public class ContainerEndpointSerializer { private static final String scopeField = "scope"; private static final String namesField = "names"; private static final String weightField = "weight"; + private static final String routingMethodField = "routingMethod"; private ContainerEndpointSerializer() {} public static ContainerEndpoint endpointFromSlime(Inspector inspector) { final var clusterId = inspector.field(clusterIdField).asString(); - // Currently assigned endpoints that do not have scope should be interpreted as global endpoints - // TODO: Remove default assignment after 7.500 - final var scope = SlimeUtils.optionalString(inspector.field(scopeField)).orElse(ApplicationClusterEndpoint.Scope.global.name()); + final var scope = inspector.field(scopeField).asString(); final var namesInspector = inspector.field(namesField); final var weight = SlimeUtils.optionalInteger(inspector.field(weightField)); + // assign default routingmethod. Remove when 7.507 is latest version + // Cannot be used before all endpoints are assigned explicit routingmethod (from controller) + final var routingMethod = SlimeUtils.optionalString(inspector.field(routingMethodField)).orElse(ApplicationClusterEndpoint.RoutingMethod.sharedLayer4.name()); if (clusterId.isEmpty()) { throw new IllegalStateException("'clusterId' missing on serialized ContainerEndpoint"); } @@ -53,6 +55,10 @@ public class ContainerEndpointSerializer { throw new IllegalStateException("'names' missing on serialized ContainerEndpoint"); } + if(routingMethod.isEmpty()) { + throw new IllegalStateException("'routingMethod' missing on serialized ContainerEndpoint"); + } + final var names = new ArrayList<String>(); namesInspector.traverse((ArrayTraverser) (idx, nameInspector) -> { @@ -60,7 +66,8 @@ public class ContainerEndpointSerializer { names.add(containerName); }); - return new ContainerEndpoint(clusterId, ApplicationClusterEndpoint.Scope.valueOf(scope), names, weight); + return new ContainerEndpoint(clusterId, ApplicationClusterEndpoint.Scope.valueOf(scope), names, weight, + ApplicationClusterEndpoint.RoutingMethod.valueOf(routingMethod)); } public static List<ContainerEndpoint> endpointListFromSlime(Slime slime) { @@ -85,6 +92,7 @@ public class ContainerEndpointSerializer { endpoint.weight().ifPresent(w -> cursor.setLong(weightField, w)); final var namesInspector = cursor.setArray(namesField); endpoint.names().forEach(namesInspector::addString); + cursor.setString(routingMethodField, endpoint.routingMethod().name()); } public static Slime endpointListToSlime(List<ContainerEndpoint> endpoints) { diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java index 08e6a353fbb..79632b8446b 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionPreparerTest.java @@ -63,6 +63,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.OptionalInt; import java.util.Set; import java.util.logging.Level; @@ -248,14 +249,18 @@ public class SessionPreparerTest { " \"names\": [\n" + " \"foo.app1.tenant1.global.vespa.example.com\",\n" + " \"rotation-042.vespa.global.routing\"\n" + - " ]\n" + + " ],\n" + + " \"scope\": \"global\", \n" + + " \"routingMethod\": \"shared\"\n" + " },\n" + " {\n" + " \"clusterId\": \"bar\",\n" + " \"names\": [\n" + " \"bar.app1.tenant1.global.vespa.example.com\",\n" + " \"rotation-043.vespa.global.routing\"\n" + - " ]\n" + + " ],\n" + + " \"scope\": \"global\",\n" + + " \"routingMethod\": \"sharedLayer4\"\n" + " }\n" + "]"; var applicationId = applicationId("test"); @@ -267,11 +272,15 @@ public class SessionPreparerTest { var expected = List.of(new ContainerEndpoint("foo", ApplicationClusterEndpoint.Scope.global, List.of("foo.app1.tenant1.global.vespa.example.com", - "rotation-042.vespa.global.routing")), + "rotation-042.vespa.global.routing"), + OptionalInt.empty(), + ApplicationClusterEndpoint.RoutingMethod.shared), new ContainerEndpoint("bar", ApplicationClusterEndpoint.Scope.global, List.of("bar.app1.tenant1.global.vespa.example.com", - "rotation-043.vespa.global.routing"))); + "rotation-043.vespa.global.routing"), + OptionalInt.empty(), + ApplicationClusterEndpoint.RoutingMethod.sharedLayer4)); assertEquals(expected, readContainerEndpoints(applicationId)); diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializerTest.java index 2b746a9c1c6..c8f31697c5e 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializerTest.java @@ -35,22 +35,6 @@ public class ContainerEndpointSerializerTest { } @Test - public void readEndpointWithoutScope() { - final var slime = new Slime(); - final var entry = slime.setObject(); - - entry.setString("clusterId", "foobar"); - final var entryNames = entry.setArray("names"); - entryNames.addString("a"); - entryNames.addString("b"); - - final var endpoint = ContainerEndpointSerializer.endpointFromSlime(slime.get()); - assertEquals("foobar", endpoint.clusterId()); - assertEquals(ApplicationClusterEndpoint.Scope.global, endpoint.scope()); - assertEquals(List.of("a", "b"), endpoint.names()); - } - - @Test public void writeReadSingleEndpoint() { final var endpoint = new ContainerEndpoint("foo", ApplicationClusterEndpoint.Scope.global, List.of("a", "b"), OptionalInt.of(1)); final var serialized = new Slime(); @@ -62,7 +46,7 @@ public class ContainerEndpointSerializerTest { @Test public void writeReadEndpoints() { - final var endpoints = List.of(new ContainerEndpoint("foo", ApplicationClusterEndpoint.Scope.global, List.of("a", "b"))); + final var endpoints = List.of(new ContainerEndpoint("foo", ApplicationClusterEndpoint.Scope.global, List.of("a", "b"), OptionalInt.of(3), ApplicationClusterEndpoint.RoutingMethod.shared)); final var serialized = ContainerEndpointSerializer.endpointListToSlime(endpoints); final var deserialized = ContainerEndpointSerializer.endpointListFromSlime(serialized); diff --git a/container-disc/src/main/sh/vespa-start-container-daemon.sh b/container-disc/src/main/sh/vespa-start-container-daemon.sh index d465edb3c39..eb446f9a251 100755 --- a/container-disc/src/main/sh/vespa-start-container-daemon.sh +++ b/container-disc/src/main/sh/vespa-start-container-daemon.sh @@ -39,10 +39,6 @@ CP="${VESPA_HOME}/lib/jars/jdisc_core-jar-with-dependencies.jar" mkdir -p $bundlecachedir || exit 1 printenv > $cfpfile || exit 1 -# ??? TODO ??? XXX ??? -# LANG=en_US.utf8 -# LC_ALL=C - getconfig() { qrstartcfg="" @@ -244,6 +240,13 @@ import_cfg_var () { fi } +# TODO Vespa 8: Remove when all containers use JDK 17 +configure_illegal_access() { + if [[ "$VESPA_JDK_VERSION" = "11" ]]; then + illegal_access_option="--illegal-access=debug" + fi +} + getconfig configure_memory configure_gcopts @@ -252,6 +255,7 @@ configure_classpath configure_numactl configure_cpu configure_preload +configure_illegal_access exec $numactlcmd $envcmd java \ -Dconfig.id="${VESPA_CONFIG_ID}" \ @@ -265,6 +269,7 @@ exec $numactlcmd $envcmd java \ -XX:HeapDumpPath="${VESPA_HOME}/var/crash" \ -XX:ErrorFile="${VESPA_HOME}/var/crash/hs_err_pid%p.log" \ -XX:+ExitOnOutOfMemoryError \ + ${illegal_access_option} \ --add-opens=java.base/java.io=ALL-UNNAMED \ --add-opens=java.base/java.lang=ALL-UNNAMED \ --add-opens=java.base/java.net=ALL-UNNAMED \ diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudEventTracker.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudEventTracker.java index 98e9fc7c159..021c02fb6a0 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudEventTracker.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/CloudEventTracker.java @@ -3,10 +3,9 @@ package com.yahoo.vespa.hosted.controller.maintenance; import com.yahoo.config.provision.CloudName; import com.yahoo.config.provision.zone.ZoneApi; -import com.yahoo.text.Text; import com.yahoo.vespa.hosted.controller.Controller; -import com.yahoo.vespa.hosted.controller.api.integration.aws.CloudEventFetcher; import com.yahoo.vespa.hosted.controller.api.integration.aws.CloudEvent; +import com.yahoo.vespa.hosted.controller.api.integration.aws.CloudEventFetcher; import com.yahoo.vespa.hosted.controller.api.integration.configserver.Node; import com.yahoo.vespa.hosted.controller.api.integration.configserver.NodeFilter; import com.yahoo.vespa.hosted.controller.api.integration.configserver.NodeRepository; @@ -40,11 +39,7 @@ public class CloudEventTracker extends ControllerMaintainer { @Override protected double maintain() { for (var region : zonesByCloudNativeRegion.keySet()) { - List<CloudEvent> events = eventFetcher.getEvents(region); - for (var event : events) { - log.info(Text.format("Retrieved event %s, affecting the following instances: %s", - event.instanceEventId, - event.affectedInstances)); + for (var event : eventFetcher.getEvents(region)) { deprovisionAffectedHosts(region, event); } } diff --git a/document/abi-spec.json b/document/abi-spec.json index 39a93b2b2cb..2994b404137 100644 --- a/document/abi-spec.json +++ b/document/abi-spec.json @@ -613,6 +613,7 @@ "public void <init>()", "public void <init>(com.yahoo.document.DocumenttypesConfig)", "public com.yahoo.document.DocumenttypesConfig$Builder enablecompression(boolean)", + "public com.yahoo.document.DocumenttypesConfig$Builder usev8geopositions(boolean)", "public com.yahoo.document.DocumenttypesConfig$Builder documenttype(com.yahoo.document.DocumenttypesConfig$Documenttype$Builder)", "public com.yahoo.document.DocumenttypesConfig$Builder documenttype(java.util.List)", "public final boolean dispatchGetConfig(com.yahoo.config.ConfigInstance$Producer)", @@ -1423,6 +1424,7 @@ "public static java.lang.String getDefVersion()", "public void <init>(com.yahoo.document.DocumenttypesConfig$Builder)", "public boolean enablecompression()", + "public boolean usev8geopositions()", "public java.util.List documenttype()", "public com.yahoo.document.DocumenttypesConfig$Documenttype documenttype(int)" ], diff --git a/document/src/vespa/document/config/documentmanager.def b/document/src/vespa/document/config/documentmanager.def index aec24db1282..6d4b12207bd 100644 --- a/document/src/vespa/document/config/documentmanager.def +++ b/document/src/vespa/document/config/documentmanager.def @@ -5,6 +5,9 @@ namespace=document.config ## Whether to enable compression in this process. enablecompression bool default=false +## Prefer "Vespa 8" format for the "position" type +usev8geopositions bool default=false + ## The Id of the datatype. Must be unique, including not ## overlapping with the internal datatypes (defined in datatype.h) datatype[].id int diff --git a/document/src/vespa/document/config/documenttypes.def b/document/src/vespa/document/config/documenttypes.def index 6c453cc9814..7c84919e0d6 100644 --- a/document/src/vespa/document/config/documenttypes.def +++ b/document/src/vespa/document/config/documenttypes.def @@ -5,6 +5,9 @@ namespace=document ## Whether to enable compression in this process. enablecompression bool default=false +## Prefer "Vespa 8" format for the "position" type +usev8geopositions bool default=false + ## The Id of the documenttype. Must be unique among all document types. documenttype[].id int diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java index b2efd35e41e..1821c8971e7 100644 --- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java +++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java @@ -6,7 +6,6 @@ import com.yahoo.jrt.Supervisor; import com.yahoo.vespa.config.Connection; import com.yahoo.vespa.config.ConnectionPool; import com.yahoo.vespa.defaults.Defaults; -import com.yahoo.yolean.Exceptions; import java.io.File; import java.time.Duration; @@ -69,16 +68,10 @@ public class FileDownloader implements AutoCloseable { downloadDirectory); } - public Optional<File> getFile(FileReference fileReference, String client) { - return getFile(new FileReferenceDownload(fileReference, client)); - } - public Optional<File> getFile(FileReferenceDownload fileReferenceDownload) { try { return getFutureFile(fileReferenceDownload).get(timeout.toMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException | ExecutionException | TimeoutException e) { - log.log(Level.WARNING, "Failed downloading '" + fileReferenceDownload + - "', removing from download queue: " + Exceptions.toMessageString(e)); fileReferenceDownloader.failedDownloading(fileReferenceDownload.fileReference()); return Optional.empty(); } diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java index 6bace104d88..e3edee2956f 100644 --- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java +++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java @@ -92,7 +92,8 @@ public class FileReferenceDownloader { private boolean startDownloadRpc(FileReferenceDownload fileReferenceDownload, int retryCount, Connection connection) { Request request = createRequest(fileReferenceDownload); - connection.invokeSync(request, rpcTimeout(retryCount).getSeconds()); + Duration rpcTimeout = rpcTimeout(retryCount); + connection.invokeSync(request, rpcTimeout.getSeconds()); Level logLevel = (retryCount > 3 ? Level.INFO : Level.FINE); FileReference fileReference = fileReferenceDownload.fileReference(); @@ -107,8 +108,9 @@ public class FileReferenceDownloader { } } else { log.log(logLevel, "Downloading " + fileReference + " from " + connection.getAddress() + " failed: " + - request + ", error: " + request.errorMessage() + ", will switch config server for next request" + - " (retry " + retryCount + ", rpc timeout " + rpcTimeout(retryCount) + ")"); + request + ", error: " + request.errorCode() + "(" + request.errorMessage() + + "). Will switch config server for next request" + + " (retry " + retryCount + ", rpc timeout " + rpcTimeout + ")"); return false; } } diff --git a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java index 460a1ee593a..3655285efbe 100644 --- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java +++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java @@ -297,7 +297,7 @@ public class FileDownloaderTest { } private Optional<File> getFile(FileReference fileReference) { - return fileDownloader.getFile(fileReference, "test"); + return fileDownloader.getFile(new FileReferenceDownload(fileReference, "test")); } private static class MockConnection implements ConnectionPool, com.yahoo.vespa.config.Connection { |