fatal error in importing image via url
Closed this issue · 5 comments
vatsalparekh commented
Seeing the below log for importing vm image via url
[WARNING]: Found variable using reserved name: action
PLAY [Playbook to import the virtual machine disk] *****************************
TASK [ansible.kubernetes-modules : Install latest openshift client] ************
skipping: [localhost]
TASK [ansibleplaybookbundle.asb-modules : debug] *******************************
skipping: [localhost]
TASK [import-from-url : include] ***********************************************
included: /opt/ansible/roles/import-from-url/tasks/provision.yml for localhost
TASK [import-from-url : Change project to default] *****************************
changed: [localhost]
TASK [import-from-url : Get content metadata] **********************************
ok: [localhost]
TASK [import-from-url : Calculate PVC size] ************************************
skipping: [localhost]
TASK [import-from-url : Calculate PVC size] ************************************
ok: [localhost]
TASK [import-from-url : Build PVC] *********************************************
changed: [localhost]
TASK [import-from-url : Debug generated pvc] ***********************************
changed: [localhost]
TASK [import-from-url : Show generated pvc] ************************************
ok: [localhost] => {
"msg": "apiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n name: \"cirros-demo-disk-01\"\n annotations:\n kubevirt.io/storage.import.endpoint: \"https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-i386-disk.img\"\nspec:\n storageClassName: kubevirt\n accessModes:\n - ReadWriteOnce\n resources:\n requests:\n storage: \"1116691496\""
}
TASK [import-from-url : Provision PVC] *****************************************
changed: [localhost]
TASK [import-from-url : Set pvc_name] ******************************************
ok: [localhost]
TASK [import-from-url : Set disk_bus] ******************************************
ok: [localhost]
TASK [import-from-url : Set disk_size_bytes] ***********************************
ok: [localhost]
TASK [import-from-url : Build VM resources] ************************************
changed: [localhost]
TASK [import-from-url : Provision VM resources] ********************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["oc", "create", "-f", "/tmp/vm-resources.yml"], "delta": "0:00:00.438359", "end": "2018-06-11 09:45:50.614037", "msg": "non-zero return code", "rc": 1, "start": "2018-06-11 09:45:50.175678", "stderr": "Error from server (Forbidden): error when creating \"/tmp/vm-resources.yml\": offlinevirtualmachines.kubevirt.io is forbidden: User \"system:serviceaccount:dh-import-vm-apb-prov-xd64x:apb-d27f4009-f265-4797-b2a5-0d45e155dc27\" cannot create offlinevirtualmachines.kubevirt.io in the namespace \"default\": User \"system:serviceaccount:dh-import-vm-apb-prov-xd64x:apb-d27f4009-f265-4797-b2a5-0d45e155dc27\" cannot create offlinevirtualmachines.kubevirt.io in project \"default\"", "stderr_lines": ["Error from server (Forbidden): error when creating \"/tmp/vm-resources.yml\": offlinevirtualmachines.kubevirt.io is forbidden: User \"system:serviceaccount:dh-import-vm-apb-prov-xd64x:apb-d27f4009-f265-4797-b2a5-0d45e155dc27\" cannot create offlinevirtualmachines.kubevirt.io in the namespace \"default\": User \"system:serviceaccount:dh-import-vm-apb-prov-xd64x:apb-d27f4009-f265-4797-b2a5-0d45e155dc27\" cannot create offlinevirtualmachines.kubevirt.io in project \"default\""], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
localhost : ok=12 changed=5 unreachable=0 failed=1
vatsalparekh commented
pkliczewski commented
@fabiand @davidvossel I know there were recent changes in permissions related to ovm creation. Can you please suggest how to update here
vatsalparekh commented
@aglitke this seems to be working now