-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oc cluster with oc 1.5.0.alpha.2 fails when persistent data directory used. #12602
Comments
@GrahamDumpleton Please try using windows-style paths for the directory arguments |
So this looks like an issue with version v1.4.0 and newer of the origin images. |
Correct, works up to 1.3.3. Under 1.4.0 you wouldn't be able to tell unless you first fix #12601 as likely can't get far enough into startup to encounter it. |
Using Windows style paths doesn't help. Get the same error about the |
@GrahamDumpleton this looks like an issue in etcd and Windows file systems: etcd-io/etcd#5852 As a workaround for your wrapper for now, would it be possible to just use a path inside the vm for storing profiles (e.g. /var/run/profile/blah)? |
@smarterclayton ^^ v3.1.0 of etcd was just released. Any idea when we'd pick it up? |
nm, I see @smarterclayton merged the release version of etcd yesterday. I will test with the latest build of the images and see if this issue has been resolved. |
Hmm, so the latest version of the code also failed. And I see why... etcd has a unix version of the rename code (https://github.com/coreos/etcd/blob/master/wal/wal_unix.go) and a windows version (https://github.com/coreos/etcd/blob/master/wal/wal_windows.go) which works great when you're running a windows version of the binary. But in this case we're running on linux but accessing a windows file system. I'm not sure that I have an easy solution to this. |
@GrahamDumpleton @jorgemoralespou another option for your wrapper on Windows would be to run with the unix file system and copy the data to/from the user's file system when starting/stopping the cluster. |
@csrwong luckily bash version dies not support Windows, but in any case I don't think this is a good solution but a poor's man hack to something you had not considered. |
@jorgemoralespou I didn't dig deep enough into the etcd code to understand why it needs to do this initial rename. However, it looks like after the data is initialized, no other rename occurs. Another hack that occurred to me was to do an initial run to initialize the data directory inside the container, stop the container and copy the data directory out to the windows host directory. Then run with the --host-data-dir argument as usual. |
@csrwng that would be an amazing user experience 😂😂😂
El 24 ene. 2017 18:33, "Cesar Wong" <[email protected]> escribió:
… @jorgemoralespou <https://github.com/jorgemoralespou> I didn't dig deep
enough into the etcd code to understand why it needs to do this initial
rename. However, it looks like after the data is initialized, no other
rename occurs. Another hack that occurred to me was to do an initial run to
initialize the data directory inside the container, stop the container and
copy the data directory out to the windows host directory. Then run with
the --host-data-dir argument as usual.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12602 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEyDhY2veqBbXfhN61S8AHSLAewsBudks5rVjWLgaJpZM4LqiV7>
.
|
with oc 1.5.0.alpha.2 on Windows 10 / Docker 1.13.0, if i do this: |
Problem also occurs in 1.4.1 after backport for path issue in #12601. So WIndows also unsupported by 1.4.X if want to use persistent directories and still no choice but to use 1.3.X if want to use Windows. |
@GrahamDumpleton maybe it's worth reconsidering the approach to persistent storage on Windows. Even if we get a fix from etcd so that the linux version of etcd is able to work on a windows ntfs file system, other apps that you run on OpenShift may not work on an ntfs mount (a db for example). What about running with directories on the Docker vm and only copying data to the Windows file system afterwards for backup? |
I have a few concerns/questions about going down that path, based on ignorance of how things work more than anything else. The first is how do I specify a directory in the VM? Right now I use a path The next is where on the VM would be an appropriate place to store the PV directories? For our use case, we would need the location to be qualified by the profile name so PV's for different profiles do not clash. And finally, how can I delete the PV directories on the VM when I am destroying a profile? For As a addendum to last question, how for the builtin support you have for setting up a set of PV is someone meant to clean up a PV on the VM when |
You need to specify a directory that is not a windows directory (which is pretty much anything that's not /c/blah). In non-windows Docker, it's easy to just mount the root fs of the vm into a container and explore. However, on Windows, it looks like mounting the root doesn't work, so using /var is a safe bet. How can you explore it? Simply run a container that mounts it and take a look at what's there:
Pretty much yes, as long as it's not root ('/') as I mentioned above. I tried -v /foo:/foo and it simply creates that directory on the vm
I'd follow the pattern we already use by default, something under '/var/lib/', like: '/var/lib/profiles/[profile]/pv'
You can just run a container that mounts the parent directory and remove that directory. For example:
Same for copying it to the host drive... just create a container with a given name that mounts the directory, use
|
This is an issue that was introduced in v3.0 of etcd when they changed how they initialize their data. |
@csrwng Your workaround highlights a further obscure bug. If I do:
so that the directory exists in the VM, and then run:
so that the host data directory is using that directory from the VM, but the host config directory still comes from the Windows file system via
So it doesn't like mixing directories for data and config directories such that coming from different file systems. I was going to leave the config directory on the Windows host for now but can't because of this. Have to do even more changes down to have it inside as well, as will have to inject special scripts into the container to run as can't just copy them into the config directory on Windows host, but then run from inside of container. |
@GrahamDumpleton maybe the time to start just pushing minishift. All these problems will not exist there, and there's little push from our engineering apart from Cesar into get fixes to oc cluster. |
@GrahamDumpleton that seems like a bug in our code, will take a look |
@csrwng Hi, is there any progress on this? I'm trying to run openshift via "oc cluster up" on my Win10 laptop but having the same problem. I'm using oc v1.5.1+7b451fc. Luckily, the "--version=v1.3.2" workaround solves the wal copy permissions problem. |
@LeoLanceb I would suggest you look at my wrapper for For installation of the wrapper see: Some details of the commands arround It could do with some more documentation, which I have in email somewhere, but once installed, use:
to start up the cluster and:
to stop it. You can have multiple saved profiles, but can only run one at a time. |
I am closing this issue since we don't plan to workaround the etcd root issue. |
I'm using: VirtualBox 5.1.26 Didn't work for me using --host-data-dir (and others) :
With output:
Openshift writes to the directories /vm/... (also defined in VirtualBox) but successfully won't start. @bparees or @GrahamDumpleton : Just wondering if you would have any ideas as I've seen a couple of your conversations that touched on this problem please? Thanks. |
@glennodickson I faced the same problem with vagrant/virtualbox. I solve it by not using any shared directory (eg. windows file system / autosync folder). Just use any folder inside your virtual machine (I use my home directory: /home/vagrant/etcd-data). |
When using
--host-data-dir
option withoc cluster up
usingoc
1.5.0.alpha.2, get the error:Version
oc 1.5.0.alpha.2
Steps To Reproduce
Use
oc cluster up
with--host-data-dir
option.Current Result
Fails on startup.
Expected Result
Should startup.
The text was updated successfully, but these errors were encountered: