[#858] morph: Disable kludge by default
Some checks failed
DCO action / DCO (pull_request) Successful in 1m54s
Build / Build Components (1.21) (pull_request) Successful in 3m58s
Vulncheck / Vulncheck (pull_request) Failing after 3m32s
Build / Build Components (1.20) (pull_request) Successful in 5m0s
Tests and linters / Staticcheck (pull_request) Successful in 5m30s
Tests and linters / Lint (pull_request) Successful in 6m35s
Tests and linters / Tests with -race (pull_request) Failing after 13m13s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m26s
Tests and linters / Tests (1.21) (pull_request) Successful in 17m8s
Some checks failed
DCO action / DCO (pull_request) Successful in 1m54s
Build / Build Components (1.21) (pull_request) Successful in 3m58s
Vulncheck / Vulncheck (pull_request) Failing after 3m32s
Build / Build Components (1.20) (pull_request) Successful in 5m0s
Tests and linters / Staticcheck (pull_request) Successful in 5m30s
Tests and linters / Lint (pull_request) Successful in 6m35s
Tests and linters / Tests with -race (pull_request) Failing after 13m13s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m26s
Tests and linters / Tests (1.21) (pull_request) Successful in 17m8s
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
7d9fe03f28
commit
9436fcfc70
5 changed files with 8 additions and 8 deletions
|
@ -68,7 +68,7 @@ func watchForSignal(cancel func()) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(logs.FrostFSNodeConfigurationReading, zap.Error(err))
|
log.Error(logs.FrostFSNodeConfigurationReading, zap.Error(err))
|
||||||
}
|
}
|
||||||
client.KeepInvScript = cfg.GetBool("morph.keepinvscript")
|
client.CleanInvScript = cfg.GetBool("morph.cleaninvscript")
|
||||||
log.Info(logs.FrostFSNodeConfigurationHasBeenReloadedSuccessfully)
|
log.Info(logs.FrostFSNodeConfigurationHasBeenReloadedSuccessfully)
|
||||||
case syscall.SIGTERM, syscall.SIGINT:
|
case syscall.SIGTERM, syscall.SIGINT:
|
||||||
log.Info(logs.FrostFSNodeTerminationSignalHasBeenReceivedStopping)
|
log.Info(logs.FrostFSNodeTerminationSignalHasBeenReceivedStopping)
|
||||||
|
|
|
@ -61,7 +61,7 @@ func main() {
|
||||||
var err error
|
var err error
|
||||||
cfg, err = newConfig()
|
cfg, err = newConfig()
|
||||||
exitErr(err)
|
exitErr(err)
|
||||||
client.KeepInvScript = cfg.GetBool("morph.keepinvscript")
|
client.CleanInvScript = cfg.GetBool("morph.cleaninvscript")
|
||||||
|
|
||||||
logPrm.MetricsNamespace = "frostfs_ir"
|
logPrm.MetricsNamespace = "frostfs_ir"
|
||||||
err = logPrm.SetLevelString(
|
err = logPrm.SetLevelString(
|
||||||
|
|
|
@ -214,7 +214,7 @@ func (a *applicationConfiguration) readConfig(c *config.Config) error {
|
||||||
a.EngineCfg.rebuildWorkers = engineconfig.EngineRebuildWorkersCount(c)
|
a.EngineCfg.rebuildWorkers = engineconfig.EngineRebuildWorkersCount(c)
|
||||||
|
|
||||||
// Kludge
|
// Kludge
|
||||||
client.KeepInvScript = morphconfig.KeepInvocationScript(c)
|
client.CleanInvScript = morphconfig.CleanInvocationScript(c)
|
||||||
|
|
||||||
return engineconfig.IterateShards(c, false, func(sc *shardconfig.Config) error { return a.updateShardConfig(c, sc) })
|
return engineconfig.IterateShards(c, false, func(sc *shardconfig.Config) error { return a.updateShardConfig(c, sc) })
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ func SwitchInterval(c *config.Config) time.Duration {
|
||||||
return SwitchIntervalDefault
|
return SwitchIntervalDefault
|
||||||
}
|
}
|
||||||
|
|
||||||
// KeepInvocationScript this is a kludge purely for update to work.
|
// CleanInvocationScript this is a kludge purely for update to work.
|
||||||
func KeepInvocationScript(c *config.Config) bool {
|
func CleanInvocationScript(c *config.Config) bool {
|
||||||
return config.Bool(c.Sub(subsection), "keepinvscript")
|
return config.Bool(c.Sub(subsection), "cleaninvscript")
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ const (
|
||||||
var errUnexpectedItems = errors.New("invalid number of NEO VM arguments on stack")
|
var errUnexpectedItems = errors.New("invalid number of NEO VM arguments on stack")
|
||||||
|
|
||||||
// This is a kludge purely for update to work.
|
// This is a kludge purely for update to work.
|
||||||
var KeepInvScript bool
|
var CleanInvScript bool
|
||||||
|
|
||||||
func defaultNotaryConfig(c *Client) *notaryCfg {
|
func defaultNotaryConfig(c *Client) *notaryCfg {
|
||||||
return ¬aryCfg{
|
return ¬aryCfg{
|
||||||
|
@ -421,7 +421,7 @@ func (c *Client) NotarySignAndInvokeTX(mainTx *transaction.Transaction) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !KeepInvScript {
|
if CleanInvScript {
|
||||||
// This is necessary to suppress this check on neo-go side:
|
// This is necessary to suppress this check on neo-go side:
|
||||||
// https://github.com/nspcc-dev/neo-go/blob/8ed6d97085d3229d4faf56a47bbd6cf73c132a76/pkg/services/notary/notary.go#L538
|
// https://github.com/nspcc-dev/neo-go/blob/8ed6d97085d3229d4faf56a47bbd6cf73c132a76/pkg/services/notary/notary.go#L538
|
||||||
// This is a kludge purely for update to work.
|
// This is a kludge purely for update to work.
|
||||||
|
|
Loading…
Reference in a new issue