1. 24 Nov, 2020 2 commits
  2. 20 Nov, 2020 5 commits
    • Christian Kellner's avatar
      manager+sysfs: wait for hosts instead of domains · 8be049a5
      Christian Kellner authored
      In the manager's initialization, we want to make sure that we have
      at least one domain controller online in order detect the security
      level. Additionally, now that stale domains are cleaned up on store
      upgrades, we also want to make sure that domain controllers are
      fully initialized and the corresponding BotlDomain is online, so
      that we don't accidentally clean up a non-stale domain. In order
      to do so, we wait for at least one host controller to be present,
      not just the plain domain. For this we enumerate all domains and
      for each domain we enumerate the thunderbolt udev device directly
      beneath it (should only be one).
      Rename and re-purpose the various `count_domains` functions.
      Adapt the test to add host devices to the corresponding domains.
      8be049a5
    • Christian Kellner's avatar
      manager: better logging for domain de-registration · f3395f9c
      Christian Kellner authored
      Use the LOG_DOM () macro and do not use `bolt_domain_get_id`
      which might return NULL for disconnected domains.
      f3395f9c
    • Christian Kellner's avatar
      test/integration: cleanup stale domains check · 2f9a04d6
      Christian Kellner authored
      Simulate stale domains by creating a store with four domains, one
      of which has a bootacl journal with entries. Since the store does
      not have a 'version' file, an upgrade will be performed which will
      lead to the cleanup of stale domains. All domains, except the one
      with the non-empty bootacl journal should be cleaned up.
      2f9a04d6
    • Christian Kellner's avatar
      manager: clean up stale domains on store upgrade · 9e859394
      Christian Kellner authored
      When the store is upgraded, clean up any stale domains. Previous
      versions of bolt (< 0.9.1) would store domains that did not have
      stable uuids, i.e. their uuid would change on every boot. These
      stored domains would be loaded and exported but would never come
      online, since they can not ever by matched to an online domain.
      When the store cleanup method is executed, in the manager's
      initialization method, the domain controller should either be
      powered (they use runtime power management only and are thus not
      physically powered down on ice lake anyway) or force-powered and
      thus any domain that is not yet online will be removed. This can
      fail if the domain has a boot acl journal with entries, which
      protects the loss of data for domains that are not force-powered,
      maybe because they are even slower, but do have a stable uuid.
      9e859394
    • Christian Kellner's avatar
      manager: correctly report upgraded version · 3ec3e0ef
      Christian Kellner authored
      After the store was upgraded, get the new version from the store
      and report that in the logs, not the old, pre-upgrade version.
      3ec3e0ef
  3. 17 Nov, 2020 1 commit
    • Christian Kellner's avatar
      manager: un-export device in deregister_device · 04c3bb1e
      Christian Kellner authored
      Remove some duplicated code by moving the un-export code for the
      device to a central location: `manager_deregister_device`. This
      method will be called for all devices that can be de-registered,
      i.e. either devices that got disconnected and are not store via
      the `handle_udev_device_removed` udev event handler, or devices
      that got remove from the store and are disconnected. The latter
      is handled via `handle_store_device_removed`. In both cases the
      device should be de-registered and (if exported) be un-exported.
      Thus this is where the un-export code is now moved to.
      04c3bb1e
  4. 10 Nov, 2020 28 commits
  5. 09 Nov, 2020 4 commits