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

microdnf do not log the error when a transaction error occurs #138

Open
cmoulliard opened this issue Sep 5, 2023 · 0 comments
Open

microdnf do not log the error when a transaction error occurs #138

cmoulliard opened this issue Sep 5, 2023 · 0 comments
Labels
Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@cmoulliard
Copy link

Issue

When we execute the command: microdnf install shadow-utils, part of bash script, running as an ocp4's container, we got the following error error: Error -1 running transaction

Full log

deployment.apps "dummy" deleted
deployment.apps/dummy created
Waiting for deployment "dummy" rollout to finish: 0 of 1 updated replicas are available...
deployment "dummy" successfully rolled out
...
(microdnf:1): librhsm-WARNING **: 16:09:39.519: Found 0 entitlement certificates

(microdnf:1): librhsm-WARNING **: 16:09:39.521: Found 0 entitlement certificates
Downloading metadata...
Downloading metadata...
Downloading metadata...
Package                                                   Repository            Size
Installing:
 audit-libs-3.0.7-4.el8.x86_64                            ubi-8-baseos-rpms 125.9 kB
 basesystem-11-5.el8.noarch                               ubi-8-baseos-rpms  10.8 kB
 bash-4.4.20-4.el8_6.x86_64                               ubi-8-baseos-rpms   1.6 MB
 bzip2-libs-1.0.6-26.el8.x86_64                           ubi-8-baseos-rpms  49.1 kB
 ca-certificates-2022.2.54-80.2.el8_6.noarch              ubi-8-baseos-rpms 942.8 kB
 chkconfig-1.19.1-1.el8.x86_64                            ubi-8-baseos-rpms 203.1 kB
 coreutils-8.30-15.el8.x86_64                             ubi-8-baseos-rpms   1.3 MB
 coreutils-common-8.30-15.el8.x86_64                      ubi-8-baseos-rpms   2.1 MB
 crypto-policies-20221215-1.gitece0092.el8.noarch         ubi-8-baseos-rpms  65.6 kB
 crypto-policies-scripts-20221215-1.gitece0092.el8.noarch ubi-8-baseos-rpms  85.9 kB
 expat-2.2.5-11.el8.x86_64                                ubi-8-baseos-rpms 116.1 kB
 filesystem-3.8-6.el8.x86_64                              ubi-8-baseos-rpms   1.1 MB
 gawk-4.2.1-4.el8.x86_64                                  ubi-8-baseos-rpms   1.2 MB
 gdbm-1:1.18-2.el8.x86_64                                 ubi-8-baseos-rpms 132.8 kB
 gdbm-libs-1:1.18-2.el8.x86_64                            ubi-8-baseos-rpms  61.8 kB
 glibc-2.28-225.el8.x86_64                                ubi-8-baseos-rpms   2.3 MB
 glibc-all-langpacks-2.28-225.el8.x86_64                  ubi-8-baseos-rpms  26.8 MB
 glibc-common-2.28-225.el8.x86_64                         ubi-8-baseos-rpms   1.0 MB
 glibc-gconv-extra-2.28-225.el8.x86_64                    ubi-8-baseos-rpms   1.6 MB
 gmp-1:6.1.2-10.el8.x86_64                                ubi-8-baseos-rpms 329.2 kB
 grep-3.1-6.el8.x86_64                                    ubi-8-baseos-rpms 280.4 kB
 info-6.5-7.el8.x86_64                                    ubi-8-baseos-rpms 203.3 kB
 keyutils-libs-1.5.10-9.el8.x86_64                        ubi-8-baseos-rpms  34.8 kB
 krb5-libs-1.18.2-25.el8_8.x86_64                         ubi-8-baseos-rpms 862.6 kB
 libacl-2.2.53-1.el8.x86_64                               ubi-8-baseos-rpms  35.6 kB
 libattr-2.4.48-3.el8.x86_64                              ubi-8-baseos-rpms  27.6 kB
 libcap-2.48-5.el8_8.x86_64                               ubi-8-baseos-rpms  76.1 kB
 libcap-ng-0.7.11-1.el8.x86_64                            ubi-8-baseos-rpms  34.2 kB
 libcom_err-1.45.6-5.el8.x86_64                           ubi-8-baseos-rpms  50.6 kB
 libffi-3.1-24.el8.x86_64                                 ubi-8-baseos-rpms  38.6 kB
 libgcc-8.5.0-18.el8.x86_64                               ubi-8-baseos-rpms  83.1 kB
 libnsl2-1.2.0-2.20180605git4a062cf.el8.x86_64            ubi-8-baseos-rpms  59.1 kB
 libselinux-2.9-8.el8.x86_64                              ubi-8-baseos-rpms 169.7 kB
 libsemanage-2.9-9.el8_6.x86_64                           ubi-8-baseos-rpms 172.1 kB
 libsepol-2.9-3.el8.x86_64                                ubi-8-baseos-rpms 348.1 kB
 libsigsegv-2.11-5.el8.x86_64                             ubi-8-baseos-rpms  31.0 kB
 libtasn1-4.13-4.el8_7.x86_64                             ubi-8-baseos-rpms  78.0 kB
 libtirpc-1.1.4-8.el8.x86_64                              ubi-8-baseos-rpms 115.8 kB
 libverto-0.3.2-2.el8.x86_64                              ubi-8-baseos-rpms  24.6 kB
 libxcrypt-4.1.1-6.el8.x86_64                             ubi-8-baseos-rpms  74.5 kB
 mpfr-3.1.6-1.el8.x86_64                                  ubi-8-baseos-rpms 226.7 kB
 ncurses-6.1-9.20180224.el8.x86_64                        ubi-8-baseos-rpms 396.4 kB
 ncurses-base-6.1-9.20180224.el8.noarch                   ubi-8-baseos-rpms  83.1 kB
 ncurses-libs-6.1-9.20180224.el8.x86_64                   ubi-8-baseos-rpms 341.8 kB
 openssl-1:1.1.1k-9.el8_7.x86_64                          ubi-8-baseos-rpms 726.7 kB
 openssl-libs-1:1.1.1k-9.el8_7.x86_64                     ubi-8-baseos-rpms   1.5 MB
 openssl-pkcs11-0.4.10-3.el8.x86_64                       ubi-8-baseos-rpms  67.7 kB
 p11-kit-0.23.22-1.el8.x86_64                             ubi-8-baseos-rpms 332.1 kB
 p11-kit-trust-0.23.22-1.el8.x86_64                       ubi-8-baseos-rpms 140.3 kB
 pcre-8.42-6.el8.x86_64                                   ubi-8-baseos-rpms 215.7 kB
 pcre2-10.32-3.el8_6.x86_64                               ubi-8-baseos-rpms 252.6 kB
 platform-python-3.6.8-51.el8_8.1.x86_64                  ubi-8-baseos-rpms  88.6 kB
 platform-python-pip-9.0.3-22.el8.noarch                  ubi-8-baseos-rpms   1.7 MB
 platform-python-setuptools-39.2.0-7.el8.noarch           ubi-8-baseos-rpms 647.4 kB
 popt-1.18-1.el8.x86_64                                   ubi-8-baseos-rpms  62.9 kB
 python3-libs-3.6.8-51.el8_8.1.x86_64                     ubi-8-baseos-rpms   8.2 MB
 python3-pip-wheel-9.0.3-22.el8.noarch                    ubi-8-baseos-rpms 916.3 kB
 python3-setuptools-wheel-39.2.0-7.el8.noarch             ubi-8-baseos-rpms 296.0 kB
 readline-7.0-10.el8.x86_64                               ubi-8-baseos-rpms 204.2 kB
 redhat-release-8.8-0.8.el8.x86_64                        ubi-8-baseos-rpms  46.3 kB
 sed-4.5-5.el8.x86_64                                     ubi-8-baseos-rpms 305.4 kB
 setup-2.12.2-9.el8.noarch                                ubi-8-baseos-rpms 185.3 kB
 shadow-utils-2:4.6-17.el8.x86_64                         ubi-8-baseos-rpms   1.3 MB
 sqlite-libs-3.26.0-18.el8_8.x86_64                       ubi-8-baseos-rpms 595.0 kB
 tzdata-2023c-1.el8.noarch                                ubi-8-baseos-rpms 488.2 kB
 xz-libs-5.2.4-4.el8_6.x86_64                             ubi-8-baseos-rpms  96.1 kB
 zlib-1.2.11-21.el8_7.x86_64                              ubi-8-baseos-rpms 105.4 kB
