|
|
@ -26,10 +26,44 @@ $anvil->Get->switches; |
|
|
|
$anvil->Database->connect({debug => 3}); |
|
|
|
$anvil->Database->connect({debug => 3}); |
|
|
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0132"}); |
|
|
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0132"}); |
|
|
|
|
|
|
|
|
|
|
|
my ($free_minor, $free_port) = $anvil->DRBD->get_next_resource({debug => 2, anvil_uuid => "1aded871-fcb1-4473-9b97-6e9c246fc568"}); |
|
|
|
my $key_string = 'scan_drbd_message_0007,!!resource_name!srv00-sql1!!,!!resource_state!#!string!scan_drbd_unit_0004!#!!,!!resource_xml!<resource name="srv00-sql1" conf-file-line="/etc/drbd.d/srv00-sql1.res:2">] from key string: [scan_drbd_message_0007,!!resource_name!srv00-sql1!!,!!resource_state!#!string!scan_drbd_unit_0004!#!!,!!resource_xml!<resource name="srv00-sql1" conf-file-line="/etc/drbd.d/srv00-sql1.res:2"> |
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { |
|
|
|
<host name="mk-a02n01"> |
|
|
|
free_minor => $free_minor, |
|
|
|
<volume vnr="0"> |
|
|
|
free_port => $free_port, |
|
|
|
<device minor="0">/dev/drbd_srv00-sql1_0</device> |
|
|
|
}}); |
|
|
|
<disk>/dev/mk-a02n01_ssd0/srv00-sql1_0</disk> |
|
|
|
|
|
|
|
<meta-disk>internal</meta-disk> |
|
|
|
|
|
|
|
</volume> |
|
|
|
|
|
|
|
<address family="(null)" port="(null)">(null)</address> |
|
|
|
|
|
|
|
</host> |
|
|
|
|
|
|
|
<host name="mk-a02n02"> |
|
|
|
|
|
|
|
<volume vnr="0"> |
|
|
|
|
|
|
|
<device minor="0">/dev/drbd_srv00-sql1_0</device> |
|
|
|
|
|
|
|
<disk>/dev/mk-a02n02_ssd0/srv00-sql1_0</disk> |
|
|
|
|
|
|
|
<meta-disk>internal</meta-disk> |
|
|
|
|
|
|
|
</volume> |
|
|
|
|
|
|
|
<address family="(null)" port="(null)">(null)</address> |
|
|
|
|
|
|
|
</host> |
|
|
|
|
|
|
|
<connection> |
|
|
|
|
|
|
|
<host name="mk-a02n01"><address family="ipv4" port="7788">10.101.12.1</address></host> |
|
|
|
|
|
|
|
<host name="mk-a02n02"><address family="ipv4" port="7788">10.101.12.2</address></host> |
|
|
|
|
|
|
|
<section name="net"> |
|
|
|
|
|
|
|
<option name="protocol" value="C"/> |
|
|
|
|
|
|
|
<option name="fencing" value="resource-and-stonith"/> |
|
|
|
|
|
|
|
</section> |
|
|
|
|
|
|
|
<section name="disk"> |
|
|
|
|
|
|
|
<option name="c-max-rate" value="500M"/> |
|
|
|
|
|
|
|
</section> |
|
|
|
|
|
|
|
</connection> |
|
|
|
|
|
|
|
</resource>!!'; |
|
|
|
|
|
|
|
my $out_string = $anvil->Words->parse_banged_string({ |
|
|
|
|
|
|
|
debug => 2, |
|
|
|
|
|
|
|
key_string => $key_string, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "Got: |
|
|
|
|
|
|
|
==== |
|
|
|
|
|
|
|
".$out_string." |
|
|
|
|
|
|
|
==== |
|
|
|
|
|
|
|
"; |
|
|
|
|
|
|
|
|
|
|
|
$anvil->nice_exit({exit_code => 0}); |
|
|
|
$anvil->nice_exit({exit_code => 0}); |
|
|
|