= How to replace CMC with dummy CMC2 = There is a dummy CMC2 provided by Gridservices2. This service response any request from Nodehandler with a fake positive answer. For example, when Nodehandler inquiry dummy CMC2 the status of specific nodes, dummy CMC2 will always tell Nodehandler the nodes are on even no node is on in the testbed. In this situation, dummy CMC2 is not able to reset, boot or turn off nodes and detect the real status of nodes like CMC does.[[BR]] In case you don't have CM cards installed on nodes, you can use dummy CMC2 to make Nodehandler work and manually reboot or nodes.[[BR]] To enable dummy CMC2, you need create a file named "cmcStub.yaml" under "/etc/gridservices2/enabled" or make a symbol link named "cmcStub.yaml" under this path to a real configuration file. Then edit this file like following.[[BR]] {{{ 1 --- 2 cmc: 3 # listAll: return array of x/y coodinates of all nodes in '[x,y]' form. 4 # listStatus: return array of x/y coodinates of all nodes in '[x, y, STAT US]' form. 5 # 6 testbed: 7 8 # These are the configuration parameters for the default testbed 9 # Currently the default testbed is the "indoor" one 10 default: 11 listAll: | 12 (1..10).to_a.map {|i| [i, 2]} 13 listStatus: | 14 (1..10).to_a.map {|i| [i, 2, 'POWERON']} 15 16 # These are the configuration parameters for the "outdoor" testbed 17 outdoor: 18 listAll: | 19 (100..107).to_a.map {|i| [i,0]} 20 listStatus: | 21 (100..107).to_a.map {|i| [i, 0, 'POWERON']} }}} Dummy CMC2 supports node's IP like "10.10.'''x'''.2", which means only '''x''' can be changed to represent different nodes. You can set the other three number according your testbed configuration, such as 198.168.'''x'''.4. [[BR]] Line 12 and 14 define the range of testbed which is from node1-2 to node10-2. You can change "10" to the actual number of nodes in your testbed.[[BR]] You also need to edit the configuration of DHCP and DNS to match nodes' name and IP address, you can refer link [wiki:Internal/Infrastructure/SetupTestbed/BOOTB#DHCP here] and [wiki:Internal/Infrastructure/SetupTestbed/BOOTB#DNS here]. Some examples are posted below.[[BR]] [[BR]]''/etc/bind/zone.orbit''[[BR]] {{{ 1 2 $TTL 3600 3 @ IN SOA services.grid.poly.edu. root.services.grid.poly.edu. ( 4 2008021817 ; serial 5 28800 ; refresh (8hours) 6 900 ; retry (15 mins) 7 604800 ; expire (1 week) 8 86400 ; minimum (1 day) 9 ); 10 @ IN NS services.grid.poly.edu. 11 $ORIGIN in-addr.arpa. 12 $ORIGIN 10.in-addr.arpa. 13 $ORIGIN 0.10.10.in-addr.arpa. 14 $TTL 129600 15 10 IN PTR services.grid.poly.edu. 16 10 IN PTR console.grid.poly.edu. 17 18 $ORIGIN 1.10.10.in-addr.arpa. 19 9 IN PTR rxwarp.grid.poly.edu. 20 8 IN PTR windows.grid.poly.edu. 21 1 IN PTR node1-1.grid.poly.edu. 22 2 IN PTR node1-2.grid.poly.edu. 23 3 IN PTR node1-3.grid.poly.edu. 24 25 26 2.2.10.10.in-addr.arpa. IN PTR node2-2.grid.poly.edu. 27 2.3.10.10.in-addr.arpa. IN PTR node3-2.grid.poly.edu. 28 29 $ORIGIN 200.1.10.in-addr.arpa. 30 1 IN PTR cmc.grid.poly.edu. }}} [[BR]]''/etc/bind/orbit.zone''[[BR]] {{{ 1 $TTL 3600 2 @ IN SOA services.grid.poly.edu. root.services.grid.poly.edu. ( 3 2008072501 ; serial 4 3600 ; refresh (1 hour) 5 600 ; retry (10 min) 6 10000 ; expire (2 hours) 7 3600 ); 8 ; 9 @ IN NS services.grid.poly.edu. 10 $ORIGIN grid.poly.edu. 11 $TTL 129600 12 windows IN A 10.10.1.8 13 rxwarp IN A 10.10.1.9 14 node1-2 IN A 10.10.1.2 15 node2-2 IN A 10.10.2.2 16 node3-2 IN A 10.10.3.2 17 18 console IN A 10.10.0.10 19 cmc IN A 10.1.200.1 20 21 services IN CNAME console.grid.poly.edu. 22 dhcp IN CNAME console.grid.poly.edu. 23 frisbee IN CNAME console.grid.poly.edu. 24 pxe IN CNAME console.grid.poly.edu. 25 oml IN CNAME console.grid.poly.edu. 26 repository IN CNAME console.grid.poly.edu. 27 repository1 IN CNAME console.grid.poly.edu. 28 repository2 IN CNAME console.grid.poly.edu. 29 ntp IN CNAME console.grid.poly.edu. 30 loghost IN CNAME console.grid.poly.edu. 31 idb1 IN CNAME console.grid.poly.edu. 32 idb2 IN CNAME console.grid.poly.edu. }}} [[BR]]''/etc/dhcp3/dhcpd.conf'' {{{ # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style interim; use-host-decl-names on; allow booting; allow bootp; # option definitions common to all supported networks... option domain-name "grid.poly.edu"; default-lease-time 259200; max-lease-time 259200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; subnet 10.10.0.0 netmask 255.255.0.0 { range 10.10.1.1 10.10.255.254; option domain-name "grid.poly.edu"; ddns-updates off; ddns-domainname "grid.poly.edu"; ddns-rev-domainname "in-addr.arpa"; option domain-name-servers 10.10.0.10; next-server 10.10.0.10; host services {hardware ethernet 00:1B:2F:BE:EF:94; fixed-address services.grid.poly.edu;} host console {hardware ethernet 00:1B:2F:BE:DF:6E; fixed-address console.grid.poly.edu;} filename "/tftpboot/pxelinux.bin"; #node 10.10.x.y group { host node1-2 { hardware ethernet 00:03:2D:08:19:FE; fixed-address node1-2.grid.poly.edu; } host node2-2 { hardware ethernet 00:03:2D:08:19:EE; fixed-address node2-2.grid.poly.edu; } host node3-2 { hardware ethernet 00:03:2D:07:67:CE; fixed-address node1-3.grid.poly.edu; } } } }}} [[BR]]After all configuration is done, you need [wiki:Internal/Infrastructure/SetupTestbed/resetGS stop Gridservice and reset Gridservice2]. You may also verify if dummy CMC2 is working by opening this URL in web browser.[[BR]] '''http://cmc:5022/cmc/allStatus''' [[BR]]If you use dummy CMC2 to replace CMC, you will not be able to reboot or turn on nodes. Alternatively, you can boot nodes by hand or reboot them with command like "'''ssh root@10.10.1.2 'reboot''''". If nodeagent4 is launched on nodes, a more effective way to reboot them is executing a small experiment script with command "'''omf exec reboot'''". The script looks like following.[[BR]] ''reboot.rb'' {{{ defGroup('mygroup',[1..10,2]) whenAllUp() { allGroups.exec("/sbin/reboot") wait 2 # wait 2 sec Experiment.done } }}} [[BR]]Those scripts reboot 10 nodes, from node1-2 to node10-2 , at once. -- The authors of this page would like to thank Thierry Rakotoarivelo for his help with the dummy CMC2 codes.