File tree Expand file tree Collapse file tree 5 files changed +23
-0
lines changed Expand file tree Collapse file tree 5 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ namespace NKikimr::NStorage {
8
8
if (!RunCommonChecks ()) {
9
9
return ;
10
10
}
11
+ if (cmd.GetFromSelfHeal () && !Self->StorageConfig ->GetSelfManagementConfig ().GetAutomaticStaticGroupManagement ()) {
12
+ return FinishWithError (TResult::ERROR, " operation forbidden: automatic static group management disabled" );
13
+ }
11
14
12
15
bool found = false ;
13
16
const TVDiskID vdiskId = VDiskIDFromVDiskID (cmd.GetVDiskId ());
Original file line number Diff line number Diff line change @@ -1540,6 +1540,15 @@ bool NKikimr::NStorage::DeriveStorageConfig(const NKikimrConfig::TAppConfig& app
1540
1540
break ;
1541
1541
}
1542
1542
}
1543
+
1544
+ #define UPDATE_EXPLICIT_CONFIG (NAME ) \
1545
+ if (domains.HasExplicit ##NAME##Config ()) { \
1546
+ config->Mutable ##NAME##Config ()->CopyFrom (domains.GetExplicit ##NAME##Config ()); \
1547
+ }
1548
+
1549
+ UPDATE_EXPLICIT_CONFIG (StateStorage)
1550
+ UPDATE_EXPLICIT_CONFIG (StateStorageBoard)
1551
+ UPDATE_EXPLICIT_CONFIG (SchemeBoard)
1543
1552
}
1544
1553
}
1545
1554
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ namespace NKikimr::NBsController {
158
158
VDiskIDFromVDiskID (*VDiskToReplace, cmd->MutableVDiskId ());
159
159
cmd->SetConvertToDonor (DonorMode);
160
160
cmd->SetIsSelfHealReasonDecommit (IsSelfHealReasonDecommit);
161
+ cmd->SetFromSelfHeal (true );
161
162
Send (MakeBlobStorageNodeWardenID (SelfId ().NodeId ()), ev.release ());
162
163
return ;
163
164
}
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ message TEvNodeConfigInvokeOnRoot {
167
167
bool IgnoreDegradedGroupsChecks = 5 ;
168
168
bool IgnoreVSlotQuotaCheck = 6 ;
169
169
bool IsSelfHealReasonDecommit = 7 ;
170
+ bool FromSelfHeal = 8 ;
170
171
}
171
172
172
173
// Regenerate configuration so the slain VDisk is no more reported as DESTROY one in the list.
Original file line number Diff line number Diff line change @@ -278,6 +278,11 @@ message TDomainsConfig {
278
278
repeated TNamedCompactionPolicy NamedCompactionPolicy = 5 ;
279
279
optional TSecurityConfig SecurityConfig = 6 ;
280
280
optional bool ForbidImplicitStoragePools = 7 [default = true ];
281
+
282
+ // then these configs are set, they override the default StateStorage config for each kind of entity
283
+ optional TStateStorage ExplicitStateStorageConfig = 8 ;
284
+ optional TStateStorage ExplicitStateStorageBoardConfig = 9 ;
285
+ optional TStateStorage ExplicitSchemeBoardConfig = 10 ;
281
286
}
282
287
283
288
message TBlobStorageConfig {
@@ -343,6 +348,10 @@ message TSelfManagementConfig {
343
348
// some extra settings
344
349
optional bool AutomaticBoxManagement = 21 [default = true ]; // invoke BSC DefineHostConfig/DefineBox automatically
345
350
optional bool AutomaticBootstrap = 22 ; // whether bootstrap should be performed automatically; PROHIBITED for production
351
+ optional bool AutomaticStaticGroupManagement = 23 ; // whether distconf/SelfHeal can change static group on its behalf
352
+ optional bool AutomaticStateStorageManagement = 24 ; // the same for state storage
353
+ optional bool AutomaticStateStorageBoardManagement = 25 ; // the same for state storage board
354
+ optional bool AutomaticSchemeBoardManagement = 26 ; // the same for scheme board
346
355
}
347
356
348
357
message TBlobStorageFormatConfig {
You can’t perform that action at this time.
0 commit comments