Repository navigation
Fixed hub upgrade PG migration failing with Permission denied on old binaries - #2575
nickanderson wants to merge 1 commit into
Conversation
|
@cf-bottom jenkins please |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14862/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14862/ |
|
@cf-bottom jenkins, please |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14867/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14867/ |
|
@craigcomstock what do you think about this one? I think the failure is a flake. |
craigcomstock
left a comment
There was a problem hiding this comment.
It's OK but I would prefer explicitly checking the state of pg binaries rather than just trying to execute pg_ctl, modifying pg_ctl that might be there and trying again.
Would be good to get explicit information out of the failure, like does pg_ctl exist? If cfpostgres can't run it, what are it's ownership, permissions, file attributes?
|
Agreed, the retry was guesswork. 577b356 replaces it with explicit checks before the database is touched: does On the masterfiles side, cfengine/masterfiles#3226 stops the CFE-951 perms promises from recursing into |
Addressed, now explicitly checking the state of pg executablity
6dd46e7 to
dfe49a2
Compare
dfe49a2 to
13fa9da
Compare
Now killing cf-agents still running after a wait
| # things, like permissions under state/pg (ENT-14899). Gives running agents | ||
| # 1.5 times the average agent run time from promise_summary.log (150s if | ||
| # unknown) to finish, then kills them. Does nothing without pgrep. | ||
| command -v pgrep >/dev/null || return 0 |
There was a problem hiding this comment.
this should fail not return 0
…binaries Ticket: ENT-14899 Changelog: Title
13fa9da to
bcfa90c
Compare
craigcomstock
left a comment
There was a problem hiding this comment.
looks good! one optional nit.
| safe_cp "$BACKUP_DIR" bin "$PREFIX" | ||
| safe_cp_nolink "$BACKUP_DIR" bin "$PREFIX" | ||
| # Ensure restored old binaries are executable by cfpostgres. | ||
| chmod 755 "$PREFIX/bin"/* 2>/dev/null || true |
There was a problem hiding this comment.
are there files in bin which should not be 755?
There was a problem hiding this comment.
the rpm sets everything in bin to 755 so I think it's OK but i could limit it to pg_ctl, pg_dumpall, postgres, and pg_controldata if you prefer
|
@cf-bottom jenkins please |
|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14883/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14883/ |
Copies
bininto the PostgreSQL backup instead of hardlinking it, and checks/repairs that cfpostgres can execute the old binaries before migrating.Ticket: ENT-14899