This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1281857 - Unable to use gitRepo in kubernetes due to missing git binary in Atomic Host
Unable to use gitRepo in kubernetes due to missing git binary in Atomic Host
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kubernetes (Show other bugs)
x86_64 Linux
medium Severity high
: rc
: ---
Assigned To: Jan Chaloupka
: Extras
Depends On:
Blocks: 1186913 1203710 1295796
  Show dependency treegraph
Reported: 2015-11-13 10:49 EST by Jake Hunsaker
Modified: 2016-02-15 15:57 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-12 09:44:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jake Hunsaker 2015-11-13 10:49:41 EST
Description of problem:

Cannot use the gitRepo volume option in kubernetes on Atomic Host, as the git binary is missing.

Version-Release number of selected component (if applicable):
Atomic Host 7.1.6

How reproducible:

Steps to Reproduce:
1. Attempt to use the git binary or gitRepo volume type in a kubernetes RC

Actual results:
Pod will not spawn due to missing git binary

Expected results:
Pod should spawn and git binary should be present since this is core kube functionality.

Additional info:

Here is an example RC:

apiVersion: v1
kind: ReplicationController
  name: nginx-rc-git
  replicas: 4
        app: git-test
      - name: nginx-git
        image: nginx
        - name: web
          containerPort: 80
        - name: git
          mountPath: "/usr/share/nginx/html"
      - name: git
          repository: ""

And the failure event:

1       nginx-rc-git-s9dpq   Pod                   failedSync    {kubelet}   Error syncing pod, skipping: failed to exec 'git clone': : exec: "git": executable file not found in $PATH
Comment 3 Colin Walters 2015-12-02 09:49:48 EST
The problem with just depending on git is that in RHEL7 it pulls in Perl and other things.  See for the Fedora side.

The medium term plan is to containerize Kubernetes which will allow the host to avoid a Perl dependency.

Alternatively we could try backporting the Fedora change into the RHEL7 Atomic Host stream.
Comment 4 Jan Chaloupka 2015-12-03 10:58:20 EST
> Alternatively we could try backporting the Fedora change into the
> RHEL7 Atomic Host stream.

Petr, what are side-effects of the backport to RHEL?
Comment 5 pstodulk 2015-12-07 13:44:51 EST
Files moved into the subpackage will be installed in different location then now (changed prefix git -> git-core)

Some commands will not work properly and error messages about missing scripts/files will appear (there have been opposite policy for base repository and some bugs were axactly about solve these problems). In some cases will be unavailable only some options for commands. I guess that missing whole commands (e.g. git submodule) are ok. Not sure now how many commands will be missing. Some scripts were rewritten to C since git-1.8.3 (as far as I remember)

Functionality should be same for users who will use whole package git. In one point of view it doesn't seem like big concern, however there are some changes and when we don't want to show error messages to users who will use just git-core subpackage, it doesn't seem fine for exception in base channel.

May this change will be better for git in scl. But if you find all acks for this split I can do do that.
Comment 6 Jan Chaloupka 2016-02-07 09:14:23 EST
As to comment, kubernetes-node rpm does not depend on git. If anything gets fixed the only think that can be done here is to add dependency on git, "git-core", "git-minimal" or a name the new subpackage will get.

Is it possible to temporary provide a new subpackage. e.g. "git-mini" or "git-tiny" that would provide required functionality (where you would strip all options and commands that still reports "errors" you are mentioning). Later, the new package would get replaced by "git-core" once all issues are resolved (by adding "Conflicts: git-tiny" into the new package.

Not sure at the moment if it is possible to ship git-tiny only in the base image.

What do you think about it?

Petr, this way or another (adding git to base image or containerizing kubernetes-node with git), it is still up to a git component to make necessary changes.
Comment 8 pstodulk 2016-02-12 08:24:47 EST
After discussion with atomic team we can't solve this reasonable inside git. Split of git brings incompatibility for packages, which require binary

In this case will be installed git-core package and some scripts will not be functional until they install *git* packagage manually. Other solutions for git are not clean and require messy things.

Change back to kubernetes.
Comment 11 Jan Chaloupka 2016-02-12 09:44:36 EST

based on the ongoing comments and discussion, this issue can not be currently resolved. Git repositories as volumes is an optional feature and thus git component is not an installation requirement.

As a customer runs its application on AH and thus can not install his own software, it is not possible to provide optional base image with git installed. All nodes runs base image or all nodes run base image with git (IIUC the AH concept).

Note You need to log in before you can comment on or make changes to this bug.