Bug 2172129

Summary: Newly installed Satellite 6.13 shows broken symlink for .ansible.cfg inside /usr/share/foreman-proxy/ directory
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: AnsibleAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.13.0CC: ahumbe, aruzicka, nalfassi, zuansorg
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sayan Das 2023-02-21 14:57:14 UTC
Description of problem:

On a freshly installed Satellite 6.13, /etc/foreman-proxy/ansible.cfg is not longer present and we still get to see a broken link for /usr/share/foreman-proxy/.ansible.cfg file.


Version-Release number of selected component (if applicable):

satellite-6.13.0-4.el8sat.noarch
rubygem-smart_proxy_ansible-3.5.0-1.el8sat.noarch


How reproducible:

Always


Steps to Reproduce:

1. Install Satellite 6.13
2. Check inside /usr/share/foreman-proxy/ using "ls -la"


Actual results:

# ll /usr/share/foreman-proxy/ -a | grep "\.ansi"
lrwxrwxrwx.   1 root          root   30 Nov 11 17:42 .ansible -> /var/lib/foreman-proxy/ansible
lrwxrwxrwx.   1 root          root   30 Nov 11 17:42 .ansible.cfg -> /etc/foreman-proxy/ansible.cfg
lrwxrwxrwx.   1 root          root   37 Nov 11 17:42 .ansible_galaxy -> /var/lib/foreman-proxy/ansible_galaxy

# ls -ld /var/lib/foreman-proxy/ansible /etc/foreman-proxy/ansible.cfg /var/lib/foreman-proxy/ansible_galaxy
ls: cannot access '/etc/foreman-proxy/ansible.cfg': No such file or directory
drwxr-xr-x. 2 foreman-proxy foreman-proxy 6 Nov 11 17:42 /var/lib/foreman-proxy/ansible
drwxr-xr-x. 2 foreman-proxy foreman-proxy 6 Nov 11 17:42 /var/lib/foreman-proxy/ansible_galaxy



Expected results:

* No such broken links should be present in the product. 


Additional info:

Comment 1 Brad Buckingham 2023-02-23 15:26:09 UTC
Is there any user impact or broken workflows as a result of this behavior?

Comment 2 Sayan Das 2023-02-23 15:33:02 UTC
(In reply to Brad Buckingham from comment #1)
> Is there any user impact or broken workflows as a result of this behavior?

Not at all as long as someone does not decide to put an ansible.cfg manually inside the target location, which then will cause issues. 

I am aware of a discussion here in https://bugzilla.redhat.com/show_bug.cgi?id=2171849#c2 about it as well.

Comment 3 Zuzana Lena Ansorgova 2023-03-08 14:44:37 UTC
The question is how Ansible behaves if it finds a broken link. According to Ansible docs, it searches for ~/.ansible.cfg and if not found, then it goes for /etc/ansible/ansible.cfg.
The ~/.ansible.cfg file is technically there, so is it possible that Ansible ignores /etc/ansible/ansible.cfg because it finds the broken link?

IMHO, the test case used to verify https://bugzilla.redhat.com/show_bug.cgi?id=1786358#c16 only tested that the modification in the cfg is persistent, not that it's applied during Ansible execution in Satellite.

Comment 4 Zuzana Lena Ansorgova 2023-03-08 14:45:27 UTC
I'm asking about the broken link because of https://bugzilla.redhat.com/show_bug.cgi?id=2171849

Comment 5 Adam Ruzicka 2023-03-08 15:24:19 UTC
Broken links are ignored, in 2171849 they don't have a broken link.