Bug 1565553 - Git volumes need newer git
Summary: Git volumes need newer git
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.10.0
Assignee: Jan Safranek
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-10 09:50 UTC by Jan Safranek
Modified: 2018-07-30 19:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-07-30 19:12:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 0 None None None 2018-07-30 19:13:02 UTC

Description Jan Safranek 2018-04-10 09:50:40 UTC
RHEL 7 ships an old version of git that's incompatible with our attempt to containerize mount dependencies in Kubernetes. Namely, Kubernetes requires 'git -C' to be supported.

We should probably revert https://github.com/kubernetes/kubernetes/pull/51098 upstream and in OpenShift.


How reproducible:
always

Steps to Reproduce:
1. Use git volume in a pod

Actual results:

Pod won't start:
FailedMount: MountVolume.SetUp failed for volume "git-volume" : failed to exec 'git clone http://172.30.8.217:2345 test': Unknown option: -C


Expected results:
Pod starts

Comment 1 Jan Safranek 2018-04-11 13:20:00 UTC
Kubernetes PR: https://github.com/kubernetes/kubernetes/pull/62394

Comment 2 Jan Safranek 2018-04-16 16:10:56 UTC
Origin PR: https://github.com/openshift/origin/pull/19359

Comment 4 Chao Yang 2018-05-17 05:45:12 UTC
This is failed on 
Server https://ip-172-18-4-108.ec2.internal:8443
openshift v3.10.0-0.47.0
kubernetes v1.10.0+b81c8f8

[root@ip-172-18-4-108 ~]# oc describe pods server
Name:         server
Namespace:    pnggi
Node:         ip-172-18-13-138.ec2.internal/172.18.13.138
Start Time:   Wed, 16 May 2018 23:27:29 -0400
Labels:       <none>
Annotations:  openshift.io/scc=privileged
Status:       Pending
IP:           
Containers:
  nginx:
    Container ID:   
    Image:          nginx
    Image ID:       
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /mypath from git-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-9whvb (ro)
Conditions:
  Type           Status
  Initialized    True 
  Ready          False 
  PodScheduled   True 
Volumes:
  git-volume:
    Type:        GitRepo (a volume that is pulled from git when the pod is created)
    Repository:  git@chao007:dancer-ex.git
    Revision:    
  default-token-9whvb:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-9whvb
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  node-role.kubernetes.io/compute=true
Tolerations:     <none>
Events:
  Type     Reason       Age               From                                    Message
  ----     ------       ----              ----                                    -------
  Normal   Scheduled    11s               default-scheduler                       Successfully assigned server to ip-172-18-13-138.ec2.internal
  Warning  FailedMount  3s (x5 over 11s)  kubelet, ip-172-18-13-138.ec2.internal  MountVolume.SetUp failed for volume "git-volume" : failed to exec 'git clone git@chao007:dancer-ex.git': : executable file not found in $PATH


[root@ip-172-18-4-108 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.5 (Maipo)


May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: I0517 01:31:17.683619   22787 reconciler.go:237] Starting operationExecutor.MountVolume for volume "git-volume" (UniqueName: "kubernetes.io/git-repo/39a6436b-5993-11e8-9859-0e29c0a22922-git-volume") pod "server" (UID: "39a6436b-5993-11e8-9859-0e29c0a22922")
May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: I0517 01:31:17.783950   22787 reconciler.go:237] Starting operationExecutor.MountVolume for volume "git-volume" (UniqueName: "kubernetes.io/git-repo/39a6436b-5993-11e8-9859-0e29c0a22922-git-volume") pod "server" (UID: "39a6436b-5993-11e8-9859-0e29c0a22922")
May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: I0517 01:31:17.784037   22787 reconciler.go:252] operationExecutor.MountVolume started for volume "git-volume" (UniqueName: "kubernetes.io/git-repo/39a6436b-5993-11e8-9859-0e29c0a22922-git-volume") pod "server" (UID: "39a6436b-5993-11e8-9859-0e29c0a22922")
May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: I0517 01:31:17.784125   22787 volume_host.go:219] using default mounter/exec for kubernetes.io/empty-dir
May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: I0517 01:31:17.784137   22787 volume_host.go:219] using default mounter/exec for kubernetes.io/empty-dir
May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: E0517 01:31:17.784269   22787 nestedpendingoperations.go:267] Operation for "\"kubernetes.io/git-repo/39a6436b-5993-11e8-9859-0e29c0a22922-git-volume\" (\"39a6436b-5993-11e8-9859-0e29c0a22922\")" failed. No retries permitted until 2018-05-17 01:33:19.784236982 -0400 EDT m=+11907.028472966 (durationBeforeRetry 2m2s). Error: "MountVolume.SetUp failed for volume \"git-volume\" (UniqueName: \"kubernetes.io/git-repo/39a6436b-5993-11e8-9859-0e29c0a22922-git-volume\") pod \"server\" (UID: \"39a6436b-5993-11e8-9859-0e29c0a22922\") : failed to exec 'git clone https://github.com/chao007/ruby_koans/tree/master/koans': : executable file not found in $PATH"
May 17 01:31:17 ip-172-18-13-138 atomic-openshift-node: I0517 01:31:17.784699   22787 server.go:435] Event(v1.ObjectReference{Kind:"Pod", Namespace:"default", Name:"server", UID:"39a6436b-5993-11e8-9859-0e29c0a22922", APIVersion:"v1", ResourceVersion:"20328", FieldPath:""}): type: 'Warning' reason: 'FailedMount' MountVolume.SetUp failed for volume "git-volume" : failed to exec 'git clone https://github.com/chao007/ruby_koans/tree/master/koans': : executable file not found in $PATH

Comment 5 Jan Safranek 2018-05-17 13:44:13 UTC
Do you have git package installed?

Command executed by OpenShift looks ok, any version of git should be able to handle "git clone https://github.com/chao007/ruby_koans/tree/master/koans".

Comment 6 Chao Yang 2018-05-21 08:14:23 UTC
I can use `git clone https://github.com/chao007/ruby_koans` on the node server

Comment 7 Chao Yang 2018-05-21 08:52:51 UTC
After install the git package, the pod is running on the 
openshift v3.10.0-0.47.0
kubernetes v1.10.0+b81c8f8

Comment 9 errata-xmlrpc 2018-07-30 19:12:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1816


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