Skip to content

add yum-plugin-priorites to allow repo override in ci jobs - #12979

Closed
gabemontero wants to merge 1 commit into
openshift:masterfrom
gabemontero:localEPELMirror
Closed

gabemontero wants to merge 1 commit into
openshift:masterfrom
gabemontero:localEPELMirror

Conversation

@gabemontero

Copy link
Copy Markdown
Contributor

See #8571 (though additional work is needed after this merges to resolve that issue)

@smarterclayton @stevekuznetsov @sdodson ptal

@smarterclayton

Copy link
Copy Markdown
Contributor

Question - should we be installing epel-release if we're going to add our own mirrors?

@sdodson

sdodson commented Feb 15, 2017

Copy link
Copy Markdown
Member

You're mounting a repo in via secret, but would everyone else?

@gabemontero

Copy link
Copy Markdown
Contributor Author

@smarterclayton - are you thinking that the Dockerfile say calls a new script we add that varies what INSTALL_PKGS is set to based on the presence of our override repo file?

i.e. RUN INSTALL_PKGS=`newScript.sh`

And newScript.sh echo's a list that either includes epel-release or not based on the presence of the override file.

@smarterclayton

Copy link
Copy Markdown
Contributor

I'm saying whomever builds origin-base decides what mirrors to include, and we only install epel-release if no mirrors are installed (if no mounted mirrors)

@gabemontero

gabemontero commented Feb 21, 2017 via email

Copy link
Copy Markdown
Contributor Author

@gabemontero

Copy link
Copy Markdown
Contributor Author

install of epel-release now conditional ... if local repo file present, epel-release is not included in the list to install

Comment thread images/base/Dockerfile Outdated
rpm -V yum-plugin-priorities && \
yum clean all

RUN if [ -f /etc/yum.repos.d/local_epel.repo ]; then INSTALL_PKGS="which git tar wget hostname sysvinit-tools util-linux bsdtar \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought the priority plugin would let us install epel-release always? The back we're doing in CI should be transparent to this container manifest.

@gabemontero

gabemontero commented Mar 4, 2017 via email •

Copy link
Copy Markdown
Contributor Author

@gabemontero

Copy link
Copy Markdown
Contributor Author

[test]

@stevekuznetsov

Copy link
Copy Markdown
Contributor

@smarterclayton what's the rationale for the above? I thought this was supposed to be transparent

@gabemontero

gabemontero commented Mar 7, 2017 •

Copy link
Copy Markdown
Contributor Author

As an aside, our local mirror is no longer working for us (whereas when I prototyped this last month it did work). Certainly this would need to be resolved before we pull the trigger on this.

Some dependency errors are occurring when running in my test ami (which I provisioned yesterday):

--> Finished Dependency Resolution
Error: Package: 1:python-cephfs-0.80.7-0.8.el7.x86_64 (local-epel)
           Requires: python-rados = 1:0.80.7
           Available: 1:python-rados-0.94.5-1.el7.x86_64 (base)
               python-rados = 1:0.94.5-1.el7
Error: Package: 1:ceph-common-0.80.7-0.8.el7.x86_64 (local-epel)
           Requires: python-rbd = 1:0.80.7
           Available: 1:python-rbd-0.94.5-1.el7.x86_64 (base)
               python-rbd = 1:0.94.5-1.el7
Error: Package: 1:ceph-common-0.80.7-0.8.el7.x86_64 (local-epel)
           Requires: python-rados = 1:0.80.7
           Available: 1:python-rados-0.94.5-1.el7.x86_64 (base)
               python-rados = 1:0.94.5-1.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Occurs both when including epel-release and when excluding it based on the presence of the mount.

@gabemontero
gabemontero force-pushed the localEPELMirror branch 2 times, most recently from 3cc0287 to 47ce8ab Compare March 14, 2017 13:35
@gabemontero

Copy link
Copy Markdown
Contributor Author

I'm still getting the same errors noted in #12979 (comment)

As a reminder, we are simply trying to do a yum install of these packages using our local epel mirror:

which git tar wget hostname sysvinit-tools util-linux bsdtar socat ethtool device-mapper iptables tree findutils nmap-ncat e2fsprogs xfsprogs lsof device-mapper-persistent-data ceph-common

@tdawson - @stevekuznetsov believe there is a job that is suppose to periodically update https://mirror.openshift.com/mirror/epel and make sure it is sorted out wrt to error like the one above.

Does that ring any bells, and if so, should we poke that job? Or is this a known issue? Or if none of the above, any hints on how we should solve / debug?

@tdawson

tdawson commented Mar 15, 2017

Copy link
Copy Markdown
Member

@gabemontero Is there any way I can get the full error. This doesn't seem to be an "not all epel is there" issue, but something else. But I can't tell what from what is shown.

@gabemontero

Copy link
Copy Markdown
Contributor Author

@tdawson hey - here is a gist with the entire set of output: https://gist.github.com/gabemontero/cb1cf709ca5164baac4692eacf4923f5

The vagrant command is executing hack/build-base-images.sh on my ec2 instance.

Also for reference, the update to the Dockerfile that hack/build-base-images.sh uses is captured in this PR.
And the local epel repo file is this: https://github.com/openshift/vagrant-openshift/blob/master/lib/vagrant-openshift/resources/local_epel.repo

thanks

@tdawson

tdawson commented Mar 15, 2017

Copy link
Copy Markdown
Member

This isn't a matter of the epel mirror not being in sync. This is a matter of figuring out why it's trying to pull from local_epel instead of base. ceph-common, and all it's dependencies, have been merged into the standard RHEL7, and so an install of it should pull everything from base.
To make matters even stranger, you cannot install the ceph-common from epel7. If you look at it's build https://koji.fedoraproject.org/koji/buildinfo?buildID=738434, for x86_64 it is missing all the packages that we are seeing here. But only the ppc64le people complained, so they put it back for them. https://bugzilla.redhat.com/show_bug.cgi?id=1299820
Summary, don't install ceph-common from any epel7 repos. It just won't work. Get it from your base repo.

@gabemontero

Copy link
Copy Markdown
Contributor Author

thanks for the info @tdawson

The million dollar question for a yum neophyte like me is how to ensure that.

Given the contents of our local_epel.repo:

[local-epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://mirror.openshift.com/mirror/epel/7/x86_64
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
# according to note from sdodson in https://github.com/openshift/origin/issues/8571, default priority is 99,
# but to ensure our local mirror is not overriden, setitng to 1
priority=1

[local-epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://mirror.openshift.com/mirror/epel/7/x86_64/debug
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
# according to note from sdodson in https://github.com/openshift/origin/issues/8571, default priority is 99,
# but to ensure our local mirror is not overriden, setitng to 1
priority=1

And the contents of the epel.repo that came with the system:

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

I have no idea how to enforce that. So far, I've tried to

  1. revert the priority back to 98 in local_epel.repo ... same error
  2. switch from baseurl to mirrorlist ... get an erorr msg basically saying need baseurl ... might be a priority plugin thing

I could remove the priority from there, but then it seems like I need to remove the epel.repo file, which we'd rather not do.

Any suggestions?

@tdawson

tdawson commented Mar 20, 2017

Copy link
Copy Markdown
Member

Is there any way I/we can look at what the [base] repo config looks like.
I just want to make sure that [base] has priority set correct and it's pointing to a repo that has the packages we want.

@gabemontero

Copy link
Copy Markdown
Contributor Author

Hey @tdawson - sorry for the delay - was out a bit for surgery, and am now finally about caught up.

Interestingly, when looking at all the files in /etc/yum.repos.d on the ec2 instance we are testing on, none of the *.repo files have [base] in them.

Is there another place in our instance I should look for that? Or of course perhaps we need to inject an appropriate [base] repo file when employing our local_epel.repo and the openshift mirror ?

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 29, 2017
@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to c493a13

@openshift-bot

Copy link
Copy Markdown
Contributor

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 30, 2017
@gabemontero

Copy link
Copy Markdown
Contributor Author

Couldn't install the yum plugin priorities with the last test run - none of the mirrors had it.

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 25, 2017
@openshift-bot

Copy link
Copy Markdown
Contributor

Origin Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2017
@openshift-merge-robot openshift-merge-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 24, 2017
@openshift-merge-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gabemontero
We suggest the following additional approver: bparees

Assign the PR to them by writing /assign @bparees in a comment when ready.

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@bparees bparees removed their assignment Jul 25, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2017
@openshift-merge-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gabemontero
We suggest the following additional approver: stevekuznetsov

Assign the PR to them by writing /assign @stevekuznetsov in a comment when ready.

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2017
@openshift-merge-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gabemontero
We suggest the following additional approver: stevekuznetsov

Assign the PR to them by writing /assign @stevekuznetsov in a comment when ready.

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@bparees

bparees commented Aug 28, 2017

Copy link
Copy Markdown
Contributor

is this PR still being pursued?

@gabemontero

Copy link
Copy Markdown
Contributor Author

Given #16028 if the removal of epel goes through I think this PR and the corresponding flake issue can get nuked

@stevekuznetsov - agree ?

@gabemontero
gabemontero deleted the localEPELMirror branch August 31, 2017 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants