Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package google-osconfig-agent for
openSUSE:Factory checked in at 2021-05-12 19:32:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-osconfig-agent (Old)
and /work/SRC/openSUSE:Factory/.google-osconfig-agent.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "google-osconfig-agent"
Wed May 12 19:32:53 2021 rev:4 rq:892551 version:20210506.00
Changes:
--------
---
/work/SRC/openSUSE:Factory/google-osconfig-agent/google-osconfig-agent.changes
2021-04-01 14:19:21.068159059 +0200
+++
/work/SRC/openSUSE:Factory/.google-osconfig-agent.new.2988/google-osconfig-agent.changes
2021-05-12 19:33:36.166709114 +0200
@@ -1,0 +2,58 @@
+Tue May 11 08:29:01 UTC 2021 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to version 20210506.00 (bsc#1185848, bsc#1185849)
+ * Add more os policy assignment examples (#348)
+ * e2e_tests: enable stable tests for OSPolicies (#347)
+ * Align start and end task logs (#346)
+ * ConfigTask: add additional info logs (#345)
+ * e2e_tests: add validation tests (#344)
+ * Config Task: make sure agent respects policy mode (#343)
+ * update
+ * e2e_tests: readd retries to OSPolicies
+ * Set minWaitDuration as a string instead of object (#341)
+ * e2e_tests: Fix a few SUSE tests (#339)
+ * Remove pre-release flag from config (#340)
+ * e2e_tests: fixup OSPolicy tests (#338)
+ * e2e_tests: unlock mutex for CreatePolicies as soon as create finishes
(#337)
+ * e2e_tests: Don't retry failed OSPolicy tests, fix msi test (#336)
+ * Examples for os policy assignments (#334)
+ * e2e_tests: increase the deadline for OSPolicy tests and only start after a
zone has been secured (#335)
+ * Fix panic when installing MSI (#332)
+ * e2e_tests: Add test cases of installing dbe, rpm and msi packages (#333)
+ * e2e_tests: add more logging
+ * e2e_tests: (#330)
+ * e2e_test: Add timouts to OSPolicy tests so we don't wait forever (#329)
+ * Create top level directories for gcloud and console for os policy
assignment examples (#328)
+ * e2e_tests: Move api from an internal directory (#327)
+ * Make sure we use the same test name for reruns (#326)
+ * Add CONFIG_V1 capability (#325)
+ * e2e_tests: reduce size of instances, use pd-balanced, rerun failed tests
once (#324)
+ * Only report installed packages for dpkg (#322)
+ * e2e_tests: fix windows package and repository tests (#323)
+ * Add top level directories for os policy examples (#321)
+ * e2e_tests: move to using inventory api for inventory reporting (#320)
+ * e2e_tests: add ExecResource tests (#319)
+ * ExecResource: make sure we set permissions correctly for downloaded files
(#318)
+ * Config task: only run post check on resources that have already been
evaluated (#317)
+ * e2e_test: reorganize OSPolicy tests to be per Resource type (#316)
+ * Set custom user agent (#299)
+ * e2e_tests: check InstanceOSPoliciesCompliance for each test case, add
LocalPath FileResource test (#314)
+ * PackageResource: make sure to run AptUpdate prior to package install (#315)
+ * Fix bugs/add more logging for OSPolicies (#313)
+ * Change metadata http client to ignore http proxies (#312)
+ * e2e_test: add tests for FileResource (#311)
+ * Add task_type context logging (#310)
+ * Fix e2e_test typo (#309)
+ * Fix e2e_tests (#308)
+ * Disable OSPolicies by default since it is an unreleased feature (#307)
+ * e2e_tests: Add more OSPolicies package and repo tests (#306)
+ * Do not enforce repo_gpgcheck in guestpolicies (#305)
+ * Gather inventory 3-5min after agent start (#303)
+ * e2e_tests: add OSPolicies tests for package install (#302)
+ * Add helpful error log if a service account is missing (#304)
+ * OSPolicies: correct apt repo extension, remove yum/zypper gpgcheck
override (#301)
+ * Update cos library to parse new version of packages file (#300)
+ * config_task: Rework config step logic (#296)
+ * e2e_test: enable serial logs in cos to support ReportInventory test (#297)
+
+-------------------------------------------------------------------
Old:
----
osconfig-20210316.00.tar.gz
New:
----
osconfig-20210506.00.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ google-osconfig-agent.spec ++++++
--- /var/tmp/diff_new_pack.zfWQFD/_old 2021-05-12 19:33:36.778706670 +0200
+++ /var/tmp/diff_new_pack.zfWQFD/_new 2021-05-12 19:33:36.782706654 +0200
@@ -24,7 +24,7 @@
%global import_path %{provider_prefix}
Name: google-osconfig-agent
-Version: 20210316.00
+Version: 20210506.00
Release: 0
Summary: Google Cloud Guest Agent
License: Apache-2.0
++++++ _service ++++++
--- /var/tmp/diff_new_pack.zfWQFD/_old 2021-05-12 19:33:36.834706445 +0200
+++ /var/tmp/diff_new_pack.zfWQFD/_new 2021-05-12 19:33:36.834706445 +0200
@@ -3,8 +3,8 @@
<param name="url">https://github.com/GoogleCloudPlatform/osconfig</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
- <param name="versionformat">20210316.00</param>
- <param name="revision">20210316.00</param>
+ <param name="versionformat">20210506.00</param>
+ <param name="revision">20210506.00</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
@@ -15,6 +15,6 @@
<param name="basename">osconfig</param>
</service>
<service name="go_modules" mode="disabled">
- <param name="archive">osconfig-20210316.00.tar.gz</param>
+ <param name="archive">osconfig-20210506.00.tar.gz</param>
</service>
</services>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.zfWQFD/_old 2021-05-12 19:33:36.858706350 +0200
+++ /var/tmp/diff_new_pack.zfWQFD/_new 2021-05-12 19:33:36.862706334 +0200
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/GoogleCloudPlatform/osconfig</param>
- <param
name="changesrevision">0fdd9dc6e618aab01e8be0f3970fa98864d44b38</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">c19bf97eea982fe821f9194a4ad427424941a998</param></service></servicedata>
\ No newline at end of file
++++++ osconfig-20210316.00.tar.gz -> osconfig-20210506.00.tar.gz ++++++
++++ 16710 lines of diff (skipped)
++++++ vendor.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/artifacts.go
new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/artifacts.go
--- old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/artifacts.go
2021-03-17 10:25:52.818388500 +0100
+++ new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/artifacts.go
2021-05-11 10:28:26.738579000 +0200
@@ -4,6 +4,7 @@
"fmt"
"io/ioutil"
"os"
+ "path"
"path/filepath"
log "github.com/golang/glog"
@@ -13,9 +14,7 @@
)
const (
- // TODO(mikewu): consider making GCS buckets as flags.
cosToolsGCS = "cos-tools"
- internalGCS = "container-vm-image-staging"
chromiumOSSDKGCS = "chromiumos-sdk"
kernelInfo = "kernel_info"
kernelSrcArchive = "kernel-src.tar.gz"
@@ -38,13 +37,22 @@
// GCSDownloader is the struct downloading COS artifacts from GCS bucket.
type GCSDownloader struct {
- envReader *EnvReader
- Internal bool
+ envReader *EnvReader
+ gcsDownloadBucket string
+ gcsDownloadPrefix string
}
// NewGCSDownloader creates a GCSDownloader instance.
-func NewGCSDownloader(e *EnvReader, i bool) *GCSDownloader {
- return &GCSDownloader{e, i}
+func NewGCSDownloader(e *EnvReader, bucket, prefix string) *GCSDownloader {
+ // Use cos-tools as the default GCS bucket.
+ if bucket == "" {
+ bucket = cosToolsGCS
+ }
+ // Use build number as the default GCS download prefix.
+ if prefix == "" {
+ prefix = e.BuildNumber()
+ }
+ return &GCSDownloader{e, bucket, prefix}
}
// DownloadKernelSrc downloads COS kernel sources to destination directory.
@@ -95,32 +103,13 @@
return content, nil
}
-// DownloadArtifact downloads an artifact from GCS buckets, including public
bucket and internal bucket.
-// TODO(mikewu): consider allow users to pass in GCS directories in arguments.
+// DownloadArtifact downloads an artifact from the GCS prefix configured in
GCSDownloader.
func (d *GCSDownloader) DownloadArtifact(destDir, artifactPath string) error {
- var err error
-
- if err = utils.DownloadFromGCS(destDir, cosToolsGCS,
d.artifactPublicPath(artifactPath)); err == nil {
- return nil
+ gcsPath := path.Join(d.gcsDownloadPrefix, artifactPath)
+ if err := utils.DownloadFromGCS(destDir, d.gcsDownloadBucket, gcsPath);
err != nil {
+ return errors.Errorf("failed to download %s from gs://%s/%s",
artifactPath, d.gcsDownloadBucket, gcsPath)
}
- log.Errorf("Failed to download %s from public GCS: %v", artifactPath,
err)
-
- if d.Internal {
- if err = utils.DownloadFromGCS(destDir, internalGCS,
d.artifactInternalPath(artifactPath)); err == nil {
- return nil
- }
- log.Errorf("Failed to download %s from internal GCS: %v",
artifactPath, err)
- }
-
- return errors.Errorf("failed to download %s", artifactPath)
-}
-
-func (d *GCSDownloader) artifactPublicPath(artifactPath string) string {
- return fmt.Sprintf("%s/%s", d.envReader.BuildNumber(), artifactPath)
-}
-
-func (d *GCSDownloader) artifactInternalPath(artifactPath string) string {
- return fmt.Sprintf("lakitu-release/R%s-%s/%s", d.envReader.Milestone(),
d.envReader.BuildNumber(), artifactPath)
+ return nil
}
func (d *GCSDownloader) getToolchainURL() (string, error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/extensions.go
new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/extensions.go
--- old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/extensions.go
2021-03-17 10:25:52.818388500 +0100
+++ new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/extensions.go
2021-05-11 10:28:26.738579000 +0200
@@ -2,12 +2,11 @@
import (
"fmt"
- "path/filepath"
+ "path"
"regexp"
"cos.googlesource.com/cos/tools.git/src/pkg/utils"
- log "github.com/golang/glog"
"github.com/pkg/errors"
)
@@ -28,18 +27,10 @@
func (d *GCSDownloader) ListExtensions() ([]string, error) {
var objects []string
var err error
- if objects, err = utils.ListGCSBucket(cosToolsGCS,
d.artifactPublicPath("extensions")); err != nil || len(objects) == 0 {
- log.Errorf("Failed to list extensions from public GCS: %v", err)
- if d.Internal {
- if objects, err = utils.ListGCSBucket(internalGCS,
d.artifactInternalPath("extensions")); err != nil {
- log.Errorf("Failed to list extensions from
internal GCS: %v", err)
- }
- }
- }
- if err != nil {
+ gcsPath := path.Join(d.gcsDownloadPrefix, "extensions")
+ if objects, err = utils.ListGCSBucket(d.gcsDownloadBucket, gcsPath);
err != nil {
return nil, errors.Wrap(err, "failed to list extensions")
}
-
var extensions []string
re := regexp.MustCompile(`extensions/(\w+)$`)
for _, object := range objects {
@@ -51,21 +42,11 @@
}
// ListExtensionArtifacts lists all artifacts of a given extension.
-// TODO(mikewu): make this extension specific.
func (d *GCSDownloader) ListExtensionArtifacts(extension string) ([]string,
error) {
var objects []string
var err error
- extensionPath := filepath.Join("extensions", extension)
- if objects, err = utils.ListGCSBucket(cosToolsGCS,
d.artifactPublicPath(extensionPath)); err != nil || len(objects) == 0 {
- log.Errorf("Failed to list extension artifacts from public GCS:
%v", err)
- // TODO(mikewu): use flags to specify GCS directories.
- if d.Internal {
- if objects, err = utils.ListGCSBucket(internalGCS,
d.artifactInternalPath(extensionPath)); err != nil {
- log.Errorf("Failed to list extension artifacts
from internal GCS: %v", err)
- }
- }
- }
- if err != nil {
+ gcsPath := path.Join(d.gcsDownloadPrefix, "extensions", extension)
+ if objects, err = utils.ListGCSBucket(d.gcsDownloadBucket, gcsPath);
err != nil {
return nil, errors.Wrap(err, "failed to list extensions")
}
@@ -79,14 +60,19 @@
return artifacts, nil
}
+// ListGPUExtensionArtifacts lists all artifacts of GPU extension.
+func (d *GCSDownloader) ListGPUExtensionArtifacts() ([]string, error) {
+ return d.ListExtensionArtifacts(GPUExtension)
+}
+
// DownloadExtensionArtifact downloads an artifact of the given extension.
func (d *GCSDownloader) DownloadExtensionArtifact(destDir, extension, artifact
string) error {
- artifactPath := filepath.Join("extensions", extension, artifact)
+ artifactPath := path.Join("extensions", extension, artifact)
return d.DownloadArtifact(destDir, artifactPath)
}
// GetExtensionArtifact reads the content of an artifact of the given
extension.
func (d *GCSDownloader) GetExtensionArtifact(extension, artifact string)
([]byte, error) {
- artifactPath := filepath.Join("extensions", extension, artifact)
+ artifactPath := path.Join("extensions", extension, artifact)
return d.GetArtifact(artifactPath)
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/pkg_info.go
new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/pkg_info.go
--- old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/pkg_info.go
2021-03-17 10:25:52.818388500 +0100
+++ new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/cos/pkg_info.go
2021-05-11 10:28:26.738579000 +0200
@@ -4,33 +4,34 @@
"encoding/json"
"io/ioutil"
"os"
- "strconv"
)
const packageInfoDefaultJSONFile = "/etc/cos-package-info.json"
// Package represents a COS package.
type Package struct {
- Category string
- Name string
- Version string
- Revision int
+ Category string
+ Name string
+ Version string
+ EbuildVersion string
}
// PackageInfo contains information about the packages of a COS instance.
type PackageInfo struct {
InstalledPackages []Package
+ BuildTimePackages []Package
}
type packageJSON struct {
- Category string `json:"category"`
- Name string `json:"name"`
- Version string `json:"version"`
- Revision string `json:"revision"`
+ Category string `json:"category"`
+ Name string `json:"name"`
+ Version string `json:"version"`
+ EbuildVersion string `json:"ebuild_version"`
}
type packageInfoJSON struct {
InstalledPackages []packageJSON `json:"installedPackages"`
+ BuildTimePackages []packageJSON `json:"buildTimePackages"`
}
// PackageInfoExists returns whether COS package information exists.
@@ -45,7 +46,7 @@
return GetPackageInfoFromFile(packageInfoDefaultJSONFile)
}
-// GetPackageInfoFromFile loads the pacakge information from the specified file
+// GetPackageInfoFromFile loads the package information from the specified file
// and returns it.
func GetPackageInfoFromFile(filename string) (PackageInfo, error) {
var packageInfo PackageInfo
@@ -74,12 +75,18 @@
p.Category = pJSON.Category
p.Name = pJSON.Name
p.Version = pJSON.Version
- if pJSON.Revision != "" {
- p.Revision, err = strconv.Atoi(pJSON.Revision)
- if err != nil {
- return packageInfo, err
- }
- }
+ p.EbuildVersion = pJSON.EbuildVersion
+ }
+
+ packageInfo.BuildTimePackages = make([]Package,
len(piJSON.BuildTimePackages))
+ for i := range piJSON.BuildTimePackages {
+ pJSON := &piJSON.BuildTimePackages[i]
+ p := &packageInfo.BuildTimePackages[i]
+
+ p.Category = pJSON.Category
+ p.Name = pJSON.Name
+ p.Version = pJSON.Version
+ p.EbuildVersion = pJSON.EbuildVersion
}
return packageInfo, nil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/gobutils.go
new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/gobutils.go
--- old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/gobutils.go
2021-03-17 10:25:52.818388500 +0100
+++ new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/gobutils.go
2021-05-11 10:28:26.738579000 +0200
@@ -22,10 +22,12 @@
import (
"context"
"fmt"
+ "regexp"
"time"
- log "github.com/sirupsen/logrus"
"go.chromium.org/luci/common/proto/git"
+
+ log "github.com/sirupsen/logrus"
gitilesProto "go.chromium.org/luci/common/proto/gitiles"
)
@@ -124,3 +126,17 @@
log.Debugf("Retrieved %d commits from %s in %s\n", len(allCommits),
repo, time.Since(start))
return allCommits, response.NextPageToken != "", nil
}
+
+// CreateGerritURL creates a Gerrit URL from a given
+// Gitiles Host URL. For example: If the given Gitiles
+// Host URL is: https://cos.googlesource.com, then it will
+// return https://cos-review.googlesource.com. In case the
+// Gitiles Host URL is in incorrect format, error is returned.
+func CreateGerritURL(gitilesHostURL string) (string, error) {
+ re := regexp.MustCompile("(.+://)?(.+?).googlesource.com")
+ ss := re.FindStringSubmatch(gitilesHostURL)
+ if len(ss) > 0 {
+ return fmt.Sprintf("https://%s-review.googlesource.com",
ss[len(ss)-1]), nil
+ }
+ return "", fmt.Errorf("failed to created Gerrit Host URL from invalid
Gitiles Host URL: %q", gitilesHostURL)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/utils.go
new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/utils.go
--- old/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/utils.go
2021-03-17 10:25:52.818388500 +0100
+++ new/vendor/cos.googlesource.com/cos/tools.git/src/pkg/utils/utils.go
2021-05-11 10:28:26.738579000 +0200
@@ -16,8 +16,9 @@
"syscall"
"time"
- log "github.com/golang/glog"
"github.com/pkg/errors"
+
+ log "github.com/golang/glog"
)
var (
@@ -267,8 +268,13 @@
// RunCommandAndLogOutput runs the given command and logs the stdout and
stderr in parallel.
func RunCommandAndLogOutput(cmd *exec.Cmd, expectError bool) error {
+ errLogger := log.Error
+ if expectError {
+ errLogger = log.V(1).Info
+ }
+
cmd.Stdout = &loggingWriter{logger: log.Info}
- cmd.Stderr = &loggingWriter{logger: log.Error}
+ cmd.Stderr = &loggingWriter{logger: errLogger}
err := cmd.Run()
if _, ok := err.(*exec.ExitError); ok && expectError {
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
2021-03-17 10:25:52.818388500 +0100
+++ new/vendor/github.com/GoogleCloudPlatform/guest-logging-go/logger/logger.go
2021-05-11 10:28:26.738579000 +0200
@@ -23,6 +23,7 @@
"time"
"cloud.google.com/go/logging"
+ "google.golang.org/api/option"
)
var (
@@ -48,7 +49,13 @@
// FormatFunction will produce the string representation of each log
event.
FormatFunction func(LogEntry) string
// Additional writers that will be used during logging.
- Writers []io.Writer
+ Writers []io.Writer
+ UserAgent string
+}
+
+// SetDebugLogging enables or disables debug level logging.
+func SetDebugLogging(enabled bool) {
+ debugEnabled = enabled
}
// Init instantiates the logger.
@@ -70,7 +77,11 @@
if !opts.DisableCloudLogging && opts.ProjectName != "" {
var err error
- cloudLoggingClient, err = logging.NewClient(ctx,
opts.ProjectName)
+ cOpts := []option.ClientOption{}
+ if opts.UserAgent != "" {
+ cOpts = append(cOpts,
option.WithUserAgent(opts.UserAgent))
+ }
+ cloudLoggingClient, err = logging.NewClient(ctx,
opts.ProjectName, cOpts...)
if err != nil {
Errorf("Continuing without cloud logging due to error
in initialization: %v", err.Error())
// Log but don't return this error, as it doesn't
prevent continuing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt
--- old/vendor/modules.txt 2021-03-17 10:25:53.022391000 +0100
+++ new/vendor/modules.txt 2021-05-11 10:28:26.858586500 +0200
@@ -14,10 +14,10 @@
cloud.google.com/go/logging/internal
# cloud.google.com/go/storage v1.12.0
cloud.google.com/go/storage
-# cos.googlesource.com/cos/tools.git v0.0.0-20201007223835-69bef9e73b80
+# cos.googlesource.com/cos/tools.git v0.0.0-20210329212435-a349a79f950d
cos.googlesource.com/cos/tools.git/src/pkg/cos
cos.googlesource.com/cos/tools.git/src/pkg/utils
-# github.com/GoogleCloudPlatform/guest-logging-go
v0.0.0-20200113214433-6cbb518174d4
+# github.com/GoogleCloudPlatform/guest-logging-go
v0.0.0-20210406211301-f238c1e3c0e3
github.com/GoogleCloudPlatform/guest-logging-go/logger
# github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
github.com/StackExchange/wmi