Comment 2 for bug 1950813

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote (last edit ):

Those are steps to assure that the status job does not call the contracts
server on an unattached machine

1. Launch a lxd instance of (xenial|bionic|focal)
2. Install a version of ubuntu-advantage-tools containing the change (> 27.4.1).
3. Disable all jobs but the status job:
`sudo ua config set metering_timer=0`
`sudo ua config set update_messaging_timer=0`
4. Start Wireshark on a separate terminal, looking for calls to the Contracts Server
`sudo tcpdump -i eth0 -A | grep contracts`
5. Run `sudo ua status`
6. Verify:
    a. The status output shows the machine as unnatached
    b. Wireshark captured the call to the contracts server
7. Remove jobs-status.json
`sudo rm -f /var/lib/ubuntu-advantage/jobs-status.json`
6. Run the timer script
`sudo python3 /usr/lib/ubuntu-advantage/timer.py`
7. Verify that no call to contracts.canonical.com is shown in the terminal with
Wireshark (after the previous one)
8. Verify that the job was actually processed by the timer
`sudo cat /var/lib/ubuntu-advantage/jobs-status.json`
"update_status" should be the only job there.