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

[build] clear dpkg cache and update sources #3732

Closed
wants to merge 4 commits into from

Conversation

yxieca
Copy link
Contributor

@yxieca yxieca commented Nov 9, 2019

- What I did

Fixes: #119

This change is intended to fix the issue with dpkg-query during build process.

The symptom is dpkg-query failed to open package info file, usually /var/lib/dpkg/updates/000?

This issue happens rarely. Not sure if this change has fully addressed the issue. So far my continuous build test didn't fail.

Signed-off-by: Ying Xie ying.xie@microsoft.com

- How I did it
https://ubuntuforums.org/showthread.php?t=872210

- How to verify it
I made change in 201811 branch initially. Continuous build test was executed there.

This change is intended to fix the issue with dpkg-query during build
process.

The symptom is dpkg-query failed to open package info file, usually
/var/lib/dpkg/updates/000?

This issue happens rarely. Not sure if this change has fully addressed
the issue. So far my continuous build test didn't fail.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@lguohan
Copy link
Collaborator

lguohan commented Nov 9, 2019

looks like there is some build issue with this pr.

@@ -363,3 +363,4 @@ RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/d
RUN echo "deb [arch={{ CONFIGURED_ARCH }}] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN apt-get -y -o Acquire::Check-Valid-Until=false install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk
RUN dpkg --clear-avail; apt-get update
Copy link
Contributor

@jleveque jleveque Nov 9, 2019

Choose a reason for hiding this comment

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

This might fix the build:

Suggested change
RUN dpkg --clear-avail; apt-get update
RUN dpkg --clear-avail; apt-get -o Acquire::Check-Valid-Until=false update

One question, though: would it not work to replace line 364 with this line instead of adding this line here?

Also, do we even still need to build the Jessie-based sonic-slave container any more in the master branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Joe!

I should have tested with master branch before creating the PR. There is enough difference between 201811 and master causing me unable to cherry-pick directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry. Looks like I missed something again in the second try.

Copy link
Contributor

Choose a reason for hiding this comment

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

Strange. I wouldn't think you'd need to make the same change for the Stretch container...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding is that the change is to cleanup the environment.

Master might not need Jessie change and 201811 might not need stretch change. But change both anyways to keep it consistent.

Copy link
Contributor

Choose a reason for hiding this comment

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

Clarified offline and you have already made the change, but for posterity, I meant that the -o Acquire::Check-Valid-Until=false option should not be needed when building the Stretch container because there are currently no expired repos (whereas the "jessie-backports" repo is no longer maintained and they are no longer updating its "Valid-Until" date.

@yxieca
Copy link
Contributor Author

yxieca commented Nov 11, 2019

retest mellanox please

@yxieca
Copy link
Contributor Author

yxieca commented Nov 11, 2019

retest vs please

1 similar comment
@yxieca
Copy link
Contributor Author

yxieca commented Nov 12, 2019

retest vs please

@yxieca
Copy link
Contributor Author

yxieca commented Nov 13, 2019

Turns out that this change didn't fix the issue.

Joe and I discussed. The issue might have come from 2 possible sources:

  1. During SONiC build, we are changing build environment by installing new packages in order to build dependent packages. The constant changing of the environment makes it hard to clean up the dpkg cache.
  2. There is an impression that we only hit this issue while building with multiple concurrent jobs. It is possible that 2 jobs were stomping on each other's toes.

@yxieca yxieca closed this Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants