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

daemon: Add new Reload D-Bus method #1311

Closed
wants to merge 4 commits into from
Closed

Commits on Mar 23, 2018

  1. daemon: Automatically reload sysroot before txn

    In this PR: coreos#1309
    I was hitting race conditions running `ostree admin pin` then
    `rpm-ostree cleanup` as it was possible that the daemon hadn't handled
    the inotify on the sysroot and reloaded the deployment state before
    the txn request came in.
    
    Close this race by doing an implicit `reload` before starting a txn.
    This is a pretty efficient operation because for the sysroot we're
    just doing a `stat()` and comparing mtime.
    
    Implementation wise, change the external API to drop the "did change"
    boolean as nothing outside of the `sysroot.c` file used it.
    
    A followup to this would be changing the `status` CLI to call a
    (new) DBus API like `RequestReload` that at least did the sysroot
    reload if the daemon was otherwise idle or so?  And it'd be available
    to unprivileged users.
    cgwalters committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    82ee68d View commit details
    Browse the repository at this point in the history
  2. daemon: Rename sysroot_reload to be more descriptive

    Follow-up to previous commit. Since we have so many concepts called
    "sysroot" and "configs", let's be explicit with our naming here to be
    sure we know what we're calling.
    jlebon committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    b38e3ad View commit details
    Browse the repository at this point in the history
  3. daemon: Add new Reload D-Bus method

    Add a new `Reload` method as a softer alternative to `ReloadConfig`.
    We'll also make use of this on the client side to sync with the daemon.
    jlebon committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    570c7fa View commit details
    Browse the repository at this point in the history
  4. app/dbus: Always call Reload() after transaction

    Specifically in this case, this allows us to close a race condition
    during `upgrade --check` where the `CachedUpdate` property might not
    have been updated yet when we read it after finishing the transaction.
    jlebon committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    adc9524 View commit details
    Browse the repository at this point in the history