GoogleCloudPlatform / GoogleCloudPlatform/osconfig

yum versionlock not respected, resulting in failure

Open
#451 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
99
Forks
113
Avg merge
2d 10h
Merged PRs (30d)
5

Description

If you configure versionlock in yum, the daemon does not respect it, resulting in errors like the following:

```
OSConfigAgent[16306]: 2022-12-15T14:07:40.5867Z OSConfigAgent Error inventory.go:55: packages.GetPackageUpdates() error: error getting yum updates: error checking for yum updates, non-zero error code from 'yum update' but no packages parsed, stdout:
"Loaded plugins: versionlock
Excluding 1 update due to versionlock (use \"yum versionlock status\" to show it)
Resolving Dependencies
--> Running transaction check
---> Package dse.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-libcassandra.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-libcassandra = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-libgraph.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-libgraph = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-libhadoop2-client.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-libhadoop2-client = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-liblog4j.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-liblog4j = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-libsolr.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-libsolr = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-libspark.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-libspark = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package dse-libtomcat.noarch 0:6.0.13-1 will be updated
--> Processing Dependency: dse-libtomcat = 6.0.13 for package: dse-full-6.0.13-1.noarch
---> Package geoipupdate.x86_64 0:2.5.0-1.el7 will be installed"
--> Finished Dependency Resolution
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
```

This is the output of the systemd service.
As a result any patching job fails.
The service should automatically skip the packages in versionlock, like:

```
# yum versionlock status
Loaded plugins: versionlock
0:dse-full-6.0.11-1.*
versionlock list done

# yum update --exclude dse
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.