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

The docker image docker-platform-monitory build failed for dpkg package dependency issue #10952

Closed
xumia opened this issue May 27, 2022 · 0 comments
Assignees
Labels
Build Triaged this issue has been triaged

Comments

@xumia
Copy link
Collaborator

xumia commented May 27, 2022

Description

Failed to build target/docker-platform-monitor.gz, caused by the dpkg package dependency issue.

https://dev.azure.com/mssonic/build/_build/results?buildId=103226&view=logs&j=d37bc48d-29a0-534f-a1dc-3d699deb17a6&t=933dfdc6-d074-504d-ee66-71743fd9ae4e

Steps to reproduce the issue:

  1. Checkout the commit 9b84294
  2. Update the submodules
  3. make configure PLATFORM=mellanox SONIC_VERSION_CONTROL_COMPONENTS='deb,py2,py3,web,git,docker'
  4. make SONIC_VERSION_CONTROL_COMPONENTS='deb,py2,py3,web,git,docker' target/docker-platform-monitor.gz

Describe the results you received:

Step 10/35 : RUN apt-get update &&       apt-get install -y          build-essential         python3-dev             ipmitool                librrd8                 librrd-dev              rrdtool                 python-smbus            python3-smbus           dmidecode               i2c-tools               psmisc                  python3-jsonschema         libpci3
 ---> Running in f59182677095
Hit:1 http://packages.trafficmanager.net/debian/debian buster InRelease
Hit:2 http://packages.trafficmanager.net/debian/debian buster-updates InRelease
Hit:3 http://debian-archive.trafficmanager.net/debian buster InRelease
Hit:4 http://packages.trafficmanager.net/debian/debian buster-backports InRelease
Hit:5 http://debian-archive.trafficmanager.net/debian-security buster/updates InRelease
Hit:6 http://debian-archive.trafficmanager.net/debian buster-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Describe the results you expected:

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

One of a workaround for it is to upgrade the packages:
#10732
It is upgrade the package libdpkg-perl to 1.19.8 to fix it, see files/build/versions/dockers/docker-platform-monitor/versions-deb-buster

Another option, it is to add the package dpkg-dev=1.19.7 to files/build/versions/dockers/docker-platform-monitor/versions-deb-buster. We should support it automatically.

Analysis

The issue is caused by not freezing all the versions in the docker image. The package pkg-dev is not in the version file, but there is an intermediate package upgrade for the package. We only keep the diff version in the version file, and generate the version preference file in /etc/apt/preference.d.

root@b63ca30e5c5c:/# apt-get install dpkg-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dpkg-dev : Depends: libdpkg-perl (= 1.19.8) but 1.19.7 is to be installed
E: Unable to correct problems, you have held broken packages.

It tried to install the dpkg-dev=1.19.8 as below. Add the dpkg-dev=1.19.7 in the preference file, will fix it.

$ grep libdpkg-perl files/build/versions/dockers/docker-platform-monitor/ -r
files/build/versions/dockers/docker-platform-monitor/versions-deb-buster:libdpkg-perl==1.19.7

Options solutions:

  1. Generate all the version in the version file files/build/versions/dockers/docker-platform-monitor/versions-deb-buster
  2. Generate the preference file based on the base image versions + the diff versions (override the base image versions if the same package).

For the version preference setting, both of the solutions are the same, the option 2 keeps the version file small, less redundant version info.

@xumia xumia self-assigned this May 27, 2022
@xumia xumia changed the title Dpkg package dependency issue The docker image docker-platform-monitory build failed for dpkg package dependency issue May 27, 2022
@lguohan lguohan added Build Triaged this issue has been triaged labels May 27, 2022
xumia added a commit that referenced this issue May 30, 2022
… not specified (#10971)

Why I did it
It is to fix issue: #10952
[Build]: Support to use the base image version when a package version not specified
xumia added a commit to xumia/sonic-buildimage-1 that referenced this issue May 30, 2022
… not specified (sonic-net#10971)

Why I did it
It is to fix issue: sonic-net#10952
[Build]: Support to use the base image version when a package version not specified
xumia added a commit to xumia/sonic-buildimage-1 that referenced this issue May 30, 2022
… not specified (sonic-net#10971)

Why I did it
It is to fix issue: sonic-net#10952
[Build]: Support to use the base image version when a package version not specified
xumia added a commit to xumia/sonic-buildimage-1 that referenced this issue May 30, 2022
… not specified (sonic-net#10971)

Why I did it
It is to fix issue: sonic-net#10952
[Build]: Support to use the base image version when a package version not specified
xumia added a commit that referenced this issue May 31, 2022
… not specified (#10971) (#10974)

Why I did it
It is to fix issue: #10952
[Build]: Support to use the base image version when a package version not specified
xumia added a commit that referenced this issue May 31, 2022
… not specified (#10971) (#10975)

Why I did it
It is to fix issue: #10952
[Build]: Support to use the base image version when a package version not specified
xumia added a commit that referenced this issue May 31, 2022
… not specified (#10971) (#10976)

Why I did it
It is to fix issue: #10952
[Build]: Support to use the base image version when a package version not specified
@xumia xumia closed this as completed Jun 2, 2022
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this issue Jun 20, 2022
…anch

Related work items: #52, #71, #73, #75, #77, sonic-net#1306, sonic-net#1588, sonic-net#1991, sonic-net#2031, sonic-net#2040, sonic-net#2053, sonic-net#2066, sonic-net#2069, sonic-net#2087, sonic-net#2107, sonic-net#2110, sonic-net#2112, sonic-net#2113, sonic-net#2117, sonic-net#2124, sonic-net#2125, sonic-net#2126, sonic-net#2128, sonic-net#2130, sonic-net#2131, sonic-net#2132, sonic-net#2133, sonic-net#2134, sonic-net#2135, sonic-net#2136, sonic-net#2137, sonic-net#2138, sonic-net#2139, sonic-net#2140, sonic-net#2143, sonic-net#2158, sonic-net#2161, sonic-net#2233, sonic-net#2243, sonic-net#2250, sonic-net#2254, sonic-net#2260, sonic-net#2261, sonic-net#2267, sonic-net#2278, sonic-net#2282, sonic-net#2285, sonic-net#2288, sonic-net#2289, sonic-net#2292, sonic-net#2294, sonic-net#8887, sonic-net#9279, sonic-net#9390, sonic-net#9511, sonic-net#9700, sonic-net#10025, sonic-net#10322, sonic-net#10479, sonic-net#10484, sonic-net#10493, sonic-net#10500, sonic-net#10580, sonic-net#10595, sonic-net#10628, sonic-net#10634, sonic-net#10635, sonic-net#10644, sonic-net#10670, sonic-net#10691, sonic-net#10716, sonic-net#10731, sonic-net#10750, sonic-net#10751, sonic-net#10752, sonic-net#10761, sonic-net#10769, sonic-net#10775, sonic-net#10776, sonic-net#10779, sonic-net#10786, sonic-net#10792, sonic-net#10793, sonic-net#10800, sonic-net#10806, sonic-net#10826, sonic-net#10839, sonic-net#10840, sonic-net#10842, sonic-net#10844, sonic-net#10847, sonic-net#10849, sonic-net#10852, sonic-net#10865, sonic-net#10872, sonic-net#10877, sonic-net#10886, sonic-net#10889, sonic-net#10903, sonic-net#10904, sonic-net#10905, sonic-net#10913, sonic-net#10914, sonic-net#10916, sonic-net#10919, sonic-net#10925, sonic-net#10926, sonic-net#10929, sonic-net#10933, sonic-net#10934, sonic-net#10937, sonic-net#10941, sonic-net#10947, sonic-net#10952, sonic-net#10953, sonic-net#10957, sonic-net#10959, sonic-net#10971, sonic-net#10972, sonic-net#10980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

2 participants