-
Notifications
You must be signed in to change notification settings - Fork 26
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
running prestart hook 0 caused error #71
Comments
It might be a mismatch between the version of runc and the version of oci-systemd-hook? Did those two versions ship together? How did you call out to oci-systemd-hook? |
Those two packages should align correctly as both are from the latest version of rhel atomic host (
This is how I'm calling hooks in the config.json.template:
|
The hooks expect the first option to the hook to be the prestart/poststart. Add those arguments and it should work. Hooks can not tell which phase they are running unless you pass in the argv[1] |
Unfortunately, even with the args I see the same error:
I've updated the config.json hooks to look like this:
BTW, my previous configuration (without the args) worked fine on rhel atomic host |
I've tried the same image on centos atomic host continuous:
But I see the same error:
|
Hmm, I see something more in journal:
|
@pschiffe you should specify args as:
as they are passed as they are to exec. args[0] can really be anything as it is not used. It would be nice if it still works without any arg as it used to work before, I am taking a look right now. |
Didn't help, still the same error:
|
This means that the config file you generated does not indicate with the "root" is, oci-systemd-hook and oci-umount need to go to the root of the container to mount or umount content, can you add this to your config? |
@giuseppe we can not rely on the fact that he pid=0 or not, since runc specifies three ways to run a hook. |
@rhatdan do you have an example how to specify the "root"? I can't find what you mean. I have in the config the following:
and in the process section, there is |
We can decide if be backward compatible and handle only prestart and poststop when the type is not specified. On the other hand there are not probably many users out there so we can just enforce it and not worry in the future of supporting this additional case. Anyway the current development version support the case where the hook is not specified. The issue reported here depend on the hook version that is too old. The issue is fixed upstream with: commit 69858fa
Also this other commit is required, otherwise oci-systemd-hook will just segfault: commit 40ab578
|
So we need to get this updated in RHEL7 package. @lsm5 Can you create a new oci-systemd-hook package for RHEL? |
rebased to 1e84754 in rhel 7.4 branch |
Would it be possible to also get it to the rhel atomic host 7.3? |
There is only on stream of extras, so if you install oci-umount after it gets shipped, it wil be placed into RHEL7.3 |
Some of the discussion here is about how the hook decides which stage its running in. The most portable approach to that is to use |
something maybe useful: intel/cc-oci-runtime#270
|
Hello,
oci-systemd-hook on latest RHEL atomic host doesn't work with runc.
This is the error I'm getting:
Config.json template is here: https://github.com/pschiffe/gce-system-container/blob/master/image/config.json.template
Can you help? How to debug?
The text was updated successfully, but these errors were encountered: