Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create update_monitor_maria_db.sh #12

Closed
wants to merge 1 commit into from

Conversation

rahmans1
Copy link
Contributor

@rahmans1 rahmans1 commented Jul 9, 2023

Briefly, what does this PR introduce?

Script to collect info from condor queue and populate a mysql database that will be updated at regular intervals

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No

Does this PR change default behavior?

No

Script to collect info from condor queue and populate a mysql database that will be updated at regular intervals
@rahmans1
Copy link
Contributor Author

rahmans1 commented Jul 9, 2023

@T-Britton Stuck on this error code. Seems like a permissions issue but cannot pinpoint it

ERROR 1142 (42000) at line 1: UPDATE command denied to user 'user'@'server' for table 'table'
./update_maria_db.sh: Error on line 105: mysql --host="$server" --user="$user" "$database" -e "$insert_query"

I wonder if it needs something like this To GRANT UPDATE privilege to user.

@rahmans1 rahmans1 self-assigned this Jul 9, 2023
@rahmans1 rahmans1 requested a review from T-Britton July 9, 2023 09:04

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if a job finishes it may not be in condor_q. You instead need to find it in condor_history. Additionally, this looks like it updates all jobs. This will definitely not scale. during monitoring you should only query jobs which are in a non end state (e.g. Status 1 or 2 or sentinel values). Additionally, I wouldn't make monitoring do the inserts as there is a nice division of labor: during submission you do the inserts and the monitoring is a separate arm that just updates. the knock on effect is that your query for monitoring is just an update and not an insert unless it is a duplicate then update. I am actually not sure how the DB would recognize the duplicate key as there is no forced uniqueness on the other parts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right about the scaling. Too many condor queries seem to slow down the entire thing. Gotta be a little smarter about how many times condor is queried within a short period of time.

@rahmans1 rahmans1 closed this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script to update a database for job status monitoring using condor output
2 participants