This adds support (testing needed) for "Long-Throw" DR; which is a wrapper for using 'drbd-proxy' to provide larger transmit buffers so slow/high-latency DR hosts.
* Created DRBD->check_proxy_license() to do (some level of) sanity checks on the DRBD proxy license file.
* Updated DRBD->gather_data() to parse out the inside and outside ports for resource configs using proxy.
* Reworked DRBD->get_next_resource() to return 1, 3 or 7 TCP ports depending, with the new long_throw_ports parameter triggering the 7 ports.
* Added 'tcpdump' to the anvil-core requires list.
* Reworked scan-drbd to record the ports used in proxy configs. This required adding a check to change the 'scan_drbd_peer_tcp_port' column type to 'text' to support CSVs.
* Reworked anvil-manage-dr (needs testing!) to support "long-throw" DR configs.
* Updated anvil-safe-stop to check if the nodes are in the cluster before trying to migrate.
Signed-off-by: Digimer <digimer@alteeve.ca>
scan_drbd_peer_replication_speednumericnotnull,-- This is how many bytes per second are being copied. Set to '0' when not synchronizing.
scan_drbd_peer_replication_speednumericnotnull,-- This is how many bytes per second are being copied. Set to '0' when not synchronizing.
scan_drbd_peer_estimated_time_to_syncnumericnotnull,-- This is the number of second that is *estimated* remaining in the resync. Set to '0' when both sides are UpToDate.
scan_drbd_peer_estimated_time_to_syncnumericnotnull,-- This is the number of second that is *estimated* remaining in the resync. Set to '0' when both sides are UpToDate.
scan_drbd_peer_ip_addresstextnotnull,-- The (SN) IP address used for this peer.
scan_drbd_peer_ip_addresstextnotnull,-- The (SN) IP address used for this peer.
scan_drbd_peer_tcp_portnumericnotnull,-- This is the port number used for this peer.
scan_drbd_peer_tcp_porttextnotnull,-- This is the port number used for this peer. It can be a CSV for drbd-proxy connections, hence being type text
scan_drbd_peer_protocoltextnotnull,-- This is 'A' for async peers (to DR, usually) or 'C' to sync peers (node peer and sometimes DR)
scan_drbd_peer_protocoltextnotnull,-- This is 'A' for async peers (to DR, usually) or 'C' to sync peers (node peer and sometimes DR)
scan_drbd_peer_fencingtextnotnull,-- Set to 'resource-and-stonith' for node peers and 'dont-care' for DR hosts.
scan_drbd_peer_fencingtextnotnull,-- Set to 'resource-and-stonith' for node peers and 'dont-care' for DR hosts.
@ -526,6 +526,10 @@ The definition data passed in was:
#!variable!output!#
#!variable!output!#
====</key>
====</key>
<keyname="error_0371">Can not (dis)connect the server: [#!variable!server!#] as the resource config file: [#!variable!config_file!#] doesn't exist. Do you need to '--protect' it?</key>
<keyname="error_0371">Can not (dis)connect the server: [#!variable!server!#] as the resource config file: [#!variable!config_file!#] doesn't exist. Do you need to '--protect' it?</key>
<keyname="error_0372">We're set to migrate servers (--stop-servers not used) but both nodes are not in the cluster, so migrations would fail. Aborting.</key>
<keyname="error_0373">Long-throw requires a license, and the license file is not installed, and '--license-file /path/to/drbd-proxy.license' was not passed.</key>
<keyname="error_0374">The long-throw license file: [#!variable!file!#] was not found, so unable to install it.</key>
<keyname="error_0375">There was a problem with the "Long-throw" lincense file. This will prevent Long-Throw DR from working. Details of the error will be recorded in the log file.</key>
<!-- Files templates -->
<!-- Files templates -->
<!-- NOTE: Translating these files requires an understanding of which lines are translatable -->
<!-- NOTE: Translating these files requires an understanding of which lines are translatable -->
@ -802,9 +806,38 @@ sys::manage::firewall = 1
]]></key>
]]></key>
<keyname="file_0006"><![CDATA[# Resource for #!variable!server!#
<keyname="file_0006"><![CDATA[# Resource for #!variable!server!#
resource #!variable!server!# {
resource #!variable!server!# {
#!variable!proxy!#
#!variable!hosts!#
#!variable!hosts!#
#!variable!connections!#
#!variable!connections!#
}
}
]]></key>
<keyname="file_0007"><![CDATA[
connection {
host #!variable!host1_short_name!# address 127.0.0.1:#!variable!tcp_port!# via proxy on #!variable!host1_short_name!# {
# The variable bit rate caps at 100 MiB/sec, setting this changes the maximum
# variable rate.
c-max-rate #!variable!c-rate-maximum!#M;
}
net {
protocol #!variable!protocol!#;
fencing #!variable!fencing!#;
}
}
]]></key>
<keyname="file_0008"><![CDATA[# Resource for #!variable!server!#
proxy {
# You need to allocate >= 16MB per proxy connection to DRBD proxy for it to bring up a connection
memlimit #!variable!memlimiin!#M;
}
]]></key>
]]></key>
<!-- Table headers -->
<!-- Table headers -->
@ -1379,6 +1412,7 @@ Note: This is a permanent action! If you protect this server again later, a full
<keyname="job_0418">Re-parsing the replicated storage configuration.</key>
<keyname="job_0418">Re-parsing the replicated storage configuration.</key>
<keyname="job_0419">The server: [#!variable!server!#] was found to be running outside the cluster. Asking it to shut down now.</key>
<keyname="job_0419">The server: [#!variable!server!#] was found to be running outside the cluster. Asking it to shut down now.</key>
<keyname="job_0428">The server: [#!variable!server!#] is still running two minutes after asking it to stop. It might have woken up on the first press and ignored the shutdown request (Hi Windows). Pressing the poewr button again.</key>
<keyname="job_0428">The server: [#!variable!server!#] is still running two minutes after asking it to stop. It might have woken up on the first press and ignored the shutdown request (Hi Windows). Pressing the poewr button again.</key>
<keyname="job_0429">Copying the Long-throw (drbd proxy) license file: [#!variable!file!#] into place.</key>
@ -1511,7 +1545,7 @@ The database connection error was:
- Record Locator: [#!variable!record_locator!#]
- Record Locator: [#!variable!record_locator!#]
- Timestamp: .... [#!variable!modified_date!#]
- Timestamp: .... [#!variable!modified_date!#]
</key>
</key>
<keyname="log_0099">[ Warning ] - There is no #!string!brand_0002!# database user set for the local machine. Please check: [#!data!path::config::anvil.conf!#]'s DB entry: [#!variable!uuid!#]. Using 'admin'.</key>
<keyname="log_0099">[ Warning ] - There is no #!string!brand_0002!# database user set for the local machine. Please check: [#!data!path::configs::anvil.conf!#]'s DB entry: [#!variable!uuid!#]. Using 'admin'.</key>
<keyname="log_0100">Database user: [#!variable!user!#] password has been set/updated.</key>
<keyname="log_0100">Database user: [#!variable!user!#] password has been set/updated.</key>
<keyname="log_0101">Failed to connect to: [#!variable!target!#:#!variable!port!#], sleeping for a second and then trying again.</key>
<keyname="log_0101">Failed to connect to: [#!variable!target!#:#!variable!port!#], sleeping for a second and then trying again.</key>
<keyname="log_0102">I am not recording the alert with message_key: [#!variable!message_key!#] to the database because its log level was lower than any recipients.</key>
<keyname="log_0102">I am not recording the alert with message_key: [#!variable!message_key!#] to the database because its log level was lower than any recipients.</key>
@ -2208,6 +2242,10 @@ The file: [#!variable!file!#] needs to be updated. The difference is:
<keyname="log_0725">Found the missing file: [#!variable!file!#] in the directory: [#!variable!directory!#]. Updating the database now.</key>
<keyname="log_0725">Found the missing file: [#!variable!file!#] in the directory: [#!variable!directory!#]. Updating the database now.</key>
<keyname="log_0726">Deleting the hash key: [#!variable!hash_key!#].</key>
<keyname="log_0726">Deleting the hash key: [#!variable!hash_key!#].</key>
<keyname="log_0727">[ Note ] - The server: [#!variable!server!#] is not yet off, but we've been told not to wait for it to stop.</key>
<keyname="log_0727">[ Note ] - The server: [#!variable!server!#] is not yet off, but we've been told not to wait for it to stop.</key>