containerized-data-importer: CDI failes when using a local http server for qcow2 files - help debug
Is this a BUG REPORT or FEATURE REQUEST?: Not sure if this is a bug or a pilot error - maybe an enhancement request
Uncomment only one, leave it on its own line:
/kind bug
What happened: I wanted to import a qcow2 file from a local http server. I could get the file with wget but using the same via cdi to import - does not work.
Image location -http://192.168.1.101/Fedora-Cloud-Base-28-1.1.x86_64.qcow2 wget http://192.168.1.101/Fedora-Cloud-Base-28-1.1.x86_64.qcow2 - works fine
Created a PVC using the local file: user@ubuntu112:~$ cat pvc_fed_local.yml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: “fedora-local” labels: app: containerized-data-importer annotations: cdi.kubevirt.io/storage.import.endpoint: “http://192.168.1.101/Fedora-Cloud-Base-28-1.1.x86_64.qcow2” spec: accessModes:
- ReadWriteOnce resources: requests: storage: 10Gi
What you expected to happen: It says PVC is created. Name: fedora-local Namespace: default StorageClass: hostpath Status: Bound Volume: pvc-5568681c-915e-11e9-8233-e8fd9000001c Labels: app=containerized-data-importer Annotations: cdi.kubevirt.io/storage.import.endpoint: http://192.168.1.101/Fedora-Cloud-Base-28-1.1.x86_64.qcow2 cdi.kubevirt.io/storage.import.importPodName: importer-fedora-local-l29p2 cdi.kubevirt.io/storage.pod.phase: Failed control-plane.alpha.kubernetes.io/leader: {“holderIdentity”:“513c35fc-912d-11e9-89d4-be91d7b6175d”,“leaseDurationSeconds”:15,“acquireTime”:“2019-06-18T00:16:35Z”,“renewTime”:"2019-… pv.kubernetes.io/bind-completed: yes pv.kubernetes.io/bound-by-controller: yes Finalizers: [kubernetes.io/pvc-protection] Capacity: 10Gi Access Modes: RWO VolumeMode: Filesystem Events: Type Reason Age From Message
Normal Provisioning 28m hostpath 513c35fc-912d-11e9-89d4-be91d7b6175d External provisioner is provisioning volume for claim “default/fedora-local” Normal ProvisioningSucceeded 28m hostpath 513c35fc-912d-11e9-89d4-be91d7b6175d Successfully provisioned volume pvc-5568681c-915e-11e9-8233-e8fd9000001c Mounted By: importer-fedora-local-l29p2
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- CDI version (use
kubectl get deployments cdi-deployment -o yaml):
user@ubuntu112:~$ kubectl get deployments cdi-deployment -o yaml Error from server (NotFound): deployments.extensions “cdi-deployment” not found user@ubuntu112:~$ kubectl get deployments -A NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE cdi cdi-apiserver 1/1 1 1 6h22m cdi cdi-deployment 1/1 1 1 6h22m cdi cdi-uploadproxy 1/1 1 1 6h22m
- Kubernetes version (use
kubectl version): Client Version: version.Info{Major:“1”, Minor:“14”, GitVersion:“v1.14.3”, GitCommit:“5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0”, GitTreeState:“clean”, BuildDate:“2019-06-06T01:44:30Z”, GoVersion:“go1.12.5”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{Major:“1”, Minor:“14”, GitVersion:“v1.14.3”, GitCommit:“5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0”, GitTreeState:“clean”, BuildDate:“2019-06-06T01:36:19Z”, GoVersion:“go1.12.5”, Compiler:“gc”, Platform:“linux/amd64”} - Cloud provider or hardware configuration: Ubuntu 16.04 based server - Aparna Systems 4015
- Install tools:
- Others: cdi-import-issue-kubectl-061719.txt
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (11 by maintainers)
So there are 2 networks, the host network and the pod network. CDI uses the pod network to connect to the outside world. If you wget from the host to the local http server that is using the host network, and both hosts are on the same network. This is why I asked you to exec into a pod and run the wget from there, that way you are using the pod network.
As to why it can connect to S3, but not your local http server, that depends on how your pod network is configured. I am assuming using an external http server also works.