-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
4a5bc4d
to
f7e1101
Compare
f7e1101
to
23dfb41
Compare
23dfb41
to
3e3d833
Compare
0eb83ec
to
f0a978c
Compare
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
f0a978c
to
b497b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all tests are not passing. Please fix them.
On my notebook make check
failed. Seems like conflict between dnf-utils and yum-utils.
TASK [str-common : Install dnf-utils] *****************************************************************************************************************************************************************************
[WARNING]: Consider using dnf module rather than running dnf
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "dnf --assumeyes --allowerasing install dnf-utils", "delta": "0:00:04.729403", "end": "2018-02-26 09:54:02.512056", "msg": "non-zero return code", "rc": 1, "start": "2018-02-26 09:53:57.782653", "stderr": "Failed to synchronize cache for repo 'Dropbox', disabling.\nError: Transaction check error:\n file /usr/bin/debuginfo-install from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/find-repos-of-install from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/package-cleanup from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/repo-graph from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/repoclosure from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/repomanage from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/repoquery from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/reposync from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/repotrack from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/yum-builddep from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/yum-config-manager from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/yum-debug-dump from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/yum-debug-restore from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n file /usr/bin/yumdownloader from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch\n\nError Summary\n-------------", "stderr_lines": ["Failed to synchronize cache for repo 'Dropbox', disabling.", "Error: Transaction check error:", " file /usr/bin/debuginfo-install from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/find-repos-of-install from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/package-cleanup from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/repo-graph from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/repoclosure from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/repomanage from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/repoquery from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/reposync from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/repotrack from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/yum-builddep from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/yum-config-manager from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/yum-debug-dump from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/yum-debug-restore from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", " file /usr/bin/yumdownloader from install of dnf-utils-2.1.5-1.fc27.noarch conflicts with file from package yum-utils-1.1.31-513.fc27.noarch", "", "Error Summary", "-------------"], "stdout": "Last metadata expiration check: 0:34:33 ago on Mon 26 Feb 2018 09:19:26 AM CET.\nDependencies resolved.\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n dnf-utils noarch 2.1.5-1.fc27 fedora-latest 41 k\nDowngrading:\n dnf-plugins-core noarch 2.1.5-1.fc27 fedora-latest 51 k\n python3-dnf-plugins-core noarch 2.1.5-1.fc27 fedora-latest 141 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\nDowngrade 2 Packages\n\nTotal size: 232 k\nDownloading Packages:\n[SKIPPED] dnf-plugins-core-2.1.5-1.fc27.noarch.rpm: Already downloaded \n[SKIPPED] python3-dnf-plugins-core-2.1.5-1.fc27.noarch.rpm: Already downloaded \n[SKIPPED] dnf-utils-2.1.5-1.fc27.noarch.rpm: Already downloaded \nRunning transaction check\nTransaction check succeeded.\nRunning transaction test\nThe downloaded packages were saved in cache until the next successful transaction.\nYou can remove cached packages by executing 'dnf clean packages'.", "stdout_lines": ["Last metadata expiration check: 0:34:33 ago on Mon 26 Feb 2018 09:19:26 AM CET.", "Dependencies resolved.", "================================================================================", " Package Arch Version Repository Size", "================================================================================", "Installing:", " dnf-utils noarch 2.1.5-1.fc27 fedora-latest 41 k", "Downgrading:", " dnf-plugins-core noarch 2.1.5-1.fc27 fedora-latest 51 k", " python3-dnf-plugins-core noarch 2.1.5-1.fc27 fedora-latest 141 k", "", "Transaction Summary", "================================================================================", "Install 1 Package", "Downgrade 2 Packages", "", "Total size: 232 k", "Downloading Packages:", "[SKIPPED] dnf-plugins-core-2.1.5-1.fc27.noarch.rpm: Already downloaded ", "[SKIPPED] python3-dnf-plugins-core-2.1.5-1.fc27.noarch.rpm: Already downloaded ", "[SKIPPED] dnf-utils-2.1.5-1.fc27.noarch.rpm: Already downloaded ", "Running transaction check", "Transaction check succeeded.", "Running transaction test", "The downloaded packages were saved in cache until the next successful transaction.", "You can remove cached packages by executing 'dnf clean packages'."]}
For make check-in-vm
, log is following.
09:56 $ make check-in-vm
TEST_SUBJECTS=../Fedora-Cloud-Base-27-1.6.x86_64.qcow2 ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 -e subject="" -i /usr/share/ansible/inventory/standard-inventory-qcow2 -e setup=true -e vm_image= ./in-vm.yml
Launching virtual machine for ../Fedora-Cloud-Base-27-1.6.x86_64.qcow2
standard-inventory-qcow2: could not access launched qcow2 image: ../Fedora-Cloud-Base-27-1.6.x86_64.qcow2
[WARNING]: * Failed to parse /usr/share/ansible/inventory/standard-inventory-qcow2 with script plugin: Inventory script (/usr/share/ansible/inventory/standard-inventory-qcow2) had an execution error:
[WARNING]: * Failed to parse /usr/share/ansible/inventory/standard-inventory-qcow2 with yaml plugin: Syntax Error while loading YAML. The error appears to have been in '/usr/share/ansible/inventory
/standard-inventory-qcow2': line 49, column 6, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: USER_DATA = """#cloud-config users: ^ here
exception type: <class 'yaml.scanner.ScannerError'> exception: mapping values are not allowed in this context in "<unicode string>", line 49, column 6
[WARNING]: * Failed to parse /usr/share/ansible/inventory/standard-inventory-qcow2 with ini plugin: /usr/share/ansible/inventory/standard-inventory-qcow2:3: Expected key=value host variable assignment, got:
argparse
[WARNING]: Unable to parse /usr/share/ansible/inventory/standard-inventory-qcow2 as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [Integration tests for tools container image executed in current environment] ********************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Install the container engine] *******************************************************************************************************************************************************************************
ok: [localhost]
TASK [Start the container engine] *********************************************************************************************************************************************************************************
ok: [localhost]
TASK [Pull the test subject (=container image)] *******************************************************************************************************************************************************************
skipping: [localhost]
TASK [Create temporary directory for the image] *******************************************************************************************************************************************************************
changed: [localhost -> localhost]
TASK [Save the image to a file] ***********************************************************************************************************************************************************************************
fatal: [localhost -> localhost]: FAILED! => {"changed": true, "cmd": ["docker", "save", "-o", "/tmp/ansible.z6gkhwwe/image.tar.gz"], "delta": "0:00:00.012412", "end": "2018-02-26 10:03:42.235726", "msg": "non-zero return code", "rc": 1, "start": "2018-02-26 10:03:42.223314", "stderr": "\"docker save\" requires at least 1 argument(s).\nSee 'docker save --help'.\n\nUsage: docker save [OPTIONS] IMAGE [IMAGE...]\n\nSave one or more images to a tar archive (streamed to STDOUT by default)", "stderr_lines": ["\"docker save\" requires at least 1 argument(s).", "See 'docker save --help'.", "", "Usage: docker save [OPTIONS] IMAGE [IMAGE...]", "", "Save one or more images to a tar archive (streamed to STDOUT by default)"], "stdout": "", "stdout_lines": []}
PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1
make: *** [Makefile:12: check-in-vm] Error 2
✘-2 ~/work/container-images/tools/tests [TomasTomecek-add-tests L|✚ 1…1]
10:03 $
tests/in-vm.yml
Outdated
- python3-pytest | ||
|
||
tests: | ||
- integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please describe it? It is called like integration? More comments are welcome for understanding dummies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you're right that comment is missing, will add.
- name: Copy test subject from host inside the VM | ||
block: | ||
# FIXME: make this configurable | ||
- name: Create temporary directory for the image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where it creates a directory? In /tmp. Please make the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://docs.ansible.com/ansible/latest/tempfile_module.html this is ansible 101, I'm not gonna comment on that
That's an issue of standard-test-roles, we need to fix it over there.
I'll add a "debug mode" so that it's easy to figure out what's wrong. |
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
b497b5f
to
739b155
Compare
Updated. Please rerun with Would it be possible actually to get rid of yum-utils on your local system? |
Couple updates:
|
hmmm, seems like a change in behaviour in ansible, because that variable is defined for me:
what version of ansible do you have? I have |
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
0dfe695
to
f063cb5
Compare
I have |
The issue Petr has is:
Is this a bug in standard-test-roles/ansible? @phracek what version of |
On my system I have installed |
That's exactly what I have as well. I wonder if you can invoke the inventory script directly:
|
Well, running with
|
Tests are still failing. :( |
Oh my, you are so brave. I would not run such thing as root. Anyway, the problem still persists - the inventory script is failing the same way. |
I think I am still a bit confused and have some questions, sorry about that: |
...to a dist-git repo, to be precise. Bear in mind this is just a prototype and we want the glue code (in this case
No, this work is aimed to support universal invocation of image-specific tests -- you invoke the tests the same way locally on your laptop, in Fedora CI, in internal CI, in external CI or on the beach.
I don't follow. Ideally, people would just stick a file in their dist-git repo and that file would be recognized by all CI systems so they would be able to invoke the tests. The way it works right now is that you put a file |
I have filed an issue in standard-test-roles https://pagure.io/standard-test-roles/issue/134. |
curl -O command is wrong. It should point to |
whoops, my bad; I forgot adding Edit: should be correct now |
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM .
hosts: something
, not localhost)Requirements
dnf install ansible distgen
)You can just clone those changes locally and then point ansible to look for those roles like this:
How to test?
This will invoke the tests in your current environment:
No errors nor failures = successful run.
There is also possibility to invoke tests inside a freshly provisioned VM:
Logs from the tests are stored over here: