Comments (3)
When we updated fluke to flux-accounting 0.20, the update script tried to run but failed with the above when running as the flux user. Probably because it is running from flux cron in the broker's current working directory which is /:
[root@fluke1:flux]# ps -fu flux|grep broker
flux 2067 1 0 10:32 ? 00:00:55 broker --config-path=/etc/fl
[root@fluke1:flux]# ls -l /proc/2067/cwd
lrwxrwxrwx 1 flux flux 0 Oct 5 12:44 /proc/2067/cwd -> /
@grondo captured the cron error:
ate-fshare; /bin/flux account-priority-update"": "flux-accounting database out of date; please update DB with 'flux account-update-db' before running commands"
te-fshare; /bin/flux account-priority-update"": "ERROR:root:unable to open database file"
ate-fshare; /bin/flux account-priority-update"": "flux-accounting database out of date; updating DB with 'flux account-update-db' before sending infomation to plugin"
te-fshare; /bin/flux account-priority-update"": "Traceback (most recent call last):"
te-fshare; /bin/flux account-priority-update"": " File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 139, in <module>"
te-fshare; /bin/flux account-priority-update"": " main()"
te-fshare; /bin/flux account-priority-update"": " File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 135, in main"
te-fshare; /bin/flux account-priority-update"": " bulk_update(path)"
te-fshare; /bin/flux account-priority-update"": " File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 68, in bulk_update"
te-fshare; /bin/flux account-priority-update"": " conn = est_sqlite_conn(path)"
te-fshare; /bin/flux account-priority-update"": " File "/usr/libexec/flux/cmd/flux-account-priority-update.py", line 59, in est_sqlite_conn"
te-fshare; /bin/flux account-priority-update"": " subprocess.run(["flux", "account-update-db", "-p", path], check=True)"
te-fshare; /bin/flux account-priority-update"": " File "/usr/lib64/python3.6/subprocess.py", line 438, in run"
te-fshare; /bin/flux account-priority-update"": " output=stdout, stderr=stderr)"
te-fshare; /bin/flux account-priority-update"": "subprocess.CalledProcessError: Command '['flux', 'account-update-db', '-p', '/var/lib/flux/FluxAccounting.db']' returned non-zero exit status 1."
t-priority-update"": Failed: Exit 1
He was able to get jobs running again by running the update script manually. But anyway it sounds like this needs a fix more urgently.
from flux-accounting.
I'm about to post a PR that hopefully fixes this issue using the Python module you referenced in an above comment. The module enables the creation of the temporary database inside /tmp/
that's used to upgrade the old DB.
from flux-accounting.
A suggestion would be to create a unique temporary directory in /tmp for this.
This class may be helpful. Since the database contains user data, the directory and its contents should be removed afterwards on all exit paths.
from flux-accounting.
Related Issues (20)
- testsuite: fix tests that look at job state HOT 1
- support bank and project updates HOT 1
- `view-bank`: `-t` option does show hierarchy for a sub bank with users in it
- per-queue user limits HOT 2
- plugin: create external `bank_info` class HOT 1
- all pending jobs killed after Flux update HOT 5
- plugin: create new `Association` class
- plugin: improve callback for `job.validate` HOT 1
- error in flux account view-job-records HOT 2
- `plugin.query`: abstract helper functions that create JSON objects of flux-accounting data HOT 1
- `job.new`: use new external functions for user/bank lookups
- plugin: support bypassing limits
- `job.update`/`job.update...queue`: use new external methods for association lookup
- `job.state.priority`: use new external function for association lookup, general function improvement
- plugin: move accounting-specific helper functions to `accounting.cpp`
- plugin: send max nodes information per-association
- plugin: create estimation of node count helper function
- docs: move flux-accounting guide to this repo HOT 1
- create script for crontab tasks HOT 3
- flux account commands hang while fairshare is being updated HOT 1
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 flux-accounting.