Compare commits

...
2 Commits
Author SHA1 Message Date
Vitaliy Filippov 88c9f9bd6d Test etcd schizophrenia 2025-07-02 18:38:04 +03:00
Vitaliy Filippov f515fcce62 Fix volume_size_info in PVE VitastorPlugin 2025-06-18 12:38:09 +03:00
2 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -410,8 +410,8 @@ sub volume_size_info
my $prefix = defined $scfg->{vitastor_prefix} ? $scfg->{vitastor_prefix} : 'pve/';
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
my $info = _process_list($scfg, $storeid, run_cli($scfg, [ 'ls', $prefix.$name ]))->[0];
#return wantarray ? ($size, $format, $used, $parent, $st->ctime) : $size;
return $info->{size};
# (size, format, used, parent, ctime)
return wantarray ? ($info->{size}, $info->{format}, $info->{size}, $info->{parent}, 0) : $info->{size};
}
sub volume_resize
+8 -1
View File
@@ -1051,8 +1051,15 @@ void osd_t::report_pg_states()
etcd_reporting_pg_state = true;
st_cli.etcd_txn(json11::Json::object {
{ "compare", checks }, { "success", success }, { "failure", failure }
}, st_cli.etcd_quick_timeout, 0, 0, [this, reporting_pgs](std::string err, json11::Json data)
}, st_cli.etcd_quick_timeout, 0, 0, [this, reporting_pgs, success_count = success.size(), failure_count = failure.size()](std::string err, json11::Json data)
{
int expected_count = (data["succeeded"].bool_value() ? success_count : failure_count);
if (expected_count != data["responses"].array_items().size())
{
printf("Unexpected response from etcd - 'responses' count (%u) isn't equal to expected (%u), stopping\n",
data["responses"].array_items().size(), expected_count);
force_stop(1);
}
etcd_reporting_pg_state = false;
if (!data["succeeded"].bool_value())
{