# Focal desktop results: SUCCESS

1. # install proposed

$ cat > setup_proposed.sh <<EOF
#!/bin/bash
mirror=http://archive.ubuntu.com/ubuntu
echo deb \$mirror \$(lsb_release -sc)-proposed main | tee 
/etc/apt/sources.list.d/proposed.list
apt-get update -q
apt-get install -qy software-properties-gtk software-properties-common 
python3-software-properties
EOF
$ IP=`uvt-kvm ip ubuntu20.04`
$ scp setup_proposed.sh csmith@$IP:.

csmith@csmith-Standard-PC-Q35-ICH9-2009:~$ lsb_release -sc
focal
csmith@csmith-Standard-PC-Q35-ICH9-2009:~$ apt policy software-properties-gtk
software-properties-gtk:
  Installed: 0.99.9.8
  Candidate: 0.99.9.8
  Version table:
 *** 0.99.9.8 500
        500 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     0.98.9.5 500
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
        500 http://us.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
     0.98.9.2 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
     0.98.9 500
        500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/main i386 Packages
csmith@csmith-Standard-PC-Q35-ICH9-2009:~$ [ -f 
/var/lib/ubuntu-advantage-tools/status.json ] && echo "status.json PRESENT" || 
echo "status.json ABSENT"
status.json ABSENT
csmith@csmith-Standard-PC-Q35-ICH9-2009:~$ software-properties-gtk 
# no errors
3. Updates tab in "Software & Updates" dialog
Basic Security Maintenance   Extended...   # Link goes to 
https://ubuntu.com/security/esm
Active until 04/23/2025

4. Cancel button 
# no errors on software-properties-gtk console
5. Attach and validate
csmith@csmith-Standard-PC-Q35-ICH9-2009:~$ sudo ua attach <REDACTED>
[sudo] password for csmith: 
Enabling default service esm-apps
Updating package lists
UA Apps: ESM enabled
Enabling default service esm-infra
Updating package lists
UA Infra: ESM enabled
Enabling default service livepatch
Canonical livepatch enabled.
This machine is now attached to 'server-team-ua-client-ci-uaa'

SERVICE       ENTITLED  STATUS    DESCRIPTION
cis           yes       disabled  Center for Internet Security Audit Tools
esm-apps      yes       enabled   UA Apps: Extended Security Maintenance (ESM)
esm-infra     yes       enabled   UA Infra: Extended Security Maintenance (ESM)
fips          yes       disabled  NIST-certified core packages
fips-updates  yes       disabled  NIST-certified core packages with priority 
security updates
livepatch     yes       enabled   Canonical Livepatch service

NOTICES
Operation in progress: ua attach

Enable services with: ua enable <service>

                Account: UA Client Test
           Subscription: server-team-ua-client-ci-uaa
            Valid until: 9999-12-31 00:00:00+00:00
Technical support level: essential
csmith@csmith-Standard-PC-Q35-ICH9-2009:~$ software-properties-gtk 
# no token expiry error messages
6. Click Updates tab and validate:
Extended Security Maintenance
Active until 12/31/1999


** Tags removed: verification-needed-focal
** Tags added: verification-done-focal

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to software-properties in
Ubuntu.
https://bugs.launchpad.net/bugs/1939732

Title:
  report availability of Ubuntu Advantage ESM services on unattached
  machines

Status in software-properties package in Ubuntu:
  Fix Committed
Status in software-properties source package in Focal:
  Fix Committed
Status in software-properties source package in Hirsute:
  Fix Committed
Status in software-properties source package in Impish:
  Fix Committed

Bug description:
  [Impact]

    * Error messages emitted to software-properties-gtk console "[Errno 2] No 
such file or directory: '/var/lib/ubuntu-advantage/status.json'" due to 
incorrect expectation that status.json file is written when non-root runs `ua 
status`
    * This logic results in multiple `ua status` calls which each result in a 
network-egress to https://contracts.canonical.com on unattached machines which 
could result in delays in rendering  the GTK dialogs while awaiting a response.

  [Test Case]
  1. Install latest version of software-properties-gtk from -proposed
  cat > setup_proposed.sh <<EOF
  #!/bin/bash
  mirror=http://archive.ubuntu.com/ubuntu
  echo deb \$mirror \$(lsb_release -sc)-proposed main | tee 
/etc/apt/sources.list.d/proposed.list
  apt-get update -q
  apt-get install -qy software-properties-gtk software-properties-common 
python3-software-properties
  EOF

  IP=`uvt-kvm ip ${DESKTOP_VM}`
  scp setup_proposed.sh ubuntu@$IP:.
  ssh ubuntu@$IP -- sudo bash ./setup_proposed.sh

  2. run software-properties-gtk on the commandline
  ssh ubuntu@$IP -- software-properties-gtk

  # Validate no error messages on launch
  3. Click Updates tab and validate
  Basic Security Maintenance   "Extend..."
  Active until 04/23/2025

  (Extend.. is a link that will spawn a browser to
  ubuntu.com/security/esm)

  4. Click Cancel button

  5. Attach to a UA contract and re-run Software and updates UX
  ssh ubuntu@$IP -- sudo ua attach $MY_TOKEN
  ssh ubuntu@$IP -- software-properties-gtk
  # validate no error messages

  6. Click Updates tab and validate:
  Extended Security Maintenance
  Active until 12/31/1999

  # Note no "Extend..." text or link

  [Where problems could occur]
   * invalid parsing of UA contract information or missing 
/var/lib/ubuntu-advantage/status.json will print messages to the console in the 
event of errors or warnings.
   * failures and tracebacks in this code will result in invalid representation 
of system defaults in the Updates tab about whether or not a machine is 
attached to a contract or whether the contract is expired.
   * Other than user-facing documentation about the state of the UA 
subscription this does not prevent the dialogs from functioning.
   * limited network environments could have a delay of UX rendering due to `ua 
status` calls timing out on attempts to reach contracts.canonical.com

  [Original Description]

  Release: bionic/focal
  Version: 0.96.24.32 (bionic)

  Issue:
  Software & Updates GTK UI doesn't report availability of Ubuntu Advantage ESM 
Infra or ESM Apps services on unattached machines

  Steps to repropduce:

  Launch software-properties-gtk from the commandline.
  See unexpected errors on the terminal

   No ua status file written:
  [Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'

  Navigation to the "Updates" tab
  See only:
  Basic Security Maintenance
  04/26/2023

  Expected results:
  See no error messages on terminal
  See a link to the right of Basic Security Maintenance on the "Updates" tab 
that points to ESM info
  Basic Security Maintenance                      Extend...(links to  
ubuntu.com/security/esm)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1939732/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to