[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#968037: buster-pu: package facter/3.11.0-2+deb10u1



Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,
if you run facter in the context of Googles GCE it will fetch
information from Googles metadata service, but form an old
beta API endpoint. This one is due to get shutdown by the
end of September 2020.
https://cloud.google.com/compute/docs/migrating-to-v1-metadata-server

This was fixed upstream already some time ago for the 3.11.x branch in
https://github.com/puppetlabs/facter/commit/1a0bc4e984716dc5145e5bb8fbf14b1ac0fd8c04

For unstable I've uploaded a NMU to delayed-10 which got processed
a few minutes ago. That is https://bugs.debian.org/966374
I also tested a private build of the package inside the infrastructure at work
for the past ten days without issues.

Here is a proposed upload targeting buster to get this one also fixed
for our current stable release. Additionally I made that available to
the maintainer group at salsa at
https://salsa.debian.org/puppet-team/facter/-/merge_requests/1

Cheers,
Sven

-- System Information:
Debian Release: 10.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (90, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-10-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru facter-3.11.0/debian/changelog facter-3.11.0/debian/changelog
--- facter-3.11.0/debian/changelog	2019-07-17 22:04:05.000000000 +0200
+++ facter-3.11.0/debian/changelog	2020-07-27 17:27:11.000000000 +0200
@@ -1,3 +1,11 @@
+facter (3.11.0-2+deb10u2) buster; urgency=medium
+
+  * Change Google GCE Metadata endpoint from "v1beta1" to "v1".
+    Adds patch debian/patches/FACT-2018-update-gce-metadata-endpoint.patch
+    (Closes: #966374)
+
+ -- Sven Hoexter <hoexter@debian.org>  Mon, 27 Jul 2020 17:27:11 +0200
+
 facter (3.11.0-2+deb10u1) buster; urgency=medium
 
   * Fix parsing of Linux route non-kv flags (e.g. onlink) (Closes: #918250)
diff -Nru facter-3.11.0/debian/patches/FACT-2018-update-gce-metadata-endpoint.patch facter-3.11.0/debian/patches/FACT-2018-update-gce-metadata-endpoint.patch
--- facter-3.11.0/debian/patches/FACT-2018-update-gce-metadata-endpoint.patch	1970-01-01 01:00:00.000000000 +0100
+++ facter-3.11.0/debian/patches/FACT-2018-update-gce-metadata-endpoint.patch	2020-07-27 17:27:11.000000000 +0200
@@ -0,0 +1,30 @@
+From: Gabriel Nagy <gabriel.nagy@puppet.com>
+Subject: (FACT-2018) Update GCE metadata endpoint
+
+    Google Compute Engine's internal metadata service will be deprecating
+    the 'v1beta1' endpoint sometime before end of calendar year 2019. This
+    commit updates the GCE resolver to use the 'v1' endpoint instead.
+    
+    Using the 'v1' endpoint also requires setting a custom User-Agent
+    header that was not necessary in the old 'v1beta1' endpoint.
+    
+    For more details about GCE metadata, please see
+    https://cloud.google.com/compute/docs/storing-retrieving-metadata
+
+
+Origin: upstream, https://github.com/puppetlabs/facter/commit/1a0bc4e984716dc5145e5bb8fbf14b1ac0fd8c04
+Bug-Debian: http://bugs.debian.org/966374
+Index: facter/lib/src/facts/resolvers/gce_resolver.cc
+===================================================================
+--- facter.orig/lib/src/facts/resolvers/gce_resolver.cc
++++ facter/lib/src/facts/resolvers/gce_resolver.cc
+@@ -240,7 +240,8 @@ namespace facter { namespace facts { nam
+ 
+         try
+         {
+-            lth_curl::request req("http://metadata.google.internal/computeMetadata/v1beta1/?recursive=true&alt=json";);
++            lth_curl::request req("http://metadata.google.internal/computeMetadata/v1/?recursive=true&alt=json";);
++            req.add_header("Metadata-Flavor", "Google");
+             req.connection_timeout(GCE_CONNECTION_TIMEOUT);
+             req.timeout(GCE_SESSION_TIMEOUT);
+             if (!http_langs().empty())
diff -Nru facter-3.11.0/debian/patches/series facter-3.11.0/debian/patches/series
--- facter-3.11.0/debian/patches/series	2019-07-17 22:03:31.000000000 +0200
+++ facter-3.11.0/debian/patches/series	2020-07-27 17:27:11.000000000 +0200
@@ -1,3 +1,4 @@
+FACT-2018-update-gce-metadata-endpoint.patch
 use-shared-cpp-hocon.patch
 ruby-fix-library-name.patch
 disable-facter-smoke.patch

Reply to: