-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MCO-356: daemon/firstboot: Do a secondary in-place update if rpm-ostr…
…ee is too old xref coreos/rpm-ostree@89f5802 Change the logic for firstboot OS updates to detect if rpm-ostree is too old to natively fetch a container image on its own. If so, we use `ex deploy-from-self` via podman. Introduce a new `/etc/machine-config-daemon-force-once` file that will cause us to skip validation, and hence we should re-reconcile and attempt to apply the OS upgrade again, this time natively via rpm-ostree. This is needed for scaleup of old nodes, as well as temporarily for 4.11 upgrades.
- Loading branch information
Showing
5 changed files
with
138 additions
and
9 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
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,27 @@ | ||
package daemon | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"gopkg.in/yaml.v2" | ||
) | ||
|
||
func TestParseVersion(t *testing.T) { | ||
verdata := `rpm-ostree: | ||
Version: '2022.10' | ||
Git: 6b302116c969397fd71899e3b9bb3b8c100d1af9 | ||
Features: | ||
- rust | ||
- compose | ||
- rhsm | ||
` | ||
var q RpmOstreeVersionData | ||
if err := yaml.UnmarshalStrict([]byte(verdata), &q); err != nil { | ||
panic(err) | ||
} | ||
|
||
assert.Equal(t, "2022.10", q.Root.Version) | ||
assert.Contains(t, q.Root.Features, "rust") | ||
assert.NotContains(t, q.Root.Features, "container") | ||
} |
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