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

Bug 1913536: update.go: add broken symlink check + removal during unit enable #2338

Merged

Commits on Jan 15, 2021

  1. update.go: add broken symlink check + removal during unit enable

    If unit enable fails, remove broken symlinks in multi-user.target.wants
    and try again. This fixes a bug where enables would fail on cluster upgrades
    with RHEL 7 nodes between 4.6 -> 4.7.
    
    Context: before openshift#2145,
    the MCO hard coded a symlink from /etc/system/systemd/$UNIT to
    /etc/systemd/system/multi-user.target.wants/$UNIT, which is not the case
    for every unit and thus caused broken symlinks. On RHCOS/FCOS, the systemd
    version is newer and is able to remove broken symlinks, but on RHEL 7 nodes,
    it will not first attempt to remove broken symlinks and thus fails the
    enable. As a workaround, this PR thus attempts to remove broken symlinks
    when the first enable fails, and then try again. Successful FCOS/RHCOS upgrades
    should not hit this, and failing ones would report full errors.
    
    The error checking is perhaps a bit overkill but the original bug case should
    only run through this logic once before it is fixed. Future errors are likely
    actual errors and will be reported as such.
    
    Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
    yuqi-zhang committed Jan 15, 2021
    Configuration menu
    Copy the full SHA
    ea1d58c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e90105 View commit details
    Browse the repository at this point in the history