Skip to content
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

[Bug]: fvm switch fails on some systems with running local cluster #3765

Closed
digikata opened this issue Dec 8, 2023 · 4 comments
Closed

[Bug]: fvm switch fails on some systems with running local cluster #3765

digikata opened this issue Dec 8, 2023 · 4 comments
Labels
bug Something isn't working help wanted Good issue for community involvement no-stale Opt-out of closing issue due to no activity

Comments

@digikata
Copy link
Contributor

digikata commented Dec 8, 2023

What happened
fvm switch in a docker container failed with "Error: Text file busy (os error 26)"

Expected behavior
fvm switch or fvm update successfully switches versions

Describe the setup
Running fluvio and fvm switch on some os environments with a running cluster can lead to this error.

  • Macos: this behavior does not occur
  • docker: this bug occurs
  • linux: this bug can occur

How to reproduce it (as minimally and precisely as possible)

  1. Install fvm & fluvio
  2. fvm install latest
  3. fluvio cluster start Starts a local cluster
  4. fvm switch stable
    Causes an "Error: Text file busy (os error 26)"

Additional context
A workaround is to shut down the local fluvio cluster, switch versions, then restart. On switch for linux environments, the binaries may need to be unlinked before copying new binaries of the switch-to version.

An intermediate fix is to detect running instances and ask them to shutdown, but this is likely more complex than doing an unlnk.

@digikata digikata added the bug Something isn't working label Dec 8, 2023
@digikata
Copy link
Contributor Author

digikata commented Dec 8, 2023

Dockerfile for refernce:

FROM ubuntu:20.04

ENV TERM linux
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update
RUN apt-get install -y curl unzip

WORKDIR /fluvio

RUN curl -fsS https://hub.infinyon.cloud/install/install.sh | bash
RUN echo 'source "${HOME}/.fvm/env"' >> ~/.bashrc

CMD ["/bin/bash"]

## Instruction
##
## >> Build and Run Dockerfile
## docker build --tag fluvio .
## docker run --name fluvio -d fluvio sleep infinity
##
## >> Login into the container
## docker exec -ti fluvio bash 

Copy link

github-actions bot commented Feb 6, 2024

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2024
@digikata digikata added the no-stale Opt-out of closing issue due to no activity label Feb 16, 2024
@digikata digikata reopened this Feb 16, 2024
@digikata digikata added the help wanted Good issue for community involvement label Feb 16, 2024
@digikata
Copy link
Contributor Author

For linux, probably need to std:fs::remove_file to cause an unlink first on binaries in the .flvuio/bin directory, then copy new versions in.

see https://stackoverflow.com/questions/16764946/what-generates-the-text-file-busy-message-in-unix

@digikata digikata changed the title [Bug]: fvm switch fails in a docker container with running local cluster [Bug]: fvm switch fails on some systems with running local cluster Feb 16, 2024
digikata added a commit that referenced this issue Mar 21, 2024
digikata added a commit that referenced this issue Mar 21, 2024
github-actions bot pushed a commit that referenced this issue Mar 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 22, 2024
@digikata
Copy link
Contributor Author

Fix tested and worked on Linux and within a linux docker env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good issue for community involvement no-stale Opt-out of closing issue due to no activity
Projects
None yet
Development

No branches or pull requests

1 participant