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

validation: Add config validation mode. (#499) #863

Merged
merged 33 commits into from
May 26, 2017

Commits on Apr 28, 2017

  1. Configuration menu
    Copy the full SHA
    51eba6e View commit details
    Browse the repository at this point in the history
  2. upstream: Move the ClusterManagerFactory into the Server::Instance, a…

    …nd add a factory method to it for the ClusterManager.
    
    This is preparatory to adding a ValidationClusterManagerFactory, which
    creates ValidationClusterManagers.
    Reuven Lazarus committed Apr 28, 2017
    Configuration menu
    Copy the full SHA
    2b80353 View commit details
    Browse the repository at this point in the history
  3. validation: Add config validation mode. (envoyproxy#499)

    This adds a --mode command-line flag. "--mode=serve" is the default and
    can be omitted; in that mode Envoy runs as it always has.
    
    With "--mode=validate" Envoy checks that the configuration file in
    --config-file is valid, then exits. "Valid" means that it performs the
    JSON schema check as usual, but also initializes as much of its internal
    state as possible, exiting with any errors as it would under
    "--mode=serve". When initialization is complete, instead of listening
    for traffic, Envoy prints an "OK" message to stderr and exits, returning
    success.
    
    In validation mode, to the extent possible, Envoy avoids interfering
    with its environment. For example, the hot-restart process is skipped,
    so validation can safely be run on the same machine as a serving Envoy.
    Validation mode also doesn't send any upstream traffic or open any
    listeners.
    
    It *does* attempt to read any files referenced in the config, like
    certs and private keys, so validation will fail if those files aren't
    located at the expected paths. A future "lite validation" mode, that
    mocks out the filesystem as well as the network, is not yet implemented
    as of this patch.
    Reuven Lazarus committed Apr 28, 2017
    Configuration menu
    Copy the full SHA
    10bf44f View commit details
    Browse the repository at this point in the history
  4. tools/check_format.py fix

    Reuven Lazarus committed Apr 28, 2017
    Configuration menu
    Copy the full SHA
    3e5a64c View commit details
    Browse the repository at this point in the history

Commits on May 1, 2017

  1. review comments

    Reuven Lazarus committed May 1, 2017
    Configuration menu
    Copy the full SHA
    235be89 View commit details
    Browse the repository at this point in the history
  2. tools/check_format.py fix (sigh)

    Reuven Lazarus committed May 1, 2017
    Configuration menu
    Copy the full SHA
    44e5b53 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2017

  1. review comments

    Reuven Lazarus committed May 8, 2017
    Configuration menu
    Copy the full SHA
    6ecdca9 View commit details
    Browse the repository at this point in the history
  2. check_format.py fix, again

    Reuven Lazarus committed May 8, 2017
    Configuration menu
    Copy the full SHA
    9fda0da View commit details
    Browse the repository at this point in the history
  3. use NOT_IMPLEMENTED instead of EnvoyException()

    Reuven Lazarus committed May 8, 2017
    Configuration menu
    Copy the full SHA
    b45e4ae View commit details
    Browse the repository at this point in the history

Commits on May 16, 2017

  1. Merge remote-tracking branch 'upstream/master' into validate

    Reuven Lazarus committed May 16, 2017
    Configuration menu
    Copy the full SHA
    d351abc View commit details
    Browse the repository at this point in the history
  2. Envoy namespaces to match upstream

    Reuven Lazarus committed May 16, 2017
    Configuration menu
    Copy the full SHA
    8555de0 View commit details
    Browse the repository at this point in the history
  3. Remove the list<WorkerPtr> from ValidationInstance.

    Reuven Lazarus committed May 16, 2017
    Configuration menu
    Copy the full SHA
    41e3e62 View commit details
    Browse the repository at this point in the history
  4. Replace one more EnvoyException that I missed earlier

    Reuven Lazarus committed May 16, 2017
    Configuration menu
    Copy the full SHA
    7732881 View commit details
    Browse the repository at this point in the history
  5. Include some BUILD updates that got missed in the merge

    Reuven Lazarus committed May 16, 2017
    Configuration menu
    Copy the full SHA
    a3af91c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d4770dc View commit details
    Browse the repository at this point in the history

Commits on May 19, 2017

  1. review comments

    Reuven Lazarus committed May 19, 2017
    Configuration menu
    Copy the full SHA
    9948580 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'upstream/master' into validate

    Reuven Lazarus committed May 19, 2017
    Configuration menu
    Copy the full SHA
    20a021b View commit details
    Browse the repository at this point in the history

Commits on May 22, 2017

  1. Remove ValidationHotRestart.

    Reuven Lazarus committed May 22, 2017
    Configuration menu
    Copy the full SHA
    10a4556 View commit details
    Browse the repository at this point in the history
  2. Add tests for ValidationAsyncClient and ValidationClusterManager.

    These don't do anything except test that the mocked out methods are
    mocked out. They're purely to keep coverage from dropping.
    Reuven Lazarus committed May 22, 2017
    Configuration menu
    Copy the full SHA
    47670a2 View commit details
    Browse the repository at this point in the history
  3. Move validateConfig() out of main.cc for testability.

    Reuven Lazarus committed May 22, 2017
    Configuration menu
    Copy the full SHA
    f82eea8 View commit details
    Browse the repository at this point in the history
  4. Test ValidationConnectionHandler too

    Reuven Lazarus committed May 22, 2017
    Configuration menu
    Copy the full SHA
    93d6069 View commit details
    Browse the repository at this point in the history
  5. fix format

    Reuven Lazarus committed May 22, 2017
    Configuration menu
    Copy the full SHA
    569265b View commit details
    Browse the repository at this point in the history

Commits on May 24, 2017

  1. review comments

    Reuven Lazarus committed May 24, 2017
    Configuration menu
    Copy the full SHA
    aecac42 View commit details
    Browse the repository at this point in the history
  2. Refactor ConfigurationImplTest to dedupe the setup noise.

    Reuven Lazarus committed May 24, 2017
    Configuration menu
    Copy the full SHA
    1a7d6c7 View commit details
    Browse the repository at this point in the history
  3. tools/check_format.py fix

    Reuven Lazarus committed May 24, 2017
    Configuration menu
    Copy the full SHA
    9aa303b View commit details
    Browse the repository at this point in the history
  4. Add docs for validation mode.

    Reuven Lazarus committed May 24, 2017
    Configuration menu
    Copy the full SHA
    8499fb1 View commit details
    Browse the repository at this point in the history
  5. Merge remote-tracking branch 'upstream/master' into validate

    Reuven Lazarus committed May 24, 2017
    Configuration menu
    Copy the full SHA
    1e4ed13 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2017

  1. Add death tests for NOT_IMPLEMENTED methods.

    Reuven Lazarus committed May 25, 2017
    1 Configuration menu
    Copy the full SHA
    18fb3c2 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2017

  1. exclude config_validation/ from coverage metrics, since it has so man…

    …y NOT_IMPLEMENTED lines that coverage doesn't count
    Reuven Lazarus committed May 26, 2017
    Configuration menu
    Copy the full SHA
    f7ab514 View commit details
    Browse the repository at this point in the history
  2. Revert "Add death tests for NOT_IMPLEMENTED methods."

    This reverts commit 18fb3c2. The tests
    were only added for the coverage metric, and they don't increase the
    coverage metric.
    Reuven Lazarus committed May 26, 2017
    Configuration menu
    Copy the full SHA
    1fdbb46 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f0918d2 View commit details
    Browse the repository at this point in the history
  4. catch up with upstream api change

    Reuven Lazarus committed May 26, 2017
    Configuration menu
    Copy the full SHA
    1a99564 View commit details
    Browse the repository at this point in the history
  5. tools/check_format.py fix

    Reuven Lazarus committed May 26, 2017
    Configuration menu
    Copy the full SHA
    c95e78c View commit details
    Browse the repository at this point in the history