Skip to content

fix: [NPM] [CVEs] [v1.5] Update Ubuntu Image to 24.04 and Revert Manual NPM Linux Dockerfile Package Installations #3679

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

Open
wants to merge 10 commits into
base: release/v1.5
Choose a base branch
from

Conversation

rayaisaiah
Copy link
Contributor

@rayaisaiah rayaisaiah commented May 22, 2025

Reason for Change:
Bumps the NPM Ubuntu base image version from 20.04 to 24.04 as 20.04 is EOL and no longer supported (https://ubuntu.com/blog/ubuntu-20-04-lts-end-of-life-standard-support-is-coming-to-an-end-heres-how-to-prepare).

Reverts manual package installations made to the NPM Linux dockerfile in: #3439 and #3461. These changes were made as NPM base image (Ubuntu) did not have the updated packages installed which lead to CVEs on the base image. Ubuntu has since been patched to have the CVEs resolved so there is no need to manually install the packages at a specific version.

Trivy scan of NPM linux with changes to dockerfile:

acnpublic.azurecr.io/azure-npm:v1.5.49TestUbuntu (ubuntu 24.04)
===============================================================
Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0)

Issue Fixed:

Requirements:

Notes:

* removed all logs from npm dataplane (except error/warning logs)

* removed all logs from npm controller (except error/warning logs)

* restored logs that are ununused by current npm (v2)

* removed test files

* resolved comments

* keep log related to reconciling chain placement when the chain is not in the right place

* added bootup logs back

* Removed two more noisy logs

* Add loglevel config option when printing application insight logs

* Updated all non-error/warning logs to commented out and with a vap TODO

* fixed typo

* small typo fix

* updated configmap with loglevel

* updated default value

* added a default value for loglevel

* fixed typo in json

* removed comma

* changed loglevel to info in configmap

* add a short sleep in TestNetPolInBackgroundSkipAddAfterRemove

* test remove dataplane changes to see if race condition fixes

* Revert "test remove dataplane changes to see if race condition fixes"

This reverts commit 08697eb.

* test

* Revert "test"

This reverts commit 449c2af.

* test

* update dataplane to test if changes are flagged in race

* added stop channels to unit tests to avoid race condtiions

* add non noisy logs back

* increased time

* revert time change after RunPeriodicTasks

* test with 1000 seconds

* 5000 milliseconds

* tweaked the delay

* update to 1500 for defer

* increased to 1500

* increase to 2000

* removed kubernetes
@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 22:10
@rayaisaiah rayaisaiah added npm Related to NPM. linux labels May 22, 2025
@rayaisaiah rayaisaiah requested a review from a team as a code owner May 22, 2025 22:10
@rayaisaiah rayaisaiah requested a review from vakalapa May 22, 2025 22:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reverts previous manual version-specific package installations in the NPM Linux Dockerfile now that the Ubuntu base image has been updated to resolve the CVEs.

  • Removed explicit version constraints for libc-bin, libc6, libtasn1-6, and libgnutls30
  • Continues to install other required packages (iptables, ipset, ca-certificates) without version pinning

@rayaisaiah
Copy link
Contributor Author

/azp run Azure Container Networking PR

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Scale Test

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

2 similar comments
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah rayaisaiah changed the title revert: [NPM] [CVEs] Revert Manual NPM Linux Dockerfile Package Installations revert: [NPM] [CVEs] [v1.5] Revert Manual NPM Linux Dockerfile Package Installations May 22, 2025
@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah
Copy link
Contributor Author

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

matmerr
matmerr previously approved these changes May 23, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue May 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 23, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue May 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 24, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue May 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 25, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue May 27, 2025
@rayaisaiah rayaisaiah removed this pull request from the merge queue due to a manual request May 27, 2025
@rayaisaiah
Copy link
Contributor Author

/azp run Azure Container Networking PR

@rayaisaiah rayaisaiah enabled auto-merge May 27, 2025 17:21
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah rayaisaiah added this pull request to the merge queue May 27, 2025
@rayaisaiah rayaisaiah removed this pull request from the merge queue due to a manual request May 27, 2025
@rayaisaiah rayaisaiah added this pull request to the merge queue May 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 28, 2025
@rayaisaiah rayaisaiah changed the title revert: [NPM] [CVEs] [v1.5] Revert Manual NPM Linux Dockerfile Package Installations fix: [NPM] [CVEs] [v1.5] Revert Manual NPM Linux Dockerfile Package Installations Jun 2, 2025
@rayaisaiah rayaisaiah changed the title fix: [NPM] [CVEs] [v1.5] Revert Manual NPM Linux Dockerfile Package Installations fix: [NPM] [CVEs] [v1.5] Update Ubuntu Image to 24.04 and Revert Manual NPM Linux Dockerfile Package Installations Jun 2, 2025
@rayaisaiah
Copy link
Contributor Author

/azp run Azure Container Networking PR

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Conformance Tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah
Copy link
Contributor Author

/azp run NPM Scale Test

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rayaisaiah
Copy link
Contributor Author

Note: NPM on arm64 nodes hit the following error:
image

@@ -6,8 +6,8 @@ WORKDIR /usr/local/src
COPY . .
RUN CGO_ENABLED=0 go build -v -o /usr/local/bin/azure-npm -ldflags "-X main.version="$VERSION" -X "$NPM_AI_PATH"="$NPM_AI_ID"" -gcflags="-dwarflocationlists=true" npm/cmd/*.go

FROM mcr.microsoft.com/mirror/docker/library/ubuntu:20.04
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:24.04
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cyclonus run on the 24.04 image also failed quite a few tests (75% for first run 66% for second). because of this i think at a later time we should probably dedicate some cycles to seeing the iprule/ipset differences between the Ubuntu versions to see what is causing this drop. Maybe use Ubuntu 22.04?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Queued a run directly from the cyclonus pipeline here: https://github.com/Azure/azure-container-networking/actions/runs/15448171797

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rayaisaiah
Copy link
Contributor Author

rayaisaiah commented Jun 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux npm Related to NPM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants