project-flotta / flotta-device-worker

Apache License 2.0
5 stars 17 forks source link

install-agent-dnf.sh script can't install podman >= 4:4.2.0 #229

Open gciavarrini opened 2 years ago

gciavarrini commented 2 years ago

I created a new Fedora36 VM.

[gloria@f36 ~]$ podman version 
-bash: podman: command not found

I copied a freshly generated install-agent-dnf.sh from the operator to the VM. I added at the beginning of the script set -xto list the command sequence.

I ran the ./install-agent-dnf.sh by indicating to use the testing repo ( -t true)

[gloria@f36 ~]$ sudo ./install-agent-dnf.sh -t true -i 192.168.1.27
+ set -e
+ FLOTTA_PORT=8043
+ getopts i:p:t:h option
+ case "${option}" in
+ TESTING_REPO=0
+ getopts i:p:t:h option
+ case "${option}" in
+ FLOTTA_API_IP=192.168.1.27
+ getopts i:p:t:h option
+ [[ -z 192.168.1.27 ]]
+ TESTING_SUFFIX=
+ [[ -n 0 ]]
+ TESTING_SUFFIX=-testing
++ grep '^VERSION_ID' /etc/os-release
++ cut -d= -f2
+ VERSION=36
+ curl -s https://copr.fedorainfracloud.org/coprs/project-flotta/flotta-testing/repo/fedora-36/project-flotta-flotta-fedora-36.repo -o /etc/yum.repos.d/project-flotta.repo
+ dnf clean all
0 files removed
+ dnf --best -y install podman node_exporter yggdrasil flotta-agent
Fedora 36 - x86_64                                                                                                 8.4 MB/s |  81 MB     00:09    
Fedora 36 openh264 (From Cisco) - x86_64                                                                           1.5 kB/s | 2.5 kB     00:01    
Fedora Modular 36 - x86_64                                                                                         1.4 MB/s | 2.4 MB     00:01    
Fedora 36 - x86_64 - Updates                                                                                       3.2 MB/s |  25 MB     00:07    
Fedora Modular 36 - x86_64 - Updates                                                                               1.5 MB/s | 2.5 MB     00:01    
Copr repo for flotta-testing owned by project-flotta                                                                42 kB/s |  43 kB     00:01    
Error: 
 Problem: conflicting requests
  - nothing provides podman >= 4:4.2.0 needed by flotta-agent-0.2.0-3.fc36.x86_64
(try to add '--skip-broken' to skip uninstallable packages)
gciavarrini commented 2 years ago

Some other info to investigate the issue. After the described attempt I tried to manually install podman

[gloria@f36 ~]$ sudo dnf install podman 
Last metadata expiration check: 0:25:02 ago on Mon 08 Aug 2022 03:21:21 AM EDT.
Dependencies resolved.
===================================================================================================================================================
 Package                   Architecture  Version                         Repository                                                           Size
===================================================================================================================================================
Installing:
 podman                    x86_64        4:4.2.0~rc2-1.fc36              copr:copr.fedorainfracloud.org:project-flotta:flotta-testing         12 M
Installing dependencies:
[...]

I verified the installation

[gloria@f36 ~]$ podman version 
Client:       Podman Engine
Version:      4.2.0-rc2
API Version:  4.2.0-rc2
Go Version:   go1.18.4
Built:        Thu Aug  4 11:48:35 2022
OS/Arch:      linux/amd64

Then, I rerun the script:

[gloria@f36copr ~]$ sudo ./install-agent-dnf.sh -t true -i 192.168.1.27
[sudo] password for gloria: 
+ set -e
+ FLOTTA_PORT=8043
+ getopts i:p:t:h option
+ case "${option}" in
+ TESTING_REPO=0
+ getopts i:p:t:h option
+ case "${option}" in
+ FLOTTA_API_IP=192.168.1.27
+ getopts i:p:t:h option
+ [[ -z 192.168.1.27 ]]
+ TESTING_SUFFIX=
+ [[ -n 0 ]]
+ TESTING_SUFFIX=-testing
++ grep '^VERSION_ID' /etc/os-release
++ cut -d= -f2
+ VERSION=36
+ curl -s https://copr.fedorainfracloud.org/coprs/project-flotta/flotta-testing/repo/fedora-36/project-flotta-flotta-fedora-36.repo -o /etc/yum.repos.d/project-flotta.repo
+ dnf clean all
47 files removed
+ dnf --best -y install podman node_exporter yggdrasil flotta-agent
Fedora 36 - x86_64                                                                                                 8.0 MB/s |  81 MB     00:10    
Fedora 36 openh264 (From Cisco) - x86_64                                                                           1.7 kB/s | 2.5 kB     00:01    
Fedora Modular 36 - x86_64                                                                                         920 kB/s | 2.4 MB     00:02    
Fedora 36 - x86_64 - Updates                                                                                       6.2 MB/s |  25 MB     00:04    
Fedora Modular 36 - x86_64 - Updates                                                                               1.8 MB/s | 2.5 MB     00:01    
Copr repo for flotta-testing owned by project-flotta                                                                65 kB/s |  43 kB     00:00    
Package podman-4:4.2.0~rc2-1.fc36.x86_64 is already installed.
Error: 
 Problem: conflicting requests
  - nothing provides podman >= 4:4.2.0 needed by flotta-agent-0.2.0-3.fc36.x86_64
(try to add '--skip-broken' to skip uninstallable packages)