Permalink
Commits on Feb 21, 2018
  1. Avoid exploding if guest refuses to detach a volume

    kk7ds committed Feb 20, 2018
    When we run detach_volume(), the guest has to respond to the ACPI
    eject request in order for us to proceed. It may not do this at all
    if the volume is mounted or in-use, or may not by the time we time out
    if lots of dirty data needs flushing. Right now, we let the failure
    exception bubble up to our caller and we log a nasty stack trace, which
    doesn't really convey the reason (and that it's an expected and
    reasonable thing to happen).
    
    Thus, this patch catches that, logs the situation at warning level and
    avoids the trace.
    
    Change-Id: I3800b466a50b1e5f5d1e8c8a963d9a6258af67ee
    Closes-Bug: #1750680
Commits on Feb 20, 2018
  1. Detach volumes when deleting a BFV server pre-scheduling

    mriedem committed Feb 15, 2018
    If the user creates a volume-backed server from an existing
    volume, the API reserves the volume by creating an attachment
    against it. This puts the volume into 'attaching' status.
    
    If the user then deletes the server before it's created in a
    cell, by deleting the build request, the attached volume is
    orphaned and requires admin intervention in the block storage
    service.
    
    This change simply pulls the BDMs off the BuildRequest when
    we delete the server via the build request and does the same
    local cleanup of those volumes as we would in a "normal" local
    delete scenario that the instance was created in a cell but
    doesn't have a host.
    
    We don't have to worry about ports in this scenario since
    ports are created on the compute, in a cell, and if we're
    deleting a build request then we never got far enough to
    create ports.
    
    Change-Id: I1a576bdb16befabe06a9728d7adf008fc0667077
    Partial-Bug: #1404867
  2. Add functional recreate test of deleting a BFV server pre-scheduling

    mriedem committed Feb 15, 2018
    This is another wrinkle for bug 1404867 where we create a
    volume-backed server, create an attachment on the volume which
    puts the volume in 'attaching' status, and then delete the server
    before it's actually created in a cell.
    
    In this case, the _delete_while_booting code in the compute API
    finds and deletes the BuildRequest before the instance was ever
    created in a cell.
    
    The bug is that _delete_while_booting in the API doesn't also
    process block device mappings and unreserve/delete attachments
    on the volume, which orphans the volume and can only be fixed
    with admin intervention in the block storage service.
    
    Change-Id: Ib65acc671711eae7aee65df9cd5c6b2ccb559f5c
    Related-Bug: #1404867
  3. Clean up ports and volumes when deleting ERROR instance

    ankit-agrawal authored and mriedem committed Sep 23, 2015
    Usually, when instance.host = None, it means the instance was never
    scheduled. However, the exception handling routine in compute manager
    [1] will set instance.host = None and set instance.vm_state = ERROR
    if the instance fails to build on the compute host. If that happens, we
    end up with an instance with host = None and vm_state = ERROR which may
    have ports and volumes still allocated.
    
    This adds some logic around deleting the instance when it may have
    ports or volumes allocated.
    
      1. If the instance is not in ERROR or SHELVED_OFFLOADED state, we
         expect instance.host to be set to a compute host. So, if we find
         instance.host = None in states other than ERROR or
         SHELVED_OFFLOADED, we consider the instance to have failed
         scheduling and not require ports or volumes to be freed, and we
         simply destroy the instance database record and return. This is
         the "delete while booting" scenario.
    
      2. If the instance is in ERROR because of a failed build or is
         SHELVED_OFFLOADED, we expect instance.host to be None even though
         there could be ports or volumes allocated. In this case, run the
         _local_delete routine to clean up ports and volumes and delete the
         instance database record.
    
    Co-Authored-By: Ankit Agrawal <ankit11.agrawal@nttdata.com>
    Co-Authored-By: Samuel Matzek <smatzek@us.ibm.com>
    Co-Authored-By: melanie witt <melwittt@gmail.com>
    
    Closes-Bug: 1404867
    Closes-Bug: 1408527
    
    [1] https://github.com/openstack/nova/blob/55ea961/nova/compute/manager.py#L1927-L1929
    
    Change-Id: I4dc6c8bd3bb6c135f8a698af41f5d0e026c39117
  4. Merge "Don't modify objects directly"

    Zuul authored and openstack-gerrit committed Feb 20, 2018
  5. Merge "libvirt: add Linux distribution guest only description for inj…

    Zuul authored and openstack-gerrit committed Feb 20, 2018
    …ect_xxx options"
Commits on Feb 19, 2018
  1. Merge "Store block device mappings in cell0"

    Zuul authored and openstack-gerrit committed Feb 19, 2018
  2. Fix PatternPropertiesTestCase for py 3.6

    cdent committed Feb 19, 2018
    A python version check was only checking for 3.5. As noted
    in the pre-existing comment, an exception message is not a
    particularly stable interface so specific-to-minor-version
    check is maintained.
    
    Change-Id: I441b90e911fbac033e8cdea96114db22cba96ac5
    Closes-Bug: #1750355
Commits on Feb 18, 2018
  1. Imported Translations from Zanata

    OpenStack Proposal Bot
    OpenStack Proposal Bot committed Feb 18, 2018
    For more information about this automatic import see:
    https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
    
    Change-Id: I668357e0c12e37a2adbad7691671583d98b1b564
Commits on Feb 17, 2018
  1. Merge "Updated from global requirements"

    Zuul authored and openstack-gerrit committed Feb 17, 2018
  2. Updated from global requirements

    OpenStack Proposal Bot
    OpenStack Proposal Bot committed Feb 17, 2018
    Change-Id: If3af95c2c137c40a394cbdc445de91d1c0074d57
  3. Remove single quotes from posargs on stestr run commands

    mtreinish committed Feb 16, 2018
    This commit removes the single quotes from all the stestr run commands
    in the tox.ini. These were originally added as a workaround from the
    ostestr days to ensure people could run a subset of tests with a regex
    like:
    
      tox -epy27 regex
    
    With the switch to stestr this is no longer needed because stestr treats
    extra arguments as a filter regex. Quoting the posargs has a negative
    effect because '--' parameters are treated as a string on input instead
    of a parameter.
    
    Fixing this also uncovered another issue in the stestr commands for the
    functional jobs. The CLI arg for stestr versions <=1.1.0 is
    --group_regex not --group-regex. This commit fixes this to make those
    jobs pass without the quotes.
    
    Change-Id: I512a517fa6890b29de24060376b4d7e061dc3add
  4. Merge "Trivial: Update help of enabled_filters"

    Zuul authored and openstack-gerrit committed Feb 17, 2018