Disable Ubuntu Pro registration when not online

Bug #2004634 reported by Sebastien Bacher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
High
Nathan Teodosio
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

* Impact

The current UI allows the user to try to register to Ubuntu Pro even when the system isn't online, which eventually leads to an error since the client fails to contact the server. The updated design disable the registration UI in those cases and inform the user they need to get online to be able to register which is a better experience.

* Test Case

- ensure that the machine isn't attached to ubuntu pro (otherwise the screen would not be displayed) and is online
$ pro status
and `$ pro detach` if needed

- disconnect the system, using for example the top panel indicator

- start software-properties-gtk and select the Ubuntu Pro tab

- click 'Enable Ubuntu Pro'

- The dialog controls should be disabled and a string 'Unable to connect to Ubuntu Pro servers. Check your internet connection.' displayed at the bottom

- reconnect the system

- the dialog control should become active and the label be removed

- register to Ubuntu Pro, that should be working

* Regression potential

If the connectivity check was wrong or not reliable it could be that the dialog controls would be disabled even if the system is online, or that it would fail to detect that the system isn't connected and let the user try to register anyway.

The change also adds a new translatable string. Since currently we don't include translations for that new UI it isn't really a regression. We still plan to fix that by the next languagepack update.

Changed in software-properties (Ubuntu):
importance: Undecided → High
assignee: nobody → Nathan Teodosio (nteodosio)
status: New → Fix Committed
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Sebastien, or anyone else affected,

Accepted software-properties into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/software-properties/0.99.22.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in software-properties (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Changed in software-properties (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Sebastien, or anyone else affected,

Accepted software-properties into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/software-properties/0.99.9.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in software-properties (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Sebastien, or anyone else affected,

Accepted software-properties into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/software-properties/0.96.24.32.21 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (software-properties/0.96.24.32.21)

All autopkgtests for the newly accepted software-properties (0.96.24.32.21) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

crash/unknown (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#software-properties

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Focal virtual machine, installed software-properties-{common,gtk} and python3-software-properties all from proposed (0.99.9.8).

With Ubuntu Pro disabled and disconnected from Internet, clicked "Enable Ubuntu Pro".

The dialog controls were disabled and a string 'Unable to connect to Ubuntu Pro servers. Check your internet connection.' was displayed at the bottom.

I connected to Internet and the dialog went away. Controls were unlocked and a PIN was generated, with which I successfully attached the machine to Ubuntu Pro.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

A minor bug (raises an exception, though in a thread) has been introduced in Bionic: Disconnecting for long enough after acquiring a PIN will result in a call to GLib.Thread.new, an API not available in Bionic ([1] was introduced after [2] and needs to be addressed likewise).

[1] https://git.launchpad.net/software-properties/tree/softwareproperties/gtk/DialogUaAttach.py#n197
[2] https://git.launchpad.net/software-properties/commit/?id=5f7360ce3aaf893146885029946b3bc8a8b2c9ed

tags: added: verification-failed-bionic
removed: verification-needed-bionic
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Jammy virtual machine, installed software-properties-{common,gtk} and python3-software-properties all from proposed (0.99.22.6).

With Ubuntu Pro disabled and disconnected from Internet, clicked "Enable Ubuntu Pro".

The dialog controls were disabled and a string 'Unable to connect to Ubuntu Pro servers. Check your internet connection.' was displayed at the bottom.

I connected to Internet and the dialog went away. Controls were unlocked and a PIN was generated, with which I successfully attached the machine to Ubuntu Pro.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks Nathan, I've sponsored your follow-up fix for bionic now

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.99.32

---------------
software-properties (0.99.32) lunar; urgency=medium

  [ Nathan Pratta Teodosio ]
  * Disable the Ubuntu Pro UI with an explanation when not connected
    (lp: #2004634)
  * Catch exceptions to wait (lp: #2003996)
  * Initialize pin as empty string (lp: #2004245)

 -- Sebastien Bacher <email address hidden> Thu, 02 Feb 2023 15:37:06 +0100

Changed in software-properties (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for software-properties has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.99.22.6

---------------
software-properties (0.99.22.6) jammy; urgency=medium

  [ Nathan Pratta Teodosio ]
  * Disable the Ubuntu Pro UI with an explanation when not connected
    (lp: #2004634)
  * Catch exceptions to wait (lp: #2003996)
  * Initialize pin as empty string (lp: #2004245)

 -- Sebastien Bacher <email address hidden> Fri, 03 Feb 2023 11:35:08 +0100

Changed in software-properties (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.99.9.11

---------------
software-properties (0.99.9.11) focal; urgency=medium

  [ Nathan Pratta Teodosio ]
  * Disable the Ubuntu Pro UI with an explanation when not connected
    (lp: #2004634)
  * Catch exceptions to wait (lp: #2003996)
  * Initialize pin as empty string (lp: #2004245)

 -- Sebastien Bacher <email address hidden> Fri, 03 Feb 2023 12:30:09 +0100

Changed in software-properties (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Sebastien, or anyone else affected,

Accepted software-properties into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/software-properties/0.96.24.32.22 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed-bionic
removed: verification-failed-bionic
Revision history for this message
Sebastien Bacher (seb128) wrote :

Testing 0.96.24.32.22 on bionic, the 'Unable to connect to Ubuntu Pro servers. Check your internet connection.' warning is correctly displayed when disconnected and goes away after reconnecting. The error which existed in .22 about the non existing API is also resolved

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (software-properties/0.96.24.32.22)

All autopkgtests for the newly accepted software-properties (0.96.24.32.22) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

crash/7.2.8-1ubuntu0.18.04.2 (i386)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#software-properties

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.96.24.32.22

---------------
software-properties (0.96.24.32.22) bionic; urgency=medium

  [ Nathan Pratta Teodosio ]
  * fix a problem in the fix backported in the previous revision

software-properties (0.96.24.32.21) bionic; urgency=medium

  [ Nathan Pratta Teodosio ]
  * Disable the Ubuntu Pro UI with an explanation when not connected
    (lp: #2004634)
  * Catch exceptions to wait (lp: #2003996)
  * Initialize pin as empty string (lp: #2004245)

 -- Sebastien Bacher <email address hidden> Thu, 16 Feb 2023 21:10:38 +0100

Changed in software-properties (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.