Bug 2172129 - Newly installed Satellite 6.13 shows broken symlink for .ansible.cfg inside /usr/share/foreman-proxy/ directory
Summary: Newly installed Satellite 6.13 shows broken symlink for .ansible.cfg inside /...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible
Version: 6.13.0
Hardware: All
OS: All
low
medium with 1 vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-21 14:57 UTC by Sayan Das
Modified: 2023-08-03 17:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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