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

Failed to install cri-o packages on Fedora CoreOS #8197

Closed
hardoverflow opened this issue Nov 15, 2021 · 5 comments · Fixed by #8202
Closed

Failed to install cri-o packages on Fedora CoreOS #8197

hardoverflow opened this issue Nov 15, 2021 · 5 comments · Fixed by #8202
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hardoverflow
Copy link
Contributor

Environment:

  • Cloud provider or hardware configuration:
VMware
  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
Linux 5.14.14-200.fc34.x86_64 x86_64
NAME=Fedora
VERSION="34.20211031.3.0 (CoreOS)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora CoreOS 34.20211031.3.0"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='34.20211031.3.0'
DEFAULT_HOSTNAME=localhost
  • Version of Ansible (ansible --version):
ansible 2.10.11
  config file = /Users/hardoverflow/development/gitlab.com/kubespray/ansible.cfg
  configured module search path = ['/Users/hardoverflow/development/gitlab.com/kubespray/library']
  ansible python module location = /Users/hardoverflow/development/gitlab.com/kubespray/venv/lib/python3.9/site-packages/ansible
  executable location = /Users/hardoverflow/development/gitlab.com/kubespray/venv/bin/ansible
  python version = 3.9.7 (default, Oct 13 2021, 06:45:31) [Clang 13.0.0 (clang-1300.0.29.3)]
  • Version of Python (python --version):
Python 3.9.7

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

eeeca4a1

Network plugin used:

cillium

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

https://gist.github.com/hardoverflow/2b4573693a0720d416df40521a67cbd8
Command used to invoke ansible:

ansible-playbook -i inventory/development --become --become-user=root cluster.yml

Output of ansible run:

https://gist.github.com/hardoverflow/476fa75efca644320927c53fd029e24a
Anything else do we need to know:

@hardoverflow hardoverflow added the kind/bug Categorizes issue or PR as related to a bug. label Nov 15, 2021
@zhengtianbao
Copy link
Member

Could you manual execute this command:

# rpm-ostree install cri-o

here is my output:

[root@8 ~]# rpm-ostree install cri-o
Inactive requests:
  ethtool (already provided by ethtool-2:5.12-1.fc34.x86_64)
Checking out tree 5040eaa... done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora fedora-modular updates-modular updates-archive
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2021-02-23T00:49:00Z
rpm-md repo 'updates' (cached); generated: 2021-11-15T05:13:44Z
rpm-md repo 'fedora' (cached); generated: 2021-04-23T10:47:57Z
Updating metadata for 'fedora-modular'... done
rpm-md repo 'fedora-modular'; generated: 2021-04-23T10:25:38Z
Updating metadata for 'updates-modular'... done
rpm-md repo 'updates-modular'; generated: 2021-11-11T02:37:40Z
rpm-md repo 'updates-archive' (cached); generated: 2021-11-15T05:59:52Z
Importing rpm-md... done
Resolving dependencies... done
Will download: 1 package (24.3?MB)
Downloading from 'fedora-modular'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 17.9?MB (pkgcache branches: 0)
Added:
  cri-o-2:1.19.1-8.module_f34+10988+2f0a5146.x86_64
  docker-compose-1.28.6-1.fc34.noarch
  libsodium-1.0.18-7.fc34.x86_64
  python3-attrs-20.3.0-2.fc34.noarch
  python3-bcrypt-3.1.7-7.fc34.x86_64
  python3-cached_property-1.5.2-2.fc34.noarch
  python3-certifi-2020.12.5-2.fc34.noarch
  python3-cffi-1.14.5-1.fc34.x86_64
  python3-chardet-4.0.0-1.fc34.noarch
  python3-click-7.1.2-5.fc34.noarch
  python3-cryptography-3.4.6-1.fc34.x86_64
  python3-distro-1.5.0-5.fc34.noarch
  python3-docker-4.4.4-1.fc34.noarch
  python3-docker+ssh-4.4.4-1.fc34.noarch
  python3-docker-pycreds-0.4.0-9.fc34.noarch
  python3-dockerpty-0.4.1-21.fc34.noarch
  python3-docopt-0.6.2-19.fc34.noarch
  python3-dotenv-0.15.0-2.fc34.noarch
  python3-dotenv+cli-0.15.0-2.fc34.noarch
  python3-idna-2.10-3.fc34.noarch
  python3-jsonschema-3.2.0-9.fc34.noarch
  python3-paramiko-2.7.2-4.fc34.noarch
  python3-ply-3.11-11.fc34.noarch
  python3-pyasn1-0.4.8-4.fc34.noarch
  python3-pycparser-2.20-3.fc34.noarch
  python3-pynacl-1.4.0-2.fc34.x86_64
  python3-pyrsistent-0.17.3-6.fc34.x86_64
  python3-pysocks-1.7.1-8.fc34.noarch
  python3-pyyaml-5.4.1-2.fc34.x86_64
  python3-requests-2.25.1-1.fc34.noarch
  python3-six-1.15.0-5.fc34.noarch
  python3-texttable-1.6.2-8.fc34.noarch
  python3-urllib3-1.25.10-5.fc34.noarch
  python3-websocket-client-0.57.0-2.fc34.noarch
