Skip to content

[Bugfix] Adding mooncake library path to fix error: server failed to start with mooncake connector#6955

Closed
wjunLu wants to merge 1 commit intovllm-project:mainfrom
wjunLu:fix-mooncake-error
Closed

[Bugfix] Adding mooncake library path to fix error: server failed to start with mooncake connector#6955
wjunLu wants to merge 1 commit intovllm-project:mainfrom
wjunLu:fix-mooncake-error

Conversation

@wjunLu
Copy link
Copy Markdown
Collaborator

@wjunLu wjunLu commented Mar 3, 2026

What this PR does / why we need it?

This pull request addresses a critical startup failure within Dockerized environments related to the mooncake connector. By explicitly setting the LD_LIBRARY_PATH environment variable in the Dockerfiles, it ensures that the necessary shared libraries for mooncake are correctly located, allowing the server to initialize without errors. This fix is applied consistently across various Dockerfile configurations to provide a robust solution.

Related Issue:

Does this PR introduce any user-facing change?

How was this patch tested?

Signed-off-by: wjunLu <wjunlu217@gmail.com>
@wjunLu wjunLu requested a review from wangxiyuan as a code owner March 3, 2026 08:36
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical startup failure within Dockerized environments related to the mooncake connector. By explicitly setting the LD_LIBRARY_PATH environment variable in the Dockerfiles, it ensures that the necessary shared libraries for mooncake are correctly located, allowing the server to initialize without errors. This fix is applied consistently across various Dockerfile configurations to provide a robust solution.

Highlights

  • Mooncake Library Path Fix: Added the ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib instruction to multiple Dockerfiles. This change ensures that the mooncake library can be correctly located by the system, resolving a startup error where the "server failed to start with mooncake connector".

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Dockerfile
    • Added ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib to ensure mooncake libraries are found.
  • Dockerfile.a3
    • Added ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib to ensure mooncake libraries are found.
  • Dockerfile.a3.openEuler
    • Added ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib to ensure mooncake libraries are found.
  • Dockerfile.openEuler
    • Added ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib to ensure mooncake libraries are found.
Activity
  • No specific activity (comments, reviews, etc.) was provided in the context for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds /usr/local/lib to LD_LIBRARY_PATH in four Dockerfiles to resolve a runtime error with the mooncake connector. The change is correct in principle. My feedback focuses on making the ENV instruction more robust to avoid potential issues if LD_LIBRARY_PATH is not previously set.

In accordance with the repository's style guide for pull request summaries, I've drafted a suggested title and summary to improve clarity and consistency:

Suggested PR Title:

[CI][BugFix] Add mooncake library path to Docker images

Suggested PR Summary:

### What this PR does / why we need it?
This pull request fixes an issue where the server fails to start with the mooncake connector due to the mooncake library not being found. This is resolved by adding `/usr/local/lib` to the `LD_LIBRARY_PATH` environment variable in the Docker images. This ensures that the dynamically linked mooncake libraries, which are installed in `/usr/local/lib`, are located by the linker at runtime.

This change is applied to the following Dockerfiles:
- `Dockerfile`
- `Dockerfile.a3`
- `Dockerfile.a3.openEuler`
- `Dockerfile.openEuler`

### Does this PR introduce _any_ user-facing change?
No, this change only affects the build process and runtime environment of the Docker containers.

### How was this patch tested?
The change can be verified by building the Docker images and running the server with the mooncake connector to confirm that the startup error is resolved.

Comment thread Dockerfile
rm -rf /var/lib/apt/lists/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib

Comment thread Dockerfile.a3
rm -rf /var/lib/apt/lists/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib

Comment thread Dockerfile.a3.openEuler
rm -rf /var/cache/yum/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib

Comment thread Dockerfile.openEuler
rm -rf /var/cache/yum/*

# To keep mooncake can be found
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.

A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib

@MengqingCao
Copy link
Copy Markdown
Collaborator

closing cause redundant with #6976

@MengqingCao MengqingCao closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants