Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package google-guest-agent for 
openSUSE:Factory checked in at 2023-01-18 17:11:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-guest-agent (Old)
 and      /work/SRC/openSUSE:Factory/.google-guest-agent.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "google-guest-agent"

Wed Jan 18 17:11:22 2023 rev:19 rq:1059351 version:20230112.00

Changes:
--------
--- /work/SRC/openSUSE:Factory/google-guest-agent/google-guest-agent.changes    
2022-11-17 17:24:46.777152766 +0100
+++ 
/work/SRC/openSUSE:Factory/.google-guest-agent.new.32243/google-guest-agent.changes
 2023-01-18 17:11:24.923896928 +0100
@@ -1,0 +2,7 @@
+Wed Jan 18 09:37:52 UTC 2023 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- Update to version 20230112.00
+  * Updating logging module so cloud logs are flushed prior to exit (#196)
+  * Windows: retry adding MDS route (#194)
+
+-------------------------------------------------------------------

Old:
----
  guest-agent-20221109.00.tar.gz

New:
----
  guest-agent-20230112.00.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ google-guest-agent.spec ++++++
--- /var/tmp/diff_new_pack.aNTpoH/_old  2023-01-18 17:11:26.031903187 +0100
+++ /var/tmp/diff_new_pack.aNTpoH/_new  2023-01-18 17:11:26.035903210 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package google-guest-agent
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 %global import_path     %{provider_prefix}
 
 Name:           google-guest-agent
-Version:        20221109.00
+Version:        20230112.00
 Release:        0
 Summary:        Google Cloud Guest Agent
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.aNTpoH/_old  2023-01-18 17:11:26.063903368 +0100
+++ /var/tmp/diff_new_pack.aNTpoH/_new  2023-01-18 17:11:26.067903391 +0100
@@ -3,8 +3,8 @@
     <param 
name="url">https://github.com/GoogleCloudPlatform/guest-agent/</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="versionformat">20221109.00</param>
-    <param name="revision">20221109.00</param>
+    <param name="versionformat">20230112.00</param>
+    <param name="revision">20230112.00</param>
     <param name="changesgenerate">enable</param>
   </service>
   <service name="recompress" mode="disabled">
@@ -15,7 +15,7 @@
     <param name="basename">guest-agent</param>
   </service>
   <service name="go_modules" mode="disabled">
-    <param name="archive">guest-agent-20221109.00.tar.gz</param>
+    <param name="archive">guest-agent-20230112.00.tar.gz</param>
   </service>
 </services>
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.aNTpoH/_old  2023-01-18 17:11:26.087903504 +0100
+++ /var/tmp/diff_new_pack.aNTpoH/_new  2023-01-18 17:11:26.091903526 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/GoogleCloudPlatform/guest-agent/</param>
-              <param 
name="changesrevision">8b46231252fe54d69287ff22ca2219e111dfb35d</param></service></servicedata>
+              <param 
name="changesrevision">5ea74174d32403b37ca1c9c5e1436285c0312c78</param></service></servicedata>
 (No newline at EOF)
 

++++++ guest-agent-20221109.00.tar.gz -> guest-agent-20230112.00.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-agent-20221109.00/go.mod 
new/guest-agent-20230112.00/go.mod
--- old/guest-agent-20221109.00/go.mod  2022-11-08 02:00:38.000000000 +0100
+++ new/guest-agent-20230112.00/go.mod  2023-01-09 19:51:58.000000000 +0100
@@ -4,7 +4,7 @@
 
 require (
        cloud.google.com/go/storage v1.22.1
-       github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20210621170517-facc9c0d81b9
+       github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20221216194522-f549ad6a1730
        github.com/go-ini/ini v1.66.6
        github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
        github.com/golang/protobuf v1.5.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-agent-20221109.00/go.sum 
new/guest-agent-20230112.00/go.sum
--- old/guest-agent-20221109.00/go.sum  2022-11-08 02:00:38.000000000 +0100
+++ new/guest-agent-20230112.00/go.sum  2023-01-09 19:51:58.000000000 +0100
@@ -65,6 +65,8 @@
 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod 
h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
 github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20210621170517-facc9c0d81b9 
h1:Qq6KJSPMb1wCih/rqzQs3Ni2ShuCYc4q51wTx8lpy6Q=
 github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20210621170517-facc9c0d81b9/go.mod 
h1:3F/urXs15KEI7RBGoOsK9/jCCJPBKHxyZH/Nzc7uldo=
+github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20221216194522-f549ad6a1730 
h1:l4Hin8i/7I1R0cvWBP+z6JdRxU4yJWFbcXvJ8mKKC70=
+github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20221216194522-f549ad6a1730/go.mod 
h1:3F/urXs15KEI7RBGoOsK9/jCCJPBKHxyZH/Nzc7uldo=
 github.com/OneOfOne/xxhash v1.2.2/go.mod 
h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
 github.com/antihax/optional v1.0.0/go.mod 
h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod 
h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/guest-agent-20221109.00/google_guest_agent/instance_setup.go 
new/guest-agent-20230112.00/google_guest_agent/instance_setup.go
--- old/guest-agent-20221109.00/google_guest_agent/instance_setup.go    
2022-11-08 02:00:38.000000000 +0100
+++ new/guest-agent-20230112.00/google_guest_agent/instance_setup.go    
2023-01-09 19:51:58.000000000 +0100
@@ -31,6 +31,48 @@
        "github.com/go-ini/ini"
 )
 
+func getDefaultAdapter(fes []ipForwardEntry) (*ipForwardEntry, error) {
+       // Choose the first adapter index that has the default route setup.
+       // This is equivalent to how route.exe works when interface is not 
provided.
+       sort.Slice(fes, func(i, j int) bool { return fes[i].ipForwardIfIndex < 
fes[j].ipForwardIfIndex })
+       for _, fe := range fes {
+               if fe.ipForwardDest.Equal(net.ParseIP("0.0.0.0")) {
+                       return &fe, nil
+               }
+       }
+       return nil, fmt.Errorf("could not find default route")
+}
+
+func addMetadataRoute() error {
+       fes, err := getIPForwardEntries()
+       if err != nil {
+               return err
+       }
+
+       defaultRoute, err := getDefaultAdapter(fes)
+       if err != nil {
+               return err
+       }
+
+       forwardEntry := ipForwardEntry{
+               ipForwardDest:    net.ParseIP("169.254.169.254"),
+               ipForwardMask:    net.IPv4Mask(255, 255, 255, 255),
+               ipForwardNextHop: net.ParseIP("0.0.0.0"),
+               ipForwardMetric1: defaultRoute.ipForwardMetric1, // Must be <= 
the default route metric.
+               ipForwardIfIndex: defaultRoute.ipForwardIfIndex,
+       }
+
+       for _, fe := range fes {
+               if fe.ipForwardDest.Equal(forwardEntry.ipForwardDest) && 
fe.ipForwardIfIndex == forwardEntry.ipForwardIfIndex {
+                       // No need to add entry, it's already setup.
+                       return nil
+               }
+       }
+
+       logger.Infof("Adding route to metadata server on adapter with index 
%d", defaultRoute.ipForwardIfIndex)
+       return addIPForwardEntry(forwardEntry)
+}
+
 func agentInit(ctx context.Context) {
        // Actions to take on agent startup.
        //
@@ -49,59 +91,14 @@
        // TODO incorporate these scripts into the agent. liamh@12-11-19
 
        if runtime.GOOS == "windows" {
-               msg := "Could not set default route to metadata"
-               fes, err := getIPForwardEntries()
-               if err != nil {
-                       logger.Errorf("%s, error listing IPForwardEntries: %v", 
msg, err)
-                       return
-               }
-
-               // Choose the first adapter index that has the default route 
setup.
-               // This is equivalent to how route.exe works when interface is 
not provided.
-               var index int32
-               var found bool
-               var metric int32
-               sort.Slice(fes, func(i, j int) bool { return 
fes[i].ipForwardIfIndex < fes[j].ipForwardIfIndex })
-               for _, fe := range fes {
-                       if fe.ipForwardDest.Equal(net.ParseIP("0.0.0.0")) {
-                               index = fe.ipForwardIfIndex
-                               metric = fe.ipForwardMetric1
-                               found = true
+               // Indefinitely retry to set up required MDS route.
+               for ; ; time.Sleep(1 * time.Second) {
+                       if err := addMetadataRoute(); err != nil {
+                               logger.Errorf("Could not set default route to 
metadata: %v", err)
+                       } else {
                                break
                        }
                }
-
-               if found == false {
-                       logger.Errorf("%s, could not find the default route in 
IPForwardEntries: %+v", msg, fes)
-                       return
-               }
-
-               iface, err := net.InterfaceByIndex(int(index))
-               if err != nil {
-                       logger.Errorf("%s, error from net.InterfaceByIndex(%d): 
%v", msg, index, err)
-                       return
-               }
-
-               forwardEntry := ipForwardEntry{
-                       ipForwardDest:    net.ParseIP("169.254.169.254"),
-                       ipForwardMask:    net.IPv4Mask(255, 255, 255, 255),
-                       ipForwardNextHop: net.ParseIP("0.0.0.0"),
-                       ipForwardMetric1: metric, // This needs to be at least 
equal to the default route metric.
-                       ipForwardIfIndex: int32(iface.Index),
-               }
-
-               for _, fe := range fes {
-                       if fe.ipForwardDest.Equal(forwardEntry.ipForwardDest) 
&& fe.ipForwardIfIndex == forwardEntry.ipForwardIfIndex {
-                               // No need to add entry, it's already setup.
-                               return
-                       }
-               }
-
-               logger.Infof("Adding route to metadata server on %q (index: 
%d)", iface.Name, iface.Index)
-               if err := addIPForwardEntry(forwardEntry); err != nil {
-                       logger.Errorf("%s, error adding IPForwardEntry on %q 
(index: %d): %v", msg, iface.Name, iface.Index, err)
-                       return
-               }
        } else {
                // Linux instance setup.
                defer runCmd(exec.Command("systemd-notify", "--ready"))

++++++ vendor.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/github.com/GoogleCloudPlatform/guest-logging-go/logger/logger.go 
new/vendor/github.com/GoogleCloudPlatform/guest-logging-go/logger/logger.go
--- old/vendor/github.com/GoogleCloudPlatform/guest-logging-go/logger/logger.go 
2022-11-16 16:50:10.000000000 +0100
+++ new/vendor/github.com/GoogleCloudPlatform/guest-logging-go/logger/logger.go 
2023-01-18 10:37:34.000000000 +0100
@@ -116,6 +116,7 @@
 // Close closes the logger.
 func Close() {
        if cloudLoggingClient != nil {
+               cloudLogger.Flush()
                cloudLoggingClient.Close()
        }
        localClose()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt
--- old/vendor/modules.txt      2022-11-16 16:50:10.000000000 +0100
+++ new/vendor/modules.txt      2023-01-18 10:37:34.000000000 +0100
@@ -17,7 +17,7 @@
 cloud.google.com/go/storage
 cloud.google.com/go/storage/internal
 cloud.google.com/go/storage/internal/apiv2
-# github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20210621170517-facc9c0d81b9
+# github.com/GoogleCloudPlatform/guest-logging-go 
v0.0.0-20221216194522-f549ad6a1730
 ## explicit
 github.com/GoogleCloudPlatform/guest-logging-go/logger
 # github.com/go-ini/ini v1.66.6

Reply via email to