Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Feat/ota 4984/secondary replacement #1686

Merged
merged 10 commits into from
Jun 17, 2020

Commits on Jun 17, 2020

  1. Allow ECU re-registration to support changing Secondaries.

    Works for Virtual Secondaries, but still a work in progress for IP
    Secondaries.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    66b2c85 View commit details
    Browse the repository at this point in the history
  2. Fix IP Secondary re-registration and some broken tests.

    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    1ed4d38 View commit details
    Browse the repository at this point in the history
  3. Expand Secondary registration tests.

    Now they cover adding, remove, and replacing Secondary ECUs.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    57673c8 View commit details
    Browse the repository at this point in the history
  4. Test adding, removing, and replacing IP Secondaries.

    The logic for matching addresses to ECUs is not trivial, so it's worth
    being extra careful. Also test replacing an ECU that reuses the same
    address and port and that we correctly track an ECU that changes its
    address or port.
    
    Also note some the timeouts (and some ordering issues) that were
    necessary to get some of these tests to pass. These are more reasons why
    a proper connection manager would be nice to have; things like this
    really shouldn't be necessary.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    a00ef7c View commit details
    Browse the repository at this point in the history
  5. Fix a bogus message about unregistered ECUs.

    We no longer track unregistered ECUs, since that is no longer a problem.
    Still dump anything in the database with that flag, just in case, but it
    shouldn't happen.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    b11a785 View commit details
    Browse the repository at this point in the history
  6. Add a comment about a semi-obscure almost-bug.

    There's no real problem, just an ugly log message that will go away
    eventually on its own.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    e473c86 View commit details
    Browse the repository at this point in the history
  7. Always read the device ID from the cert if available.

    For device credential provisioning, it is still a fatal error if the
    cert is unavailable. For shared cred prov, we revert to the old behavior
    of generating a random pet name if the cert is unavailable.
    
    This is generally only observable if you attempt to replace a Primary
    ECU, which requires reusing the same device certificate.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    9548b88 View commit details
    Browse the repository at this point in the history
  8. Fall back to "unknown" image name instead of an empty string.

    The backend does not accept empty filenames, but we have to say
    something. This comes up if you wipe a Secondary's database but keep the
    image file.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    64aac55 View commit details
    Browse the repository at this point in the history
  9. uptane_serial_test: Get rid of unused input parameter.

    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    3ca4e32 View commit details
    Browse the repository at this point in the history
  10. Only store ECU changes if we successfully registered the ECUs.

    If registration fails (due to the server complaining about an update in
    progress, for example), we want to make it easier to undo the changes
    and prevent re-registration.
    
    Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
    pattivacek committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    d943cd9 View commit details
    Browse the repository at this point in the history