Description of problem: Can not use gitrepo volume on atomic host as there are no git cmd Version-Release number of selected component (if applicable): oc v3.11.0-0.11.0 kubernetes v1.11.0+d4cacc0 features: Basic-Auth GSSAPI Kerberos SPNEGO How reproducible: Always Steps to Reproduce: 1. Setup OCP cluster on atomic host. 2. Create a pod with gitrepo volume. 3. Check the pod. $ oc describe pod gitrepo Actual results: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 16s default-scheduler Successfully assigned default/gitrepo to ip-172-18-8-135.ec2.internal Warning FailedMount 8s (x5 over 16s) kubelet, ip-172-18-8-135.ec2.internal MountVolume.SetUp failed for volume "gitrepo" : failed to exec 'git clone -- https://github.com/jhou1/gitrepoVolume.git': : executable file not found in $PATH Expected results: Pod should be running. Additional info: [root@ip-172-18-8-135 ~]# which git /usr/bin/which: no git in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/.local/bin:/root/bin) [root@ip-172-18-8-135 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Atomic Host release 7.5 [root@ip-172-18-8-135 ~]# uname -a Linux ip-172-18-8-135.ec2.internal 3.10.0-862.6.3.el7.x86_64 #1 SMP Fri Jun 15 17:57:37 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux # cat pod.yaml { "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "gitrepo", "creationTimestamp": null, "labels": { "name": "volume-test" } }, "spec": { "containers": [ { "name": "c1", "image": "jhou/hello-openshift", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "volumeMounts": [ { "name":"gitrepo", "mountPath":"/mnt/git" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "privileged": false } } ], "volumes": [ { "name":"gitrepo", "gitRepo": { "repository": "https://github.com/jhou1/gitrepoVolume.git", "revision": "5ead1a2fba0bd6af433beb8064ef4493b63e368c" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" }, "status": {} }
Also met this on a RHEL7 cluster, # cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo) # uname -a Linux qe-lxia-master-etcd-1 3.10.0-693.21.1.el7.x86_64 #1 SMP Fri Feb 23 18:54:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Origin PR: https://github.com/openshift/origin/pull/20698
gitrepo volumes are not supported https://github.com/openshift/origin/pull/20698#issuecomment-414414946 Sending to docs team to note that we do not support this volume type. QE can remove tests for this.
Made changes as described: Removed `gitRepo` example from Managing Volumes. Also removed all `gitRepo` objects from Rest APIs (found under `volumes`). This can be reviewed here: https://github.com/openshift/openshift-docs/pull/22073. Moving this bug to ON_QA.
Verified fix is published and live on docs.openshift.com: https://docs.openshift.com/container-platform/3.11/dev_guide/volumes.html#listing-volumes https://docs.openshift.com/container-platform/3.11/admin_guide/manage_scc.html https://docs.openshift.com/container-platform/3.11/architecture/additional_concepts/authorization.html https://docs.openshift.com/container-platform/3.11/install_config/persistent_storage/pod_security_context.html (Removed `gitRepo` from the following Rest API Object Schemas) https://docs.openshift.com/container-platform/3.11/rest_api/api/v1.Pod.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/api/v1.PodTemplate.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/api/v1.ReplicationController.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-apps.openshift.io/v1.DeploymentConfig.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-apps/v1beta1.Deployment.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-apps/v1beta1.StatefulSet.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-batch/v1.Job.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-batch/v2alpha1.CronJob.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-batch/v2alpha1.ScheduledJob.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-extensions/v1beta1.DaemonSet.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-extensions/v1beta1.Deployment.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-extensions/v1beta1.ReplicaSet.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-security.openshift.io/v1.PodSecurityPolicyReview.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-security.openshift.io/v1.PodSecurityPolicySelfSubjectReview.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/apis-security.openshift.io/v1.PodSecurityPolicySubjectReview.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/oapi/v1.DeploymentConfig.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/oapi/v1.PodSecurityPolicyReview.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/oapi/v1.PodSecurityPolicySelfSubjectReview.html#object-schema https://docs.openshift.com/container-platform/3.11/rest_api/oapi/v1.PodSecurityPolicySubjectReview.html#object-schema