Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig not recognized #15070

Closed
KU348-code opened this issue Feb 17, 2021 · 7 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements

Comments

@KU348-code
Copy link

KU348-code commented Feb 17, 2021

Envoy is running in CentOS 8.3. Envoy version is as follows.

envoy version: 5c801b2/1.17.0/clean-getenvoy-28ef262-envoy/RELEASE/BoringSSL

Envoy configuration file is validated with the following command.

envoy --mode validate -c envoy.yaml

The contents of envoy.yaml is as follows.

overload_manager:
  refresh_interval: 0.25s
  resource_monitors:
  - name: envoy.resource_monitors.fixed_heap
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig
      max_heap_size_bytes: 2147483648 # 2 GiB
  actions:
  - name: envoy.overload_actions.shrink_heap
    triggers:
    - name: envoy.resource_monitors.fixed_heap
      threshold:
        value: 0.95
  - name: envoy.overload_actions.stop_accepting_requests
    triggers:
    - name: envoy.resource_monitors.fixed_heap
      threshold:
        value: 0.98

static_resources:

  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10000
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          use_remote_address: true
          http2_protocol_options:
            max_concurrent_streams: 100
          request_timeout: 300s
          access_log:
          - name: envoy.access_loggers.file
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
              path: /dev/stdout
          http_filters:
          - name: envoy.filters.http.router
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/"
                route:
                  cluster: service_envoyproxy_io

  clusters:
    - name: service_envoyproxy_io
      connect_timeout: 30s
      type: STATIC
      typed_extension_protocol_options:
        envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
          "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
          explicit_http_config:
            http2_protocol_options:
              max_concurrent_streams: 100
      load_assignment:
        cluster_name: service_envoyproxy_io
        endpoints:
        - lb_endpoints:
          - endpoint:
              address: 
                socket_address:
                  address: 127.0.0.1
                  port_value: 20000

The output of running the above envoy validation command is as follows.

[2021-02-17 14:46:48.700][1357][critical][main] [external/envoy/source/server/config_validation/server.cc:60] error initializing configuration 'envoy.yaml': Unable to parse JSON as proto (INVALID_ARGUMENT:(overload_manager.resource_monitors[0].typed_config): invalid value Invalid type URL, unknown type: envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig for type Any): {"static_resources":{"clusters":[{"type":"STATIC","load_assignment":{"cluster_name":"service_envoyproxy_io","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"port_value":48879,"address":"127.0.0.1"}}}}]}]},"name":"service_envoyproxy_io","typed_extension_protocol_options":{"envoy.extensions.upstreams.http.v3.HttpProtocolOptions":{"explicit_http_config":{"http2_protocol_options":{"max_concurrent_streams":100}},"@type":"type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions"}},"connect_timeout":"30s"}],"listeners":[{"address":{"socket_address":{"address":"0.0.0.0","port_value":48813}},"name":"listener_0","filter_chains":[{"filters":[{"typed_config":{"route_config":{"name":"local_route","virtual_hosts":[{"name":"local_service","routes":[{"route":{"cluster":"service_envoyproxy_io"},"match":{"prefix":"/"}}],"domains":["*"]}]},"@type":"type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager","http_filters":[{"name":"envoy.filters.http.router"}],"access_log":[{"typed_config":{"path":"/dev/stdout","@type":"type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog"},"name":"envoy.access_loggers.file"}],"stat_prefix":"ingress_http","use_remote_address":true,"http2_protocol_options":{"max_concurrent_streams":100},"request_timeout":"300s"},"name":"envoy.filters.network.http_connection_manager"}]}]}]},"overload_manager":{"actions":[{"triggers":[{"threshold":{"value":"0.95"},"name":"envoy.resource_monitors.fixed_heap"}],"name":"envoy.overload_actions.shrink_heap"},{"triggers":[{"name":"envoy.resource_monitors.fixed_heap","threshold":{"value":"0.98"}}],"name":"envoy.overload_actions.stop_accepting_requests"}],"resource_monitors":[{"typed_config":{"max_heap_size_bytes":"2147483648","@type":"type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig"},"name":"envoy.resource_monitors.fixed_heap"}],"refresh_interval":"0.25s"}}

Removing the entire overload_manager block found in config file envoy.yaml works fine though.

Please advice!

@KU348-code KU348-code added bug triage Issue requires triage labels Feb 17, 2021
@KU348-code KU348-code changed the title envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig is unknown envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig not recognized Feb 17, 2021
@junr03 junr03 added question Questions that are neither investigations, bugs, nor enhancements and removed bug triage Issue requires triage labels Feb 17, 2021
@junr03
Copy link
Member

junr03 commented Feb 17, 2021

Have you added the fixed heap resource monitor extension to your extensions build file? https://github.com/envoyproxy/envoy/tree/main/bazel#enabling-and-disabling-extensions

@KU348-code
Copy link
Author

KU348-code commented Feb 18, 2021

I did not perform a build of the Envoy from source myself. Instead, the following 3 commands mentioned in Envoy documentation to install Envoy in CentOS was used.

sudo yum install yum-utils
sudo yum-config-manager --add-repo https://getenvoy.io/linux/centos/tetrate-getenvoy.repo
sudo yum install getenvoy-envoy

By using the above method to install Envoy, is fixed heap resource monitor extension disabled?

@lambdai
Copy link
Contributor

lambdai commented Feb 18, 2021

Looks like it is not the fault of getenvoy.

$ ~/.getenvoy/builds/standard/1.17.0/linux_glibc/bin/envoy -c ../envoy.yaml 2>&1 |grep -i monitor
[2021-02-17 21:52:55.807][1120806][info][main] [external/envoy/source/server/server.cc:327]   envoy.resource_monitors: envoy.resource_monitors.fixed_heap, envoy.resource_monitors.injected_resource

Not an expert but I think fixed_heap promote from v2 to v3 since #14907

@mk46
Copy link
Contributor

mk46 commented Feb 18, 2021

5c801b2 , we didn't have envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig such type.
Try this one envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig .

@KU348-code
Copy link
Author

KU348-code commented Feb 19, 2021

Yes. Using envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig works. Thanks.

However, all sample configuration files found in the subpages of following link which makes use of overload_manager seems to use envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig instead. That's odd.

https://www.envoyproxy.io/docs/envoy/v1.17.0/

@mk46
Copy link
Contributor

mk46 commented Feb 19, 2021

envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig is working on main.. 5c801b2 is not containing any v3 FixedHeapConfig and behaviour is as expected.

@KU348-code
Copy link
Author

I see. Understand now. Thanks mk46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements
Projects
None yet
Development

No branches or pull requests

4 participants