Comments (4)
Resolved in #210, thanks!
from auter.
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.
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.
Point taken. Then I'll re-close this issue.
from auter.
Related Issues (20)
- Auter should have a --maxdelay flag for running from the command line HOT 3
- Ubuntu 'apply' fails with cron HOT 1
- Yum in RHEL <=6.6 doesn't have --downloadonly HOT 2
- Update release process documentation
- auter --prep and auter --apply should log how many packages downloaded/installed. HOT 5
- Remove the 01-spellcheck.sh test script HOT 1
- date command in configsnap pre/post scripts HOT 4
- check_package_manager_lock can fail when yum is not running due to stale pid file HOT 1
- Add final STATUS line to 'output files' i.e. /var/lib/auter/last-{phase}-output-default HOT 4
- Auter may reinstall a package during --apply which has been uninstalled since --prep
- Auter not available on CentOS 8? HOT 4
- Record status of pre and post steps in /var/lib/auter status files HOT 1
- Auter Pre & Post Snapshot conflict (with timestamps) HOT 2
- Multilib/arch rpms may fail the "is this an update" test HOT 1
- auter-updater.com website dead HOT 1
- auter-updater.com site does not support https HOT 2
- Is this project being maintained? HOT 1
- Request Maintainer status HOT 4
- Prepare for DNF 5 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auter.