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

python-ruamel-yaml and metrics on RHEL 7.3 #3302

Closed
glamperi opened this issue Feb 9, 2017 · 16 comments
Closed

python-ruamel-yaml and metrics on RHEL 7.3 #3302

glamperi opened this issue Feb 9, 2017 · 16 comments

Comments

@glamperi
Copy link

glamperi commented Feb 9, 2017

It looks like the update of the git repo in the last few days uses
python-ruamel-yaml for metrics. This does not work on RHEL 7.3, lucky
I cloned the repo, the 6-7 day old cloned git repo works.

@Adamjmb
Copy link

Adamjmb commented Feb 10, 2017

This issue is blocking. Is there a work around for this issue?

@detiber
Copy link
Contributor

detiber commented Feb 10, 2017

@sdodson @kwoodson @tdawson fyi

@etsauer
Copy link
Contributor

etsauer commented Feb 11, 2017

It looks like, even in upstream fedora/cent channels the package might be under a different name:

f25:

$ sudo dnf search python*yaml
Last metadata expiration check: 4:03:01 ago on Fri Feb 10 17:30:23 2017.
============= N/S Matched: python*yaml 
python3-PyYAML.x86_64 : YAML parser and emitter for Python
python2-grafyaml.noarch : Tools to make Grafana dashboards from templates
python3-grafyaml.noarch : Tools to make Grafana dashboards from templates
python2-ruamel-yaml.x86_64 : YAML 1.2 loader/dumper package for Python

@warmchang
Copy link
Contributor

+1. I got the error about "python-ruamel-yaml" when upgrade the origin version.

TASK [lib_openshift : lib_openshift ensure python-ruamel-yaml package is on target] ***
fatal: [master.example.com]: FAILED! => {
"changed": false,
"failed": true,
"rc": 126,
"results": [
"No package matching 'python-ruamel-yaml' found available, installed or updated"
]
}

MSG:

No package matching 'python-ruamel-yaml' found available, installed or updated

PLAY RECAP *********************************************************************
localhost : ok=30 changed=0 unreachable=0 failed=0
master.example.com : ok=293 changed=21 unreachable=0 failed=1

The host is CentOS 7.3:

[root@master openshift-ansible]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

@etsauer
Copy link
Contributor

etsauer commented Feb 11, 2017

I was able to work around the issue with the following enhancement to lib_openshift:

$ git diff roles/lib_openshift/tasks/main.yml
diff --git a/roles/lib_openshift/tasks/main.yml b/roles/lib_openshift/tasks/main.yml
index 2980c8a..3778c9e 100644
--- a/roles/lib_openshift/tasks/main.yml
+++ b/roles/lib_openshift/tasks/main.yml
@@ -1,5 +1,15 @@
 ---
+- set_fact:
+    os_version: "{{ ansible_distribution_version.split('.') }}"
+
+- set_fact:
+    python_yaml_pkg: python-ruamel-yaml
+
+- set_fact:
+    python_yaml_pkg: PyYAML
+  when: ansible_distribution == "RedHat" and os_version[0] | int == 7 and os_version[1] | int >= 3
+
 - name: lib_openshift ensure python-ruamel-yaml package is on target
   package:
-    name: python-ruamel-yaml
+    name: "{{ python_yaml_pkg }}"
     state: present

however, other things within playbooks/common/openshift-cluster/openshift_hosted.yml around metrics seems to be failing because of missing default values.

@xelfe
Copy link

xelfe commented Feb 11, 2017

I have the same problem with CentOS Linux release 7.3.1611 (Core) when trying to update 3.3 to 3.4

@ollyhewett
Copy link

Same here.
Built environments of Centos 7.3.1611 & Fedora 25 base builds and both fail with this error

@sdodson
Copy link
Member

sdodson commented Feb 13, 2017

We're working to get this dependency into EPEL, Fedora 25, and the Centos PaaS SIG repo. The release-1.4 branch does not have this dependency and is the most stable branch for installing Origin 1.4 if that's your target.

@sdodson
Copy link
Member

sdodson commented Feb 13, 2017

@etsauer That won't work as we start to actually use functionality of python-ruamel-yaml it will break down. I don't suggest that.

@smarterclayton
Copy link
Contributor

https://ci.openshift.redhat.com/jenkins/job/zz_origin_gce_image/113/console failed to pick up latest because the ops-mirrors don't have it.

@warmchang
Copy link
Contributor

warmchang commented Feb 13, 2017

@sdodson , update successfully by use release-1.4 branch.

@cgwalters
Copy link
Member

I'm not sure whether to overload this bug, but we need to choose how to handle this new dependency for Atomic Host.

@sdodson
Copy link
Member

sdodson commented Feb 17, 2017

I'm not sure whether to overload this bug, but we need to choose how to handle this new dependency for Atomic Host.

For now we've chosen to fall back to using PyYAML which is currently available on atomic host, right? #3383

@xiaoping378
Copy link

the issue is also met at master.

@php-coder
Copy link
Contributor

The workaround that worked for me with Fedora 24:

--- roles/lib_openshift/tasks/main.yml
+++ roles/lib_openshift/tasks/main.yml
@@ -4,8 +4,8 @@
     path: /run/ostree-booted
   register: ostree_booted
 
-- name: lib_openshift ensure python-ruamel-yaml package is on target
-  package:
-    name: python2-ruamel-yaml
-    state: present
-  when: not ostree_booted.stat.exists

@sdodson
Copy link
Member

sdodson commented Mar 30, 2017

This should be fixed now via #3499

@sdodson sdodson closed this as completed Mar 30, 2017
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

No branches or pull requests