-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using the AssignArchToContainers method to fix the instance data of containers. The method was merged forward from 3.3.5. However we need a different upgrade step in 3.4
- Loading branch information
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package upgrades | ||
|
||
func stateStepsFor343() []Step { | ||
return []Step{ | ||
&upgradeStep{ | ||
description: "assign architectures to container's instance data", | ||
targets: []Target{DatabaseMaster}, | ||
run: func(context Context) error { | ||
return context.State().AssignArchToContainers() | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2024 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package upgrades_test | ||
|
||
import ( | ||
jc "github.com/juju/testing/checkers" | ||
"github.com/juju/version/v2" | ||
gc "gopkg.in/check.v1" | ||
|
||
"github.com/juju/juju/testing" | ||
"github.com/juju/juju/upgrades" | ||
) | ||
|
||
var v343 = version.MustParse("3.4.3") | ||
|
||
type steps342Suite struct { | ||
testing.BaseSuite | ||
} | ||
|
||
var _ = gc.Suite(&steps342Suite{}) | ||
|
||
func (s *steps342Suite) TestAssignArchToContainers(c *gc.C) { | ||
step := findStateStep(c, v343, "assign architectures to container's instance data") | ||
c.Assert(step.Targets(), jc.DeepEquals, []upgrades.Target{upgrades.DatabaseMaster}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters