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

Add ENA driver version in version info file #2171

Merged
merged 3 commits into from
Mar 4, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion templates/shared/provisioners/generate-version-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ fi
OUTPUT_FILE="$1"

# packages
sudo rpm --query --all --queryformat '\{"%{NAME}": "%{VERSION}-%{RELEASE}"\}\n' | jq --slurp --sort-keys 'add | {packages:(.)}' > "$OUTPUT_FILE"
packages=$(sudo rpm --query --all --queryformat '\{"%{NAME}": "%{VERSION}-%{RELEASE}"\}\n' | jq --slurp --sort-keys 'add | {packages:(.)}')
# Get ENA driver version
network_interface=$(sudo ip link show | awk -F': ' '$2 ~ /^eth|^ens/ {print $2}' | head -n1)
ena_version=$(sudo ethtool -i $network_interface | awk '/version:/ {print $2}')
echo "$packages" | jq --arg ena_version "$ena_version" '.packages["ena"] = $ena_version' > $OUTPUT_FILE
Copy link
Member

@cartermckinnon cartermckinnon Mar 4, 2025

Choose a reason for hiding this comment

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

We should reserve the packages section for things actually installed by the package manager. Let's create a new section for kernel modules if we want to add ena.

You can also grab the version of the kmod more easily with modinfo ena.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is much easier! Using modinfo to get ena driver version and also create a kernel_modules section in version info file.
The output will looks like

{ "packages": { ... }, "kernel_modules": { "ena": "2.13.2g" }, "binaries": { "kubelet": "v1.31.5-eks-5d632ec", "awscli": "2.24.17" } }


# binaries
KUBELET_VERSION=$(kubelet --version | awk '{print $2}')
Expand Down
Loading