Crm

Aus xinux.net
Zur Navigation springen Zur Suche springen

configure

show

Anzeigen der Konfiguration

root@worf:~# crm configure show
node 1: worf
node 2: kurn
primitive res-ip IPaddr2 \
	params ip=192.168.255.100 nic=eth0 \
	op monitor interval=10
primitive res-ipsec lsb:ipsec \
	op monitor interval=30s
primitive res-iptables lsb:iptables \
	op monitor interval=30s
primitive res-pppoe lsb:pppoe \
	op monitor interval=30s
group gr-vpn-gw res-pppoe res-ip res-iptables res-ipsec \
	meta target-role=Started
location cli-prefer-gr-vpn-gw gr-vpn-gw role=Started inf: worf
property cib-bootstrap-options: \
	have-watchdog=false \
	dc-version=1.1.14-70404b0 \
	cluster-infrastructure=corosync \
	cluster-name=debian \
	stonith-enabled=false \
	no-quorum-policy=ignore

save

Sichern der Konfiguration in eine Datei

root@worf:~# crm configure save vpn-gw.conf

load

Sichern der Konfiguration in eine Datei

root@worf:~# crm configure load update vpn-gw.conf
root@worf:~# crm configure load replace vpn-gw.conf

edit

Interaktiver Modus

root@worf:~# crm configure edit

comit

  • Änderungen übernehmen
crm(live)# configure comit
INFO: apparently there is nothing to commit
INFO: try changing something first

monitor

  • monitor resourcen-namen (intervall der checks in minuten):(timeout des monitor befehls)
 monitor fs_res 6:10

delete

  • löschen einer resource
crm(live)# configure delete <res-apache2>
INFO: hanging location:cli-prefer-res-apache2 deleted
INFO: constraint colocation:fs_drbd_colo updated

erase

  • erase kann die nodes aus der Konfiguration löschen
crm(live)# configure erase nodes

node

  • node hinzufügen
crm(live)# configure  node 1: tic

rename

  • umbenen eines cib objects
crm(live)configure# rename virtual-ip virtual-ipv4
INFO: modified colocation:fs_drbd_colo from virtual-ip to virtual-ipv4

validate_all

  • überprüfen eines cib objects
crm(live)configure# validate_all virtual-ipv4
INFO: Using calculated netmask for 192.168.244.80: 255.255.248.0

rctest

  • testet die resource auf beiden seiten

parallax ssh muss installiern sein

https://github.com/krig/parallax

rsctest virtual-ip-2
Probing resources .Warning: could not find an executable path for askpass because
Parallax SSH was not installed correctly.  Password prompts will not
work.
testing on tic: virtual-ip-2
testing on tuc: virtual-ip-2

verify

  • Überprüft die Konfiguration auf Fehler (bei korrekter Konfiguraton erscheint keine Meldung)
crm(live)configure# verify
ERROR: error: unpack_location_tags:	Constraint 'cli-prefer-drbd_res': Invalid reference to 'drbd_res'
Errors found during check: config not valid

corosync

show

  • zeigt die corosync-Konfiguration an
totem {
    version: 2
    cluster_name: debian
    secauth: off
    transport:udpu
    interface {
        ringnumber: 0
        bindnetaddr: 10.144.144.0
        broadcast: yes
        mcastport: 5405
    }
}

nodelist {
    node {
        ring0_addr: 10.144.144.2
        name: tic
        nodeid: 1

    }
    node {
        ring0_addr: 10.144.144.1
        name: tuc
        nodeid: 2
    }
}

quorum {
    provider: corosync_votequorum
    two_node: 1
    wait_for_all: 1
    last_man_standing: 1
    auto_tie_breaker: 0
}

edit

  • öffnet die Datei, die sich mit "show" anzeigen lässt, in vi

status

  • zeigt den status von corosync an
crm(live)corosync# status
Printing ring status.
Local node ID 1
RING ID 0
	id	= 10.144.144.2
	status	= ring 0 active with no faults
Quorum information
------------------
Date:             Thu Oct 20 14:58:41 2016
Quorum provider:  corosync_votequorum
Nodes:            2
Node ID:          1
Ring ID:          64
Quorate:          Yes

Votequorum information
----------------------
Expected votes:   2
Highest expected: 2
Total votes:      2
Quorum:           1  
Flags:            2Node Quorate WaitForAll LastManStanding 

Membership information
----------------------
    Nodeid      Votes Name
         2          1 10.144.144.1
         1          1 10.144.144.2 (local)

history

events

crm(live)history# events
INFO: Retrieving information from cluster nodes, please wait...
ERROR: no dateutil, please provide times as printed by date(1)
ERROR: datetime_to_timestamp error: unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime'
WARNING: giving up on log /var/cache/crm/history/live/tuc/ha-log.txt

info

crm(live)history# info
INFO: fetching new logs, please wait ...
ERROR: no dateutil, please provide times as printed by date(1)
ERROR: datetime_to_timestamp error: unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime'
Source: live
Created on: Thu Oct 20 15:02:19 CEST 2016
By: report -Z -Q -f Thu Oct 20 14:02:00 2016 /var/cache/crm/history/live
Period: 2016-10-20 16:02:00 - --/--/-- --:--:--
Nodes: tic tuc
Groups: 
Resources: drbd_res fs_res virtual-ip virtual-ip-2
Transitions:


events