-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat: Add kubernetes daemonsets for fluentd 1.17 #36618
base: main
Are you sure you want to change the base?
Conversation
8094e34
to
9ea59b6
Compare
Gen AI suggestions to solve the build error: Looking at the build output, I actually don't see any errors - the build appears to have completed successfully. Let me break down what I see: • Detected Error: None - the build completed successfully
• Suggested Fix: No fix needed - the build is working as intended • Explanation: The output shows:
• Additional Notes:
• References: N/A - since there's no error to resolve If you're seeing a different error in the CI system, please share that specific error message, as the build output provided shows a successful build completion. |
5184c78
to
9203cb4
Compare
Gen AI suggestions to solve the build error: • Detected Error: • Error Category: Configuration • Failure Point: Package scanning phase when looking for binary dependencies • Root Cause Analysis: The build system expects to find the fluentd executable in usr/bin/fluentd, but it's not being installed to the correct location during the build process. This is likely because the bundle install is putting the executable in the vendor/bundle directory instead of the standard system path. • Suggested Fix: Add a step to copy the fluentd executable to the correct location in the pipeline: pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Existing steps...
# Create bin directory and copy fluentd executable
mkdir -p ${{targets.contextdir}}/usr/bin
cp ${{targets.contextdir}}/fluentd/vendor/bundle/ruby/3.2.0/bin/fluentd ${{targets.contextdir}}/usr/bin/fluentd • Explanation: The fix ensures the fluentd executable is placed in the standard system path (usr/bin) where the package scanner expects to find it. This maintains proper filesystem hierarchy standard (FHS) compliance while preserving the bundled gems in the vendor directory. • Additional Notes:
• References: |
Gen AI suggestions to solve the build error: • Detected Error: "Failed to open usr/bin/fluentd: open usr/bin/fluentd: no such file or directory" • Error Category: Build Configuration • Failure Point: Package scanning phase, specifically when looking for executable files • Root Cause Analysis: The build system expects to find the fluentd executable in usr/bin/fluentd, but it's not being installed there during the build process. This is because the bundle install is putting the executables in the vendor/bundle directory instead of the standard system locations. • Suggested Fix: Add a step in the pipeline to copy the fluentd executable to the correct location: pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Previous steps...
# Create bin directory and copy fluentd executable
mkdir -p ${{targets.contextdir}}/usr/bin
cp ${{targets.contextdir}}/fluentd/vendor/bundle/ruby/3.3.0/bin/fluentd ${{targets.contextdir}}/usr/bin/fluentd • Explanation: The build is successfully installing fluentd and its dependencies, but the executable needs to be in the standard system path (usr/bin) for the package scanner to find it. This fix ensures the executable is properly placed where the system expects it. • Additional Notes:
• References: |
Gen AI suggestions to solve the build error: • Detected Error: "Failed to open usr/bin/fluentd: open usr/bin/fluentd: no such file or directory" • Error Category: Configuration • Failure Point: Package scanning phase when looking for binary files • Root Cause Analysis: The build system is expecting to find the fluentd executable in usr/bin/fluentd, but it's not being installed there during the build process. This is likely because the bundle install is being done to a custom path but the executable isn't being properly symlinked. • Suggested Fix: - uses: bundle/copy
with:
directory: ${{targets.contextdir}}/fluentd/vendor/bundle
name: fluentd
- runs: |
mkdir -p ${{targets.contextdir}}/usr/bin
ln -s /fluentd/vendor/bundle/ruby/3.2.0/bin/fluentd ${{targets.contextdir}}/usr/bin/fluentd • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Failed to open usr/bin/fluentd: open usr/bin/fluentd: no such file or directory" • Error Category: Configuration • Failure Point: Package scanning phase when looking for binary files • Root Cause Analysis: The build system expects to find the fluentd binary in usr/bin/fluentd, but it's not being installed to the correct location during the build process. This is likely because the package configuration isn't properly setting up the binary installation path. • Suggested Fix: pipeline:
- uses: git-checkout
# ... existing checkout config ...
# Add this new step after bundle install
- runs: |
mkdir -p ${{targets.destdir}}/usr/bin
ln -s /fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd ${{targets.destdir}}/usr/bin/fluentd • Explanation:
• Additional Notes:
• References: |
Gen AI suggestions to solve the build error: • Detected Error: "Failed to open usr/bin/fluentd: open usr/bin/fluentd: no such file or directory" • Error Category: Configuration • Failure Point: Package scanning phase when looking for binary files • Root Cause Analysis: The build system expects to find the fluentd binary in usr/bin/fluentd, but it's not being installed to the correct location during the build process. This is likely because the bundle install is placing executables in the vendor/bundle directory instead of the standard system binary location. • Suggested Fix: pipeline:
# ... existing steps ...
- runs: |
mkdir -p ${{targets.destdir}}/usr/bin
ln -s /fluentd/vendor/bundle/ruby/3.3.0/bin/fluentd ${{targets.destdir}}/usr/bin/fluentd • Explanation: The fix creates the expected usr/bin directory structure and creates a symlink to the fluentd executable from its installed location in the vendored gems directory to the standard system binary location. This satisfies the package scanner's expectation while maintaining the bundled gem structure. • Additional Notes:
• References: |
Gen AI suggestions to solve the build error: • Detected Error: "Failed to open usr/bin/fluentd: open usr/bin/fluentd: no such file or directory" • Error Category: Configuration • Failure Point: Package scanning phase when looking for binary files • Root Cause Analysis: The build system expects to find the fluentd binary in usr/bin/fluentd, but it's not being installed to the correct location during the build process. This is likely because the package configuration isn't specifying where to install the binary. • Suggested Fix: Add an installation step in the pipeline to copy the fluentd binary to the correct location: pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Previous steps...
# Create binary directory and install fluentd
mkdir -p ${{targets.contextdir}}/usr/bin
ln -s /fluentd/vendor/bundle/ruby/$(basename $(gem env home))/bin/fluentd ${{targets.contextdir}}/usr/bin/fluentd • Explanation: The error occurs because Melange expects certain files to be in standard system locations. By creating the usr/bin directory and linking the fluentd binary there, we satisfy the package scanner's requirements while maintaining the correct runtime paths. • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step during gem fetching • Root Cause Analysis: The build is failing due to a network timeout while trying to fetch Ruby gems from rubygems.org. This is likely due to either temporary network issues or restrictive timeout settings. • Suggested Fix:
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Configure bundler with longer timeouts and retries
bundle config connect_timeout 60
bundle config retry 3
bundle config specific_platform true
# Rest of the existing bundle commands...
bundle config silence_root_warning true
bundle config set path ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config set clean 'true'
bundle config set deployment 'true'
bundle install --gemfile ./Gemfile --jobs $(nproc) • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: Looking at the build output, I don't actually see an error - the build appears to have completed successfully. The output shows:
The output includes normal scanning of shared object dependencies and package generation for all the fluentd variants (elasticsearch7, azureblob, cloudwatch, etc.). • Detected Error: None found - build completed successfully
If you're seeing a specific error that's not shown in this output, please provide that error message so I can help diagnose the actual issue. |
Signed-off-by: RJ Sampson <[email protected]>
9203cb4
to
388857e
Compare
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step during subpackage build for azureblob variant • Root Cause Analysis: The build is failing due to network connectivity issues when trying to fetch Ruby gems from rubygems.org. This appears to be a timeout issue during gem installation. • Suggested Fix:
runs: |
# Add retry logic for bundle install
for i in $(seq 1 3); do
bundle install --gemfile ./Gemfile --jobs $(nproc) && break || {
if [ $i -lt 3 ]; then
echo "Bundle install attempt $i failed! Retrying..."
sleep 5
else
echo "Bundle install failed after 3 attempts!"
exit 1
fi
}
done
environment:
contents:
packages:
- ...existing packages...
variables:
BUNDLER_TIMEOUT: "60"
BUNDLE_RETRY: "3" • Explanation: Network issues during gem installation are common in CI environments. Adding retry logic with backoff helps handle temporary network glitches, while explicit timeout configuration gives more time for large dependencies to download. • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step during gem fetching • Root Cause Analysis: The build is failing due to a network timeout when trying to fetch Ruby gems from rubygems.org. This is typically caused by either network connectivity issues or temporary rubygems.org service disruptions. • Suggested Fix:
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Configure bundler with retry
bundle config set --local retry 3
bundle config set --local timeout 60
# Rest of your existing bundle commands...
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
bundle config mirror.https://rubygems.org https://rubygems.pkg.github.com
# Rest of your existing bundle commands... • Explanation:
• Additional Notes:
• References:
|
now Signed-off-by: RJ Sampson <[email protected]>
7eb15d3
to
3ce809a
Compare
Gen AI suggestions to solve the build error: • Detected Error: "linter 'object' failed on package 'ruby3.1-fluentd-kubernetes-daemonset-1.17-kinesis': package contains intermediate object file 'fluentd/vendor/bundle/ruby/3.1.0/gems/cool.io-1.9.0/ext/cool.io/buffer.o'" • Error Category: Build Configuration • Failure Point: Package linting phase during the build process • Root Cause Analysis: The build process is including intermediate compilation objects (.o files) in the final package, which is not allowed by the Wolfi OS packaging guidelines. These object files are artifacts from the compilation process that should not be included in the final package. • Suggested Fix: Add a cleanup step in the pipeline to remove object files after gem installation: pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# ... existing bundle install commands ...
# Add cleanup of object files after bundle install
find ${{targets.contextdir}}/fluentd/vendor/bundle -name "*.o" -type f -delete
find ${{targets.contextdir}}/fluentd/vendor/bundle -name "*.lo" -type f -delete • Explanation: The cleanup step removes intermediate compilation artifacts while keeping the necessary compiled shared objects (.so files) needed for the gems to function. This satisfies the Wolfi OS packaging requirements while maintaining package functionality. • Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "linter 'object' failed on package 'ruby3.2-fluentd-kubernetes-daemonset-1.17-kinesis': package contains intermediate object file 'fluentd/vendor/bundle/ruby/3.2.0/gems/llhttp-ffi-0.5.0/ext/aarch64-darwin/llhttp/api.o'" • Error Category: Build Configuration • Failure Point: Package linting phase, specifically the object file linter • Root Cause Analysis: The package includes compiled object files for a different architecture (aarch64-darwin) that shouldn't be included in the final package. • Suggested Fix: pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# ... existing build steps ...
# Add cleanup step before packaging
find ${{targets.contextdir}}/fluentd/vendor/bundle -name "*.o" -type f -delete • Explanation:
• Additional Notes:
• References:
|
deddbdf
to
a9b2f2f
Compare
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step during gem fetching • Root Cause Analysis: The build is failing due to a network timeout while trying to fetch Ruby gems from rubygems.org. This is commonly caused by temporary network issues or restrictive timeouts. • Suggested Fix:
runs: |
# Add environment variables for bundler
export BUNDLE_RETRY=5
export BUNDLE_JOBS=4
export BUNDLE_TIMEOUT=60
# Install bundle with modified settings
bundle config silence_root_warning true
bundle config set path ${{targets.contextdir}}/fluentd/vendor/bundle
bundle config set clean 'true'
bundle config set deployment 'true'
bundle install --gemfile ./Gemfile --jobs $(nproc) --retry 5 --timeout 60 • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step when fetching gem metadata • Root Cause Analysis: The build is failing due to a network timeout while attempting to fetch Ruby gems from rubygems.org. This is likely due to either network connectivity issues or timeout settings being too restrictive. • Suggested Fix:
bundle install --gemfile ./Gemfile --jobs $(nproc) --retry 5 --timeout 60
- runs: |
bundle config mirror.https://rubygems.org https://rubygems.org
bundle config --local frozen false
bundle config --local build.nokogiri --use-system-libraries
environment:
contents:
packages:
- ca-certificates
- openssl
# ... existing packages ... • Explanation:
• Additional Notes:
• References:
|
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step during package build • Root Cause Analysis: The build is failing due to a network timeout when trying to fetch Ruby gems from rubygems.org. This is likely due to either temporary network issues or restrictive timeout settings. • Suggested Fix:
runs: |
bundle config set retry 5
bundle config set timeout 60
# Rest of your existing bundle commands...
bundle install --gemfile ./Gemfile --jobs $(nproc) --retry 5 --timeout 60
source 'https://rubygems.org' • Explanation:
• Additional Notes:
• References:
|
37a7600
to
cf6dd1b
Compare
Gen AI suggestions to solve the build error: • Detected Error: "Network error while fetching https://rubygems.org/quick/Marshal.4.8/fluentd-1.17.1.gemspec.rz (Failed to open TCP connection to rubygems.org:443 (execution expired))" • Error Category: Network/Dependency • Failure Point: Bundle install step during gem fetching • Root Cause Analysis: The build is failing due to a network timeout while trying to fetch Ruby gems from rubygems.org. This appears to be a temporary network connectivity issue or timeout during the gem installation process. • Suggested Fix:
pipeline:
- working-directory: ./docker-image/v${{vars.fluentdMM}}/debian-${{range.key}}
runs: |
# Install bundle with increased timeouts and retries
bundle config connect_timeout 30
bundle config timeout 60
for i in $(seq 1 3); do
bundle install --gemfile ./Gemfile --jobs $(nproc) --retry 5 && break || sleep 15
done • Explanation:
• Additional Notes:
• References:
|
Signed-off-by: RJ Sampson <[email protected]>
cf6dd1b
to
cc3b677
Compare
Signed-off-by: RJ Sampson <[email protected]>
Adds Kubernetes DaemonSets for fluentd. Note that fluentd is vendored in the bundle so is not included as a package dependency. Upstream includes two separate installations of fluentd which is not necessary. Add for all supported Ruby versions (3.1-3.3) and 3.4 (in preview)
There isn't value in splitting away the entrypoint scripts or configuration for each so those have been bundled together