Allow multiseal to mismatch stored conf type (#23573)

* allow multiseal to mismatch stored conf type

* changelog
This commit is contained in:
Scott Miller
2023-10-17 08:47:34 -04:00
committed by GitHub
parent c2f5ee0c62
commit d2b78318ef
2 changed files with 6 additions and 1 deletions

5
changelog/23573.txt Normal file
View File

@@ -0,0 +1,5 @@
```release-note:bug
* Seal HA (enterprise/beta): Fix rejection of a seal configuration change
from two to one auto seal due to persistence of the previous seal type being
"multiseal".
```

View File

@@ -194,7 +194,7 @@ func (d *autoSeal) BarrierConfig(ctx context.Context) (*SealConfig, error) {
barrierTypeUpgradeCheck(d.BarrierSealConfigType(), conf)
if conf.Type != d.BarrierSealConfigType().String() && conf.Type != "multiseal" {
if conf.Type != d.BarrierSealConfigType().String() && conf.Type != SealConfigTypeMultiseal.String() && d.BarrierSealConfigType() != SealConfigTypeMultiseal {
d.logger.Error("barrier seal type does not match loaded type", "seal_type", conf.Type, "loaded_type", d.BarrierSealConfigType())
return nil, fmt.Errorf("barrier seal type of %q does not match loaded type of %q", conf.Type, d.BarrierSealConfigType())
}