Skip to content

Commit

Permalink
chore(db-analyzer): do db processlist related actions with root user
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmoysrt committed Dec 20, 2024
1 parent 35b1296 commit 215ad65
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions press/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,12 +1209,20 @@ def analyze_slow_queries(self, site, normalized_queries: list[dict]):
)

def fetch_database_processes(self, site):
return self.get(
return self.post(
f"benches/{site.bench}/sites/{site.name}/database/processes",
data={
"mariadb_root_password": get_mariadb_root_password(site),
},
)

def kill_database_process(self, site, id):
return self.post(f"benches/{site.bench}/sites/{site.name}/database/kill-process/{id}")
return self.post(
f"benches/{site.bench}/sites/{site.name}/database/kill-process/{id}",
data={
"mariadb_root_password": get_mariadb_root_password(site),
},
)


class AgentCallbackException(Exception):
Expand Down

0 comments on commit 215ad65

Please sign in to comment.