Updated description to add the "good case" to the test plan and a
mention of fixed autopkgtest. Added a brief description of the fix to
[impact] section.

** Description changed:

  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-motd.d/50-landscape-sysinfo: 24: cannot create 
/var/lib/landscape/landscape-sysinfo.cache: Permission denied
  417s autopkgtest [23:07:30]: test show-motd: -----------------------]
  421s autopkgtest [23:07:34]: test show-motd:  - - - - - - - - - - results - - 
-
  - - - - - - -
  421s show-motd            FAIL stderr: 
/etc/update-motd.d/50-landscape-sysinfo: 24: cannot create 
/var/lib/landscape/landscape-sysinfo.cache: Permission denied
  421s autopkgtest [23:07:34]: test show-motd:  - - - - - - - - - - stderr - - 
- - - - - - - -
  421s /etc/update-motd.d/50-landscape-sysinfo: 24: cannot create 
/var/lib/landscape/landscape-sysinfo.cache: Permission denied
  
  https://autopkgtest.ubuntu.com/packages/u/update-motd/mantic/amd64
  
  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.
+  * 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.
+  * 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-sysinfo when permission issues prevent doing so.
  
  [ Test Plan ]
  
  To reproduce, ensure that /var/lib/landscape-sysinfo.cache does not exist, 
then
  run
  
-      run-parts /etc/update-motd.d/
+      run-parts /etc/update-motd.d/
  
-  as a non-root user. The output will contain the line:
+  as a non-root user. The output will contain the line:
  
-        /etc/update-motd.d//50-landscape-sysinfo: 17: cannot create
+        /etc/update-motd.d//50-landscape-sysinfo: 17: cannot create
  /var/lib/landscape-sysinfo.cache: Permission denied
+ 
+ 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://github.com/canonical/landscape-client/pull/201
-    * https://github.com/canonical/landscape-client/pull/219
+  * Related upstream changes:
+    * https://github.com/canonical/landscape-client/pull/201
+    * https://github.com/canonical/landscape-client/pull/219

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2040924

Title:
  /etc/update-motd.d/50-landscape-sysinfo: 24: cannot create
  /var/lib/landscape/landscape-sysinfo.cache: Permission denied

To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape-client/+bug/2040924/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to