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

fail with useful error on unmatched interface (bsc#990745) #575

Closed
wants to merge 7 commits into from

Commits on Sep 21, 2016

  1. add comments to help explain cryptic code

    It's amazing that this critical part of Crowbar's core code has remained
    cryptic for so long.  Let's make a start at documenting it so that
    future generations don't suffer the same pain.
    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    893bfbb View commit details
    Browse the repository at this point in the history
  2. don't use cryptic 1- or 2-byte variable names

    ... ever!
    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    498bfb1 View commit details
    Browse the repository at this point in the history
  3. make #lookup_interface_info always return a 3-element Array

    This isn't technically a bug, because in Ruby:
    
        a, b, c = [nil, nil]
    
    will result in c being assigned nil.  However it's more correct to
    be consistent in the number of elements the method returns.
    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    b434a5d View commit details
    Browse the repository at this point in the history
  4. output useful debugging on unmatched interface (bsc#990745)

    If we fail to find an interface matching a pattern such as "+10g1"
    for a given node, give some useful debugging.  We don't make it a
    warning, because there are cases where we expect this to happen,
    e.g. with rarely used networks such as 'os_sdn'.
    
    This helps more quickly identify incorrectly configured network.json
    files, and was experienced in a scenario where the Crowbar nodes were a
    mix of physical machines and VMs with slow virtio interfaces.
    
    https://bugzilla.suse.com/show_bug.cgi?id=990745
    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    df4d076 View commit details
    Browse the repository at this point in the history
  5. fail with useful error on unmatched admin interface (bsc#990745)

    Catch the case where we failed to find an admin interface for a node,
    and bail with a more helpful error message.
    
    This was experienced in a scenario where the Crowbar nodes were a mix of
    physical machines and VMs with slow virtio interfaces, but the
    network.json was incorrectly configured and the admin network conduit
    failed to match the slow virtio interfaces.
    
    https://bugzilla.suse.com/show_bug.cgi?id=990745
    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    d257291 View commit details
    Browse the repository at this point in the history
  6. remove unnecessary rescue nil

    "rescue nil" is not only a really bad habit, but it's completely
    unnecessary when looking up a value in a Hash.
    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    8d84239 View commit details
    Browse the repository at this point in the history
  7. fix indentation

    Adam Spiers committed Sep 21, 2016
    Configuration menu
    Copy the full SHA
    15bc4b2 View commit details
    Browse the repository at this point in the history