** Description changed:

- When cloud-init shows a warning with Z99-cloudinit-warnings.sh (such as
- on login after a ds-identify error), it suggests that you can:
+ http://pad.lv/1691551
+ https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1691551
  
- Disable the warnings above by:
-   touch /home/ubuntu/.cloud-warnings.skip
- or
-   touch /var/lib/cloud/instance/warnings/.skip
+ === Begin SRU Template ===
+ [Impact] 
+ Warnings are not suppressed when /var/lib/cloud/instance/warnings/.skip 
exists.
  
- The second file (/var/lib/cloud/....) is not honored.
+ [Test Case]
+ if [ ! -f lxc-proposed-snapshot ]; then
+   wget 
https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot
+   chmod 755 lxc-proposed-snapshot
+ fi
  
- The easiest recreate is:
- $ name="x1"
- $ lxc launch ubuntu-daily:xenial $name
- $ sleep 10
- $ lxc exec $name -- sh -c 'd=/var/lib/cloud/instance/warnings/; mkdir -p $d; 
echo "WARNING WARNING FOO" > "$d/warn-foo"'
+ for release in xenial yakkety zesty; do
+         ref=$release-proposed;
+         echo "$release START --------------";
+         ./lxc-proposed-snapshot --proposed --install ntp --publish $release 
$ref;
+         lxc init $ref test-$release;
+         lxc start test-$release;
+         sleep 10
+         # Create a warning
+         lxc exec test-$release -- sh -c 'd=/var/lib/cloud/instance/warnings/; 
mkdir -p $d; echo "WARNING WARNING FOO" > "$d/warn-foo"'
+         # Validate warning exists
+         echo -n "Warning should exist on login: "
+         lxc exec test-$release -- bash --login </dev/null 2>&1 | grep WARNING
+         lxc exec test-$release -- touch /var/lib/cloud/instance/warnings/.skip
+         echo -n "Warning should now be suppressed on login: "
+         lxc exec test-$release -- bash --login </dev/null 2>&1 | grep WARNING
+         echo "$release DONE --------------";
+ done
  
- ## see the warning is there.
- $ lxc exec $name -- bash --login </dev/null
- WARNING WARNING FOO
+ [Regression Potential]
+ Minimal as the alternative warning suppression file works if you touch 
/root/.cloud-warnings.skip
  
- Disable the warnings above by:
-   touch /root/.cloud-warnings.skip
- or
-   touch /var/lib/cloud/instance/warnings/.skip
- mesg: ttyname failed: Inappropriate ioctl for device
-   
- $ lxc exec $name -- touch /var/lib/cloud/instance/warnings/.skip
- ## This time you should not see it, but you will.
- $ lxc exec $name -- bash --login </dev/null
- WARNING WARNING FOO
- ...
+ [Other Info]
+ Upstream commit:
+  
https://git.launchpad.net/cloud-init/commit/?id=66e46d8ec290737fd74f50eb8c7672d627d9b516
+ 
+ === End SRU Template ===

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

Title:
  warnings are still printed after user touches file

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1691551/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to