forked from coreos/fedora-coreos-config
-
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.
overlay/15fcos: strip extraneous
version
field from aleph file
This causes bootupctl to fails while parsing the file. The extra field was introduced in coreos/coreos-assembler@c2d37f4 then quickly reverted in coreos/coreos-assembler#3686 Still, a couple of builds (39.20231204.1.0 and 39.20231204.2.1) went out with the change. Fixing this will allow bootupctl to function properly on nodes deployed with this version. This jq filter is idempotent so it's safe to run on all nodes. This should be removed after the next barrier release. Fixes coreos/fedora-coreos-tracker#1724
- Loading branch information
1 parent
dfb0b16
commit 159530e
Showing
3 changed files
with
33 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
13 changes: 13 additions & 0 deletions
13
overlay.d/15fcos/usr/lib/systemd/system/coreos-fix-aleph-file.service
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,13 @@ | ||
# Remove after the next barrier release | ||
# https://github.com/coreos/fedora-coreos-tracker/issues/1724 | ||
|
||
[Unit] | ||
Description=Remove extra attribute from aleph file | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/libexec/coreos-fix-aleph-file | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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 @@ | ||
#!/usr/bin/bash | ||
|
||
# This script removes the extra `version` field | ||
# which was shipped in a couple of builds | ||
# To be removed after the next barrier release. | ||
# see https://github.com/coreos/fedora-coreos-tracker/issues/1724 for more details | ||
|
||
set -euo pipefail | ||
|
||
ALEPH_FILE=/sysroot/.coreos-aleph-version.json | ||
|
||
# remove field "version" | ||
fixed_aleph=$(jq 'del(.version)' ${ALEPH_FILE}) | ||
|
||
# write back updated file with jq pretty-print | ||
echo $fixed_aleph | jq > ${ALEPH_FILE} |