/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Server/Orchestration/openshift/ha.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
High-Availability
 
2
=================
 
3
 - For HA, a multi-master cluster should be set. As master nodes take care for routing traffic, the network should be configured in the
 
4
 way all traffic to the OpenShift cluster end up on one of the currently alive master nodes. There is a few standard ways:
 
5
    * The external load-balancer (for instance HAProxy) can be configured which would route traffic to the master nodes. The HA of load-balancer
 
6
    should be already achieved by other means. 
 
7
    * The IPFailover pod may maintain a virtual IP on the master nodes migrating it to alive node (the pod with keepalived will be running on all
 
8
    master nodes and decide where the IP goes). For load-balancing, multiple virtual IPs can be maintained by IPFailover service. Then, the DNS
 
9
    could be configured to resolve the OpenShift subdomain in round-robin fashion. With current version, unfortunatelly, this does not work as
 
10
    all IPs are always assigned to the same node (fix is available in ose, but not in origin):
 
11
        https://github.com/openshift/origin/commit/11034c6fc7fbe50d6cf9442c47749acf77407a87
 
12
    Theoretically, this can be circumvented by running HAProxy on all masters which will rebalance the traffic...
 
13
    * Also, keep alived may be configured on the baremetal to avoid this problem,
 
14
 - The pod-reschedulling strategy should be set (if possible! not for databases) to rolling (i.e. during the updates first create a new pod and, then, 
 
15
 destroy the existing one) instead of recreate (when first old pod is destroyed)
 
16
 - However, this is not enough if HA is critical. It takes OpenShift some time to detect that node is crashed and re-schedule pods elsewhere. 
 
17
 The rescheduling from dead nodes is controlled by 'openshift_master_pod_eviction_timeout' paramter.
 
18
    * While we can run multiple Apache pods to avoid interruption of the service, only a single instance of MySQL is allowed to run.
 
19
    * Some databases, including MySQL, it seems possible to run in read-only mode. So, we can run multiple reader nodes in parallel with read/write. 
 
20
    This may help to provide at least partial service during the outages.
 
21
 
 
22
 
 
23
IPFailover
 
24
==========
 
25
 - Commands
 
26
    oc adm ipfailover ipfailover --virtual-ips="141.52.64.15,141.52.64.17" --create             - creates IPFailover 'sa' which is allowed to run privileged containers and start ipfailover pods
 
27
                                                                                                with keepalived service which will manage the specified list of IPs
 
28
        -i eth1                                                                                 - instructs on which host interface the keepalived will listen
 
29
        --replicas=2 --selector="master=1"                                                      - instructs where to run the ipfailover pods (and how many of them)
 
30
        --watch-port 8443                                                                       - consider OpenShift node dead if the specified TCP port is not responding
 
31
 
 
32
 - Problems
 
33
    * IPs are assinged with '/32', so there should be already non-virtual IP from the proper net assigned to each node.
 
34
    * There are also some strange problems with missing virtual IPs due to pods continously switching between master and slave modes (which may not start immideately). It seems this
 
35
    is triggered when 'keepalived' and generated 'VirtualIPs' are using the same interface. This basically prevents us from running OpenShift cluster on 192.168.26.x/141.52.64.x 
 
36
    network.
 
37
     
 
38