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
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kubernetes (Show other bugs)
7.1
x86_64 Linux
medium Severity high
: rc
: ---
Assigned To: Jan Chaloupka
atomic-bugs@redhat.com
: 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:
Environment:
Last Closed: 2016-02-12 09:44:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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:
Always

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

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
metadata:
  name: nginx-rc-git
spec:
  replicas: 4
  template:
    metadata:
      labels:
        app: git-test
    spec:
      containers:
      - name: nginx-git
        image: nginx
        ports:
        - name: web
          containerPort: 80
        volumeMounts:
        - name: git
          mountPath: "/usr/share/nginx/html"
      volumes:
      - name: git
        gitRepo:
          repository: "https://github.com/Yelp/yelp.github.io.git"



And the failure event:

1       nginx-rc-git-s9dpq   Pod                   failedSync    {kubelet 192.168.122.11}   Error syncing pod, skipping: failed to exec 'git clone https://github.com/Yelp/yelp.github.io.git': : 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 https://bugzilla.redhat.com/show_bug.cgi?id=1161251 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 https://bugzilla.redhat.com/show_bug.cgi?id=1281857#c3, 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
  (/usr)?/bin/git

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
Jake,

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.