Bug 1404450

Summary: unable to disable oci-systemd-hook on Atomic Host
Product: [Fedora] Fedora Reporter: Micah Abbott <miabbott>
Component: oci-systemd-hookAssignee: Tom Sweeney <tsweeney>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: amurdaca, dwalsh, lsm5, nalin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: oci-systemd-hook-0.1.11-1.git1ac958a.fc26 oci-systemd-hook-0.1.11-1.git1ac958a.fc25 Doc Type: Bug Fix
Doc Text:
Cause: Unable to disable oci-systemd-hook on Atomic Hosts. Consequence: This hook was always run on an Atomic host when at times it was not wanted. This is primarily a problem when debugging other issues on an Atomic Host. Fix: A new environment variable 'oci-systemd-hook' can be set to 'disabled' in calls to 'docker run' to disable this functionality. A call like 'docker run --env oci-systemd-hook=disabled -it --rm centos /bin/bash' will prevent oci-systemd-hook from being invoked. Result: The use of oci-systemd-hook can be disabled as warranted.
Story Points: ---
Clone Of:
: 1404451 (view as bug list) Environment:
Last Closed: 2017-07-23 03:56:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1404451    

Description Micah Abbott 2016-12-13 21:38:26 UTC
While debugging another problem on F25 Atomic Host, I was trying to find a way to disable the 'oci-systemd-hook'.  It appears the only way to do so is to remove the hook from '/usr/libexec/oci/hooks.d/'

However, on an Atomic Host the /usr filesystem is read-only and can't be modified.

I think we need a way to disable this hook (and any others) on an Atomic Host.

Comment 1 Daniel Walsh 2016-12-14 13:46:28 UTC
Ok I guess we can do this similarly to what we did for oci-register-machine.

Comment 2 Daniel Walsh 2016-12-14 13:48:42 UTC
Of course handling Yaml inside of oci-systemd-hook will be more difficult since it is written in C.

Comment 3 Tom Sweeney 2017-06-18 01:29:05 UTC
PR created to address this issue.  https://github.com/projectatomic/oci-systemd-hook/pull/61

Comment 4 Tom Sweeney 2017-06-19 14:19:05 UTC
FWIW, here's output from an Atomic host with the above patch in place.

[root@localhost tmp]# docker run --env -it --rm  centos /bin/bash
[root@localhost tmp]# docker run --env oci-systemd-hook=disabled -it --rm  centos /bin/bash
[root@8bc53da3aabc /]#

Comment 5 Daniel Walsh 2017-06-19 14:43:47 UTC
Tom, you want to disable oci-systemd-hook one at a time, versus disabling it totally like we do with oci-register-machine?

Comment 6 Tom Sweeney 2017-06-19 14:52:10 UTC
Unless the '--env oci-systemd-hook=disabled' in included in the docker run call, oci-systemd-hook is in play.  Using it does not disable oci-systemd-hook for subsequent docker run calls on the system unless they too include that.

Holler if that's incorrect behaviour.

Comment 7 Tom Sweeney 2017-07-13 12:27:48 UTC
This PR has just been merged: https://github.com/projectatomic/oci-systemd-hook/pull/61

It adds the new oci-systemd-hook environment variable to disable oci-systemd-hook for the current docker run invocation.  It does not disable oci-systemd-hook permanently on the system.  An example invocation would be:

docker run --env oci-systemd-hook=disabled -it --rm  centos /bin/bash

Comment 8 Tom Sweeney 2017-07-13 13:11:51 UTC
And FWIW, this PR https://github.com/projectatomic/oci-systemd-hook/pull/68 is in progress to update the README.md.

Comment 9 Fedora Update System 2017-07-13 13:33:26 UTC
oci-systemd-hook-0.1.8-1.gitd899a8e.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-40b2825920

Comment 10 Fedora Update System 2017-07-13 13:33:35 UTC
oci-systemd-hook-0.1.8-1.gitd899a8e.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c653be291e

Comment 11 Fedora Update System 2017-07-13 19:30:14 UTC
oci-systemd-hook-0.1.11-1.git1ac958a.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-1a87e380ed

Comment 12 Fedora Update System 2017-07-13 19:30:21 UTC
oci-systemd-hook-0.1.11-1.git1ac958a.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6d0d8d5289

Comment 13 Fedora Update System 2017-07-13 21:26:04 UTC
oci-systemd-hook-0.1.8-1.gitd899a8e.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-40b2825920

Comment 14 Fedora Update System 2017-07-13 23:53:46 UTC
oci-systemd-hook-0.1.8-1.gitd899a8e.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c653be291e

Comment 15 Fedora Update System 2017-07-14 20:26:49 UTC
oci-systemd-hook-0.1.11-1.git1ac958a.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6d0d8d5289

Comment 16 Fedora Update System 2017-07-14 22:55:21 UTC
oci-systemd-hook-0.1.11-1.git1ac958a.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-1a87e380ed

Comment 17 Fedora Update System 2017-07-23 03:56:00 UTC
oci-systemd-hook-0.1.11-1.git1ac958a.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2017-07-23 22:54:42 UTC
oci-systemd-hook-0.1.11-1.git1ac958a.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.