@@ -33,7 +33,7 @@ import (
3333
3434 "github.com/arangodb-helper/arangodb/pkg/definitions"
3535
36- driver "github.com/arangodb/go-driver"
36+ "github.com/arangodb/go-driver"
3737 "github.com/arangodb/go-driver/agency"
3838 upgraderules "github.com/arangodb/go-upgrade-rules"
3939 "github.com/pkg/errors"
@@ -171,10 +171,11 @@ const (
171171// UpgradePlanEntry is the JSON structure that describes a single entry
172172// in an upgrade plan.
173173type UpgradePlanEntry struct {
174- PeerID string `json:"peer_id"`
175- Type UpgradeEntryType `json:"type"`
176- Failures int `json:"failures,omitempty"`
177- Reason string `json:"reason,omitempty"`
174+ PeerID string `json:"peer_id"`
175+ Type UpgradeEntryType `json:"type"`
176+ Failures int `json:"failures,omitempty"`
177+ Reason string `json:"reason,omitempty"`
178+ WithoutResign bool `json:"withoutResign,omitempty"`
178179}
179180
180181// CreateStatusServer creates a UpgradeStatusServer for the given entry.
@@ -255,6 +256,7 @@ func (m *upgradeManager) StartDatabaseUpgrade(ctx context.Context, forceMinorUpg
255256
256257 // Check if we can upgrade from running to binary versions
257258 specialUpgradeFrom346 := false
259+ specialUpgradeFrom3614 := false
258260 rules := upgraderules .CheckUpgradeRules
259261 if forceMinorUpgrade {
260262 rules = upgraderules .CheckSoftUpgradeRules
@@ -267,6 +269,9 @@ func (m *upgradeManager) StartDatabaseUpgrade(ctx context.Context, forceMinorUpg
267269 if from .CompareTo ("3.4.6" ) == 0 {
268270 specialUpgradeFrom346 = true
269271 }
272+ if IsSpecialUpgradeFrom3614 (from ) {
273+ specialUpgradeFrom3614 = true
274+ }
270275 }
271276
272277 // Fetch mode
@@ -403,8 +408,9 @@ func (m *upgradeManager) StartDatabaseUpgrade(ctx context.Context, forceMinorUpg
403408 for _ , p := range config .AllPeers {
404409 if p .HasDBServer () {
405410 plan .Entries = append (plan .Entries , UpgradePlanEntry {
406- Type : UpgradeEntryTypeDBServer ,
407- PeerID : p .ID ,
411+ Type : UpgradeEntryTypeDBServer ,
412+ PeerID : p .ID ,
413+ WithoutResign : specialUpgradeFrom3614 ,
408414 })
409415 }
410416 }
@@ -993,7 +999,10 @@ func (m *upgradeManager) processUpgradePlan(ctx context.Context, plan UpgradePla
993999 m .upgradeServerType = definitions .ServerTypeDBServer
9941000 m .updateNeeded = true
9951001 upgrade := func () error {
996- if err := m .upgradeManagerContext .RestartServer (definitions .ServerTypeDBServer ); err != nil {
1002+ if firstEntry .WithoutResign {
1003+ fmt .Printf ("Without resign" )
1004+ }
1005+ if err := m .upgradeManagerContext .RestartServer (definitions .ServerTypeDBServerNoResign ); err != nil {
9971006 return recordFailure (errors .Wrap (err , "Failed to restart dbserver" ))
9981007 }
9991008
@@ -1572,3 +1581,9 @@ func (m *upgradeManager) ShowArangodServerVersions(ctx context.Context) (bool, e
15721581
15731582 return len (versions ) == 1 , nil
15741583}
1584+
1585+ // IsSpecialUpgradeFrom3614 determines if special case for upgrade is required
1586+ func IsSpecialUpgradeFrom3614 (v driver.Version ) bool {
1587+ return (v .CompareTo ("3.6.0" ) >= 0 && v .CompareTo ("3.6.14" ) <= 0 ) ||
1588+ (v .CompareTo ("3.7.0" ) >= 0 && v .CompareTo ("3.7.12" ) <= 0 )
1589+ }
0 commit comments