Bug 1629518 - fedora-review is able to run inside docker container?
Summary: fedora-review is able to run inside docker container?
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-17 02:55 UTC by William Moreno
Modified: 2021-11-30 17:27 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-11-30 17:27:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Dockerfile used to create the base image (690 bytes, text/plain)
2018-09-17 02:55 UTC, William Moreno
no flags Details

Description William Moreno 2018-09-17 02:55:10 UTC
Created attachment 1483830 [details]
Dockerfile used to create the base image

Description of problem:
when runnin fedora-review -b xxxxxxx fails with a error.

Version-Release number of selected component (if applicable):

bash-4.4$ pwd
/var/lib/mock/fedora-rawhide-x86_64/root/var/cache/dnf
bash-4.4$ mock --version
1.4.13
bash-4.4$ rpm --version
RPM version 4.14.2
bash-4.4$ dnf --version
3.5.1
  Installed: dnf-0:3.5.1-1.fc30.noarch at Mon Sep 17 01:11:23 2018
  Built    : Fedora Project at Tue Sep 11 09:19:59 2018

  Installed: rpm-0:4.14.2-1.fc30.x86_64 at Thu Sep  6 10:29:33 2018
  Built    : Fedora Project at Tue Aug 21 11:33:49 2018


How reproducible:
Create a docker image with the attached Dockerfile, create a container a try to run fedora-review



Actual results:

fedora-review -b 1576056
INFO: Processing bugzilla bug: 1576056
INFO: Getting .spec and .srpm Urls from : 1576056
INFO:   --> SRPM url: https://gitlab.com/mati865/pyte-fedora/raw/master/python-pyte-0.8.0-1.fc28.src.rpm
INFO:   --> Spec url: https://gitlab.com/mati865/pyte-fedora/raw/master/python-pyte.spec
INFO: Using review directory: /home/packager/1576056-python-pyte
ERROR: Namespace unshare failed.
ERROR: It seems we are running inside of Docker. Let skip unsharing.
ERROR: You should *not* run anything but Mock in this container. You have been warned!
ERROR: Command failed: 
 # /bin/mount -n --bind /var/cache/mock/fedora-rawhide-x86_64/dnf_cache/ /var/lib/mock/fedora-rawhide-x86_64/root/var/cache/dnf/

INFO: Re-initializing mock build root
INFO: Init command returned error code 32
INFO: Downloading .spec and .srpm files
ERROR: Namespace unshare failed.
ERROR: It seems we are running inside of Docker. Let skip unsharing.
ERROR: You should *not* run anything but Mock in this container. You have been warned!
ERROR: Command failed: 
 # /bin/mount -n --bind /var/cache/mock/fedora-rawhide-x86_64/dnf_cache/ /var/lib/mock/fedora-rawhide-x86_64/root/var/cache/dnf/

ERROR: Exception down the road...(logs in /home/packager/.cache/fedora-review.log)

The error is in  the 

/bin/mount -n --bind /var/cache/mock/fedora-rawhide-x86_64/dnf_cache/ /var/lib/mock/fedora-rawhide-x86_64/root/var/cache/dnf/

running this command with the user inside container it give a error:
/bin/mount -n --bind /var/cache/mock/fedora-rawhide-x86_64/dnf_cache/ /var/lib/mock/fedora-rawhide-x86_64/root/var/cache/dnf/
mount: only root can use "--no-mtab" option

Maybe running the command as root inside the container should work, but not tested yet.

Additional info:

This have been testd in a up to date fedora 29 and ubuntu 16.04 with Docker version 17.05.0-ce, build 89658be

Comment 1 Ben Cotton 2019-08-13 16:56:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 2 Ben Cotton 2019-08-13 19:44:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 3 Jens Petersen 2019-09-03 07:57:37 UTC
Probably good to retest with the latest mock

Comment 4 Ben Cotton 2020-04-30 21:12:44 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2020-05-26 16:54:13 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Rafael Fontenelle 2020-07-12 19:40:56 UTC
I can reproduce this issue in Fedora 33 rawhide. Since I'm not the original poster, I can't reopen with the proper version set.

With the hope to help others like me that landed in here, here is the workaround I made ti get fedora-review, fedpkg and koji working in a Podman container:

1- Add "--cap-add=SYS_ADMIN" flag to podman to enable SYS_ADMIN capabilities when creating the container

2- Make sure to have installed the following packages 'sssd-kcm' 'sssd-common' 'daemonize' 'krb5-workstation'  (besides others expected packager tools)

3- Run:

  sudo sssd
  sudo daemonize /usr/libexec/sssd/sssd_kcm --uid 0 --gid 0
  kinit your_fas_account
  koji hello

replacing 'your_fas_account' with the appropriated fas account name

4- If you get "Namespace unshare failed." at some point, kill sssd and sssd_kcm and re-run step 3

  sudo kill $(pidof sssd)
  sudo kill $(pidof /usr/libexec/sssd/sssd_kcm)

Comment 7 Fedora Admin user for bugzilla script actions 2020-12-18 02:53:41 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 8 Ben Cotton 2021-11-04 16:46:37 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2021-11-30 17:27:38 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.