Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1509632 - Permission denied warning when the network-environment validator fails
Summary: Permission denied warning when the network-environment validator fails
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-05 10:27 UTC by Udi
Modified: 2017-11-07 10:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-07 10:29:36 UTC


Attachments (Terms of Use)

Description Udi 2017-11-05 10:27:14 UTC
Description of problem:
I introduced an error to my network-environment.yaml and updated the plan file. When I ran the validator it caught the error nicely, but also outputted a strange permission denied warning:

 [WARNING]: Could not create retry file '/usr/share/openstack-tripleo-validations/validations/network-environment.retry'.         [Errno
13] Permission denied: u'/usr/share/openstack-tripleo-validations/validations/network-environment.retry'

Why is it trying to write to /usr/share ?


Version-Release number of selected component (if applicable):
openstack-tripleo-validations-7.4.2-0.20171016115241.c2c9bf2.el7ost.noarch


How reproducible:
100%


Steps to Reproduce:
1. Introduce an error to network-environment.yaml. I changed to mapping for one of the nic-configs to a non-existent file.
2. Upload the changes to swift: 
openstack object create overcloud environments/network-environment.yaml
3. Run the validator:
ansible-playbook -i /usr/bin/tripleo-ansible-inventory /usr/share/openstack-tripleo-validations/validations/network-environment.yaml


Actual results:
The error is caught and reported nicely to the user, but after that you see that some kind of a retry failed because a retry file could not be created on the file system of the undercloud.

Comment 1 Gaël Chamoulaud 2017-11-07 09:49:47 UTC
(In reply to Udi from comment #0)
> Description of problem:
> I introduced an error to my network-environment.yaml and updated the plan
> file. When I ran the validator it caught the error nicely, but also
> outputted a strange permission denied warning:
> 
>  [WARNING]: Could not create retry file
> '/usr/share/openstack-tripleo-validations/validations/network-environment.
> retry'.         [Errno
> 13] Permission denied:
> u'/usr/share/openstack-tripleo-validations/validations/network-environment.
> retry'
> 
> Why is it trying to write to /usr/share ?

Udi, that is an ansible feature which controls whether a failed Ansible playbook should create a .retry file.

To avoid these warnings while using ansible-playbook cmd line for running a validation, just disable this functionality before running the validation:

   export ANSIBLE_RETRY_FILES_ENABLED=false

You can look at how we run validations through the Mistral framework. At the end, we use ansible-playbook to run them.

   https://github.com/openstack/tripleo-common/blob/master/scripts/run-validation#L28-L29

In conclusion, that's not a tripleo-validations bug IMHO.

Gaël

Comment 2 Udi 2017-11-07 10:29:36 UTC
OK, we'll make sure to set ANSIBLE_RETRY_FILES_ENABLED to false whenever running the validators.


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