gdha / rear-automated-testing

Relax-and-Recover Automated Testing
https://gdha.github.io/rear-automated-testing/
GNU General Public License v3.0
10 stars 2 forks source link

adding centos8 #77

Closed gdha closed 4 years ago

gdha commented 4 years ago
ASK [rear-test : ensure chrony requirements packages are installed] ***********
ok: [server] => (item=ca-certificates)
failed: [server] (item=libselinux-python) => {"ansible_loop_var": "item", "changed": false, "failures": ["No package libselinux-python available."], "item": "libselinux-python", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}

On CentOS 8 the package to get is python3-libselinux (fixed it)

gdha commented 4 years ago

Next issue is with EPEL:

failed: [server] (item=createrepo) => {"ansible_loop_var": "item", "changed": false, "item": "createrepo", "msg": "Failed to download packages: Curl error (28): Timeout was reached for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]", "results": []}

We do not really need createrepo, but the EPEL repo seems slow.

gdha commented 4 years ago

Another issue was it could not find 'sshfs' which seems part of CentOS-PowerTools.repo (repo is installed with EPEL 8, but not active by default). Fixed: by enabling the PowerTools on CentOS 8

gdha commented 4 years ago

Next issue:

ncluded: /vagrant/centos7/ansible/common/roles/rear-test/tasks/create_users.yml for server

TASK [rear-test : Generate password] *******************************************
fatal: [server]: FAILED! => {"changed": true, "cmd": "python -c 'import crypt; print crypt.crypt(\"vagrant\", \"$1$SomeSalt$\")'", "delta": "0:00:00.004054", "end": "2020-02-06 17:07:49.619113", "msg": "non-zero return code", "rc": 127, "start": "2020-02-06 17:07:49.615059", "stderr": "/bin/sh: python: command not found", "stderr_lines": ["/bin/sh: python: command not found"], "stdout": "", "stdout_lines": []}

Apparently, on CentOS 8 it should be 'python3'

gdha commented 4 years ago
[vagrant@server ~]$ python -c 'import crypt; print crypt.crypt("vagrant", "$1$SomeSalt$")'
  File "<string>", line 1
    import crypt; print crypt.crypt("vagrant", "$1$SomeSalt$")
                            ^
SyntaxError: invalid syntax

Correct syntax for python3 should be:

print(crypt.crypt("vagrant", "$1$SomeSalt$"))

which works for python2 as well.

gdha commented 4 years ago

Next problem:

TASK [rear-test : Install packages we need for dhcp and tftpboot] **************
failed: [server] (item=dhcp) => {"ansible_loop_var": "item", "changed": false, "failures": ["No package dhcp available."], "item": "dhcp", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
gdha commented 4 years ago

Next problem:

ASK [rear-test : Install bareos server packages (rh/sles arch)] ***************
failed: [server] (item=bareos) => {"ansible_loop_var": "item", "changed": false, "failures": [], "item": "bareos", "msg": "Depsolve Error occured: \n Problem: package bareos-19.2.7-2.el7.x86_64 requires bareos-client = 19.2.7, but none of the providers can be installed\n  - package bareos-client-19.2.7-2.el7.x86_64 requires bareos-bconsole = 19.2.7, but none of the providers can be installed\n  - cannot install the best candidate for the job\n  - nothing provides libreadline.so.6()(64bit) needed by bareos-bconsole-19.2.7-2.el7.x86_64", "rc": 1, "results": []}
changed: [server] => (item=bareos-database-postgresql)

The repo should be http://download.bareos.org/bareos/release/latest/CentOS_8/

gdha commented 4 years ago

Next issue:

TASK [rear-test : copy bareos configuration files to /etc/bareos] **************
changed: [server] => (item=bareos-dir.conf)
changed: [server] => (item=bareos-fd.conf)
changed: [server] => (item=bareos-sd.conf)
changed: [server] => (item=bconsole.conf)

TASK [rear-test : mkdir /etc/bareos/bareos-dir.d] ******************************
changed: [server]

TASK [rear-test : copy the client.conf file to /etc/bareos/bareos-dir.d] *******
changed: [server]

TASK [rear-test : Run 'create_bareos_database' script] *************************
changed: [server]

TASK [rear-test : Run 'make_bareos_tables' script] *****************************
changed: [server]

TASK [rear-test : Run 'grant_bareos_privileges' script] ************************
changed: [server]

TASK [rear-test : Enable/Start bareos related services] ************************
failed: [server] (item=bareos-dir) => {"ansible_loop_var": "item", "changed": false, "item": "bareos-dir", "msg": "Unable to start service bareos-dir: Job for bareos-dir.service failed because the control process exited with error code.\nSee \"systemctl status bareos-dir.service\" and \"journalctl -xe\" for details.\n"}
failed: [server] (item=bareos-sd) => {"ansible_loop_var": "item", "changed": false, "item": "bareos-sd", "msg": "Unable to start service bareos-sd: Job for bareos-sd.service failed because a timeout was exceeded.\nSee \"systemctl status bareos-sd.service\" and \"journalctl -xe\" for details.\n"}
failed: [server] (item=bareos-fd) => {"ansible_loop_var": "item", "changed": false, "item": "bareos-fd", "msg": "Unable to start service bareos-fd: Job for bareos-fd.service failed because the control process exited with error code.\nSee \"systemctl status bareos-fd.service\" and \"journalctl -xe\" for details.\n"}

The following sounds serious, but was probably caused by the previous wrong Centos7 repo:

[root@server ~]# systemctl status bareos-sd
● bareos-sd.service - Bareos Storage Daemon service
   Loaded: loaded (/usr/lib/systemd/system/bareos-sd.service; enabled; vendor preset: disabled)
   Active: activating (start) since Fri 2020-04-17 17:55:44 CEST; 14s ago
     Docs: man:bareos-sd(8)
  Process: 10382 ExecStart=/usr/sbin/bareos-sd (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 5046)
   Memory: 372.0K
   CGroup: /system.slice/bareos-sd.service

Apr 17 17:55:44 server.box systemd[1]: Starting Bareos Storage Daemon service...
Apr 17 17:55:44 server.box systemd[1]: bareos-sd.service: Can't open PID file /var/lib/bareos/bareos-sd.9103.pid (yet?) after start>
Apr 17 17:55:44 server.box bareos-sd[10383]: BAREOS interrupted by signal 11: Segmentation violation
[root@server ~]# rpm -qa | grep bareos
bareos-tools-19.2.7-2.el8.x86_64
bareos-director-19.2.7-2.el8.x86_64
bareos-common-19.2.7-2.el7.x86_64
bareos-database-postgresql-19.2.7-2.el7.x86_64
bareos-storage-19.2.7-2.el8.x86_64
bareos-database-tools-19.2.7-2.el8.x86_64
bareos-bconsole-19.2.7-2.el8.x86_64
bareos-19.2.7-2.el8.x86_64
bareos-database-common-19.2.7-2.el7.x86_64
bareos-filedaemon-19.2.7-2.el8.x86_64
bareos-client-19.2.7-2.el8.x86_64

Removed all bareos related RPMs. Will do a new provisioning to have only CentOS8 packages!

gdha commented 4 years ago

Server was ok now, but with client we have the following error:

TASK [rear-test : Install packages required by ReaR] ***************************
changed: [client] => (item=syslinux)
changed: [client] => (item=cifs-utils)
changed: [client] => (item=genisoimage)
ok: [client] => (item=net-tools)
changed: [client] => (item=samba)
changed: [client] => (item=samba-client)
ok: [client] => (item=mtools)
failed: [client] (item=sshfs) => {"ansible_loop_var": "item", "changed": false, "failures": ["No package sshfs available."], "item": "sshfs", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
changed: [client] => (item=rear)

Strange on the server I see:

ok: [server] => (item=sshfs)

How did we install this again?? Need to verify.

Name         : fuse-sshfs
Version      : 2.8
Release      : 5.el8
Architecture : x86_64
Size         : 110 k
Source       : fuse-sshfs-2.8-5.el8.src.rpm
Repository   : @System

From repo : PowerTools

gdha commented 4 years ago

Another issue with obsolete stuff from me:

ASK [rear-test : Install redhat test tools, beakerlib packages and some other goodies (rh arch)] ***
failed: [client] (item=rear-rhts) => {"ansible_loop_var": "item", "changed": false, "failures": [], "item": "rear-rhts", "msg": "Depsolve Error occured: \n Problem: conflicting requests\n  - nothing provides /usr/bin/python needed by rear-rhts-4.71-26.8.noarch", "rc": 1, "results": []}
failed: [client] (item=beakerlib) => {"ansible_loop_var": "item", "changed": false, "failures": ["No package beakerlib available."], "item": "beakerlib", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
gdha commented 4 years ago

Last issue:

TASK [rear-test : Create symbolic link from /bin/gpg2 towards /bin/gpg] ********
fatal: [client]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "msg": "refusing to convert from file to symlink for /bin/gpg", "owner": "root", "path": "/bin/gpg", "secontext": "system_u:object_r:gpg_exec_t:s0", "size": 1114968, "state": "file", "uid": 0}
gdha commented 4 years ago

And an old issue we have seen before:

ASK [rear-test : import generated keys] ***************************************
fatal: [client]: FAILED! => {"changed": true, "cmd": ["gpg", "--import", "/root/root.pub", "/root/root.priv"], "delta": "0:00:00.014404", "end": "2020-04-20 18:04:52.752678", "msg": "non-zero return code", "rc": 2, "start": "2020-04-20 18:04:52.738274", "stderr": "gpg: keyserver option 'ca-cert-file' is obsolete; please use 'hkp-cacert' in dirmngr.conf\ngpg: key CD75D34C22CC7119: public key \"Root <root@localhost>\" imported\ngpg: can't open '/root/root.priv': No such file or directory\ngpg: Total number processed: 1\ngpg:               imported: 1", "stderr_lines": ["gpg: keyserver option 'ca-cert-file' is obsolete; please use 'hkp-cacert' in dirmngr.conf", "gpg: key CD75D34C22CC7119: public key \"Root <root@localhost>\" imported", "gpg: can't open '/root/root.priv': No such file or directory", "gpg: Total number processed: 1", "gpg:               imported: 1"], "stdout": "", "stdout_lines": []}
gdha commented 4 years ago

Now we have:

TASK [rear-test : debug] *******************************************************
ok: [client] => {
    "gpgkeys": {
        "changed": false,
        "cmd": "gpg --list-secret-keys | grep 'Root'",
        "delta": "0:00:00.019328",
        "end": "2020-04-21 12:24:56.808330",
        "failed": true,
        "msg": "non-zero return code",
        "rc": 1,
        "start": "2020-04-21 12:24:56.789002",
        "stderr": "gpg: keybox '/root/.gnupg/pubring.kbx' created\ngpg: /root/.gnupg/trustdb.gpg: trustdb created",
        "stderr_lines": [
            "gpg: keybox '/root/.gnupg/pubring.kbx' created",
            "gpg: /root/.gnupg/trustdb.gpg: trustdb created"
        ],
        "stdout": "",
        "stdout_lines": []
    }
}

TASK [rear-test : generate gpg key] ********************************************
changed: [client]

TASK [rear-test : import generated keys] ***************************************
fatal: [client]: FAILED! => {"changed": true, "cmd": ["gpg", "--import", "/root/root.pub", "/root/root.priv"], "delta": "0:00:00.014074", "end": "2020-04-21 12:24:59.242319", "msg": "non-zero return code", "rc": 2, "start": "2020-04-21 12:24:59.228245", "stderr": "gpg: key F6968E248D0231C8: public key \"Root <root@localhost>\" imported\ngpg: can't open '/root/root.priv': No such file or directory\ngpg: Total number processed: 1\ngpg:               imported: 1", "stderr_lines": ["gpg: key F6968E248D0231C8: public key \"Root <root@localhost>\" imported", "gpg: can't open '/root/root.priv': No such file or directory", "gpg: Total number processed: 1", "gpg:               imported: 1"], "stdout": "", "stdout_lines": []}
gdha commented 4 years ago

One step further:

TASK [rear-test : extract the GPG key (for duplicity/duply)] *******************
ok: [client]

TASK [rear-test : trust the GPG key (for duplicity)] ***************************
fatal: [client]: FAILED! => {"changed": true, "cmd": "echo $(gpg --list-keys --fingerprint | grep `cat /root/root.gpgkey` -A 1 | tail -1 | tr -d '[:space:]' | awk 'BEGIN { FS = \"=\" } ; { print $2 }'):6 | gpg --import-ownertrust", "delta": "0:00:00.016449", "end": "2020-04-21 16:52:42.753574", "msg": "non-zero return code", "rc": 2, "start": "2020-04-21 16:52:42.737125", "stderr": "grep: rsa2048: No such file or directory\ngpg: error in '[stdin]': invalid fingerprint", "stderr_lines": ["grep: rsa2048: No such file or directory", "gpg: error in '[stdin]': invalid fingerprint"], "stdout": "", "stdout_lines": []}
gdha commented 4 years ago

And finally:

TASK [rear-test : install duplicity software (RH family)] **********************
changed: [client] => (item=duplicity)
failed: [client] (item=duply) => {"ansible_loop_var": "item", "changed": false, "failures": ["No package duply available."], "item": "duply", "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}

Seems that in CentOS 8 there is no duply package anymore.

github-actions[bot] commented 4 years ago

Stale issue message