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

[container-engine/runc : runc | set is_ostree] failing during cluster upgrade to 1.24.1 on Ubuntu 20.04 #9161

Closed
Vloupmon opened this issue Aug 9, 2022 · 4 comments · Fixed by #9321
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Vloupmon
Copy link

Vloupmon commented Aug 9, 2022

Environment:

Kubespray version (commit) (git rev-parse --short HEAD):
a270632

Network plugin used:
Calico

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):

https://gist.github.com/Vloupmon/d92dfa53718d0725d2c7f24ce7225291

Command used to invoke ansible:

ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook -vv \
    -i ${DIR}/var/${CLUSTER}/inventory/inventory.ini \
    --private-key=${DIR}/var/${CLUSTER}/key \
    --become --become-user=root \
    -e generic_user=${GENERIC_USER} \
    -e ansible_user=${ANSIBLE_USER} \
    -e kube_version="v${KUBE_VERSION}"  \
    ${KUBESPRAY}/upgrade-cluster.yml

Output of ansible run:

The meaningful output is this part :

TASK [container-engine/runc : runc | set is_ostree] 
****************************************************************************************************
task path: /home/ubuntu/k8s/kubespray-cluster-maintenance/kubespray/roles/container-engine/runc/tasks/main.yml:2
fatal: [k8s-control-plane-1]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stat'

    The error appears to be in '/home/ubuntu/k8s/kubespray-cluster-maintenance/kubespray/roles/container-engine/runc/tasks/main.yml': line 2, column 3, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    ---
    - name: runc | set is_ostree
      ^ here

Anything else do we need to know:

I've been planning the upgrade of a few of our clusters running older versions of k8s and deployed by the previous team with an old version of Kubespray by going through the entire sequential upgrade process on a few test machines.
I had to resolve a few bugs and integrate changes along the way but it's been altogether going well.
But now trying to upgrade a 1.23.5 cluster to 1.24.1 I'm not getting stuck on the docker->containerd transition but what looks like an error related to a rather trivial distro thing.

@Vloupmon Vloupmon added the kind/bug Categorizes issue or PR as related to a bug. label Aug 9, 2022
@ghost
Copy link

ghost commented Aug 19, 2022

i have same issue, anyone knows how resolve this.

@shelmingsong
Copy link
Contributor

the same issue on CentOS 7.5.1804

@shelmingsong
Copy link
Contributor

I reset the cluster with reset.yaml and then use cluster.yaml to create the cluster so that the operation works properly.

Note: executing reset.yaml will clear the cluster, please do so after careful consideration.

electrocucaracha added a commit to electrocucaracha/kubespray that referenced this issue Sep 22, 2022
The ostree variable is not defined previously raising an error when
the runtime tries to read it.

Closes: kubernetes-sigs#9161
@electrocucaracha
Copy link
Contributor

I've submitted a fix for this issue, hopefully this gets merged soon and available in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants