elasticluster resize -r - become_user is not a valid attribute for TaskInclude

17 views
Skip to first unread message

Maiken Pedersen

unread,
May 20, 2019, 2:24:31 PM5/20/19
to elasticluster
Hi again,

I am using ansible version 2.8 with elasticluster installed from master of 20.05.2019
elasticluster version 1.3.dev13

Trying
elasticluster resize -r 20:compute


....
2019-05-20 20:17:26 elasticluster-final.novalocal gc3.elasticluster[13605] WARNING CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
2019-05-20 20:17:26 elasticluster-final.novalocal gc3.elasticluster[13605] WARNING CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
Reconfiguring the cluster.
ERROR
! 'become_user' is not a valid attribute for a TaskInclude

The error appears to be in '/home/centos/elasticluster_20190520/src/elasticluster/share/playbooks/roles/ceph/tasks/mgr.yml': line 31, column 3, but may
be elsewhere
in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Create MGR authentication key
 
^ here



Could this be due to wrong ansible version?

(elasticluster_20190520)[centos@elasticluster-final ~]$ pip freeze
DEPRECATION
: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
adal==1.2.1
ansible==2.8.0
apache-libcloud==2.4.0
appdirs==1.4.3
asn1crypto==0.24.0
attrs==19.1.0
azure-common==1.1.20
azure-mgmt-compute==5.0.0
azure-mgmt-network==2.7.0
azure-mgmt-nspkg==3.0.2
azure-mgmt-resource==2.1.0
azure-nspkg==3.0.2
Babel==2.6.0
backports.ssl-match-hostname==3.7.0.1
bcrypt==3.1.6
boto==2.49.0
cachetools==3.1.0
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
Click==7.0
cliff==2.14.1
cmd2==0.8.9
coloredlogs==10.0
contextlib2==0.5.5
cryptography==2.6.1
debtcollector==1.21.0
decorator==4.4.0
dogpile.cache==0.7.1
-e git+https://github.com/gc3-uzh-ch/elasticluster.git@e5058c744204c2dc1b3b2e317271b7ac8e328a1d#egg=elasticluster
enum34==1.1.6
funcsigs==1.0.2
functools32==3.2.3.post2
future==0.17.1
futures==3.2.0
google-api-python-client==1.7.8
google-auth==1.6.3
google-auth-httplib2==0.0.3
google-compute-engine==2.8.13
httplib2==0.12.3
humanfriendly==4.18
idna==2.8
ipaddress==1.0.22
iso8601==0.1.12
isodate==0.6.0
Jinja2==2.10.1
jmespath==0.9.4
jsonpatch==1.23
jsonpointer==2.0
jsonschema==3.0.1
keystoneauth1==3.14.0
MarkupSafe==1.1.1
monotonic==1.5
msgpack==0.6.1
msrest==0.6.6
msrestazure==0.6.0
munch==2.3.2
netaddr==0.7.19
netifaces==0.10.9
oauth2client==4.1.3
oauthlib==3.0.1
openstacksdk==0.28.0
os-client-config==1.32.0
os-service-types==1.7.0
osc-lib==1.12.1
oslo.config==6.9.0
oslo.context==2.22.1
oslo.i18n==3.23.1
oslo.log==3.43.0
oslo.serialization==2.29.1
oslo.utils==3.41.0
packaging==19.0
paramiko==2.4.2
pathlib2==2.3.3
pbr==5.2.0
prettytable==0.7.2
pyasn1==0.4.5
pyasn1-modules==0.2.5
pyCLI==2.0.3
pycparser==2.19
pycrypto==2.6.1
pyinotify==0.9.6
PyJWT==1.7.1
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.4.0
pyperclip==1.7.0
pyrsistent==0.15.2
python-cinderclient==4.2.0
python-dateutil==2.8.0
python-gflags==3.1.2
python-glanceclient==2.16.0
python-keystoneclient==3.19.0
python-neutronclient==6.12.0
python-novaclient==9.1.2
pytz==2019.1
PyYAML==5.1
requests==2.22.0
requests-oauthlib==1.2.0
requestsexceptions==1.4.0
rfc3986==1.3.2
rsa==4.0
scandir==1.10.0
schema==0.7.0
SecretStorage==2.3.1
simplejson==3.16.0
six==1.12.0
stevedore==1.30.1
subprocess32==3.5.3
typing==3.6.6
unicodecsv==0.14.1
uritemplate==3.0.0
urllib3==1.25.2
warlock==1.3.3
wcwidth==0.1.7
wrapt==1.11.1



Thanks!
Maiken

Riccardo Murri

unread,
May 20, 2019, 3:34:07 PM5/20/19
to Maiken Pedersen, elasticluster
Hello Maiken,

looks like a syntax error in the playbooks, but I won't be able to
check until end of the week.
Can you please try with Ansible 2.7 and see if the error goes away?
Ciao,
R

Maiken Pedersen

unread,
May 20, 2019, 4:18:26 PM5/20/19
to elasticluster
Thanks, certainly. I will try with ansible 2.7 and let you know.

Maiken

Maiken Pedersen

unread,
May 21, 2019, 6:44:59 AM5/21/19
to elasticluster
Ansible 2.7 solves this problem.

However, a new one occurs with 2.7 which I will open a new post on:

AttributeError: 'module' object has no attribute 'OpenStackCloudTimeout'

when trying to create volumes on the instances.

Thanks
Maiken

Maiken Pedersen

unread,
May 21, 2019, 7:20:00 AM5/21/19
to elasticluster
To get around the problem I simply commented out the

become
become_user
parts in /home/centos/elasticluster_20190520/src/elasticluster/share/playbooks/roles/ceph/tasks/mgr.yml

Not the most elegant solution.. But have not spent time investigating what is the proper way of dealing with privilege escalation for tasks.

Maiken

Riccardo Murri

unread,
May 27, 2019, 10:46:02 AM5/27/19
to Maiken Pedersen, elasticluster
Hello Maiken, all,

> ERROR! 'become_user' is not a valid attribute for a TaskInclude
>
> The error appears to be in '/home/centos/elasticluster_20190520/src/elasticluster/share/playbooks/roles/ceph/tasks/mgr.yml': line 31, column 3, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
> - name: Create MGR authentication key
> ^ here

This has now been fixed in "master" by merging PR #641 (see [1]).
The change bumps ElastiCluster's requirements to Ansible 2.7 (was >=2.5)
since the `apply: become: ...` syntax used to be compatible with Ansible 2.8
is only available starting Ansible 2.7.

Many thanks to Julien Perret for contributing the fix!

[1]: https://github.com/gc3-uzh-ch/elasticluster/pull/641

Ciao,
R
Reply all
Reply to author
Forward
0 new messages