Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88c9f9bd6d | ||
|
|
f515fcce62 |
@@ -410,8 +410,8 @@ sub volume_size_info
|
|||||||
my $prefix = defined $scfg->{vitastor_prefix} ? $scfg->{vitastor_prefix} : 'pve/';
|
my $prefix = defined $scfg->{vitastor_prefix} ? $scfg->{vitastor_prefix} : 'pve/';
|
||||||
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
|
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
|
||||||
my $info = _process_list($scfg, $storeid, run_cli($scfg, [ 'ls', $prefix.$name ]))->[0];
|
my $info = _process_list($scfg, $storeid, run_cli($scfg, [ 'ls', $prefix.$name ]))->[0];
|
||||||
#return wantarray ? ($size, $format, $used, $parent, $st->ctime) : $size;
|
# (size, format, used, parent, ctime)
|
||||||
return $info->{size};
|
return wantarray ? ($info->{size}, $info->{format}, $info->{size}, $info->{parent}, 0) : $info->{size};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub volume_resize
|
sub volume_resize
|
||||||
|
|||||||
@@ -1051,8 +1051,15 @@ void osd_t::report_pg_states()
|
|||||||
etcd_reporting_pg_state = true;
|
etcd_reporting_pg_state = true;
|
||||||
st_cli.etcd_txn(json11::Json::object {
|
st_cli.etcd_txn(json11::Json::object {
|
||||||
{ "compare", checks }, { "success", success }, { "failure", failure }
|
{ "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;
|
etcd_reporting_pg_state = false;
|
||||||
if (!data["succeeded"].bool_value())
|
if (!data["succeeded"].bool_value())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user