smartabyar-smartvillage / smartabyar-smartvillage-sandbox-course

GNU General Public License v3.0
1 stars 3 forks source link

`oc get pod -l app=smartabyar-smartvillage-web` - No resources found #4

Closed pierre-josselin closed 1 month ago

pierre-josselin commented 3 months ago

Hi,

I'm currently following the course 02-deploy-microservices.ipynb, but I encounter a problem in step Deploy the SmartaByarSmartVillage:

ansible-playbook ~/smartvillage-operator/apply-smartabyarsmartvillage.yaml \
  -e ansible_operator_meta_namespace=$(oc get project -o jsonpath={.items[0].metadata.name}) \
  -e crd_path=~/smartvillage-operator/kustomize/overlays/sandbox/smartabyarsmartvillages/smartvillage/smartabyarsmartvillage.yaml
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match
'all'

PLAY [Install a SmartaByarSmartVillage resource from OpenShift] ******************************************************

TASK [fail] **********************************************************************************************************
skipping: [localhost]

TASK [Query SmartaByarSmartVillage] **********************************************************************************
ok: [localhost]

TASK [Set crd var] ***************************************************************************************************
ok: [localhost]

TASK [Set name var] **************************************************************************************************
ok: [localhost]

TASK [Set namespace var] *********************************************************************************************
skipping: [localhost]

TASK [smart-data-model-vars : Check for ENTITY_TYPE var] *************************************************************
skipping: [localhost]

TASK [smart-data-model-vars : Load SmartaByarSmartVillage smart data model specific schema] **************************
ok: [localhost]

TASK [smart-data-model-vars : Load SmartaByarSmartVillage smart data model specific values] **************************
ok: [localhost]

TASK [apply-smartabyarsmartvillage : Skip site-nodeport NodePort service on OpenShift] *******************************
skipping: [localhost]

TASK [apply-smartabyarsmartvillage : Install smartvillage-web service on OpenShift] **********************************
changed: [localhost]

TASK [apply-smartabyarsmartvillage : Install smartvillage-web route on OpenShift] ************************************
changed: [localhost]

TASK [apply-smartabyarsmartvillage : Install ngsild-smartvillage-sync service on OpenShift] **************************
changed: [localhost]

TASK [apply-smartabyarsmartvillage : Query site host name] ***********************************************************
ok: [localhost]

TASK [apply-smartabyarsmartvillage : Install smartvillage-web deployment on OpenShift] *******************************
changed: [localhost]

TASK [apply-smartabyarsmartvillage : Install smartvillage-worker deployment on OpenShift] ****************************
changed: [localhost]

TASK [apply-smartabyarsmartvillage : Install smartvillage-sumo deployment on OpenShift] ******************************
changed: [localhost]

TASK [apply-smartabyarsmartvillage : Install smartvillage-orionld-sync deployment on OpenShift] **********************
changed: [localhost]

PLAY RECAP ***********************************************************************************************************
localhost                  : ok=13   changed=7    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0   

There doesn't seem to be errors, but the following command:

oc get pod -l app=smartabyar-smartvillage-web

Returns No resources found in pierre-josselin-dev namespace.

Did I missed something?

pierre-josselin commented 3 months ago

Here is the result of oc get pods if needed:

default-rabbitmq-0               1/1     Running   0          34m
iotagent-json-5bdcd4848b-ttl7q   1/1     Running   0          29m
mongodb-8644774567-lwlkg         2/2     Running   0          35m
postgres-smartvillage-0          1/1     Running   0          32m
python-0                         2/2     Running   0          9h
scorpiobroker-7b8b7896b7-2q7jp   1/1     Running   0          30m
solr-0                           1/1     Running   0          27m
zookeeper-0                      1/1     Running   0          28m
computate commented 3 months ago

Hi @pierre-josselin , the default sandbox configuration will only deploy 1 replica of the smartvillage-worker Deployment, and 0 replicas of the smartvillage-web Deployment. The worker can handle the web API as well as the background worker verticle and is best to configure only 1 replica of the worker. You can increase the web Deployment replicas to test the Zookeeper clustering of requests.

Do you have any smartvillage-worker pods?

pierre-josselin commented 3 months ago

Hi @computate, Thank you for your reply. I'm not very familiar with this kind of environment. What exactly should I do to fix this problem?

Given the results of oc get pods, there doesn't seem to be any smartvillage-worker pod:

default-rabbitmq-0               1/1     Running   0          5m16s
iotagent-json-5bdcd4848b-fxjng   1/1     Running   0          2m59s
mongodb-8644774567-b59s4         2/2     Running   0          5m55s
postgres-smartvillage-0          1/1     Running   0          4m27s
python-0                         2/2     Running   0          7h40m
scorpiobroker-7b8b7896b7-cd2c7   1/1     Running   0          3m36s
solr-0                           1/1     Running   0          96s
zookeeper-0                      1/1     Running   0          2m12s
computate commented 3 months ago

@pierre-josselin you might check how the smartvillage-worker Deployment is doing, and if you have any Project Events that may be blocking a container starting up. You may need to re-run all commands the 01 and 02 notebooks in this course in the OpenShift Developer Sandbox if you want to restart all the services.

rbaumgar commented 1 month ago

I run into the same problem. The deployment has a request.cpu=200, already requested=2910 and the limit is 3000. So changing the request.cpu=90 pod starts...

computate commented 1 month ago

Thanks for pointing out these bugs with resources.requests ResourceQuotas. It's possible the Dev Sandbox team has made the resources.requests ResourceQuotas smaller since I first created the course. I have updated the resources.requests.cpu: 100m in most instances to fix this problem. You'll want to pull the latest from the smartvillage-operator and smartabyar-smartvillage-sandbox-course in the AI Workbench to get the latest changes.

cd ~/smartabyar-smartvillage-sandbox-course/
git reset --hard HEAD
git pull

cd ~/smartvillage-operator
git pull
pierre-josselin commented 1 month ago

Thanks, I don't have a chance to test this yet, but I will let you know if there are any problems.