Transaction Summary:
 Installing:       67 packages
 Reinstalling:      0 packages
 Upgrading:         0 packages
 Obsoleting:        0 packages
 Removing:          0 packages
 Downgrading:       0 packages
Downloading packages...
Running transaction test...
Installing: python3-setuptools-wheel;39.2.0-7.el8;noarch;ubi-8-baseos-rpms
Installing: python3-pip-wheel;9.0.3-22.el8;noarch;ubi-8-baseos-rpms
Installing: tzdata;2023c-1.el8;noarch;ubi-8-baseos-rpms
Installing: redhat-release;8.8-0.8.el8;x86_64;ubi-8-baseos-rpms
Installing: setup;2.12.2-9.el8;noarch;ubi-8-baseos-rpms
Installing: filesystem;3.8-6.el8;x86_64;ubi-8-baseos-rpms
Installing: basesystem;11-5.el8;noarch;ubi-8-baseos-rpms
Installing: ncurses-base;6.1-9.20180224.el8;noarch;ubi-8-baseos-rpms
Installing: pcre2;10.32-3.el8_6;x86_64;ubi-8-baseos-rpms
Installing: libselinux;2.9-8.el8;x86_64;ubi-8-baseos-rpms
Installing: ncurses-libs;6.1-9.20180224.el8;x86_64;ubi-8-baseos-rpms
Installing: glibc-all-langpacks;2.28-225.el8;x86_64;ubi-8-baseos-rpms
Installing: glibc-gconv-extra;2.28-225.el8;x86_64;ubi-8-baseos-rpms
Installing: glibc-common;2.28-225.el8;x86_64;ubi-8-baseos-rpms
Installing: glibc;2.28-225.el8;x86_64;ubi-8-baseos-rpms
Installing: bash;4.4.20-4.el8_6;x86_64;ubi-8-baseos-rpms
Installing: libsepol;2.9-3.el8;x86_64;ubi-8-baseos-rpms
Installing: zlib;1.2.11-21.el8_7;x86_64;ubi-8-baseos-rpms
Installing: info;6.5-7.el8;x86_64;ubi-8-baseos-rpms
Installing: readline;7.0-10.el8;x86_64;ubi-8-baseos-rpms
Installing: gmp;1:6.1.2-10.el8;x86_64;ubi-8-baseos-rpms
Installing: libattr;2.4.48-3.el8;x86_64;ubi-8-baseos-rpms
Installing: libacl;2.2.53-1.el8;x86_64;ubi-8-baseos-rpms
Installing: sed;4.5-5.el8;x86_64;ubi-8-baseos-rpms
Installing: bzip2-libs;1.0.6-26.el8;x86_64;ubi-8-baseos-rpms
Installing: gdbm-libs;1:1.18-2.el8;x86_64;ubi-8-baseos-rpms
Installing: libcom_err;1.45.6-5.el8;x86_64;ubi-8-baseos-rpms
Installing: libffi;3.1-24.el8;x86_64;ubi-8-baseos-rpms
Installing: p11-kit;0.23.22-1.el8;x86_64;ubi-8-baseos-rpms
Installing: libxcrypt;4.1.1-6.el8;x86_64;ubi-8-baseos-rpms
Installing: gdbm;1:1.18-2.el8;x86_64;ubi-8-baseos-rpms
Installing: mpfr;3.1.6-1.el8;x86_64;ubi-8-baseos-rpms
Installing: coreutils-common;8.30-15.el8;x86_64;ubi-8-baseos-rpms
Installing: sqlite-libs;3.26.0-18.el8_8;x86_64;ubi-8-baseos-rpms
Installing: expat;2.2.5-11.el8;x86_64;ubi-8-baseos-rpms
Installing: keyutils-libs;1.5.10-9.el8;x86_64;ubi-8-baseos-rpms
Installing: libcap-ng;0.7.11-1.el8;x86_64;ubi-8-baseos-rpms
Installing: audit-libs;3.0.7-4.el8;x86_64;ubi-8-baseos-rpms
Installing: libsemanage;2.9-9.el8_6;x86_64;ubi-8-baseos-rpms
Installing: libsigsegv;2.11-5.el8;x86_64;ubi-8-baseos-rpms
Installing: gawk;4.2.1-4.el8;x86_64;ubi-8-baseos-rpms
Installing: libtasn1;4.13-4.el8_7;x86_64;ubi-8-baseos-rpms
Installing: libverto;0.3.2-2.el8;x86_64;ubi-8-baseos-rpms
Installing: ncurses;6.1-9.20180224.el8;x86_64;ubi-8-baseos-rpms
Installing: pcre;8.42-6.el8;x86_64;ubi-8-baseos-rpms
Installing: grep;3.1-6.el8;x86_64;ubi-8-baseos-rpms
Installing: popt;1.18-1.el8;x86_64;ubi-8-baseos-rpms
Installing: chkconfig;1.19.1-1.el8;x86_64;ubi-8-baseos-rpms
Installing: p11-kit-trust;0.23.22-1.el8;x86_64;ubi-8-baseos-rpms
Installing: xz-libs;5.2.4-4.el8_6;x86_64;ubi-8-baseos-rpms
Installing: libgcc;8.5.0-18.el8;x86_64;ubi-8-baseos-rpms
Installing: libcap;2.48-5.el8_8;x86_64;ubi-8-baseos-rpms
Installing: krb5-libs;1.18.2-25.el8_8;x86_64;ubi-8-baseos-rpms
Installing: libtirpc;1.1.4-8.el8;x86_64;ubi-8-baseos-rpms
Installing: libnsl2;1.2.0-2.20180605git4a062cf.el8;x86_64;ubi-8-baseos-rpms
Installing: platform-python-pip;9.0.3-22.el8;noarch;ubi-8-baseos-rpms
Installing: platform-python-setuptools;39.2.0-7.el8;noarch;ubi-8-baseos-rpms
Installing: python3-libs;3.6.8-51.el8_8.1;x86_64;ubi-8-baseos-rpms
Installing: platform-python;3.6.8-51.el8_8.1;x86_64;ubi-8-baseos-rpms
Installing: openssl;1:1.1.1k-9.el8_7;x86_64;ubi-8-baseos-rpms
Installing: crypto-policies-scripts;20221215-1.gitece0092.el8;noarch;ubi-8-baseos-rpms
Installing: crypto-policies;20221215-1.gitece0092.el8;noarch;ubi-8-baseos-rpms
Installing: openssl-pkcs11;0.4.10-3.el8;x86_64;ubi-8-baseos-rpms
Installing: openssl-libs;1:1.1.1k-9.el8_7;x86_64;ubi-8-baseos-rpms
Installing: coreutils;8.30-15.el8;x86_64;ubi-8-baseos-rpms
Installing: ca-certificates;2022.2.54-80.2.el8_6;noarch;ubi-8-baseos-rpms
Installing: shadow-utils;2:4.6-17.el8;x86_64;ubi-8-baseos-rpms
error: Error -1 running transaction

When we execute the same command using the dnf tool => dnf install shadow-utils then we got the root cause of the error

...
error: unpacking of archive failed on file /usr/bin/newgidmap;64f6043e: cpio: cap_set_file failed - Inappropriate ioctl for device
error: shadow-utils-2:4.6-17.el8.x86_64: install failed

Question

Could it be possible to log the error (= root cause) as dnf do when a transaction error occurs using microdnf?

How to reproduce

  • Have an access to an ocp4 cluster
  • Deploy the following yaml resource (see hereafter)
  • Look to the log's pod
kubectl delete deployment/dummy

cat <<'EOF' | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dummy
  labels:
    app: dummy
spec:
  selector:
    matchLabels:
      app: dummy
  replicas: 1
  template:
    metadata:
      labels:
        app: dummy
    spec:
      containers:
      - name: install-shadow-utils
        image: registry.access.redhat.com/ubi8/ubi-minimal
        command:
          - sh
        args:
          - '-c'
          - >
           microdnf install -y shadow-utils

        securityContext:
          runAsUser: 0
          runAsGroup: 0
          capabilities:
          #  add:
          #    - SETPCAP

        volumeMounts:
          - name: var-vol
            mountPath: /var/
          - name: usr-vol
            mountPath: /usr/share/info
      serviceAccountName: "sa-with-secrets"
      volumes:
       - name: var-vol
         emptyDir: {}
       - name: usr-vol
         emptyDir: {}
EOF

kubectl rollout status deployment/dummy
kubectl logs -lapp=dummy --follow=true
@kontura kontura added the Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take label Sep 18, 2023
@kontura kontura removed their assignment Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

2 participants