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 1686183 - Are symlinks supported for /var/lib/origin/openshift.local.volumes ?
Summary: Are symlinks supported for /var/lib/origin/openshift.local.volumes ?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.9.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.9.z
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 22:20 UTC by Sam Yangsao
Modified: 2019-03-08 13:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-08 13:47:09 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sam Yangsao 2019-03-06 22:20:44 UTC
Description of problem:

Are symlinks supported for /var/lib/origin/openshift.local.volumes to another directory path?

Version-Release number of the following components:

# rpm -q openshift-ansible
openshift-ansible-3.9.57-1.git.0.9ece605.el7.noarch

# rpm -q ansible
ansible-2.4.6.0-1.el7ae.noarch

# ansible --version
ansible 2.4.6.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

How reproducible:

Always

Steps to Reproduce:

1.  Before installing OCP, set up another directory path to another physical device:

/var/lib/openshift

2.  Create a symlink for /var/lib/origin/openshift.local.volumes and point it to

/var/lib/openshift

Actual results:

OpenShift seems to be running fine, except for upgrades and or install of Hawkular metrics which requires a hack of the following file:

/usr/share/ansible/openshift-ansible/roles/openshift_node_group/templates/node-config.yaml.j2

and modifying the openshift.local.volumes path to /var/lib/openshift

Expected results:

Is this currently supported by us?  Customer also claims that /var/lib/openshift was a directory path used in previous versions (not sure if it was but wanted to verify with Engineering).

Additional info:

Should we create an RFE to allow the following of symlinks in the ansible playbook?

Comment 1 Scott Dodson 2019-03-06 22:29:28 UTC
openshift_node_group_node_data_dir variable can be set to an alternate path rather than relying on a symlink and it will create openshift.local.volumes path under that directory. I'd do that instead.

If there are limitations to the use of a symlink for the volumeDirectory that would be the domain of either the container runtimes or kubelet. Moving to runtimes team.

Comment 2 Sam Yangsao 2019-03-06 22:46:36 UTC
(In reply to Scott Dodson from comment #1)
> openshift_node_group_node_data_dir variable can be set to an alternate path
> rather than relying on a symlink and it will create openshift.local.volumes
> path under that directory. I'd do that instead.
> 

Should it be modified here [1]?  Or can we modify this variable in the hosts/inventory file? 

Thanks!

[1] https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_node_group/defaults/main.yml

Comment 3 Sam Yangsao 2019-03-07 15:35:57 UTC
Setting needinfo for comment#2

Comment 5 Scott Dodson 2019-03-08 13:47:09 UTC
Sam,

It can be set via inventory, either on a per host basis or in the [OSEv3:vars] section.

Looking at the code again, the variable name I mentioned is mostly relevant to 3.10+ installations where this is applied via node groups. I'd recommend setting both of these variables in your inventory, thsi will ensure that it works in both 3.9 and 3.10.

openshift_node_data_dir=/var/lib/openshift
openshift_node_group_node_data_dir=/var/lib/openshift

And since the kubelet and runtime maintainers have indicated that symlinking the volumeDirectory may work but hasn't been tested we should instruct them not to rely on symlinks.

--
Scott


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