canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
52 stars 73 forks source link

Pro release v32 #3052

Closed lucasmoura closed 4 months ago

lucasmoura commented 5 months ago

Why is this needed?

Pro release version v32

athos-ribeiro commented 5 months ago

commit c5ae5f4 says it is adding tests, but it also includes 3 logical changes. The most relevant one is moving user-config.json to the private directory. During an offline conversation, Lucas went through this change with me and this LGTM. It would be nice to split similar changes in multiple commits in the future!

panlinux commented 5 months ago

xenial has some changes to available updates it seems:

2024-05-01T14:30:45.3971130Z       Assertion Failed: Expected to find exactly:
2024-05-01T14:30:45.3972734Z         Reading package lists...
2024-05-01T14:30:45.3974123Z         Building dependency tree...
2024-05-01T14:30:45.3975723Z         Reading state information...
2024-05-01T14:30:45.3977133Z         Calculating upgrade...
2024-05-01T14:30:45.3978376Z         #
2024-05-01T14:30:45.3979458Z         # one
2024-05-01T14:30:45.3980542Z         #
2024-05-01T14:30:45.3981955Z         0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2024-05-01T14:30:45.3983649Z       But got:
2024-05-01T14:30:45.3984780Z         Reading package lists...
2024-05-01T14:30:45.3986130Z         Building dependency tree...
2024-05-01T14:30:45.3987537Z         Reading state information...
2024-05-01T14:30:45.3988950Z         Calculating upgrade...
2024-05-01T14:30:45.3990186Z         #
2024-05-01T14:30:45.3991245Z         # one
2024-05-01T14:30:45.3992338Z         #
2024-05-01T14:30:45.3993574Z         The following packages have been kept back:
2024-05-01T14:30:45.3995380Z           liblxc1 lxd-client
2024-05-01T14:30:45.3996965Z         0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
panlinux commented 5 months ago

The bionic lxd run is getting this error, twice in a row now:

2024-05-01T19:30:01.6478329Z   Scenario Outline: Create a Pro fips-updates image and launch -- @1.2 ubuntu release                             # features/cloud_pro_clone.feature:54
2024-05-01T19:30:01.6481283Z     Given a `bionic` `gcp.pro` machine with ubuntu-advantage-tools installed                                      # features/steps/machines.py:167
2024-05-01T19:30:59.5167943Z     When I create the file `/etc/ubuntu-advantage/uaclient.conf` with the following                               # features/steps/files.py:52
2024-05-01T19:30:59.5170480Z       """
2024-05-01T19:30:59.5171955Z       contract_url: 'https://contracts.canonical.com'
2024-05-01T19:30:59.5173725Z       data_dir: /var/lib/ubuntu-advantage
2024-05-01T19:30:59.5175011Z       log_level: debug
2024-05-01T19:30:59.5176456Z       log_file: /var/log/ubuntu-advantage.log
2024-05-01T19:30:59.5177676Z       """
2024-05-01T19:30:59.7658013Z     When I run `pro auto-attach` with sudo                                                                        # features/steps/shell.py:54
2024-05-01T19:31:41.3568991Z     Then the machine is attached                                                                                  # features/steps/attach.py:87
2024-05-01T19:31:42.4210366Z     When I apt install `jq`                                                                                       # features/steps/packages.py:81
2024-05-01T19:31:49.3130368Z     When I save the `activityInfo.activityToken` value from the contract                                          # features/steps/contract.py:60
2024-05-01T19:31:49.5291486Z     When I save the `activityInfo.activityID` value from the contract                                             # features/steps/contract.py:60
2024-05-01T19:31:49.7328020Z     When I run `pro enable fips-updates --assume-yes` with sudo                                                   # features/steps/shell.py:54
2024-05-01T19:33:35.1570028Z     And I run `pro status --format yaml` with sudo                                                                # features/steps/shell.py:54
2024-05-01T19:33:37.1247839Z     Then stdout matches regexp                                                                                    # features/steps/output.py:141
2024-05-01T19:33:37.1249800Z       """
2024-05-01T19:33:37.1251111Z       \s*name: fips-updates
2024-05-01T19:33:37.1252201Z       \s*status: enabled
2024-05-01T19:33:37.1252895Z       """
2024-05-01T19:33:37.2443202Z     When I reboot the machine                                                                                     # features/steps/machines.py:235
2024-05-01T19:35:14.7836284Z     When I take a snapshot of the machine                                                                         # features/steps/machines.py:142
2024-05-01T19:38:04.1743200Z       Captured stdout:
2024-05-01T19:38:04.1744840Z       HOOK-ERROR in after_step: SSHException: 
2024-05-01T19:38:04.1749664Z         File "/home/runner/work/ubuntu-pro-client/ubuntu-pro-client/.tox/behave/lib/python3.10/site-packages/behave/runner.py", line 545, in run_hook
2024-05-01T19:38:04.1752820Z           self.hooks[name](context, *args)
2024-05-01T19:38:04.1754552Z         File "features/environment.py", line 539, in after_step
2024-05-01T19:38:04.1757592Z           apparmor_logs = _get_relevant_apparmor_logs(context)
2024-05-01T19:38:04.1759538Z         File "features/environment.py", line 525, in _get_relevant_apparmor_logs
2024-05-01T19:38:04.1761703Z           sut.instance.pull_file("/var/log/syslog", syslog_dest)
2024-05-01T19:38:04.1765128Z         File "/home/runner/work/ubuntu-pro-client/ubuntu-pro-client/.tox/behave/lib/python3.10/site-packages/pycloudlib/instance.py", line 314, in pull_file
2024-05-01T19:38:04.1770818Z           sftp = self._sftp_connect()
2024-05-01T19:38:04.1773703Z         File "/home/runner/work/ubuntu-pro-client/ubuntu-pro-client/.tox/behave/lib/python3.10/site-packages/pycloudlib/instance.py", line 472, in _sftp_connect
2024-05-01T19:38:04.1776328Z           client = self._ssh_connect()
2024-05-01T19:38:04.1779118Z         File "/home/runner/work/ubuntu-pro-client/ubuntu-pro-client/.tox/behave/lib/python3.10/site-packages/pycloudlib/instance.py", line 457, in _ssh_connect
2024-05-01T19:38:04.1781623Z           raise SSHException from e

I can't find what the exception actually is.

Raw logs: https://productionresultssa14.blob.core.windows.net/actions-results/40fa8ec2-2967-492e-91b6-e0ec9a9bb3f8/workflow-job-run-893771a9-84a4-550f-6bf4-946c1d4d4410/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-05-01T20%3A19%3A07Z&sig=1FD4e6BBgcz0qhlX44ZzFQgrhD6bi55JclTxQOyStxc%3D&sp=r&spr=https&sr=b&st=2024-05-01T20%3A09%3A02Z&sv=2021-12-02

panlinux commented 5 months ago

bionic is failing exactly because of the availability of the distro-info-data update:

Assertion Failed: Expected to find exactly:
  Reading package lists...
  Building dependency tree...
  Reading state information...
  Calculating upgrade...
  #
  # one
  #
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
But got:
  Reading package lists...
  Building dependency tree...
  Reading state information...
  Calculating upgrade...
  #
  # one
  #
  The following packages will be upgraded:
    distro-info-data
  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  1 standard LTS security update
  Need to get 5060 B of archives.
  After this operation, 0 B of additional disk space will be used.
  Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 distro-info-data all 0.37ubuntu0.18 [5060 B]
  Fetched 5060 B in 0s (20.3 kB/s)
  (Reading database ... 
  (Reading database ... 5%
  (Reading database ... 10%
  (Reading database ... 15%
  (Reading database ... 20%
  (Reading database ... 25%
  (Reading database ... 30%
  (Reading database ... 35%
  (Reading database ... 40%
  (Reading database ... 45%
  (Reading database ... 50%
  (Reading database ... 55%
  (Reading database ... 60%
  (Reading database ... 65%
  (Reading database ... 70%
  (Reading database ... 75%
  (Reading database ... 80%
  (Reading database ... 85%
  (Reading database ... 90%
  (Reading database ... 95%
  (Reading database ... 100%
  (Reading database ... 29307 files and directories currently installed.)
  Preparing to unpack .../distro-info-data_0.37ubuntu0.18_all.deb ...
  Unpacking distro-info-data (0.37ubuntu0.18) over (0.37ubuntu0.17+esm1) ...
  Setting up distro-info-data (0.37ubuntu0.18) ...
lucasmoura commented 5 months ago

@panlinux I am fixing the bionic tests on #3103. When CI is green there for Bionic, I will merge it and the test fixes will be reflected here as well

lucasmoura commented 4 months ago

We have some fix related tests failing due to this issue: https://portal.admin.canonical.com/C163552/

renanrodrigo commented 4 months ago

R E L E A S E D