1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-11 08:50:45 +03:00

60 Commits

Author SHA1 Message Date
Alexander Presnyakov
873eeb172c CLI command to enable/disable Sentry logging 2025-09-03 20:32:03 +04:00
Alexander Presnyakov
113d6cc41b Disabled sentry backend debug prints
Added couple of debug prints for host readiness
2025-09-03 20:32:03 +04:00
Alexander Presnyakov
08d46a9e70 Pass git revision from the build process -> cmapi - Sentry (to be able to understand which revision caused some error) 2025-09-03 20:32:03 +04:00
Alexander Presnyakov
3ca5a2e6bb Fixed Sentry transaction continuation 2025-09-03 20:32:03 +04:00
Alexander Presnyakov
9821f14d0f Enable loggers that were not explicitly mentioned in cmapi_logger.conf 2025-09-03 20:32:03 +04:00
Alexander Presnyakov
9b98c5c20a Created a separate package for tracing-related stuff
Added mirroring of spans into Sentry
Tracer is a facade that redirects actions to tracing backends
2025-09-03 20:32:03 +04:00
Alexander Presnyakov
a0b4bcd1ce Basic request tracer
Tracing requests

Custom log factory adds all trace values as one log record parameter (it will be empty if trace values are empty, like in MainThread where there are no incoming requests)
2025-09-03 20:32:03 +04:00
Leonid Fedorov
15944923bd chore(cmapi runtime): add Network as a prerequisite to start CMAPI service 2025-08-28 03:45:46 +04:00
Leonid Fedorov
46922f8d6a chore(build, cmapi): fallback of packaging to os-release if lsb-core is missing 2025-08-28 03:45:46 +04:00
Alexander Presnyakov
5939aa5f55 Added support for Sentry in cmapi server
Support distributed request tracing

-Direct dependencies now in requirements[-dev].in, pip-compile generates full requirement[-dev].txt from them
2025-08-26 14:21:33 +00:00
Allen Herrera
f0db98fbba 3.16 added retry rsync logic for backups, 3.17 improved dbrm backups with save_brm, write poll checks and write locks 2025-08-26 16:49:58 +04:00
Alexander Presnyakov
19c4914194 feat/MCOL-6074: CMAPI integrational tests that work with real hosts (using columnstore-ansible-aws for cluster creation/provisioning) 2025-08-12 13:08:31 +00:00
Alexander Presnyakov
58040871bd Fixed "raise None" that happened on signal interception
Also fixed couple of (possibly) unbound variables
2025-08-11 16:48:19 +00:00
Alexander Presnyakov
f8a57b4412 BRM journal is always singular, do not apply suffix logic to it 2025-07-25 14:54:59 +01:00
mariadb-AlanMologorsky
b6a5c1d71f fix(cmapi): MCOL-5913 cmapi write local address 127.0.1.1 instead real ip address
* feat(cmapi): NetworkManager class for some ip hostname opoerations.
 * fix(cmapi): Use NetworkManager class to resolve ip and hostname in node_manipulation.add_node function
 * fix(cmapi): Minor docstring and formatting fixes
