Skip to content

(#22233) Add support for Google Compute Engine into facter core#523

Closed
erjohnso wants to merge 2 commits intopuppetlabs:masterfrom
erjohnso:gce
Closed

(#22233) Add support for Google Compute Engine into facter core#523
erjohnso wants to merge 2 commits intopuppetlabs:masterfrom
erjohnso:gce

Conversation

@erjohnso
Copy link

Add support into core for puppet nodes running in Google Compute Engine.

@puppetcla
Copy link

Waiting for CLA signature by @erjohnso

@erjohnso - We require a Contributor License Agreement (CLA) for people who contribute to Puppet, but we have an easy click-through license with instructions, which is available at https://cla.puppetlabs.com/

Note: if your contribution is trivial and you think it may be exempt from the CLA, please post a short reply to this comment with details. http://docs.puppetlabs.com/community/trivial_patch_exemption.html

@erjohnso
Copy link
Author

Corporate CLA between Google and PuppetLabs has been signed and I believe
I've been explicitly included in the agreement. Adding Jeff and Nigel to
confirm.

On Tue, Aug 20, 2013 at 3:40 PM, puppetcla notifications@github.com wrote:

Waiting for CLA signature by @erjohnso https://github.com/erjohnso

@erjohnso https://github.com/erjohnso - We require a Contributor
License Agreement (CLA) for people who contribute to Puppet, but we have an
easy click-through license with instructions, which is available at
https://cla.puppetlabs.com/

Note: if your contribution is trivial and you think it may be exempt from
the CLA, please post a short reply to this comment with details.
http://docs.puppetlabs.com/community/trivial_patch_exemption.html


Reply to this email directly or view it on GitHubhttps://github.com//pull/523#issuecomment-22983512
.

@jeffmccune
Copy link

@erjohnso Thank you for contributing to Puppet!

I went ahead and merged the code as-is, but I took the liberty of re-wording your commit message since it didn't really describe the behavior without this patch applied, why the behavior is a problem, and how the patch changes the behavior of Facter to address the problem. For future reference and as an example, here's the re-worded commit message:

commit d7c863e
Author: Eric Johnson erjohnso@google.com
Date: Sat Aug 17 17:34:41 2013 +0000

(#22233) Add facts from Google Compute Engine metadata service

Without this patch facter does not report fact values for the data
stored in the Google Compute Engine metadata service.  This is a problem
because the metadata service is a primary vehicle for end users to pass
in information about compute instances.  This information is often
necessary for automated configuration of the compute instances.

This patch addresses the problem by dynamically generating a list of
facts based on the data made available by the http://metadata service in
the GCE environment.  The behavior of these facts is to obtain a JSON
structured hash from the metadata service if the `virtual` fact has the
value of `gce`.

@jeffmccune
Copy link

summary: Merged into master as d1e8046. These new facts obtained from the Google Compute Engine metadata service will be available in Facter 1.8.0 or 2.0.0, whichever is released first.

@jeffmccune
Copy link

@erjohnso Shoot, it looks like this is causing test failures on Ruby 1.8.7 where the json library isn't available. Please see:

https://jenkins.puppetlabs.com/job/Facter%20Master/ruby=ruby-1.8.7,rvm=%23rvm/1387/console

@zaphod42 @justinstoller Do either of you happen to know if we support the json library in Facter 1.7? I see it listed in the Gemfile, but perhaps our Jenkins job just isn't using bundler or something similar? I'm trying to figure out if we shouldn't be using the json library or if we should and this is just a problem with the testing setup.

@jpartlow
Copy link

I don't know definitively how it should be, but the json gem is only required for :development or :test, prior to this commit. It looks like it was always guarded by a test for whether it was present prior to the GCE addition.

@jpartlow
Copy link

@jeffmccune @zaphod42 @justinstoller Looking into this further with Ethan, this is spilling over into failures in puppet acceptance as well:

http://jenkins-foss.delivery.puppetlabs.net/job/Puppet%20Acceptance%20(master)/label=acceptance,platform=lucid/900/consoleFull

See the puppet_manages_own_configuration_in_robust_manner.rb failure. I'm pretty sure the second failure is due to puppet group not being recreated, which is what the puppet_manges test was trying to do when it failed due to lack of json.

@jpartlow
Copy link

@jeffmccune @zaphod42 @erjohnso I've added #524 as a possible fix for this.

florindragos pushed a commit that referenced this pull request Jun 15, 2020
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.

4 participants