Run "systemctl reboot" to start a reboot

It seems work fine when fedora-modular enabled.

@hardoverflow
Copy link
Contributor Author

hardoverflow commented Nov 16, 2021

With terraform, i triggered a fresh deployment with the same result.

[root@node1 yum.repos.d]# rpm-ostree install cri-o
Checking out tree 056a150... done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora-modular updates-modular updates fedora updates-archive
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2021-02-23T00:49:00Z solvables: 4
rpm-md repo 'fedora-modular' (cached); generated: 2021-04-23T10:25:38Z solvables: 2050
rpm-md repo 'updates-modular' (cached); generated: 2021-11-11T02:37:40Z solvables: 2193
rpm-md repo 'updates' (cached); generated: 2021-11-15T05:13:44Z solvables: 29358
rpm-md repo 'fedora' (cached); generated: 2021-04-23T10:47:57Z solvables: 63586
rpm-md repo 'updates-archive' (cached); generated: 2021-11-15T05:59:52Z solvables: 42621
error: Packages not found: cri-o
[root@node1 yum.repos.d]#

@spaced Can u verify this too?

@hardoverflow
Copy link
Contributor Author

I have found some interesting links about modularity support in fcos rpm-ostree.

https://discussion.fedoraproject.org/t/cri-o-no-longer-available-through-rpm-ostree/33908/4
https://github.com/coreos/rpm-ostree/pull/3191/files
coreos/rpm-ostree#2760

I have tested this with the following command.

[core@node1 ~]$ sudo rpm-ostree ex module enable cri-o:1.20                                                                                                                                                                                 
NOTICE: Experimental commands are subject to change.                                                                                                                                                                                           
Checking out tree 056a150... done                                                                                                                                                                                                              
Enabled rpm-md repositories: fedora-cisco-openh264 fedora-modular updates-modular updates fedora updates-archive                                                                                                                               
Importing rpm-md... done                                                                                                                                                                                                                       
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2021-02-23T00:49:00Z solvables: 4                                                                                                                                                     
rpm-md repo 'fedora-modular' (cached); generated: 2021-04-23T10:25:38Z solvables: 2050                                                                                                                                                         
rpm-md repo 'updates-modular' (cached); generated: 2021-11-11T02:37:40Z solvables: 2193                                                                                                                                                        
rpm-md repo 'updates' (cached); generated: 2021-11-15T05:13:44Z solvables: 29358                                                                                                                                                               
rpm-md repo 'fedora' (cached); generated: 2021-04-23T10:47:57Z solvables: 63586                                                                                                                                                                
rpm-md repo 'updates-archive' (cached); generated: 2021-11-15T05:59:52Z solvables: 42621                                                                                                                                                       
Resolving dependencies... done                                                                                                                                                                                                                 
Checking out packages... done                                                                                                                                                                                                                  
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done

After this cmd i can install the cri-o package.

[core@node1 ~]$ sudo rpm-ostree install cri-o                                                                        
Checking out tree 056a150... done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora-modular updates-modular updates fedora updates-archive
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2021-02-23T00:49:00Z solvables: 4
rpm-md repo 'fedora-modular' (cached); generated: 2021-04-23T10:25:38Z solvables: 2050
rpm-md repo 'updates-modular' (cached); generated: 2021-11-11T02:37:40Z solvables: 2193
rpm-md repo 'updates' (cached); generated: 2021-11-15T05:13:44Z solvables: 29358
rpm-md repo 'fedora' (cached); generated: 2021-04-23T10:47:57Z solvables: 63586
rpm-md repo 'updates-archive' (cached); generated: 2021-11-15T05:59:52Z solvables: 42621
Resolving dependencies... done
Will download: 1 package (24.8 MB)
Downloading from 'fedora-modular'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 15.5 MB (pkgcache branches: 0)
Added:
  cri-o-1.20.0-1.module_f34+10489+4277ba4d.x86_64
Changes queued for next boot. Run "systemctl reboot" to start a reboot

I'll take a look for more information and check if there is a need for action.

@hardoverflow
Copy link
Contributor Author

I have edited the cri-o role with the following lines. Success!

diff --git a/roles/container-engine/cri-o/tasks/crio_repo.yml b/roles/container-engine/cri-o/tasks/crio_repo.yml
index 099d2ef6..df83b010 100644
--- a/roles/container-engine/cri-o/tasks/crio_repo.yml
+++ b/roles/container-engine/cri-o/tasks/crio_repo.yml
@@ -149,6 +149,12 @@
     - repo: "fedora-modular"
       section: "fedora-modular"

+- name: Enable CRI-O module
+  command: "rpm-ostree ex module enable cri-o:{{ crio_version }}"
+  register: crio_module_result
+  become: true
+  when: is_ostree
+
 - name: Enable CRI-O module
   command: "dnf -y module enable cri-o:{{ crio_version }}"
   args:

@zhengtianbao
Copy link
Member

got it, I'll try to fix this. /assign

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.

2 participants