2025-07-08 15:57:28 +03:00
mariadb-AlanMologorsky
5d0b3a88f3 fix(cmapi): MCOL-5899 confusing cluster_mode status when columnstore offline. 2025-06-19 19:22:44 +04:00
aleksei.bukhalov
3de8af2fa4 chore(ci): remove sudo usage from systemctl calls in cmapi tests 2025-06-03 22:30:22 +02:00
Leonid Fedorov
6db2dc668f stubs and cmake formatting 2025-05-20 18:22:59 +04:00
mariadb-AlanMologorsky
2c0367ea2b feat(mcs): MCOL-5300 review/finetune log collection tools.
* chore(mcs, scripts): extra/columnstore_review.sh with scripts/columnstore_review.sh with 1.4.13 version
* feat(mcs): add review command to the Tools section. It's the wrapper for columnstore_review.sh
* feat(mcs): add review command implementation to tools.py file + constansts.py
* chore(mcs): add separator argument to cook_sh_arg function
* docs(mcs): updated README.md and mcs.1 man file
2025-05-02 16:12:14 +03:00
Allen Herrera
b731c0a326 chore(backup): spellcheck mcs_backup_manager.sh adjusting lots of variable names, functions and help text (#3515) 2025-04-21 18:27:04 +01:00
Allen Herrera
441327ed84 chore(cs_package_manager,backup): update cs_package_manager.sh to v 3.10 (#3498)
* update cs_package_manager.sh to v 3.10 - added download maxscale and check maxscale

* adjust cs_package_manager.sh rename ci variables
2025-04-21 15:26:12 +01:00
Alexander Presnyakov
e34f7d2530 Fix thread arg errors (app instead of sequence) 2025-04-18 18:52:42 +01:00
mariadb-AlanMologorsky
927eb4b2bd feat(cmapi, mcs): MCOL-5941 Improve mcs cli backup\restore wrapper.
* fix(mcs, wrapper): default is None for --backup-location, --backup-destination, --storage, --parallel, --highavilability, --skip-save-brm, --skip-polls, --skip-locks, --skip-mariadb-backup, --skip-bucket-data, --name-backup, --quiet, --no-verify-ssl, --poll-interval, --poll-max-wait, --retention-days, -scp, -bb, -url, -f, -m, -aro, -li and most of arguments in backup_commands.py and restore_commands.py
* fix(mcs, helpers): cook_sh_arg parser function now detects None as a value
* fix(mcs, wrapper): list -> li in typer command argument name for both backup_commands.py and restore_commands.py
* docs(mcs, wrapper): --parralel arg help message was edited to simple and readable one
* fix(mcs, wrapper): removing -no- prefixed flag variants for all bool arguments in backup_commands.py and restore_commands.py
2025-04-18 18:51:59 +01:00
mariadb-AlanMologorsky
7c27d803ba feat(cmapi, mcs): MCOL-5525 Single start command for Single Node.
* feat(mcs): new mcs bootstrap-single-node command added into tools pane
2025-04-15 04:57:12 +03:00
mariadb-AlanMologorsky
fde9155d18 chore(cmapi, deps): MCOL-5905 Bump versions of CMAPI dependencies. 2025-04-08 15:48:47 +03:00
mariadb-AlanMologorsky
d17fc7d9be Review fixes. 2025-04-08 14:56:06 +03:00
mariadb-AlanMologorsky
aa57a7684c feat(cmapi): MCOL-5019: review fixes.
[fix] CEJPasswordHandler class methods to use directory for cskeys file
[fix] CEJPasswordHandler.encrypt_password to return password in hex format
[fix] CEJPasswordHandler key_length
[fix] CEJPasswordHandler os.urandom call typo
[upd] mcs cli README.md and man page
[upd] mcs cli README_DEV.md
[fix] mcs_cluster_tool/decorators.py to handle typer.Exit exception
[add] various docstrings
2025-04-08 14:56:06 +03:00
mariadb-AlanMologorsky
215e4eea4d feat(cmapi): MCOL-5019: distributing cskeys secrets file, move cskeys and cspasswd functions to mcs cli.
[add] distribute .secrets file to all nodes while adding a new node
[add] encrypt_password, generate_secrets_data, save_secrets to CEJPasswordHandler
[add] tools section to mcs cli tool
[add] mcs_cluster_tool/tools_commands.py file with cskeys and cspasswd commands
[add] cskeys and cspasswd commands to tools section of mcs cli
[mv] backup/restore commands to tools section mcs cli
[fix] minor imports ordering
[fix] constants
2025-04-08 14:56:06 +03:00
mariadb-AlanMologorsky
10dec6ea94 fix(cmapi): MCOL-5962 Fix rollback in mcs cli and passing errors during broadcasting config
* fix(cmapi): ClusterControllerClient request error handling
* fix(cmapi): broadcast_new_config request error handling
* style(cmapi): logs
2025-04-07 14:34:13 +03:00
Allen Herrera
f04b189476 feat(backup): update to mcs_backup_manager to v3.14 adding integer checks on inputs (#3465) 2025-04-04 21:28:43 +01:00
mariadb-AlanMologorsky
55b09a71fc fix(cmapi): MCOL-5638 Improve Client Error Messaging and async broadcasting config.
* fix(cmapi): broadcast_new_config function using aiohttp and improved errors handling mechanics
* fix(cmapi): requirements updating aiohttp version and it's dependencies
* fix(cmapi, deps): unused imports
* fix(cmapi, tests): test_broadcast_new_config
2025-04-01 17:27:22 +03:00
Allen Herrera
11dd3f0422 feat(cs-package-manager): added multinode install via --nodes flag & dev upgrade along with some help texts (#3279)
Co-authored-by: Allen Herrera <allen@AllensBlackMBP.attlocal.net>
2025-04-01 18:03:07 +04:00
mariadb-AlanMologorsky
2f25c47a57 fix(cmapi): MCOL-5133 remove has_active_nodes handler for cluster shutdown because TransactionManager has advance variant of this check 2025-04-01 18:03:07 +04:00
mariadb-AlanMologorsky
0e5842abcc fix(cmapi tests): MCOL-5133 test mode set without nodes now returns adequate message 2025-04-01 18:03:07 +04:00
mariadb-AlanMologorsky
8a4f857df4 fix(cmapi): MCOL-5133 maintainance flag typo. 2025-04-01 18:03:07 +04:00
mariadb-AlanMologorsky
27e3b8d808 feat(cmapi): MCOL-5133: Stage3 stand alone cli tool.
MAJOR: Some logic inside node remove changed significantly using active
    nodes list from Columnstore.xml to broadcast config after remove.

 [fix] TransactionManager passsing  extra, remove and optional nodes arguments to start_transaction function
 [fix] commit and rollback methods of TransactionManager adding nodes argument
 [fix] TransactionManager using success_txn_nodes inside
 [fix] remove node logic to use Transaction manager
 [fix] cluster set api key call using totp on a top level cli call
 [add] missed docstrings
 [fix] cluster shutdown timeout for next release
2025-04-01 18:03:07 +04:00
mariadb-AlanMologorsky
c40e4ba00d feat(cmapi): MCOL-5133: Stage2 stand alone cli tool.
[fix] client class methods
[fix] Transaction management at endpoint handling level
[fix] add_node and set_mode methods to use TransactionManager
2025-04-01 18:03:07 +04:00
Alan Mologorsky
a60a5288d8 feat(cmapi): MCOL-5133: Stage1 to stand alone cli tool. (#3378)
[add] cluster api client class
[fix] cli cluster_app using cluster api client
[add] ClusterAction Enum
[add] toggle_cluster_state function to reduce code duplication
2025-04-01 18:03:07 +04:00
Alan Mologorsky
a00711cc16 fix!(cmapi): MCOL-5454: Self-signed certificate autorenew. (#3213)
[add] managers/certificate.py with CertificateManger class
[mv] creating self-signed certificate logic into CertificateManger class
[add] renew and days_before_expire methods to CertificateManger class
[mv] several certificate dependent constants to managers/certificate.py
[add] CherryPy BackgroundTask to invoke certificate check hourly (3600 secs)
[fix] tests
[fix] bug with txn timer clean (clean_txn_by_timeout, worker and invoking of it)
2025-04-01 18:03:07 +04:00
Alexander Presnyakov
de7a4a2d7e feat(mcs): add -v option to enable logging to console
refactor(ci): switch S3 uploading to AWS CLI for logging S3 link

docs: update README with to reflect changes in Drone pipeline

feat(env): add activate script for portable Python

fix(logging): log RequestException response body
2025-03-31 16:54:46 +00:00
mariadb-AlanMologorsky
91e82f4d15 fix(mcs): MCOL-5618: change list option to --list and refactor.
fix(mcs):  list option to -li/--list for mcs backup, restore and dbrm_restore commands
fix(mcs): add missed option "aro"
fix(mcs): resort options for backup and dbrm_backup to keep same ordering as in original scrypt
fix(mcs docs): updated README.md + mcs.1
2025-03-28 13:02:19 +03:00
mariadb-AlanMologorsky
271e3d5956 MCOL-5618: Sync with PR3410.
[add] list option but in argument notation "list" for backup, restore, dbrm_restore
[fix] help messages for --config-file
[fix] -p/--path > -bl/--backup-location option for dbrm_backup and dbrm_restore
[fix] -d/--directory > '-l', '--load' option for dbrm_restore
2025-03-28 13:02:19 +03:00
Allen Herrera
0067946aca adjusted list flag to --list in mcs_backup_manager.sh 2025-03-14 23:00:48 +03:00
Allen Herrera
f4e921d685 feat(backup: added timestamps to localstorage backups major sections, new flag backup --apply-retention-only , more verbose logging in poll_check_no_active_sql_writes(), fixes to multinode race conditions to apply apply_backup_retention_policy() (#3423) 2025-03-14 11:36:22 +00:00
Timofey Turenko
26acfc055d Recognize lsb_release 'RedHatEnterprise' as rhel 2025-03-12 14:31:57 +04:00
mariadb-AlanMologorsky
f2e9ceacb4 MCOL-5526: CLI rename "mcs CLUSTER" commands to just mcs.
[add] now all 'cluster' subcommand commands working without using 'cluster' subcommand itself
[fix] 'cluster' command hidding its help message
[add] explicit names for commands
[add] help-all command to list all nested help messages in man page view
[add] rich colored tabled help
[add] table panels for cluster commands
[upd] typer dependency version and some extra indirect dependencies
[add] README.md for mcs cli tool with all command reference
[add] mcs.1 man page
[add] README_DEV.md for mcs cli tool
[fix] cmapi/CMakeLists.txt to install mcs.1 man page
2025-03-11 17:26:16 +04:00
Allen Herrera
ad80ab40aa 3 versions of backup_manager, add backup list command, adjust dbrm backup retention to 0 + more & fixes 2025-02-21 19:59:42 +04:00
Alan Mologorsky
c11cadeef5 MCOL-5618-related: Duplicate to stable 23.10 (#3223)
* feat(package_manager): improved cs_package_manager functionality for better UX

- add apt support for community and enterprise install
- add enterprise_staging install
- filter check results down to os/arch
- add --token flag for enterprise (#3002)

* Update cs package manager dev ubuntu (#3060)

* cs_package_manager.sh - fix ubuntu dev installs

* cs_package_manager.sh - remove some useless comments

* debian/ubuntu dev install to use drone repo + remove wget dependancy

* + exits if repo files missing

* auto install aws cli for dev builds

* removed commented section from cs_package_manager

* feat(tooling): add rhel support in cs_package_manager.sh (#3105)

* added dbrm_restore for LocalStorage & S3

* small comment cleanup

* resolved PR comments for cs_package_manager.sh & mcs_backup_manager.sh

* added dbrm_restore for LocalStorage & S3

* Added backup retention flag -r and incremental auto_most_recent option to mcs_backup_manager.sh

* resolved PR comments for cs_package_manager.sh & mcs_backup_manager.sh

* add comment to auto_select_most_recent_backup_for_incremental in mcs_backup_manager.sh

* feat(cmapi,cli): MCOL-5618: Add backup, restore, backup-dbrm, restore-dbrm commands for mcs cli tool. (#3130)

* MCOL-5618: Add backup, restore, backup-dbrm, restore-dbrm commands for mcs cli tool.

[add] mcs_cluster_tool/helpers.py file with cook_sh_arg function inside
[add] MCS_BACKUP_MANAGER_SH to mcs_cluster_tool/constants.py
[add] backup and restore commands to "mcs" Typer APP

* MCOL-5618: Move mcs_backup_manager.sh to cmapi/scripts.

* MCOL-5618: Install mcs_backup_manager.sh with CMAPI package.

* MCOL-5618: Testing fix + script minor fixes.

- [fix] wrong cooking of .sh invoke string
- [fix] restore_dbrm -> dbrm_restore, backup_dbrm -> dbrm_backup to use same naming in both python wrapper and mcs_backup_manager.sh
- [fix] mathod of checking cmapi online or not in mcs_backup_manager.sh

* MCOL-5618: Minor improvements to sync with PR 3144.

[add] -ns option for dbrm_restore.

* MCOL-5618: Minor fixes to sync after #3147

[add] -r option for backup command

* MCOL-5618: Minor fixes to sync after PR #1398.

[add] -ssm argument for dbrm backup
[add] -sdbk -ssm arguments for dbrm restore
[add] silenece annoying pylint warning unused argument for bachup_commands.py and restore_commnads.py

* update to the latest mcs_backup_manager + cs_package_manager

* Intermediate commit to move changes from old filepath to the new one.

* remove old file

* MCOL-5618: Fix packaging.

[mv] extra/cs_package_manager.sh -> cmapi/scripts/cs_package_manager.sh to pack and deliver the script with cmapi package
[add] cs_package_manager.sh to cmapi package
[fix] download paths for mcs_backup_manager.sh and cs_package_manager.sh

* MCOL-5618: Fix after testing

[add] -P to restore help in mcs_backup_restore.sh
[fix] -f argument default value in both backup and restore wrapper commands
[fix] -i argument behaviour and type + default value
[fix] -P argument position and help for both backup and restore wrapper commands
[fix] disable some pylint warning for both backup and restore wrapper files

---------

Co-authored-by: Allen Herrera <82840027+mariadb-AllenHerrera@users.noreply.github.com>
Co-authored-by: Allen Herrera <allen.herrera@mariadb.com>
Co-authored-by: Allen Herrera <allen@Allens-Black-MacBook-Pro.local>
Co-authored-by: Leonid Fedorov <79837786+mariadb-LeonidFedorov@users.noreply.github.com>
2024-06-27 17:23:13 +04:00
Alan Mologorsky
6efffef765 MCOL-5594: Duplicate to stable-23.10 (#3222)
* MCOL-5594: Interactive "mcs cluster stop" command for CMAPI. (#3024)

* MCOL-5594: Interactive "mcs cluster stop" command for CMAPI.

[add] NodeProcessController class to handle Node operations
[add] two endpoints: stop_dmlproc (PUT) and is_process_running (GET)
[add] NodeProcessController.put_stop_dmlproc method to separately stop DMLProc on primary Node
[add] NodeProcessController.get_process_running method to check if specified process running or not
[add] build_url function to helpers.py. It needed to build urls with query_params
[add] MCSProcessManager.gracefully_stop_dmlproc method
[add] MCSProcessManager.is_service_running method as a top level wrapper to the same method in dispatcher
[fix] MCSProcessManager.stop by using new gracefully_stop_dmlproc
[add] interactive option and mode to mcs cluster stop command
[fix] requirements.txt with typer version to 0.9.0 where supports various of features including "Annotated"
[fix] requirements.txt click version (8.1.3 -> 8.1.7) and typing-extensions (4.3.0 -> 4.8.0). This is dependencies for typer package.
[fix] multiple minor formatting, docstrings and comments

* MCOL-5594: Add new CMAPI transaction manager.

- [add] TransactionManager ContextDecorator to manage transactions in less code and in one place
- [add] TransactionManager to cli cluster stop command and to API cluster shutdown command
- [fix] id -> txn_id in ClusterHandler class
- [fix] ClusterHandler.shutdown class to use inside existing transaction
- [add] docstrings in multiple places

* MCOL-5594: Review fixes.

* fix(cmapi): MCOL-5594: Fix after testing.. (#3150)

- [fix] wrong invoke already imported constants and function from signal lib
2024-06-27 14:32:50 +04:00
Timofey Turenko
d3896efb0f Add dependency on libxcrypt for Rocky/RHEL9 2024-05-28 15:47:48 +04:00