You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Add dbjobs_launcher script for cleanup and job execution - Modify `dbjobs_launcher.sh` to clean up old `.run` directories before continuously execute `dbjobs_new.sh`. - Enhanced `dbjobs_new.sh` with improved encryption functions, allowing for custom passwords and better API request handling. - Added generic functions for sending encrypted data to APIs with retry logic. - Implemented job check and upgrade functions to manage job execution and script updates. - Updated logging mechanisms for better traceability and error handling. fix: Trim whitespace in checksum generation - Modified `GenerateChecksum` function to ignore comments more robustly by trimming whitespace before checking for comment lines. * feat: Add API swagger for jobs upgrade and job checks on servers * refactor: Remove verbose logging for server needs check * Refactor jobsCheck and jobsUpgrade functions for improved process handling - Ensured environment variables LOG_DIR, CHECKPOINT_DIR, and LOCK_DIR are exported for subshells. - Reintroduced jobsCheck and jobsUpgrade calls in the main execution flow for better clarity and structure. * Enhance database table validation and version comparison logic - Updated the `table_exists` function to perform a more comprehensive check on the 'jobs' table structure in the 'replication_manager_schema' database, ensuring all required columns are present with correct types and constraints. - Introduced a new `create_jobs_table` function that interacts with an API to create the jobs table if it does not exist, improving the robustness of the table creation process. - Added a `check_jobs_table` function to streamline the process of checking for the jobs table and creating it if necessary. - Modified the version parsing logic in `version.go` to handle case-insensitive flavor detection for MariaDB, PostgreSQL, and Percona. - Implemented a new `Compare` method for version comparison, allowing for more precise version checks between different database flavors. - Added a `HasVersionChanged` function to determine if the database version has changed, considering flavor differences and providing error handling for nil versions. * Update API endpoints for refreshing app templates and checking cluster/server error states * Implement rolling jobs upgrade functionality and related API endpoints * Add support for rolling jobs upgrade in API and Redux slice * Implement rolling jobs upgrade functionality and update related state management * Refactor RollingJobsUpgrade to return error on timeout and improve logging * Add timeout error handling for jobs upgrade in RollingJobsUpgrade
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Rolling jobs upgrade")
191
+
varts time.Time
192
+
193
+
for_, s:=rangecluster.slaves {
194
+
ts=time.Now()
195
+
s.SetWaitJobsUpgradeCookie()
196
+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Set jobs upgrade cookie on %s ", s.URL)
197
+
198
+
// Wait for the server to clear the cookie
199
+
fors.HasRollingJobsUpgradeCookie() {
200
+
iftime.Since(ts) >5*time.Minute {
201
+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlErr, "Timeout waiting for jobs upgrade on %s ", s.URL)
202
+
returnerrors.New("Timeout waiting for jobs upgrade")
203
+
}
204
+
205
+
time.Sleep(2*time.Second)
206
+
}
207
+
208
+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Jobs upgrade completed on %s ", s.URL)
209
+
}
210
+
211
+
ts=time.Now()
212
+
cluster.master.SetWaitJobsUpgradeCookie()
213
+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlInfo, "Set jobs upgrade cookie on master %s ", cluster.master.URL)
214
+
215
+
// Wait for the server to clear the cookie
216
+
forcluster.master.HasRollingJobsUpgradeCookie() {
217
+
iftime.Since(ts) >5*time.Minute {
218
+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, config.LvlErr, "Timeout waiting for jobs upgrade on master %s ", cluster.master.URL)
219
+
returnerrors.New("Timeout waiting for jobs upgrade on master")
0 commit comments