10000 hardware-cosmo#598 Need SMF service for compliance DRAM load by dancrossnyc · Pull Request #204 · oxidecomputer/helios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

dancrossnyc
Copy link
Contributor

No description provided.

@dancrossnyc dancrossnyc requested a review from citrus-it May 28, 2025 17:18
@dancrossnyc dancrossnyc self-assigned this May 28, 2025
Copy link
Contributor
@citrus-it citrus-it left a 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
Copy link
Contributor

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.

Suggested change
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"

Copy link
Contributor Author

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.

@dancrossnyc
Copy link
Contributor Author

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.

Done.

Signed-off-by: Dan Cross <cross@oxidecomputer.com>
@dancrossnyc
Copy link
Contributor Author

PTAL

@dancrossnyc dancrossnyc merged commit b46dcc7 into master Jun 9, 2025
@dancrossnyc dancrossnyc deleted the ramload branch June 10, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0