# # AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Clusters from Scratch 1.1\n" "POT-Creation-Date: 2011-12-31T15:15:50\n" "PO-Revision-Date: 2011-11-24 00:51+0200\n" "Last-Translator: Dan Frîncu \n" "Language-Team: None\n" "MIME-Version: 1.0\n" "Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title #, no-c-format msgid "Apache - Adding More Services" msgstr "Apache - Adăugarea mai Multor Servicii" #. Tag: para #, no-c-format msgid "Now that we have a basic but functional active/passive two-node cluster, we’re ready to add some real services. We’re going to start with Apache because it's a feature of many clusters and relatively simple to configure." msgstr "Acum că avem un cluster de bază, funcțional, activ/pasiv format din două noduri, suntem pregătiți să adăugăm câteva servicii reale. O să începem cu Apache deoarece este o caracteristică a multor clustere și este relativ simplu de configurat." #. Tag: title #, no-c-format msgid "Installation" msgstr "Instalare" #. Tag: para #, no-c-format msgid "Before continuing, we need to make sure Apache is installed on both hosts." msgstr "Înainte de a continua, trebuie să ne asigurăm că Apache este înstalat pe ambele gazde." #. Tag: screen #, no-c-format msgid "\n" "[root@ppcmk-1 ~]# yum install -y httpd\n" "Setting up Install Process\n" "Resolving Dependencies\n" "--> Running transaction check\n" "---> Package httpd.x86_64 0:2.2.13-2.fc12 set to be updated\n" "--> Processing Dependency: httpd-tools = 2.2.13-2.fc12 for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: apr-util-ldap for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: /etc/mime.types for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Running transaction check\n" "---> Package apr.x86_64 0:1.3.9-2.fc12 set to be updated\n" "---> Package apr-util.x86_64 0:1.3.9-2.fc12 set to be updated\n" "---> Package apr-util-ldap.x86_64 0:1.3.9-2.fc12 set to be updated\n" "---> Package httpd-tools.x86_64 0:2.2.13-2.fc12 set to be updated\n" "---> Package mailcap.noarch 0:2.1.30-1.fc12 set to be updated\n" "--> Finished Dependency Resolution\n" "\n" "Dependencies Resolved\n" "\n" "=======================================================================================\n" " Package               Arch             Version                Repository         Size\n" "=======================================================================================\n" "Installing:\n" " httpd               x86_64           2.2.13-2.fc12            rawhide           735 k\n" "Installing for dependencies:\n" " apr                 x86_64           1.3.9-2.fc12             rawhide           117 k\n" " apr-util            x86_64           1.3.9-2.fc12             rawhide            84 k\n" " apr-util-ldap       x86_64           1.3.9-2.fc12             rawhide            15 k\n" " httpd-tools         x86_64           2.2.13-2.fc12            rawhide            63 k\n" " mailcap             noarch           2.1.30-1.fc12            rawhide            25 k\n" "\n" "Transaction Summary\n" "=======================================================================================\n" "Install       6 Package(s)\n" "Upgrade       0 Package(s)\n" "\n" "Total download size: 1.0 M\n" "Downloading Packages:\n" "(1/6): apr-1.3.9-2.fc12.x86_64.rpm                                   | 117 kB     00:00     \n" "(2/6): apr-util-1.3.9-2.fc12.x86_64.rpm                             |  84 kB     00:00     \n" "(3/6): apr-util-ldap-1.3.9-2.fc12.x86_64.rpm                         |  15 kB     00:00     \n" "(4/6): httpd-2.2.13-2.fc12.x86_64.rpm                               | 735 kB     00:00     \n" "(5/6): httpd-tools-2.2.13-2.fc12.x86_64.rpm                         |  63 kB     00:00     \n" "(6/6): mailcap-2.1.30-1.fc12.noarch.rpm                             |  25 kB     00:00     \n" "----------------------------------------------------------------------------------------\n" "Total                                                       875 kB/s | 1.0 MB     00:01     \n" "Running rpm_check_debug\n" "Running Transaction Test\n" "Finished Transaction Test\n" "Transaction Test Succeeded\n" "Running Transaction\n" "  Installing     : apr-1.3.9-2.fc12.x86_64                                         1/6 \n" "  Installing     : apr-util-1.3.9-2.fc12.x86_64                                     2/6 \n" "  Installing     : apr-util-ldap-1.3.9-2.fc12.x86_64                               3/6 \n" "  Installing     : httpd-tools-2.2.13-2.fc12.x86_64                                 4/6 \n" "  Installing     : mailcap-2.1.30-1.fc12.noarch                                     5/6 \n" "  Installing     : httpd-2.2.13-2.fc12.x86_64                                       6/6 \n" "\n" "Installed:\n" "  httpd.x86_64 0:2.2.13-2.fc12                                                         \n" "\n" "Dependency Installed:\n" "  apr.x86_64 0:1.3.9-2.fc12            apr-util.x86_64 0:1.3.9-2.fc12\n" "  apr-util-ldap.x86_64 0:1.3.9-2.fc12  httpd-tools.x86_64 0:2.2.13-2.fc12\n" "  mailcap.noarch 0:2.1.30-1.fc12  \n" "\n" "Complete!\n" "[root@pcmk-1 ~]#\n" "" msgstr "\n" "[root@ppcmk-1 ~]# yum install -y httpd\n" "Setting up Install Process\n" "Resolving Dependencies\n" "--> Running transaction check\n" "---> Package httpd.x86_64 0:2.2.13-2.fc12 set to be updated\n" "--> Processing Dependency: httpd-tools = 2.2.13-2.fc12 for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: apr-util-ldap for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: /etc/mime.types for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.13-2.fc12.x86_64\n" "--> Running transaction check\n" "---> Package apr.x86_64 0:1.3.9-2.fc12 set to be updated\n" "---> Package apr-util.x86_64 0:1.3.9-2.fc12 set to be updated\n" "---> Package apr-util-ldap.x86_64 0:1.3.9-2.fc12 set to be updated\n" "---> Package httpd-tools.x86_64 0:2.2.13-2.fc12 set to be updated\n" "---> Package mailcap.noarch 0:2.1.30-1.fc12 set to be updated\n" "--> Finished Dependency Resolution\n" "\n" "Dependencies Resolved\n" "\n" "=======================================================================================\n" " Package               Arch             Version                Repository         Size\n" "=======================================================================================\n" "Installing:\n" " httpd               x86_64           2.2.13-2.fc12            rawhide           735 k\n" "Installing for dependencies:\n" " apr                 x86_64           1.3.9-2.fc12             rawhide           117 k\n" " apr-util            x86_64           1.3.9-2.fc12             rawhide            84 k\n" " apr-util-ldap       x86_64           1.3.9-2.fc12             rawhide            15 k\n" " httpd-tools         x86_64           2.2.13-2.fc12            rawhide            63 k\n" " mailcap             noarch           2.1.30-1.fc12            rawhide            25 k\n" "\n" "Transaction Summary\n" "=======================================================================================\n" "Install       6 Package(s)\n" "Upgrade       0 Package(s)\n" "\n" "Total download size: 1.0 M\n" "Downloading Packages:\n" "(1/6): apr-1.3.9-2.fc12.x86_64.rpm                                   | 117 kB     00:00     \n" "(2/6): apr-util-1.3.9-2.fc12.x86_64.rpm                             |  84 kB     00:00     \n" "(3/6): apr-util-ldap-1.3.9-2.fc12.x86_64.rpm                         |  15 kB     00:00     \n" "(4/6): httpd-2.2.13-2.fc12.x86_64.rpm                               | 735 kB     00:00     \n" "(5/6): httpd-tools-2.2.13-2.fc12.x86_64.rpm                         |  63 kB     00:00     \n" "(6/6): mailcap-2.1.30-1.fc12.noarch.rpm                             |  25 kB     00:00     \n" "----------------------------------------------------------------------------------------\n" "Total                                                       875 kB/s | 1.0 MB     00:01     \n" "Running rpm_check_debug\n" "Running Transaction Test\n" "Finished Transaction Test\n" "Transaction Test Succeeded\n" "Running Transaction\n" "  Installing     : apr-1.3.9-2.fc12.x86_64                                         1/6 \n" "  Installing     : apr-util-1.3.9-2.fc12.x86_64                                     2/6 \n" "  Installing     : apr-util-ldap-1.3.9-2.fc12.x86_64                               3/6 \n" "  Installing     : httpd-tools-2.2.13-2.fc12.x86_64                                 4/6 \n" "  Installing     : mailcap-2.1.30-1.fc12.noarch                                     5/6 \n" "  Installing     : httpd-2.2.13-2.fc12.x86_64                                       6/6 \n" "\n" "Installed:\n" "  httpd.x86_64 0:2.2.13-2.fc12                                                         \n" "\n" "Dependency Installed:\n" "  apr.x86_64 0:1.3.9-2.fc12            apr-util.x86_64 0:1.3.9-2.fc12\n" "  apr-util-ldap.x86_64 0:1.3.9-2.fc12  httpd-tools.x86_64 0:2.2.13-2.fc12\n" "  mailcap.noarch 0:2.1.30-1.fc12  \n" "\n" "Complete!\n" "[root@pcmk-1 ~]#\n" "" #. Tag: para #, no-c-format msgid "Also, we need the wget tool in order for the cluster to be able to check the status of the Apache server." msgstr "De asemenea, avem nevoie de utilitarul wget pentru ca și clusterul să fie capabil să verifice status-ul serverului Apache." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# yum install -y wget\n" "Setting up Install Process\n" "Resolving Dependencies\n" "--> Running transaction check\n" "---> Package wget.x86_64 0:1.11.4-5.fc12 set to be updated\n" "--> Finished Dependency Resolution\n" "\n" "Dependencies Resolved\n" "\n" "===========================================================================================\n" " Package        Arch             Version                      Repository               Size\n" "===========================================================================================\n" "Installing:\n" " wget         x86_64          1.11.4-5.fc12                   rawhide                393 k\n" "\n" "Transaction Summary\n" "===========================================================================================\n" "Install       1 Package(s)\n" "Upgrade       0 Package(s)\n" "\n" "Total download size: 393 k\n" "Downloading Packages:\n" "wget-1.11.4-5.fc12.x86_64.rpm                                            | 393 kB     00:00     \n" "Running rpm_check_debug\n" "Running Transaction Test\n" "Finished Transaction Test\n" "Transaction Test Succeeded\n" "Running Transaction\n" "  Installing     : wget-1.11.4-5.fc12.x86_64                                            1/1 \n" "\n" "Installed:\n" "  wget.x86_64 0:1.11.4-5.fc12\n" "\n" "Complete!\n" "[root@pcmk-1 ~]#\n" "" msgstr "\n" "[root@pcmk-1 ~]# yum install -y wget\n" "Setting up Install Process\n" "Resolving Dependencies\n" "--> Running transaction check\n" "---> Package wget.x86_64 0:1.11.4-5.fc12 set to be updated\n" "--> Finished Dependency Resolution\n" "\n" "Dependencies Resolved\n" "\n" "===========================================================================================\n" " Package        Arch             Version                      Repository               Size\n" "===========================================================================================\n" "Installing:\n" " wget         x86_64          1.11.4-5.fc12                   rawhide                393 k\n" "\n" "Transaction Summary\n" "===========================================================================================\n" "Install       1 Package(s)\n" "Upgrade       0 Package(s)\n" "\n" "Total download size: 393 k\n" "Downloading Packages:\n" "wget-1.11.4-5.fc12.x86_64.rpm                                            | 393 kB     00:00     \n" "Running rpm_check_debug\n" "Running Transaction Test\n" "Finished Transaction Test\n" "Transaction Test Succeeded\n" "Running Transaction\n" "  Installing     : wget-1.11.4-5.fc12.x86_64                                            1/1 \n" "\n" "Installed:\n" "  wget.x86_64 0:1.11.4-5.fc12\n" "\n" "Complete!\n" "[root@pcmk-1 ~]#\n" "" #. Tag: title #, no-c-format msgid "Preparation" msgstr "Pregătire" #. Tag: para #, no-c-format msgid "First we need to create a page for Apache to serve up. On Fedora the default Apache docroot is /var/www/html, so we’ll create an index file there." msgstr "Mai întâi trebuie să creem o pagină pe care Apache să o servească. Pe Fedora docroot-ul implicit al Apache-ului este în /var/www/html, așa că vom crea un fișier index acolo." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# cat <<-END >/var/www/html/index.html\n" " <html>\n" " <body>My Test Site - pcmk-1</body>\n" " </html>\n" " END\n" "[root@pcmk-1 ~]#\n" "" msgstr "\n" "[root@pcmk-1 ~]# cat <<-END >/var/www/html/index.html\n" " <html>\n" " <body>My Test Site - pcmk-1</body>\n" " </html>\n" " END\n" "[root@pcmk-1 ~]#\n" "" #. Tag: para #, no-c-format msgid "For the moment, we will simplify things by serving up only a static site and manually sync the data between the two nodes. So run the command again on pcmk-2." msgstr "Pentru moment, vom simplifica lucrurile servind doar un site static și vom sincroniza manual datele între cele două noduri. Așa că rulați comanda din nou pe pcmk-2." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-2 ~]# cat <<-END >/var/www/html/index.html\n" " <html>\n" " <body>My Test Site - pcmk-2</body>\n" " </html>\n" " END\n" "[root@pcmk-2 ~]#\n" "" msgstr "\n" "[root@pcmk-2 ~]# cat <<-END >/var/www/html/index.html\n" " <html>\n" " <body>My Test Site - pcmk-2</body>\n" " </html>\n" " END\n" "[root@pcmk-2 ~]#\n" "" #. Tag: title #, no-c-format msgid "Enable the Apache status URL" msgstr "Activați status URL-ul Apache-ului" #. Tag: para #, no-c-format msgid "In order to monitor the health of your Apache instance, and recover it if it fails, the resource agent used by Pacemaker assumes the server-status URL is available. Look for the following in /etc/httpd/conf/httpd.conf and make sure it is not disabled or commented out:" msgstr "Pentru a monitoriza sănătatea instanței voastre de Apache și pentru a o recupera dacă eșuează, agentul de resursă folosit de Pacemaker presupune că URL-ul server-status este disponibil. Uitați-vă după următoarele în /etc/httpd/conf/httpd.conf și asigurați-vă că nu este dezactivat sau comentat." #. Tag: screen #, no-c-format msgid "\n" "<Location /server-status>\n" " SetHandler server-status\n" " Order deny,allow\n" " Deny from all\n" " Allow from 127.0.0.1\n" "</Location>\n" " " msgstr "\n" "<Location /server-status>\n" " SetHandler server-status\n" " Order deny,allow\n" " Deny from all\n" " Allow from 127.0.0.1\n" "</Location>\n" " " #. Tag: title #, no-c-format msgid "Update the Configuration" msgstr "Actualizarea Configurației" #. Tag: para #, no-c-format msgid "At this point, Apache is ready to go, all that needs to be done is to add it to the cluster. Lets call the resource WebSite. We need to use an OCF script called apache in the heartbeat namespace Compare the key used here ocf:heartbeat:apache with the one we used earlier for the IP address: ocf:heartbeat:IPaddr2 , the only required parameter is the path to the main Apache configuration file and we’ll tell the cluster to check once a minute that apache is still running." msgstr "La acest punct, Apache este gata de pornire, tot ce trebuie făcut este să îl adăugăm la cluster. Să denumim resursa WebSite. Avem nevoie să folosim un script OCF numit apache din namespace-ul Comparați cheia folosită aici, ocf:heartbeart:apache, cu cea folosită anterior pentru adresa IP: ocf:heartbeat:IPaddr2 heartbeat, singurul parametru necesar este calea către fișierul principal de configurare al Apache și vom spune clusterului să verifice o dată pe minut că apache încă funcționează." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm configure primitive WebSite ocf:heartbeat:apache params configfile=/etc/httpd/conf/httpd.conf op monitor interval=1min\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" " params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" " op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm configure primitive WebSite ocf:heartbeat:apache params configfile=/etc/httpd/conf/httpd.conf op monitor interval=1min\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" " params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" " op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" #. Tag: para #, no-c-format msgid "After a short delay, we should see the cluster start apache" msgstr "După o scurtă întârziere, ar trebui să vedem clusterul pornind apache-ul" #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:12:49 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-2\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-1\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:12:49 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-2\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-1\n" "" #. Tag: para #, no-c-format msgid "Wait a moment, the WebSite resource isn’t running on the same host as our IP address!" msgstr "Așteptați un moment, resursa WebSite nu rulează pe aceeași gazdă ca și adresa noastră IP!" #. Tag: title #, no-c-format msgid "Ensuring Resources Run on the Same Host" msgstr "Asigurarea că Resursele Rulează pe Aceeași Gazdă" #. Tag: para #, no-c-format msgid "To reduce the load on any one machine, Pacemaker will generally try to spread the configured resources across the cluster nodes. However we can tell the cluster that two resources are related and need to run on the same host (or not at all). Here we instruct the cluster that WebSite can only run on the host that ClusterIP is active on." msgstr "Pentru a reduce nivelul de încărcare pe oricare din mașini, Pacemaker va încerca în mod general să împrăștie resursele configurate de-a lungul nodurilor din cluster. Totuși putem spune clusterului că două resurse au legătura una cu cealaltă și trebuie să ruleze pe aceeași gazdă (sau să nu ruleze deloc). Aici instruim clusterul că WebSite poate rula numar pe o gazdă pe care este activ ClusterIP." #. Tag: para #, no-c-format msgid "For the constraint, we need a name (choose something descriptive like website-with-ip), indicate that it's mandatory (so that if ClusterIP is not active anywhere, WebSite will not be permitted to run anywhere either) by specifying a score of INFINITY and finally list the two resources." msgstr "Pentru restricție, ne trebuie un nume (alegeți ceva descriptiv precum website-with-ip), să indicăm că este obligatorie (astfel încât dacă ClusterIP nu este activ nicăieri, nici lui WebSite nu i se va permite să ruleze nicăieri) specificând un scor cu valoarea INFINITY și la sfârșit vom lista cele două resurse." #. Tag: para #, no-c-format msgid "If ClusterIP is not active anywhere, WebSite will not be permitted to run anywhere." msgstr "Dacă ClusterIP nu este activ nicăieri, lui WebSite nu i se va permite să ruleze nicăieri." #. Tag: para #, no-c-format msgid "Colocation constraints are \"directional\", in that they imply certain things about the order in which the two resources will have a location chosen. In this case we're saying WebSite needs to be placed on the same machine as ClusterIP, this implies that we must know the location of ClusterIP before choosing a location for WebSite." msgstr "Restricțiile de colocare sunt \"direcționale\", în sensul că implică anumite lucruri despre ordinea în care celor două resurse li se va alege o locație. În acest caz spunem că WebSite are nevoie să fie plasat pe aceeași mașină ca și ClusterIP, acest lucru implică faptul că noi trebuie să știm locația lui ClusterIP înainte de a alege o locație pentru WebSite." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm configure colocation website-with-ip INFINITY: WebSite ClusterIP\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:14:34 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-2\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-2\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm configure colocation website-with-ip INFINITY: WebSite ClusterIP\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:14:34 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-2\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-2\n" "" #. Tag: title #, no-c-format msgid "Controlling Resource Start/Stop Ordering" msgstr "Controlarea Ordinii de Pornire/Oprire a Resursei" #. Tag: para #, no-c-format msgid "When Apache starts, it binds to the available IP addresses. It doesn’t know about any addresses we add afterwards, so not only do they need to run on the same node, but we need to make sure ClusterIP is already active before we start WebSite. We do this by adding an ordering constraint. We need to give it a name (choose something descriptive like apache-after-ip), indicate that it's mandatory (so that any recovery for ClusterIP will also trigger recovery of WebSite) and list the two resources in the order we need them to start." msgstr "Când pornește Apache, se atașează de adresa IP disponibilă. Nu știe de alte adrese pe care le adăugăm ulterior, așa nu trebuie doar să ruleze pe același nod, dar trebuie să ne asigurăm că ClusterIP este activ deja înainte să pornim WebSite. Realizăm acest lucru prin adăugarea unei restricții de ordonare. Trebuie să îi dăm un nume (alegeți ceva descriptiv precum apache-after-ip), să indicăm faptul că este obligatorie (astfel încât orice recuperare a ClusterIP va declanșa recuperarea WebSite-ului) și să listăm cele două resurse în ordinea în care avem nevoie să le pornim." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm configure order apache-after-ip mandatory: ClusterIP WebSite\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "order apache-after-ip inf: ClusterIP WebSite\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm configure order apache-after-ip mandatory: ClusterIP WebSite\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "order apache-after-ip inf: ClusterIP WebSite\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" #. Tag: title #, no-c-format msgid "Specifying a Preferred Location" msgstr "Specificarea unei Locații Preferate" #. Tag: para #, no-c-format msgid "Pacemaker does not rely on any sort of hardware symmetry between nodes, so it may well be that one machine is more powerful than the other. In such cases it makes sense to host the resources there if it is available. To do this we create a location constraint. Again we give it a descriptive name (prefer-pcmk-1), specify the resource we want to run there (WebSite), how badly we’d like it to run there (we’ll use 50 for now, but in a two-node situation almost any value above 0 will do) and the host’s name." msgstr "Pacemaker nu se bazează pe nici un fel de simetrie hardware între noduri, așa că ar putea foarte bine ca o mașină să fie mai puternică decât cealaltă. În astfel de cazuri are logică să găzduim resursele acolo dacă este disponibilă. Pentru a face acest lucru creăm o restricție de locație. Din nou îi dăm un nume descriptiv (prefer-pcmk-1), specificăm resursa pe care vrem să o rulăm acolo (WebSite), cât de mult am dori ca aceasta să ruleze acolo (vom folosi 50 momentan, dar într-o situație cu două noduri aproape orice valoare mai mare ca 0 este suficientă) și numele gazdei." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm configure location prefer-pcmk-1 WebSite 50: pcmk-1\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "location prefer-pcmk-1 WebSite 50: pcmk-1\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:17:35 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-2\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-2\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm configure location prefer-pcmk-1 WebSite 50: pcmk-1\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "location prefer-pcmk-1 WebSite 50: pcmk-1\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:17:35 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-2\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-2\n" "" #. Tag: para #, no-c-format msgid "Wait a minute, the resources are still on pcmk-2!" msgstr "Așteptați o clipă, resursele sunt încă pe pcmk-2!" #. Tag: para #, no-c-format msgid "Even though we now prefer pcmk-1 over pcmk-2, that preference is (intentionally) less than the resource stickiness (how much we preferred not to have unnecessary downtime)." msgstr "Chiar dacă acum preferăm pcmk-1 în favoarea pcmk-2, această preferință este (în mod intenționat) mai mică decât adezivitatea resursei (cât de mult am preferat să nu avem nefuncționare inutilă)." #. Tag: para #, no-c-format msgid "To see the current placement scores, you can use a tool called ptest" msgstr "Pentru a vedea scorurile curente de plasament, puteți folosi un utilitar numit ptest" #. Tag: para #, no-c-format msgid "ptest -sL" msgstr "ptest -sL" #. Tag: para #, no-c-format msgid "Include output" msgstr "Include rezultatul de ieșire" #. Tag: para #, no-c-format msgid "There is a way to force them to move though..." msgstr "Există o cale să le forțăm să se mute totuși ..." #. Tag: title #, no-c-format msgid "Manually Moving Resources Around the Cluster" msgstr "Mutarea Manuală a Resurselor Prin Jurul Clusterului" #. Tag: para #, no-c-format msgid "There are always times when an administrator needs to override the cluster and force resources to move to a specific location. Underneath we use location constraints like the one we created above, happily you don’t need to care. Just provide the name of the resource and the intended location, we’ll do the rest." msgstr "Sunt întotdeauna momente când un administrator are nevoie să preia controlul clusterului și să forțeze resursele să se mute într-o locație specifică. Dedesupt folosim restricții de locație precum cea pe care am creat-o mai sus, dar în mod fericit nu trebuie să vă pese. Doar furnizați numele resursei și locația dorită, iar noi vom face restul." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm resource move WebSite pcmk-1\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:19:24 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-1\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-1\n" "Notice how the colocation rule we created has ensured that ClusterIP was also moved to pcmk-1.\n" "For the curious, we can see the effect of this command by examining the configuration\n" "crm configure show\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "location cli-prefer-WebSite WebSite \\\n" " rule $id=\"cli-prefer-rule-WebSite\" inf: #uname eq pcmk-1\n" "location prefer-pcmk-1 WebSite 50: pcmk-1\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm resource move WebSite pcmk-1\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:19:24 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" "ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-1\n" "WebSite        (ocf::heartbeat:apache):        Started pcmk-1\n" "Notice how the colocation rule we created has ensured that ClusterIP was also moved to pcmk-1.\n" "For the curious, we can see the effect of this command by examining the configuration\n" "crm configure show\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "location cli-prefer-WebSite WebSite \\\n" " rule $id=\"cli-prefer-rule-WebSite\" inf: #uname eq pcmk-1\n" "location prefer-pcmk-1 WebSite 50: pcmk-1\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" #. Tag: para #, no-c-format msgid "Highlighted is the automated constraint used to move the resources to pcmk-1" msgstr "Subliniată este restricția automată folosită pentru a muta resursele pe pcmk-1" #. Tag: title #, no-c-format msgid "Giving Control Back to the Cluster" msgstr "Returnarea Controlului Înapoi Clusterului" #. Tag: para #, no-c-format msgid "Once we’ve finished whatever activity that required us to move the resources to pcmk-1, in our case nothing, we can then allow the cluster to resume normal operation with the unmove command. Since we previously configured a default stickiness, the resources will remain on pcmk-1." msgstr "Odată ce am terminat oricare activitate ce ne-a cerut să mutăm resursele pe pcmk-1, în cazul nostru nimic, putem mai apoi să permitem clusterului să reia operațiunile normale prin comanda unmove. Din moment ce am configurat anterior o adezivitate implicită, resursele vor rămâne pe pcmk-1." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm resource unmove WebSite\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "location prefer-pcmk-1 WebSite 50: pcmk-1\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm resource unmove WebSite\n" "[root@pcmk-1 ~]# crm configure show\n" "node pcmk-1\n" "node pcmk-2\n" "primitive WebSite ocf:heartbeat:apache \\\n" "        params configfile=\"/etc/httpd/conf/httpd.conf\" \\\n" "        op monitor interval=\"1min\"\n" "primitive ClusterIP ocf:heartbeat:IPaddr2 \\\n" "        params ip=\"192.168.122.101\" cidr_netmask=\"32\" \\\n" "        op monitor interval=\"30s\"\n" "location prefer-pcmk-1 WebSite 50: pcmk-1\n" "colocation website-with-ip inf: WebSite ClusterIP\n" "property $id=\"cib-bootstrap-options\" \\\n" "        dc-version=\"1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\" \\\n" "        cluster-infrastructure=\"openais\" \\\n" "        expected-quorum-votes=\"2\" \\\n" "        stonith-enabled=\"false\" \\\n" "        no-quorum-policy=\"ignore\"\n" "rsc_defaults $id=\"rsc-options\" \\\n" "        resource-stickiness=\"100\"\n" "" #. Tag: para #, no-c-format msgid "Note that the automated constraint is now gone. If we check the cluster status, we can also see that as expected the resources are still active on pcmk-1." msgstr "Observați că restricția automată acum nu mai există. Dacă verificăm status-ul clusterului, putem vedea că așa cum ne așteptam resursele sunt în continuare active pe pcmk-1." #. Tag: screen #, no-c-format msgid "\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:20:53 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" " ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-1\n" " WebSite        (ocf::heartbeat:apache):        Started pcmk-1\n" "" msgstr "\n" "[root@pcmk-1 ~]# crm_mon\n" "============\n" "Last updated: Fri Aug 28 16:20:53 2009\n" "Stack: openais\n" "Current DC: pcmk-2 - partition with quorum\n" "Version: 1.1.5-bdd89e69ba545404d02445be1f3d72e6a203ba2f\n" "2 Nodes configured, 2 expected votes\n" "2 Resources configured.\n" "============\n" "\n" "Online: [ pcmk-1 pcmk-2 ]\n" "\n" " ClusterIP        (ocf::heartbeat:IPaddr):        Started pcmk-1\n" " WebSite        (ocf::heartbeat:apache):        Started pcmk-1\n" ""