Bug 1388295 - [ceph-ansible] "rolling_update.yml" not running due to a syntax error in ceph-ansible
Summary: [ceph-ansible] "rolling_update.yml" not running due to a syntax error in ceph...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat
Component: ceph-ansible
Version: 2
Hardware: Unspecified
OS: Linux
unspecified
urgent
Target Milestone: ---
: 2
Assignee: Sébastien Han
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-25 04:14 UTC by Tejas
Modified: 2016-11-22 23:42 UTC (History)
11 users (show)

Fixed In Version: ceph-ansible-1.0.5-37.el7scon
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-22 23:42:05 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2817 0 normal SHIPPED_LIVE ceph-iscsi-ansible and ceph-ansible bug fix update 2017-04-18 19:50:43 UTC

Description Tejas 2016-10-25 04:14:13 UTC
Description of problem:
   In the latest downstream version of ceph-ansible which is :
ceph-ansible-1.0.5-36.el7scon.noarch.rpm

we are seeing this error:
> ansible-playbook rolling_update.yml 
ERROR: Syntax Error while loading YAML script, rolling_update.yml
Note: The error may actually appear before this position: line 31, column 1


vars:
^

This issue seems to be not specific to the downstream ceph-ansible.
I am seing the same behaviour in the upstream ceph-ansible as well.

Version-Release number of selected component (if applicable):
ceph-ansible-1.0.5-36.el7scon.noarch.rpm

How reproducible:
Always

Comment 2 seb 2016-10-25 08:37:22 UTC
please test this: https://github.com/ceph/ceph-ansible/pull/1047

Comment 3 Tejas 2016-10-25 09:39:08 UTC
I am seeing an error like this:

# ansible-playbook infrastructure-playbooks/rolling_update.yml 
Are you sure you want to upgrade the cluster? [no]: yes
ERROR: cannot find role in /root/ceph-ansible/infrastructure-playbooks/roles/ceph-common or /root/ceph-ansible/infrastructure-playbooks/ceph-common or /etc/ansible/roles/ceph-common

which role is it looking for?

Thanks,
Tejas

Comment 4 seb 2016-10-25 10:30:07 UTC
Please cp infrastructure-playbooks/rolling_update.yml at the root of the ansible directory.

Comment 5 Tejas 2016-10-25 10:40:44 UTC
thanks.

is this error specific to my setup?

Are you sure you want to upgrade the cluster? [no]: yes
ERROR: yum_repository is not a legal parameter in an Ansible task or handler

If so, yes its working.

Thanks,
Tejas

Comment 6 seb 2016-10-25 10:43:46 UTC
Hum when is this error showing?
I don't understand your answer, did you get the update working?

Comment 8 Tejas 2016-10-25 13:15:33 UTC
roles/ceph-osd/tasks/pre_requisite.yml:

- name: enable extras repo on centos
  yum_repository:
    name: extras
    state: present
    enabled: yes
  when: ansible_distribution == 'CentOS'

The above error message pertains to this task .

Thanks,
Tejas

Comment 9 seb 2016-10-25 13:22:19 UTC
Can you apply this: https://github.com/ceph/ceph-ansible/pull/1042
And my previous patch, then try again.
Thanks

Comment 10 seb 2016-10-25 13:22:31 UTC
Can you apply this: https://github.com/ceph/ceph-ansible/pull/1042
And my previous patch, then try again.
Thanks

Comment 11 Tejas 2016-10-25 13:32:02 UTC
Hi Seb,

   All the changes here pertain to docker:
https://github.com/ceph/ceph-ansible/pull/1042/files

roles/ceph-mds/tasks/docker/pre_requisite.yml and so on. Are we sure it will work in our scenario also?

Thanks,
Tejas

Comment 12 Andrew Schoen 2016-10-25 14:45:00 UTC
(In reply to Tejas from comment #8)
> roles/ceph-osd/tasks/pre_requisite.yml:
> 
> - name: enable extras repo on centos
>   yum_repository:
>     name: extras
>     state: present
>     enabled: yes
>   when: ansible_distribution == 'CentOS'

Are you sure you're testing ceph-ansible 1.0.5? That task only exists in the upstream version of ceph-ansible not 1.0.5.

The reason why you're seeing 'ERROR: yum_repository is not a legal parameter in an Ansible task or handler' is because the yum_repository ansible module was added in ansible version 2.1 and we do not ship that version downstream.

> 
> The above error message pertains to this task .
> 
> Thanks,
> Tejas

Comment 13 Ivan Font 2016-10-25 16:35:01 UTC
(In reply to Tejas from comment #0)
> Description of problem:
>    In the latest downstream version of ceph-ansible which is :
> ceph-ansible-1.0.5-36.el7scon.noarch.rpm
> 
> we are seeing this error:
> > ansible-playbook rolling_update.yml 
> ERROR: Syntax Error while loading YAML script, rolling_update.yml
> Note: The error may actually appear before this position: line 31, column 1

This error may be caused by an indentation problem where we start a new play without a playbook name as shown here https://github.com/ceph/ceph-ansible/blob/master/infrastructure-playbooks/rolling_update.yml#L31-L59 and ansible-playbook detects a syntax error.

> 
> 
> vars:
> ^
> 
> This issue seems to be not specific to the downstream ceph-ansible.
> I am seing the same behaviour in the upstream ceph-ansible as well.
> 
> Version-Release number of selected component (if applicable):
> ceph-ansible-1.0.5-36.el7scon.noarch.rpm
> 
> How reproducible:
> Always

Comment 14 Ivan Font 2016-10-25 16:37:37 UTC
Please also test this https://github.com/ceph/ceph-ansible/pull/1049 and no need to copy over the playbook to the root directory, you can try running it like before:

# ansible-playbook infrastructure-playbooks/rolling_update.yml

Comment 19 Tejas 2016-10-26 10:08:14 UTC
   (In reply to Ivan Font from comment #14)
> Please also test this https://github.com/ceph/ceph-ansible/pull/1049 and no
> need to copy over the playbook to the root directory, you can try running it
> like before:
> 
> # ansible-playbook infrastructure-playbooks/rolling_update.yml

Thanks Ivan, this change fixed the issue.
I am able to run running_update.yml.

Comment 20 Ken Dreyer (Red Hat) 2016-10-26 11:06:35 UTC
Tejas, it sounds like this bug existed in the GitHub upstream repository, but not in ceph-ansible-1.0.5-36.el7scon ?

Or do we need an additional change in the ceph-ansible-1.0.5 downstream package here?

Comment 21 Tejas 2016-10-26 11:21:14 UTC
Ken,

   This issue existed in the upstream repository as well as our downstream repos.
I have been testing Seb's and Ivan changes upstream. Once these are merged upstream, we would need to get them downstream.

Thanks,
Tejas

Comment 31 Tejas 2016-10-28 06:52:30 UTC
verified in build:
ceph-ansible-1.0.5-37.el7scon

Comment 33 errata-xmlrpc 2016-11-22 23:42:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2817


Note You need to log in before you can comment on or make changes to this bug.