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

Fix build issues #393

Merged
merged 2 commits into from
Mar 18, 2024
Merged

Fix build issues #393

merged 2 commits into from
Mar 18, 2024

Conversation

fdfzcq
Copy link
Contributor

@fdfzcq fdfzcq commented Mar 11, 2024

Same fix as GoogleCloudPlatform/gke-managed-certs@fa3e1a4

Installation of gcloud SDK fails when building driver image:

 => ERROR [stage-2 11/15] RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" |   tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && c  12.2s
------
 > [stage-2 11/15] RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" |   tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg |   apt-key --keyring /usr/share/keyrings/cloud.google.gpg  add - && apt-get update -y && apt-get install google-cloud-sdk -y:
#26 0.243 deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main
#26 0.306   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#26 0.306                                  Dload  Upload   Total   Spent    Left  Speed
100  2659  100  2659    0     0   5318      0 --:--:-- --:--:-- --:--:--  5404
#26 0.835 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
#26 1.069 OK
#26 1.559 Hit:1 http://deb.debian.org/debian bullseye InRelease
#26 1.559 Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
#26 1.575 Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
#26 1.930 Get:4 http://packages.cloud.google.com/apt cloud-sdk InRelease [1616 B]
#26 6.520 Err:5 http://packages.cloud.google.com/apt cloud-sdk/main amd64 Packages
#26 6.520   502  Bad Gateway [IP: 142.250.74.110 80]
#26 6.696 Err:6 http://packages.cloud.google.com/apt cloud-sdk/main all Packages
#26 6.696
#26 6.778 Fetched 1616 B in 5s (301 B/s)
#26 6.778 Reading package lists...
#26 9.053 W: Failed to fetch http://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages  502  Bad Gateway [IP: 142.250.74.110 80]
#26 9.054 W: Failed to fetch http://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-all/Packages
#26 9.054 W: Some index files failed to download. They have been ignored, or old ones used instead.
#26 9.170 Reading package lists...
#26 11.46 Building dependency tree...
#26 11.92 Reading state information...
#26 12.21 E: Unable to locate package google-cloud-sdk

@paulosjca paulosjca self-assigned this Mar 13, 2024
@paulosjca paulosjca added bug Something isn't working release notes: yes Indicates that PR needs to be in release notes labels Mar 13, 2024
Copy link
Collaborator

@paulosjca paulosjca left a comment

Choose a reason for hiding this comment

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

The package name has changed for newer releases. I would take the command from the location below (with google-cloud-cli instead of google-cloud-sdk), and combine it into a single RUN command:

https://cloud.google.com/sdk/docs/install-sdk#deb

The end result would be something like this:

RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
  tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
  curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
  gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
  apt-get update -y && apt-get install google-cloud-cli -y

@fdfzcq
Copy link
Contributor Author

fdfzcq commented Mar 18, 2024

Thank you! @paulosjca I made a fix now

@paulosjca paulosjca self-requested a review March 18, 2024 09:48
@paulosjca paulosjca merged commit 0f86cc0 into grpc:master Mar 18, 2024
1 of 2 checks passed
paulosjca pushed a commit to paulosjca/test-infra that referenced this pull request Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release notes: yes Indicates that PR needs to be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants