Comments (6)
I can't think of a way this could be done in flux-core alone, either, since the job-manager can't know why the job was rejected by a plugin , and we don't want to accidentally allow jobs rejected for other reasons.
I'm going to move this issue to flux-accounting. The mf_priority plugin can add a check to allow the current uid even if it doesn't have a current entry in the association. Or, perhaps a default bank can always be added for the instance owner. I'll allow @cmoussa1 to decide on the correct approach here.
from flux-accounting.
Oh, duh. I just realized if I have the UID I can just look up the corresponding username:
pwd.getpwuid(int(userid))
from flux-accounting.
Sounds good, I'm happy to take a look at this. To keep the logic the same in regards to other associations in the flux-accounting DB, perhaps we can just automatically add a default flux
user and flux
bank upon DB creation?
from flux-accounting.
Sounds like a good idea to me! You should be able to check the security.owner
broker attribute, or just use getuid(2)
to get the userid of the instance owner (it need not always be user flux
).
from flux-accounting.
Cool, thanks! I think I'm able to get the userid no problem by just checking the security.broker
attribute. Is there a way to fetch the name of the instance owner, then, if it is not always flux
?
from flux-accounting.
Hm, you may have to use getpwuid_r(3)
, but let me see if somewhere else in flux already has this information.
from flux-accounting.
Related Issues (20)
- 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
- python: update function descriptions to follow docstring convention HOT 1
- `flux view-account --list-all-banks-in-json-please`
- `view-user`: add an option to concisely list banks a user belongs to
- testsuite: set up some environment variables for uids
- src/Makefile.am: remove `flux_account_shares` targets
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.