Don't have interface with glusterfs stroage generated after provisioning kubevirt-apb via web console
qwang1 opened this issue · 3 comments
Hi there,
So far the latest kubevirt-apb version is v0.4.1-alpha.2. I tried to provision it with glusterfs storage checked on OCP v3.10.0-0.47.0 + OpenStack. There is no kubvirt storageclass generated. Seems it didn't run storage part. If I use ansible-playbook to deploy kubevirt.yml, this problem won't happen http://pastebin.test.redhat.com/598551.
[root@cnv-executor-qwang-apb-master1 ~]# oc get all
NAME READY STATUS RESTARTS AGE
pod/virt-api-59f4bdd6-5z8gg 1/1 Running 0 45s
pod/virt-api-59f4bdd6-cvc8b 1/1 Running 1 45s
pod/virt-controller-6756fcdcc9-2nc5s 1/1 Running 0 45s
pod/virt-controller-6756fcdcc9-54n6v 0/1 Running 0 45s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/virt-api ClusterIP 172.30.122.46 <none> 443/TCP 45s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.extensions/virt-handler 0 0 0 0 0 <none> 45s
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.extensions/virt-api 2 2 2 2 45s
deployment.extensions/virt-controller 2 2 2 1 45s
NAME DESIRED CURRENT READY AGE
replicaset.extensions/virt-api-59f4bdd6 2 2 2 45s
replicaset.extensions/virt-controller-6756fcdcc9 2 2 1 45s
[root@cnv-executor-qwang-apb-master1 ~]# oc get storageclass
NAME PROVISIONER AGE
glusterfs-storage (default) kubernetes.io/glusterfs 2d
[root@cnv-executor-qwang-apb-master1 ~]# oc get all -n dh-virtualization-prov-s5t4s
NAME READY STATUS RESTARTS AGE
pod/apb-e86b7acc-7300-4783-8c93-dcba82c906ed 0/1 Completed 0 1m
[root@cnv-executor-qwang-apb-master1 ~]# oc logs pod/apb-e86b7acc-7300-4783-8c93-dcba82c906ed -n dh-virtualization-prov-s5t4s
PLAY [Provision KubeVirt] ******************************************************
TASK [ansible.kubernetes-modules : Install latest openshift client] ************
skipping: [localhost]
TASK [ansibleplaybookbundle.asb-modules : debug] *******************************
skipping: [localhost]
PLAY [localhost] ***************************************************************
TASK [kubevirt : include_tasks] ************************************************
included: /etc/ansible/roles/kubevirt-ansible/roles/kubevirt/tasks/provision.yml for localhost
TASK [kubevirt : Login As Super User] ******************************************
changed: [localhost]
TASK [kubevirt : Check if kubevirt-apb-2 exists] *******************************
changed: [localhost]
TASK [kubevirt : Create kubevirt-apb-2 namespace] ******************************
skipping: [localhost]
TASK [kubevirt : Add Privileged Policy] ****************************************
changed: [localhost] => (item=kubevirt-privileged)
changed: [localhost] => (item=kubevirt-controller)
changed: [localhost] => (item=kubevirt-infra)
TASK [kubevirt : Add Hostmount-anyuid Policy] **********************************
changed: [localhost]
TASK [kubevirt : Check for kubevirt.yaml template in /etc/ansible/roles/kubevirt-ansible/roles/kubevirt/templates] ***
ok: [localhost]
TASK [kubevirt : Check for offline v0.4.1-alpha.2 templates in /opt/apb/kubevirt-templates] ***
ok: [localhost]
TASK [kubevirt : Download KubeVirt Template] ***********************************
skipping: [localhost]
TASK [kubevirt : Copy offline templates to /tmp] *******************************
changed: [localhost]
TASK [kubevirt : Render KubeVirt Yaml] *****************************************
changed: [localhost]
TASK [kubevirt : Render BYO template] ******************************************
skipping: [localhost]
TASK [kubevirt : Create KubeVirt Resources] ************************************
changed: [localhost]
TASK [kubevirt : Check for vm templates in /etc/ansible/roles/kubevirt-ansible/roles/kubevirt/templates] ***
ok: [localhost] => (item=vm-template-fedora)
ok: [localhost] => (item=vm-template-windows2012r2)
ok: [localhost] => (item=vm-template-rhel7)
TASK [kubevirt : Copy VM templates to /tmp] ************************************
TASK [kubevirt : Check for vm templates in /opt/apb/kubevirt-templates] ********
ok: [localhost] => (item=vm-template-fedora)
ok: [localhost] => (item=vm-template-windows2012r2)
ok: [localhost] => (item=vm-template-rhel7)
TASK [kubevirt : Copy VM templates to /tmp] ************************************
[WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ offline_vm_templates.results |
selectattr('stat.exists') | map(attribute='item') | list | length > 0 }}
changed: [localhost] => (item=vm-template-fedora)
changed: [localhost] => (item=vm-template-windows2012r2)
changed: [localhost] => (item=vm-template-rhel7)
TASK [kubevirt : Download KubeVirt default VM templates] ***********************
[WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: cluster == "openshift" and "{{
byo_vm_templates.results | selectattr('stat.exists') | map(attribute='item') |
list | length == 0 }}" and "{{ offline_vm_templates.results |
selectattr('stat.exists') | map(attribute='item') | list | length == 0 }}"
ok: [localhost] => (item=vm-template-fedora)
ok: [localhost] => (item=vm-template-windows2012r2)
ok: [localhost] => (item=vm-template-rhel7)
TASK [kubevirt : Create default VM templates in OpenShift Namespace] ***********
changed: [localhost] => (item=vm-template-fedora)
changed: [localhost] => (item=vm-template-windows2012r2)
changed: [localhost] => (item=vm-template-rhel7)
[WARNING]: Could not match supplied host pattern, ignoring: masters
PLAY [masters[0]] **************************************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: nodes
PLAY [masters nodes] ***********************************************************
skipping: no hosts matched
PLAY RECAP *********************************************************************
localhost : ok=15 changed=9 unreachable=0 failed=0
@rthallisey Could you take a look at it? Thanks.
@qwang1 This comment is not related to your issue, it is just a note about kubevirt version: the latest released is v0.5.0, and pre-released is v0.5.1-alpha.2 ... unfortunately you can not deploy these from WebConsole (because hardcoded enum in apb), but you can create serviceinstance manually with what ever params you like, for example for latest kubevirt use:
# kubevirt-apb.yml
---
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
name: kubevirt
namespace: kube-system
spec:
clusterServiceClassExternalName: "dh-virtualization"
clusterServicePlanExternalName: gluster
parameters:
admin_user: "test_admin"
admin_password: "123456"
version: "0.5.1-alpha.2"
oc create -f kubevirt-apb.yml
@lukas-bednar Yes, the version on apb.yml file should be updated. However, I saw a new file download-templates.sh was added and get the latest version with kubevirt release, I have no idea where this script is used.
ansibleplaybookbundle/apb-base#31 fixed the issue. I just updated the dockerhub image docker.io/ansibleplaybookbundle/kubevirt-apb:latest to make sure it has the fix. Make sure you're using newest image. Reopen if the issue persists.