Coder Social home page Coder Social logo

Comments (4)

nrhodes91 avatar nrhodes91 commented on August 13, 2024

Resolved in #210, thanks!

from auter.

reaperzn avatar reaperzn commented on August 13, 2024

Hey @nrhodes91 Thanks for the timely fix.

While #210 does fix the specific case that @racker-markh mentioned, after reviewing the PR, maybe we should also look at moving the check_package_manager_lock call to after the pre-apply scripts loop. I was thinking along the same lines as Mark's issue where there may be a case where pre-apply scripts may take time to run or worse still, may perform some yum function which may cause a yum lock. The proposal here is to change:
https://github.com/rackerlabs/auter/blob/develop/auter.yumdnfModule#L148...L162

   if [[ "${RC}" -eq 100 ]]; then
    # Sleep before continuing with pre-scripts and updates
    SLEEP_DELAY=$((RANDOM % MAXDELAY))
    [[ ${SLEEP_DELAY} -gt 1 ]] && logit "INFO: Sleeping for ${SLEEP_DELAY} seconds"
    sleep ${SLEEP_DELAY}

    # Check for yum.lock file
    check_package_manager_lock

    for SCRIPT in "${PREAPPLYSCRIPTDIR}"/*; do
      run_script "${SCRIPT}" "Pre-Apply"
    done

    logit "INFO: Applying updates"
    HISTORY_BEFORE=$(${PACKAGE_MANAGER} history list)

to:

  if [[ "${RC}" -eq 100 ]]; then
    # Sleep before continuing with pre-scripts and updates
    SLEEP_DELAY=$((RANDOM % MAXDELAY))
    [[ ${SLEEP_DELAY} -gt 1 ]] && logit "INFO: Sleeping for ${SLEEP_DELAY} seconds"
    sleep ${SLEEP_DELAY}

    for SCRIPT in "${PREAPPLYSCRIPTDIR}"/*; do
      run_script "${SCRIPT}" "Pre-Apply"
    done

    # Check for yum.lock file
    check_package_manager_lock

    logit "INFO: Applying updates"
    HISTORY_BEFORE=$(${PACKAGE_MANAGER} history list)

from auter.

nrhodes91 avatar nrhodes91 commented on August 13, 2024

I understand where you are coming from, however if for example a pre-script stops a service in prep for patching, and then auter exits due to the yum lock, the system is in an unknown state. If we exit due to a yum lock before running any scripts, at least we know the state of the system has not changed.

from auter.

reaperzn avatar reaperzn commented on August 13, 2024

Point taken. Then I'll re-close this issue.

from auter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.