-
Notifications
You must be signed in to change notification settings - Fork 11
hardware-cosmo#598 Need SMF service for compliance DRAM load #204
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
Conversation
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.
Regarding the requirement for the stress feature along compliance that's introduced here. How about something like this?
--- a/image/templates/sled/ramdisk-01-os.json
+++ b/image/templates/sled/ramdisk-01-os.json
@@ -124,6 +124,11 @@
"/system/test/fio"
] },
+ { "t": "pkg_install", "with": "compliance", "pkgs": [
+ "/ooce/util/stress-ng",
+ "/system/test/fio"
+ ] },
+
{ "t": "pkg_install", "with": "nfs", "pkgs": [
"/system/file-system/autofs",
"/system/file-system/nfs"
diff --git a/image/templates/sled/zfs.json b/image/templates/sled/zfs.json
index 9b3ff86..437f170 100644
--- a/image/templates/sled/zfs.json
+++ b/image/templates/sled/zfs.json
@@ -59,6 +59,7 @@
"owner": "root", "group": "root", "mode": "644" },
{ "t": "include", "with": "stress", "name": "stress" },
+ { "t": "include", "with": "compliance", "name": "stress" },
{ "t": "include", "name": "root-noauth" },
I think that will be fine even if the image is built with both options.
|
||
. /lib/svc/share/smf_include.sh | ||
|
||
stress-ng --job /root/max-power.stress-ng |
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.
Does this not need to be run in the background so that the service comes online and doesn't go into maintenance after 60 seconds? We should also probably check that the binary is available, and that it's running. Technically it will work regardless just that the service will go online, then fail because the contract has become empty, and repeat. I think it's better to handle it explicitly.
stress-ng --job /root/max-power.stress-ng | |
function fatal { | |
echo "$@" >&2 | |
exit $SMF_EXIT_ERR_FATAL | |
} | |
STRESS_NG=/opt/ooce/bin/stress-ng | |
[[ -x $STRESS_NG ]] || fatal "Could not find executable $STRESS_NG" | |
$STRESS_NG --job /root/max-power.stress-ng & | |
pid=$! | |
kill -0 $pid || fatal "stress-ng did not start" |
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.
Done, along with testing for the job file as well.
Done. |
Signed-off-by: Dan Cross <cross@oxidecomputer.com>
PTAL |
No description provided.