RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1281857 - Unable to use gitRepo in kubernetes due to missing git binary in Atomic Host
Summary: Unable to use gitRepo in kubernetes due to missing git binary in Atomic Host
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kubernetes
Version: 7.1
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Jan Chaloupka
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1186913 1203710 1295796
TreeView+ depends on / blocked
 
Reported: 2015-11-13 15:49 UTC by Jake Hunsaker
Modified: 2019-11-14 07:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-12 14:44:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jake Hunsaker 2015-11-13 15:49:41 UTC
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 14:49:48 UTC
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 15:58:20 UTC
> 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 Petr Stodulka 2015-12-07 18:44:51 UTC
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 14:14:23 UTC
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 Petr Stodulka 2016-02-12 13:24:47 UTC
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 14:44:36 UTC
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.