Bug 1423444 - OCP 3.5 installation failed due to a symbolic link error
Summary: OCP 3.5 installation failed due to a symbolic link error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Jan Chaloupka
QA Contact: Wenkai Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-17 10:53 UTC by Wenkai Shi
Modified: 2017-07-24 14:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-13 12:03:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0903 0 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-04-12 22:45:42 UTC

Description Wenkai Shi 2017-02-17 10:53:09 UTC
Description of problem:
OCP 3.5 installation failed due to a symbolic link error.

Version-Release number of selected component (if applicable):
openshift-ansible-3.5.10-1.git.0.ba66b63.el7
atomic-openshift-utils-3.5.10-1.git.0.ba66b63.el7

How reproducible:
100%

Steps to Reproduce:
1.Prepare a host for installation
2.Run install playbook
3.

Actual results:
# ansible-playbook -i hosts -v /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml
...
TASK [Evaluate group l_oo_all_hosts] *******************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: IOError: [Errno 2] No such file or directory: u'/usr/share/ansible/openshift-ansible/roles/openshift_master_facts/filter_plugins/oo_filters.py'
fatal: [localhost]: FAILED! => {
    "failed": true
}

MSG:

Unexpected failure during module execution.


NO MORE HOSTS LEFT *************************************************************
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/config.retry

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1   


Expected results:
Installation succeed

Additional info:

Comment 1 Scott Dodson 2017-02-17 13:41:54 UTC
Do you have openshift-ansible-roles package installed? I think our rpm dependencies are messed up and we've lost that.

Comment 2 Scott Dodson 2017-02-17 13:49:13 UTC
Before adjusting anything can you provide me the output of this

rpm -qa openshift*\ | sort

Comment 3 Wenkai Shi 2017-02-20 01:39:22 UTC
(In reply to Scott Dodson from comment #2)
> Before adjusting anything can you provide me the output of this
> 
> rpm -qa openshift*\ | sort

[root@ansible ~]# rpm -qa openshift*\ | sort

[root@ansible ~]# rpm -qa | grep openshift| sort
atomic-openshift-utils-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-callback-plugins-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-docs-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-filter-plugins-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-lookup-plugins-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-playbooks-3.5.10-1.git.0.ba66b63.el7.noarch
openshift-ansible-roles-3.5.10-1.git.0.ba66b63.el7.noarch

Comment 5 Jan Chaloupka 2017-02-20 08:53:10 UTC
Listing files on the openshift-ansible-roles-3.5.10-1.git.0.ba66b63.el7.noarch.rpm the oo_filters.py is there:

$ rpm -qpl openshift-ansible-roles-3.5.10-1.git.0.ba66b63.el7.noarch.rpm | grep oo_filters
/usr/share/ansible/openshift-ansible/roles/openshift_master_facts/filter_plugins/oo_filters.py

Wenkai, can you run the same command and see if the file is installed? I.e.:
$ rpm -ql openshift-ansible-roles | grep oo_filters

Comment 6 Wenkai Shi 2017-02-20 10:41:06 UTC
(In reply to Jan Chaloupka from comment #5)
> Listing files on the
> openshift-ansible-roles-3.5.10-1.git.0.ba66b63.el7.noarch.rpm the
> oo_filters.py is there:
> 
> $ rpm -qpl openshift-ansible-roles-3.5.10-1.git.0.ba66b63.el7.noarch.rpm |
> grep oo_filters
> /usr/share/ansible/openshift-ansible/roles/openshift_master_facts/
> filter_plugins/oo_filters.py
> 
> Wenkai, can you run the same command and see if the file is installed? I.e.:
> $ rpm -ql openshift-ansible-roles | grep oo_filters

[root@ansible ~]# rpm -ql openshift-ansible-roles | grep oo_filters
/usr/share/ansible/openshift-ansible/roles/openshift_master_facts/filter_plugins/oo_filters.py

Comment 7 Anping Li 2017-02-20 10:53:35 UTC
Jan, It was installed as a symbol link file which linked to a non-existent file.

[root@anli ~]# ls -l /usr/share/ansible/openshift-ansible/playbooks/byo/roles/openshift_master_facts/filter_plugins
total 80
lrwxrwxrwx. 1 root root    37 Feb 20 18:51 oo_filters.py -> ../../../filter_plugins/oo_filters.py
-rw-r--r--. 1 root root 23489 Feb 17 09:59 openshift_master.py
-rw-r--r--. 2 root root 25159 Feb 17 10:04 openshift_master.pyc
-rw-r--r--. 2 root root 25159 Feb 17 10:04 openshift_master.pyo


ls: cannot access /usr/share/ansible/openshift-ansible/playbooks/byo/roles/openshift_master_facts/filter_plugins/../../../filter_plugins/oo_filters.py: No such file or directory

Comment 8 Jan Chaloupka 2017-02-20 12:04:53 UTC
Right,

the openshift-ansible-roles-3.5.10-1.git.0.ba66b63.el7.noarch.rpm expects the oo_filter.py under /usr/share/ansible/openshift-ansible/filter_plugins/oo_filters.py. However, that is no longer true in the rpm based installation. The filter_plugins directory is actually under /usr/share/ansible_plugins/filter_plugins which belongs to openshift-ansible-filter-plugins-3.5.10-1.git.0.ba66b63.el7.noarch.rpm.

So either update the symlink or replace the symlink with a copy of the oo_filters.py file.
I don't like symlinks that reach out of a single rpm.
On the other hand a user can intentionally modify file in /usr/share/ansible_plugins/filter_plugins/oo_filters.py without knowing there is actually a duplicate. Given the openshift-ansible-filter-plugins is a runtime requirement of openshift-ansible-roles, the symlink is the smaller evil I guess.

Comment 10 Jan Chaloupka 2017-02-20 15:40:51 UTC
Upstream PR: https://github.com/openshift/openshift-ansible/pull/3425

Comment 11 openshift-github-bot 2017-02-20 15:48:38 UTC
Commit pushed to master at https://github.com/openshift/openshift-ansible

https://github.com/openshift/openshift-ansible/commit/2848c0e28732d795017e555817f9d0406a1296cb
Fix symlink to filter_plugins/oo_filters.py

Bug 1423444

Comment 13 Anping Li 2017-02-22 07:07:46 UTC
No this issue if I upgrade with openshift-ansible-3.5.13-1.git.0.562e91d.el7.noarch

Comment 14 Wenkai Shi 2017-02-22 07:59:12 UTC
Verified with version openshift-ansible-3.5.13-1.git.0.562e91d.el7.noarch, installation succeed.

[root@ansible ~]# ls -l /usr/share/ansible/openshift-ansible/playbooks/byo/roles/openshift_master_facts/filter_plugins/oo_filters.py
lrwxrwxrwx. 1 root root 59 Feb 22 14:45 /usr/share/ansible/openshift-ansible/playbooks/byo/roles/openshift_master_facts/filter_plugins/oo_filters.py -> ../../../../../ansible_plugins/filter_plugins/oo_filters.py


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