hyperledger / fabric

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
15.67k stars 8.82k forks source link

Upgrade ubuntu from 20.04 to 22.04 LTS version #4967

Closed C0rWin closed 1 week ago

C0rWin commented 1 month ago

Moving container images from using Ubuntu 20.04 to Ubuntu 24.04, this is to reduce amount of vulnerabilities reported with 20.04 version, effectively from this

    i New version 1.13.0 available (installed version is 1.11.0) at https://github.com/docker/scout-cli
          ✓ SBOM of image already cached, 218 packages indexed

  Target               │  hyperledger/fabric-peer:latest  │    1C     1H     1M    10L
    digest             │  260a5496cc95                    │
  Base image           │  ubuntu:20.04                    │    0C     0H     1M    10L
  Refreshed base image │  ubuntu:20.04                    │    0C     0H     1M    10L
                       │                                  │
  Updated base image   │  ubuntu:24.04                    │    0C     0H     1M     3L
                       │                                  │                         -7

to this

    i New version 1.13.0 available (installed version is 1.11.0) at https://github.com/docker/scout-cli
          ✓ SBOM of image already cached, 213 packages indexed

    i Base image was auto-detected. To get more accurate results, build images with max-mode provenance attestations.
      Review docs.docker.com ↗ for more information.

  Target             │  hyperledger/fabric-peer:latest  │    0C     0H     1M     3L
    digest           │  bd06340d98f4                    │
  Base image         │  ubuntu:24.04                    │    0C     0H     1M     3L
  Updated base image │  ubuntu:24.10                    │    0C     0H     0M     0L
                     │                                  │                  -1     -3
C0rWin commented 1 month ago
--- FAIL: TestBlockPullerBadBlocks (10.17s)
    --- FAIL: TestBlockPullerBadBlocks/wrong_number (10.02s)
        deliver_test.go:1193: PullBlock did not complete within time
2024-08-27 19:43:17.184 UTC 133f INFO [grpc] Infof -> [transport] [client-transport 0xc00021e248] Closing: connection error: desc = "error reading from server: EOF"

doesn't seem related to my change, re-running UT job again.

denyeart commented 2 weeks ago

Github is still using 22.04 for ubuntu-latest, and is still calling 24.04 'beta' for some reason - https://github.com/actions/runner-images?tab=readme-ov-file#available-images. How do you feel about using 22.04 for a more incremental step up?

Not an issue for fabric, but for fabric-ca since it uses CGO updating to a version later than the ultimate server runs causes issues. For this reason I like to keep fabric-ca a little more behind. But I'd be comfortable with 22.04 across all the repositories.

C0rWin commented 2 weeks ago

Github is still using 22.04 for ubuntu-latest, and is still calling 24.04 'beta' for some reason - https://github.com/actions/runner-images?tab=readme-ov-file#available-images. How do you feel about using 22.04 for a more incremental step up?

Not an issue for fabric, but for fabric-ca since it uses CGO updating to a version later than the ultimate server runs causes issues. For this reason I like to keep fabric-ca a little more behind. But I'd be comfortable with 22.04 across all the repositories.

I am just fine to use 22.04 also, just feeling more secure to going with the most recent LTS. But I am ok, let's start with 22.04 and then plan switching to 24.04 later on.

C0rWin commented 2 weeks ago

@denyeart, per your suggestion, changed to 22.04.

denyeart commented 1 week ago

Thanks @C0rWin , I think we should also update in each of the github workflows under .github/workflows, right?

denyeart commented 1 week ago

Thanks @C0rWin , I think we should also update in each of the github workflows under .github/workflows, right?

I've done a separate PR - https://github.com/hyperledger/fabric/pull/4986

C0rWin commented 1 week ago

Thanks @C0rWin , I think we should also update in each of the github workflows under .github/workflows, right?

yeap

ryjones commented 1 week ago

@C0rWin I can also move -latest to 24.04, let me know

denyeart commented 1 week ago

Talked to Ry, we're just going to use fabric-ubuntu-22.04 for the time being.

denyeart commented 1 week ago

In the Makefile 22.04 is correct, merged.