Merge lp:~gandelman-a/ubuntu/maverick/facter/lp732953_876130 into lp:ubuntu/maverick-updates/facter

Proposed by Adam Gandelman
Status: Needs review
Proposed branch: lp:~gandelman-a/ubuntu/maverick/facter/lp732953_876130
Merge into: lp:ubuntu/maverick-updates/facter
Diff against target: 51 lines (+18/-2)
3 files modified
debian/changelog (+11/-0)
lib/facter/ec2.rb (+2/-1)
lib/facter/util/collection.rb (+5/-1)
To merge this branch: bzr merge lp:~gandelman-a/ubuntu/maverick/facter/lp732953_876130
Reviewer Review Type Date Requested Status
Luke Yelavich (community) Approve
Review via email: mp+80367@code.launchpad.net

Description of the change

Rebased original MP on maverick-updates, fixed versioning and applied patches directly to source.

To post a comment you must log in.
Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks for your work, uploaded.

review: Approve

Unmerged revisions

14. By Adam Gandelman

lib/facter/util/collection.rb: Backported fix from upstream commit
2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
requested fact is not found. Ensures consistency after facts
have been cleared. (LP: #876130)

13. By Adam Gandelman

lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
of ec2 metadata service.(LP: #732953)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-01-27 19:03:10 +0000
+++ debian/changelog 2011-10-25 17:48:25 +0000
@@ -1,3 +1,14 @@
1facter (1.5.7-1ubuntu1.2) maverick-proposed; urgency=low
2
3 * lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
4 of ec2 metadata service.(LP: #732953)
5 * lib/facter/util/collection.rb: Backported fix from upstream commit
6 2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
7 requested fact is not found. Ensures consistency after facts
8 have been cleared. (LP: #876130)
9
10 -- Adam Gandelman <adamg@canonical.com> Tue, 25 Oct 2011 10:43:54 -0700
11
1facter (1.5.7-1ubuntu1.1) maverick-proposed; urgency=low12facter (1.5.7-1ubuntu1.1) maverick-proposed; urgency=low
213
3 * Cherry-picked KVM detection for 'virtual' fact from upstream commit14 * Cherry-picked KVM detection for 'virtual' fact from upstream commit
415
=== modified file 'lib/facter/ec2.rb'
--- lib/facter/ec2.rb 2009-06-30 00:21:23 +0000
+++ lib/facter/ec2.rb 2011-10-25 17:48:25 +0000
@@ -6,7 +6,8 @@
6require 'timeout'6require 'timeout'
77
8def can_connect?(ip,port,wait_sec=2)8def can_connect?(ip,port,wait_sec=2)
9 Timeout::timeout(wait_sec) {open(ip, port)}9 url = "http://#{ip}:#{port}"
10 Timeout::timeout(wait_sec) {open(url)}
10 return true11 return true
11rescue12rescue
12 return false13 return false
1314
=== modified file 'lib/facter/util/collection.rb'
--- lib/facter/util/collection.rb 2008-09-03 09:06:56 +0000
+++ lib/facter/util/collection.rb 2011-10-25 17:48:25 +0000
@@ -66,9 +66,13 @@
66 def fact(name)66 def fact(name)
67 name = canonize(name)67 name = canonize(name)
6868
69 # Try to load the fact if necessary
69 loader.load(name) unless @facts[name]70 loader.load(name) unless @facts[name]
7071
71 return @facts[name]72 # Try HARDER
73 loader.load_all unless @facts[name]
74
75 @facts[name]
72 end76 end
7377
74 # Flush all cached values.78 # Flush all cached values.

Subscribers

People subscribed via source and target branches