Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform detection/validation #2347

Closed
mbukatov opened this issue Jun 19, 2020 · 5 comments
Closed

Platform detection/validation #2347

mbukatov opened this issue Jun 19, 2020 · 5 comments
Labels
High Priority High priority issues lifecycle/stale No recent activity platforms Related to support of deployment or test execution on particular platforms (baremetal, AWS, ...)

Comments

@mbukatov
Copy link
Contributor

mbukatov commented Jun 19, 2020

When I execute tests on a cluster installed outside of ocs-ci, so that I have a standard cluster dir (from openshift-installer) only, like this:

$ run-ci --cluster-path cluster-2020-06-19.1 tests/manage/monitoring/prometheusmetrics/test_monitoring_defaults.py -vvv

I see that ocs-ci assumes that the platform is AWS IPI:

2020-06-19 19:39:39,964 - MainThread - INFO - tests.conftest.cluster.1043 - All logs located at /tmp/ocs-ci-logs-1592588358
2020-06-19 19:39:39,967 - MainThread - INFO - ocs_ci.deployment.factory.get_deployment.43 - Deployment key = aws_ipi
2020-06-19 19:39:39,968 - MainThread - INFO - ocs_ci.deployment.factory.get_deployment.45 - Current deployment platform: AWS,deployment type: ipi

Even though the platform is Azure, which could be seen in metadata.json file created by openshift-installer in the cluster dir:

$ jq '.' cluster-2020-06-19.1/metadata.json 
{
  "clusterName": "mbukatov-2020-06-19-1",
  "clusterID": "0f76c648-a12c-44f2-8ae0-95502d81e27a",
  "infraID": "mbukatov-2020-06-19-1-vm9gx",
  "azure": {
    "region": "eastus"
  }
}

While we can't be sure about IPI vs UPI status (and other deployment options), we could at least detect that the assumptions we have (coming from the default config) doesn't hold, and raise a warning (along with a suggestion what to do) stopping the test.

This could help people who are trying to run tests on clusters deployed outside of our CI, but tries to share results with us.

@mbukatov
Copy link
Contributor Author

One could try to resolve this by creating a config file with platform info, eg.:

$ cat azure.yaml                                                                
---                                                                             
ENV_DATA:                                                                       
  platform: 'azure'                                                             
  deployment_type: 'ipi

passing it to run-ci via --ocsci-conf, eg:

$ run-ci --cluster-path cluster-2020-06-19.1 --ocsci-conf  azure.yaml tests/manage/monitoring/prometheusmetrics/test_monitoring_defaults.py

@mbukatov mbukatov added the platforms Related to support of deployment or test execution on particular platforms (baremetal, AWS, ...) label Jul 17, 2020
@vasukulkarni vasukulkarni added the High Priority High priority issues label Oct 8, 2020
@vasukulkarni
Copy link
Contributor

I think solving this will solve many other issues with config file loading for different platforms. It can detect and overwrite the default ones.

@Avilir
Copy link
Contributor

Avilir commented Oct 8, 2020

there is function : node.get_provider() which return the actual Provider name that can be use instead of getting t from config file.

@github-actions
Copy link

github-actions bot commented Nov 5, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the lifecycle/stale No recent activity label Nov 5, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.

@github-actions github-actions bot closed this as completed Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority High priority issues lifecycle/stale No recent activity platforms Related to support of deployment or test execution on particular platforms (baremetal, AWS, ...)
Projects
None yet
Development

No branches or pull requests

3 participants