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

Support for Ubuntu 20.04 LTS #2843

Merged
merged 24 commits into from
Jan 12, 2022
Merged

Support for Ubuntu 20.04 LTS #2843

merged 24 commits into from
Jan 12, 2022

Conversation

to-bar
Copy link
Contributor

@to-bar to-bar commented Jan 5, 2022

No description provided.

@to-bar
Copy link
Contributor Author

to-bar commented Jan 5, 2022

Related task: #2848

@to-bar to-bar force-pushed the feature/ubuntu-upgrade branch from 896d8ec to e7442e2 Compare January 5, 2022 14:48
seriva
seriva previously approved these changes Jan 10, 2022
@przemyslavic
Copy link
Collaborator

/azp run

@przemyslavic
Copy link
Collaborator

przemyslavic commented Jan 10, 2022

❌ It fails for new deployments on Ubuntu 20.04 AWS/Azure in online mode.

2022-01-10T10:55:53.8029542Z [38;21m10:55:53 INFO cli.engine.ansible.AnsibleCommand - TASK [common : Install prerequisites for selinux module] ***********************
2022-01-10T10:56:01.9463776Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (3 retries left).
2022-01-10T10:56:01.9465380Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (3 retries left).
2022-01-10T10:56:01.9470833Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (3 retries left).
2022-01-10T10:56:01.9474819Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (3 retries left).
2022-01-10T10:56:01.9485668Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (3 retries left).
2022-01-10T10:56:01.9487203Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (2 retries left).
2022-01-10T10:56:01.9493413Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (2 retries left).
2022-01-10T10:56:01.9500355Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (2 retries left).
2022-01-10T10:56:01.9502587Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (2 retries left).
2022-01-10T10:56:01.9511787Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (2 retries left).
2022-01-10T10:56:01.9513307Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (1 retries left).
2022-01-10T10:56:01.9514476Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (1 retries left).
2022-01-10T10:56:01.9522236Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (1 retries left).
2022-01-10T10:56:01.9527495Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (1 retries left).
2022-01-10T10:56:01.9534034Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - FAILED - RETRYING: Install prerequisites for selinux module (1 retries left).
2022-01-10T10:56:01.9541224Z [31;21m10:56:01 ERROR cli.engine.ansible.AnsibleCommand - fatal: [ec2-1-1-1-1.eu-west-1.compute.amazonaws.com]: FAILED! => {"attempts": 3, "changed": false, "msg": "No package matching 'python3-selinux' is available"}

All the packages are in /var/www/html/epirepo/packages/ directory:

ubuntu@ip-10-1-11-73:~$ ls /var/www/html/epirepo/packages/python3-selinux*
/var/www/html/epirepo/packages/python3-selinux_3.0-1build2_amd64.deb

The issue is caused by the fact that epirepo repository is not created in online mode.

ubuntu@ip-10-1-11-251:~$ ls /var/www/html/epirepo/packages/python*
/var/www/html/epirepo/packages/python-apt-common_2.0.0ubuntu0.20.04.6_all.deb
/var/www/html/epirepo/packages/python3-cffi-backend_1.14.0-1build1_amd64.deb
/var/www/html/epirepo/packages/python3-cryptography_2.8-3ubuntu0.1_amd64.deb
/var/www/html/epirepo/packages/python3-dbus_1.2.16-1build1_amd64.deb
/var/www/html/epirepo/packages/python3-decorator_4.4.2-0ubuntu1_all.deb
/var/www/html/epirepo/packages/python3-firewall_0.8.2-1_all.deb
/var/www/html/epirepo/packages/python3-gi_3.36.0-1_amd64.deb
/var/www/html/epirepo/packages/python3-jmespath_0.9.4-2ubuntu1_all.deb
/var/www/html/epirepo/packages/python3-ldb_2%3a2.2.3-0ubuntu0.20.04.2_amd64.deb
/var/www/html/epirepo/packages/python3-nftables_0.9.3-2_amd64.deb
/var/www/html/epirepo/packages/python3-psycopg2_2.8.6-2~pgdg20.04+1_amd64.deb
/var/www/html/epirepo/packages/python3-requests-unixsocket_0.2.0-2_all.deb
/var/www/html/epirepo/packages/python3-selinux_3.0-1build2_amd64.deb
/var/www/html/epirepo/packages/python3-six_1.14.0-2_all.deb
/var/www/html/epirepo/packages/python3-slip-dbus_0.6.5-2_all.deb
/var/www/html/epirepo/packages/python3-slip_0.6.5-2_all.deb
/var/www/html/epirepo/packages/python3-software-properties_0.99.9.8_all.deb
/var/www/html/epirepo/packages/python3-talloc_2.3.1-0ubuntu0.20.04.1_amd64.deb
/var/www/html/epirepo/packages/python3_3.8.2-0ubuntu2_amd64.deb
ubuntu@ip-10-1-11-251:~$ sudo apt-cache policy python3-selinux
N: Unable to locate package python3-selinux
ubuntu@ip-10-1-11-251:~$ grep Package /var/lib/apt/lists/10.1.11.251_epirepo_packages_._Packages

ubuntu@ip-10-1-11-251:~$ sudo /var/tmp/epi-repository-setup-scripts/create-repository.sh /var/www/html/epirepo/ false
Installing apache2 package...
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.41-4ubuntu3.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Generating repository metadata...
Can't locate Dpkg.pm in @INC (you may need to install the Dpkg module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /var/tmp/epi-repository-setup-scripts/dpkg-scanpackages line 27.
BEGIN failed--compilation aborted at /var/tmp/epi-repository-setup-scripts/dpkg-scanpackages line 27.

And it works fine in offline-mode

ubuntu@ip-10-1-11-251:~$ sudo /var/tmp/epi-repository-setup-scripts/create-repository.sh /var/www/html/epirepo/ true
Package libdpkg-perl not found, installing...
Selecting previously unselected package libdpkg-perl.
(Reading database ... 64621 files and directories currently installed.)
Preparing to unpack .../libdpkg-perl_1.19.7ubuntu3_all.deb ...
Unpacking libdpkg-perl (1.19.7ubuntu3) ...
Setting up libdpkg-perl (1.19.7ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
Generating repository metadata...
dpkg-scanpackages: info: Wrote 303 entries to output Packages file.
Updating list of available packages...
Get:1 file:/var/www/html/epirepo//packages ./ InRelease
Ign:1 file:/var/www/html/epirepo//packages ./ InRelease
Get:2 file:/var/www/html/epirepo//packages ./ Release
Ign:2 file:/var/www/html/epirepo//packages ./ Release
Get:3 file:/var/www/html/epirepo//packages ./ Packages
Ign:3 file:/var/www/html/epirepo//packages ./ Packages
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:5 http://10.1.11.251/epirepo/packages ./ InRelease
Get:3 file:/var/www/html/epirepo//packages ./ Packages
Ign:3 file:/var/www/html/epirepo//packages ./ Packages
Ign:6 http://10.1.11.251/epirepo/packages ./ Release
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Get:3 file:/var/www/html/epirepo//packages ./ Packages
Ign:3 file:/var/www/html/epirepo//packages ./ Packages
Ign:7 http://10.1.11.251/epirepo/packages ./ Packages
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:7 http://10.1.11.251/epirepo/packages ./ Packages
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Get:3 file:/var/www/html/epirepo//packages ./ Packages [99.7 kB]
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:7 http://10.1.11.251/epirepo/packages ./ Packages
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Get:7 http://10.1.11.251/epirepo/packages ./ Packages [99.7 kB]
Get:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:4 file:/var/www/html/epirepo//packages ./ Translation-en
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:8 http://10.1.11.251/epirepo/packages ./ Translation-en
Fetched 99.7 kB in 0s (3143 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Installing apache2 package...
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.41-4ubuntu3.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Removing temporary repo definition: /etc/apt/sources.list.d/epilocal.list...
Updating list of available packages...
Ign:1 http://10.1.11.251/epirepo/packages ./ InRelease
Ign:2 http://10.1.11.251/epirepo/packages ./ Release
Ign:3 http://10.1.11.251/epirepo/packages ./ Packages
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:3 http://10.1.11.251/epirepo/packages ./ Packages
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:3 http://10.1.11.251/epirepo/packages ./ Packages
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Hit:3 http://10.1.11.251/epirepo/packages ./ Packages
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Ign:4 http://10.1.11.251/epirepo/packages ./ Translation-en
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
ubuntu@ip-10-1-11-251:~$ grep Package /var/lib/apt/lists/10.1.11.251_epirepo_packages_._Packages
Package: adduser
Package: anacron
Package: apache2
Package: apache2-bin
Package: apache2-data
Package: apache2-utils
Package: apt
Package: apt-transport-https
Package: auditd
...
ubuntu@ip-10-1-11-251:~$ sudo apt-cache policy python3-selinux
python3-selinux:
  Installed: (none)
  Candidate: 3.0-1build2
  Version table:
     3.0-1build2 500
        500 http://10.1.11.251/epirepo/packages ./ Packages

I suspect libdpkg-perl package should be installed first:

ubuntu@ip-10-1-11-5:~$ sudo dpkg -i /var/www/html/epirepo/packages/libdpkg-perl_1.19.7ubuntu3_all.deb
Selecting previously unselected package libdpkg-perl.
(Reading database ... 64621 files and directories currently installed.)
Preparing to unpack .../libdpkg-perl_1.19.7ubuntu3_all.deb ...
Unpacking libdpkg-perl (1.19.7ubuntu3) ...
Setting up libdpkg-perl (1.19.7ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
ubuntu@ip-10-1-11-5:~$ sudo /var/tmp/epi-repository-setup-scripts/create-repository.sh /var/www/html/epirepo/ false
Installing apache2 package...
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.41-4ubuntu3.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Generating repository metadata...
dpkg-scanpackages: info: Wrote 303 entries to output Packages file.
ubuntu@ip-10-1-11-5:~$ sudo apt-get update
Ign:1 http://10.1.11.5/epirepo/packages ./ InRelease
Ign:2 http://10.1.11.5/epirepo/packages ./ Release
Ign:3 http://10.1.11.5/epirepo/packages ./ Packages
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Ign:3 http://10.1.11.5/epirepo/packages ./ Packages
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Ign:3 http://10.1.11.5/epirepo/packages ./ Packages
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Get:3 http://10.1.11.5/epirepo/packages ./ Packages [99.7 kB]
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Ign:4 http://10.1.11.5/epirepo/packages ./ Translation-en
Fetched 99.7 kB in 0s (3989 kB/s)
Reading package lists... Done
ubuntu@ip-10-1-11-5:~$ grep Package /var/lib/apt/lists/10.1.11.5_epirepo_packages_._Packages
Package: adduser
Package: anacron
Package: apache2
Package: apache2-bin
...

@przemyslavic
Copy link
Collaborator

przemyslavic commented Jan 10, 2022

Also worth checking why the task that runs create epirepo shell script has not failed.

Edit: Exit code is 0. 😞

ubuntu@ip-10-1-11-5:~$ sudo /var/tmp/epi-repository-setup-scripts/create-repository.sh /var/www/html/epirepo/ false
Installing apache2 package...
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.41-4ubuntu3.9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Generating repository metadata...
Can't locate Dpkg.pm in @INC (you may need to install the Dpkg module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /var/tmp/epi-repository-setup-scripts/dpkg-scanpackages line 27.
BEGIN failed--compilation aborted at /var/tmp/epi-repository-setup-scripts/dpkg-scanpackages line 27.
ubuntu@ip-10-1-11-5:~$ echo $?
0

@romsok24
Copy link
Contributor

A nice job done here.
The code changes LGTM and I like this check because it has caused my builds to fail quite often because of this particular reason (apt lock).

@przemyslavic
Copy link
Collaborator

/azp run

@to-bar to-bar force-pushed the feature/ubuntu-upgrade branch from f8bf610 to 9ce6669 Compare January 12, 2022 14:52
@to-bar to-bar merged commit 650185a into develop Jan 12, 2022
@to-bar to-bar deleted the feature/ubuntu-upgrade branch January 12, 2022 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants