openshift-ansible icon indicating copy to clipboard operation
openshift-ansible copied to clipboard

TASK: Get current installed Docker version - FAILS

Open deromka opened this issue 10 years ago • 8 comments

** ERROR **

TASK [docker : Get current installed Docker version] ***************************
fatal: [10.57.50.219]: FAILED! => {"changed": false, "cmd": ["dnf", "repoquery", "--latest-limit", "1", "-d", "0", "--installed", "--qf", "%{version}", "docker"], "delta": "0:00:00.165105", "end": "2016-08-31 16:37:43.210992", "failed": true, "rc": 1, "start": "2016-08-31 16:37:43.045887", "stderr": "No such command: repoquery. Please use /usr/bin/dnf --help", "stdout": "", "stdout_lines": [], "warnings": ["Consider using dnf module rather than running dnf"]}
fatal: [10.57.50.227]: FAILED! => {"changed": false, "cmd": ["dnf", "repoquery", "--latest-limit", "1", "-d", "0", "--installed", "--qf", "%{version}", "docker"], "delta": "0:00:00.191860", "end": "2016-08-31 16:37:43.227622", "failed": true, "rc": 1, "start": "2016-08-31 16:37:43.035762", "stderr": "No such command: repoquery. Please use /usr/bin/dnf --help", "stdout": "", "stdout_lines": [], "warnings": ["Consider using dnf module rather than running dnf"]}

System Info

Using BYO Openshift-Ansible TAG openshift-ansible-3.3.16-1 Using Ansible 2.1.1.0 Running Ansible from MAC to install the origin on Centos 7 (CentOS Linux release 7.2.1511 (Core)) Linux openshift-master-def-2 3.10.0-327.28.2.el7.x86_64 #1 SMP dnf version installed: 0.6.4

deromka avatar Aug 31 '16 14:08 deromka

Hey @deromka, did you configure dnf on your centos systems? Installing dnf-plugins-core should provide the repoquery plugin.

abutcher avatar Aug 31 '16 16:08 abutcher

Also asking if dnf was configured since Centos 7.2 should come with yum out of the box.

abutcher avatar Aug 31 '16 16:08 abutcher

Yes CentOS 7.2 comes with yum. But dnf is installed on my vSphere centos7.2 image which I use for deploying the Openshift Origin Is it a problem that I have dnf installed? I may remove the dnf if it solves the problem.

On Wed, Aug 31, 2016 at 7:08 PM Andrew Butcher [email protected] wrote:

Also asking if dnf was configured since Centos 7.2 should come with yum out of the box.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openshift/openshift-ansible/issues/2391#issuecomment-243814663, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsgCZsxcNY7bcjbchHR9QzhJYD2I3xRks5qlabwgaJpZM4Jxryo .

deromka avatar Aug 31 '16 16:08 deromka

@deromka Okay, then you're only missing the dnf repoquery plugin which can be installed via dnf-plugins-core.

It doesn't look like dnf-plugins-core is available in base centos repositories which complicates ensuring that the repoquery plugin is installed prior to querying the docker version.

abutcher avatar Aug 31 '16 17:08 abutcher

I have installed the dnf-plugins-core, but it has failed with the following error:

** ERROR **

TASK [docker : Get current installed Docker version] ***************************
fatal: [10.57.50.219]: FAILED! => {"changed": false, "cmd": ["dnf", "repoquery", "--latest-limit", "1", "-d", "0", "--installed", "--qf", "%{version}", "docker"], "delta": "0:00:00.791382", "end": "2016-08-31 17:33:06.981569", "failed": true, "rc": 1, "start": "2016-08-31 17:33:06.190187", "stderr": "Error: unrecognized arguments: --latest-limit --installed docker", "stdout": "usage: dnf repoquery [--help-cmd] [--repoid REPO] [--arch ARCH] [-f FILE]\n                     [--whatprovides REQ] [--whatrequires REQ] [--querytags]\n                     [-i | -l | -s | --qf QUERYFORMAT | --conflicts | --enhances | --obsoletes | --provides | --recommends | --requires | --suggests | --supplements]\n                     [key]\n\npositional arguments:\n  key                   the key to search for\n\noptional arguments:\n  --help-cmd            show this help about this tool\n  --repoid REPO         show only results from this REPO\n  --arch ARCH           show only results from this ARCH\n  -f FILE, --file FILE  show only results that owns FILE\n  --whatprovides REQ    show only results there provides REQ\n  --whatrequires REQ    show only results there requires REQ\n  --querytags           show available tags to use with --queryformat\n  -i, --info            show detailed information about the package\n  -l, --list            show list of files in the package\n  -s, --source          show package source RPM name\n  --qf QUERYFORMAT, --queryformat QUERYFORMAT\n                        format for displaying found packages\n  --conflicts           Display capabilities that the package conflicts with.\n  --enhances            Display capabilities that the package can enhance.\n  --obsoletes           Display capabilities that the package obsoletes.\n  --provides            Display capabilities provided by the package.\n  --recommends          Display capabilities that the package recommends.\n  --requires            Display capabilities that the package depends on.\n  --suggests            Display capabilities that the package suggests.\n  --supplements         Display capabilities that the package can supplement.", "stdout_lines": ["usage: dnf repoquery [--help-cmd] [--repoid REPO] [--arch ARCH] [-f FILE]", "                     [--whatprovides REQ] [--whatrequires REQ] [--querytags]", "                     [-i | -l | -s | --qf QUERYFORMAT | --conflicts | --enhances | --obsoletes | --provides | --recommends | --requires | --suggests | --supplements]", "                     [key]", "", "positional arguments:", "  key                   the key to search for", "", "optional arguments:", "  --help-cmd            show this help about this tool", "  --repoid REPO         show only results from this REPO", "  --arch ARCH           show only results from this ARCH", "  -f FILE, --file FILE  show only results that owns FILE", "  --whatprovides REQ    show only results there provides REQ", "  --whatrequires REQ    show only results there requires REQ", "  --querytags           show available tags to use with --queryformat", "  -i, --info            show detailed information about the package", "  -l, --list            show list of files in the package", "  -s, --source          show package source RPM name", "  --qf QUERYFORMAT, --queryformat QUERYFORMAT", "                        format for displaying found packages", "  --conflicts           Display capabilities that the package conflicts with.", "  --enhances            Display capabilities that the package can enhance.", "  --obsoletes           Display capabilities that the package obsoletes.", "  --provides            Display capabilities provided by the package.", "  --recommends          Display capabilities that the package recommends.", "  --requires            Display capabilities that the package depends on.", "  --suggests            Display capabilities that the package suggests.", "  --supplements         Display capabilities that the package can supplement."], "warnings": ["Consider using dnf module rather than running dnf"]}
fatal: [10.57.50.227]: FAILED! => {"changed": false, "cmd": ["dnf", "repoquery", "--latest-limit", "1", "-d", "0", "--installed", "--qf", "%{version}", "docker"], "delta": "0:00:00.795365", "end": "2016-08-31 17:33:06.988274", "failed": true, "rc": 1, "start": "2016-08-31 17:33:06.192909", "stderr": "Error: unrecognized arguments: --latest-limit --installed docker", "stdout": "usage: dnf repoquery [--help-cmd] [--repoid REPO] [--arch ARCH] [-f FILE]\n                     [--whatprovides REQ] [--whatrequires REQ] [--querytags]\n                     [-i | -l | -s | --qf QUERYFORMAT | --conflicts | --enhances | --obsoletes | --provides | --recommends | --requires | --suggests | --supplements]\n                     [key]\n\npositional arguments:\n  key                   the key to search for\n\noptional arguments:\n  --help-cmd            show this help about this tool\n  --repoid REPO         show only results from this REPO\n  --arch ARCH           show only results from this ARCH\n  -f FILE, --file FILE  show only results that owns FILE\n  --whatprovides REQ    show only results there provides REQ\n  --whatrequires REQ    show only results there requires REQ\n  --querytags           show available tags to use with --queryformat\n  -i, --info            show detailed information about the package\n  -l, --list            show list of files in the package\n  -s, --source          show package source RPM name\n  --qf QUERYFORMAT, --queryformat QUERYFORMAT\n                        format for displaying found packages\n  --conflicts           Display capabilities that the package conflicts with.\n  --enhances            Display capabilities that the package can enhance.\n  --obsoletes           Display capabilities that the package obsoletes.\n  --provides            Display capabilities provided by the package.\n  --recommends          Display capabilities that the package recommends.\n  --requires            Display capabilities that the package depends on.\n  --suggests            Display capabilities that the package suggests.\n  --supplements         Display capabilities that the package can supplement.", "stdout_lines": ["usage: dnf repoquery [--help-cmd] [--repoid REPO] [--arch ARCH] [-f FILE]", "                     [--whatprovides REQ] [--whatrequires REQ] [--querytags]", "                     [-i | -l | -s | --qf QUERYFORMAT | --conflicts | --enhances | --obsoletes | --provides | --recommends | --requires | --suggests | --supplements]", "                     [key]", "", "positional arguments:", "  key                   the key to search for", "", "optional arguments:", "  --help-cmd            show this help about this tool", "  --repoid REPO         show only results from this REPO", "  --arch ARCH           show only results from this ARCH", "  -f FILE, --file FILE  show only results that owns FILE", "  --whatprovides REQ    show only results there provides REQ", "  --whatrequires REQ    show only results there requires REQ", "  --querytags           show available tags to use with --queryformat", "  -i, --info            show detailed information about the package", "  -l, --list            show list of files in the package", "  -s, --source          show package source RPM name", "  --qf QUERYFORMAT, --queryformat QUERYFORMAT", "                        format for displaying found packages", "  --conflicts           Display capabilities that the package conflicts with.", "  --enhances            Display capabilities that the package can enhance.", "  --obsoletes           Display capabilities that the package obsoletes.", "  --provides            Display capabilities provided by the package.", "  --recommends          Display capabilities that the package recommends.", "  --requires            Display capabilities that the package depends on.", "  --suggests            Display capabilities that the package suggests.", "  --supplements         Display capabilities that the package can supplement."], "warnings": ["Consider using dnf module rather than running dnf"]}

NO MORE HOSTS LEFT *************************************************************

deromka avatar Aug 31 '16 17:08 deromka

I really do not need the dnf package manager, will it simplify things If i remove it at all?

deromka avatar Aug 31 '16 17:08 deromka

Going back to yum should get you around this problem. The current repoquery commands were tested against fedora / centos / rhel so we'll need to investigate what isn't jiving here.

abutcher avatar Aug 31 '16 17:08 abutcher

I removed dnf by: yum remove dnf*

It solved the issue. Thanks.

deromka avatar Sep 01 '16 06:09 deromka