Skip to content

openshift/origin image ships with a broken yum repository #14393

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

Closed
jpkrohling opened this issue May 29, 2017 · 9 comments
Closed

openshift/origin image ships with a broken yum repository #14393

jpkrohling opened this issue May 29, 2017 · 9 comments
Assignees
Labels
component/image kind/bug Categorizes issue or PR as related to a bug. priority/P2

Comments

@jpkrohling
Copy link

For images based on openshift/origin, a recent update has made downstream images fail on simple yum operations, as follows:

docker build . 
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM openshift/origin:latest
 ---> da75ad7baaa1
Step 2 : RUN yum update -y && yum clean all
 ---> Running in 7172e59c7833
Loaded plugins: fastestmirror, ovl
file:///srv/origin-local-release/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /srv/origin-local-release/repodata/repomd.xml"
Trying other mirror.


 One of the configured repositories failed (OpenShift Origin Release from Local Source),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

     1. Contact the upstream for the repository and get them to fix the problem.

     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).

     3. Run the command with the repository temporarily disabled
            yum --disablerepo=origin-local-release ...

     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:

            yum-config-manager --disable origin-local-release
        or
            subscription-manager repos --disable=origin-local-release

     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:

            yum-config-manager --save --setopt=origin-local-release.skip_if_unavailable=true

failure: repodata/repomd.xml from origin-local-release: [Errno 256] No more mirrors to try.
file:///srv/origin-local-release/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /srv/origin-local-release/repodata/repomd.xml"
The command '/bin/sh -c yum update -y && yum clean all' returned a non-zero code: 1

A possible workaround is to disable this repo, by passing the parameter --disablerepo=origin-local-release to the yum command.

Version

Docker image da75ad7baaa1 (latest as of May 29th, 10am UTC)

Steps To Reproduce
  1. Create a Dockerfile as follows:
FROM openshift/origin:latest
RUN yum update -y && yum clean all
  1. Build the Dockerfile: docker build .
@zjagust
Copy link

zjagust commented Jun 1, 2017

I can confirm that adding --disablerepo=origin-local-release to yum resolves error. The other issue here is I tried to build an image for OpenShift Router by pulling files from here: https://github.com/openshift/origin/tree/master/images/router/haproxy

Image builds successfully but when I try to define router wit oadm command a container creation fails. This is the output of "oc describe po router":
Back-off restarting failed docker container
Error syncing pod, skipping: failed to "StartContainer" for "router" with CrashLoopBackOff: "Back-off 10s restarting failed container=router pod=router

This is the output of "oc logs router":
<7>haproxy-systemd-wrapper: executing /usr/local/sbin/haproxy -p /run/haproxy.pid -f /usr/local/etc/haproxy/haproxy.cfg -Ds
[ALERT] 151/175956 (6) : Cannot open configuration file/directory /usr/local/etc/haproxy/haproxy.cfg : No such file or directory
<5>haproxy-systemd-wrapper: exit, haproxy RC=1

If i start the same image with "docker exec" and execute reload-haproxy.sh, everything works.

There is obviously a difference when building an image manually and pulling it directly form openshift/origin-haproxy-router, or I'm missing something terribly.

@0xmichalis 0xmichalis assigned 0xmichalis and unassigned mfojtik Jun 2, 2017
@0xmichalis
Copy link
Contributor

@stevekuznetsov we may want to rethink how we use the local yum repo

@0xmichalis
Copy link
Contributor

@zjagust the router issue is a different one, please open a separate issue about it.

@zjagust
Copy link

zjagust commented Jun 5, 2017

@Kargakis I opened a new issue concerning router here: #14473

@gbaufake
Copy link

+1

@xiaods
Copy link
Contributor

xiaods commented Aug 17, 2017

i found the imagebuilder also reproduce this bug. can anyone do this on current openshift version?

@xiaods
Copy link
Contributor

xiaods commented Aug 17, 2017

please reopen this issue again.

@stevekuznetsov
Copy link
Contributor

@xiaods could you paste a log with your error? We may make a different issue for that -- this is for origin-local-release repo

@xiaods
Copy link
Contributor

xiaods commented Aug 19, 2017

@stevekuznetsov here: #15808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/image kind/bug Categorizes issue or PR as related to a bug. priority/P2
Projects
None yet
Development

No branches or pull requests

8 participants