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

(MODULES-4521) Use local copy of Puppet GPG keys #216

Merged
merged 2 commits into from
Mar 13, 2017

Conversation

MikaelSmith
Copy link
Contributor

Relying on the external GPG servers for getting GPG keys causes
intermittent test failures, and could also be an issue at sites that
limit network access. Mirroring the RedHat approach, include copies of
our GPG keys in the module and install them.

Previously it would use invalid arguments to beaker-hostgenerator.
@highb
Copy link
Contributor

highb commented Mar 10, 2017

@MikaelSmith Have you run this through a frankenbuild for PE?

@MikaelSmith
Copy link
Contributor Author

No, only FOSS beaker tests. Can you run one?

@MikaelSmith
Copy link
Contributor Author

I guess I can, just have to remember how.

@MikaelSmith
Copy link
Contributor Author

MikaelSmith commented Mar 10, 2017

Testing with r10k_puppet_agent_fork=MikaelSmith r10k_puppet_agent_ref=MODULES-4521 ./frankenbuilder 2017.1 --install --vmpooler --upgrade-from 2016.4.2 --agent-upgrade --agent=debian-7-amd64 --preserve_hosts=always --upgrade.

@MikaelSmith
Copy link
Contributor Author

      Test Suite: pre_suite @ 2017-03-10 15:32:56 -0800

      - Host Configuration Summary -


              - Test Case Summary for suite 'pre_suite' -
       Total Suite Time: 1301.33 seconds
      Average Test Time: 433.78 seconds
              Attempted: 3
                 Passed: 3
                 Failed: 0
                Errored: 0
                Skipped: 0
                Pending: 0
                  Total: 3

      - Specific Test Case Status -

Failed Tests Cases:
Errored Tests Cases:
Skipped Tests Cases:
Pending Tests Cases:

@@ -79,17 +79,42 @@
}
}

$legacy_keyname = 'DEB-GPG-KEY-puppetlabs'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@underscorgan mind giving this a once-over to see if it's sane?

Copy link
Contributor

@highb highb left a comment

Choose a reason for hiding this comment

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

👍 from me on this. QA will be happy to have this fix!

Copy link
Contributor

@underscorgan underscorgan left a comment

Choose a reason for hiding this comment

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

The DEB-GPG-KEY-puppet(labs) and RPM-GPG-KEY-puppet(labs) have the same contents, can we have them in the module as GPG-KEY-puppet(labs) and then set the target correctly in the file resource rather than duplicating the files?

@MikaelSmith
Copy link
Contributor Author

Yeah, I'll update that.

Relying on the external GPG servers for getting GPG keys causes
intermittent test failures, and could also be an issue at sites that
limit network access. Mirroring the RedHat approach, include copies of
our GPG keys in the module and install them.
$keyname = 'RPM-GPG-KEY-puppet'
$gpg_path = "/etc/pki/rpm-gpg/${keyname}"
$legacy_keyname = 'GPG-KEY-puppetlabs'
$legacy_gpg_path = "/etc/pki/rpm-gpg/RPM-${legacy_keyname}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm preserving the path here so that we don't write another copy for people who are already using this module.

@MikaelSmith
Copy link
Contributor Author

Both FOSS beaker runs passed.

bundle exec beaker-hostgenerator redhat7-64mdcl-debian7-64default.a > hosts.yml
BEAKER_debug=true BEAKER_setfile=hosts.yml bundle exec rake beaker
bundle exec beaker-hostgenerator redhat7-64mdcl-redhat7-64default.a > hosts.yml
BEAKER_debug=true BEAKER_setfile=hosts.yml bundle exec rake beaker

@MikaelSmith
Copy link
Contributor Author

Rerun on frankenbuilder also passed

      Test Suite: pre_suite @ 2017-03-10 16:49:55 -0800

      - Host Configuration Summary -


              - Test Case Summary for suite 'pre_suite' -
       Total Suite Time: 1370.77 seconds
      Average Test Time: 456.92 seconds
              Attempted: 3
                 Passed: 3
                 Failed: 0
                Errored: 0
                Skipped: 0
                Pending: 0
                  Total: 3

      - Specific Test Case Status -

Failed Tests Cases:
Errored Tests Cases:
Skipped Tests Cases:
Pending Tests Cases:

@puppetcla
Copy link

CLA signed by all contributors.

Copy link
Contributor

@johnduarte johnduarte left a comment

Choose a reason for hiding this comment

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

👍 🥇
Thank you so much for this one @MikaelSmith !!!

@johnduarte johnduarte merged commit a71a649 into puppetlabs:master Mar 13, 2017
@MikaelSmith MikaelSmith deleted the MODULES-4521 branch March 13, 2017 16:03
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.

5 participants