Permalink
Commits on Dec 14, 2017
Commits on Dec 13, 2017
  1. Merge "Deprecate file injection"

    Zuul committed with openstack-gerrit Dec 13, 2017
  2. Raise MarkerNotFound if BuildRequestList.get_by_filters doesn't find …

    mriedem committed Dec 13, 2017
    …marker
    
    For some reason, probably because build requests are meant to be short lived
    and we don't get a lot of bugs about paging misbehavior, when paging instances
    with a marker, we didn't raise MarkerNotFound if we didn't find the marker in
    the list of build requests. Doing so would match what we do when paging over
    cells and listing instances using a marker. Once we find the marker, be that
    in build_requests, or one of the cells, we need to set the marker to None to
    stop looking for it elsewhere if we have more space to fill our limit.
    
    For example, see change I8a957bebfcecd6ac712103c346e028d80f1ecd7c.
    
    This patch fixes the issue by raising MarkerNotFound from BuildRequestList
    get_by_filters if there is a marker and we didn't find a build request for
    it. The compute API get_all() method handles that as normal and continues
    looking for the marker in one of the cells.
    
    Change-Id: I1aa3ca6cc70cef65d24dec1e7db9491c9b73f7ab
    Closes-Bug: #1737856
  3. Merge "VMware: fix memory stats"

    Zuul committed with openstack-gerrit Dec 13, 2017
Commits on Dec 12, 2017
  1. Merge "remove reserve_quota_delta"

    Zuul committed with openstack-gerrit Dec 12, 2017
  2. [placement] Add info about last-modified to contrib docs

    cdent committed Dec 6, 2017
    Add some instructions on how and when to add last-modified headers
    when creating a new handler in the placement API.
    
    Change-Id: I8f0c3006d1bb97d228f73256c58a79235cd12670
  3. [placement] Add cache headers to placement api requests

    cdent committed Nov 20, 2017
    In relevant requests to the placement API add last-modified
    and cache-control headers.
    
    According the HTTP 1.1 RFC headers last-modified headers SHOULD always
    be sent and should have a tie to the real last modified time. If we do
    send them, we need Cache-Control headers to prevent inadvertent caching
    of resources.
    
    This change adds a microversion 1.15 which adds the headers to GET
    requests and some PUT or POST requests.
    
    Despite what it says 'no-cache' means "check to see if the version you
    have is still valid as far as the server is concerned". Since our server
    doesn't currently validate conditional requests and will always return an
    entity, it ends up meaning "don't cache" (which is what we want).
    
    The main steps in the patch are:
    
    * To both the get single entity and get collection handlers add
      response.cache_control = 'no-cache'
    * For single entity add response.last_modified = obj.updated_at or
      obj.created_at
    * For collections, discover the max modified time when traversing the
      list of objects to create the serialized JSON output. In most of
      those loops an optimization is done where we only check for
      last-modified information if we have a high enough microversion such
      that the information will be used. This is not done when listing
      inventories because the expectation is that no single resource
      provider will ever have a huge number of inventory records.
    * Both of the prior steps are assisted by a new util method:
      pick_last_modfied.
    
    Where a time cannot be determined the current time is used.
    
    In typical placement framework fashion this has been done in a very
    explicit way, as it makes what the handler is doing very visible, even
    though it results in a bit of boilerplate.
    
    For those requests that are created from multiple objects or by doing
    calculations, such as usages and aggregate associations, the current time
    is used.
    
    The handler for PUT /traits is modified a bit more extensively than some
    of the others: This is because the method can either create or validate
    the existence of the trait. In the case where the trait already exists,
    we need to get it from the DB to get its created_at time. We only do
    this if the microversion is high enough (at least 1.15) to warrant
    needing the info.
    
    Because these changes add new headers (even though they don't do
    anything) a new microversion, 1.15, is added.
    
    Partial-Bug: #1632852
    Partially-Implements: bp placement-cache-headers
    
    Change-Id: I727d4c77aaa31f0ef31c8af22c2d46cad8ab8b8e
  4. Stabilize test_live_migration_abort func test

    gibizer committed Dec 12, 2017
    The test_live_migration_abort test step in the
    test_live_migration_actions notification sample test was unstable.
    The test starts a live migration and then deletes the migration object
    via the REST API to abort it. The test randomly failed to find the
    migration object on the REST API. Based on the comparision of the logs
    of the successful and unsuccesful runs it was visible that in the
    unsuccesful case the test gave up to wait for the migration object too
    early. In a succesful run it took 1.5 seconds after the the migration
    API call to have the migration object appear on the API while in an
    unsuccessful case the test gave up after 1 second.
    
    This early give up was cause by the fact that the loop trying to
    get a migration does not applied any delay between such trials and
    therefore the 20 attempts run out quickly.
    
    This patch introduces a short sleep between trials to stabilize the
    test.
    
    Change-Id: I6be3b236d8eadcde5714c08069708dff303dfd4d
    Closes-Bug: #1736976
  5. Deprecate file injection

    mriedem committed Nov 21, 2017
    This microversion makes the following changes:
    
    1. Deprecates personality files from POST /servers and the rebuild
       server action APIs.
    2. Adds the ability to pass new user_data to the rebuild server
       action API.
    3. Personality / file injection related limits and quota resources
       are removed from the limits, os-quota-sets and os-quota-class-sets
       APIs.
    
    Implements blueprint deprecate-file-injection
    
    Change-Id: Ia89eeb6725459c35369e8f790f68ad9180bd3aba
  6. VMware: fix memory stats

    rgerganov committed Oct 31, 2017
    The total memory for the vCenter cluster managed by Nova
    should be the aggregated sum of total memory of each ESX host in the
    cluster. This is more accurate than using the available memory of the
    resource pool associated to the cluster.
    
    Partial-Bug: #1462957
    Change-Id: I030cee9cebb0f030361aa6bbb612da5cd4202a7f
  7. api-ref: Fix a description for 'guest_format'

    natsumetakashi committed Dec 6, 2017
    There is a wrong format 'ephemeral' in the description.
    So remove it and valid formats ('ext2', 'ext3', 'ext4' and 'xfs')
    are added.
    The parameter is optional, so fix it as well.
    
    Change-Id: Icc04cac3a287955ab1a98b7813e3c7ec8183b120
    Closes-Bug: #1736502
  8. Move the claim_resources method to scheduler utils

    EdLeafe committed with mriedem Oct 10, 2017
    This method was originally in the filter_scheduler, but as it will need
    to be called by the conductor too, it should be moved to a common location.
    
    Blueprint: return-alternate-hosts
    
    Change-Id: Ia6e008a680fdd373fc4a9beb98fdf5f8fbb582ed
  9. Change RPC for select_destinations()

    EdLeafe committed with mriedem Oct 27, 2017
    This changes the RPC call for select_destinations() as made by the
    conductor. The previous patch added the logic on the scheduler side;
    this patch changes the conductor side to use the two new parameters that
    flag the new behaviors for Selection objects and alternate hosts.
    
    Blueprint: return-alternate-hosts
    
    Change-Id: I70b11dd489d222be3d70733355bfe7966df556aa
Commits on Dec 11, 2017
  1. Re-use existing ComputeNode on ironic rebalance

    JohnGarbutt committed with mriedem Sep 29, 2017
    When a nova-compute service dies that is one of several ironic based
    nova-compute services running, a node rebalance occurs to ensure there
    is still an active nova-compute service dealing with requests for the
    given instance that is running.
    
    Today, when this occurs, we create a new ComputeNode entry. This change
    alters that logic to detect the case of the ironic node rebalance and in
    that case we re-use the existing ComputeNode entry, simply updating the
    host field to match the new host it has been rebalanced onto.
    
    Previously we hit problems with placement when we get a new
    ComputeNode.uuid for the same ironic_node.uuid. This reusing of the
    existing entry keeps the ComputeNode.uuid the same when the rebalance of
    the ComputeNode occurs.
    
    Without keeping the same ComputeNode.uuid placement errors out with a 409
    because we attempt to create a ResourceProvider that has the same name
    as an existing ResourceProvdier. Had that worked, we would have noticed
    the race that occurs after we create the ResourceProvider but before we
    add back the existing allocations for existing instances. Keeping the
    ComputeNode.uuid the same means we simply look up the existing
    ResourceProvider in placement, avoiding all this pain and tears.
    
    Closes-Bug: #1714248
    Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
    Change-Id: I4253cffca3dbf558c875eed7e77711a31e9e3406
  2. Add instance action db and obj pagination support.

    Yikun committed with mriedem Dec 7, 2017
    This will be used by instance action pagination API.
    
    Add limit/marker/filters support to get_by_instance_uuid of
    InstanceActionList object, also add limit/marker/filters support to
    actions_get method of db.
    
    Part of blueprint pagination-add-changes-since-for-instance-action-list
    
    Change-Id: Ic7dd6480a4b250ae6529d94ee0386b5e95b0ca04
  3. Update Instance action's updated_at when action event updated.

    Yikun committed with mriedem Sep 26, 2017
    When we do some operation on instances, will record some
    instance action(such as 'create') in 'instance_actions' table,
    and some sub-event will record(such as
    compute__do_build_and_run_instance) in 'instance_actions_events'
    table.
    
    we need update the instance action's updated_at when instance
    action events are created and instance action created or finished.
    
    Change-Id: I75a827b759b59773c08ffc6b1e3e54d6189b5853
    Closes-Bug: #1719561