* Fixed a bug in Cluster->assemble_storage_groups() where, if a group is created during an anvil-provision-server run, the group would get created multiple times.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 4 years ago
parent 83b140511e
commit a480357049
  1. 12
      Anvil/Tools/Cluster.pm
  2. 5
      cgi-bin/get_replicated_storage
  3. 2
      share/words.xml

@ -427,12 +427,15 @@ ORDER BY
{
# If there are two or three VGs, we can create a group.
my $count = keys %{$anvil->data->{ungrouped_vgs}{$scan_lvm_vg_size}{host_uuid}};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { count => $count }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
scan_lvm_vg_size => $scan_lvm_vg_size." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $scan_lvm_vg_size}).")",
count => $count,
}});
if (($count == 2) or ($count == 3))
{
# Create the volume group ... group. First we need a group number
my $storage_group_uuid = $anvil->Database->insert_or_update_storage_groups({
debug => $debug,
debug => 2,
storage_group_anvil_uuid => $anvil_uuid,
});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { storage_group_uuid => $storage_group_uuid }});
@ -448,7 +451,7 @@ ORDER BY
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { storage_group_member_vg_uuid => $storage_group_member_vg_uuid }});
my $storage_group_member_uuid = $anvil->Database->insert_or_update_storage_group_members({
debug => $debug,
debug => 2,
storage_group_member_storage_group_uuid => $storage_group_uuid,
storage_group_member_host_uuid => $host_uuid,
storage_group_member_vg_uuid => $storage_group_member_vg_uuid,
@ -461,6 +464,9 @@ ORDER BY
}});
}
# Delete this so we don't keel creating new Storage groups.
delete $anvil->data->{ungrouped_vgs}{$scan_lvm_vg_size};
# Reload storage group data
$reload_storage_groups = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { reload_storage_groups => $reload_storage_groups }});

@ -82,6 +82,7 @@ else
$anvil->data->{raw}{newest_record}{$dr1_uuid} = 0;
}
$hash->{total_resync_rate} = 0;
foreach my $host_uuid (@hosts)
{
my $host_name = $anvil->Get->host_name_from_uuid({host_uuid => $host_uuid});
@ -266,6 +267,10 @@ WHERE
}});
}
if ($scan_drbd_peer_replication_speed)
{
$hash->{total_resync_rate} += $scan_drbd_peer_replication_speed;
}
push @{$connections}, {
protocol => "async_".lc($scan_drbd_peer_protocol),
connection => $scan_drbd_peer_connection_state,

@ -2106,7 +2106,7 @@ If you are comfortable that the target has changed for a known reason, you can s
<key name="striker_0277">No UPSes</key>
<key name="striker_0278">This is a condition record, used by programs like scan agents to track how long a condition has existed for.</key>
<key name="striker_0279">This indicated why a machine was powered off. This is used by ScanCore to decide if or when to power up the target host.</key>
<key name="striker_0280">Storage Pool #!variable!number!#</key> <!-- This is used for auto-generated VG groups -->
<key name="striker_0280">Storage group #!variable!number!#</key> <!-- This is used for auto-generated VG groups -->
<key name="striker_0281">Manage this file.</key>
<key name="striker_0282">This will remove the file from all systems.</key>
<key name="striker_0283">There are no #!string!brand_0006!# configured yet. Existing files will automatically sync to new clusters.</key>

Loading…
Cancel
Save