Bug 1102406 - Saving files editted with vim throws an error writing out .viminfo
Summary: Saving files editted with vim throws an error writing out .viminfo
Keywords:
Status: CLOSED DUPLICATE of bug 1048952
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-28 22:59 UTC by Andrew Thornton
Modified: 2016-05-25 13:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-29 15:08:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrew Thornton 2014-05-28 22:59:58 UTC
Description of problem:

Installing the drupal cartridge, saving a file editted in vim throws an error when it tries to write to the .viminfo file. Vim assumes it's in the home drive which is read only, it needs to write to the app-root/data directory instead.


How reproducible:
Easy to reproduce, I have a work around which I'll add to this case

Steps to Reproduce:
1. Login
2. cd to app-root/data
3. vim test.txt
4. add some text, then save with :wq

Actual results:
E138: Can't write viminfo file /var/lib/openshift/5373767f3b696e5d79000001/.vimi
nfo!

Expected results:
Saves clean and exits

Additional info:

I found an easy solution, in the file app-root/data/.bash_profile add an alias to pass the path to where the .viminfo is writable.

eg:

.bash_profile

alias vim="vim -i ~/app-root/data/.viminfo"

This resolves the issue.

Comment 2 Luke Meyer 2014-05-29 12:58:45 UTC
Thanks for pointing this out. Could you clarify which version of OpenShift Enterprise you observed this on? I could have sworn we put in a fix for this some time during 2.0.

Comment 5 Miciah Dashiel Butler Masters 2014-05-29 14:50:23 UTC
It's fixed in OSE 2.0.2:

https://bugzilla.redhat.com/show_bug.cgi?id=1048952
http://rhn.redhat.com/errata/RHBA-2014-0102.html

It was fixed upstream before OSE 2.1 was released, so 2.1 has the fix as well:

https://github.com/openshift/origin-server/commit/0af65ca133c8f72a2d42627240d8983f6dfb1393

Comment 6 Miciah Dashiel Butler Masters 2014-05-29 14:53:53 UTC
That probably means gears created on 2.0.0 or 2.0.1 will not be fixed even if the system administrator upgrades the node to 2.0.2.  It might be worth trying to reproduce the bug on a new application, if you have not already done so.

Comment 7 Andrew Thornton 2014-05-29 15:02:24 UTC
I just spun up a new application and logged in and it's working fine. It's just on my old gear and I am fine with that as I can work around it on old gears using a bash alias. I am happy to close this out, I'll leave that decision with you to decide if you want to backport the fix to old gears. I am happy this issue is resolved.

Comment 8 Luke Meyer 2014-05-29 15:08:23 UTC
Thanks Miciah, I couldn't find that bug right away. Probably my search didn't include closed.

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


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