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

Handle Upgrades and Alloc.TaskResources modification #6922

Merged
merged 9 commits into from
Jan 28, 2020

Commits on Jan 8, 2020

  1. CLI: protect against AllocatedResources being nil

    Mahmood Ali committed Jan 8, 2020
    Configuration menu
    Copy the full SHA
    db49137 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2020

  1. Migrate old alloc structs on read

    This commit ensures that Alloc.AllocatedResources is properly populated
    when read from persistence stores (namely Raft and client state store).
    The alloc struct may have been written previously by an arbitrary old
    version that may only populate Alloc.TaskResources.
    Mahmood Ali committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    7783c13 View commit details
    Browse the repository at this point in the history
  2. client: canonicalize alloc runner on RPC

    Mahmood Ali committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    0a5fd78 View commit details
    Browse the repository at this point in the history
  3. client: stop using alloc.TaskResources

    Now that alloc.Canonicalize() is called in all alloc sources in the
    client (i.e. on state restore and RPC fetching), we no longer need to
    check alloc.TaskResources.
    
    alloc.AllocatedResources is always non-nil through alloc runner.
    Though, early on, we check for alloc validity, so NewTaskRunner and
    TaskEnv must still check.  `TestClient_AddAllocError` test validates
    that behavior.
    Mahmood Ali committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    058076a View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2020

  1. canonicalize allocs from plan results too

    Mahmood Ali committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    4f36d4b View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2020

  1. address review comments

    Mahmood Ali committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    3291523 View commit details
    Browse the repository at this point in the history
  2. actually always canonicalize alloc.Job

    alloc.Job may be stale as well and need to migrate it.  It does cost
    extra cycles but should be negligible.
    Mahmood Ali committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    4813863 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2020

  1. client: canonicalize alloc.Job on restore

    There is a case for always canonicalizing alloc.Job field when
    canonicalizing the alloc.  I'm less certain of implications though, and
    the job canonicalize hasn't changed for a long time.
    
    Here, we special case client restore from database as it's probably the
    most relevant part.  When receiving an alloc from RPC, the data should
    be fresh enough.
    Mahmood Ali committed Jan 28, 2020
    Configuration menu
    Copy the full SHA
    438f98c View commit details
    Browse the repository at this point in the history
  2. tests: run_for is already a string

    Mahmood Ali committed Jan 28, 2020
    Configuration menu
    Copy the full SHA
    99bc650 View commit details
    Browse the repository at this point in the history