galera-docker-mariadb's People
Forkers
bstaijen yangyuw coordcn seeekr smchin zetaab monotykamary squawell capttofu fabriqueit mattjtodd zhouweiaccp jneo8 techize moule3053 chinaares dwutang th3architect nekulin metaljin rbnor dragonme root2000xyz denisvmedia bluemutedwisdom debasismaity iamwel carlosjsanch3z osbornhu yanndegat aiweaver l3za zhuchenjie noteyaguchi jay74jung jungsh83 shunzi115 florinpeter avcwisesa reymonzakhary akang1 sungjaenam prashantr30 drarko codysk minervadb shudipta mia0x75 muheric yelmir githubofwujun ssshcl geohost reynencourt syz521 abdelkhalikmosa wangjunjack wilsonliu78 josem-amatriain nenoteerawat stefanfluit iferrarims stevensume fintico malteprang mart3051 redflowflag tusharjadhav2986 reda-zaza akhilagarlapally ionehouten fablunardi gamalselim 3rfun0 pinkbluersglobal trucemop johan-gong qpitlove hocnv2010 rumy14 emilianobaum sinashirparvar imanrjb kechankrisnagalera-docker-mariadb's Issues
recover when using kubernetes statefulset
Hi
I am trying to figure out is this galera setup really "production ready" like blob post said. However, I am thinking do you have problem in logic here https://github.com/severalnines/galera-docker-mariadb/blob/master/entrypoint.sh#L167-L203 The idea of that code is that if whole cluster goes down - it will check from all galera nodes which have the latest sequence number. However, when using statefulsets the pods are starting in order - which means that only one pod can report its status -> and it will always get bootstrapped. We should have possibility to start all nodes under statefulset and after that decide which one has the latest seq number, right? Or am I missing something?
MariaDB Galera StatefulSet pods crash - When used latest image
When I created docker image with mariadb:latest and applied the mariadb-ss.yaml. I found that the pods are crashing. But works fine when used the default given in the yams with mariadb10.1.
Can you please update or let me know how we can use the latest mariadb-galera stateful deployment.
Also I want to use this deployment for php app and expose the php to external. Any idea will help.
Thanks and regards,
Mark.
The earliest node to report if there is no higher seqno is computed wrongly.
The computation of the node to report if there is no higher seqno is wrong as it orders the nodes based on the modifiedIndex only without taking into consideration the highest seqNo.
The proposed fix is to compute it as below:
node_to_bootstrap=$(cat /tmp/out | jq -c '.node.nodes[].nodes[]?' | grep seqno | tr ',:"' ' ' | sort -k5,5r -k11 | head -1 | awk -F'/' '{print $(NF-1)}')
Sequence number is not reported correctly in the report_status script.
In the report_status script the sequence number is reported under the name wsrep_last_committed, while in the entrypoint the sequence number is checked under the key seqno. This creates the possibility of having two separate clusters if two nodes in a Kubernetes cluster are drained one after the other (galera-2, then galera-1) and uncordoned at the same time.
The suggested fix is to report the sequence number under the key seqno in the report_status script too.
I use Dockfile to build image,but the image cant work with k8s
k8s error message:
Error: failed to start container "galera": Error response from daemon: oci runtime error: container_linux.go:265: starting container process caused "exec: "/entrypoint.sh": permission denied"
Kubernetes example deploys defective etcd cluster
The Kubernetes example conveniently glosses over the fact that the etcd-cluster.yml
config has zero resilience against failed nodes!
The file deploys 3 etcd pods which act as a cluster, which is great. But if I stop any of these pods on Kubernetes and then try to deploy them again, the cluster doesn't recognize them! They cannot join the cluster anymore, so the "scaling" is just a facade.
How can I control which pod of the 3 Pods volume the first pvc?
In kubernetes, if not utilizing a storage class on AWS, and with StatefulSet with persistent storage, start with creating the PVs and PVCs, it creates 3 PVs and 3PVCs, how can I control which pod of the 3 Pods volume the first pvc?
Use openEBS or nfs storage class is recommend.
Hashicorp Consul+Nomad support
Hi
wondering if you would be interested by a PR to add support for etcd+consul as a service discovery backend
thus enabling a hashicorp jobspec example in addition to k8s and docker compose.
?
otherwise i'll start a clean fork
文档请求/Document request:Creat a healthy etcd cluster
For use etcd
etcd
在 docker
中创建 etcd,需要使用以下环境变量:environment
--env
-e
ETCD_ENABLE_V2=true
docker compose file:
version: "3.0"
networks:
net:
# 网络
driver: bridge # 桥接模式
volumes:
data: # 挂载到本地的数据卷名
data-324:
services:
etcd-cluster:
image: bitnami/etcd:3.5 # 镜像
container_name: etcd-cluster # 容器名 --name
restart: always # 总是重启
networks:
- net # 使用的网络 --network
ports:
# 端口映射 -p
- ${your_private_ip}:2379:2379 # e.g. - 2379:2379
- ${your_private_ip}:2380:2380 # e.g. - 2380:2380
environment:
# 环境变量 --env
- ALLOW_NONE_AUTHENTICATION=yes # 允许不用密码登录
- ETCD_ENABLE_V2=true # 这个参数是成功的关键 / This parameter is the key to success.
- ETCD_NAME=etcd-node1 # etcd 的名字
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://${node1_domain_or_ip}:2380 # 列出这个成员的伙伴 URL 以便通告给集群的其他成员
- ETCD_LISTEN_PEER_URLS=http://${your_private_ip}:2380 # 用于监听伙伴通讯的URL列表 e.g. http://0.0.0.0:2380
- ETCD_LISTEN_CLIENT_URLS=http://${your_private_ip}:2379 # 用于监听客户端通讯的URL列表 e.g. http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://${node1_domain_or_ip}:2379 # 列出这个成员的客户端URL,通告给集群中的其他成员
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster # 在启动期间用于 etcd 集群的初始化集群记号
- ETCD_INITIAL_CLUSTER=etcd-node1=http://${node1_domain_or_ip}:2380,etcd-node2=http://${node2_domain_or_ip}:2380 # 为启动初始化集群配置
- ETCD_INITIAL_CLUSTER_STATE=existing # 初始化集群状态
volumes:
- data:/bitnami/etcd # 挂载的数据卷
mariadb-galera
在多网卡环境中需要指定 hostname
extra_hosts
multi-interface
docker compose file:
version: "3.8"
# networks:
# net:
volumes:
data:
services:
mariadb-galera:
image: severalnines/mariadb
container_name: mariadb-galera
extra_hosts:
- node1.example.org:${galera_node1_IP}
hostname: node1.example.org
environment:
- CLUSTER_NAME=mariadb-galera
- MYSQL_ROOT_PASSWORD=your_PASS
- XTRABACKUP_PASSWORD=mypassword
- MYSQL_USER=drone
- MYSQL_USER_PASSWORD=your_PASS_2
- MYSQL_USER_DATABASE=drone
- DISCOVERY_SERVICE=${etcd_node1_IP}:2379,${etcd_node2_IP}:2379
volumes:
- data:/var/lib/mysql
network_mode: host
# networks:
# net:
# ports:
# - ${galera_node1_IP}:3306:3306
# - ${galera_node1_IP}:4567:4567
# - ${galera_node1_IP}.59:4568:4568
restart: unless-stopped
Update to more recent version of mariadb
Mariadb 10.1 is quite old now and for example Flyway refuses to work with 10.1 now because it's to old, forcing you to use the commercial version with less version constraints.
I do an update to 10.2 in my chain, but going higher would require forking this repo, which everyone would need to do.
Could you update to a newer mariadb version, please? :-)
cluster size docker compose
show status like 'wsrep_cluster_size';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 1 |
+--------------------+-------+
Databases does not sync.
Project not active. Is there a better solution to run Galera in the cloud?
Want to have a server to build three database cluster file
As a student, I do not have multiple servers, and I always fail to build multiple database clusters based on a single server. I hope that a single "docker-comemess. yml" file can teach me, so that I can learn the configuration principle from a file, thank you.
Issue computing the cluster_join
I think there is a issue computing the running nodes at lines: https://github.com/severalnines/galera-docker-mariadb/blob/master/entrypoint.sh#L250#L256 . The test should be done on the running_nodes3 variable, not running_nodes2.
Confused about healthcheck.sh
What is the purpose of the preflight_check function?
Can't add scripts to initialize database
Hi,
I don't know if it's because of the docker image or what, but I can't add my scripts to initialize the database.
Service not coming up
Hi,
I am using 3 VMS running on virtual box each having 2gb of RAM allocated. I have installed docker v 18.03 on it and created a swarm.
Now im trying to deploy the predictable instance of Mariadb using the global.yml, but the instance isnt coming up, it keeps on failing and re-starting, in the service logs i keep seeing MySQL init process failed.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.