-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
35coreos-ignition: add coreos-kargs #938
Conversation
overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-kargs.sh
Outdated
Show resolved
Hide resolved
overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-kargs.service
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some bikesheddy nits, but LGTM overall!
overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-kargs-reboot.service
Outdated
Show resolved
Hide resolved
overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/module-setup.sh
Outdated
Show resolved
Hide resolved
overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/module-setup.sh
Outdated
Show resolved
Hide resolved
Rebased on top of #1009 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🎉
Were you thinking of enhancing kola to allow setting kargs from external tests? Or just have internal tests in kola for now? |
Are you meaning kargs set via the harness (e.x. set via the qemu cmdline args) specifically for testing this feature? If so my plan was to just have it be an internal test, any other test that wants kargs can just add it to the Ignition config (as that's the user-facing happy path we are trying to enable here). |
Heh right sorry, I got mixed up. Obviously, since this is in the Ignition config now (that was the whole point!) it shouldn't need any more work in the kola harness for external tests. So adding a test for this here should be pretty trivial. Something like: diff --git a/tests/kola/ignition/kargs/config.ign b/tests/kola/ignition/kargs/config.ign
new file mode 100644
index 0000000..3d6d859
--- /dev/null
+++ b/tests/kola/ignition/kargs/config.ign
@@ -0,0 +1,9 @@
+{
+ "ignition": {
+ "version": "3.3.0-experimental"
+ },
+ "kernelArguments": {
+ "shouldExist": "foobar",
+ "shouldNotExist": "mitigations=auto,nosmt"
+ }
+}
diff --git a/tests/kola/ignition/kargs/test.sh b/tests/kola/ignition/kargs/test.sh
new file mode 100755
index 0000000..a753525
--- /dev/null
+++ b/tests/kola/ignition/kargs/test.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -xeuo pipefail
+
+ok() {
+ echo "ok" "$@"
+}
+
+fatal() {
+ echo "$@" >&2
+ exit 1
+}
+
+if ! grep foobar /proc/cmdline; then
+ fatal "missing foobar in kernel cmdline"
+fi
+if grep mitigations /proc/cmdline; then
+ fatal "found mitigations in kernel cmdline"
+fi
+ok "Ignition kargs" WDYT? Cool with an internal test if you prefer, though we're trying to move towards external tests when possible. A nice advantage for example is that we can then test the code added here in CI before merging. But again, feel free to self-merge if you want to do this in kola proper or as a follow-up. |
My thought on an internal test was so that we could also test the |
Went ahead and pushed with your patch (and added you as a co-author of the commit). |
Ahh right OK, this does still require teaching the new spec to kola like we did here. I think we'll need that anyway eventually, though OK to not block on that. |
Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
That was actually an error in the tests Ignition config (it was passing a string to Ignition 2.10.1 was vendored into mantle in coreos/coreos-assembler#2165 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[2021-05-14T20:38:04.936Z] --- PASS: ext.config.ignition.kargs (37.22s)
Awesome! 🎉
I'm not exactly sure what's going on, but I'm now seeing the following in FCOS build logs:
|
We can't `mv` out of the module directory since `/usr` is mounted read-only in the dracut container when rpm-ostree runs it. Follow up to coreos#938. Reported-by: Luca BRUNO <luca.bruno@coreos.com>
Thanks, follow-up in #1076. |
We can't `mv` out of the module directory since `/usr` is mounted read-only in the dracut container when rpm-ostree runs it. Follow up to #938. Reported-by: Luca BRUNO <luca.bruno@coreos.com>
docs: Split misc notes into its own page
We can't `mv` out of the module directory since `/usr` is mounted read-only in the dracut container when rpm-ostree runs it. Follow up to coreos#938. Reported-by: Luca BRUNO <luca.bruno@coreos.com>
We can't `mv` out of the module directory since `/usr` is mounted read-only in the dracut container when rpm-ostree runs it. Follow up to coreos#938. Reported-by: Luca BRUNO <luca.bruno@coreos.com>
Marking as draft until an Ignition release & coreos-installer release have made it to
testing-devel
.Based on content from these PRs:
coreos/ignition#1178
coreos/coreos-installer#498