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

Minor fixes to make SLES work again #1390

Closed
wants to merge 3 commits into from
Closed

Minor fixes to make SLES work again #1390

wants to merge 3 commits into from

Conversation

trevor-vaughan
Copy link
Contributor

  • Pull the updated RPM GPG key
  • Remove rubygem-puppet prior to trying to install puppet-agent
  • Tested with opensuse/openSUSE-42.2-x86_64

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/3812/

@trevor-vaughan
Copy link
Contributor Author

@puppetlabs/beaker Can someone clue me in as to why Jenkins is mad? All of the tests ran fine on my system.

@tvpartytonight
Copy link
Contributor

@trevor-vaughan here is the relevant error message from Jenkins, from the test check_for_package:

(sles12-64-1) 20:41:04$ zypper --gpg-auto-import-keys se -i --match-exact non-existent-package-name
      File 'repomd.xml' from repository 'pl-puppetserver-latest' is signed with an unknown key 'B8F999C007BB6C57'. Continue? [yes/no] (no):       Cannot read input: bad stream or EOF.
      If you run zypper without a terminal, use '--non-interactive' global
      option to make zypper use default answers to prompts.
      Error building the cache:
      [pl-puppetserver-latest|http://nightlies.puppetlabs.com/puppetserver-latest/repos/sles/12/PC1/x86_64/] Valid metadata not found at specified URL
      Warning: Skipping repository 'pl-puppetserver-latest' because of the above error.

I am a bit surprised that the tests passed with your opensuse system; I would have thought that the you would have run into the same error the jenkins testing encountered above ^^.

Looping in @shrug : the resource at yum.puppetlabs.com, could that be updated to mirror the nightlies resource?

@trevor-vaughan
Copy link
Contributor Author

trevor-vaughan commented May 15, 2017

@tvpartytonight Actually, it makes complete sense.

You're signing things with two different keys and you have to pick one.

Jenkins wants your special sauce, not on the Internet, key but I changed it to import the Internet key so that it would work with the publicly published packages.

https://github.com/puppetlabs/beaker/pull/1390/files#diff-bcaa88e697be9464be7e94c1c8a44fa7L35

* Pull the updated RPM GPG key
* Remove rubygem-puppet prior to trying to install puppet-agent
* Tested with opensuse/openSUSE-42.2-x86_64
@trevor-vaughan
Copy link
Contributor Author

Rebased against the current HEAD

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/3828/

@trevor-vaughan
Copy link
Contributor Author

@shrug and @tvpartytonight any update on this? I'm not sure what the "correct" answer is for the keys.

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/3863/

@trevor-vaughan
Copy link
Contributor Author

@shrug and @tvpartytonight Need insight into the new Jenkins failure. If you could get Jenkins to output the errors to GitHub, that would be most helpful.

@DavidS
Copy link
Contributor

DavidS commented Jun 16, 2017


  1) Unix::Pkg check_for_package checks correctly on sles
     Failure/Error: result = self.exec(Command.new(command, [], cmd_create_options), exec_opts)
     
       #<Beaker::Command (class)> received :new with unexpected arguments
         expected: (/^rpmkeys --import http.+RPM-GPG-KEY.+/, anything, anything)
              got: ("rpmkeys --import http://nightlies.puppetlabs.com/07BB6C57", [], {:prepend_cmds=>nil, :cmdexe=>false})
       Diff:
       @@ -1,2 +1,4 @@
       -[/^rpmkeys --import http.+RPM-GPG-KEY.+/, "anything", "anything"]
       +["rpmkeys --import http://nightlies.puppetlabs.com/07BB6C57",
       + [],
       + {:prepend_cmds=>nil, :cmdexe=>false}]
       
     # ./lib/beaker/command_factory.rb:35:in `execute'
     # ./lib/beaker/host/unix/pkg.rb:35:in `check_for_package'
     # ./spec/beaker/host/unix/pkg_spec.rb:103:in `block (3 levels) in <module:Beaker>'

Finished in 20.63 seconds (files took 1.33 seconds to load)
1807 examples, 1 failure

Failed examples:

rspec ./spec/beaker/host/unix/pkg_spec.rb:97 # Unix::Pkg check_for_package checks correctly on sles

Build step 'Execute shell' marked build as failure
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Finished: FAILURE

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/3903/

@DavidS
Copy link
Contributor

DavidS commented Jun 19, 2017

This has failed on a transient in our infrastructure. I've kicked the job, and opened QENG-5088 for tracking.

@DavidS
Copy link
Contributor

DavidS commented Jun 19, 2017

PS: it seems like this has passed the jenkins now. cc @puppetlabs/beaker

@tvpartytonight
Copy link
Contributor

The failure above is due to a Windows testing failure, not related to the changes in this PR.

@shrug , do you have any input here for the changes in this PR?

@trevor-vaughan
Copy link
Contributor Author

@DavidS @tvpartytonight and @shrug I'm not sure what has been updated to conflict with foss_utils. I tried a quick rebase but it's a bit more complicated than I have time for right now.

@trevor-vaughan
Copy link
Contributor Author

@DavidS @tvpartytonight and @shrug Do you have any ideas on what the issues are with the foss_utils files and how to fix them?

@@ -367,6 +367,12 @@ def install_puppet_agent_on(hosts, opts = {})
end

if package_name
# Some SLES images already have rubygem-puppet installed and this
Copy link
Contributor

Choose a reason for hiding this comment

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

What SLES images are you dealing with that have rubygem-puppet installed? That sounds like that should be dealt with at an image level or within the pre-suite of your testing. I don't think that adding that here is the appropriate place for this logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tvpartytonight I've been using the images directly from SuSE and OpenSuSE. If you take that out...you're gonna have a bad time....sometimes....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tvpartytonight What I'm getting at is that the Beaker code itself calls that before I even get to my pre-suite anything from what I remember and that's a bit beyond the level of Beaker mangling that I'd like to do.

@tvpartytonight
Copy link
Contributor

@trevor-vaughan we have done work to remove some of beaker's libraries into independent gems, and so the files conflicting now exist in this separate repo: https://github.com/puppetlabs/beaker-puppet. You'll need update your PR to resolve those conflicts or reopen the PR with only the changes necessary for your sles fixes. Apologies about letting this PR get a bit stale.

@ferglor
Copy link
Contributor

ferglor commented Jul 31, 2017

last comment is still current

@tvpartytonight
Copy link
Contributor

Last comment still current.

@ferglor
Copy link
Contributor

ferglor commented Aug 14, 2017

Last comment still current. If no motion is made on this PR in another week, we’ll close this PR due to inactivity.

@trevor-vaughan
Copy link
Contributor Author

@ferglor Last response is still current. Since Beaker significantly changed, I have not had time to figure out the new structure.

The option for maintainers to commit is open so feel free to update as necessary if you want SLES support in Beaker.

@@ -33,6 +33,9 @@ def check_for_package(name, opts = {})
# time. It's just to make sure that we only do the key import once, &
# isn't for setting or use outside of beaker.
execute('rpmkeys --import http://nightlies.puppetlabs.com/07BB6C57', opts)

# We also need the real key in case users are pulling from the stable packages
execute('rpmkeys --import https://yum.puppetlabs.com/RPM-GPG-KEY-puppet', opts)
Copy link
Contributor

Choose a reason for hiding this comment

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

I've recently started work to try to fix the sles repos

I've added #1449, which alone isn't going to fix this. But I'm also working on getting our repo automation updated so it signs the yum repos, and provides the gpg key in the repo. With that, zypper will automatically import the key in the repo if directed to do so. This opens us up to transients for network blips, but it's certainly better than what we have. However, this is also a perfectly reasonable solution to fix these failures. I'm wondering if this key is available under /etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-PC1. It would only be dropped there by the puppetlabs-release package. I'm not sure if that's getting installed or not

@kevpl
Copy link
Contributor

kevpl commented Sep 18, 2017

It looks like there have been a number of moves from code around this section in beaker, as well as work for keys & issues handled here in other PRs as well. Since that's the case & no movement has been made on this PR recently, I'll close this due to inactivity.

If you'd like to re-open this PR, please update it so that it's in a merge- & test-able state for review.

@kevpl kevpl closed this Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants