TASK [standard-test-beakerlib : Install the beakerlib requirements] *************************************************************************************************************************** ok: [localhost -> None] => (item=beakerlib) failed: [localhost -> None] (item=restraint-rhts) => {"changed": false, "failed": true, "item": "restraint-rhts", "module_stderr": "No handlers could be found for logger \"dnf\"\nTraceback (most recent call last):\n File \"/tmp/ansible_8ivBRY/ansible_module_dnf.py\", line 534, in <module>\n main()\n File \"/tmp/ansible_8ivBRY/ansible_module_dnf.py\", line 530, in main\n ensure(module, base, params['state'], params['name'], params['autoremove'])\n File \"/tmp/ansible_8ivBRY/ansible_module_dnf.py\", line 414, in ensure\n base.install(pkg_spec)\n File \"/usr/lib/python2.7/site-packages/dnf/base.py\", line 1680, in install\n raise dnf.exceptions.MarkingError(_('no package matched'), pkg_spec)\ndnf.exceptions.MarkingError: no package matched\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
restraint-rhts.x86_64 0.1.31-1.fc26 bpeck-restraint # yumdownloader --urls restraint-rhts Yum-utils package has been deprecated, use dnf instead. See 'man yum2dnf' for more information. https://copr-be.cloud.fedoraproject.org/results/bpeck/restraint/fedora-26-x86_64/00590650-restraint/restraint-rhts-0.1.31-1.fc26.x86_64.rpm
Fedora 27 is not in the list below, because it is not released yet.
https://copr-be.cloud.fedoraproject.org/results/bpeck/restraint/
@plautrba why do you run tests on Fedora 27?
https://getfedora.org/ -> Fedora 27 Beta released! Test it in the Download section.
https://copr-be.cloud.fedoraproject.org/results/bpeck/restraint/ @plautrba why do you run tests on Fedora 27?
It's my development workstation. It's almost uptodate as rawhide but stable enough.
I just want to test https://src.fedoraproject.org/rpms/libsepol/pull-request/1 before I merge it.
Why standard-test-roles depends on third party repository outside Fedora?
And it doesn't work on Rawhide as well
TASK [standard-test-beakerlib : Add restraint repo for restraint-rhts on Fedora hosts] ******** fatal: [localhost -> None]: FAILED! => {"changed": false, "dest": "/etc/yum.repos.d/restraint.repo", "failed": true, "msg": "Request failed", "response": "HTTP Error 404: NOT FOUND", "state": "absent", "status_code": 404, "url": "https://copr.fedorainfracloud.org/coprs/bpeck/restraint/repo/fedora-28/bpeck-restraint-fedora-28.repo"}
Why do I run tests on Rawhide? Because there are PRs using this role reported against master branch, e.g. https://src.fedoraproject.org/rpms/libsepol/pull-request/1
currently building for f27 and rawhide.
https://copr.fedorainfracloud.org/coprs/bpeck/restraint/build/624956/
The new build won't fix the problem on Rawhide. The problem is in the url used for repo file.
/etc/ansible/roles/standard-test-beakerlib/tasks/main.yml: 14 - name: Add restraint repo for restraint-rhts on Fedora hosts 15 get_url: 16 url: https://copr.fedorainfracloud.org/coprs/bpeck/restraint/repo/fedora-{{ansible_distribution_major_version}}/bpeck-restraint-fedora-{{ansible_distribution_major_version}}.repo 17 dest: /etc/yum.repos.d/restraint.repo 18 when: ansible_distribution == 'Fedora'
On Rawhide, {{ansible_distribution_major_version}} is "28":
$ ansible -m setup -i localhost, localhost -c local | grep ansible_distribution_major_version "ansible_distribution_major_version": "28",
But COPR creates repository with "rawhide" string, e.g. https://copr.fedorainfracloud.org/coprs/plautrba/setroubleshoot/repo/fedora-rawhide/plautrba-setroubleshoot-fedora-rawhide.repo
Workaround
diff -up /etc/ansible/roles/standard-test-beakerlib/tasks/main.yml.rpm /etc/ansible/roles/standard-test-beakerlib/tasks/main.yml --- /etc/ansible/roles/standard-test-beakerlib/tasks/main.yml.rpm 2017-10-12 14:44:11.384209363 +0200 +++ /etc/ansible/roles/standard-test-beakerlib/tasks/main.yml 2017-10-12 14:45:02.488100939 +0200 @@ -13,7 +13,7 @@ - name: Add restraint repo for restraint-rhts on Fedora hosts get_url: - url: https://copr.fedorainfracloud.org/coprs/bpeck/restraint/repo/fedora-{{ansible_distribution_major_version}}/bpeck-restraint-fedora-{{ansible_distribution_major_version}}.repo + url: https://copr.fedorainfracloud.org/coprs/bpeck/restraint/repo/fedora-26/bpeck-restraint-fedora-26.repo dest: /etc/yum.repos.d/restraint.repo when: ansible_distribution == 'Fedora'
The workaround above doesn't work. bpeck-restraint-fedora-26.repo uses $releasever.
The real workaround is to install the repo file manually and replace $releasever with 26.
Please check a PR: https://pagure.io/standard-test-roles/pull-request/73 Above PR should fix this issue. Thanks to @bgoncalv for cooperation and testing.
https://pagure.io/standard-test-roles/pull-request/73
Metadata Update from @astepano: - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.