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

nfs-common install issue #214

Closed
andyzhangx opened this issue Aug 12, 2020 · 15 comments · Fixed by #396 or #583
Closed

nfs-common install issue #214

andyzhangx opened this issue Aug 12, 2020 · 15 comments · Fixed by #396 or #583
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@andyzhangx
Copy link
Member

What happened:

# this is a workaround to install nfs-common and don't quit with error
RUN apt update && apt install mount nfs-common -y || true

#16 9.211 Setting up nfs-common (1:1.3.4-2.5+deb10u1) ...
#16 9.233 /var/lib/dpkg/info/nfs-common.postinst: 7: /var/lib/dpkg/info/nfs-common.postinst: ucf: not found
#16 9.233 dpkg: error processing package nfs-common (--configure):
#16 9.233  installed nfs-common package post-installation script subprocess returned error exit status 127
#16 9.234 Processing triggers for libc-bin (2.28-10) ...
#16 9.266 Errors were encountered while processing:
#16 9.266  nfs-common
#16 9.302 E: Sub-process /usr/bin/dpkg returned an error code (1)
#16 ERROR: executor failed running [/bin/sh -c apt update && apt install mount nfs-common -y]: buildkit-runc did not terminate successfully
------
 > [stage-1 6/6] RUN apt update && apt install mount nfs-common -y:
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt update && apt install mount nfs-common -y]: buildkit-runc did not terminate successfully

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

  • CSI Driver version:
  • Kubernetes version (use kubectl version):
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@andyzhangx andyzhangx added kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Aug 12, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 10, 2020
@andyzhangx
Copy link
Member Author

cc @dr0pdb

@andyzhangx andyzhangx removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 2, 2020
@dr0pdb
Copy link
Contributor

dr0pdb commented Dec 10, 2020

/assign

@dr0pdb
Copy link
Contributor

dr0pdb commented Dec 11, 2020

@andyzhangx I ran the Dockerfile locally and didn't get any error.

┌[satiwa☮MININT-UMBS8MU]-(~/.gvm/pkgsets/go1.15/global/src/sigs.k8s.io/blob-csi-driver/pkg/blobplugin)-[git://nfs-common-issue ✗]-
└> cat blob.Dockerfile
FROM us.gcr.io/k8s-artifacts-prod/build-image/debian-base-amd64:v2.1.0
RUN apt-get update && clean-install ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev wget
RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb && dpkg -i /tmp/packages-microsoft-prod.deb && apt-get update && apt install blobfuse fuse -y && rm -f /tmp/packages-microsoft-prod.deb
RUN apt remove wget -y
# this is a workaround to install nfs-common & nfs-kernel-server and don't quit with error
RUN apt update && apt install nfs-common nfs-kernel-server -y || true
LABEL maintainers="andyzhangx"
LABEL description="Azure Blob Storage CSI driver"%
┌[satiwa☮MININT-UMBS8MU]-(~/.gvm/pkgsets/go1.15/global/src/sigs.k8s.io/blob-csi-driver/pkg/blobplugin)-[git://nfs-common-issue ✗]-
└> docker build --no-cache -t andyzhangx/blobnfs:v1 -f ./blob.Dockerfile .
[+] Building 110.4s (9/9) FINISHED
 => [internal] load build definition from blob.Dockerfile                                        0.1s
 => => transferring dockerfile: 43B                                                              0.0s
 => [internal] load .dockerignore                                                                0.1s
 => => transferring context: 2B                                                                  0.0s
 => [internal] load metadata for us.gcr.io/k8s-artifacts-prod/build-image/debian-base-amd64:v2.  1.0s
 => CACHED [1/5] FROM us.gcr.io/k8s-artifacts-prod/build-image/debian-base-amd64:v2.1.0@sha256:  0.0s
 => [2/5] RUN apt-get update && clean-install ca-certificates pkg-config libfuse-dev cmake lib  67.5s
 => [3/5] RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/u  14.1s
 => [4/5] RUN apt remove wget -y                                                                 2.1s
 => [5/5] RUN apt update && apt install nfs-common nfs-kernel-server -y || true                 23.2s
 => exporting to image                                                                           2.2s
 => => exporting layers                                                                          2.1s
 => => writing image sha256:85a9d729ff0dd1075a6209f4e2f667a4817b62a2d5a9d6dd2a65f6d074e0f047     0.0s
 => => naming to docker.io/andyzhangx/blobnfs:v1

@andyzhangx
Copy link
Member Author

can you change RUN apt update && apt install nfs-common nfs-kernel-server -y || true to RUN apt update && apt install nfs-common nfs-kernel-server -y and try again?

@dr0pdb
Copy link
Contributor

dr0pdb commented Dec 12, 2020

Yeah, I was able to reproduce. I'll try to fix.

...
#8 28.33 /var/lib/dpkg/info/nfs-common.postinst: 7: /var/lib/dpkg/info/nfs-common.postinst: ucf: not found
#8 28.33 dpkg: error processing package nfs-common (--configure):
#8 28.33  installed nfs-common package post-installation script subprocess returned error exit status 127
#8 28.33 dpkg: dependency problems prevent configuration of nfs-kernel-server:
#8 28.33  nfs-kernel-server depends on nfs-common (= 1:1.3.4-2.5+deb10u1); however:
#8 28.33   Package nfs-common is not configured yet.
#8 28.33
#8 28.33 dpkg: error processing package nfs-kernel-server (--configure):
#8 28.33  dependency problems - leaving unconfigured
#8 28.33 Processing triggers for libc-bin (2.28-10) ...
#8 28.45 Errors were encountered while processing:
#8 28.45  nfs-common
#8 28.45  nfs-kernel-server
#8 28.47 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
executor failed running [/bin/sh -c apt update && apt install nfs-common nfs-kernel-server -y]: exit code: 100

@sozercan
Copy link

sozercan commented Feb 18, 2021

I was investigating why this is happening, looks like /usr/bin/ucf is a script that has a /bin/bash shebang. However, debian-slim based image does not contain bash which is why it's failing.

This is already fixed upstream in debian sid - https://metadata.ftp-master.debian.org/changelogs//main/u/ucf/ucf_3.0043_changelog

  * Bug fix: "ucf has /bin/bash shebangs but does not depend on bash",
    thanks to James Le Cuirot (Closes: #952448). It actually does not need
    bash, so this was easy to do.

But fix is not available in buster package yet.
https://metadata.ftp-master.debian.org/changelogs//main/u/ucf/ucf_3.0038+nmu1_changelog

@andyzhangx
Copy link
Member Author

not fixed

@andyzhangx andyzhangx reopened this Apr 25, 2021
@dr0pdb dr0pdb removed their assignment Apr 25, 2021
@k8s-triage-robot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 26, 2021
@sozercan
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 27, 2021
@jchauncey
Copy link

any update here?

@andyzhangx
Copy link
Member Author

any update here?

is this a blocking issue?

@jchauncey
Copy link

Ill DM you on teams about it.

@andyzhangx
Copy link
Member Author

azure file Dockerfile is already using debian-base:bullseye-v1.0.0, so maybe it's already fixed?
https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/d0bcaf51c17f32672f7135972d8860b5f57403d1/pkg/azurefileplugin/Dockerfile#L15-L21

FROM k8s.gcr.io/build-image/debian-base:bullseye-v1.0.0

ARG ARCH
COPY ./_output/${ARCH}/azurefileplugin /azurefileplugin

RUN apt update && apt-mark unhold libcap2
RUN clean-install ca-certificates cifs-utils util-linux e2fsprogs mount udev xfsprogs nfs-common

@jchauncey
Copy link

But that wont get rolled out until the next release right? Doesn't help existing images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
7 participants