/etc/update-motd.d/50-landscape-sysinfo: 24: cannot create /var/lib/landscape/landscape-sysinfo.cache: Permission denied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Released
|
Undecided
|
Mitch Burton | ||
landscape-client (Ubuntu) |
Fix Released
|
High
|
Mitch Burton | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
landscape-common in mantic has regressed the autopkgtests for update-motd. The landscape-common package is installed in the cloud images, and as a result its update-motd hook is called as part of the autopkgtest. And for whatever reason, in mantic and later, this hook now produces an error message on stdout that evidently was not there before:
[...]
416s /etc/update-
417s autopkgtest [23:07:30]: test show-motd: -------
421s autopkgtest [23:07:34]: test show-motd: - - - - - - - - - - results - - -
- - - - - - -
421s show-motd FAIL stderr: /etc/update-
421s autopkgtest [23:07:34]: test show-motd: - - - - - - - - - - stderr - - - - - - - - - -
421s /etc/update-
https:/
The existence of the show-motd package implies that users are meant to be able to execute the update-motd hooks. So these hooks should not spew error messages when run as non-root.
[ Impact ]
* landscape-common's sysinfo motd executable relies on a cache file in a
location where permissions that are too strict - a user cannot execute
the update-motd hooks without errors.
* backporting is justified because this permissions issue exists in previous
versions, but it only manifests if the cache is old enough. It breaks
show-motd tests if the cache file is more than 60s old by the time its tests
run.
* fixing this includes not attempting to create the cache file in
landscape-
[ Test Plan ]
To reproduce, ensure that /var/lib/
run
run-parts /etc/update-motd.d/
as a non-root user. The output will contain the line:
When fixed, the run-parts output will not contain the Permission denied error
and the autopkgtest for show-motd should not fail on stderr output.
[ Where problems could occur ]
Changes to landscape-sysinfo could potential break motd in other ways. This
would manifest as other error messages in the motd or the motd failing to be
displayed or updated.
[ Other Info ]
* Related upstream changes:
* https:/
* https:/
Related branches
- Andreas Hasenack: Approve
- git-ubuntu import: Pending requested
-
Diff: 364 lines (+312/-15)4 files modifieddebian/changelog (+9/-0)
debian/landscape-sysinfo.wrapper (+33/-15)
debian/patches/0001-start-service-during-config.patch (+269/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack: Approve
- git-ubuntu import: Pending requested
-
Diff: 366 lines (+314/-15)4 files modifieddebian/changelog (+9/-0)
debian/landscape-sysinfo.wrapper (+33/-15)
debian/patches/0001-start-service-during-config.patch (+271/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack: Approve
- git-ubuntu import: Pending requested
-
Diff: 366 lines (+314/-15)4 files modifieddebian/changelog (+9/-0)
debian/landscape-sysinfo.wrapper (+33/-15)
debian/patches/0001-start-service-during-config.patch (+271/-0)
debian/patches/series (+1/-0)
- Simon Quigley (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 32 lines (+13/-0)2 files modifieddebian/changelog (+7/-0)
debian/landscape-common.postinst (+6/-0)
- Andreas Hasenack: Approve
-
Diff: 488 lines (+382/-22)9 files modifieddebian/changelog (+16/-0)
debian/control (+3/-1)
debian/landscape-client.service (+1/-0)
debian/landscape-common.postinst (+0/-5)
debian/landscape-sysinfo.wrapper (+33/-15)
debian/patches/0001-start-service-during-config.patch (+269/-0)
debian/patches/0002-fix-broken-build-tests.patch (+54/-0)
debian/patches/series (+2/-0)
debian/rules (+4/-1)
- Andreas Hasenack: Disapprove
-
Diff: 491 lines (+390/-17)9 files modifieddebian/changelog (+23/-0)
debian/control (+3/-1)
debian/landscape-client.service (+1/-0)
debian/landscape-common.postinst (+1/-0)
debian/landscape-sysinfo.wrapper (+33/-15)
debian/patches/0001-start-service-during-config.patch (+269/-0)
debian/patches/0002-fix-broken-build-tests.patch (+54/-0)
debian/patches/series (+2/-0)
debian/rules (+4/-1)
- Andreas Hasenack: Disapprove
-
Diff: 58152 lines (+22534/-11169)308 files modified.flake8 (+5/-0)
.gitignore (+6/-0)
.pre-commit-config.yaml (+43/-0)
LICENSE (+5/-5)
Makefile (+45/-4)
README (+103/-2)
debian/README.source (+1/-1)
debian/changelog (+60/-15)
debian/control (+3/-1)
debian/copyright (+0/-1)
debian/landscape-client.postrm (+1/-1)
debian/landscape-client.service (+1/-0)
debian/landscape-common.postinst (+1/-0)
debian/landscape-sysinfo.wrapper (+31/-14)
debian/patches/0001-start-service-during-config.patch (+269/-0)
debian/patches/0002-fix-broken-build-tests.patch (+54/-0)
debian/patches/series (+2/-0)
debian/rules (+4/-1)
debian/watch (+1/-1)
dev/landscape-client-vm (+2/-2)
dev/null (+0/-66)
dev/upload-to-ppa (+1/-1)
display_py2_testresults (+6/-4)
example.conf (+17/-1)
landscape-client.conf (+0/-1)
landscape/__init__.py (+2/-2)
landscape/client/accumulate.py (+15/-8)
landscape/client/amp.py (+9/-7)
landscape/client/broker/amp.py (+24/-19)
landscape/client/broker/client.py (+44/-25)
landscape/client/broker/config.py (+62/-31)
landscape/client/broker/exchange.py (+109/-65)
landscape/client/broker/exchangestore.py (+21/-8)
landscape/client/broker/ping.py (+40/-20)
landscape/client/broker/registration.py (+62/-43)
landscape/client/broker/server.py (+35/-19)
landscape/client/broker/service.py (+60/-24)
landscape/client/broker/store.py (+78/-19)
landscape/client/broker/tests/helpers.py (+82/-45)
landscape/client/broker/tests/test_amp.py (+28/-19)
landscape/client/broker/tests/test_client.py (+33/-18)
landscape/client/broker/tests/test_config.py (+28/-17)
landscape/client/broker/tests/test_exchange.py (+276/-154)
landscape/client/broker/tests/test_exchangestore.py (+21/-12)
landscape/client/broker/tests/test_ping.py (+42/-27)
landscape/client/broker/tests/test_registration.py (+136/-85)
landscape/client/broker/tests/test_server.py (+109/-54)
landscape/client/broker/tests/test_service.py (+7/-7)
landscape/client/broker/tests/test_store.py (+173/-68)
landscape/client/broker/tests/test_transport.py (+75/-35)
landscape/client/broker/transport.py (+60/-27)
landscape/client/configuration.py (+326/-232)
landscape/client/deployment.py (+95/-50)
landscape/client/lockfile.py (+2/-2)
landscape/client/manager/aptsources.py (+43/-21)
landscape/client/manager/config.py (+41/-22)
landscape/client/manager/customgraph.py (+75/-34)
landscape/client/manager/fakepackagemanager.py (+40/-24)
landscape/client/manager/hardwareinfo.py (+10/-4)
landscape/client/manager/keystonetoken.py (+23/-14)
landscape/client/manager/manager.py (+2/-2)
landscape/client/manager/packagemanager.py (+30/-16)
landscape/client/manager/plugin.py (+17/-9)
landscape/client/manager/processkiller.py (+35/-21)
landscape/client/manager/scriptexecution.py (+97/-55)
landscape/client/manager/service.py (+21/-13)
landscape/client/manager/shutdownmanager.py (+47/-29)
landscape/client/manager/snapmanager.py (+271/-0)
landscape/client/manager/store.py (+30/-16)
landscape/client/manager/tests/test_aptsources.py (+237/-92)
landscape/client/manager/tests/test_config.py (+26/-13)
landscape/client/manager/tests/test_customgraph.py (+460/-229)
landscape/client/manager/tests/test_fakepackagemanager.py (+39/-20)
landscape/client/manager/tests/test_hardwareinfo.py (+9/-6)
landscape/client/manager/tests/test_keystonetoken.py (+20/-15)
landscape/client/manager/tests/test_manager.py (+2/-2)
landscape/client/manager/tests/test_packagemanager.py (+51/-29)
landscape/client/manager/tests/test_plugin.py (+44/-17)
landscape/client/manager/tests/test_processkiller.py (+173/-79)
landscape/client/manager/tests/test_scriptexecution.py (+377/-176)
landscape/client/manager/tests/test_service.py (+8/-6)
landscape/client/manager/tests/test_shutdownmanager.py (+48/-18)
landscape/client/manager/tests/test_snapmanager.py (+259/-0)
landscape/client/manager/tests/test_store.py (+10/-12)
landscape/client/manager/tests/test_usermanager.py (+1068/-563)
landscape/client/manager/usermanager.py (+70/-44)
landscape/client/monitor/activeprocessinfo.py (+18/-10)
landscape/client/monitor/aptpreferences.py (+10/-7)
landscape/client/monitor/cephusage.py (+49/-22)
landscape/client/monitor/computerinfo.py (+75/-38)
landscape/client/monitor/computertags.py (+1/-1)
landscape/client/monitor/computeruptime.py (+24/-13)
landscape/client/monitor/config.py (+32/-11)
landscape/client/monitor/cpuusage.py (+40/-19)
landscape/client/monitor/livepatch.py (+71/-0)
landscape/client/monitor/loadaverage.py (+34/-15)
landscape/client/monitor/memoryinfo.py (+37/-16)
landscape/client/monitor/monitor.py (+10/-5)
landscape/client/monitor/mountinfo.py (+48/-28)
landscape/client/monitor/networkactivity.py (+30/-13)
landscape/client/monitor/networkdevice.py (+12/-9)
landscape/client/monitor/packagemonitor.py (+54/-29)
landscape/client/monitor/plugin.py (+15/-7)
landscape/client/monitor/processorinfo.py (+44/-23)
landscape/client/monitor/rebootrequired.py (+14/-8)
landscape/client/monitor/service.py (+41/-17)
landscape/client/monitor/snapmonitor.py (+44/-0)
landscape/client/monitor/swiftusage.py (+37/-18)
landscape/client/monitor/temperature.py (+40/-18)
landscape/client/monitor/tests/test_activeprocessinfo.py (+679/-288)
landscape/client/monitor/tests/test_aptpreferences.py (+84/-41)
landscape/client/monitor/tests/test_cephusage.py (+28/-14)
landscape/client/monitor/tests/test_computerinfo.py (+108/-56)
landscape/client/monitor/tests/test_computertags.py (+14/-13)
landscape/client/monitor/tests/test_computeruptime.py (+112/-40)
landscape/client/monitor/tests/test_config.py (+6/-4)
landscape/client/monitor/tests/test_cpuusage.py (+14/-10)
landscape/client/monitor/tests/test_livepatch.py (+140/-0)
landscape/client/monitor/tests/test_loadaverage.py (+52/-23)
landscape/client/monitor/tests/test_memoryinfo.py (+48/-22)
landscape/client/monitor/tests/test_monitor.py (+12/-6)
landscape/client/monitor/tests/test_mountinfo.py (+333/-139)
landscape/client/monitor/tests/test_networkactivity.py (+46/-25)
landscape/client/monitor/tests/test_networkdevice.py (+7/-6)
landscape/client/monitor/tests/test_packagemonitor.py (+40/-26)
landscape/client/monitor/tests/test_plugin.py (+31/-14)
landscape/client/monitor/tests/test_processorinfo.py (+106/-78)
landscape/client/monitor/tests/test_rebootrequired.py (+49/-27)
landscape/client/monitor/tests/test_service.py (+11/-9)
landscape/client/monitor/tests/test_snapmonitor.py (+50/-0)
landscape/client/monitor/tests/test_swiftusage.py (+154/-91)
landscape/client/monitor/tests/test_temperature.py (+59/-35)
landscape/client/monitor/tests/test_ubuntuproinfo.py (+5/-5)
landscape/client/monitor/tests/test_ubuntuprorebootrequired.py (+29/-0)
landscape/client/monitor/tests/test_updatemanager.py (+16/-10)
landscape/client/monitor/tests/test_usermonitor.py (+327/-144)
landscape/client/monitor/ubuntuproinfo.py (+11/-7)
landscape/client/monitor/ubuntuprorebootrequired.py (+27/-0)
landscape/client/monitor/updatemanager.py (+11/-12)
landscape/client/monitor/usermonitor.py (+40/-21)
landscape/client/package/changer.py (+134/-69)
landscape/client/package/releaseupgrader.py (+101/-49)
landscape/client/package/reporter.py (+200/-126)
landscape/client/package/taskhandler.py (+42/-25)
landscape/client/package/tests/test_changer.py (+705/-355)
landscape/client/package/tests/test_releaseupgrader.py (+349/-214)
landscape/client/package/tests/test_reporter.py (+663/-303)
landscape/client/package/tests/test_taskhandler.py (+82/-39)
landscape/client/patch.py (+8/-6)
landscape/client/reactor.py (+1/-1)
landscape/client/service.py (+30/-17)
landscape/client/serviceconfig.py (+130/-0)
landscape/client/snap/__init__.py (+0/-0)
landscape/client/snap/http.py (+302/-0)
landscape/client/snap/tests/__init__.py (+0/-0)
landscape/client/snap/tests/test_http.py (+51/-0)
landscape/client/tests/clock.py (+66/-46)
landscape/client/tests/helpers.py (+76/-53)
landscape/client/tests/subunit.py (+133/-106)
landscape/client/tests/test_accumulate.py (+3/-2)
landscape/client/tests/test_amp.py (+33/-27)
landscape/client/tests/test_configuration.py (+1241/-862)
landscape/client/tests/test_deployment.py (+44/-29)
landscape/client/tests/test_diff.py (+4/-4)
landscape/client/tests/test_lockfile.py (+7/-3)
landscape/client/tests/test_patch.py (+11/-8)
landscape/client/tests/test_reactor.py (+1/-2)
landscape/client/tests/test_service.py (+14/-11)
landscape/client/tests/test_serviceconfig.py (+223/-0)
landscape/client/tests/test_watchdog.py (+377/-226)
landscape/client/upgraders/__init__.py (+5/-2)
landscape/client/upgraders/tests/test_broker.py (+1/-3)
landscape/client/upgraders/tests/test_monitor.py (+1/-3)
landscape/client/upgraders/tests/test_package.py (+1/-3)
landscape/client/user/changes.py (+13/-7)
landscape/client/user/management.py (+142/-68)
landscape/client/user/provider.py (+83/-35)
landscape/client/user/tests/helpers.py (+78/-35)
landscape/client/user/tests/test_changes.py (+121/-63)
landscape/client/user/tests/test_management.py (+406/-168)
landscape/client/user/tests/test_provider.py (+503/-230)
landscape/client/watchdog.py (+187/-96)
landscape/constants.py (+15/-2)
landscape/lib/amp.py (+94/-50)
landscape/lib/apt/package/facade.py (+178/-107)
landscape/lib/apt/package/skeleton.py (+89/-44)
landscape/lib/apt/package/store.py (+111/-84)
landscape/lib/apt/package/testing.py (+243/-186)
landscape/lib/apt/package/tests/test_facade.py (+1063/-411)
landscape/lib/apt/package/tests/test_skeleton.py (+90/-37)
landscape/lib/apt/package/tests/test_store.py (+87/-55)
landscape/lib/backoff.py (+1/-1)
landscape/lib/base64.py (+0/-2)
landscape/lib/bootstrap.py (+4/-8)
landscape/lib/bpickle.py (+67/-63)
landscape/lib/cli.py (+9/-4)
landscape/lib/cloud.py (+8/-4)
landscape/lib/compat.py (+5/-0)
landscape/lib/config.py (+52/-33)
landscape/lib/disk.py (+44/-17)
landscape/lib/fd.py (+0/-1)
landscape/lib/fetch.py (+40/-19)
landscape/lib/format.py (+5/-5)
landscape/lib/fs.py (+0/-1)
landscape/lib/gpg.py (+25/-14)
landscape/lib/jiffies.py (+3/-3)
landscape/lib/juju.py (+3/-4)
landscape/lib/lock.py (+2/-2)
landscape/lib/log.py (+0/-2)
landscape/lib/logging.py (+51/-23)
landscape/lib/lsb_release.py (+4/-3)
landscape/lib/message.py (+3/-2)
landscape/lib/monitor.py (+70/-37)
landscape/lib/network.py (+63/-37)
landscape/lib/persist.py (+53/-35)
landscape/lib/plugin.py (+2/-4)
landscape/lib/process.py (+35/-17)
landscape/lib/reactor.py (+31/-19)
landscape/lib/schema.py (+63/-36)
landscape/lib/scriptcontent.py (+1/-1)
landscape/lib/sequenceranges.py (+9/-8)
landscape/lib/store.py (+3/-0)
landscape/lib/sysstats.py (+42/-26)
landscape/lib/testing.py (+184/-115)
landscape/lib/tests/test_amp.py (+128/-84)
landscape/lib/tests/test_backoff.py (+5/-6)
landscape/lib/tests/test_bootstrap.py (+17/-12)
landscape/lib/tests/test_bpickle.py (+11/-13)
landscape/lib/tests/test_cloud.py (+56/-27)
landscape/lib/tests/test_config.py (+113/-75)
landscape/lib/tests/test_disk.py (+42/-24)
landscape/lib/tests/test_encoding.py (+12/-11)
landscape/lib/tests/test_fd.py (+4/-5)
landscape/lib/tests/test_fetch.py (+253/-170)
landscape/lib/tests/test_format.py (+15/-11)
landscape/lib/tests/test_fs.py (+35/-27)
landscape/lib/tests/test_gpg.py (+37/-21)
landscape/lib/tests/test_juju.py (+43/-25)
landscape/lib/tests/test_lock.py (+4/-4)
landscape/lib/tests/test_logging.py (+22/-10)
landscape/lib/tests/test_lsb_release.py (+46/-29)
landscape/lib/tests/test_monitor.py (+54/-34)
landscape/lib/tests/test_network.py (+217/-138)
landscape/lib/tests/test_persist.py (+94/-74)
landscape/lib/tests/test_plugin.py (+8/-6)
landscape/lib/tests/test_process.py (+33/-24)
landscape/lib/tests/test_reactor.py (+26/-12)
landscape/lib/tests/test_schema.py (+55/-32)
landscape/lib/tests/test_scriptcontent.py (+7/-6)
landscape/lib/tests/test_sequenceranges.py (+25/-21)
landscape/lib/tests/test_sysstats.py (+82/-48)
landscape/lib/tests/test_tag.py (+23/-19)
landscape/lib/tests/test_timestamp.py (+1/-1)
landscape/lib/tests/test_twisted_util.py (+27/-12)
landscape/lib/tests/test_versioning.py (+2/-3)
landscape/lib/tests/test_vm_info.py (+10/-8)
landscape/lib/tests/test_warning.py (+9/-6)
landscape/lib/twisted_util.py (+43/-18)
landscape/lib/user.py (+1/-2)
landscape/lib/versioning.py (+6/-4)
landscape/lib/vm_info.py (+4/-3)
landscape/lib/warning.py (+0/-1)
landscape/message_schemas/__init__.py (+0/-1)
landscape/message_schemas/message.py (+8/-4)
landscape/message_schemas/server_bound.py (+682/-374)
landscape/message_schemas/test_message.py (+15/-9)
landscape/sysinfo/deployment.py (+67/-29)
landscape/sysinfo/disk.py (+26/-16)
landscape/sysinfo/landscapelink.py (+3/-3)
landscape/sysinfo/load.py (+4/-3)
landscape/sysinfo/loggedinusers.py (+2/-2)
landscape/sysinfo/memory.py (+9/-6)
landscape/sysinfo/network.py (+15/-7)
landscape/sysinfo/processes.py (+18/-8)
landscape/sysinfo/sysinfo.py (+40/-21)
landscape/sysinfo/temperature.py (+4/-5)
landscape/sysinfo/testplugin.py (+1/-2)
landscape/sysinfo/tests/test_deployment.py (+93/-52)
landscape/sysinfo/tests/test_disk.py (+113/-50)
landscape/sysinfo/tests/test_landscapelink.py (+7/-5)
landscape/sysinfo/tests/test_load.py (+4/-7)
landscape/sysinfo/tests/test_loggedinusers.py (+14/-10)
landscape/sysinfo/tests/test_memory.py (+8/-7)
landscape/sysinfo/tests/test_network.py (+54/-39)
landscape/sysinfo/tests/test_processes.py (+38/-17)
landscape/sysinfo/tests/test_sysinfo.py (+182/-136)
landscape/sysinfo/tests/test_temperature.py (+11/-9)
man/landscape-client.1 (+4/-4)
man/landscape-client.txt (+4/-4)
man/landscape-config.1 (+28/-20)
man/landscape-config.txt (+18/-14)
man/landscape-sysinfo.txt (+6/-7)
pqm-tests.sh (+0/-1)
pyproject.toml (+13/-0)
scripts/landscape-broker (+3/-1)
scripts/landscape-client (+5/-2)
scripts/landscape-config (+4/-1)
scripts/landscape-manager (+3/-1)
scripts/landscape-monitor (+3/-1)
scripts/landscape-package-changer (+3/-1)
scripts/landscape-package-reporter (+3/-1)
scripts/landscape-release-upgrader (+3/-1)
scripts/landscape-sysinfo (+6/-2)
setup.py (+34/-29)
setup_client.py (+30/-29)
setup_lib.py (+19/-18)
setup_sysinfo.py (+8/-9)
snap/snapcraft.yaml (+98/-0)
Changed in landscape-client (Ubuntu): | |
assignee: | nobody → Mitch Burton (mitchburton) |
Changed in landscape-client (Ubuntu): | |
status: | New → Confirmed |
Changed in landscape-client (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in landscape-client: | |
assignee: | nobody → Mitch Burton (mitchburton) |
Changed in landscape-client: | |
status: | New → In Progress |
Changed in landscape-client (Ubuntu): | |
status: | Fix Released → Confirmed |
importance: | Undecided → High |
Changed in landscape-client: | |
status: | In Progress → Fix Released |
This bug was fixed in the package landscape-client - 23.08-0ubuntu2
---------------
landscape-client (23.08-0ubuntu2) noble; urgency=medium
* d/landscape- common. postint: ensure sysinfo cache file exists and is globally
read-write (LP: #2040924)
-- Mitch Burton <email address hidden> Thu, 23 Nov 2023 14:28:14 -0800