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
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-01-27 19:03:10 +0000
3+++ debian/changelog 2011-10-25 17:48:25 +0000
4@@ -1,3 +1,14 @@
5+facter (1.5.7-1ubuntu1.2) maverick-proposed; urgency=low
6+
7+ * lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
8+ of ec2 metadata service.(LP: #732953)
9+ * lib/facter/util/collection.rb: Backported fix from upstream commit
10+ 2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
11+ requested fact is not found. Ensures consistency after facts
12+ have been cleared. (LP: #876130)
13+
14+ -- Adam Gandelman <adamg@canonical.com> Tue, 25 Oct 2011 10:43:54 -0700
15+
16 facter (1.5.7-1ubuntu1.1) maverick-proposed; urgency=low
17
18 * Cherry-picked KVM detection for 'virtual' fact from upstream commit
19
20=== modified file 'lib/facter/ec2.rb'
21--- lib/facter/ec2.rb 2009-06-30 00:21:23 +0000
22+++ lib/facter/ec2.rb 2011-10-25 17:48:25 +0000
23@@ -6,7 +6,8 @@
24 require 'timeout'
25
26 def can_connect?(ip,port,wait_sec=2)
27- Timeout::timeout(wait_sec) {open(ip, port)}
28+ url = "http://#{ip}:#{port}"
29+ Timeout::timeout(wait_sec) {open(url)}
30 return true
31 rescue
32 return false
33
34=== modified file 'lib/facter/util/collection.rb'
35--- lib/facter/util/collection.rb 2008-09-03 09:06:56 +0000
36+++ lib/facter/util/collection.rb 2011-10-25 17:48:25 +0000
37@@ -66,9 +66,13 @@
38 def fact(name)
39 name = canonize(name)
40
41+ # Try to load the fact if necessary
42 loader.load(name) unless @facts[name]
43
44- return @facts[name]
45+ # Try HARDER
46+ loader.load_all unless @facts[name]
47+
48+ @facts[name]
49 end
50
51 # Flush all cached values.

Subscribers

People subscribed via source and target branches