Bug 1668694 - Manually running ansible-playbook requires root privileges
Summary: Manually running ansible-playbook requires root privileges
Keywords:
Status: CLOSED DUPLICATE of bug 1664276
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Installation
Version: 1.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ohad Levy
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-23 11:04 UTC by Yossi Segev
Modified: 2019-01-23 12:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-23 12:34:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yossi Segev 2019-01-23 11:04:06 UTC
Description of problem:
When running ansible-playbook manually, the job fails upon creating kubevirt.retry file, unless run as root.

Version-Release number of selected component (if applicable):
ansible-playbook 2.6.11
Client Version: v0.13.0
Server Version: v0.13.0


How reproducible:
Tried once and it happened.

Steps to Reproduce:
1. ssh to cluster's master node, as "cloud-user" user.
 $ ssh cloud-user.240.192 -i ~/.ssh/cnv-qe-jenkins.key

2. Try running the following command:
 $ ansible-playbook -i /home/cloud-user/kubevirt-ansible.inv -u cloud-user --private-key /home/cloud-user/.ssh/id_rsa -e@/usr/share/ansible/kubevirt-ansible/vars/all.yml -e@/usr/share/ansible/kubevirt-ansible/vars/cnv.yml -e registry_url=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888 /usr/share/ansible/kubevirt-ansible/playbooks/kubevirt.yml -e deploy_sriov_plugin=false


Actual results:
Command fails with the following "permission denied" error:
WARNING]: Could not create retry file '/usr/share/ansible/kubevirt-ansible/playbooks/kubevirt.retry'.         [Errno 13] Permission denied: u'/usr/share/ansible/kubevirt-ansible/playbooks/kubevirt.retry'

Expected results:
Command should complete successfully for standard user.


Workaround:
Run the command as root:
 $ sudo ansible-playbook -i /home/cloud-user/kubevirt-ansible.inv -u cloud-user --private-key /home/cloud-user/.ssh/id_rsa -e@/usr/share/ansible/kubevirt-ansible/vars/all.yml -e@/usr/share/ansible/kubevirt-ansible/vars/cnv.yml -e registry_url=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888 /usr/share/ansible/kubevirt-ansible/playbooks/kubevirt.yml -e deploy_sriov_plugin=false

Comment 1 Israel Pinto 2019-01-23 12:34:10 UTC

*** This bug has been marked as a duplicate of bug 1664276 ***


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