cncf / cnf-testbed

ARCHIVED: 🧪🛏️Cloud-native Network Function (CNF) Testbed --> See LFN Cloud Native Telecom Initiative https://wiki.lfnetworking.org/pages/viewpage.action?pageId=113213592

Home Page:https://wiki.lfnetworking.org/pages/viewpage.action?pageId=113213592

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

K8s provisioning ansible task fails - dict object' has no attribute 'v1.18'

rihabbanday opened this issue · comments

As discussed in the CNTT RI-2 call yesterday, we are trying to deploy CNF Testbed in our OPNFV Lab (using CNF Testbed CI scripts). During k8s provisioning I discovered an issue -

One of the Ansible tasks referenced by crosscloudci/k8s-infra image fails with the error dict object' has no attribute 'v1.18'. Looks like the current kupespray config in crosscloudci/k8s-infra image doesn't include the latest kubespray config changes for the current stable k8s version v1.18.

Fix is either i)to pull the new kubespray config in the docker image ii)use an older version of k8s in the provisioning scripts

After manual fix, the k8s provisioning part worked on our hardware.

Thanks for the heads-up @rihabbanday . I actually ran into the same issue yesterday, but I can see you already have a similar workaround in place.
I'll bring this up on the CNF Testbed meeting later today.

@denverwilliams Do you know how much of an effort it will be to update Kubespray in the crosscloudci image?

Thanks @michaelspedersen. I am happy to help if you are looking into adding support for non-Packet hardware.

Any help with that would be greatly appreciated! Are you on the CNCF slack?

Yes! will continue the discussion there.

@rihabbanday we'll publish a new image of k8s-infra and look at making the update dynamic for kubespray releases.

Build and publishing is following instructions on https://github.com/crosscloudci/k8s-infra#useful-developer-dommands

FYI, a local build with the same tag as what is published will allow use of the local copy.

Hi all. I'm having the same problem, but I'm a bit too new to the workings of the different components. Could someone explain in a bit more detail what the fix is?

Hi @nicoekkart. There are still some updated needed to the provisioning image to support 1.18. I think @denverwilliams crated an updated image (v1.0.0), but I have not yet had time to check and do further updates.

For now, you can do a small workaround and instead deploy K8s v1.17.4. First update the provisioning script with something similar to the below. All it does is add a pause/break, where you have time to change the generated configuration files:

index f667431..0dfc148 100755
--- a/tools/kubernetes_provisioning.sh
+++ b/tools/kubernetes_provisioning.sh
@@ -40,6 +40,8 @@ docker run \
   /k8s-infra/bin/k8sinfra generate_config ${HOSTS_CMD} --release-type=$RELEASE_TYPE -o /k8s-infra/data/cluster.yml
 fi

+read -p "Press enter to continue"
+
 #Provision Cluster
 if [ "$1" == "provision" ]; then
     CLUSTER_DATA="$(pwd)/data/$DEPLOY_NAME/mycluster"

Then, when you run make k8s, use the pause to open the cluster.yaml file (found in data/<DEPLOY_NAME>/cluster.yaml) and modify the following lines to change the K8s version:

  k8s_release: v1.17.4
  stable_k8s_release: v1.17.4

Save the file, and hit enter in the terminal where the deploy process is running (you will probably have to hit enter a few times for it to start).

If you run into other issues just ping me on Slack, and I will do my best to assist 👍

Thanks @michaelspedersen! Got it.

New k8s-infra image to be pushed with updates in crosscloudci/k8s-infra#10

With the recent update referenced here, CNF Testbed will deploy most recent Kubespray version with latest supported Kubernetes. This should solve the original issue