ShubhamTatvamasi / magma-galaxy

https://galaxy.ansible.com/shubhamtatvamasi/magma
BSD 3-Clause "New" or "Revised" License
13 stars 20 forks source link

orc8r cannot be installed when choosing stable version #11

Closed cristiangauma closed 1 year ago

cristiangauma commented 1 year ago

If stable version of orc8r is chosen (Magma v1.8 Helm Charts), then, an error appear once trying to install it.

The output of the error is this one (I explain what is happening below)

TASK [orc8r : Install Orc8r] ****************************************************************************************************************************************************************************
Tuesday 23 May 2023  14:58:28 +0000 (0:00:00.358)       0:06:05.711 *********** 
fatal: [10.10.2.242]: FAILED! => {"changed": false, "command": "/usr/local/bin/helm upgrade -i --reset-values --create-namespace -f=/tmp/tmplew6nhp0.yml orc8r orc8r/orc8r", "msg": "Failure when executing Helm command. Exited 1.\nstdout: Release \"orc8r\" does not exist. Installing it now.\n\nstderr: Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \"orc8r-accessd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-analytics\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-bootstrapper\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-certifier\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-configurator\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-ctraced\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-device\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-directoryd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-dispatcher\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-eventd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-metricsd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-obsidian\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-orc8r-worker\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-orchestrator\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-service-registry\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-state\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-streamer\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-tenants\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first]\n", "stderr": "Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \"orc8r-accessd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-analytics\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-bootstrapper\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-certifier\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-configurator\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-ctraced\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-device\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-directoryd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-dispatcher\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-eventd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-metricsd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-obsidian\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-orc8r-worker\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-orchestrator\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-service-registry\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-state\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-streamer\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"orc8r-tenants\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first]\n", "stderr_lines": ["Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \"orc8r-accessd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-analytics\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-bootstrapper\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-certifier\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-configurator\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-ctraced\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-device\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-directoryd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-dispatcher\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-eventd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-metricsd\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-obsidian\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-orc8r-worker\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-orchestrator\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-service-registry\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-state\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-streamer\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first, resource mapping not found for name: \"orc8r-tenants\" namespace: \"\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "ensure CRDs are installed first]"], "stdout": "Release \"orc8r\" does not exist. Installing it now.\n", "stdout_lines": ["Release \"orc8r\" does not exist. Installing it now."]}

What is happening is that the orc8r Helm Charts use policy/v1beta1 for the PodDisruptionBudget, and in the rke k8s distribution, it is not available as far as I could test with that manifest version. It is available using the policy/v1 manifest.

I tested with all the supported k8s versions of the latest rke release (1.45.0), which is the one being downloaded with the playbook, but it doesn't work in any of them:

There are different ways to fix this issue that I have thought of: 1.- Have a patched orc8r v1.8 to work with the latest k8s version, so the manifest used by PodDisruptionBudget is policy/v1. 2.- Detect when the stable version of orc8r is chosen to be installed using this ansible playbook, and then using an older rke and k8s version (with a warning about the end of life of the version). 3.- Remove the possibility to install a stable version of orc8r which I do not recommend (a lot of people, like me, is based on v1.8).

cristiangauma commented 1 year ago

Closing this, as this project has been migrated to: https://github.com/magma/magma-deployer , and this issue is fixed there.

Thank you.