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

Ondemand preserving database user config #1004

Open
svaroqui opened this issue Jan 15, 2025 · 0 comments
Open

Ondemand preserving database user config #1004

svaroqui opened this issue Jan 15, 2025 · 0 comments

Comments

@svaroqui
Copy link
Collaborator

svaroqui commented Jan 15, 2025

  • We generate the config per server in datadir if not exists : today it is only on API call to download config
  • Add a dummy.cnf config file that will indicate the datadir of config for this server
cat $MARIADB_HOME/dummy.cnf
[mysqld]
!includedir /Users/apple/go/src/github.com/signal18/replication-manager/data/bench/db1.bench.svc.cloud18_3306/init/etc/mysql/conf.d
  • we locally execute a dummy mariadbd start
MARIADB_HOME=/Users/apple/go/src/github.com/signal18/replication-manager/data/bench/db1.bench.svc.cloud18_3306/init/etc/mysql;  echo '[mysqld]\n!includedir '$MARIADB_HOME'/conf.d' > $MARIADB_HOME/dummy.cnf ;  mariadbd --defaults-file=$MARIADB_HOME/dummy.cnf --print-defaults  | sed -e "s/--loose_/\n/g" | sed -e "s/--/\n/g" | grep  '=' | sed "s/=/\" : \"/"  | sed -e "s/^/\"/" | sed -e "s/ $/\",/" | awk '{print toupper($0)}' |sed '$ s/.$/\n}/' | sed -e "1s/^/{\n/" | jq`
  • We then output this result in configurator_variables.json
  • We the compare this result with what we get from the monitoring
  • Add API Call to list the variables diff , servers//config/actions/preserved/<variable_name>
  • We populate preserved_variables.json form API call
  • On config we then used the preserved_variables.json variables instead of the saved ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants